@feathery/react 2.12.1 → 2.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/elements/fields/AddressLine1Field/tests/test-utils.d.ts +0 -1
- package/dist/cjs/elements/fields/AddressLine1Field/tests/test-utils.d.ts.map +1 -1
- package/dist/cjs/elements/fields/ButtonGroupField/tests/test-utils.d.ts +0 -1
- package/dist/cjs/elements/fields/ButtonGroupField/tests/test-utils.d.ts.map +1 -1
- package/dist/cjs/elements/fields/CheckboxField/tests/test-utils.d.ts +0 -1
- package/dist/cjs/elements/fields/CheckboxField/tests/test-utils.d.ts.map +1 -1
- package/dist/cjs/elements/fields/CheckboxGroupField/tests/test-utils.d.ts +0 -1
- package/dist/cjs/elements/fields/CheckboxGroupField/tests/test-utils.d.ts.map +1 -1
- package/dist/cjs/elements/fields/ColorPickerField/tests/test-utils.d.ts +0 -1
- package/dist/cjs/elements/fields/ColorPickerField/tests/test-utils.d.ts.map +1 -1
- package/dist/cjs/elements/fields/DateSelectorField/tests/test-utils.d.ts +0 -1
- package/dist/cjs/elements/fields/DateSelectorField/tests/test-utils.d.ts.map +1 -1
- package/dist/cjs/elements/fields/DropdownField/tests/test-utils.d.ts +0 -2
- package/dist/cjs/elements/fields/DropdownField/tests/test-utils.d.ts.map +1 -1
- package/dist/cjs/elements/fields/DropdownMultiField/tests/test-utils.d.ts +0 -1
- package/dist/cjs/elements/fields/DropdownMultiField/tests/test-utils.d.ts.map +1 -1
- package/dist/cjs/elements/fields/MatrixField/tests/test-utils.d.ts +0 -1
- package/dist/cjs/elements/fields/MatrixField/tests/test-utils.d.ts.map +1 -1
- package/dist/cjs/elements/fields/PasswordField/tests/test-utils.d.ts +0 -1
- package/dist/cjs/elements/fields/PasswordField/tests/test-utils.d.ts.map +1 -1
- package/dist/cjs/elements/fields/PhoneField/tests/test-utils.d.ts +0 -1
- package/dist/cjs/elements/fields/PhoneField/tests/test-utils.d.ts.map +1 -1
- package/dist/cjs/elements/fields/PinInputField/tests/test-utils.d.ts +0 -1
- package/dist/cjs/elements/fields/PinInputField/tests/test-utils.d.ts.map +1 -1
- package/dist/cjs/elements/fields/RadioButtonGroupField/tests/test-utils.d.ts +0 -1
- package/dist/cjs/elements/fields/RadioButtonGroupField/tests/test-utils.d.ts.map +1 -1
- package/dist/cjs/elements/fields/RatingField/tests/test-utils.d.ts +0 -1
- package/dist/cjs/elements/fields/RatingField/tests/test-utils.d.ts.map +1 -1
- package/dist/cjs/elements/fields/SliderField/tests/test-utils.d.ts +0 -1
- package/dist/cjs/elements/fields/SliderField/tests/test-utils.d.ts.map +1 -1
- package/dist/cjs/elements/fields/shared/tests/field-test-utils.d.ts +0 -1
- package/dist/cjs/elements/fields/shared/tests/field-test-utils.d.ts.map +1 -1
- package/dist/cjs/{fthry_FormControl.D9BJvVaJ.js → fthry_FormControl.C6Rjgaho.js} +1 -1
- package/dist/cjs/{fthry_InlineTooltip.DR7bLXGa.js → fthry_InlineTooltip.7d1XAj6X.js} +2 -2
- package/dist/cjs/{fthry_Overlay.CrZjxgT8.js → fthry_Overlay.Bw-JWkvN.js} +1 -1
- package/dist/cjs/{fthry_PaymentMethodField.CJzF4Zxb.js → fthry_PaymentMethodField.DFPieFTd.js} +4 -4
- package/dist/cjs/{fthry_Placeholder.B8GeFQZR.js → fthry_Placeholder.DExePn4A.js} +1 -1
- package/dist/cjs/{fthry_ShowEyeIcon.CCfWazbl.js → fthry_ShowEyeIcon.UMZgA8E5.js} +1 -1
- package/dist/cjs/fthry_floating-ui.utils.D2KLOgYj.js +155 -0
- package/dist/cjs/{fthry_index.BD4_rswQ.js → fthry_index.B6Z5Lnk8.js} +1 -1
- package/dist/cjs/{fthry_index.DhdLVJxC.js → fthry_index.BnwtRb9Y.js} +63 -90
- package/dist/cjs/{fthry_index.Clp_KtlX.js → fthry_index.BsqXL16P.js} +5 -5
- package/dist/cjs/{fthry_index.BTNifGA9.js → fthry_index.Bz0SR10h.js} +2 -2
- package/dist/cjs/{fthry_index.Di6Ez6Jq.js → fthry_index.C1oeAVTE.js} +5 -5
- package/dist/cjs/{fthry_index.D672ZqZK.js → fthry_index.CJZrrJii.js} +1 -1
- package/dist/cjs/{fthry_index.Da4jVIuq.js → fthry_index.C_3RykNd.js} +1 -1
- package/dist/cjs/{fthry_index.BJNpqcLP.js → fthry_index.Cd5vLcwa.js} +1 -1
- package/dist/cjs/{fthry_index.D9L4f3Pj.js → fthry_index.CioaVxCu.js} +1 -1
- package/dist/cjs/{fthry_index.CyEVBDDl.js → fthry_index.D1qaLv6Z.js} +8 -8
- package/dist/cjs/{fthry_index.CgHQcgU1.js → fthry_index.DE7MeZLB.js} +5 -5
- package/dist/cjs/{fthry_index.DIcOH_1A.js → fthry_index.DMvOdp_W.js} +4 -4
- package/dist/cjs/{fthry_index.DIDhcvDu.js → fthry_index.DX-1RJ2S.js} +6 -6
- package/dist/cjs/{fthry_index.BuLFQ_7f.js → fthry_index.DZF8XXGF.js} +4 -4
- package/dist/cjs/{fthry_index.BnZd5CLv.js → fthry_index.Di_2sd1H.js} +487 -611
- package/dist/cjs/{fthry_index.gV8gGARz.js → fthry_index.KdnS_mBc.js} +2 -2
- package/dist/cjs/{fthry_index.dDIBqxIW.js → fthry_index.NNL4lQSw.js} +1 -1
- package/dist/cjs/{fthry_index.DUPLrjMh.js → fthry_index.RgU7Oxrf.js} +266 -953
- package/dist/cjs/{fthry_index.B9nSbifR.js → fthry_index.S5WoB9-i.js} +4 -4
- package/dist/cjs/{fthry_index.xPqRnN8F.js → fthry_index.YNi32Ez7.js} +6 -6
- package/dist/cjs/{fthry_index.ErCS5xBc.js → fthry_index.vmA_xfxy.js} +71 -205
- package/dist/cjs/{fthry_index.MtnDTtkS.js → fthry_index.wQoLwNSA.js} +3 -3
- package/dist/cjs/{fthry_index.BIdvmzZQ.js → fthry_index.xtJFp2c_.js} +3 -3
- package/dist/cjs/{fthry_input.B183IqBD.js → fthry_input.DWFkBuAl.js} +1 -1
- package/dist/cjs/fthry_objectWithoutPropertiesLoose.BeCY0BVl.js +32 -0
- package/dist/cjs/{fthry_script.DIjMUL2c.js → fthry_script.BVLKs7Gs.js} +1 -1
- package/dist/cjs/{fthry_styles.BYfcWStv.js → fthry_styles.B-tC_Abq.js} +1 -1
- package/dist/cjs/{fthry_useElementSize.C3ihe8zZ.js → fthry_useElementSize.BepGSP1Z.js} +1 -1
- package/dist/cjs/{fthry_useSalesforceSync.CQ0w7bSH.js → fthry_useSalesforceSync.DuaHbK7s.js} +1 -1
- package/dist/cjs/{fthry_webfontloader.B6879vMH.js → fthry_webfontloader.D1tv1rM2.js} +1 -1
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/utils/error.d.ts +5 -0
- package/dist/cjs/utils/error.d.ts.map +1 -1
- package/dist/cjs/utils/featheryClient/index.d.ts +20 -12
- package/dist/cjs/utils/featheryClient/index.d.ts.map +1 -1
- package/dist/cjs/utils/featheryClient/integrationClient.d.ts +8 -2
- package/dist/cjs/utils/featheryClient/integrationClient.d.ts.map +1 -1
- package/dist/cjs/utils/featheryClient/utils.d.ts.map +1 -1
- package/dist/cjs/utils/formContext.d.ts +1 -2
- package/dist/cjs/utils/formContext.d.ts.map +1 -1
- package/dist/cjs/utils/formHelperFunctions.d.ts.map +1 -1
- package/dist/cjs/utils/internalState.d.ts +12 -1
- package/dist/cjs/utils/internalState.d.ts.map +1 -1
- package/dist/esm/elements/fields/AddressLine1Field/tests/test-utils.d.ts +0 -1
- package/dist/esm/elements/fields/AddressLine1Field/tests/test-utils.d.ts.map +1 -1
- package/dist/esm/elements/fields/ButtonGroupField/tests/test-utils.d.ts +0 -1
- package/dist/esm/elements/fields/ButtonGroupField/tests/test-utils.d.ts.map +1 -1
- package/dist/esm/elements/fields/CheckboxField/tests/test-utils.d.ts +0 -1
- package/dist/esm/elements/fields/CheckboxField/tests/test-utils.d.ts.map +1 -1
- package/dist/esm/elements/fields/CheckboxGroupField/tests/test-utils.d.ts +0 -1
- package/dist/esm/elements/fields/CheckboxGroupField/tests/test-utils.d.ts.map +1 -1
- package/dist/esm/elements/fields/ColorPickerField/tests/test-utils.d.ts +0 -1
- package/dist/esm/elements/fields/ColorPickerField/tests/test-utils.d.ts.map +1 -1
- package/dist/esm/elements/fields/DateSelectorField/tests/test-utils.d.ts +0 -1
- package/dist/esm/elements/fields/DateSelectorField/tests/test-utils.d.ts.map +1 -1
- package/dist/esm/elements/fields/DropdownField/tests/test-utils.d.ts +0 -2
- package/dist/esm/elements/fields/DropdownField/tests/test-utils.d.ts.map +1 -1
- package/dist/esm/elements/fields/DropdownMultiField/tests/test-utils.d.ts +0 -1
- package/dist/esm/elements/fields/DropdownMultiField/tests/test-utils.d.ts.map +1 -1
- package/dist/esm/elements/fields/MatrixField/tests/test-utils.d.ts +0 -1
- package/dist/esm/elements/fields/MatrixField/tests/test-utils.d.ts.map +1 -1
- package/dist/esm/elements/fields/PasswordField/tests/test-utils.d.ts +0 -1
- package/dist/esm/elements/fields/PasswordField/tests/test-utils.d.ts.map +1 -1
- package/dist/esm/elements/fields/PhoneField/tests/test-utils.d.ts +0 -1
- package/dist/esm/elements/fields/PhoneField/tests/test-utils.d.ts.map +1 -1
- package/dist/esm/elements/fields/PinInputField/tests/test-utils.d.ts +0 -1
- package/dist/esm/elements/fields/PinInputField/tests/test-utils.d.ts.map +1 -1
- package/dist/esm/elements/fields/RadioButtonGroupField/tests/test-utils.d.ts +0 -1
- package/dist/esm/elements/fields/RadioButtonGroupField/tests/test-utils.d.ts.map +1 -1
- package/dist/esm/elements/fields/RatingField/tests/test-utils.d.ts +0 -1
- package/dist/esm/elements/fields/RatingField/tests/test-utils.d.ts.map +1 -1
- package/dist/esm/elements/fields/SliderField/tests/test-utils.d.ts +0 -1
- package/dist/esm/elements/fields/SliderField/tests/test-utils.d.ts.map +1 -1
- package/dist/esm/elements/fields/shared/tests/field-test-utils.d.ts +0 -1
- package/dist/esm/elements/fields/shared/tests/field-test-utils.d.ts.map +1 -1
- package/dist/esm/{fthry_FormControl.l56aLUEi.js → fthry_FormControl.D8Kuyg4Y.js} +1 -1
- package/dist/esm/{fthry_InlineTooltip.DmQYRgve.js → fthry_InlineTooltip.DLMOu2tO.js} +2 -2
- package/dist/esm/{fthry_Overlay.DM59j4f0.js → fthry_Overlay.BaulbPVG.js} +1 -1
- package/dist/esm/{fthry_PaymentMethodField.fCt76s5z.js → fthry_PaymentMethodField.E2VJPyju.js} +4 -4
- package/dist/esm/{fthry_Placeholder.Dc-T2oBR.js → fthry_Placeholder.CY1XAzRf.js} +1 -1
- package/dist/esm/{fthry_ShowEyeIcon.DkApAiKk.js → fthry_ShowEyeIcon.CCRFpPxr.js} +1 -1
- package/dist/esm/fthry_floating-ui.utils.tNaL8PGX.js +136 -0
- package/dist/esm/{fthry_index.Cfm44aIA.js → fthry_index.2Gc_lB8n.js} +486 -611
- package/dist/esm/{fthry_index.BnHL_KxW.js → fthry_index.6qFATni4.js} +214 -901
- package/dist/esm/{fthry_index.CMK9yPNK.js → fthry_index.7vZjIPEz.js} +4 -4
- package/dist/esm/{fthry_index.DVtBoC8j.js → fthry_index.B5ePXkSN.js} +6 -6
- package/dist/esm/{fthry_index.CMqIVjXZ.js → fthry_index.BBB2dAwJ.js} +3 -3
- package/dist/esm/{fthry_index.DVILnI90.js → fthry_index.BU4BxoWO.js} +2 -2
- package/dist/esm/{fthry_index.Da98jfKm.js → fthry_index.BeT6gsM_.js} +6 -6
- package/dist/esm/{fthry_index.CVgDbjY1.js → fthry_index.BgIsKSTD.js} +3 -3
- package/dist/esm/{fthry_index.PtKWUi2v.js → fthry_index.C90mmtNU.js} +4 -4
- package/dist/esm/{fthry_index.D9Qfe2pB.js → fthry_index.Ca-06RMU.js} +1 -1
- package/dist/esm/{fthry_index.CtKbIaOM.js → fthry_index.Citw-wko.js} +1 -1
- package/dist/esm/{fthry_index.Vhl0bnkZ.js → fthry_index.CugnxSkX.js} +2 -29
- package/dist/esm/{fthry_index.oDok6-x4.js → fthry_index.DIZWok9O.js} +5 -5
- package/dist/esm/{fthry_index.DXrdFckU.js → fthry_index.DbMs4N3L.js} +2 -2
- package/dist/esm/{fthry_index.D_yHzSrJ.js → fthry_index.DeT3UyJj.js} +1 -1
- package/dist/esm/{fthry_index.BJyM786w.js → fthry_index.DjW847uR.js} +1 -1
- package/dist/esm/{fthry_index.BiqwOrNO.js → fthry_index.Ds7JOYLz.js} +4 -4
- package/dist/esm/{fthry_index.DR6-xbaq.js → fthry_index.DsroTnQH.js} +5 -5
- package/dist/esm/{fthry_index.BI7Nq-2R.js → fthry_index.Dy33g5mc.js} +8 -8
- package/dist/esm/{fthry_index.BmrMDwxa.js → fthry_index.T_eziOjU.js} +1 -1
- package/dist/esm/{fthry_index.DjSo-4yX.js → fthry_index.nmBpjSD2.js} +1 -1
- package/dist/esm/{fthry_index.CHNf-Nku.js → fthry_index.wAyXRBo5.js} +27 -161
- package/dist/esm/{fthry_index.CXD18e8a.js → fthry_index.xfj1t0cY.js} +5 -5
- package/dist/esm/{fthry_input.CXHgLIf8.js → fthry_input.Csm0akqb.js} +1 -1
- package/dist/esm/fthry_objectWithoutPropertiesLoose.BBpbdDOs.js +29 -0
- package/dist/esm/{fthry_script.DwMte9St.js → fthry_script.CTK4wksM.js} +1 -1
- package/dist/esm/{fthry_styles.C0QSjZiE.js → fthry_styles.BsiM2KXa.js} +1 -1
- package/dist/esm/{fthry_useElementSize.D4IcFu8F.js → fthry_useElementSize.BVooPdxW.js} +1 -1
- package/dist/esm/{fthry_useSalesforceSync.B85ooTBi.js → fthry_useSalesforceSync.DwvbAGUy.js} +1 -1
- package/dist/esm/{fthry_webfontloader.CYx_LPgy.js → fthry_webfontloader.oZvuZxan.js} +1 -1
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/utils/error.d.ts +5 -0
- package/dist/esm/utils/error.d.ts.map +1 -1
- package/dist/esm/utils/featheryClient/index.d.ts +20 -12
- package/dist/esm/utils/featheryClient/index.d.ts.map +1 -1
- package/dist/esm/utils/featheryClient/integrationClient.d.ts +8 -2
- package/dist/esm/utils/featheryClient/integrationClient.d.ts.map +1 -1
- package/dist/esm/utils/featheryClient/utils.d.ts.map +1 -1
- package/dist/esm/utils/formContext.d.ts +1 -2
- package/dist/esm/utils/formContext.d.ts.map +1 -1
- package/dist/esm/utils/formHelperFunctions.d.ts.map +1 -1
- package/dist/esm/utils/internalState.d.ts +12 -1
- package/dist/esm/utils/internalState.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/utils/error.d.ts +5 -0
- package/dist/utils/error.d.ts.map +1 -1
- package/dist/utils/featheryClient/index.d.ts +20 -12
- package/dist/utils/featheryClient/index.d.ts.map +1 -1
- package/dist/utils/featheryClient/integrationClient.d.ts +8 -2
- package/dist/utils/featheryClient/integrationClient.d.ts.map +1 -1
- package/dist/utils/featheryClient/utils.d.ts.map +1 -1
- package/dist/utils/formContext.d.ts +1 -2
- package/dist/utils/formContext.d.ts.map +1 -1
- package/dist/utils/formHelperFunctions.d.ts.map +1 -1
- package/dist/utils/internalState.d.ts +12 -1
- package/dist/utils/internalState.d.ts.map +1 -1
- package/package.json +1 -2
- package/umd/{277.94ae8bf6190836d1dceb.js → 277.eceeb3ccb6328228b829.js} +1 -1
- package/umd/{466.e3456c8b3407ad04ba56.js → 466.2b6f52440bf8a6ee4f4d.js} +1 -1
- package/umd/509.f3c5235d7877c09fa946.js +2 -0
- package/umd/{509.f9d0245d6c94d15722a0.js.LICENSE.txt → 509.f3c5235d7877c09fa946.js.LICENSE.txt} +0 -5
- package/umd/529.be48502b696e9179c151.js +1 -0
- package/umd/{598.ca92da6595afad37b511.js → 598.5c0785560cad57f12159.js} +2 -2
- package/umd/{664.42541009d1fcb121cc49.js → 664.cce2aa2291d3323521b2.js} +1 -1
- package/umd/{94.825cd88111c75098af1f.js → 94.3c0a220601820412e21e.js} +1 -1
- package/umd/{AddressField.3523efd23175117d47a5.js → AddressField.a7ec587f13a326e233de.js} +1 -1
- package/umd/{ButtonGroupField.33cf9c939c8e82cc6c83.js → ButtonGroupField.8a9cf493f8fb36ce3e85.js} +1 -1
- package/umd/{CheckboxField.76c36941e86a62ec518d.js → CheckboxField.c4971d72024558868b02.js} +1 -1
- package/umd/{CheckboxGroupField.b15705b46268e1142782.js → CheckboxGroupField.e5319cd7f814f9b626d7.js} +1 -1
- package/umd/ColorPickerField.38edc699a89e4266e489.js +1 -0
- package/umd/{CustomField.a5b2965922f2d170b9b5.js → CustomField.bf00bb9bdcd732c13171.js} +1 -1
- package/umd/{DateSelectorField.00f321e0b1972feb9d69.js → DateSelectorField.c193445e11fe4694b07a.js} +1 -1
- package/umd/{DropdownField.856b041871278f98e687.js → DropdownField.7081f67b0a39c49f1f3f.js} +1 -1
- package/umd/{DropdownMultiField.898572b300ad673a38c9.js → DropdownMultiField.d2dc345e7bd0e32e76a7.js} +1 -1
- package/umd/{FileUploadField.ea0067dd62b0454b7c2e.js → FileUploadField.f51a675776b2947e79fa.js} +1 -1
- package/umd/{MatrixField.f8624f3e59b21e04f368.js → MatrixField.007d30b45d438c773db7.js} +1 -1
- package/umd/{PasswordField.1358356d6fbc6880f12a.js → PasswordField.2147c784135a9369040c.js} +1 -1
- package/umd/{PaymentMethodField.9a8e934f7450eb141217.js → PaymentMethodField.a84c467c428712681821.js} +1 -1
- package/umd/{PhoneField.f52b5de44614b445feeb.js → PhoneField.d43a22b1a4d92c618614.js} +1 -1
- package/umd/{PinInputField.b1aee0ef9d3c9f9a1933.js → PinInputField.0f9ca456b79a9cdf2506.js} +1 -1
- package/umd/{QRScanner.3c22391de30dba001f13.js → QRScanner.5865f88b4a09f5e78c5b.js} +1 -1
- package/umd/{RadioButtonGroupField.38d62523106149c48f2e.js → RadioButtonGroupField.7d81efb2ddc169916443.js} +1 -1
- package/umd/{RatingField.eeeb0ac499c308c120ba.js → RatingField.104fa779291cd91ca8bc.js} +1 -1
- package/umd/{SignatureField.1b502b1edb19e4af3b64.js → SignatureField.2cd57db4b52690a9650b.js} +1 -1
- package/umd/{SliderField.a5ab58e4b89fa67d6ac6.js → SliderField.b99f5928f7c1eaa08c3d.js} +1 -1
- package/umd/{TextArea.f566845d458d4c00e0e7.js → TextArea.0b440106b5f5a341ed74.js} +1 -1
- package/umd/{TextField.5a5296fe3ea60c4459f2.js → TextField.9238b4371b974d4defd4.js} +1 -1
- package/umd/index.js +1 -1
- package/umd/509.f9d0245d6c94d15722a0.js +0 -2
- package/umd/529.2bfdaee9e2bdc6d6c340.js +0 -1
- package/umd/ColorPickerField.f6740bb7c4c20a520db5.js +0 -1
- /package/umd/{598.ca92da6595afad37b511.js.LICENSE.txt → 598.5c0785560cad57f12159.js.LICENSE.txt} +0 -0
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { y as
|
|
1
|
+
import { y as middleware, z as stringify, A as rulesheet, B as weakMemoize, S as StyleSheet, R as RULESET, C as combine, H as match, I as serialize, J as copy, K as replace, W as WEBKIT, M as MOZ, L as MS, N as KEYFRAMES, O as DECLARATION, P as dealloc, Q as alloc, T as hash, U as charat, V as strlen, X as indexof, Y as next, Z as token, $ as from, a0 as peek, a1 as delimit, a2 as slice, a3 as position, a4 as compile, b as jsx$1, a as __assign, j as jsxs, m as Fragment$1, t as __rest, _ as __read, k as FORM_Z_INDEX, l as featheryWindow, s as featheryDoc, a5 as __spreadArray, u as useBorder, D as DROPDOWN_Z_INDEX } from './fthry_index.2Gc_lB8n.js';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { useState, useCallback, forwardRef, useContext, useLayoutEffect, useEffect, createContext, useRef, useMemo, Component, Fragment } from 'react';
|
|
4
|
-
import { I as InlineTooltip } from './fthry_InlineTooltip.
|
|
5
|
-
import { P as Placeholder$2 } from './fthry_Placeholder.
|
|
6
|
-
import { u as useSalesforceSync } from './fthry_useSalesforceSync.
|
|
7
|
-
import { T as Tooltip, O as Overlay } from './fthry_Overlay.
|
|
4
|
+
import { I as InlineTooltip } from './fthry_InlineTooltip.DLMOu2tO.js';
|
|
5
|
+
import { P as Placeholder$2 } from './fthry_Placeholder.CY1XAzRf.js';
|
|
6
|
+
import { u as useSalesforceSync } from './fthry_useSalesforceSync.DwvbAGUy.js';
|
|
7
|
+
import { T as Tooltip, O as Overlay } from './fthry_Overlay.BaulbPVG.js';
|
|
8
|
+
import { a as _objectWithoutPropertiesLoose, _ as _extends } from './fthry_objectWithoutPropertiesLoose.BBpbdDOs.js';
|
|
8
9
|
import { createPortal } from 'react-dom';
|
|
10
|
+
import { r as rectToClientRect } from './fthry_floating-ui.utils.tNaL8PGX.js';
|
|
9
11
|
import 'react/jsx-runtime';
|
|
10
12
|
import 'react-dom/client';
|
|
11
13
|
import 'jszip';
|
|
@@ -91,7 +93,9 @@ function _iterableToArrayLimit(arr, i) {
|
|
|
91
93
|
if (_x = (_i = _i.call(arr)).next, 0 === i) {
|
|
92
94
|
if (Object(_i) !== _i) return;
|
|
93
95
|
_n = !1;
|
|
94
|
-
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0)
|
|
96
|
+
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) {
|
|
97
|
+
;
|
|
98
|
+
}
|
|
95
99
|
} catch (err) {
|
|
96
100
|
_d = true, _e = err;
|
|
97
101
|
} finally {
|
|
@@ -107,7 +111,9 @@ function _iterableToArrayLimit(arr, i) {
|
|
|
107
111
|
|
|
108
112
|
function _arrayLikeToArray(arr, len) {
|
|
109
113
|
if (len == null || len > arr.length) len = arr.length;
|
|
110
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
114
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
115
|
+
arr2[i] = arr[i];
|
|
116
|
+
}
|
|
111
117
|
return arr2;
|
|
112
118
|
}
|
|
113
119
|
|
|
@@ -128,19 +134,6 @@ function _slicedToArray(arr, i) {
|
|
|
128
134
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
129
135
|
}
|
|
130
136
|
|
|
131
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
132
|
-
if (source == null) return {};
|
|
133
|
-
var target = {};
|
|
134
|
-
var sourceKeys = Object.keys(source);
|
|
135
|
-
var key, i;
|
|
136
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
137
|
-
key = sourceKeys[i];
|
|
138
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
139
|
-
target[key] = source[key];
|
|
140
|
-
}
|
|
141
|
-
return target;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
137
|
function _objectWithoutProperties(source, excluded) {
|
|
145
138
|
if (source == null) return {};
|
|
146
139
|
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
@@ -224,21 +217,6 @@ function useStateManager(_ref) {
|
|
|
224
217
|
});
|
|
225
218
|
}
|
|
226
219
|
|
|
227
|
-
function _extends() {
|
|
228
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
229
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
230
|
-
var source = arguments[i];
|
|
231
|
-
for (var key in source) {
|
|
232
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
233
|
-
target[key] = source[key];
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
return target;
|
|
238
|
-
};
|
|
239
|
-
return _extends.apply(this, arguments);
|
|
240
|
-
}
|
|
241
|
-
|
|
242
220
|
function _classCallCheck(instance, Constructor) {
|
|
243
221
|
if (!(instance instanceof Constructor)) {
|
|
244
222
|
throw new TypeError("Cannot call a class as a function");
|
|
@@ -354,175 +332,7 @@ function _toConsumableArray(arr) {
|
|
|
354
332
|
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
355
333
|
}
|
|
356
334
|
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
Based off glamor's StyleSheet, thanks Sunil ❤️
|
|
360
|
-
|
|
361
|
-
high performance StyleSheet for css-in-js systems
|
|
362
|
-
|
|
363
|
-
- uses multiple style tags behind the scenes for millions of rules
|
|
364
|
-
- uses `insertRule` for appending in production for *much* faster performance
|
|
365
|
-
|
|
366
|
-
// usage
|
|
367
|
-
|
|
368
|
-
import { StyleSheet } from '@emotion/sheet'
|
|
369
|
-
|
|
370
|
-
let styleSheet = new StyleSheet({ key: '', container: document.head })
|
|
371
|
-
|
|
372
|
-
styleSheet.insert('#box { border: 1px solid red; }')
|
|
373
|
-
- appends a css rule into the stylesheet
|
|
374
|
-
|
|
375
|
-
styleSheet.flush()
|
|
376
|
-
- empties the stylesheet of all its contents
|
|
377
|
-
|
|
378
|
-
*/
|
|
379
|
-
// $FlowFixMe
|
|
380
|
-
function sheetForTag(tag) {
|
|
381
|
-
if (tag.sheet) {
|
|
382
|
-
// $FlowFixMe
|
|
383
|
-
return tag.sheet;
|
|
384
|
-
} // this weirdness brought to you by firefox
|
|
385
|
-
|
|
386
|
-
/* istanbul ignore next */
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
for (var i = 0; i < document.styleSheets.length; i++) {
|
|
390
|
-
if (document.styleSheets[i].ownerNode === tag) {
|
|
391
|
-
// $FlowFixMe
|
|
392
|
-
return document.styleSheets[i];
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
function createStyleElement(options) {
|
|
398
|
-
var tag = document.createElement('style');
|
|
399
|
-
tag.setAttribute('data-emotion', options.key);
|
|
400
|
-
|
|
401
|
-
if (options.nonce !== undefined) {
|
|
402
|
-
tag.setAttribute('nonce', options.nonce);
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
tag.appendChild(document.createTextNode(''));
|
|
406
|
-
tag.setAttribute('data-s', '');
|
|
407
|
-
return tag;
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
var StyleSheet = /*#__PURE__*/function () {
|
|
411
|
-
// Using Node instead of HTMLElement since container may be a ShadowRoot
|
|
412
|
-
function StyleSheet(options) {
|
|
413
|
-
var _this = this;
|
|
414
|
-
|
|
415
|
-
this._insertTag = function (tag) {
|
|
416
|
-
var before;
|
|
417
|
-
|
|
418
|
-
if (_this.tags.length === 0) {
|
|
419
|
-
if (_this.insertionPoint) {
|
|
420
|
-
before = _this.insertionPoint.nextSibling;
|
|
421
|
-
} else if (_this.prepend) {
|
|
422
|
-
before = _this.container.firstChild;
|
|
423
|
-
} else {
|
|
424
|
-
before = _this.before;
|
|
425
|
-
}
|
|
426
|
-
} else {
|
|
427
|
-
before = _this.tags[_this.tags.length - 1].nextSibling;
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
_this.container.insertBefore(tag, before);
|
|
431
|
-
|
|
432
|
-
_this.tags.push(tag);
|
|
433
|
-
};
|
|
434
|
-
|
|
435
|
-
this.isSpeedy = options.speedy === undefined ? process.env.NODE_ENV === 'production' : options.speedy;
|
|
436
|
-
this.tags = [];
|
|
437
|
-
this.ctr = 0;
|
|
438
|
-
this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets
|
|
439
|
-
|
|
440
|
-
this.key = options.key;
|
|
441
|
-
this.container = options.container;
|
|
442
|
-
this.prepend = options.prepend;
|
|
443
|
-
this.insertionPoint = options.insertionPoint;
|
|
444
|
-
this.before = null;
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
var _proto = StyleSheet.prototype;
|
|
448
|
-
|
|
449
|
-
_proto.hydrate = function hydrate(nodes) {
|
|
450
|
-
nodes.forEach(this._insertTag);
|
|
451
|
-
};
|
|
452
|
-
|
|
453
|
-
_proto.insert = function insert(rule) {
|
|
454
|
-
// the max length is how many rules we have per style tag, it's 65000 in speedy mode
|
|
455
|
-
// it's 1 in dev because we insert source maps that map a single rule to a location
|
|
456
|
-
// and you can only have one source map per style tag
|
|
457
|
-
if (this.ctr % (this.isSpeedy ? 65000 : 1) === 0) {
|
|
458
|
-
this._insertTag(createStyleElement(this));
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
var tag = this.tags[this.tags.length - 1];
|
|
462
|
-
|
|
463
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
464
|
-
var isImportRule = rule.charCodeAt(0) === 64 && rule.charCodeAt(1) === 105;
|
|
465
|
-
|
|
466
|
-
if (isImportRule && this._alreadyInsertedOrderInsensitiveRule) {
|
|
467
|
-
// this would only cause problem in speedy mode
|
|
468
|
-
// but we don't want enabling speedy to affect the observable behavior
|
|
469
|
-
// so we report this error at all times
|
|
470
|
-
console.error("You're attempting to insert the following rule:\n" + rule + '\n\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules.');
|
|
471
|
-
}
|
|
472
|
-
this._alreadyInsertedOrderInsensitiveRule = this._alreadyInsertedOrderInsensitiveRule || !isImportRule;
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
if (this.isSpeedy) {
|
|
476
|
-
var sheet = sheetForTag(tag);
|
|
477
|
-
|
|
478
|
-
try {
|
|
479
|
-
// this is the ultrafast version, works across browsers
|
|
480
|
-
// the big drawback is that the css won't be editable in devtools
|
|
481
|
-
sheet.insertRule(rule, sheet.cssRules.length);
|
|
482
|
-
} catch (e) {
|
|
483
|
-
if (process.env.NODE_ENV !== 'production' && !/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal){/.test(rule)) {
|
|
484
|
-
console.error("There was a problem inserting the following rule: \"" + rule + "\"", e);
|
|
485
|
-
}
|
|
486
|
-
}
|
|
487
|
-
} else {
|
|
488
|
-
tag.appendChild(document.createTextNode(rule));
|
|
489
|
-
}
|
|
490
|
-
|
|
491
|
-
this.ctr++;
|
|
492
|
-
};
|
|
493
|
-
|
|
494
|
-
_proto.flush = function flush() {
|
|
495
|
-
// $FlowFixMe
|
|
496
|
-
this.tags.forEach(function (tag) {
|
|
497
|
-
return tag.parentNode && tag.parentNode.removeChild(tag);
|
|
498
|
-
});
|
|
499
|
-
this.tags = [];
|
|
500
|
-
this.ctr = 0;
|
|
501
|
-
|
|
502
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
503
|
-
this._alreadyInsertedOrderInsensitiveRule = false;
|
|
504
|
-
}
|
|
505
|
-
};
|
|
506
|
-
|
|
507
|
-
return StyleSheet;
|
|
508
|
-
}();
|
|
509
|
-
|
|
510
|
-
var weakMemoize = function weakMemoize(func) {
|
|
511
|
-
// $FlowFixMe flow doesn't include all non-primitive types as allowed for weakmaps
|
|
512
|
-
var cache = new WeakMap();
|
|
513
|
-
return function (arg) {
|
|
514
|
-
if (cache.has(arg)) {
|
|
515
|
-
// $FlowFixMe
|
|
516
|
-
return cache.get(arg);
|
|
517
|
-
}
|
|
518
|
-
|
|
519
|
-
var ret = func(arg);
|
|
520
|
-
cache.set(arg, ret);
|
|
521
|
-
return ret;
|
|
522
|
-
};
|
|
523
|
-
};
|
|
524
|
-
|
|
525
|
-
function memoize$1(fn) {
|
|
335
|
+
function memoize(fn) {
|
|
526
336
|
var cache = Object.create(null);
|
|
527
337
|
return function (arg) {
|
|
528
338
|
if (cache[arg] === undefined) cache[arg] = fn(arg);
|
|
@@ -530,6 +340,8 @@ function memoize$1(fn) {
|
|
|
530
340
|
};
|
|
531
341
|
}
|
|
532
342
|
|
|
343
|
+
var isBrowser$3 = typeof document !== 'undefined';
|
|
344
|
+
|
|
533
345
|
var identifierWithPointTracking = function identifierWithPointTracking(begin, points, index) {
|
|
534
346
|
var previous = 0;
|
|
535
347
|
var character = 0;
|
|
@@ -654,114 +466,6 @@ var removeLabel = function removeLabel(element) {
|
|
|
654
466
|
}
|
|
655
467
|
}
|
|
656
468
|
};
|
|
657
|
-
var ignoreFlag = 'emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason';
|
|
658
|
-
|
|
659
|
-
var isIgnoringComment = function isIgnoringComment(element) {
|
|
660
|
-
return element.type === 'comm' && element.children.indexOf(ignoreFlag) > -1;
|
|
661
|
-
};
|
|
662
|
-
|
|
663
|
-
var createUnsafeSelectorsAlarm = function createUnsafeSelectorsAlarm(cache) {
|
|
664
|
-
return function (element, index, children) {
|
|
665
|
-
if (element.type !== 'rule' || cache.compat) return;
|
|
666
|
-
var unsafePseudoClasses = element.value.match(/(:first|:nth|:nth-last)-child/g);
|
|
667
|
-
|
|
668
|
-
if (unsafePseudoClasses) {
|
|
669
|
-
var isNested = !!element.parent; // in nested rules comments become children of the "auto-inserted" rule and that's always the `element.parent`
|
|
670
|
-
//
|
|
671
|
-
// considering this input:
|
|
672
|
-
// .a {
|
|
673
|
-
// .b /* comm */ {}
|
|
674
|
-
// color: hotpink;
|
|
675
|
-
// }
|
|
676
|
-
// we get output corresponding to this:
|
|
677
|
-
// .a {
|
|
678
|
-
// & {
|
|
679
|
-
// /* comm */
|
|
680
|
-
// color: hotpink;
|
|
681
|
-
// }
|
|
682
|
-
// .b {}
|
|
683
|
-
// }
|
|
684
|
-
|
|
685
|
-
var commentContainer = isNested ? element.parent.children : // global rule at the root level
|
|
686
|
-
children;
|
|
687
|
-
|
|
688
|
-
for (var i = commentContainer.length - 1; i >= 0; i--) {
|
|
689
|
-
var node = commentContainer[i];
|
|
690
|
-
|
|
691
|
-
if (node.line < element.line) {
|
|
692
|
-
break;
|
|
693
|
-
} // it is quite weird but comments are *usually* put at `column: element.column - 1`
|
|
694
|
-
// so we seek *from the end* for the node that is earlier than the rule's `element` and check that
|
|
695
|
-
// this will also match inputs like this:
|
|
696
|
-
// .a {
|
|
697
|
-
// /* comm */
|
|
698
|
-
// .b {}
|
|
699
|
-
// }
|
|
700
|
-
//
|
|
701
|
-
// but that is fine
|
|
702
|
-
//
|
|
703
|
-
// it would be the easiest to change the placement of the comment to be the first child of the rule:
|
|
704
|
-
// .a {
|
|
705
|
-
// .b { /* comm */ }
|
|
706
|
-
// }
|
|
707
|
-
// with such inputs we wouldn't have to search for the comment at all
|
|
708
|
-
// TODO: consider changing this comment placement in the next major version
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
if (node.column < element.column) {
|
|
712
|
-
if (isIgnoringComment(node)) {
|
|
713
|
-
return;
|
|
714
|
-
}
|
|
715
|
-
|
|
716
|
-
break;
|
|
717
|
-
}
|
|
718
|
-
}
|
|
719
|
-
|
|
720
|
-
unsafePseudoClasses.forEach(function (unsafePseudoClass) {
|
|
721
|
-
console.error("The pseudo class \"" + unsafePseudoClass + "\" is potentially unsafe when doing server-side rendering. Try changing it to \"" + unsafePseudoClass.split('-child')[0] + "-of-type\".");
|
|
722
|
-
});
|
|
723
|
-
}
|
|
724
|
-
};
|
|
725
|
-
};
|
|
726
|
-
|
|
727
|
-
var isImportRule = function isImportRule(element) {
|
|
728
|
-
return element.type.charCodeAt(1) === 105 && element.type.charCodeAt(0) === 64;
|
|
729
|
-
};
|
|
730
|
-
|
|
731
|
-
var isPrependedWithRegularRules = function isPrependedWithRegularRules(index, children) {
|
|
732
|
-
for (var i = index - 1; i >= 0; i--) {
|
|
733
|
-
if (!isImportRule(children[i])) {
|
|
734
|
-
return true;
|
|
735
|
-
}
|
|
736
|
-
}
|
|
737
|
-
|
|
738
|
-
return false;
|
|
739
|
-
}; // use this to remove incorrect elements from further processing
|
|
740
|
-
// so they don't get handed to the `sheet` (or anything else)
|
|
741
|
-
// as that could potentially lead to additional logs which in turn could be overhelming to the user
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
var nullifyElement = function nullifyElement(element) {
|
|
745
|
-
element.type = '';
|
|
746
|
-
element.value = '';
|
|
747
|
-
element["return"] = '';
|
|
748
|
-
element.children = '';
|
|
749
|
-
element.props = '';
|
|
750
|
-
};
|
|
751
|
-
|
|
752
|
-
var incorrectImportAlarm = function incorrectImportAlarm(element, index, children) {
|
|
753
|
-
if (!isImportRule(element)) {
|
|
754
|
-
return;
|
|
755
|
-
}
|
|
756
|
-
|
|
757
|
-
if (element.parent) {
|
|
758
|
-
console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles.");
|
|
759
|
-
nullifyElement(element);
|
|
760
|
-
} else if (isPrependedWithRegularRules(index, children)) {
|
|
761
|
-
console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules.");
|
|
762
|
-
nullifyElement(element);
|
|
763
|
-
}
|
|
764
|
-
};
|
|
765
469
|
|
|
766
470
|
/* eslint-disable no-fallthrough */
|
|
767
471
|
|
|
@@ -975,9 +679,22 @@ var prefixer = function prefixer(element, index, children, callback) {
|
|
|
975
679
|
}
|
|
976
680
|
};
|
|
977
681
|
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
682
|
+
/* import type { StylisPlugin } from './types' */
|
|
683
|
+
|
|
684
|
+
/*
|
|
685
|
+
export type Options = {
|
|
686
|
+
nonce?: string,
|
|
687
|
+
stylisPlugins?: StylisPlugin[],
|
|
688
|
+
key: string,
|
|
689
|
+
container?: HTMLElement,
|
|
690
|
+
speedy?: boolean,
|
|
691
|
+
prepend?: boolean,
|
|
692
|
+
insertionPoint?: HTMLElement
|
|
693
|
+
}
|
|
694
|
+
*/
|
|
695
|
+
|
|
696
|
+
var getServerStylisCache = isBrowser$3 ? undefined : weakMemoize(function () {
|
|
697
|
+
return memoize(function () {
|
|
981
698
|
var cache = {};
|
|
982
699
|
return function (name) {
|
|
983
700
|
return cache[name];
|
|
@@ -986,20 +703,22 @@ var getServerStylisCache = isBrowser$4 ? undefined : weakMemoize(function () {
|
|
|
986
703
|
});
|
|
987
704
|
var defaultStylisPlugins = [prefixer];
|
|
988
705
|
|
|
989
|
-
var createCache = function
|
|
706
|
+
var createCache = function
|
|
707
|
+
/*: EmotionCache */
|
|
708
|
+
createCache(options
|
|
709
|
+
/*: Options */
|
|
710
|
+
) {
|
|
990
711
|
var key = options.key;
|
|
991
712
|
|
|
992
|
-
if (
|
|
993
|
-
throw new Error("You have to configure `key` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.\n" + "If multiple caches share the same key they might \"fight\" for each other's style elements.");
|
|
994
|
-
}
|
|
995
|
-
|
|
996
|
-
if (isBrowser$4 && key === 'css') {
|
|
713
|
+
if (isBrowser$3 && key === 'css') {
|
|
997
714
|
var ssrStyles = document.querySelectorAll("style[data-emotion]:not([data-s])"); // get SSRed styles out of the way of React's hydration
|
|
998
715
|
// document.head is a safe place to move them to(though note document.head is not necessarily the last place they will be)
|
|
999
716
|
// note this very very intentionally targets all style elements regardless of the key to ensure
|
|
1000
717
|
// that creating a cache works inside of render of a React component
|
|
1001
718
|
|
|
1002
|
-
Array.prototype.forEach.call(ssrStyles, function (node
|
|
719
|
+
Array.prototype.forEach.call(ssrStyles, function (node
|
|
720
|
+
/*: HTMLStyleElement */
|
|
721
|
+
) {
|
|
1003
722
|
// we want to only move elements which have a space in the data-emotion attribute value
|
|
1004
723
|
// because that indicates that it is an Emotion 11 server-side rendered style elements
|
|
1005
724
|
// while we will already ignore Emotion 11 client-side inserted styles because of the :not([data-s]) part in the selector
|
|
@@ -1011,6 +730,7 @@ var createCache = function createCache(options) {
|
|
|
1011
730
|
if (dataEmotionAttribute.indexOf(' ') === -1) {
|
|
1012
731
|
return;
|
|
1013
732
|
}
|
|
733
|
+
|
|
1014
734
|
document.head.appendChild(node);
|
|
1015
735
|
node.setAttribute('data-s', '');
|
|
1016
736
|
});
|
|
@@ -1018,23 +738,20 @@ var createCache = function createCache(options) {
|
|
|
1018
738
|
|
|
1019
739
|
var stylisPlugins = options.stylisPlugins || defaultStylisPlugins;
|
|
1020
740
|
|
|
1021
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1022
|
-
// $FlowFixMe
|
|
1023
|
-
if (/[^a-z-]/.test(key)) {
|
|
1024
|
-
throw new Error("Emotion key must only contain lower case alphabetical characters and - but \"" + key + "\" was passed");
|
|
1025
|
-
}
|
|
1026
|
-
}
|
|
1027
|
-
|
|
1028
741
|
var inserted = {};
|
|
1029
742
|
var container;
|
|
743
|
+
/* : Node */
|
|
744
|
+
|
|
1030
745
|
var nodesToHydrate = [];
|
|
1031
746
|
|
|
1032
|
-
if (isBrowser$
|
|
747
|
+
if (isBrowser$3) {
|
|
1033
748
|
container = options.container || document.head;
|
|
1034
749
|
Array.prototype.forEach.call( // this means we will ignore elements which don't have a space in them which
|
|
1035
750
|
// means that the style elements we're looking at are only Emotion 11 server-rendered style elements
|
|
1036
|
-
document.querySelectorAll("style[data-emotion^=\"" + key + " \"]"), function (node
|
|
1037
|
-
|
|
751
|
+
document.querySelectorAll("style[data-emotion^=\"" + key + " \"]"), function (node
|
|
752
|
+
/*: HTMLStyleElement */
|
|
753
|
+
) {
|
|
754
|
+
var attrib = node.getAttribute("data-emotion").split(' ');
|
|
1038
755
|
|
|
1039
756
|
for (var i = 1; i < attrib.length; i++) {
|
|
1040
757
|
inserted[attrib[i]] = true;
|
|
@@ -1045,31 +762,19 @@ var createCache = function createCache(options) {
|
|
|
1045
762
|
}
|
|
1046
763
|
|
|
1047
764
|
var _insert;
|
|
765
|
+
/*: (
|
|
766
|
+
selector: string,
|
|
767
|
+
serialized: SerializedStyles,
|
|
768
|
+
sheet: StyleSheet,
|
|
769
|
+
shouldCache: boolean
|
|
770
|
+
) => string | void */
|
|
1048
771
|
|
|
1049
|
-
var omnipresentPlugins = [compat, removeLabel];
|
|
1050
|
-
|
|
1051
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1052
|
-
omnipresentPlugins.push(createUnsafeSelectorsAlarm({
|
|
1053
|
-
get compat() {
|
|
1054
|
-
return cache.compat;
|
|
1055
|
-
}
|
|
1056
772
|
|
|
1057
|
-
|
|
1058
|
-
}
|
|
773
|
+
var omnipresentPlugins = [compat, removeLabel];
|
|
1059
774
|
|
|
1060
|
-
if (isBrowser$
|
|
775
|
+
if (isBrowser$3) {
|
|
1061
776
|
var currentSheet;
|
|
1062
|
-
var finalizingPlugins = [stringify,
|
|
1063
|
-
if (!element.root) {
|
|
1064
|
-
if (element["return"]) {
|
|
1065
|
-
currentSheet.insert(element["return"]);
|
|
1066
|
-
} else if (element.value && element.type !== COMMENT) {
|
|
1067
|
-
// insert empty rule in non-production environments
|
|
1068
|
-
// so @emotion/jest can grab `key` from the (JS)DOM for caches without any rules inserted yet
|
|
1069
|
-
currentSheet.insert(element.value + "{}");
|
|
1070
|
-
}
|
|
1071
|
-
}
|
|
1072
|
-
} : rulesheet(function (rule) {
|
|
777
|
+
var finalizingPlugins = [stringify, rulesheet(function (rule) {
|
|
1073
778
|
currentSheet.insert(rule);
|
|
1074
779
|
})];
|
|
1075
780
|
var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));
|
|
@@ -1078,17 +783,19 @@ var createCache = function createCache(options) {
|
|
|
1078
783
|
return serialize(compile(styles), serializer);
|
|
1079
784
|
};
|
|
1080
785
|
|
|
1081
|
-
_insert = function
|
|
786
|
+
_insert = function
|
|
787
|
+
/*: void */
|
|
788
|
+
insert(selector
|
|
789
|
+
/*: string */
|
|
790
|
+
, serialized
|
|
791
|
+
/*: SerializedStyles */
|
|
792
|
+
, sheet
|
|
793
|
+
/*: StyleSheet */
|
|
794
|
+
, shouldCache
|
|
795
|
+
/*: boolean */
|
|
796
|
+
) {
|
|
1082
797
|
currentSheet = sheet;
|
|
1083
798
|
|
|
1084
|
-
if (process.env.NODE_ENV !== 'production' && serialized.map !== undefined) {
|
|
1085
|
-
currentSheet = {
|
|
1086
|
-
insert: function insert(rule) {
|
|
1087
|
-
sheet.insert(rule + serialized.map);
|
|
1088
|
-
}
|
|
1089
|
-
};
|
|
1090
|
-
}
|
|
1091
|
-
|
|
1092
799
|
stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles);
|
|
1093
800
|
|
|
1094
801
|
if (shouldCache) {
|
|
@@ -1102,12 +809,17 @@ var createCache = function createCache(options) {
|
|
|
1102
809
|
|
|
1103
810
|
var _stylis = function _stylis(styles) {
|
|
1104
811
|
return serialize(compile(styles), _serializer);
|
|
1105
|
-
};
|
|
1106
|
-
|
|
812
|
+
};
|
|
1107
813
|
|
|
1108
814
|
var serverStylisCache = getServerStylisCache(stylisPlugins)(key);
|
|
1109
815
|
|
|
1110
|
-
var getRules = function
|
|
816
|
+
var getRules = function
|
|
817
|
+
/*: string */
|
|
818
|
+
getRules(selector
|
|
819
|
+
/*: string */
|
|
820
|
+
, serialized
|
|
821
|
+
/*: SerializedStyles */
|
|
822
|
+
) {
|
|
1111
823
|
var name = serialized.name;
|
|
1112
824
|
|
|
1113
825
|
if (serverStylisCache[name] === undefined) {
|
|
@@ -1117,7 +829,17 @@ var createCache = function createCache(options) {
|
|
|
1117
829
|
return serverStylisCache[name];
|
|
1118
830
|
};
|
|
1119
831
|
|
|
1120
|
-
_insert = function
|
|
832
|
+
_insert = function
|
|
833
|
+
/*: string | void */
|
|
834
|
+
_insert(selector
|
|
835
|
+
/*: string */
|
|
836
|
+
, serialized
|
|
837
|
+
/*: SerializedStyles */
|
|
838
|
+
, sheet
|
|
839
|
+
/*: StyleSheet */
|
|
840
|
+
, shouldCache
|
|
841
|
+
/*: boolean */
|
|
842
|
+
) {
|
|
1121
843
|
var name = serialized.name;
|
|
1122
844
|
var rules = getRules(selector, serialized);
|
|
1123
845
|
|
|
@@ -1129,12 +851,6 @@ var createCache = function createCache(options) {
|
|
|
1129
851
|
cache.inserted[name] = true;
|
|
1130
852
|
}
|
|
1131
853
|
|
|
1132
|
-
if ( // using === development instead of !== production
|
|
1133
|
-
// because if people do ssr in tests, the source maps showing up would be annoying
|
|
1134
|
-
process.env.NODE_ENV === 'development' && serialized.map !== undefined) {
|
|
1135
|
-
return rules + serialized.map;
|
|
1136
|
-
}
|
|
1137
|
-
|
|
1138
854
|
return rules;
|
|
1139
855
|
} else {
|
|
1140
856
|
// in compat mode, we put the styles on the inserted cache so
|
|
@@ -1153,7 +869,9 @@ var createCache = function createCache(options) {
|
|
|
1153
869
|
};
|
|
1154
870
|
}
|
|
1155
871
|
|
|
1156
|
-
var cache
|
|
872
|
+
var cache
|
|
873
|
+
/*: EmotionCache */
|
|
874
|
+
= {
|
|
1157
875
|
key: key,
|
|
1158
876
|
sheet: new StyleSheet({
|
|
1159
877
|
key: key,
|
|
@@ -1172,7 +890,8 @@ var createCache = function createCache(options) {
|
|
|
1172
890
|
return cache;
|
|
1173
891
|
};
|
|
1174
892
|
|
|
1175
|
-
var isBrowser$
|
|
893
|
+
var isBrowser$2 = typeof document !== 'undefined';
|
|
894
|
+
|
|
1176
895
|
function getRegisteredStyles(registered, registeredStyles, classNames) {
|
|
1177
896
|
var rawClassName = '';
|
|
1178
897
|
classNames.split(' ').forEach(function (className) {
|
|
@@ -1196,7 +915,7 @@ var registerStyles = function registerStyles(cache, serialized, isStringTag) {
|
|
|
1196
915
|
// in node since emotion-server relies on whether a style is in
|
|
1197
916
|
// the registered cache to know whether a style is global or not
|
|
1198
917
|
// also, note that this check will be dead code eliminated in the browser
|
|
1199
|
-
isBrowser$
|
|
918
|
+
isBrowser$2 === false && cache.compat !== undefined) && cache.registered[className] === undefined) {
|
|
1200
919
|
cache.registered[className] = serialized.styles;
|
|
1201
920
|
}
|
|
1202
921
|
};
|
|
@@ -1211,14 +930,14 @@ var insertStyles = function insertStyles(cache, serialized, isStringTag) {
|
|
|
1211
930
|
do {
|
|
1212
931
|
var maybeStyles = cache.insert(serialized === current ? "." + className : '', current, cache.sheet, true);
|
|
1213
932
|
|
|
1214
|
-
if (!isBrowser$
|
|
933
|
+
if (!isBrowser$2 && maybeStyles !== undefined) {
|
|
1215
934
|
stylesForSSR += maybeStyles;
|
|
1216
935
|
}
|
|
1217
936
|
|
|
1218
937
|
current = current.next;
|
|
1219
938
|
} while (current !== undefined);
|
|
1220
939
|
|
|
1221
|
-
if (!isBrowser$
|
|
940
|
+
if (!isBrowser$2 && stylesForSSR.length !== 0) {
|
|
1222
941
|
return stylesForSSR;
|
|
1223
942
|
}
|
|
1224
943
|
}
|
|
@@ -1328,16 +1047,6 @@ var unitlessKeys = {
|
|
|
1328
1047
|
strokeWidth: 1
|
|
1329
1048
|
};
|
|
1330
1049
|
|
|
1331
|
-
function memoize(fn) {
|
|
1332
|
-
var cache = Object.create(null);
|
|
1333
|
-
return function (arg) {
|
|
1334
|
-
if (cache[arg] === undefined) cache[arg] = fn(arg);
|
|
1335
|
-
return cache[arg];
|
|
1336
|
-
};
|
|
1337
|
-
}
|
|
1338
|
-
|
|
1339
|
-
var ILLEGAL_ESCAPE_SEQUENCE_ERROR = "You have illegal escape sequence in your template literal, most likely inside content's property value.\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \"content: '\\00d7';\" should become \"content: '\\\\00d7';\".\nYou can read more about this here:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences";
|
|
1340
|
-
var UNDEFINED_AS_OBJECT_KEY_ERROR = "You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).";
|
|
1341
1050
|
var hyphenateRegex = /[A-Z]|^ms/g;
|
|
1342
1051
|
var animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;
|
|
1343
1052
|
|
|
@@ -1378,47 +1087,16 @@ var processStyleValue = function processStyleValue(key, value) {
|
|
|
1378
1087
|
return value;
|
|
1379
1088
|
};
|
|
1380
1089
|
|
|
1381
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1382
|
-
var contentValuePattern = /(var|attr|counters?|url|element|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/;
|
|
1383
|
-
var contentValues = ['normal', 'none', 'initial', 'inherit', 'unset'];
|
|
1384
|
-
var oldProcessStyleValue = processStyleValue;
|
|
1385
|
-
var msPattern = /^-ms-/;
|
|
1386
|
-
var hyphenPattern = /-(.)/g;
|
|
1387
|
-
var hyphenatedCache = {};
|
|
1388
|
-
|
|
1389
|
-
processStyleValue = function processStyleValue(key, value) {
|
|
1390
|
-
if (key === 'content') {
|
|
1391
|
-
if (typeof value !== 'string' || contentValues.indexOf(value) === -1 && !contentValuePattern.test(value) && (value.charAt(0) !== value.charAt(value.length - 1) || value.charAt(0) !== '"' && value.charAt(0) !== "'")) {
|
|
1392
|
-
throw new Error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"" + value + "\"'`");
|
|
1393
|
-
}
|
|
1394
|
-
}
|
|
1395
|
-
|
|
1396
|
-
var processed = oldProcessStyleValue(key, value);
|
|
1397
|
-
|
|
1398
|
-
if (processed !== '' && !isCustomProperty(key) && key.indexOf('-') !== -1 && hyphenatedCache[key] === undefined) {
|
|
1399
|
-
hyphenatedCache[key] = true;
|
|
1400
|
-
console.error("Using kebab-case for css properties in objects is not supported. Did you mean " + key.replace(msPattern, 'ms-').replace(hyphenPattern, function (str, _char) {
|
|
1401
|
-
return _char.toUpperCase();
|
|
1402
|
-
}) + "?");
|
|
1403
|
-
}
|
|
1404
|
-
|
|
1405
|
-
return processed;
|
|
1406
|
-
};
|
|
1407
|
-
}
|
|
1408
|
-
|
|
1409
|
-
var noComponentSelectorMessage = 'Component selectors can only be used in conjunction with ' + '@emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware ' + 'compiler transform.';
|
|
1410
|
-
|
|
1411
1090
|
function handleInterpolation(mergedProps, registered, interpolation) {
|
|
1412
1091
|
if (interpolation == null) {
|
|
1413
1092
|
return '';
|
|
1414
1093
|
}
|
|
1415
1094
|
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
}
|
|
1095
|
+
var componentSelector = interpolation;
|
|
1096
|
+
|
|
1097
|
+
if (componentSelector.__emotion_styles !== undefined) {
|
|
1420
1098
|
|
|
1421
|
-
return
|
|
1099
|
+
return componentSelector;
|
|
1422
1100
|
}
|
|
1423
1101
|
|
|
1424
1102
|
switch (typeof interpolation) {
|
|
@@ -1429,17 +1107,21 @@ function handleInterpolation(mergedProps, registered, interpolation) {
|
|
|
1429
1107
|
|
|
1430
1108
|
case 'object':
|
|
1431
1109
|
{
|
|
1432
|
-
|
|
1110
|
+
var keyframes = interpolation;
|
|
1111
|
+
|
|
1112
|
+
if (keyframes.anim === 1) {
|
|
1433
1113
|
cursor = {
|
|
1434
|
-
name:
|
|
1435
|
-
styles:
|
|
1114
|
+
name: keyframes.name,
|
|
1115
|
+
styles: keyframes.styles,
|
|
1436
1116
|
next: cursor
|
|
1437
1117
|
};
|
|
1438
|
-
return
|
|
1118
|
+
return keyframes.name;
|
|
1439
1119
|
}
|
|
1440
1120
|
|
|
1441
|
-
|
|
1442
|
-
|
|
1121
|
+
var serializedStyles = interpolation;
|
|
1122
|
+
|
|
1123
|
+
if (serializedStyles.styles !== undefined) {
|
|
1124
|
+
var next = serializedStyles.next;
|
|
1443
1125
|
|
|
1444
1126
|
if (next !== undefined) {
|
|
1445
1127
|
// not the most efficient thing ever but this is a pretty rare case
|
|
@@ -1454,11 +1136,7 @@ function handleInterpolation(mergedProps, registered, interpolation) {
|
|
|
1454
1136
|
}
|
|
1455
1137
|
}
|
|
1456
1138
|
|
|
1457
|
-
var styles =
|
|
1458
|
-
|
|
1459
|
-
if (process.env.NODE_ENV !== 'production' && interpolation.map !== undefined) {
|
|
1460
|
-
styles += interpolation.map;
|
|
1461
|
-
}
|
|
1139
|
+
var styles = serializedStyles.styles + ";";
|
|
1462
1140
|
|
|
1463
1141
|
return styles;
|
|
1464
1142
|
}
|
|
@@ -1473,37 +1151,18 @@ function handleInterpolation(mergedProps, registered, interpolation) {
|
|
|
1473
1151
|
var result = interpolation(mergedProps);
|
|
1474
1152
|
cursor = previousCursor;
|
|
1475
1153
|
return handleInterpolation(mergedProps, registered, result);
|
|
1476
|
-
} else if (process.env.NODE_ENV !== 'production') {
|
|
1477
|
-
console.error('Functions that are interpolated in css calls will be stringified.\n' + 'If you want to have a css call based on props, create a function that returns a css call like this\n' + 'let dynamicStyle = (props) => css`color: ${props.color}`\n' + 'It can be called directly with props or interpolated in a styled call like this\n' + "let SomeComponent = styled('div')`${dynamicStyle}`");
|
|
1478
1154
|
}
|
|
1479
1155
|
|
|
1480
1156
|
break;
|
|
1481
1157
|
}
|
|
1482
|
-
|
|
1483
|
-
case 'string':
|
|
1484
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1485
|
-
var matched = [];
|
|
1486
|
-
var replaced = interpolation.replace(animationRegex, function (match, p1, p2) {
|
|
1487
|
-
var fakeVarName = "animation" + matched.length;
|
|
1488
|
-
matched.push("const " + fakeVarName + " = keyframes`" + p2.replace(/^@keyframes animation-\w+/, '') + "`");
|
|
1489
|
-
return "${" + fakeVarName + "}";
|
|
1490
|
-
});
|
|
1491
|
-
|
|
1492
|
-
if (matched.length) {
|
|
1493
|
-
console.error('`keyframes` output got interpolated into plain string, please wrap it with `css`.\n\n' + 'Instead of doing this:\n\n' + [].concat(matched, ["`" + replaced + "`"]).join('\n') + '\n\nYou should wrap it with `css` like this:\n\n' + ("css`" + replaced + "`"));
|
|
1494
|
-
}
|
|
1495
|
-
}
|
|
1496
|
-
|
|
1497
|
-
break;
|
|
1498
1158
|
} // finalize string values (regular strings and functions interpolated into css calls)
|
|
1499
1159
|
|
|
1500
1160
|
|
|
1501
|
-
|
|
1502
|
-
return interpolation;
|
|
1503
|
-
}
|
|
1161
|
+
var asString = interpolation;
|
|
1504
1162
|
|
|
1505
|
-
|
|
1506
|
-
|
|
1163
|
+
{
|
|
1164
|
+
return asString;
|
|
1165
|
+
}
|
|
1507
1166
|
}
|
|
1508
1167
|
|
|
1509
1168
|
function createStringFromObject(mergedProps, registered, obj) {
|
|
@@ -1514,44 +1173,38 @@ function createStringFromObject(mergedProps, registered, obj) {
|
|
|
1514
1173
|
string += handleInterpolation(mergedProps, registered, obj[i]) + ";";
|
|
1515
1174
|
}
|
|
1516
1175
|
} else {
|
|
1517
|
-
for (var
|
|
1518
|
-
var value = obj[
|
|
1176
|
+
for (var key in obj) {
|
|
1177
|
+
var value = obj[key];
|
|
1519
1178
|
|
|
1520
1179
|
if (typeof value !== 'object') {
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
string += processStyleName(
|
|
1180
|
+
var asString = value;
|
|
1181
|
+
|
|
1182
|
+
if (isProcessableValue(asString)) {
|
|
1183
|
+
string += processStyleName(key) + ":" + processStyleValue(key, asString) + ";";
|
|
1525
1184
|
}
|
|
1526
1185
|
} else {
|
|
1527
|
-
if (_key === 'NO_COMPONENT_SELECTOR' && process.env.NODE_ENV !== 'production') {
|
|
1528
|
-
throw new Error(noComponentSelectorMessage);
|
|
1529
|
-
}
|
|
1530
1186
|
|
|
1531
|
-
if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null
|
|
1187
|
+
if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null)) {
|
|
1532
1188
|
for (var _i = 0; _i < value.length; _i++) {
|
|
1533
1189
|
if (isProcessableValue(value[_i])) {
|
|
1534
|
-
string += processStyleName(
|
|
1190
|
+
string += processStyleName(key) + ":" + processStyleValue(key, value[_i]) + ";";
|
|
1535
1191
|
}
|
|
1536
1192
|
}
|
|
1537
1193
|
} else {
|
|
1538
1194
|
var interpolated = handleInterpolation(mergedProps, registered, value);
|
|
1539
1195
|
|
|
1540
|
-
switch (
|
|
1196
|
+
switch (key) {
|
|
1541
1197
|
case 'animation':
|
|
1542
1198
|
case 'animationName':
|
|
1543
1199
|
{
|
|
1544
|
-
string += processStyleName(
|
|
1200
|
+
string += processStyleName(key) + ":" + interpolated + ";";
|
|
1545
1201
|
break;
|
|
1546
1202
|
}
|
|
1547
1203
|
|
|
1548
1204
|
default:
|
|
1549
1205
|
{
|
|
1550
|
-
if (process.env.NODE_ENV !== 'production' && _key === 'undefined') {
|
|
1551
|
-
console.error(UNDEFINED_AS_OBJECT_KEY_ERROR);
|
|
1552
|
-
}
|
|
1553
1206
|
|
|
1554
|
-
string +=
|
|
1207
|
+
string += key + "{" + interpolated + "}";
|
|
1555
1208
|
}
|
|
1556
1209
|
}
|
|
1557
1210
|
}
|
|
@@ -1563,16 +1216,11 @@ function createStringFromObject(mergedProps, registered, obj) {
|
|
|
1563
1216
|
}
|
|
1564
1217
|
|
|
1565
1218
|
var labelPattern = /label:\s*([^\s;\n{]+)\s*(;|$)/g;
|
|
1566
|
-
var sourceMapPattern;
|
|
1567
|
-
|
|
1568
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1569
|
-
sourceMapPattern = /\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g;
|
|
1570
|
-
} // this is the cursor for keyframes
|
|
1571
1219
|
// keyframes are stored on the SerializedStyles object as a linked list
|
|
1572
1220
|
|
|
1573
1221
|
|
|
1574
1222
|
var cursor;
|
|
1575
|
-
|
|
1223
|
+
function serializeStyles(args, registered, mergedProps) {
|
|
1576
1224
|
if (args.length === 1 && typeof args[0] === 'object' && args[0] !== null && args[0].styles !== undefined) {
|
|
1577
1225
|
return args[0];
|
|
1578
1226
|
}
|
|
@@ -1586,11 +1234,9 @@ var serializeStyles = function serializeStyles(args, registered, mergedProps) {
|
|
|
1586
1234
|
stringMode = false;
|
|
1587
1235
|
styles += handleInterpolation(mergedProps, registered, strings);
|
|
1588
1236
|
} else {
|
|
1589
|
-
|
|
1590
|
-
console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);
|
|
1591
|
-
}
|
|
1237
|
+
var asTemplateStringsArr = strings;
|
|
1592
1238
|
|
|
1593
|
-
styles +=
|
|
1239
|
+
styles += asTemplateStringsArr[0];
|
|
1594
1240
|
} // we start at 1 since we've already handled the first arg
|
|
1595
1241
|
|
|
1596
1242
|
|
|
@@ -1598,69 +1244,45 @@ var serializeStyles = function serializeStyles(args, registered, mergedProps) {
|
|
|
1598
1244
|
styles += handleInterpolation(mergedProps, registered, args[i]);
|
|
1599
1245
|
|
|
1600
1246
|
if (stringMode) {
|
|
1601
|
-
|
|
1602
|
-
console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);
|
|
1603
|
-
}
|
|
1247
|
+
var templateStringsArr = strings;
|
|
1604
1248
|
|
|
1605
|
-
styles +=
|
|
1249
|
+
styles += templateStringsArr[i];
|
|
1606
1250
|
}
|
|
1607
1251
|
}
|
|
1608
1252
|
|
|
1609
|
-
var sourceMap;
|
|
1610
|
-
|
|
1611
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1612
|
-
styles = styles.replace(sourceMapPattern, function (match) {
|
|
1613
|
-
sourceMap = match;
|
|
1614
|
-
return '';
|
|
1615
|
-
});
|
|
1616
|
-
} // using a global regex with .exec is stateful so lastIndex has to be reset each time
|
|
1617
|
-
|
|
1618
1253
|
|
|
1619
1254
|
labelPattern.lastIndex = 0;
|
|
1620
1255
|
var identifierName = '';
|
|
1621
1256
|
var match; // https://esbench.com/bench/5b809c2cf2949800a0f61fb5
|
|
1622
1257
|
|
|
1623
1258
|
while ((match = labelPattern.exec(styles)) !== null) {
|
|
1624
|
-
identifierName += '-' +
|
|
1625
|
-
match[1];
|
|
1259
|
+
identifierName += '-' + match[1];
|
|
1626
1260
|
}
|
|
1627
1261
|
|
|
1628
1262
|
var name = murmur2(styles) + identifierName;
|
|
1629
1263
|
|
|
1630
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1631
|
-
// $FlowFixMe SerializedStyles type doesn't have toString property (and we don't want to add it)
|
|
1632
|
-
return {
|
|
1633
|
-
name: name,
|
|
1634
|
-
styles: styles,
|
|
1635
|
-
map: sourceMap,
|
|
1636
|
-
next: cursor,
|
|
1637
|
-
toString: function toString() {
|
|
1638
|
-
return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
|
|
1639
|
-
}
|
|
1640
|
-
};
|
|
1641
|
-
}
|
|
1642
|
-
|
|
1643
1264
|
return {
|
|
1644
1265
|
name: name,
|
|
1645
1266
|
styles: styles,
|
|
1646
1267
|
next: cursor
|
|
1647
1268
|
};
|
|
1648
|
-
}
|
|
1269
|
+
}
|
|
1649
1270
|
|
|
1650
|
-
var isBrowser$
|
|
1271
|
+
var isBrowser$1 = typeof document !== 'undefined';
|
|
1651
1272
|
|
|
1652
1273
|
var syncFallback = function syncFallback(create) {
|
|
1653
1274
|
return create();
|
|
1654
1275
|
};
|
|
1655
1276
|
|
|
1656
1277
|
var useInsertionEffect = React['useInsertion' + 'Effect'] ? React['useInsertion' + 'Effect'] : false;
|
|
1657
|
-
var useInsertionEffectAlwaysWithSyncFallback = !isBrowser$
|
|
1658
|
-
var useInsertionEffectWithLayoutFallback = useInsertionEffect || React.useLayoutEffect;
|
|
1278
|
+
var useInsertionEffectAlwaysWithSyncFallback = !isBrowser$1 ? syncFallback : useInsertionEffect || syncFallback;
|
|
1659
1279
|
|
|
1660
|
-
var isBrowser
|
|
1661
|
-
var hasOwnProperty = {}.hasOwnProperty;
|
|
1280
|
+
var isBrowser = typeof document !== 'undefined';
|
|
1662
1281
|
|
|
1663
|
-
|
|
1282
|
+
/* import { type EmotionCache } from '@emotion/utils' */
|
|
1283
|
+
var EmotionCacheContext
|
|
1284
|
+
/*: React.Context<EmotionCache | null> */
|
|
1285
|
+
= /* #__PURE__ */React.createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case
|
|
1664
1286
|
// because this module is primarily intended for the browser and node
|
|
1665
1287
|
// but it's also required in react native and similar environments sometimes
|
|
1666
1288
|
// and we could have a special build just for that
|
|
@@ -1670,24 +1292,37 @@ typeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache({
|
|
|
1670
1292
|
key: 'css'
|
|
1671
1293
|
}) : null);
|
|
1672
1294
|
|
|
1673
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1674
|
-
EmotionCacheContext.displayName = 'EmotionCacheContext';
|
|
1675
|
-
}
|
|
1676
|
-
|
|
1677
1295
|
EmotionCacheContext.Provider;
|
|
1678
1296
|
|
|
1679
|
-
var withEmotionCache = function withEmotionCache
|
|
1680
|
-
|
|
1681
|
-
|
|
1297
|
+
var withEmotionCache = function withEmotionCache
|
|
1298
|
+
/* <Props, Ref: React.Ref<*>> */
|
|
1299
|
+
(func
|
|
1300
|
+
/*: (props: Props, cache: EmotionCache, ref: Ref) => React.Node */
|
|
1301
|
+
)
|
|
1302
|
+
/*: React.AbstractComponent<Props> */
|
|
1303
|
+
{
|
|
1304
|
+
return /*#__PURE__*/forwardRef(function (props
|
|
1305
|
+
/*: Props */
|
|
1306
|
+
, ref
|
|
1307
|
+
/*: Ref */
|
|
1308
|
+
) {
|
|
1682
1309
|
// the cache will never be null in the browser
|
|
1683
1310
|
var cache = useContext(EmotionCacheContext);
|
|
1684
1311
|
return func(props, cache, ref);
|
|
1685
1312
|
});
|
|
1686
1313
|
};
|
|
1687
1314
|
|
|
1688
|
-
if (!isBrowser
|
|
1689
|
-
withEmotionCache = function withEmotionCache
|
|
1690
|
-
|
|
1315
|
+
if (!isBrowser) {
|
|
1316
|
+
withEmotionCache = function withEmotionCache
|
|
1317
|
+
/* <Props> */
|
|
1318
|
+
(func
|
|
1319
|
+
/*: (props: Props, cache: EmotionCache) => React.Node */
|
|
1320
|
+
)
|
|
1321
|
+
/*: React.StatelessFunctionalComponent<Props> */
|
|
1322
|
+
{
|
|
1323
|
+
return function (props
|
|
1324
|
+
/*: Props */
|
|
1325
|
+
) {
|
|
1691
1326
|
var cache = useContext(EmotionCacheContext);
|
|
1692
1327
|
|
|
1693
1328
|
if (cache === null) {
|
|
@@ -1711,81 +1346,31 @@ if (!isBrowser$1) {
|
|
|
1711
1346
|
|
|
1712
1347
|
var ThemeContext = /* #__PURE__ */React.createContext({});
|
|
1713
1348
|
|
|
1714
|
-
|
|
1715
|
-
ThemeContext.displayName = 'EmotionThemeContext';
|
|
1716
|
-
}
|
|
1717
|
-
|
|
1718
|
-
var getLastPart = function getLastPart(functionName) {
|
|
1719
|
-
// The match may be something like 'Object.createEmotionProps' or
|
|
1720
|
-
// 'Loader.prototype.render'
|
|
1721
|
-
var parts = functionName.split('.');
|
|
1722
|
-
return parts[parts.length - 1];
|
|
1723
|
-
};
|
|
1724
|
-
|
|
1725
|
-
var getFunctionNameFromStackTraceLine = function getFunctionNameFromStackTraceLine(line) {
|
|
1726
|
-
// V8
|
|
1727
|
-
var match = /^\s+at\s+([A-Za-z0-9$.]+)\s/.exec(line);
|
|
1728
|
-
if (match) return getLastPart(match[1]); // Safari / Firefox
|
|
1729
|
-
|
|
1730
|
-
match = /^([A-Za-z0-9$.]+)@/.exec(line);
|
|
1731
|
-
if (match) return getLastPart(match[1]);
|
|
1732
|
-
return undefined;
|
|
1733
|
-
};
|
|
1734
|
-
|
|
1735
|
-
var internalReactFunctionNames = /* #__PURE__ */new Set(['renderWithHooks', 'processChild', 'finishClassComponent', 'renderToString']); // These identifiers come from error stacks, so they have to be valid JS
|
|
1736
|
-
// identifiers, thus we only need to replace what is a valid character for JS,
|
|
1737
|
-
// but not for CSS.
|
|
1738
|
-
|
|
1739
|
-
var sanitizeIdentifier = function sanitizeIdentifier(identifier) {
|
|
1740
|
-
return identifier.replace(/\$/g, '-');
|
|
1741
|
-
};
|
|
1742
|
-
|
|
1743
|
-
var getLabelFromStackTrace = function getLabelFromStackTrace(stackTrace) {
|
|
1744
|
-
if (!stackTrace) return undefined;
|
|
1745
|
-
var lines = stackTrace.split('\n');
|
|
1746
|
-
|
|
1747
|
-
for (var i = 0; i < lines.length; i++) {
|
|
1748
|
-
var functionName = getFunctionNameFromStackTraceLine(lines[i]); // The first line of V8 stack traces is just "Error"
|
|
1749
|
-
|
|
1750
|
-
if (!functionName) continue; // If we reach one of these, we have gone too far and should quit
|
|
1751
|
-
|
|
1752
|
-
if (internalReactFunctionNames.has(functionName)) break; // The component name is the first function in the stack that starts with an
|
|
1753
|
-
// uppercase letter
|
|
1754
|
-
|
|
1755
|
-
if (/^[A-Z]/.test(functionName)) return sanitizeIdentifier(functionName);
|
|
1756
|
-
}
|
|
1757
|
-
|
|
1758
|
-
return undefined;
|
|
1759
|
-
};
|
|
1349
|
+
var hasOwn = {}.hasOwnProperty;
|
|
1760
1350
|
|
|
1761
1351
|
var typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';
|
|
1762
|
-
var
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
}
|
|
1352
|
+
var createEmotionProps = function createEmotionProps(type
|
|
1353
|
+
/*: React.ElementType */
|
|
1354
|
+
, props
|
|
1355
|
+
/*: Object */
|
|
1356
|
+
) {
|
|
1768
1357
|
|
|
1769
|
-
var newProps
|
|
1358
|
+
var newProps
|
|
1359
|
+
/*: any */
|
|
1360
|
+
= {};
|
|
1770
1361
|
|
|
1771
1362
|
for (var key in props) {
|
|
1772
|
-
if (
|
|
1363
|
+
if (hasOwn.call(props, key)) {
|
|
1773
1364
|
newProps[key] = props[key];
|
|
1774
1365
|
}
|
|
1775
1366
|
}
|
|
1776
1367
|
|
|
1777
|
-
newProps[typePropName] = type; //
|
|
1778
|
-
// the label hasn't already been computed
|
|
1779
|
-
|
|
1780
|
-
if (process.env.NODE_ENV !== 'production' && !!props.css && (typeof props.css !== 'object' || typeof props.css.name !== 'string' || props.css.name.indexOf('-') === -1)) {
|
|
1781
|
-
var label = getLabelFromStackTrace(new Error().stack);
|
|
1782
|
-
if (label) newProps[labelPropName] = label;
|
|
1783
|
-
}
|
|
1368
|
+
newProps[typePropName] = type; // Runtime labeling is an opt-in feature because:
|
|
1784
1369
|
|
|
1785
1370
|
return newProps;
|
|
1786
1371
|
};
|
|
1787
1372
|
|
|
1788
|
-
var Insertion
|
|
1373
|
+
var Insertion = function Insertion(_ref) {
|
|
1789
1374
|
var cache = _ref.cache,
|
|
1790
1375
|
serialized = _ref.serialized,
|
|
1791
1376
|
isStringTag = _ref.isStringTag;
|
|
@@ -1794,7 +1379,7 @@ var Insertion$1 = function Insertion(_ref) {
|
|
|
1794
1379
|
return insertStyles(cache, serialized, isStringTag);
|
|
1795
1380
|
});
|
|
1796
1381
|
|
|
1797
|
-
if (!isBrowser
|
|
1382
|
+
if (!isBrowser && rules !== undefined) {
|
|
1798
1383
|
var _ref2;
|
|
1799
1384
|
|
|
1800
1385
|
var serializedNames = serialized.name;
|
|
@@ -1813,7 +1398,9 @@ var Insertion$1 = function Insertion(_ref) {
|
|
|
1813
1398
|
return null;
|
|
1814
1399
|
};
|
|
1815
1400
|
|
|
1816
|
-
var Emotion = /* #__PURE__ */withEmotionCache(
|
|
1401
|
+
var Emotion = /* #__PURE__ */withEmotionCache(
|
|
1402
|
+
/* <any, any> */
|
|
1403
|
+
function (props, cache, ref) {
|
|
1817
1404
|
var cssProp = props.css; // so that using `css` from `emotion` and passing the result to the css prop works
|
|
1818
1405
|
// not passing the registered cache to serializeStyles because it would
|
|
1819
1406
|
// make certain babel optimisations not possible
|
|
@@ -1834,46 +1421,42 @@ var Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {
|
|
|
1834
1421
|
|
|
1835
1422
|
var serialized = serializeStyles(registeredStyles, undefined, React.useContext(ThemeContext));
|
|
1836
1423
|
|
|
1837
|
-
if (process.env.NODE_ENV !== 'production' && serialized.name.indexOf('-') === -1) {
|
|
1838
|
-
var labelFromStack = props[labelPropName];
|
|
1839
|
-
|
|
1840
|
-
if (labelFromStack) {
|
|
1841
|
-
serialized = serializeStyles([serialized, 'label:' + labelFromStack + ';']);
|
|
1842
|
-
}
|
|
1843
|
-
}
|
|
1844
|
-
|
|
1845
1424
|
className += cache.key + "-" + serialized.name;
|
|
1846
1425
|
var newProps = {};
|
|
1847
1426
|
|
|
1848
1427
|
for (var key in props) {
|
|
1849
|
-
if (
|
|
1428
|
+
if (hasOwn.call(props, key) && key !== 'css' && key !== typePropName && (true )) {
|
|
1850
1429
|
newProps[key] = props[key];
|
|
1851
1430
|
}
|
|
1852
1431
|
}
|
|
1853
1432
|
|
|
1854
|
-
newProps.ref = ref;
|
|
1855
1433
|
newProps.className = className;
|
|
1856
|
-
|
|
1434
|
+
|
|
1435
|
+
if (ref) {
|
|
1436
|
+
newProps.ref = ref;
|
|
1437
|
+
}
|
|
1438
|
+
|
|
1439
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {
|
|
1857
1440
|
cache: cache,
|
|
1858
1441
|
serialized: serialized,
|
|
1859
1442
|
isStringTag: typeof WrappedComponent === 'string'
|
|
1860
1443
|
}), /*#__PURE__*/React.createElement(WrappedComponent, newProps));
|
|
1861
1444
|
});
|
|
1862
1445
|
|
|
1863
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1864
|
-
Emotion.displayName = 'EmotionCssPropInternal';
|
|
1865
|
-
}
|
|
1866
|
-
|
|
1867
1446
|
var Emotion$1 = Emotion;
|
|
1868
1447
|
|
|
1869
|
-
var
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1448
|
+
var jsx
|
|
1449
|
+
/*: typeof React.createElement */
|
|
1450
|
+
= function jsx
|
|
1451
|
+
/*: typeof React.createElement */
|
|
1452
|
+
(type
|
|
1453
|
+
/*: React.ElementType */
|
|
1454
|
+
, props
|
|
1455
|
+
/*: Object */
|
|
1456
|
+
) {
|
|
1873
1457
|
var args = arguments;
|
|
1874
1458
|
|
|
1875
|
-
if (props == null || !
|
|
1876
|
-
// $FlowFixMe
|
|
1459
|
+
if (props == null || !hasOwn.call(props, 'css')) {
|
|
1877
1460
|
return React.createElement.apply(undefined, args);
|
|
1878
1461
|
}
|
|
1879
1462
|
|
|
@@ -1884,123 +1467,16 @@ var jsx = function jsx(type, props) {
|
|
|
1884
1467
|
|
|
1885
1468
|
for (var i = 2; i < argsLength; i++) {
|
|
1886
1469
|
createElementArgArray[i] = args[i];
|
|
1887
|
-
}
|
|
1888
|
-
|
|
1470
|
+
}
|
|
1889
1471
|
|
|
1890
1472
|
return React.createElement.apply(null, createElementArgArray);
|
|
1891
1473
|
};
|
|
1892
1474
|
|
|
1893
|
-
|
|
1894
|
-
// initial render from browser, insertBefore context.sheet.tags[0] or if a style hasn't been inserted there yet, appendChild
|
|
1895
|
-
// initial client-side render from SSR, use place of hydrating tag
|
|
1896
|
-
|
|
1897
|
-
var Global = /* #__PURE__ */withEmotionCache(function (props, cache) {
|
|
1898
|
-
if (process.env.NODE_ENV !== 'production' && !warnedAboutCssPropForGlobal && ( // check for className as well since the user is
|
|
1899
|
-
// probably using the custom createElement which
|
|
1900
|
-
// means it will be turned into a className prop
|
|
1901
|
-
// $FlowFixMe I don't really want to add it to the type since it shouldn't be used
|
|
1902
|
-
props.className || props.css)) {
|
|
1903
|
-
console.error("It looks like you're using the css prop on Global, did you mean to use the styles prop instead?");
|
|
1904
|
-
warnedAboutCssPropForGlobal = true;
|
|
1905
|
-
}
|
|
1906
|
-
|
|
1907
|
-
var styles = props.styles;
|
|
1908
|
-
var serialized = serializeStyles([styles], undefined, React.useContext(ThemeContext));
|
|
1909
|
-
|
|
1910
|
-
if (!isBrowser$1) {
|
|
1911
|
-
var _ref;
|
|
1912
|
-
|
|
1913
|
-
var serializedNames = serialized.name;
|
|
1914
|
-
var serializedStyles = serialized.styles;
|
|
1915
|
-
var next = serialized.next;
|
|
1916
|
-
|
|
1917
|
-
while (next !== undefined) {
|
|
1918
|
-
serializedNames += ' ' + next.name;
|
|
1919
|
-
serializedStyles += next.styles;
|
|
1920
|
-
next = next.next;
|
|
1921
|
-
}
|
|
1922
|
-
|
|
1923
|
-
var shouldCache = cache.compat === true;
|
|
1924
|
-
var rules = cache.insert("", {
|
|
1925
|
-
name: serializedNames,
|
|
1926
|
-
styles: serializedStyles
|
|
1927
|
-
}, cache.sheet, shouldCache);
|
|
1928
|
-
|
|
1929
|
-
if (shouldCache) {
|
|
1930
|
-
return null;
|
|
1931
|
-
}
|
|
1932
|
-
|
|
1933
|
-
return /*#__PURE__*/React.createElement("style", (_ref = {}, _ref["data-emotion"] = cache.key + "-global " + serializedNames, _ref.dangerouslySetInnerHTML = {
|
|
1934
|
-
__html: rules
|
|
1935
|
-
}, _ref.nonce = cache.sheet.nonce, _ref));
|
|
1936
|
-
} // yes, i know these hooks are used conditionally
|
|
1937
|
-
// but it is based on a constant that will never change at runtime
|
|
1938
|
-
// it's effectively like having two implementations and switching them out
|
|
1939
|
-
// so it's not actually breaking anything
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
var sheetRef = React.useRef();
|
|
1943
|
-
useInsertionEffectWithLayoutFallback(function () {
|
|
1944
|
-
var key = cache.key + "-global"; // use case of https://github.com/emotion-js/emotion/issues/2675
|
|
1945
|
-
|
|
1946
|
-
var sheet = new cache.sheet.constructor({
|
|
1947
|
-
key: key,
|
|
1948
|
-
nonce: cache.sheet.nonce,
|
|
1949
|
-
container: cache.sheet.container,
|
|
1950
|
-
speedy: cache.sheet.isSpeedy
|
|
1951
|
-
});
|
|
1952
|
-
var rehydrating = false; // $FlowFixMe
|
|
1953
|
-
|
|
1954
|
-
var node = document.querySelector("style[data-emotion=\"" + key + " " + serialized.name + "\"]");
|
|
1955
|
-
|
|
1956
|
-
if (cache.sheet.tags.length) {
|
|
1957
|
-
sheet.before = cache.sheet.tags[0];
|
|
1958
|
-
}
|
|
1959
|
-
|
|
1960
|
-
if (node !== null) {
|
|
1961
|
-
rehydrating = true; // clear the hash so this node won't be recognizable as rehydratable by other <Global/>s
|
|
1962
|
-
|
|
1963
|
-
node.setAttribute('data-emotion', key);
|
|
1964
|
-
sheet.hydrate([node]);
|
|
1965
|
-
}
|
|
1966
|
-
|
|
1967
|
-
sheetRef.current = [sheet, rehydrating];
|
|
1968
|
-
return function () {
|
|
1969
|
-
sheet.flush();
|
|
1970
|
-
};
|
|
1971
|
-
}, [cache]);
|
|
1972
|
-
useInsertionEffectWithLayoutFallback(function () {
|
|
1973
|
-
var sheetRefCurrent = sheetRef.current;
|
|
1974
|
-
var sheet = sheetRefCurrent[0],
|
|
1975
|
-
rehydrating = sheetRefCurrent[1];
|
|
1976
|
-
|
|
1977
|
-
if (rehydrating) {
|
|
1978
|
-
sheetRefCurrent[1] = false;
|
|
1979
|
-
return;
|
|
1980
|
-
}
|
|
1981
|
-
|
|
1982
|
-
if (serialized.next !== undefined) {
|
|
1983
|
-
// insert keyframes
|
|
1984
|
-
insertStyles(cache, serialized.next, true);
|
|
1985
|
-
}
|
|
1986
|
-
|
|
1987
|
-
if (sheet.tags.length) {
|
|
1988
|
-
// if this doesn't exist then it will be null so the style element will be appended
|
|
1989
|
-
var element = sheet.tags[sheet.tags.length - 1].nextElementSibling;
|
|
1990
|
-
sheet.before = element;
|
|
1991
|
-
sheet.flush();
|
|
1992
|
-
}
|
|
1993
|
-
|
|
1994
|
-
cache.insert("", serialized, sheet, false);
|
|
1995
|
-
}, [cache, serialized.name]);
|
|
1996
|
-
return null;
|
|
1997
|
-
});
|
|
1998
|
-
|
|
1999
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
2000
|
-
Global.displayName = 'EmotionGlobal';
|
|
2001
|
-
}
|
|
1475
|
+
/* import type { Interpolation, SerializedStyles } from '@emotion/utils' */
|
|
2002
1476
|
|
|
2003
|
-
function css$2()
|
|
1477
|
+
function css$2()
|
|
1478
|
+
/*: SerializedStyles */
|
|
1479
|
+
{
|
|
2004
1480
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
2005
1481
|
args[_key] = arguments[_key];
|
|
2006
1482
|
}
|
|
@@ -2008,10 +1484,20 @@ function css$2() {
|
|
|
2008
1484
|
return serializeStyles(args);
|
|
2009
1485
|
}
|
|
2010
1486
|
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
1487
|
+
/*
|
|
1488
|
+
type Keyframes = {|
|
|
1489
|
+
name: string,
|
|
1490
|
+
styles: string,
|
|
1491
|
+
anim: 1,
|
|
1492
|
+
toString: () => string
|
|
1493
|
+
|} & string
|
|
1494
|
+
*/
|
|
2014
1495
|
|
|
1496
|
+
var keyframes = function
|
|
1497
|
+
/*: Keyframes */
|
|
1498
|
+
keyframes() {
|
|
1499
|
+
var insertable = css$2.apply(void 0, arguments);
|
|
1500
|
+
var name = "animation-" + insertable.name;
|
|
2015
1501
|
return {
|
|
2016
1502
|
name: name,
|
|
2017
1503
|
styles: "@keyframes " + name + "{" + insertable.styles + "}",
|
|
@@ -2022,169 +1508,6 @@ var keyframes = function keyframes() {
|
|
|
2022
1508
|
};
|
|
2023
1509
|
};
|
|
2024
1510
|
|
|
2025
|
-
var classnames = function classnames(args) {
|
|
2026
|
-
var len = args.length;
|
|
2027
|
-
var i = 0;
|
|
2028
|
-
var cls = '';
|
|
2029
|
-
|
|
2030
|
-
for (; i < len; i++) {
|
|
2031
|
-
var arg = args[i];
|
|
2032
|
-
if (arg == null) continue;
|
|
2033
|
-
var toAdd = void 0;
|
|
2034
|
-
|
|
2035
|
-
switch (typeof arg) {
|
|
2036
|
-
case 'boolean':
|
|
2037
|
-
break;
|
|
2038
|
-
|
|
2039
|
-
case 'object':
|
|
2040
|
-
{
|
|
2041
|
-
if (Array.isArray(arg)) {
|
|
2042
|
-
toAdd = classnames(arg);
|
|
2043
|
-
} else {
|
|
2044
|
-
if (process.env.NODE_ENV !== 'production' && arg.styles !== undefined && arg.name !== undefined) {
|
|
2045
|
-
console.error('You have passed styles created with `css` from `@emotion/react` package to the `cx`.\n' + '`cx` is meant to compose class names (strings) so you should convert those styles to a class name by passing them to the `css` received from <ClassNames/> component.');
|
|
2046
|
-
}
|
|
2047
|
-
|
|
2048
|
-
toAdd = '';
|
|
2049
|
-
|
|
2050
|
-
for (var k in arg) {
|
|
2051
|
-
if (arg[k] && k) {
|
|
2052
|
-
toAdd && (toAdd += ' ');
|
|
2053
|
-
toAdd += k;
|
|
2054
|
-
}
|
|
2055
|
-
}
|
|
2056
|
-
}
|
|
2057
|
-
|
|
2058
|
-
break;
|
|
2059
|
-
}
|
|
2060
|
-
|
|
2061
|
-
default:
|
|
2062
|
-
{
|
|
2063
|
-
toAdd = arg;
|
|
2064
|
-
}
|
|
2065
|
-
}
|
|
2066
|
-
|
|
2067
|
-
if (toAdd) {
|
|
2068
|
-
cls && (cls += ' ');
|
|
2069
|
-
cls += toAdd;
|
|
2070
|
-
}
|
|
2071
|
-
}
|
|
2072
|
-
|
|
2073
|
-
return cls;
|
|
2074
|
-
};
|
|
2075
|
-
|
|
2076
|
-
function merge(registered, css, className) {
|
|
2077
|
-
var registeredStyles = [];
|
|
2078
|
-
var rawClassName = getRegisteredStyles(registered, registeredStyles, className);
|
|
2079
|
-
|
|
2080
|
-
if (registeredStyles.length < 2) {
|
|
2081
|
-
return className;
|
|
2082
|
-
}
|
|
2083
|
-
|
|
2084
|
-
return rawClassName + css(registeredStyles);
|
|
2085
|
-
}
|
|
2086
|
-
|
|
2087
|
-
var Insertion = function Insertion(_ref) {
|
|
2088
|
-
var cache = _ref.cache,
|
|
2089
|
-
serializedArr = _ref.serializedArr;
|
|
2090
|
-
var rules = useInsertionEffectAlwaysWithSyncFallback(function () {
|
|
2091
|
-
var rules = '';
|
|
2092
|
-
|
|
2093
|
-
for (var i = 0; i < serializedArr.length; i++) {
|
|
2094
|
-
var res = insertStyles(cache, serializedArr[i], false);
|
|
2095
|
-
|
|
2096
|
-
if (!isBrowser$1 && res !== undefined) {
|
|
2097
|
-
rules += res;
|
|
2098
|
-
}
|
|
2099
|
-
}
|
|
2100
|
-
|
|
2101
|
-
if (!isBrowser$1) {
|
|
2102
|
-
return rules;
|
|
2103
|
-
}
|
|
2104
|
-
});
|
|
2105
|
-
|
|
2106
|
-
if (!isBrowser$1 && rules.length !== 0) {
|
|
2107
|
-
var _ref2;
|
|
2108
|
-
|
|
2109
|
-
return /*#__PURE__*/React.createElement("style", (_ref2 = {}, _ref2["data-emotion"] = cache.key + " " + serializedArr.map(function (serialized) {
|
|
2110
|
-
return serialized.name;
|
|
2111
|
-
}).join(' '), _ref2.dangerouslySetInnerHTML = {
|
|
2112
|
-
__html: rules
|
|
2113
|
-
}, _ref2.nonce = cache.sheet.nonce, _ref2));
|
|
2114
|
-
}
|
|
2115
|
-
|
|
2116
|
-
return null;
|
|
2117
|
-
};
|
|
2118
|
-
|
|
2119
|
-
var ClassNames = /* #__PURE__ */withEmotionCache(function (props, cache) {
|
|
2120
|
-
var hasRendered = false;
|
|
2121
|
-
var serializedArr = [];
|
|
2122
|
-
|
|
2123
|
-
var css = function css() {
|
|
2124
|
-
if (hasRendered && process.env.NODE_ENV !== 'production') {
|
|
2125
|
-
throw new Error('css can only be used during render');
|
|
2126
|
-
}
|
|
2127
|
-
|
|
2128
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
2129
|
-
args[_key] = arguments[_key];
|
|
2130
|
-
}
|
|
2131
|
-
|
|
2132
|
-
var serialized = serializeStyles(args, cache.registered);
|
|
2133
|
-
serializedArr.push(serialized); // registration has to happen here as the result of this might get consumed by `cx`
|
|
2134
|
-
|
|
2135
|
-
registerStyles(cache, serialized, false);
|
|
2136
|
-
return cache.key + "-" + serialized.name;
|
|
2137
|
-
};
|
|
2138
|
-
|
|
2139
|
-
var cx = function cx() {
|
|
2140
|
-
if (hasRendered && process.env.NODE_ENV !== 'production') {
|
|
2141
|
-
throw new Error('cx can only be used during render');
|
|
2142
|
-
}
|
|
2143
|
-
|
|
2144
|
-
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
2145
|
-
args[_key2] = arguments[_key2];
|
|
2146
|
-
}
|
|
2147
|
-
|
|
2148
|
-
return merge(cache.registered, css, classnames(args));
|
|
2149
|
-
};
|
|
2150
|
-
|
|
2151
|
-
var content = {
|
|
2152
|
-
css: css,
|
|
2153
|
-
cx: cx,
|
|
2154
|
-
theme: React.useContext(ThemeContext)
|
|
2155
|
-
};
|
|
2156
|
-
var ele = props.children(content);
|
|
2157
|
-
hasRendered = true;
|
|
2158
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {
|
|
2159
|
-
cache: cache,
|
|
2160
|
-
serializedArr: serializedArr
|
|
2161
|
-
}), ele);
|
|
2162
|
-
});
|
|
2163
|
-
|
|
2164
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
2165
|
-
ClassNames.displayName = 'EmotionClassNames';
|
|
2166
|
-
}
|
|
2167
|
-
|
|
2168
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
2169
|
-
var isBrowser = typeof document !== 'undefined'; // #1727, #2905 for some reason Jest and Vitest evaluate modules twice if some consuming module gets mocked
|
|
2170
|
-
|
|
2171
|
-
var isTestEnv = typeof jest !== 'undefined' || typeof vi !== 'undefined';
|
|
2172
|
-
|
|
2173
|
-
if (isBrowser && !isTestEnv) {
|
|
2174
|
-
// globalThis has wide browser support - https://caniuse.com/?search=globalThis, Node.js 12 and later
|
|
2175
|
-
var globalContext = // $FlowIgnore
|
|
2176
|
-
typeof globalThis !== 'undefined' ? globalThis // eslint-disable-line no-undef
|
|
2177
|
-
: isBrowser ? window : global;
|
|
2178
|
-
var globalKey = "__EMOTION_REACT_" + pkg.version.split('.')[0] + "__";
|
|
2179
|
-
|
|
2180
|
-
if (globalContext[globalKey]) {
|
|
2181
|
-
console.warn('You are loading @emotion/react when it is already loaded. Running ' + 'multiple instances may cause problems. This can happen if multiple ' + 'versions are used, or if multiple builds of the same version are ' + 'used.');
|
|
2182
|
-
}
|
|
2183
|
-
|
|
2184
|
-
globalContext[globalKey] = true;
|
|
2185
|
-
}
|
|
2186
|
-
}
|
|
2187
|
-
|
|
2188
1511
|
function _taggedTemplateLiteral(strings, raw) {
|
|
2189
1512
|
if (!raw) {
|
|
2190
1513
|
raw = strings.slice(0);
|
|
@@ -2196,16 +1519,6 @@ function _taggedTemplateLiteral(strings, raw) {
|
|
|
2196
1519
|
}));
|
|
2197
1520
|
}
|
|
2198
1521
|
|
|
2199
|
-
function rectToClientRect(rect) {
|
|
2200
|
-
return {
|
|
2201
|
-
...rect,
|
|
2202
|
-
top: rect.y,
|
|
2203
|
-
left: rect.x,
|
|
2204
|
-
right: rect.x + rect.width,
|
|
2205
|
-
bottom: rect.y + rect.height
|
|
2206
|
-
};
|
|
2207
|
-
}
|
|
2208
|
-
|
|
2209
1522
|
function getWindow(node) {
|
|
2210
1523
|
var _node$ownerDocument;
|
|
2211
1524
|
return ((_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
|