@feathery/react 2.12.2 → 2.13.0
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/Form/index.d.ts.map +1 -1
- package/dist/Form/tests/testMocks.d.ts.map +1 -1
- package/dist/cjs/Form/index.d.ts.map +1 -1
- package/dist/cjs/Form/tests/testMocks.d.ts.map +1 -1
- package/dist/cjs/elements/fields/AddressLine1Field/tests/test-utils.d.ts +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +2 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- package/dist/cjs/elements/fields/shared/tests/field-test-utils.d.ts.map +1 -1
- package/dist/cjs/{fthry_FormControl.C6Rjgaho.js → fthry_FormControl.BO9bjqlX.js} +1 -1
- package/dist/cjs/{fthry_InlineTooltip.7d1XAj6X.js → fthry_InlineTooltip.B3M2NtLx.js} +2 -2
- package/dist/cjs/{fthry_Overlay.Bw-JWkvN.js → fthry_Overlay.DZfU9dMV.js} +1 -1
- package/dist/cjs/{fthry_PaymentMethodField.DFPieFTd.js → fthry_PaymentMethodField.CtzJ_h5m.js} +4 -4
- package/dist/cjs/{fthry_Placeholder.DExePn4A.js → fthry_Placeholder.CdsaJ2D6.js} +1 -1
- package/dist/cjs/{fthry_ShowEyeIcon.UMZgA8E5.js → fthry_ShowEyeIcon.C09gRFkG.js} +1 -1
- package/dist/cjs/{fthry_index.xtJFp2c_.js → fthry_index.2aii-Eoi.js} +3 -3
- package/dist/cjs/{fthry_index.RgU7Oxrf.js → fthry_index.A0FK00wY.js} +953 -266
- package/dist/cjs/{fthry_index.NNL4lQSw.js → fthry_index.BCNPmnSd.js} +1 -1
- package/dist/cjs/{fthry_index.Bz0SR10h.js → fthry_index.BESxuxdR.js} +2 -2
- package/dist/cjs/{fthry_index.Di_2sd1H.js → fthry_index.BWmJjQzl.js} +81 -55
- package/dist/cjs/{fthry_index.vmA_xfxy.js → fthry_index.BXZFJcr8.js} +205 -71
- package/dist/cjs/{fthry_index.DMvOdp_W.js → fthry_index.BZfQaHOi.js} +4 -4
- package/dist/cjs/{fthry_index.CioaVxCu.js → fthry_index.Bb3vfxzC.js} +1 -1
- package/dist/cjs/{fthry_index.BnwtRb9Y.js → fthry_index.BfM-DbI1.js} +90 -63
- package/dist/cjs/{fthry_index.CJZrrJii.js → fthry_index.BiC_5x2L.js} +1 -1
- package/dist/cjs/{fthry_index.DE7MeZLB.js → fthry_index.CQcCdJI6.js} +5 -5
- package/dist/cjs/{fthry_index.BsqXL16P.js → fthry_index.D-lcbiWJ.js} +5 -5
- package/dist/cjs/{fthry_index.D1qaLv6Z.js → fthry_index.DOgb27J4.js} +8 -8
- package/dist/cjs/{fthry_index.DX-1RJ2S.js → fthry_index.DPOPtPXQ.js} +6 -6
- package/dist/cjs/{fthry_index.C_3RykNd.js → fthry_index.DT_SgTg-.js} +1 -1
- package/dist/cjs/{fthry_index.Cd5vLcwa.js → fthry_index.DTfr-Vnt.js} +1 -1
- package/dist/cjs/{fthry_index.S5WoB9-i.js → fthry_index.DW9IVHJb.js} +4 -4
- package/dist/cjs/{fthry_index.KdnS_mBc.js → fthry_index.DxGxCc33.js} +2 -2
- package/dist/cjs/{fthry_index.C1oeAVTE.js → fthry_index.OWSxUhAX.js} +5 -5
- package/dist/cjs/{fthry_index.B6Z5Lnk8.js → fthry_index.WJw_Vw9Q.js} +1 -1
- package/dist/cjs/{fthry_index.DZF8XXGF.js → fthry_index.hVfTE92d.js} +4 -4
- package/dist/cjs/{fthry_index.wQoLwNSA.js → fthry_index.ouxRei7V.js} +3 -3
- package/dist/cjs/{fthry_index.YNi32Ez7.js → fthry_index.uqQ_Cltk.js} +6 -6
- package/dist/cjs/{fthry_input.DWFkBuAl.js → fthry_input.BLyTWPfN.js} +1 -1
- package/dist/cjs/{fthry_script.BVLKs7Gs.js → fthry_script.BdFl73Z_.js} +1 -1
- package/dist/cjs/{fthry_styles.B-tC_Abq.js → fthry_styles.DOB8-ODd.js} +1 -1
- package/dist/cjs/{fthry_useElementSize.BepGSP1Z.js → fthry_useElementSize.DUywOCrD.js} +1 -1
- package/dist/cjs/{fthry_useSalesforceSync.DuaHbK7s.js → fthry_useSalesforceSync.DbLXWchO.js} +1 -1
- package/dist/cjs/{fthry_webfontloader.D1tv1rM2.js → fthry_webfontloader.Cdct47q3.js} +1 -1
- package/dist/cjs/index.d.ts +7 -0
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/utils/featheryClient/index.d.ts +6 -0
- package/dist/cjs/utils/featheryClient/index.d.ts.map +1 -1
- package/dist/cjs/utils/formContext.d.ts +7 -0
- package/dist/cjs/utils/formContext.d.ts.map +1 -1
- package/dist/cjs/utils/internalState.d.ts +7 -0
- package/dist/cjs/utils/internalState.d.ts.map +1 -1
- package/dist/esm/Form/index.d.ts.map +1 -1
- package/dist/esm/Form/tests/testMocks.d.ts.map +1 -1
- package/dist/esm/elements/fields/AddressLine1Field/tests/test-utils.d.ts +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +2 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- package/dist/esm/elements/fields/shared/tests/field-test-utils.d.ts.map +1 -1
- package/dist/esm/{fthry_FormControl.D8Kuyg4Y.js → fthry_FormControl.BvGnH-87.js} +1 -1
- package/dist/esm/{fthry_InlineTooltip.DLMOu2tO.js → fthry_InlineTooltip._XWR8H9j.js} +2 -2
- package/dist/esm/{fthry_Overlay.BaulbPVG.js → fthry_Overlay.D9DmeFrz.js} +1 -1
- package/dist/esm/{fthry_PaymentMethodField.E2VJPyju.js → fthry_PaymentMethodField.BazucBHB.js} +4 -4
- package/dist/esm/{fthry_Placeholder.CY1XAzRf.js → fthry_Placeholder.e5AA8C-t.js} +1 -1
- package/dist/esm/{fthry_ShowEyeIcon.CCRFpPxr.js → fthry_ShowEyeIcon.kgLUpaQg.js} +1 -1
- package/dist/esm/{fthry_index.wAyXRBo5.js → fthry_index.4ATtbnmm.js} +161 -27
- package/dist/esm/{fthry_index.CugnxSkX.js → fthry_index.B9a0YrfK.js} +29 -2
- package/dist/esm/{fthry_index.DbMs4N3L.js → fthry_index.BAIiQrTi.js} +2 -2
- package/dist/esm/{fthry_index.Citw-wko.js → fthry_index.BDIDQ2Rc.js} +1 -1
- package/dist/esm/{fthry_index.7vZjIPEz.js → fthry_index.BQpPiOV7.js} +4 -4
- package/dist/esm/{fthry_index.DeT3UyJj.js → fthry_index.Bd3kR2QV.js} +1 -1
- package/dist/esm/{fthry_index.2Gc_lB8n.js → fthry_index.BdEtXrB3.js} +81 -54
- package/dist/esm/{fthry_index.BU4BxoWO.js → fthry_index.Bk0-uDCT.js} +2 -2
- package/dist/esm/{fthry_index.BeT6gsM_.js → fthry_index.C4P9OOd4.js} +6 -6
- package/dist/esm/{fthry_index.nmBpjSD2.js → fthry_index.C4ihBnVo.js} +1 -1
- package/dist/esm/{fthry_index.BgIsKSTD.js → fthry_index.CAANtjPQ.js} +3 -3
- package/dist/esm/{fthry_index.T_eziOjU.js → fthry_index.CE2jHoVu.js} +1 -1
- package/dist/esm/{fthry_index.DjW847uR.js → fthry_index.CFNqwrgS.js} +1 -1
- package/dist/esm/{fthry_index.DsroTnQH.js → fthry_index.C_iKajy7.js} +5 -5
- package/dist/esm/{fthry_index.6qFATni4.js → fthry_index.CmoNTGJT.js} +901 -214
- package/dist/esm/{fthry_index.BBB2dAwJ.js → fthry_index.CqhWNgLs.js} +3 -3
- package/dist/esm/{fthry_index.C90mmtNU.js → fthry_index.CsuXkX00.js} +4 -4
- package/dist/esm/{fthry_index.Ds7JOYLz.js → fthry_index.DBR21ovR.js} +4 -4
- package/dist/esm/{fthry_index.Dy33g5mc.js → fthry_index.DZ8jPN8x.js} +8 -8
- package/dist/esm/{fthry_index.Ca-06RMU.js → fthry_index.Dw0NZrbi.js} +1 -1
- package/dist/esm/{fthry_index.B5ePXkSN.js → fthry_index.DzJ2DAKh.js} +6 -6
- package/dist/esm/{fthry_index.xfj1t0cY.js → fthry_index.P9_s19D0.js} +5 -5
- package/dist/esm/{fthry_index.DIZWok9O.js → fthry_index.jTexg30i.js} +5 -5
- package/dist/esm/{fthry_input.Csm0akqb.js → fthry_input.DimDmT-T.js} +1 -1
- package/dist/esm/{fthry_script.CTK4wksM.js → fthry_script.DJLSdqPw.js} +1 -1
- package/dist/esm/{fthry_styles.BsiM2KXa.js → fthry_styles.CWsf9DMm.js} +1 -1
- package/dist/esm/{fthry_useElementSize.BVooPdxW.js → fthry_useElementSize.5tjp7s48.js} +1 -1
- package/dist/esm/{fthry_useSalesforceSync.DwvbAGUy.js → fthry_useSalesforceSync.Cc24YXja.js} +1 -1
- package/dist/esm/{fthry_webfontloader.oZvuZxan.js → fthry_webfontloader.BGi_I-uY.js} +1 -1
- package/dist/esm/index.d.ts +7 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/utils/featheryClient/index.d.ts +6 -0
- package/dist/esm/utils/featheryClient/index.d.ts.map +1 -1
- package/dist/esm/utils/formContext.d.ts +7 -0
- package/dist/esm/utils/formContext.d.ts.map +1 -1
- package/dist/esm/utils/internalState.d.ts +7 -0
- package/dist/esm/utils/internalState.d.ts.map +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/utils/featheryClient/index.d.ts +6 -0
- package/dist/utils/featheryClient/index.d.ts.map +1 -1
- package/dist/utils/formContext.d.ts +7 -0
- package/dist/utils/formContext.d.ts.map +1 -1
- package/dist/utils/internalState.d.ts +7 -0
- package/dist/utils/internalState.d.ts.map +1 -1
- package/package.json +1 -1
- package/umd/{277.eceeb3ccb6328228b829.js → 277.94ae8bf6190836d1dceb.js} +1 -1
- package/umd/{466.2b6f52440bf8a6ee4f4d.js → 466.e3456c8b3407ad04ba56.js} +1 -1
- package/umd/509.4236d4d76d2fa2ccd971.js +2 -0
- package/umd/{509.f3c5235d7877c09fa946.js.LICENSE.txt → 509.4236d4d76d2fa2ccd971.js.LICENSE.txt} +5 -0
- package/umd/529.2bfdaee9e2bdc6d6c340.js +1 -0
- package/umd/{598.5c0785560cad57f12159.js → 598.ca92da6595afad37b511.js} +2 -2
- package/umd/{664.cce2aa2291d3323521b2.js → 664.42541009d1fcb121cc49.js} +1 -1
- package/umd/{94.3c0a220601820412e21e.js → 94.825cd88111c75098af1f.js} +1 -1
- package/umd/{AddressField.a7ec587f13a326e233de.js → AddressField.3523efd23175117d47a5.js} +1 -1
- package/umd/{ButtonGroupField.8a9cf493f8fb36ce3e85.js → ButtonGroupField.33cf9c939c8e82cc6c83.js} +1 -1
- package/umd/{CheckboxField.c4971d72024558868b02.js → CheckboxField.76c36941e86a62ec518d.js} +1 -1
- package/umd/{CheckboxGroupField.e5319cd7f814f9b626d7.js → CheckboxGroupField.b15705b46268e1142782.js} +1 -1
- package/umd/ColorPickerField.f6740bb7c4c20a520db5.js +1 -0
- package/umd/{CustomField.bf00bb9bdcd732c13171.js → CustomField.a5b2965922f2d170b9b5.js} +1 -1
- package/umd/{DateSelectorField.c193445e11fe4694b07a.js → DateSelectorField.00f321e0b1972feb9d69.js} +1 -1
- package/umd/{DropdownField.7081f67b0a39c49f1f3f.js → DropdownField.856b041871278f98e687.js} +1 -1
- package/umd/{DropdownMultiField.d2dc345e7bd0e32e76a7.js → DropdownMultiField.898572b300ad673a38c9.js} +1 -1
- package/umd/{FileUploadField.f51a675776b2947e79fa.js → FileUploadField.ea0067dd62b0454b7c2e.js} +1 -1
- package/umd/{MatrixField.007d30b45d438c773db7.js → MatrixField.f8624f3e59b21e04f368.js} +1 -1
- package/umd/{PasswordField.2147c784135a9369040c.js → PasswordField.1358356d6fbc6880f12a.js} +1 -1
- package/umd/{PaymentMethodField.a84c467c428712681821.js → PaymentMethodField.9a8e934f7450eb141217.js} +1 -1
- package/umd/{PhoneField.d43a22b1a4d92c618614.js → PhoneField.f52b5de44614b445feeb.js} +1 -1
- package/umd/{PinInputField.0f9ca456b79a9cdf2506.js → PinInputField.b1aee0ef9d3c9f9a1933.js} +1 -1
- package/umd/{QRScanner.5865f88b4a09f5e78c5b.js → QRScanner.3c22391de30dba001f13.js} +1 -1
- package/umd/{RadioButtonGroupField.7d81efb2ddc169916443.js → RadioButtonGroupField.38d62523106149c48f2e.js} +1 -1
- package/umd/{RatingField.104fa779291cd91ca8bc.js → RatingField.eeeb0ac499c308c120ba.js} +1 -1
- package/umd/{SignatureField.2cd57db4b52690a9650b.js → SignatureField.1b502b1edb19e4af3b64.js} +1 -1
- package/umd/{SliderField.b99f5928f7c1eaa08c3d.js → SliderField.a5ab58e4b89fa67d6ac6.js} +1 -1
- package/umd/{TextArea.0b440106b5f5a341ed74.js → TextArea.f566845d458d4c00e0e7.js} +1 -1
- package/umd/{TextField.9238b4371b974d4defd4.js → TextField.5a5296fe3ea60c4459f2.js} +1 -1
- package/umd/index.js +1 -1
- package/dist/cjs/fthry_floating-ui.utils.D2KLOgYj.js +0 -155
- package/dist/cjs/fthry_objectWithoutPropertiesLoose.BeCY0BVl.js +0 -32
- package/dist/esm/fthry_floating-ui.utils.tNaL8PGX.js +0 -136
- package/dist/esm/fthry_objectWithoutPropertiesLoose.BBpbdDOs.js +0 -29
- package/umd/509.f3c5235d7877c09fa946.js +0 -2
- package/umd/529.be48502b696e9179c151.js +0 -1
- package/umd/ColorPickerField.38edc699a89e4266e489.js +0 -1
- /package/umd/{598.5c0785560cad57f12159.js.LICENSE.txt → 598.ca92da6595afad37b511.js.LICENSE.txt} +0 -0
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index$1 = require('./fthry_index.
|
|
3
|
+
var index$1 = require('./fthry_index.BWmJjQzl.js');
|
|
4
4
|
var React = require('react');
|
|
5
|
-
var InlineTooltip = require('./fthry_InlineTooltip.
|
|
6
|
-
var Placeholder$2 = require('./fthry_Placeholder.
|
|
7
|
-
var useSalesforceSync = require('./fthry_useSalesforceSync.
|
|
8
|
-
var Overlay = require('./fthry_Overlay.
|
|
9
|
-
var objectWithoutPropertiesLoose = require('./fthry_objectWithoutPropertiesLoose.BeCY0BVl.js');
|
|
5
|
+
var InlineTooltip = require('./fthry_InlineTooltip.B3M2NtLx.js');
|
|
6
|
+
var Placeholder$2 = require('./fthry_Placeholder.CdsaJ2D6.js');
|
|
7
|
+
var useSalesforceSync = require('./fthry_useSalesforceSync.DbLXWchO.js');
|
|
8
|
+
var Overlay = require('./fthry_Overlay.DZfU9dMV.js');
|
|
10
9
|
var ReactDOM = require('react-dom');
|
|
11
|
-
var floatingUi_utils = require('./fthry_floating-ui.utils.D2KLOgYj.js');
|
|
12
10
|
require('react/jsx-runtime');
|
|
13
11
|
require('react-dom/client');
|
|
14
12
|
require('jszip');
|
|
@@ -113,9 +111,7 @@ function _iterableToArrayLimit(arr, i) {
|
|
|
113
111
|
if (_x = (_i = _i.call(arr)).next, 0 === i) {
|
|
114
112
|
if (Object(_i) !== _i) return;
|
|
115
113
|
_n = !1;
|
|
116
|
-
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0)
|
|
117
|
-
;
|
|
118
|
-
}
|
|
114
|
+
} else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
|
|
119
115
|
} catch (err) {
|
|
120
116
|
_d = true, _e = err;
|
|
121
117
|
} finally {
|
|
@@ -131,9 +127,7 @@ function _iterableToArrayLimit(arr, i) {
|
|
|
131
127
|
|
|
132
128
|
function _arrayLikeToArray(arr, len) {
|
|
133
129
|
if (len == null || len > arr.length) len = arr.length;
|
|
134
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
135
|
-
arr2[i] = arr[i];
|
|
136
|
-
}
|
|
130
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
137
131
|
return arr2;
|
|
138
132
|
}
|
|
139
133
|
|
|
@@ -154,9 +148,22 @@ function _slicedToArray(arr, i) {
|
|
|
154
148
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
155
149
|
}
|
|
156
150
|
|
|
151
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
152
|
+
if (source == null) return {};
|
|
153
|
+
var target = {};
|
|
154
|
+
var sourceKeys = Object.keys(source);
|
|
155
|
+
var key, i;
|
|
156
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
157
|
+
key = sourceKeys[i];
|
|
158
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
159
|
+
target[key] = source[key];
|
|
160
|
+
}
|
|
161
|
+
return target;
|
|
162
|
+
}
|
|
163
|
+
|
|
157
164
|
function _objectWithoutProperties(source, excluded) {
|
|
158
165
|
if (source == null) return {};
|
|
159
|
-
var target =
|
|
166
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
160
167
|
var key, i;
|
|
161
168
|
if (Object.getOwnPropertySymbols) {
|
|
162
169
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -237,6 +244,21 @@ function useStateManager(_ref) {
|
|
|
237
244
|
});
|
|
238
245
|
}
|
|
239
246
|
|
|
247
|
+
function _extends() {
|
|
248
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
249
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
250
|
+
var source = arguments[i];
|
|
251
|
+
for (var key in source) {
|
|
252
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
253
|
+
target[key] = source[key];
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
return target;
|
|
258
|
+
};
|
|
259
|
+
return _extends.apply(this, arguments);
|
|
260
|
+
}
|
|
261
|
+
|
|
240
262
|
function _classCallCheck(instance, Constructor) {
|
|
241
263
|
if (!(instance instanceof Constructor)) {
|
|
242
264
|
throw new TypeError("Cannot call a class as a function");
|
|
@@ -352,7 +374,175 @@ function _toConsumableArray(arr) {
|
|
|
352
374
|
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
353
375
|
}
|
|
354
376
|
|
|
355
|
-
|
|
377
|
+
/*
|
|
378
|
+
|
|
379
|
+
Based off glamor's StyleSheet, thanks Sunil ❤️
|
|
380
|
+
|
|
381
|
+
high performance StyleSheet for css-in-js systems
|
|
382
|
+
|
|
383
|
+
- uses multiple style tags behind the scenes for millions of rules
|
|
384
|
+
- uses `insertRule` for appending in production for *much* faster performance
|
|
385
|
+
|
|
386
|
+
// usage
|
|
387
|
+
|
|
388
|
+
import { StyleSheet } from '@emotion/sheet'
|
|
389
|
+
|
|
390
|
+
let styleSheet = new StyleSheet({ key: '', container: document.head })
|
|
391
|
+
|
|
392
|
+
styleSheet.insert('#box { border: 1px solid red; }')
|
|
393
|
+
- appends a css rule into the stylesheet
|
|
394
|
+
|
|
395
|
+
styleSheet.flush()
|
|
396
|
+
- empties the stylesheet of all its contents
|
|
397
|
+
|
|
398
|
+
*/
|
|
399
|
+
// $FlowFixMe
|
|
400
|
+
function sheetForTag(tag) {
|
|
401
|
+
if (tag.sheet) {
|
|
402
|
+
// $FlowFixMe
|
|
403
|
+
return tag.sheet;
|
|
404
|
+
} // this weirdness brought to you by firefox
|
|
405
|
+
|
|
406
|
+
/* istanbul ignore next */
|
|
407
|
+
|
|
408
|
+
|
|
409
|
+
for (var i = 0; i < document.styleSheets.length; i++) {
|
|
410
|
+
if (document.styleSheets[i].ownerNode === tag) {
|
|
411
|
+
// $FlowFixMe
|
|
412
|
+
return document.styleSheets[i];
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
function createStyleElement(options) {
|
|
418
|
+
var tag = document.createElement('style');
|
|
419
|
+
tag.setAttribute('data-emotion', options.key);
|
|
420
|
+
|
|
421
|
+
if (options.nonce !== undefined) {
|
|
422
|
+
tag.setAttribute('nonce', options.nonce);
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
tag.appendChild(document.createTextNode(''));
|
|
426
|
+
tag.setAttribute('data-s', '');
|
|
427
|
+
return tag;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
var StyleSheet = /*#__PURE__*/function () {
|
|
431
|
+
// Using Node instead of HTMLElement since container may be a ShadowRoot
|
|
432
|
+
function StyleSheet(options) {
|
|
433
|
+
var _this = this;
|
|
434
|
+
|
|
435
|
+
this._insertTag = function (tag) {
|
|
436
|
+
var before;
|
|
437
|
+
|
|
438
|
+
if (_this.tags.length === 0) {
|
|
439
|
+
if (_this.insertionPoint) {
|
|
440
|
+
before = _this.insertionPoint.nextSibling;
|
|
441
|
+
} else if (_this.prepend) {
|
|
442
|
+
before = _this.container.firstChild;
|
|
443
|
+
} else {
|
|
444
|
+
before = _this.before;
|
|
445
|
+
}
|
|
446
|
+
} else {
|
|
447
|
+
before = _this.tags[_this.tags.length - 1].nextSibling;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
_this.container.insertBefore(tag, before);
|
|
451
|
+
|
|
452
|
+
_this.tags.push(tag);
|
|
453
|
+
};
|
|
454
|
+
|
|
455
|
+
this.isSpeedy = options.speedy === undefined ? process.env.NODE_ENV === 'production' : options.speedy;
|
|
456
|
+
this.tags = [];
|
|
457
|
+
this.ctr = 0;
|
|
458
|
+
this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets
|
|
459
|
+
|
|
460
|
+
this.key = options.key;
|
|
461
|
+
this.container = options.container;
|
|
462
|
+
this.prepend = options.prepend;
|
|
463
|
+
this.insertionPoint = options.insertionPoint;
|
|
464
|
+
this.before = null;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
var _proto = StyleSheet.prototype;
|
|
468
|
+
|
|
469
|
+
_proto.hydrate = function hydrate(nodes) {
|
|
470
|
+
nodes.forEach(this._insertTag);
|
|
471
|
+
};
|
|
472
|
+
|
|
473
|
+
_proto.insert = function insert(rule) {
|
|
474
|
+
// the max length is how many rules we have per style tag, it's 65000 in speedy mode
|
|
475
|
+
// it's 1 in dev because we insert source maps that map a single rule to a location
|
|
476
|
+
// and you can only have one source map per style tag
|
|
477
|
+
if (this.ctr % (this.isSpeedy ? 65000 : 1) === 0) {
|
|
478
|
+
this._insertTag(createStyleElement(this));
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
var tag = this.tags[this.tags.length - 1];
|
|
482
|
+
|
|
483
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
484
|
+
var isImportRule = rule.charCodeAt(0) === 64 && rule.charCodeAt(1) === 105;
|
|
485
|
+
|
|
486
|
+
if (isImportRule && this._alreadyInsertedOrderInsensitiveRule) {
|
|
487
|
+
// this would only cause problem in speedy mode
|
|
488
|
+
// but we don't want enabling speedy to affect the observable behavior
|
|
489
|
+
// so we report this error at all times
|
|
490
|
+
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.');
|
|
491
|
+
}
|
|
492
|
+
this._alreadyInsertedOrderInsensitiveRule = this._alreadyInsertedOrderInsensitiveRule || !isImportRule;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
if (this.isSpeedy) {
|
|
496
|
+
var sheet = sheetForTag(tag);
|
|
497
|
+
|
|
498
|
+
try {
|
|
499
|
+
// this is the ultrafast version, works across browsers
|
|
500
|
+
// the big drawback is that the css won't be editable in devtools
|
|
501
|
+
sheet.insertRule(rule, sheet.cssRules.length);
|
|
502
|
+
} catch (e) {
|
|
503
|
+
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)) {
|
|
504
|
+
console.error("There was a problem inserting the following rule: \"" + rule + "\"", e);
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
} else {
|
|
508
|
+
tag.appendChild(document.createTextNode(rule));
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
this.ctr++;
|
|
512
|
+
};
|
|
513
|
+
|
|
514
|
+
_proto.flush = function flush() {
|
|
515
|
+
// $FlowFixMe
|
|
516
|
+
this.tags.forEach(function (tag) {
|
|
517
|
+
return tag.parentNode && tag.parentNode.removeChild(tag);
|
|
518
|
+
});
|
|
519
|
+
this.tags = [];
|
|
520
|
+
this.ctr = 0;
|
|
521
|
+
|
|
522
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
523
|
+
this._alreadyInsertedOrderInsensitiveRule = false;
|
|
524
|
+
}
|
|
525
|
+
};
|
|
526
|
+
|
|
527
|
+
return StyleSheet;
|
|
528
|
+
}();
|
|
529
|
+
|
|
530
|
+
var weakMemoize = function weakMemoize(func) {
|
|
531
|
+
// $FlowFixMe flow doesn't include all non-primitive types as allowed for weakmaps
|
|
532
|
+
var cache = new WeakMap();
|
|
533
|
+
return function (arg) {
|
|
534
|
+
if (cache.has(arg)) {
|
|
535
|
+
// $FlowFixMe
|
|
536
|
+
return cache.get(arg);
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
var ret = func(arg);
|
|
540
|
+
cache.set(arg, ret);
|
|
541
|
+
return ret;
|
|
542
|
+
};
|
|
543
|
+
};
|
|
544
|
+
|
|
545
|
+
function memoize$1(fn) {
|
|
356
546
|
var cache = Object.create(null);
|
|
357
547
|
return function (arg) {
|
|
358
548
|
if (cache[arg] === undefined) cache[arg] = fn(arg);
|
|
@@ -360,8 +550,6 @@ function memoize(fn) {
|
|
|
360
550
|
};
|
|
361
551
|
}
|
|
362
552
|
|
|
363
|
-
var isBrowser$3 = typeof document !== 'undefined';
|
|
364
|
-
|
|
365
553
|
var identifierWithPointTracking = function identifierWithPointTracking(begin, points, index) {
|
|
366
554
|
var previous = 0;
|
|
367
555
|
var character = 0;
|
|
@@ -486,6 +674,114 @@ var removeLabel = function removeLabel(element) {
|
|
|
486
674
|
}
|
|
487
675
|
}
|
|
488
676
|
};
|
|
677
|
+
var ignoreFlag = 'emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason';
|
|
678
|
+
|
|
679
|
+
var isIgnoringComment = function isIgnoringComment(element) {
|
|
680
|
+
return element.type === 'comm' && element.children.indexOf(ignoreFlag) > -1;
|
|
681
|
+
};
|
|
682
|
+
|
|
683
|
+
var createUnsafeSelectorsAlarm = function createUnsafeSelectorsAlarm(cache) {
|
|
684
|
+
return function (element, index, children) {
|
|
685
|
+
if (element.type !== 'rule' || cache.compat) return;
|
|
686
|
+
var unsafePseudoClasses = element.value.match(/(:first|:nth|:nth-last)-child/g);
|
|
687
|
+
|
|
688
|
+
if (unsafePseudoClasses) {
|
|
689
|
+
var isNested = !!element.parent; // in nested rules comments become children of the "auto-inserted" rule and that's always the `element.parent`
|
|
690
|
+
//
|
|
691
|
+
// considering this input:
|
|
692
|
+
// .a {
|
|
693
|
+
// .b /* comm */ {}
|
|
694
|
+
// color: hotpink;
|
|
695
|
+
// }
|
|
696
|
+
// we get output corresponding to this:
|
|
697
|
+
// .a {
|
|
698
|
+
// & {
|
|
699
|
+
// /* comm */
|
|
700
|
+
// color: hotpink;
|
|
701
|
+
// }
|
|
702
|
+
// .b {}
|
|
703
|
+
// }
|
|
704
|
+
|
|
705
|
+
var commentContainer = isNested ? element.parent.children : // global rule at the root level
|
|
706
|
+
children;
|
|
707
|
+
|
|
708
|
+
for (var i = commentContainer.length - 1; i >= 0; i--) {
|
|
709
|
+
var node = commentContainer[i];
|
|
710
|
+
|
|
711
|
+
if (node.line < element.line) {
|
|
712
|
+
break;
|
|
713
|
+
} // it is quite weird but comments are *usually* put at `column: element.column - 1`
|
|
714
|
+
// so we seek *from the end* for the node that is earlier than the rule's `element` and check that
|
|
715
|
+
// this will also match inputs like this:
|
|
716
|
+
// .a {
|
|
717
|
+
// /* comm */
|
|
718
|
+
// .b {}
|
|
719
|
+
// }
|
|
720
|
+
//
|
|
721
|
+
// but that is fine
|
|
722
|
+
//
|
|
723
|
+
// it would be the easiest to change the placement of the comment to be the first child of the rule:
|
|
724
|
+
// .a {
|
|
725
|
+
// .b { /* comm */ }
|
|
726
|
+
// }
|
|
727
|
+
// with such inputs we wouldn't have to search for the comment at all
|
|
728
|
+
// TODO: consider changing this comment placement in the next major version
|
|
729
|
+
|
|
730
|
+
|
|
731
|
+
if (node.column < element.column) {
|
|
732
|
+
if (isIgnoringComment(node)) {
|
|
733
|
+
return;
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
break;
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
unsafePseudoClasses.forEach(function (unsafePseudoClass) {
|
|
741
|
+
console.error("The pseudo class \"" + unsafePseudoClass + "\" is potentially unsafe when doing server-side rendering. Try changing it to \"" + unsafePseudoClass.split('-child')[0] + "-of-type\".");
|
|
742
|
+
});
|
|
743
|
+
}
|
|
744
|
+
};
|
|
745
|
+
};
|
|
746
|
+
|
|
747
|
+
var isImportRule = function isImportRule(element) {
|
|
748
|
+
return element.type.charCodeAt(1) === 105 && element.type.charCodeAt(0) === 64;
|
|
749
|
+
};
|
|
750
|
+
|
|
751
|
+
var isPrependedWithRegularRules = function isPrependedWithRegularRules(index, children) {
|
|
752
|
+
for (var i = index - 1; i >= 0; i--) {
|
|
753
|
+
if (!isImportRule(children[i])) {
|
|
754
|
+
return true;
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
return false;
|
|
759
|
+
}; // use this to remove incorrect elements from further processing
|
|
760
|
+
// so they don't get handed to the `sheet` (or anything else)
|
|
761
|
+
// as that could potentially lead to additional logs which in turn could be overhelming to the user
|
|
762
|
+
|
|
763
|
+
|
|
764
|
+
var nullifyElement = function nullifyElement(element) {
|
|
765
|
+
element.type = '';
|
|
766
|
+
element.value = '';
|
|
767
|
+
element["return"] = '';
|
|
768
|
+
element.children = '';
|
|
769
|
+
element.props = '';
|
|
770
|
+
};
|
|
771
|
+
|
|
772
|
+
var incorrectImportAlarm = function incorrectImportAlarm(element, index, children) {
|
|
773
|
+
if (!isImportRule(element)) {
|
|
774
|
+
return;
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
if (element.parent) {
|
|
778
|
+
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.");
|
|
779
|
+
nullifyElement(element);
|
|
780
|
+
} else if (isPrependedWithRegularRules(index, children)) {
|
|
781
|
+
console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules.");
|
|
782
|
+
nullifyElement(element);
|
|
783
|
+
}
|
|
784
|
+
};
|
|
489
785
|
|
|
490
786
|
/* eslint-disable no-fallthrough */
|
|
491
787
|
|
|
@@ -699,22 +995,9 @@ var prefixer = function prefixer(element, index, children, callback) {
|
|
|
699
995
|
}
|
|
700
996
|
};
|
|
701
997
|
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
export type Options = {
|
|
706
|
-
nonce?: string,
|
|
707
|
-
stylisPlugins?: StylisPlugin[],
|
|
708
|
-
key: string,
|
|
709
|
-
container?: HTMLElement,
|
|
710
|
-
speedy?: boolean,
|
|
711
|
-
prepend?: boolean,
|
|
712
|
-
insertionPoint?: HTMLElement
|
|
713
|
-
}
|
|
714
|
-
*/
|
|
715
|
-
|
|
716
|
-
var getServerStylisCache = isBrowser$3 ? undefined : index$1.weakMemoize(function () {
|
|
717
|
-
return memoize(function () {
|
|
998
|
+
var isBrowser$4 = typeof document !== 'undefined';
|
|
999
|
+
var getServerStylisCache = isBrowser$4 ? undefined : weakMemoize(function () {
|
|
1000
|
+
return memoize$1(function () {
|
|
718
1001
|
var cache = {};
|
|
719
1002
|
return function (name) {
|
|
720
1003
|
return cache[name];
|
|
@@ -723,22 +1006,20 @@ var getServerStylisCache = isBrowser$3 ? undefined : index$1.weakMemoize(functio
|
|
|
723
1006
|
});
|
|
724
1007
|
var defaultStylisPlugins = [prefixer];
|
|
725
1008
|
|
|
726
|
-
var createCache = function
|
|
727
|
-
/*: EmotionCache */
|
|
728
|
-
createCache(options
|
|
729
|
-
/*: Options */
|
|
730
|
-
) {
|
|
1009
|
+
var createCache = function createCache(options) {
|
|
731
1010
|
var key = options.key;
|
|
732
1011
|
|
|
733
|
-
if (
|
|
1012
|
+
if (process.env.NODE_ENV !== 'production' && !key) {
|
|
1013
|
+
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.");
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
if (isBrowser$4 && key === 'css') {
|
|
734
1017
|
var ssrStyles = document.querySelectorAll("style[data-emotion]:not([data-s])"); // get SSRed styles out of the way of React's hydration
|
|
735
1018
|
// document.head is a safe place to move them to(though note document.head is not necessarily the last place they will be)
|
|
736
1019
|
// note this very very intentionally targets all style elements regardless of the key to ensure
|
|
737
1020
|
// that creating a cache works inside of render of a React component
|
|
738
1021
|
|
|
739
|
-
Array.prototype.forEach.call(ssrStyles, function (node
|
|
740
|
-
/*: HTMLStyleElement */
|
|
741
|
-
) {
|
|
1022
|
+
Array.prototype.forEach.call(ssrStyles, function (node) {
|
|
742
1023
|
// we want to only move elements which have a space in the data-emotion attribute value
|
|
743
1024
|
// because that indicates that it is an Emotion 11 server-side rendered style elements
|
|
744
1025
|
// while we will already ignore Emotion 11 client-side inserted styles because of the :not([data-s]) part in the selector
|
|
@@ -750,7 +1031,6 @@ createCache(options
|
|
|
750
1031
|
if (dataEmotionAttribute.indexOf(' ') === -1) {
|
|
751
1032
|
return;
|
|
752
1033
|
}
|
|
753
|
-
|
|
754
1034
|
document.head.appendChild(node);
|
|
755
1035
|
node.setAttribute('data-s', '');
|
|
756
1036
|
});
|
|
@@ -758,20 +1038,23 @@ createCache(options
|
|
|
758
1038
|
|
|
759
1039
|
var stylisPlugins = options.stylisPlugins || defaultStylisPlugins;
|
|
760
1040
|
|
|
1041
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1042
|
+
// $FlowFixMe
|
|
1043
|
+
if (/[^a-z-]/.test(key)) {
|
|
1044
|
+
throw new Error("Emotion key must only contain lower case alphabetical characters and - but \"" + key + "\" was passed");
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
|
|
761
1048
|
var inserted = {};
|
|
762
1049
|
var container;
|
|
763
|
-
/* : Node */
|
|
764
|
-
|
|
765
1050
|
var nodesToHydrate = [];
|
|
766
1051
|
|
|
767
|
-
if (isBrowser$
|
|
1052
|
+
if (isBrowser$4) {
|
|
768
1053
|
container = options.container || document.head;
|
|
769
1054
|
Array.prototype.forEach.call( // this means we will ignore elements which don't have a space in them which
|
|
770
1055
|
// means that the style elements we're looking at are only Emotion 11 server-rendered style elements
|
|
771
|
-
document.querySelectorAll("style[data-emotion^=\"" + key + " \"]"), function (node
|
|
772
|
-
|
|
773
|
-
) {
|
|
774
|
-
var attrib = node.getAttribute("data-emotion").split(' ');
|
|
1056
|
+
document.querySelectorAll("style[data-emotion^=\"" + key + " \"]"), function (node) {
|
|
1057
|
+
var attrib = node.getAttribute("data-emotion").split(' '); // $FlowFixMe
|
|
775
1058
|
|
|
776
1059
|
for (var i = 1; i < attrib.length; i++) {
|
|
777
1060
|
inserted[attrib[i]] = true;
|
|
@@ -782,19 +1065,31 @@ createCache(options
|
|
|
782
1065
|
}
|
|
783
1066
|
|
|
784
1067
|
var _insert;
|
|
785
|
-
/*: (
|
|
786
|
-
selector: string,
|
|
787
|
-
serialized: SerializedStyles,
|
|
788
|
-
sheet: StyleSheet,
|
|
789
|
-
shouldCache: boolean
|
|
790
|
-
) => string | void */
|
|
791
|
-
|
|
792
1068
|
|
|
793
1069
|
var omnipresentPlugins = [compat, removeLabel];
|
|
794
1070
|
|
|
795
|
-
if (
|
|
1071
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1072
|
+
omnipresentPlugins.push(createUnsafeSelectorsAlarm({
|
|
1073
|
+
get compat() {
|
|
1074
|
+
return cache.compat;
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
}), incorrectImportAlarm);
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
if (isBrowser$4) {
|
|
796
1081
|
var currentSheet;
|
|
797
|
-
var finalizingPlugins = [index$1.stringify,
|
|
1082
|
+
var finalizingPlugins = [index$1.stringify, process.env.NODE_ENV !== 'production' ? function (element) {
|
|
1083
|
+
if (!element.root) {
|
|
1084
|
+
if (element["return"]) {
|
|
1085
|
+
currentSheet.insert(element["return"]);
|
|
1086
|
+
} else if (element.value && element.type !== index$1.COMMENT) {
|
|
1087
|
+
// insert empty rule in non-production environments
|
|
1088
|
+
// so @emotion/jest can grab `key` from the (JS)DOM for caches without any rules inserted yet
|
|
1089
|
+
currentSheet.insert(element.value + "{}");
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
} : index$1.rulesheet(function (rule) {
|
|
798
1093
|
currentSheet.insert(rule);
|
|
799
1094
|
})];
|
|
800
1095
|
var serializer = index$1.middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));
|
|
@@ -803,19 +1098,17 @@ createCache(options
|
|
|
803
1098
|
return index$1.serialize(index$1.compile(styles), serializer);
|
|
804
1099
|
};
|
|
805
1100
|
|
|
806
|
-
_insert = function
|
|
807
|
-
/*: void */
|
|
808
|
-
insert(selector
|
|
809
|
-
/*: string */
|
|
810
|
-
, serialized
|
|
811
|
-
/*: SerializedStyles */
|
|
812
|
-
, sheet
|
|
813
|
-
/*: StyleSheet */
|
|
814
|
-
, shouldCache
|
|
815
|
-
/*: boolean */
|
|
816
|
-
) {
|
|
1101
|
+
_insert = function insert(selector, serialized, sheet, shouldCache) {
|
|
817
1102
|
currentSheet = sheet;
|
|
818
1103
|
|
|
1104
|
+
if (process.env.NODE_ENV !== 'production' && serialized.map !== undefined) {
|
|
1105
|
+
currentSheet = {
|
|
1106
|
+
insert: function insert(rule) {
|
|
1107
|
+
sheet.insert(rule + serialized.map);
|
|
1108
|
+
}
|
|
1109
|
+
};
|
|
1110
|
+
}
|
|
1111
|
+
|
|
819
1112
|
stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles);
|
|
820
1113
|
|
|
821
1114
|
if (shouldCache) {
|
|
@@ -829,17 +1122,12 @@ createCache(options
|
|
|
829
1122
|
|
|
830
1123
|
var _stylis = function _stylis(styles) {
|
|
831
1124
|
return index$1.serialize(index$1.compile(styles), _serializer);
|
|
832
|
-
};
|
|
1125
|
+
}; // $FlowFixMe
|
|
1126
|
+
|
|
833
1127
|
|
|
834
1128
|
var serverStylisCache = getServerStylisCache(stylisPlugins)(key);
|
|
835
1129
|
|
|
836
|
-
var getRules = function
|
|
837
|
-
/*: string */
|
|
838
|
-
getRules(selector
|
|
839
|
-
/*: string */
|
|
840
|
-
, serialized
|
|
841
|
-
/*: SerializedStyles */
|
|
842
|
-
) {
|
|
1130
|
+
var getRules = function getRules(selector, serialized) {
|
|
843
1131
|
var name = serialized.name;
|
|
844
1132
|
|
|
845
1133
|
if (serverStylisCache[name] === undefined) {
|
|
@@ -849,17 +1137,7 @@ createCache(options
|
|
|
849
1137
|
return serverStylisCache[name];
|
|
850
1138
|
};
|
|
851
1139
|
|
|
852
|
-
_insert = function
|
|
853
|
-
/*: string | void */
|
|
854
|
-
_insert(selector
|
|
855
|
-
/*: string */
|
|
856
|
-
, serialized
|
|
857
|
-
/*: SerializedStyles */
|
|
858
|
-
, sheet
|
|
859
|
-
/*: StyleSheet */
|
|
860
|
-
, shouldCache
|
|
861
|
-
/*: boolean */
|
|
862
|
-
) {
|
|
1140
|
+
_insert = function _insert(selector, serialized, sheet, shouldCache) {
|
|
863
1141
|
var name = serialized.name;
|
|
864
1142
|
var rules = getRules(selector, serialized);
|
|
865
1143
|
|
|
@@ -871,6 +1149,12 @@ createCache(options
|
|
|
871
1149
|
cache.inserted[name] = true;
|
|
872
1150
|
}
|
|
873
1151
|
|
|
1152
|
+
if ( // using === development instead of !== production
|
|
1153
|
+
// because if people do ssr in tests, the source maps showing up would be annoying
|
|
1154
|
+
process.env.NODE_ENV === 'development' && serialized.map !== undefined) {
|
|
1155
|
+
return rules + serialized.map;
|
|
1156
|
+
}
|
|
1157
|
+
|
|
874
1158
|
return rules;
|
|
875
1159
|
} else {
|
|
876
1160
|
// in compat mode, we put the styles on the inserted cache so
|
|
@@ -889,11 +1173,9 @@ createCache(options
|
|
|
889
1173
|
};
|
|
890
1174
|
}
|
|
891
1175
|
|
|
892
|
-
var cache
|
|
893
|
-
/*: EmotionCache */
|
|
894
|
-
= {
|
|
1176
|
+
var cache = {
|
|
895
1177
|
key: key,
|
|
896
|
-
sheet: new
|
|
1178
|
+
sheet: new StyleSheet({
|
|
897
1179
|
key: key,
|
|
898
1180
|
container: container,
|
|
899
1181
|
nonce: options.nonce,
|
|
@@ -910,8 +1192,7 @@ createCache(options
|
|
|
910
1192
|
return cache;
|
|
911
1193
|
};
|
|
912
1194
|
|
|
913
|
-
var isBrowser$
|
|
914
|
-
|
|
1195
|
+
var isBrowser$3 = typeof document !== 'undefined';
|
|
915
1196
|
function getRegisteredStyles(registered, registeredStyles, classNames) {
|
|
916
1197
|
var rawClassName = '';
|
|
917
1198
|
classNames.split(' ').forEach(function (className) {
|
|
@@ -935,7 +1216,7 @@ var registerStyles = function registerStyles(cache, serialized, isStringTag) {
|
|
|
935
1216
|
// in node since emotion-server relies on whether a style is in
|
|
936
1217
|
// the registered cache to know whether a style is global or not
|
|
937
1218
|
// also, note that this check will be dead code eliminated in the browser
|
|
938
|
-
isBrowser$
|
|
1219
|
+
isBrowser$3 === false && cache.compat !== undefined) && cache.registered[className] === undefined) {
|
|
939
1220
|
cache.registered[className] = serialized.styles;
|
|
940
1221
|
}
|
|
941
1222
|
};
|
|
@@ -950,14 +1231,14 @@ var insertStyles = function insertStyles(cache, serialized, isStringTag) {
|
|
|
950
1231
|
do {
|
|
951
1232
|
var maybeStyles = cache.insert(serialized === current ? "." + className : '', current, cache.sheet, true);
|
|
952
1233
|
|
|
953
|
-
if (!isBrowser$
|
|
1234
|
+
if (!isBrowser$3 && maybeStyles !== undefined) {
|
|
954
1235
|
stylesForSSR += maybeStyles;
|
|
955
1236
|
}
|
|
956
1237
|
|
|
957
1238
|
current = current.next;
|
|
958
1239
|
} while (current !== undefined);
|
|
959
1240
|
|
|
960
|
-
if (!isBrowser$
|
|
1241
|
+
if (!isBrowser$3 && stylesForSSR.length !== 0) {
|
|
961
1242
|
return stylesForSSR;
|
|
962
1243
|
}
|
|
963
1244
|
}
|
|
@@ -1067,6 +1348,16 @@ var unitlessKeys = {
|
|
|
1067
1348
|
strokeWidth: 1
|
|
1068
1349
|
};
|
|
1069
1350
|
|
|
1351
|
+
function memoize(fn) {
|
|
1352
|
+
var cache = Object.create(null);
|
|
1353
|
+
return function (arg) {
|
|
1354
|
+
if (cache[arg] === undefined) cache[arg] = fn(arg);
|
|
1355
|
+
return cache[arg];
|
|
1356
|
+
};
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1359
|
+
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";
|
|
1360
|
+
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).";
|
|
1070
1361
|
var hyphenateRegex = /[A-Z]|^ms/g;
|
|
1071
1362
|
var animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;
|
|
1072
1363
|
|
|
@@ -1107,16 +1398,47 @@ var processStyleValue = function processStyleValue(key, value) {
|
|
|
1107
1398
|
return value;
|
|
1108
1399
|
};
|
|
1109
1400
|
|
|
1401
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1402
|
+
var contentValuePattern = /(var|attr|counters?|url|element|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/;
|
|
1403
|
+
var contentValues = ['normal', 'none', 'initial', 'inherit', 'unset'];
|
|
1404
|
+
var oldProcessStyleValue = processStyleValue;
|
|
1405
|
+
var msPattern = /^-ms-/;
|
|
1406
|
+
var hyphenPattern = /-(.)/g;
|
|
1407
|
+
var hyphenatedCache = {};
|
|
1408
|
+
|
|
1409
|
+
processStyleValue = function processStyleValue(key, value) {
|
|
1410
|
+
if (key === 'content') {
|
|
1411
|
+
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) !== "'")) {
|
|
1412
|
+
throw new Error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"" + value + "\"'`");
|
|
1413
|
+
}
|
|
1414
|
+
}
|
|
1415
|
+
|
|
1416
|
+
var processed = oldProcessStyleValue(key, value);
|
|
1417
|
+
|
|
1418
|
+
if (processed !== '' && !isCustomProperty(key) && key.indexOf('-') !== -1 && hyphenatedCache[key] === undefined) {
|
|
1419
|
+
hyphenatedCache[key] = true;
|
|
1420
|
+
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) {
|
|
1421
|
+
return _char.toUpperCase();
|
|
1422
|
+
}) + "?");
|
|
1423
|
+
}
|
|
1424
|
+
|
|
1425
|
+
return processed;
|
|
1426
|
+
};
|
|
1427
|
+
}
|
|
1428
|
+
|
|
1429
|
+
var noComponentSelectorMessage = 'Component selectors can only be used in conjunction with ' + '@emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware ' + 'compiler transform.';
|
|
1430
|
+
|
|
1110
1431
|
function handleInterpolation(mergedProps, registered, interpolation) {
|
|
1111
1432
|
if (interpolation == null) {
|
|
1112
1433
|
return '';
|
|
1113
1434
|
}
|
|
1114
1435
|
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1436
|
+
if (interpolation.__emotion_styles !== undefined) {
|
|
1437
|
+
if (process.env.NODE_ENV !== 'production' && interpolation.toString() === 'NO_COMPONENT_SELECTOR') {
|
|
1438
|
+
throw new Error(noComponentSelectorMessage);
|
|
1439
|
+
}
|
|
1118
1440
|
|
|
1119
|
-
return
|
|
1441
|
+
return interpolation;
|
|
1120
1442
|
}
|
|
1121
1443
|
|
|
1122
1444
|
switch (typeof interpolation) {
|
|
@@ -1127,21 +1449,17 @@ function handleInterpolation(mergedProps, registered, interpolation) {
|
|
|
1127
1449
|
|
|
1128
1450
|
case 'object':
|
|
1129
1451
|
{
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
if (keyframes.anim === 1) {
|
|
1452
|
+
if (interpolation.anim === 1) {
|
|
1133
1453
|
cursor = {
|
|
1134
|
-
name:
|
|
1135
|
-
styles:
|
|
1454
|
+
name: interpolation.name,
|
|
1455
|
+
styles: interpolation.styles,
|
|
1136
1456
|
next: cursor
|
|
1137
1457
|
};
|
|
1138
|
-
return
|
|
1458
|
+
return interpolation.name;
|
|
1139
1459
|
}
|
|
1140
1460
|
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
if (serializedStyles.styles !== undefined) {
|
|
1144
|
-
var next = serializedStyles.next;
|
|
1461
|
+
if (interpolation.styles !== undefined) {
|
|
1462
|
+
var next = interpolation.next;
|
|
1145
1463
|
|
|
1146
1464
|
if (next !== undefined) {
|
|
1147
1465
|
// not the most efficient thing ever but this is a pretty rare case
|
|
@@ -1156,7 +1474,11 @@ function handleInterpolation(mergedProps, registered, interpolation) {
|
|
|
1156
1474
|
}
|
|
1157
1475
|
}
|
|
1158
1476
|
|
|
1159
|
-
var styles =
|
|
1477
|
+
var styles = interpolation.styles + ";";
|
|
1478
|
+
|
|
1479
|
+
if (process.env.NODE_ENV !== 'production' && interpolation.map !== undefined) {
|
|
1480
|
+
styles += interpolation.map;
|
|
1481
|
+
}
|
|
1160
1482
|
|
|
1161
1483
|
return styles;
|
|
1162
1484
|
}
|
|
@@ -1171,18 +1493,37 @@ function handleInterpolation(mergedProps, registered, interpolation) {
|
|
|
1171
1493
|
var result = interpolation(mergedProps);
|
|
1172
1494
|
cursor = previousCursor;
|
|
1173
1495
|
return handleInterpolation(mergedProps, registered, result);
|
|
1496
|
+
} else if (process.env.NODE_ENV !== 'production') {
|
|
1497
|
+
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}`");
|
|
1174
1498
|
}
|
|
1175
1499
|
|
|
1176
1500
|
break;
|
|
1177
1501
|
}
|
|
1178
|
-
} // finalize string values (regular strings and functions interpolated into css calls)
|
|
1179
1502
|
|
|
1503
|
+
case 'string':
|
|
1504
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1505
|
+
var matched = [];
|
|
1506
|
+
var replaced = interpolation.replace(animationRegex, function (match, p1, p2) {
|
|
1507
|
+
var fakeVarName = "animation" + matched.length;
|
|
1508
|
+
matched.push("const " + fakeVarName + " = keyframes`" + p2.replace(/^@keyframes animation-\w+/, '') + "`");
|
|
1509
|
+
return "${" + fakeVarName + "}";
|
|
1510
|
+
});
|
|
1511
|
+
|
|
1512
|
+
if (matched.length) {
|
|
1513
|
+
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 + "`"));
|
|
1514
|
+
}
|
|
1515
|
+
}
|
|
1180
1516
|
|
|
1181
|
-
|
|
1517
|
+
break;
|
|
1518
|
+
} // finalize string values (regular strings and functions interpolated into css calls)
|
|
1182
1519
|
|
|
1183
|
-
|
|
1184
|
-
|
|
1520
|
+
|
|
1521
|
+
if (registered == null) {
|
|
1522
|
+
return interpolation;
|
|
1185
1523
|
}
|
|
1524
|
+
|
|
1525
|
+
var cached = registered[interpolation];
|
|
1526
|
+
return cached !== undefined ? cached : interpolation;
|
|
1186
1527
|
}
|
|
1187
1528
|
|
|
1188
1529
|
function createStringFromObject(mergedProps, registered, obj) {
|
|
@@ -1193,38 +1534,44 @@ function createStringFromObject(mergedProps, registered, obj) {
|
|
|
1193
1534
|
string += handleInterpolation(mergedProps, registered, obj[i]) + ";";
|
|
1194
1535
|
}
|
|
1195
1536
|
} else {
|
|
1196
|
-
for (var
|
|
1197
|
-
var value = obj[
|
|
1537
|
+
for (var _key in obj) {
|
|
1538
|
+
var value = obj[_key];
|
|
1198
1539
|
|
|
1199
1540
|
if (typeof value !== 'object') {
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
if (isProcessableValue(
|
|
1203
|
-
string += processStyleName(
|
|
1541
|
+
if (registered != null && registered[value] !== undefined) {
|
|
1542
|
+
string += _key + "{" + registered[value] + "}";
|
|
1543
|
+
} else if (isProcessableValue(value)) {
|
|
1544
|
+
string += processStyleName(_key) + ":" + processStyleValue(_key, value) + ";";
|
|
1204
1545
|
}
|
|
1205
1546
|
} else {
|
|
1547
|
+
if (_key === 'NO_COMPONENT_SELECTOR' && process.env.NODE_ENV !== 'production') {
|
|
1548
|
+
throw new Error(noComponentSelectorMessage);
|
|
1549
|
+
}
|
|
1206
1550
|
|
|
1207
|
-
if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null)) {
|
|
1551
|
+
if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null || registered[value[0]] === undefined)) {
|
|
1208
1552
|
for (var _i = 0; _i < value.length; _i++) {
|
|
1209
1553
|
if (isProcessableValue(value[_i])) {
|
|
1210
|
-
string += processStyleName(
|
|
1554
|
+
string += processStyleName(_key) + ":" + processStyleValue(_key, value[_i]) + ";";
|
|
1211
1555
|
}
|
|
1212
1556
|
}
|
|
1213
1557
|
} else {
|
|
1214
1558
|
var interpolated = handleInterpolation(mergedProps, registered, value);
|
|
1215
1559
|
|
|
1216
|
-
switch (
|
|
1560
|
+
switch (_key) {
|
|
1217
1561
|
case 'animation':
|
|
1218
1562
|
case 'animationName':
|
|
1219
1563
|
{
|
|
1220
|
-
string += processStyleName(
|
|
1564
|
+
string += processStyleName(_key) + ":" + interpolated + ";";
|
|
1221
1565
|
break;
|
|
1222
1566
|
}
|
|
1223
1567
|
|
|
1224
1568
|
default:
|
|
1225
1569
|
{
|
|
1570
|
+
if (process.env.NODE_ENV !== 'production' && _key === 'undefined') {
|
|
1571
|
+
console.error(UNDEFINED_AS_OBJECT_KEY_ERROR);
|
|
1572
|
+
}
|
|
1226
1573
|
|
|
1227
|
-
string +=
|
|
1574
|
+
string += _key + "{" + interpolated + "}";
|
|
1228
1575
|
}
|
|
1229
1576
|
}
|
|
1230
1577
|
}
|
|
@@ -1236,11 +1583,16 @@ function createStringFromObject(mergedProps, registered, obj) {
|
|
|
1236
1583
|
}
|
|
1237
1584
|
|
|
1238
1585
|
var labelPattern = /label:\s*([^\s;\n{]+)\s*(;|$)/g;
|
|
1586
|
+
var sourceMapPattern;
|
|
1587
|
+
|
|
1588
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1589
|
+
sourceMapPattern = /\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g;
|
|
1590
|
+
} // this is the cursor for keyframes
|
|
1239
1591
|
// keyframes are stored on the SerializedStyles object as a linked list
|
|
1240
1592
|
|
|
1241
1593
|
|
|
1242
1594
|
var cursor;
|
|
1243
|
-
function serializeStyles(args, registered, mergedProps) {
|
|
1595
|
+
var serializeStyles = function serializeStyles(args, registered, mergedProps) {
|
|
1244
1596
|
if (args.length === 1 && typeof args[0] === 'object' && args[0] !== null && args[0].styles !== undefined) {
|
|
1245
1597
|
return args[0];
|
|
1246
1598
|
}
|
|
@@ -1254,9 +1606,11 @@ function serializeStyles(args, registered, mergedProps) {
|
|
|
1254
1606
|
stringMode = false;
|
|
1255
1607
|
styles += handleInterpolation(mergedProps, registered, strings);
|
|
1256
1608
|
} else {
|
|
1257
|
-
|
|
1609
|
+
if (process.env.NODE_ENV !== 'production' && strings[0] === undefined) {
|
|
1610
|
+
console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);
|
|
1611
|
+
}
|
|
1258
1612
|
|
|
1259
|
-
styles +=
|
|
1613
|
+
styles += strings[0];
|
|
1260
1614
|
} // we start at 1 since we've already handled the first arg
|
|
1261
1615
|
|
|
1262
1616
|
|
|
@@ -1264,45 +1618,69 @@ function serializeStyles(args, registered, mergedProps) {
|
|
|
1264
1618
|
styles += handleInterpolation(mergedProps, registered, args[i]);
|
|
1265
1619
|
|
|
1266
1620
|
if (stringMode) {
|
|
1267
|
-
|
|
1621
|
+
if (process.env.NODE_ENV !== 'production' && strings[i] === undefined) {
|
|
1622
|
+
console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);
|
|
1623
|
+
}
|
|
1268
1624
|
|
|
1269
|
-
styles +=
|
|
1625
|
+
styles += strings[i];
|
|
1270
1626
|
}
|
|
1271
1627
|
}
|
|
1272
1628
|
|
|
1629
|
+
var sourceMap;
|
|
1630
|
+
|
|
1631
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1632
|
+
styles = styles.replace(sourceMapPattern, function (match) {
|
|
1633
|
+
sourceMap = match;
|
|
1634
|
+
return '';
|
|
1635
|
+
});
|
|
1636
|
+
} // using a global regex with .exec is stateful so lastIndex has to be reset each time
|
|
1637
|
+
|
|
1273
1638
|
|
|
1274
1639
|
labelPattern.lastIndex = 0;
|
|
1275
1640
|
var identifierName = '';
|
|
1276
1641
|
var match; // https://esbench.com/bench/5b809c2cf2949800a0f61fb5
|
|
1277
1642
|
|
|
1278
1643
|
while ((match = labelPattern.exec(styles)) !== null) {
|
|
1279
|
-
identifierName += '-' +
|
|
1644
|
+
identifierName += '-' + // $FlowFixMe we know it's not null
|
|
1645
|
+
match[1];
|
|
1280
1646
|
}
|
|
1281
1647
|
|
|
1282
1648
|
var name = murmur2(styles) + identifierName;
|
|
1283
1649
|
|
|
1650
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1651
|
+
// $FlowFixMe SerializedStyles type doesn't have toString property (and we don't want to add it)
|
|
1652
|
+
return {
|
|
1653
|
+
name: name,
|
|
1654
|
+
styles: styles,
|
|
1655
|
+
map: sourceMap,
|
|
1656
|
+
next: cursor,
|
|
1657
|
+
toString: function toString() {
|
|
1658
|
+
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).";
|
|
1659
|
+
}
|
|
1660
|
+
};
|
|
1661
|
+
}
|
|
1662
|
+
|
|
1284
1663
|
return {
|
|
1285
1664
|
name: name,
|
|
1286
1665
|
styles: styles,
|
|
1287
1666
|
next: cursor
|
|
1288
1667
|
};
|
|
1289
|
-
}
|
|
1668
|
+
};
|
|
1290
1669
|
|
|
1291
|
-
var isBrowser$
|
|
1670
|
+
var isBrowser$2 = typeof document !== 'undefined';
|
|
1292
1671
|
|
|
1293
1672
|
var syncFallback = function syncFallback(create) {
|
|
1294
1673
|
return create();
|
|
1295
1674
|
};
|
|
1296
1675
|
|
|
1297
1676
|
var useInsertionEffect = React__namespace['useInsertion' + 'Effect'] ? React__namespace['useInsertion' + 'Effect'] : false;
|
|
1298
|
-
var useInsertionEffectAlwaysWithSyncFallback = !isBrowser$
|
|
1677
|
+
var useInsertionEffectAlwaysWithSyncFallback = !isBrowser$2 ? syncFallback : useInsertionEffect || syncFallback;
|
|
1678
|
+
var useInsertionEffectWithLayoutFallback = useInsertionEffect || React__namespace.useLayoutEffect;
|
|
1299
1679
|
|
|
1300
|
-
var isBrowser = typeof document !== 'undefined';
|
|
1680
|
+
var isBrowser$1 = typeof document !== 'undefined';
|
|
1681
|
+
var hasOwnProperty = {}.hasOwnProperty;
|
|
1301
1682
|
|
|
1302
|
-
/*
|
|
1303
|
-
var EmotionCacheContext
|
|
1304
|
-
/*: React.Context<EmotionCache | null> */
|
|
1305
|
-
= /* #__PURE__ */React__namespace.createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case
|
|
1683
|
+
var EmotionCacheContext = /* #__PURE__ */React__namespace.createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case
|
|
1306
1684
|
// because this module is primarily intended for the browser and node
|
|
1307
1685
|
// but it's also required in react native and similar environments sometimes
|
|
1308
1686
|
// and we could have a special build just for that
|
|
@@ -1312,37 +1690,24 @@ typeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache({
|
|
|
1312
1690
|
key: 'css'
|
|
1313
1691
|
}) : null);
|
|
1314
1692
|
|
|
1693
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1694
|
+
EmotionCacheContext.displayName = 'EmotionCacheContext';
|
|
1695
|
+
}
|
|
1696
|
+
|
|
1315
1697
|
EmotionCacheContext.Provider;
|
|
1316
1698
|
|
|
1317
|
-
var withEmotionCache = function withEmotionCache
|
|
1318
|
-
|
|
1319
|
-
(
|
|
1320
|
-
/*: (props: Props, cache: EmotionCache, ref: Ref) => React.Node */
|
|
1321
|
-
)
|
|
1322
|
-
/*: React.AbstractComponent<Props> */
|
|
1323
|
-
{
|
|
1324
|
-
return /*#__PURE__*/React.forwardRef(function (props
|
|
1325
|
-
/*: Props */
|
|
1326
|
-
, ref
|
|
1327
|
-
/*: Ref */
|
|
1328
|
-
) {
|
|
1699
|
+
var withEmotionCache = function withEmotionCache(func) {
|
|
1700
|
+
// $FlowFixMe
|
|
1701
|
+
return /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
1329
1702
|
// the cache will never be null in the browser
|
|
1330
1703
|
var cache = React.useContext(EmotionCacheContext);
|
|
1331
1704
|
return func(props, cache, ref);
|
|
1332
1705
|
});
|
|
1333
1706
|
};
|
|
1334
1707
|
|
|
1335
|
-
if (!isBrowser) {
|
|
1336
|
-
withEmotionCache = function withEmotionCache
|
|
1337
|
-
|
|
1338
|
-
(func
|
|
1339
|
-
/*: (props: Props, cache: EmotionCache) => React.Node */
|
|
1340
|
-
)
|
|
1341
|
-
/*: React.StatelessFunctionalComponent<Props> */
|
|
1342
|
-
{
|
|
1343
|
-
return function (props
|
|
1344
|
-
/*: Props */
|
|
1345
|
-
) {
|
|
1708
|
+
if (!isBrowser$1) {
|
|
1709
|
+
withEmotionCache = function withEmotionCache(func) {
|
|
1710
|
+
return function (props) {
|
|
1346
1711
|
var cache = React.useContext(EmotionCacheContext);
|
|
1347
1712
|
|
|
1348
1713
|
if (cache === null) {
|
|
@@ -1366,31 +1731,81 @@ if (!isBrowser) {
|
|
|
1366
1731
|
|
|
1367
1732
|
var ThemeContext = /* #__PURE__ */React__namespace.createContext({});
|
|
1368
1733
|
|
|
1369
|
-
|
|
1734
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1735
|
+
ThemeContext.displayName = 'EmotionThemeContext';
|
|
1736
|
+
}
|
|
1737
|
+
|
|
1738
|
+
var getLastPart = function getLastPart(functionName) {
|
|
1739
|
+
// The match may be something like 'Object.createEmotionProps' or
|
|
1740
|
+
// 'Loader.prototype.render'
|
|
1741
|
+
var parts = functionName.split('.');
|
|
1742
|
+
return parts[parts.length - 1];
|
|
1743
|
+
};
|
|
1744
|
+
|
|
1745
|
+
var getFunctionNameFromStackTraceLine = function getFunctionNameFromStackTraceLine(line) {
|
|
1746
|
+
// V8
|
|
1747
|
+
var match = /^\s+at\s+([A-Za-z0-9$.]+)\s/.exec(line);
|
|
1748
|
+
if (match) return getLastPart(match[1]); // Safari / Firefox
|
|
1749
|
+
|
|
1750
|
+
match = /^([A-Za-z0-9$.]+)@/.exec(line);
|
|
1751
|
+
if (match) return getLastPart(match[1]);
|
|
1752
|
+
return undefined;
|
|
1753
|
+
};
|
|
1754
|
+
|
|
1755
|
+
var internalReactFunctionNames = /* #__PURE__ */new Set(['renderWithHooks', 'processChild', 'finishClassComponent', 'renderToString']); // These identifiers come from error stacks, so they have to be valid JS
|
|
1756
|
+
// identifiers, thus we only need to replace what is a valid character for JS,
|
|
1757
|
+
// but not for CSS.
|
|
1758
|
+
|
|
1759
|
+
var sanitizeIdentifier = function sanitizeIdentifier(identifier) {
|
|
1760
|
+
return identifier.replace(/\$/g, '-');
|
|
1761
|
+
};
|
|
1762
|
+
|
|
1763
|
+
var getLabelFromStackTrace = function getLabelFromStackTrace(stackTrace) {
|
|
1764
|
+
if (!stackTrace) return undefined;
|
|
1765
|
+
var lines = stackTrace.split('\n');
|
|
1766
|
+
|
|
1767
|
+
for (var i = 0; i < lines.length; i++) {
|
|
1768
|
+
var functionName = getFunctionNameFromStackTraceLine(lines[i]); // The first line of V8 stack traces is just "Error"
|
|
1769
|
+
|
|
1770
|
+
if (!functionName) continue; // If we reach one of these, we have gone too far and should quit
|
|
1771
|
+
|
|
1772
|
+
if (internalReactFunctionNames.has(functionName)) break; // The component name is the first function in the stack that starts with an
|
|
1773
|
+
// uppercase letter
|
|
1774
|
+
|
|
1775
|
+
if (/^[A-Z]/.test(functionName)) return sanitizeIdentifier(functionName);
|
|
1776
|
+
}
|
|
1777
|
+
|
|
1778
|
+
return undefined;
|
|
1779
|
+
};
|
|
1370
1780
|
|
|
1371
1781
|
var typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';
|
|
1372
|
-
var
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
)
|
|
1782
|
+
var labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__';
|
|
1783
|
+
var createEmotionProps = function createEmotionProps(type, props) {
|
|
1784
|
+
if (process.env.NODE_ENV !== 'production' && typeof props.css === 'string' && // check if there is a css declaration
|
|
1785
|
+
props.css.indexOf(':') !== -1) {
|
|
1786
|
+
throw new Error("Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/react' like this: css`" + props.css + "`");
|
|
1787
|
+
}
|
|
1377
1788
|
|
|
1378
|
-
var newProps
|
|
1379
|
-
/*: any */
|
|
1380
|
-
= {};
|
|
1789
|
+
var newProps = {};
|
|
1381
1790
|
|
|
1382
1791
|
for (var key in props) {
|
|
1383
|
-
if (
|
|
1792
|
+
if (hasOwnProperty.call(props, key)) {
|
|
1384
1793
|
newProps[key] = props[key];
|
|
1385
1794
|
}
|
|
1386
1795
|
}
|
|
1387
1796
|
|
|
1388
|
-
newProps[typePropName] = type; //
|
|
1797
|
+
newProps[typePropName] = type; // For performance, only call getLabelFromStackTrace in development and when
|
|
1798
|
+
// the label hasn't already been computed
|
|
1799
|
+
|
|
1800
|
+
if (process.env.NODE_ENV !== 'production' && !!props.css && (typeof props.css !== 'object' || typeof props.css.name !== 'string' || props.css.name.indexOf('-') === -1)) {
|
|
1801
|
+
var label = getLabelFromStackTrace(new Error().stack);
|
|
1802
|
+
if (label) newProps[labelPropName] = label;
|
|
1803
|
+
}
|
|
1389
1804
|
|
|
1390
1805
|
return newProps;
|
|
1391
1806
|
};
|
|
1392
1807
|
|
|
1393
|
-
var Insertion = function Insertion(_ref) {
|
|
1808
|
+
var Insertion$1 = function Insertion(_ref) {
|
|
1394
1809
|
var cache = _ref.cache,
|
|
1395
1810
|
serialized = _ref.serialized,
|
|
1396
1811
|
isStringTag = _ref.isStringTag;
|
|
@@ -1399,7 +1814,7 @@ var Insertion = function Insertion(_ref) {
|
|
|
1399
1814
|
return insertStyles(cache, serialized, isStringTag);
|
|
1400
1815
|
});
|
|
1401
1816
|
|
|
1402
|
-
if (!isBrowser && rules !== undefined) {
|
|
1817
|
+
if (!isBrowser$1 && rules !== undefined) {
|
|
1403
1818
|
var _ref2;
|
|
1404
1819
|
|
|
1405
1820
|
var serializedNames = serialized.name;
|
|
@@ -1418,9 +1833,7 @@ var Insertion = function Insertion(_ref) {
|
|
|
1418
1833
|
return null;
|
|
1419
1834
|
};
|
|
1420
1835
|
|
|
1421
|
-
var Emotion = /* #__PURE__ */withEmotionCache(
|
|
1422
|
-
/* <any, any> */
|
|
1423
|
-
function (props, cache, ref) {
|
|
1836
|
+
var Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {
|
|
1424
1837
|
var cssProp = props.css; // so that using `css` from `emotion` and passing the result to the css prop works
|
|
1425
1838
|
// not passing the registered cache to serializeStyles because it would
|
|
1426
1839
|
// make certain babel optimisations not possible
|
|
@@ -1441,42 +1854,46 @@ function (props, cache, ref) {
|
|
|
1441
1854
|
|
|
1442
1855
|
var serialized = serializeStyles(registeredStyles, undefined, React__namespace.useContext(ThemeContext));
|
|
1443
1856
|
|
|
1857
|
+
if (process.env.NODE_ENV !== 'production' && serialized.name.indexOf('-') === -1) {
|
|
1858
|
+
var labelFromStack = props[labelPropName];
|
|
1859
|
+
|
|
1860
|
+
if (labelFromStack) {
|
|
1861
|
+
serialized = serializeStyles([serialized, 'label:' + labelFromStack + ';']);
|
|
1862
|
+
}
|
|
1863
|
+
}
|
|
1864
|
+
|
|
1444
1865
|
className += cache.key + "-" + serialized.name;
|
|
1445
1866
|
var newProps = {};
|
|
1446
1867
|
|
|
1447
1868
|
for (var key in props) {
|
|
1448
|
-
if (
|
|
1869
|
+
if (hasOwnProperty.call(props, key) && key !== 'css' && key !== typePropName && (process.env.NODE_ENV === 'production' || key !== labelPropName)) {
|
|
1449
1870
|
newProps[key] = props[key];
|
|
1450
1871
|
}
|
|
1451
1872
|
}
|
|
1452
1873
|
|
|
1874
|
+
newProps.ref = ref;
|
|
1453
1875
|
newProps.className = className;
|
|
1454
|
-
|
|
1455
|
-
if (ref) {
|
|
1456
|
-
newProps.ref = ref;
|
|
1457
|
-
}
|
|
1458
|
-
|
|
1459
|
-
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(Insertion, {
|
|
1876
|
+
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(Insertion$1, {
|
|
1460
1877
|
cache: cache,
|
|
1461
1878
|
serialized: serialized,
|
|
1462
1879
|
isStringTag: typeof WrappedComponent === 'string'
|
|
1463
1880
|
}), /*#__PURE__*/React__namespace.createElement(WrappedComponent, newProps));
|
|
1464
1881
|
});
|
|
1465
1882
|
|
|
1883
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1884
|
+
Emotion.displayName = 'EmotionCssPropInternal';
|
|
1885
|
+
}
|
|
1886
|
+
|
|
1466
1887
|
var Emotion$1 = Emotion;
|
|
1467
1888
|
|
|
1468
|
-
var
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
(type
|
|
1473
|
-
/*: React.ElementType */
|
|
1474
|
-
, props
|
|
1475
|
-
/*: Object */
|
|
1476
|
-
) {
|
|
1889
|
+
var pkg = {
|
|
1890
|
+
version: "11.11.1"};
|
|
1891
|
+
|
|
1892
|
+
var jsx = function jsx(type, props) {
|
|
1477
1893
|
var args = arguments;
|
|
1478
1894
|
|
|
1479
|
-
if (props == null || !
|
|
1895
|
+
if (props == null || !hasOwnProperty.call(props, 'css')) {
|
|
1896
|
+
// $FlowFixMe
|
|
1480
1897
|
return React__namespace.createElement.apply(undefined, args);
|
|
1481
1898
|
}
|
|
1482
1899
|
|
|
@@ -1487,16 +1904,123 @@ var jsx
|
|
|
1487
1904
|
|
|
1488
1905
|
for (var i = 2; i < argsLength; i++) {
|
|
1489
1906
|
createElementArgArray[i] = args[i];
|
|
1490
|
-
}
|
|
1907
|
+
} // $FlowFixMe
|
|
1908
|
+
|
|
1491
1909
|
|
|
1492
1910
|
return React__namespace.createElement.apply(null, createElementArgArray);
|
|
1493
1911
|
};
|
|
1494
1912
|
|
|
1495
|
-
|
|
1913
|
+
var warnedAboutCssPropForGlobal = false; // maintain place over rerenders.
|
|
1914
|
+
// initial render from browser, insertBefore context.sheet.tags[0] or if a style hasn't been inserted there yet, appendChild
|
|
1915
|
+
// initial client-side render from SSR, use place of hydrating tag
|
|
1916
|
+
|
|
1917
|
+
var Global = /* #__PURE__ */withEmotionCache(function (props, cache) {
|
|
1918
|
+
if (process.env.NODE_ENV !== 'production' && !warnedAboutCssPropForGlobal && ( // check for className as well since the user is
|
|
1919
|
+
// probably using the custom createElement which
|
|
1920
|
+
// means it will be turned into a className prop
|
|
1921
|
+
// $FlowFixMe I don't really want to add it to the type since it shouldn't be used
|
|
1922
|
+
props.className || props.css)) {
|
|
1923
|
+
console.error("It looks like you're using the css prop on Global, did you mean to use the styles prop instead?");
|
|
1924
|
+
warnedAboutCssPropForGlobal = true;
|
|
1925
|
+
}
|
|
1926
|
+
|
|
1927
|
+
var styles = props.styles;
|
|
1928
|
+
var serialized = serializeStyles([styles], undefined, React__namespace.useContext(ThemeContext));
|
|
1929
|
+
|
|
1930
|
+
if (!isBrowser$1) {
|
|
1931
|
+
var _ref;
|
|
1932
|
+
|
|
1933
|
+
var serializedNames = serialized.name;
|
|
1934
|
+
var serializedStyles = serialized.styles;
|
|
1935
|
+
var next = serialized.next;
|
|
1936
|
+
|
|
1937
|
+
while (next !== undefined) {
|
|
1938
|
+
serializedNames += ' ' + next.name;
|
|
1939
|
+
serializedStyles += next.styles;
|
|
1940
|
+
next = next.next;
|
|
1941
|
+
}
|
|
1942
|
+
|
|
1943
|
+
var shouldCache = cache.compat === true;
|
|
1944
|
+
var rules = cache.insert("", {
|
|
1945
|
+
name: serializedNames,
|
|
1946
|
+
styles: serializedStyles
|
|
1947
|
+
}, cache.sheet, shouldCache);
|
|
1948
|
+
|
|
1949
|
+
if (shouldCache) {
|
|
1950
|
+
return null;
|
|
1951
|
+
}
|
|
1952
|
+
|
|
1953
|
+
return /*#__PURE__*/React__namespace.createElement("style", (_ref = {}, _ref["data-emotion"] = cache.key + "-global " + serializedNames, _ref.dangerouslySetInnerHTML = {
|
|
1954
|
+
__html: rules
|
|
1955
|
+
}, _ref.nonce = cache.sheet.nonce, _ref));
|
|
1956
|
+
} // yes, i know these hooks are used conditionally
|
|
1957
|
+
// but it is based on a constant that will never change at runtime
|
|
1958
|
+
// it's effectively like having two implementations and switching them out
|
|
1959
|
+
// so it's not actually breaking anything
|
|
1960
|
+
|
|
1961
|
+
|
|
1962
|
+
var sheetRef = React__namespace.useRef();
|
|
1963
|
+
useInsertionEffectWithLayoutFallback(function () {
|
|
1964
|
+
var key = cache.key + "-global"; // use case of https://github.com/emotion-js/emotion/issues/2675
|
|
1965
|
+
|
|
1966
|
+
var sheet = new cache.sheet.constructor({
|
|
1967
|
+
key: key,
|
|
1968
|
+
nonce: cache.sheet.nonce,
|
|
1969
|
+
container: cache.sheet.container,
|
|
1970
|
+
speedy: cache.sheet.isSpeedy
|
|
1971
|
+
});
|
|
1972
|
+
var rehydrating = false; // $FlowFixMe
|
|
1973
|
+
|
|
1974
|
+
var node = document.querySelector("style[data-emotion=\"" + key + " " + serialized.name + "\"]");
|
|
1975
|
+
|
|
1976
|
+
if (cache.sheet.tags.length) {
|
|
1977
|
+
sheet.before = cache.sheet.tags[0];
|
|
1978
|
+
}
|
|
1979
|
+
|
|
1980
|
+
if (node !== null) {
|
|
1981
|
+
rehydrating = true; // clear the hash so this node won't be recognizable as rehydratable by other <Global/>s
|
|
1982
|
+
|
|
1983
|
+
node.setAttribute('data-emotion', key);
|
|
1984
|
+
sheet.hydrate([node]);
|
|
1985
|
+
}
|
|
1986
|
+
|
|
1987
|
+
sheetRef.current = [sheet, rehydrating];
|
|
1988
|
+
return function () {
|
|
1989
|
+
sheet.flush();
|
|
1990
|
+
};
|
|
1991
|
+
}, [cache]);
|
|
1992
|
+
useInsertionEffectWithLayoutFallback(function () {
|
|
1993
|
+
var sheetRefCurrent = sheetRef.current;
|
|
1994
|
+
var sheet = sheetRefCurrent[0],
|
|
1995
|
+
rehydrating = sheetRefCurrent[1];
|
|
1996
|
+
|
|
1997
|
+
if (rehydrating) {
|
|
1998
|
+
sheetRefCurrent[1] = false;
|
|
1999
|
+
return;
|
|
2000
|
+
}
|
|
2001
|
+
|
|
2002
|
+
if (serialized.next !== undefined) {
|
|
2003
|
+
// insert keyframes
|
|
2004
|
+
insertStyles(cache, serialized.next, true);
|
|
2005
|
+
}
|
|
2006
|
+
|
|
2007
|
+
if (sheet.tags.length) {
|
|
2008
|
+
// if this doesn't exist then it will be null so the style element will be appended
|
|
2009
|
+
var element = sheet.tags[sheet.tags.length - 1].nextElementSibling;
|
|
2010
|
+
sheet.before = element;
|
|
2011
|
+
sheet.flush();
|
|
2012
|
+
}
|
|
2013
|
+
|
|
2014
|
+
cache.insert("", serialized, sheet, false);
|
|
2015
|
+
}, [cache, serialized.name]);
|
|
2016
|
+
return null;
|
|
2017
|
+
});
|
|
2018
|
+
|
|
2019
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2020
|
+
Global.displayName = 'EmotionGlobal';
|
|
2021
|
+
}
|
|
1496
2022
|
|
|
1497
|
-
function css$2()
|
|
1498
|
-
/*: SerializedStyles */
|
|
1499
|
-
{
|
|
2023
|
+
function css$2() {
|
|
1500
2024
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
1501
2025
|
args[_key] = arguments[_key];
|
|
1502
2026
|
}
|
|
@@ -1504,20 +2028,10 @@ function css$2()
|
|
|
1504
2028
|
return serializeStyles(args);
|
|
1505
2029
|
}
|
|
1506
2030
|
|
|
1507
|
-
|
|
1508
|
-
type Keyframes = {|
|
|
1509
|
-
name: string,
|
|
1510
|
-
styles: string,
|
|
1511
|
-
anim: 1,
|
|
1512
|
-
toString: () => string
|
|
1513
|
-
|} & string
|
|
1514
|
-
*/
|
|
1515
|
-
|
|
1516
|
-
var keyframes = function
|
|
1517
|
-
/*: Keyframes */
|
|
1518
|
-
keyframes() {
|
|
2031
|
+
var keyframes = function keyframes() {
|
|
1519
2032
|
var insertable = css$2.apply(void 0, arguments);
|
|
1520
|
-
var name = "animation-" + insertable.name;
|
|
2033
|
+
var name = "animation-" + insertable.name; // $FlowFixMe
|
|
2034
|
+
|
|
1521
2035
|
return {
|
|
1522
2036
|
name: name,
|
|
1523
2037
|
styles: "@keyframes " + name + "{" + insertable.styles + "}",
|
|
@@ -1528,6 +2042,169 @@ keyframes() {
|
|
|
1528
2042
|
};
|
|
1529
2043
|
};
|
|
1530
2044
|
|
|
2045
|
+
var classnames = function classnames(args) {
|
|
2046
|
+
var len = args.length;
|
|
2047
|
+
var i = 0;
|
|
2048
|
+
var cls = '';
|
|
2049
|
+
|
|
2050
|
+
for (; i < len; i++) {
|
|
2051
|
+
var arg = args[i];
|
|
2052
|
+
if (arg == null) continue;
|
|
2053
|
+
var toAdd = void 0;
|
|
2054
|
+
|
|
2055
|
+
switch (typeof arg) {
|
|
2056
|
+
case 'boolean':
|
|
2057
|
+
break;
|
|
2058
|
+
|
|
2059
|
+
case 'object':
|
|
2060
|
+
{
|
|
2061
|
+
if (Array.isArray(arg)) {
|
|
2062
|
+
toAdd = classnames(arg);
|
|
2063
|
+
} else {
|
|
2064
|
+
if (process.env.NODE_ENV !== 'production' && arg.styles !== undefined && arg.name !== undefined) {
|
|
2065
|
+
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.');
|
|
2066
|
+
}
|
|
2067
|
+
|
|
2068
|
+
toAdd = '';
|
|
2069
|
+
|
|
2070
|
+
for (var k in arg) {
|
|
2071
|
+
if (arg[k] && k) {
|
|
2072
|
+
toAdd && (toAdd += ' ');
|
|
2073
|
+
toAdd += k;
|
|
2074
|
+
}
|
|
2075
|
+
}
|
|
2076
|
+
}
|
|
2077
|
+
|
|
2078
|
+
break;
|
|
2079
|
+
}
|
|
2080
|
+
|
|
2081
|
+
default:
|
|
2082
|
+
{
|
|
2083
|
+
toAdd = arg;
|
|
2084
|
+
}
|
|
2085
|
+
}
|
|
2086
|
+
|
|
2087
|
+
if (toAdd) {
|
|
2088
|
+
cls && (cls += ' ');
|
|
2089
|
+
cls += toAdd;
|
|
2090
|
+
}
|
|
2091
|
+
}
|
|
2092
|
+
|
|
2093
|
+
return cls;
|
|
2094
|
+
};
|
|
2095
|
+
|
|
2096
|
+
function merge(registered, css, className) {
|
|
2097
|
+
var registeredStyles = [];
|
|
2098
|
+
var rawClassName = getRegisteredStyles(registered, registeredStyles, className);
|
|
2099
|
+
|
|
2100
|
+
if (registeredStyles.length < 2) {
|
|
2101
|
+
return className;
|
|
2102
|
+
}
|
|
2103
|
+
|
|
2104
|
+
return rawClassName + css(registeredStyles);
|
|
2105
|
+
}
|
|
2106
|
+
|
|
2107
|
+
var Insertion = function Insertion(_ref) {
|
|
2108
|
+
var cache = _ref.cache,
|
|
2109
|
+
serializedArr = _ref.serializedArr;
|
|
2110
|
+
var rules = useInsertionEffectAlwaysWithSyncFallback(function () {
|
|
2111
|
+
var rules = '';
|
|
2112
|
+
|
|
2113
|
+
for (var i = 0; i < serializedArr.length; i++) {
|
|
2114
|
+
var res = insertStyles(cache, serializedArr[i], false);
|
|
2115
|
+
|
|
2116
|
+
if (!isBrowser$1 && res !== undefined) {
|
|
2117
|
+
rules += res;
|
|
2118
|
+
}
|
|
2119
|
+
}
|
|
2120
|
+
|
|
2121
|
+
if (!isBrowser$1) {
|
|
2122
|
+
return rules;
|
|
2123
|
+
}
|
|
2124
|
+
});
|
|
2125
|
+
|
|
2126
|
+
if (!isBrowser$1 && rules.length !== 0) {
|
|
2127
|
+
var _ref2;
|
|
2128
|
+
|
|
2129
|
+
return /*#__PURE__*/React__namespace.createElement("style", (_ref2 = {}, _ref2["data-emotion"] = cache.key + " " + serializedArr.map(function (serialized) {
|
|
2130
|
+
return serialized.name;
|
|
2131
|
+
}).join(' '), _ref2.dangerouslySetInnerHTML = {
|
|
2132
|
+
__html: rules
|
|
2133
|
+
}, _ref2.nonce = cache.sheet.nonce, _ref2));
|
|
2134
|
+
}
|
|
2135
|
+
|
|
2136
|
+
return null;
|
|
2137
|
+
};
|
|
2138
|
+
|
|
2139
|
+
var ClassNames = /* #__PURE__ */withEmotionCache(function (props, cache) {
|
|
2140
|
+
var hasRendered = false;
|
|
2141
|
+
var serializedArr = [];
|
|
2142
|
+
|
|
2143
|
+
var css = function css() {
|
|
2144
|
+
if (hasRendered && process.env.NODE_ENV !== 'production') {
|
|
2145
|
+
throw new Error('css can only be used during render');
|
|
2146
|
+
}
|
|
2147
|
+
|
|
2148
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
2149
|
+
args[_key] = arguments[_key];
|
|
2150
|
+
}
|
|
2151
|
+
|
|
2152
|
+
var serialized = serializeStyles(args, cache.registered);
|
|
2153
|
+
serializedArr.push(serialized); // registration has to happen here as the result of this might get consumed by `cx`
|
|
2154
|
+
|
|
2155
|
+
registerStyles(cache, serialized, false);
|
|
2156
|
+
return cache.key + "-" + serialized.name;
|
|
2157
|
+
};
|
|
2158
|
+
|
|
2159
|
+
var cx = function cx() {
|
|
2160
|
+
if (hasRendered && process.env.NODE_ENV !== 'production') {
|
|
2161
|
+
throw new Error('cx can only be used during render');
|
|
2162
|
+
}
|
|
2163
|
+
|
|
2164
|
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
2165
|
+
args[_key2] = arguments[_key2];
|
|
2166
|
+
}
|
|
2167
|
+
|
|
2168
|
+
return merge(cache.registered, css, classnames(args));
|
|
2169
|
+
};
|
|
2170
|
+
|
|
2171
|
+
var content = {
|
|
2172
|
+
css: css,
|
|
2173
|
+
cx: cx,
|
|
2174
|
+
theme: React__namespace.useContext(ThemeContext)
|
|
2175
|
+
};
|
|
2176
|
+
var ele = props.children(content);
|
|
2177
|
+
hasRendered = true;
|
|
2178
|
+
return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(Insertion, {
|
|
2179
|
+
cache: cache,
|
|
2180
|
+
serializedArr: serializedArr
|
|
2181
|
+
}), ele);
|
|
2182
|
+
});
|
|
2183
|
+
|
|
2184
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2185
|
+
ClassNames.displayName = 'EmotionClassNames';
|
|
2186
|
+
}
|
|
2187
|
+
|
|
2188
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2189
|
+
var isBrowser = typeof document !== 'undefined'; // #1727, #2905 for some reason Jest and Vitest evaluate modules twice if some consuming module gets mocked
|
|
2190
|
+
|
|
2191
|
+
var isTestEnv = typeof jest !== 'undefined' || typeof vi !== 'undefined';
|
|
2192
|
+
|
|
2193
|
+
if (isBrowser && !isTestEnv) {
|
|
2194
|
+
// globalThis has wide browser support - https://caniuse.com/?search=globalThis, Node.js 12 and later
|
|
2195
|
+
var globalContext = // $FlowIgnore
|
|
2196
|
+
typeof globalThis !== 'undefined' ? globalThis // eslint-disable-line no-undef
|
|
2197
|
+
: isBrowser ? window : global;
|
|
2198
|
+
var globalKey = "__EMOTION_REACT_" + pkg.version.split('.')[0] + "__";
|
|
2199
|
+
|
|
2200
|
+
if (globalContext[globalKey]) {
|
|
2201
|
+
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.');
|
|
2202
|
+
}
|
|
2203
|
+
|
|
2204
|
+
globalContext[globalKey] = true;
|
|
2205
|
+
}
|
|
2206
|
+
}
|
|
2207
|
+
|
|
1531
2208
|
function _taggedTemplateLiteral(strings, raw) {
|
|
1532
2209
|
if (!raw) {
|
|
1533
2210
|
raw = strings.slice(0);
|
|
@@ -1539,6 +2216,16 @@ function _taggedTemplateLiteral(strings, raw) {
|
|
|
1539
2216
|
}));
|
|
1540
2217
|
}
|
|
1541
2218
|
|
|
2219
|
+
function rectToClientRect(rect) {
|
|
2220
|
+
return {
|
|
2221
|
+
...rect,
|
|
2222
|
+
top: rect.y,
|
|
2223
|
+
left: rect.x,
|
|
2224
|
+
right: rect.x + rect.width,
|
|
2225
|
+
bottom: rect.y + rect.height
|
|
2226
|
+
};
|
|
2227
|
+
}
|
|
2228
|
+
|
|
1542
2229
|
function getWindow(node) {
|
|
1543
2230
|
var _node$ownerDocument;
|
|
1544
2231
|
return ((_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
|
|
@@ -1700,7 +2387,7 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
|
|
|
1700
2387
|
currentIFrame = getWindow(currentIFrame).frameElement;
|
|
1701
2388
|
}
|
|
1702
2389
|
}
|
|
1703
|
-
return
|
|
2390
|
+
return rectToClientRect({
|
|
1704
2391
|
width,
|
|
1705
2392
|
height,
|
|
1706
2393
|
x,
|
|
@@ -2413,7 +3100,7 @@ var Menu = function Menu(props) {
|
|
|
2413
3100
|
var children = props.children,
|
|
2414
3101
|
innerRef = props.innerRef,
|
|
2415
3102
|
innerProps = props.innerProps;
|
|
2416
|
-
return jsx("div",
|
|
3103
|
+
return jsx("div", _extends({}, getStyleProps(props, 'menu', {
|
|
2417
3104
|
menu: true
|
|
2418
3105
|
}), {
|
|
2419
3106
|
ref: innerRef
|
|
@@ -2444,7 +3131,7 @@ var MenuList = function MenuList(props) {
|
|
|
2444
3131
|
innerProps = props.innerProps,
|
|
2445
3132
|
innerRef = props.innerRef,
|
|
2446
3133
|
isMulti = props.isMulti;
|
|
2447
|
-
return jsx("div",
|
|
3134
|
+
return jsx("div", _extends({}, getStyleProps(props, 'menuList', {
|
|
2448
3135
|
'menu-list': true,
|
|
2449
3136
|
'menu-list--is-multi': isMulti
|
|
2450
3137
|
}), {
|
|
@@ -2474,7 +3161,7 @@ var NoOptionsMessage = function NoOptionsMessage(_ref6) {
|
|
|
2474
3161
|
children = _ref6$children === void 0 ? 'No options' : _ref6$children,
|
|
2475
3162
|
innerProps = _ref6.innerProps,
|
|
2476
3163
|
restProps = _objectWithoutProperties(_ref6, _excluded$3);
|
|
2477
|
-
return jsx("div",
|
|
3164
|
+
return jsx("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
2478
3165
|
children: children,
|
|
2479
3166
|
innerProps: innerProps
|
|
2480
3167
|
}), 'noOptionsMessage', {
|
|
@@ -2487,7 +3174,7 @@ var LoadingMessage = function LoadingMessage(_ref7) {
|
|
|
2487
3174
|
children = _ref7$children === void 0 ? 'Loading...' : _ref7$children,
|
|
2488
3175
|
innerProps = _ref7.innerProps,
|
|
2489
3176
|
restProps = _objectWithoutProperties(_ref7, _excluded2$1);
|
|
2490
|
-
return jsx("div",
|
|
3177
|
+
return jsx("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
2491
3178
|
children: children,
|
|
2492
3179
|
innerProps: innerProps
|
|
2493
3180
|
}), 'loadingMessage', {
|
|
@@ -2572,7 +3259,7 @@ var MenuPortal = function MenuPortal(props) {
|
|
|
2572
3259
|
if (!appendTo && menuPosition !== 'fixed' || !computedPosition) return null;
|
|
2573
3260
|
|
|
2574
3261
|
// same wrapper element whether fixed or portalled
|
|
2575
|
-
var menuWrapper = jsx("div",
|
|
3262
|
+
var menuWrapper = jsx("div", _extends({
|
|
2576
3263
|
ref: setMenuPortalElement
|
|
2577
3264
|
}, getStyleProps(_objectSpread2(_objectSpread2({}, props), {}, {
|
|
2578
3265
|
offset: computedPosition.offset,
|
|
@@ -2606,7 +3293,7 @@ var SelectContainer = function SelectContainer(props) {
|
|
|
2606
3293
|
innerProps = props.innerProps,
|
|
2607
3294
|
isDisabled = props.isDisabled,
|
|
2608
3295
|
isRtl = props.isRtl;
|
|
2609
|
-
return jsx("div",
|
|
3296
|
+
return jsx("div", _extends({}, getStyleProps(props, 'container', {
|
|
2610
3297
|
'--is-disabled': isDisabled,
|
|
2611
3298
|
'--is-rtl': isRtl
|
|
2612
3299
|
}), innerProps), children);
|
|
@@ -2638,7 +3325,7 @@ var ValueContainer = function ValueContainer(props) {
|
|
|
2638
3325
|
innerProps = props.innerProps,
|
|
2639
3326
|
isMulti = props.isMulti,
|
|
2640
3327
|
hasValue = props.hasValue;
|
|
2641
|
-
return jsx("div",
|
|
3328
|
+
return jsx("div", _extends({}, getStyleProps(props, 'valueContainer', {
|
|
2642
3329
|
'value-container': true,
|
|
2643
3330
|
'value-container--is-multi': isMulti,
|
|
2644
3331
|
'value-container--has-value': hasValue
|
|
@@ -2660,7 +3347,7 @@ var indicatorsContainerCSS = function indicatorsContainerCSS() {
|
|
|
2660
3347
|
var IndicatorsContainer = function IndicatorsContainer(props) {
|
|
2661
3348
|
var children = props.children,
|
|
2662
3349
|
innerProps = props.innerProps;
|
|
2663
|
-
return jsx("div",
|
|
3350
|
+
return jsx("div", _extends({}, getStyleProps(props, 'indicatorsContainer', {
|
|
2664
3351
|
indicators: true
|
|
2665
3352
|
}), innerProps), children);
|
|
2666
3353
|
};
|
|
@@ -2685,7 +3372,7 @@ var _ref2$2 = process.env.NODE_ENV === "production" ? {
|
|
|
2685
3372
|
var Svg = function Svg(_ref) {
|
|
2686
3373
|
var size = _ref.size,
|
|
2687
3374
|
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
2688
|
-
return jsx("svg",
|
|
3375
|
+
return jsx("svg", _extends({
|
|
2689
3376
|
height: size,
|
|
2690
3377
|
width: size,
|
|
2691
3378
|
viewBox: "0 0 20 20",
|
|
@@ -2695,14 +3382,14 @@ var Svg = function Svg(_ref) {
|
|
|
2695
3382
|
}, props));
|
|
2696
3383
|
};
|
|
2697
3384
|
var CrossIcon = function CrossIcon(props) {
|
|
2698
|
-
return jsx(Svg,
|
|
3385
|
+
return jsx(Svg, _extends({
|
|
2699
3386
|
size: 20
|
|
2700
3387
|
}, props), jsx("path", {
|
|
2701
3388
|
d: "M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"
|
|
2702
3389
|
}));
|
|
2703
3390
|
};
|
|
2704
3391
|
var DownChevron = function DownChevron(props) {
|
|
2705
|
-
return jsx(Svg,
|
|
3392
|
+
return jsx(Svg, _extends({
|
|
2706
3393
|
size: 20
|
|
2707
3394
|
}, props), jsx("path", {
|
|
2708
3395
|
d: "M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"
|
|
@@ -2734,7 +3421,7 @@ var dropdownIndicatorCSS = baseCSS;
|
|
|
2734
3421
|
var DropdownIndicator = function DropdownIndicator(props) {
|
|
2735
3422
|
var children = props.children,
|
|
2736
3423
|
innerProps = props.innerProps;
|
|
2737
|
-
return jsx("div",
|
|
3424
|
+
return jsx("div", _extends({}, getStyleProps(props, 'dropdownIndicator', {
|
|
2738
3425
|
indicator: true,
|
|
2739
3426
|
'dropdown-indicator': true
|
|
2740
3427
|
}), innerProps), children || jsx(DownChevron, null));
|
|
@@ -2743,7 +3430,7 @@ var clearIndicatorCSS = baseCSS;
|
|
|
2743
3430
|
var ClearIndicator = function ClearIndicator(props) {
|
|
2744
3431
|
var children = props.children,
|
|
2745
3432
|
innerProps = props.innerProps;
|
|
2746
|
-
return jsx("div",
|
|
3433
|
+
return jsx("div", _extends({}, getStyleProps(props, 'clearIndicator', {
|
|
2747
3434
|
indicator: true,
|
|
2748
3435
|
'clear-indicator': true
|
|
2749
3436
|
}), innerProps), children || jsx(CrossIcon, null));
|
|
@@ -2770,7 +3457,7 @@ var indicatorSeparatorCSS = function indicatorSeparatorCSS(_ref4, unstyled) {
|
|
|
2770
3457
|
};
|
|
2771
3458
|
var IndicatorSeparator = function IndicatorSeparator(props) {
|
|
2772
3459
|
var innerProps = props.innerProps;
|
|
2773
|
-
return jsx("span",
|
|
3460
|
+
return jsx("span", _extends({}, innerProps, getStyleProps(props, 'indicatorSeparator', {
|
|
2774
3461
|
'indicator-separator': true
|
|
2775
3462
|
})));
|
|
2776
3463
|
};
|
|
@@ -2823,7 +3510,7 @@ var LoadingIndicator = function LoadingIndicator(_ref7) {
|
|
|
2823
3510
|
_ref7$size = _ref7.size,
|
|
2824
3511
|
size = _ref7$size === void 0 ? 4 : _ref7$size,
|
|
2825
3512
|
restProps = _objectWithoutProperties(_ref7, _excluded2);
|
|
2826
|
-
return jsx("div",
|
|
3513
|
+
return jsx("div", _extends({}, getStyleProps(_objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
2827
3514
|
innerProps: innerProps,
|
|
2828
3515
|
isRtl: isRtl,
|
|
2829
3516
|
size: size
|
|
@@ -2879,7 +3566,7 @@ var Control$1 = function Control(props) {
|
|
|
2879
3566
|
innerRef = props.innerRef,
|
|
2880
3567
|
innerProps = props.innerProps,
|
|
2881
3568
|
menuIsOpen = props.menuIsOpen;
|
|
2882
|
-
return jsx("div",
|
|
3569
|
+
return jsx("div", _extends({
|
|
2883
3570
|
ref: innerRef
|
|
2884
3571
|
}, getStyleProps(props, 'control', {
|
|
2885
3572
|
control: true,
|
|
@@ -2911,9 +3598,9 @@ var Group = function Group(props) {
|
|
|
2911
3598
|
label = props.label,
|
|
2912
3599
|
theme = props.theme,
|
|
2913
3600
|
selectProps = props.selectProps;
|
|
2914
|
-
return jsx("div",
|
|
3601
|
+
return jsx("div", _extends({}, getStyleProps(props, 'group', {
|
|
2915
3602
|
group: true
|
|
2916
|
-
}), innerProps), jsx(Heading,
|
|
3603
|
+
}), innerProps), jsx(Heading, _extends({}, headingProps, {
|
|
2917
3604
|
selectProps: selectProps,
|
|
2918
3605
|
theme: theme,
|
|
2919
3606
|
getStyles: getStyles,
|
|
@@ -2943,7 +3630,7 @@ var GroupHeading = function GroupHeading(props) {
|
|
|
2943
3630
|
var _cleanCommonProps = cleanCommonProps(props);
|
|
2944
3631
|
_cleanCommonProps.data;
|
|
2945
3632
|
var innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded$1$1);
|
|
2946
|
-
return jsx("div",
|
|
3633
|
+
return jsx("div", _extends({}, getStyleProps(props, 'groupHeading', {
|
|
2947
3634
|
'group-heading': true
|
|
2948
3635
|
}), innerProps));
|
|
2949
3636
|
};
|
|
@@ -3006,11 +3693,11 @@ var Input = function Input(props) {
|
|
|
3006
3693
|
isHidden = _cleanCommonProps.isHidden,
|
|
3007
3694
|
inputClassName = _cleanCommonProps.inputClassName,
|
|
3008
3695
|
innerProps = _objectWithoutProperties(_cleanCommonProps, _excluded$5);
|
|
3009
|
-
return jsx("div",
|
|
3696
|
+
return jsx("div", _extends({}, getStyleProps(props, 'input', {
|
|
3010
3697
|
'input-container': true
|
|
3011
3698
|
}), {
|
|
3012
3699
|
"data-value": value || ''
|
|
3013
|
-
}), jsx("input",
|
|
3700
|
+
}), jsx("input", _extends({
|
|
3014
3701
|
className: cx({
|
|
3015
3702
|
input: true
|
|
3016
3703
|
}, inputClassName),
|
|
@@ -3083,7 +3770,7 @@ var MultiValueLabel = MultiValueGeneric;
|
|
|
3083
3770
|
function MultiValueRemove(_ref5) {
|
|
3084
3771
|
var children = _ref5.children,
|
|
3085
3772
|
innerProps = _ref5.innerProps;
|
|
3086
|
-
return jsx("div",
|
|
3773
|
+
return jsx("div", _extends({
|
|
3087
3774
|
role: "button"
|
|
3088
3775
|
}, innerProps), children || jsx(CrossIcon, {
|
|
3089
3776
|
size: 14
|
|
@@ -3157,7 +3844,7 @@ var Option = function Option(props) {
|
|
|
3157
3844
|
isSelected = props.isSelected,
|
|
3158
3845
|
innerRef = props.innerRef,
|
|
3159
3846
|
innerProps = props.innerProps;
|
|
3160
|
-
return jsx("div",
|
|
3847
|
+
return jsx("div", _extends({}, getStyleProps(props, 'option', {
|
|
3161
3848
|
option: true,
|
|
3162
3849
|
'option--is-disabled': isDisabled,
|
|
3163
3850
|
'option--is-focused': isFocused,
|
|
@@ -3185,7 +3872,7 @@ var placeholderCSS = function placeholderCSS(_ref, unstyled) {
|
|
|
3185
3872
|
var Placeholder = function Placeholder(props) {
|
|
3186
3873
|
var children = props.children,
|
|
3187
3874
|
innerProps = props.innerProps;
|
|
3188
|
-
return jsx("div",
|
|
3875
|
+
return jsx("div", _extends({}, getStyleProps(props, 'placeholder', {
|
|
3189
3876
|
placeholder: true
|
|
3190
3877
|
}), innerProps), children);
|
|
3191
3878
|
};
|
|
@@ -3213,7 +3900,7 @@ var SingleValue = function SingleValue(props) {
|
|
|
3213
3900
|
var children = props.children,
|
|
3214
3901
|
isDisabled = props.isDisabled,
|
|
3215
3902
|
innerProps = props.innerProps;
|
|
3216
|
-
return jsx("div",
|
|
3903
|
+
return jsx("div", _extends({}, getStyleProps(props, 'singleValue', {
|
|
3217
3904
|
'single-value': true,
|
|
3218
3905
|
'single-value--is-disabled': isDisabled
|
|
3219
3906
|
}), innerProps), children);
|
|
@@ -3314,7 +4001,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
3314
4001
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$2
|
|
3315
4002
|
};
|
|
3316
4003
|
var A11yText = function A11yText(props) {
|
|
3317
|
-
return jsx("span",
|
|
4004
|
+
return jsx("span", _extends({
|
|
3318
4005
|
css: _ref
|
|
3319
4006
|
}, props));
|
|
3320
4007
|
};
|
|
@@ -3831,7 +4518,7 @@ function DummyInput(_ref) {
|
|
|
3831
4518
|
props = _objectWithoutProperties(_ref, _excluded$1);
|
|
3832
4519
|
// Remove animation props not meant for HTML elements
|
|
3833
4520
|
var filteredProps = removeProps(props, 'onExited', 'in', 'enter', 'exit', 'appear');
|
|
3834
|
-
return jsx("input",
|
|
4521
|
+
return jsx("input", _extends({
|
|
3835
4522
|
ref: innerRef
|
|
3836
4523
|
}, filteredProps, {
|
|
3837
4524
|
css: /*#__PURE__*/css$2({
|
|
@@ -5407,7 +6094,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
5407
6094
|
});
|
|
5408
6095
|
if (!isSearchable) {
|
|
5409
6096
|
// use a dummy input to maintain focus/blur functionality
|
|
5410
|
-
return /*#__PURE__*/React__namespace.createElement(DummyInput,
|
|
6097
|
+
return /*#__PURE__*/React__namespace.createElement(DummyInput, _extends({
|
|
5411
6098
|
id: id,
|
|
5412
6099
|
innerRef: this.getInputRef,
|
|
5413
6100
|
onBlur: this.onInputBlur,
|
|
@@ -5420,7 +6107,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
5420
6107
|
value: ""
|
|
5421
6108
|
}, ariaAttributes));
|
|
5422
6109
|
}
|
|
5423
|
-
return /*#__PURE__*/React__namespace.createElement(Input,
|
|
6110
|
+
return /*#__PURE__*/React__namespace.createElement(Input, _extends({}, commonProps, {
|
|
5424
6111
|
autoCapitalize: "none",
|
|
5425
6112
|
autoComplete: "off",
|
|
5426
6113
|
autoCorrect: "off",
|
|
@@ -5461,7 +6148,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
5461
6148
|
focusedValue = _this$state5.focusedValue,
|
|
5462
6149
|
isFocused = _this$state5.isFocused;
|
|
5463
6150
|
if (!this.hasValue() || !controlShouldRenderValue) {
|
|
5464
|
-
return inputValue ? null : /*#__PURE__*/React__namespace.createElement(Placeholder,
|
|
6151
|
+
return inputValue ? null : /*#__PURE__*/React__namespace.createElement(Placeholder, _extends({}, commonProps, {
|
|
5465
6152
|
key: "placeholder",
|
|
5466
6153
|
isDisabled: isDisabled,
|
|
5467
6154
|
isFocused: isFocused,
|
|
@@ -5474,7 +6161,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
5474
6161
|
return selectValue.map(function (opt, index) {
|
|
5475
6162
|
var isOptionFocused = opt === focusedValue;
|
|
5476
6163
|
var key = "".concat(_this3.getOptionLabel(opt), "-").concat(_this3.getOptionValue(opt));
|
|
5477
|
-
return /*#__PURE__*/React__namespace.createElement(MultiValue,
|
|
6164
|
+
return /*#__PURE__*/React__namespace.createElement(MultiValue, _extends({}, commonProps, {
|
|
5478
6165
|
components: {
|
|
5479
6166
|
Container: MultiValueContainer,
|
|
5480
6167
|
Label: MultiValueLabel,
|
|
@@ -5503,7 +6190,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
5503
6190
|
return null;
|
|
5504
6191
|
}
|
|
5505
6192
|
var singleValue = selectValue[0];
|
|
5506
|
-
return /*#__PURE__*/React__namespace.createElement(SingleValue,
|
|
6193
|
+
return /*#__PURE__*/React__namespace.createElement(SingleValue, _extends({}, commonProps, {
|
|
5507
6194
|
data: singleValue,
|
|
5508
6195
|
isDisabled: isDisabled
|
|
5509
6196
|
}), this.formatOptionLabel(singleValue, 'value'));
|
|
@@ -5526,7 +6213,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
5526
6213
|
onTouchEnd: this.onClearIndicatorTouchEnd,
|
|
5527
6214
|
'aria-hidden': 'true'
|
|
5528
6215
|
};
|
|
5529
|
-
return /*#__PURE__*/React__namespace.createElement(ClearIndicator,
|
|
6216
|
+
return /*#__PURE__*/React__namespace.createElement(ClearIndicator, _extends({}, commonProps, {
|
|
5530
6217
|
innerProps: innerProps,
|
|
5531
6218
|
isFocused: isFocused
|
|
5532
6219
|
}));
|
|
@@ -5545,7 +6232,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
5545
6232
|
var innerProps = {
|
|
5546
6233
|
'aria-hidden': 'true'
|
|
5547
6234
|
};
|
|
5548
|
-
return /*#__PURE__*/React__namespace.createElement(LoadingIndicator,
|
|
6235
|
+
return /*#__PURE__*/React__namespace.createElement(LoadingIndicator, _extends({}, commonProps, {
|
|
5549
6236
|
innerProps: innerProps,
|
|
5550
6237
|
isDisabled: isDisabled,
|
|
5551
6238
|
isFocused: isFocused
|
|
@@ -5563,7 +6250,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
5563
6250
|
var commonProps = this.commonProps;
|
|
5564
6251
|
var isDisabled = this.props.isDisabled;
|
|
5565
6252
|
var isFocused = this.state.isFocused;
|
|
5566
|
-
return /*#__PURE__*/React__namespace.createElement(IndicatorSeparator,
|
|
6253
|
+
return /*#__PURE__*/React__namespace.createElement(IndicatorSeparator, _extends({}, commonProps, {
|
|
5567
6254
|
isDisabled: isDisabled,
|
|
5568
6255
|
isFocused: isFocused
|
|
5569
6256
|
}));
|
|
@@ -5582,7 +6269,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
5582
6269
|
onTouchEnd: this.onDropdownIndicatorTouchEnd,
|
|
5583
6270
|
'aria-hidden': 'true'
|
|
5584
6271
|
};
|
|
5585
|
-
return /*#__PURE__*/React__namespace.createElement(DropdownIndicator,
|
|
6272
|
+
return /*#__PURE__*/React__namespace.createElement(DropdownIndicator, _extends({}, commonProps, {
|
|
5586
6273
|
innerProps: innerProps,
|
|
5587
6274
|
isDisabled: isDisabled,
|
|
5588
6275
|
isFocused: isFocused
|
|
@@ -5647,7 +6334,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
5647
6334
|
'aria-selected': _this4.isAppleDevice ? undefined : isSelected // is not supported on Apple devices
|
|
5648
6335
|
};
|
|
5649
6336
|
|
|
5650
|
-
return /*#__PURE__*/React__namespace.createElement(Option,
|
|
6337
|
+
return /*#__PURE__*/React__namespace.createElement(Option, _extends({}, commonProps, {
|
|
5651
6338
|
innerProps: innerProps,
|
|
5652
6339
|
data: data,
|
|
5653
6340
|
isDisabled: isDisabled,
|
|
@@ -5669,7 +6356,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
5669
6356
|
groupIndex = item.index;
|
|
5670
6357
|
var groupId = "".concat(_this4.getElementId('group'), "-").concat(groupIndex);
|
|
5671
6358
|
var headingId = "".concat(groupId, "-heading");
|
|
5672
|
-
return /*#__PURE__*/React__namespace.createElement(Group,
|
|
6359
|
+
return /*#__PURE__*/React__namespace.createElement(Group, _extends({}, commonProps, {
|
|
5673
6360
|
key: groupId,
|
|
5674
6361
|
data: _data,
|
|
5675
6362
|
options: options,
|
|
@@ -5706,12 +6393,12 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
5706
6393
|
menuPosition: menuPosition,
|
|
5707
6394
|
menuShouldScrollIntoView: menuShouldScrollIntoView
|
|
5708
6395
|
};
|
|
5709
|
-
var menuElement = /*#__PURE__*/React__namespace.createElement(MenuPlacer,
|
|
6396
|
+
var menuElement = /*#__PURE__*/React__namespace.createElement(MenuPlacer, _extends({}, commonProps, menuPlacementProps), function (_ref4) {
|
|
5710
6397
|
var ref = _ref4.ref,
|
|
5711
6398
|
_ref4$placerProps = _ref4.placerProps,
|
|
5712
6399
|
placement = _ref4$placerProps.placement,
|
|
5713
6400
|
maxHeight = _ref4$placerProps.maxHeight;
|
|
5714
|
-
return /*#__PURE__*/React__namespace.createElement(Menu,
|
|
6401
|
+
return /*#__PURE__*/React__namespace.createElement(Menu, _extends({}, commonProps, menuPlacementProps, {
|
|
5715
6402
|
innerRef: ref,
|
|
5716
6403
|
innerProps: {
|
|
5717
6404
|
onMouseDown: _this4.onMenuMouseDown,
|
|
@@ -5725,7 +6412,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
5725
6412
|
onBottomArrive: onMenuScrollToBottom,
|
|
5726
6413
|
lockEnabled: menuShouldBlockScroll
|
|
5727
6414
|
}, function (scrollTargetRef) {
|
|
5728
|
-
return /*#__PURE__*/React__namespace.createElement(MenuList,
|
|
6415
|
+
return /*#__PURE__*/React__namespace.createElement(MenuList, _extends({}, commonProps, {
|
|
5729
6416
|
innerRef: function innerRef(instance) {
|
|
5730
6417
|
_this4.getMenuListRef(instance);
|
|
5731
6418
|
scrollTargetRef(instance);
|
|
@@ -5745,7 +6432,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
5745
6432
|
// positioning behaviour is almost identical for portalled and fixed,
|
|
5746
6433
|
// so we use the same component. the actual portalling logic is forked
|
|
5747
6434
|
// within the component based on `menuPosition`
|
|
5748
|
-
return menuPortalTarget || menuPosition === 'fixed' ? /*#__PURE__*/React__namespace.createElement(MenuPortal,
|
|
6435
|
+
return menuPortalTarget || menuPosition === 'fixed' ? /*#__PURE__*/React__namespace.createElement(MenuPortal, _extends({}, commonProps, {
|
|
5749
6436
|
appendTo: menuPortalTarget,
|
|
5750
6437
|
controlElement: this.controlRef,
|
|
5751
6438
|
menuPlacement: menuPlacement,
|
|
@@ -5815,7 +6502,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
5815
6502
|
isFocused = _this$state6.isFocused,
|
|
5816
6503
|
selectValue = _this$state6.selectValue;
|
|
5817
6504
|
var focusableOptions = this.getFocusableOptions();
|
|
5818
|
-
return /*#__PURE__*/React__namespace.createElement(LiveRegion$1,
|
|
6505
|
+
return /*#__PURE__*/React__namespace.createElement(LiveRegion$1, _extends({}, commonProps, {
|
|
5819
6506
|
id: this.getElementId('live-region'),
|
|
5820
6507
|
ariaSelection: ariaSelection,
|
|
5821
6508
|
focusedOption: focusedOption,
|
|
@@ -5841,7 +6528,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
5841
6528
|
menuIsOpen = _this$props14.menuIsOpen;
|
|
5842
6529
|
var isFocused = this.state.isFocused;
|
|
5843
6530
|
var commonProps = this.commonProps = this.getCommonProps();
|
|
5844
|
-
return /*#__PURE__*/React__namespace.createElement(SelectContainer,
|
|
6531
|
+
return /*#__PURE__*/React__namespace.createElement(SelectContainer, _extends({}, commonProps, {
|
|
5845
6532
|
className: className,
|
|
5846
6533
|
innerProps: {
|
|
5847
6534
|
id: id,
|
|
@@ -5849,7 +6536,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
5849
6536
|
},
|
|
5850
6537
|
isDisabled: isDisabled,
|
|
5851
6538
|
isFocused: isFocused
|
|
5852
|
-
}), this.renderLiveRegion(), /*#__PURE__*/React__namespace.createElement(Control,
|
|
6539
|
+
}), this.renderLiveRegion(), /*#__PURE__*/React__namespace.createElement(Control, _extends({}, commonProps, {
|
|
5853
6540
|
innerRef: this.getControlRef,
|
|
5854
6541
|
innerProps: {
|
|
5855
6542
|
onMouseDown: this.onControlMouseDown,
|
|
@@ -5858,9 +6545,9 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
5858
6545
|
isDisabled: isDisabled,
|
|
5859
6546
|
isFocused: isFocused,
|
|
5860
6547
|
menuIsOpen: menuIsOpen
|
|
5861
|
-
}), /*#__PURE__*/React__namespace.createElement(ValueContainer,
|
|
6548
|
+
}), /*#__PURE__*/React__namespace.createElement(ValueContainer, _extends({}, commonProps, {
|
|
5862
6549
|
isDisabled: isDisabled
|
|
5863
|
-
}), this.renderPlaceholderOrValue(), this.renderInput()), /*#__PURE__*/React__namespace.createElement(IndicatorsContainer,
|
|
6550
|
+
}), this.renderPlaceholderOrValue(), this.renderInput()), /*#__PURE__*/React__namespace.createElement(IndicatorsContainer, _extends({}, commonProps, {
|
|
5864
6551
|
isDisabled: isDisabled
|
|
5865
6552
|
}), this.renderClearIndicator(), this.renderLoadingIndicator(), this.renderIndicatorSeparator(), this.renderDropdownIndicator())), this.renderMenu(), this.renderFormField());
|
|
5866
6553
|
}
|
|
@@ -5932,7 +6619,7 @@ Select.defaultProps = defaultProps;
|
|
|
5932
6619
|
|
|
5933
6620
|
var StateManagedSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
5934
6621
|
var baseSelectProps = useStateManager(props);
|
|
5935
|
-
return /*#__PURE__*/React__namespace.createElement(Select,
|
|
6622
|
+
return /*#__PURE__*/React__namespace.createElement(Select, _extends({
|
|
5936
6623
|
ref: ref
|
|
5937
6624
|
}, baseSelectProps));
|
|
5938
6625
|
});
|
|
@@ -6219,7 +6906,7 @@ function useCreatable(_ref) {
|
|
|
6219
6906
|
var CreatableSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
6220
6907
|
var creatableProps = useStateManager(props);
|
|
6221
6908
|
var selectProps = useCreatable(creatableProps);
|
|
6222
|
-
return /*#__PURE__*/React__namespace.createElement(Select,
|
|
6909
|
+
return /*#__PURE__*/React__namespace.createElement(Select, _extends({
|
|
6223
6910
|
ref: ref
|
|
6224
6911
|
}, selectProps));
|
|
6225
6912
|
});
|