@hhgtech/hhg-components 1.29.80 → 1.29.81
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/{index-1250dd06.js → WhatsApp-82018096.js} +24 -276
- package/build/adapters.js +17 -16
- package/build/atoms.js +100 -0
- package/build/babyGrowth.js +162 -164
- package/build/cache.js +3 -3
- package/build/care.js +17 -17
- package/build/components.js +181 -165
- package/build/{constants-ca71f9e5.js → constants-3a475a22.js} +2 -2
- package/build/constants-513a9a41.js +318 -0
- package/build/{constants-4e7c419e.js → constants-936f45e9.js} +0 -136
- package/build/constants-dd16fb4d.js +425 -0
- package/build/constants.js +3 -3
- package/build/{core-bb2587e7.js → core-9e44ee99.js} +2 -2
- package/build/{index-5d9ad07e.js → dataTransform-6b4d7a4e.js} +3 -52
- package/build/{dataTransform-469b75eb.js → dataTransform-c1701cbd.js} +1 -1
- package/build/defaultClassWrapper-e87ca8ef.js +21 -0
- package/build/ecom.js +5 -5
- package/build/esm/WhatsApp-7d3732e2.js +46 -0
- package/build/esm/adapters.js +17 -16
- package/build/esm/atoms.js +57 -0
- package/build/esm/babyGrowth.js +87 -89
- package/build/esm/cache.js +3 -3
- package/build/esm/care.js +17 -17
- package/build/esm/components.js +91 -75
- package/build/esm/constants-6bdb97a8.js +417 -0
- package/build/esm/constants-71d9f33b.js +307 -0
- package/build/esm/{constants-7661ce64.js → constants-ebf80e5f.js} +2 -2
- package/build/esm/{constants-508ba335.js → constants-f77fc231.js} +1 -127
- package/build/esm/constants.js +3 -3
- package/build/esm/{core-5a22b83e.js → core-c72e0ff5.js} +2 -2
- package/build/esm/{index-9b54376f.js → dataTransform-3e8e25ba.js} +5 -53
- package/build/esm/{dataTransform-f5db5afb.js → dataTransform-6c032113.js} +1 -1
- package/build/esm/defaultClassWrapper-31caf23b.js +15 -0
- package/build/esm/ecom.js +5 -5
- package/build/esm/fixedBottomAdBlock-13ed4a34.js +3474 -0
- package/build/esm/footer.js +18 -18
- package/build/esm/gAssets.js +4 -4
- package/build/esm/{getDynamicHealthTool-09fda8b3.js → getDynamicHealthTool-7681e43a.js} +4 -4
- package/build/esm/{getSocialList-96301dbb.js → getSocialList-e8142513.js} +5 -6
- package/build/esm/healthToolsForm.js +40 -0
- package/build/esm/healthToolsForms.d.ts +7 -0
- package/build/esm/hooks.js +17 -17
- package/build/esm/i18n.js +2 -2
- package/build/esm/i18nV2.js +2 -2
- package/build/esm/index-16514f4d.js +156 -0
- package/build/esm/{index-3c7f109c.js → index-1da2ca0b.js} +2 -2
- package/build/esm/{utils-ff5d88a2.js → index-1ecbcf21.js} +71 -105
- package/build/esm/{index-92eedeb0.js → index-21eac858.js} +12 -201
- package/build/esm/{index-c4699d44.js → index-2774583d.js} +35 -176
- package/build/esm/index-29d04985.js +14 -0
- package/build/esm/index-2b9213cf.js +195 -0
- package/build/esm/index-3078acec.js +275 -0
- package/build/esm/index-376bee14.js +847 -0
- package/build/esm/index-38f50764.js +557 -0
- package/build/esm/index-42ad7763.js +95 -0
- package/build/esm/{index-53a86337.js → index-598ab51b.js} +5 -5
- package/build/esm/{index-df29c4e0.js → index-69248434.js} +33 -5
- package/build/esm/index-6ac73f00.js +1114 -0
- package/build/esm/index-703205e3.js +54 -0
- package/build/esm/{index-82861dba.js → index-73301602.js} +2 -2
- package/build/esm/index-76d20d3f.js +100 -0
- package/build/esm/{index-e68d4285.js → index-780a08de.js} +2 -2
- package/build/esm/{index-80f4d7df.js → index-78255d6c.js} +2 -2
- package/build/esm/{index-da2b8f22.js → index-7cbe2a10.js} +12 -11
- package/build/esm/{index-2d47a346.js → index-7e756cb8.js} +11 -10
- package/build/esm/{index.styled-9e147e72.js → index-87a2ea8c.js} +21 -3
- package/build/esm/index-88ad2ca3.js +1681 -0
- package/build/esm/index-8952ceac.js +202 -0
- package/build/esm/index-996f7caf.js +148 -0
- package/build/esm/{index-ef855343.js → index-9f1899f2.js} +4 -4
- package/build/esm/{index-32e2b169.js → index-b1bb27aa.js} +81 -9
- package/build/esm/{index-c807ef87.js → index-bef3c9bd.js} +3 -3
- package/build/esm/{index-bcd13f1d.js → index-c1af3a8e.js} +13 -12
- package/build/esm/{index-4dcdce19.js → index-c200bff6.js} +2 -2
- package/build/esm/{index-5773eb18.js → index-cb4afb33.js} +6 -6
- package/build/esm/{index-679d5383.js → index-cdac57da.js} +1 -1
- package/build/esm/{index-474e0ae5.js → index-cf6beac8.js} +2 -13
- package/build/esm/{index-77dddeb9.js → index-d218b94e.js} +2 -2
- package/build/esm/index-d6201fa4.js +42 -0
- package/build/esm/index-e104ad21.js +335 -0
- package/build/esm/index-e26514ee.js +262 -0
- package/build/esm/index-f27edf45.js +130 -0
- package/build/esm/index.js +89 -73
- package/build/esm/lead.js +23 -33
- package/build/esm/logoIcon-d93bc56e.js +104 -0
- package/build/esm/mantine.js +22 -20
- package/build/esm/misc.js +21 -21
- package/build/esm/molecules.js +88 -0
- package/build/esm/navigation.js +37 -37
- package/build/esm/onboardingV2.js +26 -35
- package/build/esm/organisms.js +57 -0
- package/build/esm/pwg.js +19 -19
- package/build/esm/{routing-7bc3e320.js → routing-bebdc8b7.js} +2 -2
- package/build/esm/subot.js +31 -27
- package/build/esm/surveyOrPremiumBanner.js +45 -0
- package/build/esm/surveyQuestionCard.js +13 -0
- package/build/esm/surveyThankyouCard-bf6080eb.js +446 -0
- package/build/esm/together.js +35 -37
- package/build/esm/{types-957334f2.js → types-2580132c.js} +28 -30
- package/build/esm/{types-ee1be1e3.js → types-be952df2.js} +13 -13
- package/build/esm/types.js +1 -1
- package/build/esm/{useCategory-7e020652.js → useCategory-8f109eb7.js} +5 -5
- package/build/esm/{useHealthToolCache-c70e4fd5.js → useHealthToolCache-d97dfa00.js} +2 -2
- package/build/esm/{useMantineLocale-1373e175.js → useMantineLocale-4fb67342.js} +3 -3
- package/build/esm/{usePlacesAutocomplete-4bfe976e.js → usePlacesAutocomplete-fe2e4cbe.js} +1 -1
- package/build/esm/{useTranslations-adad3b06.js → useTranslations-fbf6a6ab.js} +1 -1
- package/build/esm/{utils-b14c10f9.js → utils-cef111b6.js} +1 -1
- package/build/esm/{utils-dee27bfd.js → utils-d5a0b58f.js} +8 -356
- package/build/esm/vaccination.js +18 -29
- package/build/fixedBottomAdBlock-0d4379d1.js +3521 -0
- package/build/footer.js +18 -18
- package/build/gAssets.js +4 -4
- package/build/{getDynamicHealthTool-357666f7.js → getDynamicHealthTool-2a92e1a5.js} +4 -4
- package/build/{getSocialList-c1404aff.js → getSocialList-97e7bcc1.js} +8 -9
- package/build/healthToolsForm.js +54 -0
- package/build/healthToolsForms.d.ts +7 -0
- package/build/hooks.js +17 -17
- package/build/i18n.js +1 -1
- package/build/i18nV2.js +1 -1
- package/build/index-058b3c0f.js +1127 -0
- package/build/{index-94fd9ea6.js → index-05f106c2.js} +32 -222
- package/build/index-06fa8444.js +102 -0
- package/build/{index-858f60e0.js → index-1efa7d84.js} +2 -2
- package/build/index-247a9eb2.js +1693 -0
- package/build/{index-94a2b0f9.js → index-264eeddd.js} +2 -2
- package/build/index-3d0d22b3.js +565 -0
- package/build/index-3dcb9bc6.js +61 -0
- package/build/{index-91027d35.js → index-4af08ec2.js} +2 -2
- package/build/index-6acb08c0.js +343 -0
- package/build/{index-bf6e5e4e.js → index-6bc3f8c3.js} +5 -5
- package/build/{index-b0414701.js → index-6c27b627.js} +56 -199
- package/build/index-73cde644.js +156 -0
- package/build/{index-5029b5d8.js → index-77a2b9ee.js} +1 -1
- package/build/{index-d710511f.js → index-7c1dc717.js} +12 -11
- package/build/index-7da7b531.js +107 -0
- package/build/{index-f0a532c7.js → index-838b0f95.js} +6 -6
- package/build/index-a7de42d1.js +202 -0
- package/build/{index-3a03bb34.js → index-a86ea1b6.js} +2 -2
- package/build/index-aa818139.js +49 -0
- package/build/{index-61ef343d.js → index-b773bc3d.js} +4 -4
- package/build/index-bef2bc73.js +136 -0
- package/build/{utils-263a60f7.js → index-c225ef22.js} +76 -120
- package/build/{index-8c826f3e.js → index-c2900d8c.js} +2 -2
- package/build/index-cb0544e5.js +866 -0
- package/build/{index-e60c98f8.js → index-d34cd464.js} +2 -2
- package/build/{index-82a3ba38.js → index-d5b4089d.js} +85 -12
- package/build/index-dba2e361.js +20 -0
- package/build/{index-917c975c.js → index-dcbd8bf3.js} +37 -9
- package/build/index-dd1392e3.js +167 -0
- package/build/{index-ed587907.js → index-def9867a.js} +11 -10
- package/build/index-e0bf03ac.js +277 -0
- package/build/index-ee964d3c.js +209 -0
- package/build/index-f10efb61.js +270 -0
- package/build/{index-040620f6.js → index-f1f4fbb9.js} +13 -12
- package/build/{index-c67602d7.js → index-f28c47ce.js} +1 -13
- package/build/{index-2b32b21e.js → index-f6575703.js} +2 -2
- package/build/{index.styled-8aca5145.js → index-fe7345fa.js} +22 -4
- package/build/index.js +202 -186
- package/build/lead.js +29 -39
- package/build/logoIcon-ee9a5501.js +110 -0
- package/build/mantine.js +24 -23
- package/build/misc.js +21 -21
- package/build/molecules.js +149 -0
- package/build/navigation.js +37 -37
- package/build/onboardingV2.js +45 -54
- package/build/organisms.js +74 -0
- package/build/pwg.js +19 -19
- package/build/{routing-bc8197d8.js → routing-f6d54205.js} +2 -2
- package/build/subot.js +43 -39
- package/build/surveyOrPremiumBanner.js +53 -0
- package/build/surveyQuestionCard.js +22 -0
- package/build/surveyThankyouCard-ead6b355.js +454 -0
- package/build/together.js +37 -39
- package/build/{types-6996fb20.js → types-4ba4268f.js} +13 -13
- package/build/{types-c8956642.js → types-6c5643a2.js} +60 -62
- package/build/types.js +1 -1
- package/build/{useCategory-7d1f8a7d.js → useCategory-e2c91f59.js} +5 -5
- package/build/{useHealthToolCache-b7dea4aa.js → useHealthToolCache-2a53367b.js} +2 -2
- package/build/{useMantineLocale-b243f628.js → useMantineLocale-a4f0c61d.js} +3 -3
- package/build/{usePlacesAutocomplete-08b86d2d.js → usePlacesAutocomplete-c76d0caf.js} +1 -1
- package/build/{useTranslations-d5456a98.js → useTranslations-200168a3.js} +1 -1
- package/build/{utils-9f62698f.js → utils-95d9832e.js} +16 -375
- package/build/{utils-d421a448.js → utils-af695515.js} +1 -1
- package/build/vaccination.js +58 -69
- package/package.json +1 -1
- package/build/Instagram-91ba1e26.js +0 -32
- package/build/esm/Instagram-319a8e34.js +0 -26
- package/build/esm/index-13bf84f4.js +0 -298
- package/build/esm/index-1a3f36c3.js +0 -1086
- package/build/esm/index-800b956a.js +0 -7245
- package/build/esm/index-aebf96f3.js +0 -33
- package/build/esm/index-d48b5db6.js +0 -71
- package/build/esm/index-d5b66388.js +0 -23
- package/build/esm/index.styles-0ef0135c.js +0 -1322
- package/build/index-0523771b.js +0 -7324
- package/build/index-20ebc0bd.js +0 -30
- package/build/index-dbf560f2.js +0 -1100
- package/build/index-efcbac97.js +0 -39
- package/build/index-f5103542.js +0 -77
- package/build/index.styles-2bdfde5f.js +0 -1361
- /package/build/{BMI_BOYS.percentile.monthly-c38ce03a.js → BMI_BOYS.percentile.monthly-71fb1c9f.js} +0 -0
- /package/build/{BMI_BOYS.percentile.weekly-1eccee42.js → BMI_BOYS.percentile.weekly-b2b344a7.js} +0 -0
- /package/build/{BMI_BOYS.percentile.yearly-0e7d5cb6.js → BMI_BOYS.percentile.yearly-031ddade.js} +0 -0
- /package/build/{BMI_BOYS.zscore.monthly-f72f392f.js → BMI_BOYS.zscore.monthly-bb1f9962.js} +0 -0
- /package/build/{BMI_BOYS.zscore.weekly-94fd04e6.js → BMI_BOYS.zscore.weekly-d6198d53.js} +0 -0
- /package/build/{BMI_BOYS.zscore.yearly-90d5e091.js → BMI_BOYS.zscore.yearly-48255337.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.monthly-de3a9a14.js → BMI_GIRLS.percentile.monthly-e3e284ee.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.weekly-1e1ce2b7.js → BMI_GIRLS.percentile.weekly-9f2d3977.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.yearly-70a44f31.js → BMI_GIRLS.percentile.yearly-c79f34ce.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.monthly-be4399a5.js → BMI_GIRLS.zscore.monthly-11092df0.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.weekly-6121376b.js → BMI_GIRLS.zscore.weekly-5c375d2b.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.yearly-822e7686.js → BMI_GIRLS.zscore.yearly-adbba8e3.js} +0 -0
- /package/build/{ChevronDown-f9d31306.js → ChevronDown-f7e25d61.js} +0 -0
- /package/build/{Close-27e0dcf1.js → Close-36b0da99.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-5e094c3e.js → HEAD CIRCUM_BOYS.percentile.monthly-163b99ad.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-24f827d8.js → HEAD CIRCUM_BOYS.percentile.weekly-c9882014.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-d7478410.js → HEAD CIRCUM_BOYS.percentile.yearly-9d2bc91e.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-1123cad6.js → HEAD CIRCUM_BOYS.zscore.monthly-1d2a215c.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-a5b55615.js → HEAD CIRCUM_BOYS.zscore.weekly-1f139c91.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-0d818764.js → HEAD CIRCUM_BOYS.zscore.yearly-ba15501b.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-dddf5ad9.js → HEAD CIRCUM_GIRLS.percentile.monthly-a546201a.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-a80d6989.js → HEAD CIRCUM_GIRLS.percentile.weekly-66cd5a7e.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-01850b67.js → HEAD CIRCUM_GIRLS.percentile.yearly-9db3c653.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-82890053.js → HEAD CIRCUM_GIRLS.zscore.monthly-0405e2cb.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-069f8c8f.js → HEAD CIRCUM_GIRLS.zscore.weekly-b2cc3ad2.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-ae5ef237.js → HEAD CIRCUM_GIRLS.zscore.yearly-3115f993.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.monthly-d0da1664.js → HEIGHT_BOYS.percentile.monthly-35138a98.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.weekly-55446b8a.js → HEIGHT_BOYS.percentile.weekly-0216c35b.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.yearly-f2f5b19f.js → HEIGHT_BOYS.percentile.yearly-f698e45d.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.monthly-e6ed98ef.js → HEIGHT_BOYS.zscore.monthly-01195728.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.weekly-d0d37479.js → HEIGHT_BOYS.zscore.weekly-993e9cf2.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.yearly-4023b808.js → HEIGHT_BOYS.zscore.yearly-fee3ed69.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.monthly-6d9aeadc.js → HEIGHT_GIRLS.percentile.monthly-27b2474a.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.weekly-2087c9b4.js → HEIGHT_GIRLS.percentile.weekly-77bff236.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.yearly-f98d8b05.js → HEIGHT_GIRLS.percentile.yearly-6200a720.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.monthly-99d299e3.js → HEIGHT_GIRLS.zscore.monthly-94978e64.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.weekly-c46ed349.js → HEIGHT_GIRLS.zscore.weekly-7951beb1.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.yearly-fddefca4.js → HEIGHT_GIRLS.zscore.yearly-c2eca714.js} +0 -0
- /package/build/{Visible-01dfaec9.js → Visible-eee51ba6.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.monthly-cead8ece.js → WEIGHT_BOYS.percentile.monthly-6a6f901b.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.weekly-a97fa31a.js → WEIGHT_BOYS.percentile.weekly-737fb867.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.yearly-c2c41945.js → WEIGHT_BOYS.percentile.yearly-7772b5e5.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.monthly-d8de7dc2.js → WEIGHT_BOYS.zscore.monthly-8db2e7d6.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.weekly-41a6f6bf.js → WEIGHT_BOYS.zscore.weekly-ddd37c1a.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.yearly-5762fa8a.js → WEIGHT_BOYS.zscore.yearly-332a8f7b.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.monthly-526fb18a.js → WEIGHT_GIRLS.percentile.monthly-3edad688.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.weekly-6c63ed2b.js → WEIGHT_GIRLS.percentile.weekly-f113a82a.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.yearly-0ecdbd3a.js → WEIGHT_GIRLS.percentile.yearly-95afbeaf.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.monthly-0c353536.js → WEIGHT_GIRLS.zscore.monthly-d27c4bd4.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.weekly-97898ff6.js → WEIGHT_GIRLS.zscore.weekly-2b113519.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.yearly-cbebe807.js → WEIGHT_GIRLS.zscore.yearly-c82b04db.js} +0 -0
- /package/build/{animation-8605b5bb.js → animation-e1375a3b.js} +0 -0
- /package/build/{cart-ab5762b8.js → cart-67147d06.js} +0 -0
- /package/build/{cookieHelper-b2132ffc.js → cookieHelper-17491ce8.js} +0 -0
- /package/build/{doctor-f121fd79.js → doctor-17b525f8.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.monthly-e507536d.js → BMI_BOYS.percentile.monthly-7c9d4923.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.weekly-3cbf7392.js → BMI_BOYS.percentile.weekly-c410294a.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.yearly-c7d54bc3.js → BMI_BOYS.percentile.yearly-695a4fe2.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.monthly-4d09aca0.js → BMI_BOYS.zscore.monthly-9fb9f281.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.weekly-319b78c5.js → BMI_BOYS.zscore.weekly-d2109e4b.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.yearly-764732c5.js → BMI_BOYS.zscore.yearly-bfa5361b.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.monthly-5a8e4069.js → BMI_GIRLS.percentile.monthly-f5f60596.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.weekly-a2fe6df1.js → BMI_GIRLS.percentile.weekly-26e4e864.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.yearly-810fe911.js → BMI_GIRLS.percentile.yearly-5a2b297d.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.monthly-afab03b0.js → BMI_GIRLS.zscore.monthly-4e80bed5.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.weekly-8f4e7198.js → BMI_GIRLS.zscore.weekly-03b79f0b.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.yearly-7f043621.js → BMI_GIRLS.zscore.yearly-822ed949.js} +0 -0
- /package/build/esm/{ChevronDown-d24fd24b.js → ChevronDown-74267eb8.js} +0 -0
- /package/build/esm/{Close-6243d246.js → Close-372aa467.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-91c12176.js → HEAD CIRCUM_BOYS.percentile.monthly-21b04c4c.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-40e77c68.js → HEAD CIRCUM_BOYS.percentile.weekly-049a9d97.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-1a284ec4.js → HEAD CIRCUM_BOYS.percentile.yearly-a4bbbaba.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-16f716a6.js → HEAD CIRCUM_BOYS.zscore.monthly-7cb348c6.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-07d20112.js → HEAD CIRCUM_BOYS.zscore.weekly-678a1a52.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-1201a10a.js → HEAD CIRCUM_BOYS.zscore.yearly-db81b17e.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-a6348baf.js → HEAD CIRCUM_GIRLS.percentile.monthly-cee33cd5.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-af26363f.js → HEAD CIRCUM_GIRLS.percentile.weekly-2cec19c3.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-e7637928.js → HEAD CIRCUM_GIRLS.percentile.yearly-5949e664.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-9be0e0ca.js → HEAD CIRCUM_GIRLS.zscore.monthly-7c2bffab.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-3ffe9dcd.js → HEAD CIRCUM_GIRLS.zscore.weekly-356dd00a.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-d7226db1.js → HEAD CIRCUM_GIRLS.zscore.yearly-e7b62215.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.monthly-c2e21892.js → HEIGHT_BOYS.percentile.monthly-359c4335.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.weekly-22018f1e.js → HEIGHT_BOYS.percentile.weekly-a4d4acd3.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.yearly-391cd377.js → HEIGHT_BOYS.percentile.yearly-ec9a7f9b.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.monthly-e11f50f4.js → HEIGHT_BOYS.zscore.monthly-12331258.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.weekly-8e2c8306.js → HEIGHT_BOYS.zscore.weekly-172054d3.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.yearly-78e974bb.js → HEIGHT_BOYS.zscore.yearly-bb47a3be.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-0a49ff89.js → HEIGHT_GIRLS.percentile.monthly-c93c0b34.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-5e158a8e.js → HEIGHT_GIRLS.percentile.weekly-f1f83097.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-f5544ab2.js → HEIGHT_GIRLS.percentile.yearly-ccee4e55.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-92f67ec2.js → HEIGHT_GIRLS.zscore.monthly-caf5410c.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-f5d11f32.js → HEIGHT_GIRLS.zscore.weekly-b1e28b0e.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-4fe6aad9.js → HEIGHT_GIRLS.zscore.yearly-c3af35d3.js} +0 -0
- /package/build/esm/{Visible-7f408f98.js → Visible-3f9d7dca.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.monthly-b09ae73a.js → WEIGHT_BOYS.percentile.monthly-8a4647df.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.weekly-733a24a9.js → WEIGHT_BOYS.percentile.weekly-a2a6adf1.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.yearly-2bfcfc93.js → WEIGHT_BOYS.percentile.yearly-073df8b7.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.monthly-c0d3a746.js → WEIGHT_BOYS.zscore.monthly-bb9e73d2.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.weekly-b41ff498.js → WEIGHT_BOYS.zscore.weekly-ef32ce7a.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.yearly-15bb7570.js → WEIGHT_BOYS.zscore.yearly-6cc77688.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-5b79dea8.js → WEIGHT_GIRLS.percentile.monthly-a4b518bc.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-33052637.js → WEIGHT_GIRLS.percentile.weekly-dcedaebb.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-64382b53.js → WEIGHT_GIRLS.percentile.yearly-9e66577e.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-63f19584.js → WEIGHT_GIRLS.zscore.monthly-c07cb81f.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-938ebce2.js → WEIGHT_GIRLS.zscore.weekly-9c5c3e8e.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-016e1cfc.js → WEIGHT_GIRLS.zscore.yearly-e99ce511.js} +0 -0
- /package/build/esm/{animation-bf170ee9.js → animation-0b2299dc.js} +0 -0
- /package/build/esm/{cart-5bdb4fa5.js → cart-f961dadc.js} +0 -0
- /package/build/esm/{cookieHelper-ff6c13b4.js → cookieHelper-73ce3871.js} +0 -0
- /package/build/esm/{doctor-f4cadffb.js → doctor-8a07ca44.js} +0 -0
- /package/build/esm/{index-6c0f560b.js → index-782fed08.js} +0 -0
- /package/build/esm/{index-528e64f4.js → index-b65a8764.js} +0 -0
- /package/build/esm/{index-b87433a0.js → index-c3264b34.js} +0 -0
- /package/build/esm/{index-eeedf0f0.js → index-e3787b20.js} +0 -0
- /package/build/esm/{isProduction-2838b9ae.js → isProduction-5684a28c.js} +0 -0
- /package/build/esm/{localizeNumberFormat-9303c122.js → localizeNumberFormat-42ae8d89.js} +0 -0
- /package/build/esm/{normalizeLink-38ab69f4.js → normalizeLink-d6f57223.js} +0 -0
- /package/build/esm/{number-fcae69c7.js → number-13f075cf.js} +0 -0
- /package/build/esm/{paths-d1c61fa8.js → paths-49a813e7.js} +0 -0
- /package/build/esm/{theme-0af1cc3d.js → theme-f18c2351.js} +0 -0
- /package/build/esm/{translationsContext-036458b7.js → translationsContext-f3d1a7bd.js} +0 -0
- /package/build/esm/{tslib.es6-2673b49d.js → tslib.es6-761239c7.js} +0 -0
- /package/build/esm/{useIsInit-2c5ff93d.js → useIsInit-ee864235.js} +0 -0
- /package/build/esm/{useOutsideClick-7023de23.js → useOutsideClick-7451aa57.js} +0 -0
- /package/build/esm/{useScrollbarSize-dfdab229.js → useScrollbarSize-84bb5b47.js} +0 -0
- /package/build/esm/{useUniqueId-d4b0bdd3.js → useUniqueId-c23213b6.js} +0 -0
- /package/build/esm/{utils-511a24f4.js → utils-f8761b9d.js} +0 -0
- /package/build/{index-c524c362.js → index-97ebd7e1.js} +0 -0
- /package/build/{index-bced434a.js → index-ba3797bb.js} +0 -0
- /package/build/{index-5c400e5e.js → index-bba97c2e.js} +0 -0
- /package/build/{index-18ddaa1b.js → index-df5cd44b.js} +0 -0
- /package/build/{isProduction-2e55aee3.js → isProduction-aa963bf9.js} +0 -0
- /package/build/{localizeNumberFormat-2befc6e4.js → localizeNumberFormat-90d4f9d5.js} +0 -0
- /package/build/{normalizeLink-0fd36e61.js → normalizeLink-451ae6d8.js} +0 -0
- /package/build/{number-92da0262.js → number-c2338382.js} +0 -0
- /package/build/{paths-350514c4.js → paths-e0bbfce7.js} +0 -0
- /package/build/{theme-f410baf6.js → theme-e4f7f487.js} +0 -0
- /package/build/{translationsContext-11cafcfc.js → translationsContext-39528d2f.js} +0 -0
- /package/build/{tslib.es6-4bc45883.js → tslib.es6-7e140b89.js} +0 -0
- /package/build/{useIsInit-0f6d1879.js → useIsInit-38cec0c4.js} +0 -0
- /package/build/{useOutsideClick-e067cc79.js → useOutsideClick-e579e1ac.js} +0 -0
- /package/build/{useScrollbarSize-ed50b4a6.js → useScrollbarSize-5a8be010.js} +0 -0
- /package/build/{useUniqueId-4ce69bff.js → useUniqueId-8929fe5f.js} +0 -0
- /package/build/{utils-4849d92a.js → utils-524bda7c.js} +0 -0
|
@@ -0,0 +1,866 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var index = require('./index-d34cd464.js');
|
|
5
|
+
var styled = require('@emotion/styled');
|
|
6
|
+
var theme = require('./theme-e4f7f487.js');
|
|
7
|
+
var utils = require('./utils-524bda7c.js');
|
|
8
|
+
var index$1 = require('./index-05f106c2.js');
|
|
9
|
+
var index$2 = require('./index-def9867a.js');
|
|
10
|
+
var defaultClassWrapper = require('./defaultClassWrapper-e87ca8ef.js');
|
|
11
|
+
var tslib_es6 = require('./tslib.es6-7e140b89.js');
|
|
12
|
+
var flattenChildren = require('react-keyed-flatten-children');
|
|
13
|
+
|
|
14
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
15
|
+
|
|
16
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
17
|
+
var styled__default = /*#__PURE__*/_interopDefault(styled);
|
|
18
|
+
var flattenChildren__default = /*#__PURE__*/_interopDefault(flattenChildren);
|
|
19
|
+
|
|
20
|
+
var styles = {"alert":"CHw-fZZ","content":"_03U6VRS","close":"EO828Vv"};
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated Consider to use Mantine
|
|
24
|
+
*/
|
|
25
|
+
const Alert = ({ style, onClose, text, type, contentIcon, closeIcon, className, description, }) => {
|
|
26
|
+
return (React__default["default"].createElement("div", { className: `${styles.alert} ${className || ''}`, style: style, "data-alert-type": type },
|
|
27
|
+
React__default["default"].createElement("div", { className: styles.content },
|
|
28
|
+
React__default["default"].createElement("div", { className: "icon-title" },
|
|
29
|
+
contentIcon,
|
|
30
|
+
React__default["default"].createElement(index.Text, { weight: "bold", size: "label1" }, text)),
|
|
31
|
+
React__default["default"].createElement(index.Text, { weight: "regular", size: "p3" }, description)),
|
|
32
|
+
React__default["default"].createElement("div", { className: styles.close, onClick: onClose }, closeIcon)));
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const renderNotificationStyles = (type, size, hasIcon, color) => {
|
|
36
|
+
let sizeparams = '';
|
|
37
|
+
if (type === 'numeric') {
|
|
38
|
+
switch (size) {
|
|
39
|
+
case 'medium':
|
|
40
|
+
sizeparams = `
|
|
41
|
+
height: 16px;
|
|
42
|
+
font-size: 11px;
|
|
43
|
+
padding: 1px 6px;
|
|
44
|
+
`;
|
|
45
|
+
case 'large':
|
|
46
|
+
sizeparams = `
|
|
47
|
+
height: 24px;
|
|
48
|
+
font-size: 13px;
|
|
49
|
+
padding: 1px 10px;
|
|
50
|
+
`;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
let icon = '';
|
|
54
|
+
if (hasIcon) {
|
|
55
|
+
icon = `
|
|
56
|
+
position: absolute;
|
|
57
|
+
top: 0;
|
|
58
|
+
left: 75%;
|
|
59
|
+
`;
|
|
60
|
+
}
|
|
61
|
+
let numericIcon;
|
|
62
|
+
if (hasIcon) {
|
|
63
|
+
numericIcon = `
|
|
64
|
+
left: 70%;
|
|
65
|
+
|
|
66
|
+
${size === 'large'
|
|
67
|
+
? `
|
|
68
|
+
top: -7px;
|
|
69
|
+
`
|
|
70
|
+
: size === 'medium'
|
|
71
|
+
? `
|
|
72
|
+
top: -2px;
|
|
73
|
+
width: 16px;
|
|
74
|
+
height: 16px;
|
|
75
|
+
`
|
|
76
|
+
: ''}
|
|
77
|
+
`;
|
|
78
|
+
}
|
|
79
|
+
let notificationColor = '';
|
|
80
|
+
switch (color) {
|
|
81
|
+
case 'primary':
|
|
82
|
+
notificationColor = `
|
|
83
|
+
background: ${theme.theme.colors.primary50};
|
|
84
|
+
color: ${theme.theme.colors.primary600};
|
|
85
|
+
`;
|
|
86
|
+
break;
|
|
87
|
+
case 'error':
|
|
88
|
+
notificationColor = `
|
|
89
|
+
background: ${theme.theme.colors.error};
|
|
90
|
+
color: white;
|
|
91
|
+
`;
|
|
92
|
+
break;
|
|
93
|
+
}
|
|
94
|
+
switch (type) {
|
|
95
|
+
case 'dot':
|
|
96
|
+
return `
|
|
97
|
+
${icon}
|
|
98
|
+
width: 8px;
|
|
99
|
+
height: 8px;
|
|
100
|
+
font-size: 0px;
|
|
101
|
+
border-radius: 50%;
|
|
102
|
+
${notificationColor}
|
|
103
|
+
`;
|
|
104
|
+
case 'numeric':
|
|
105
|
+
return `
|
|
106
|
+
${icon}
|
|
107
|
+
width: max-content;
|
|
108
|
+
border-radius: 32px;
|
|
109
|
+
${sizeparams}
|
|
110
|
+
${numericIcon}
|
|
111
|
+
${notificationColor}
|
|
112
|
+
`;
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
const StyledBadge = styled__default["default"].div `
|
|
116
|
+
position: relative;
|
|
117
|
+
|
|
118
|
+
> div {
|
|
119
|
+
width: max-content;
|
|
120
|
+
position: relative;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
span {
|
|
124
|
+
font-weight: ${theme.theme.sizes.fwBold};
|
|
125
|
+
display: flex;
|
|
126
|
+
justify-content: center;
|
|
127
|
+
align-items: center;
|
|
128
|
+
|
|
129
|
+
${(props) => renderNotificationStyles(props.notificationType, props.notificationSize, props.hasIcon, props.notificationColor)}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
${(props) => props.hasIcon &&
|
|
133
|
+
`
|
|
134
|
+
svg {
|
|
135
|
+
width: 40px;
|
|
136
|
+
height: 40px;
|
|
137
|
+
}
|
|
138
|
+
`}
|
|
139
|
+
`;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* @deprecated Consider to use at '@hhgtech/hhg-components/mantine'
|
|
143
|
+
*/
|
|
144
|
+
const Badge = ({ amount, type, size = 'medium', color = 'primary', icon, className, }) => {
|
|
145
|
+
return (React__default["default"].createElement(StyledBadge, { "data-notification-type": type, "data-notification-size": size, "data-notification-color": color, "data-has-icon": !!icon || undefined, notificationType: type, notificationSize: size, notificationColor: color, hasIcon: !!icon, className: className },
|
|
146
|
+
React__default["default"].createElement("div", null,
|
|
147
|
+
amount && React__default["default"].createElement("span", null, amount),
|
|
148
|
+
" ",
|
|
149
|
+
icon && React__default["default"].createElement("div", null, icon))));
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
const StyledBorderHeading = styled__default["default"].h4 `
|
|
153
|
+
position: relative;
|
|
154
|
+
line-height: 18px;
|
|
155
|
+
|
|
156
|
+
&:after {
|
|
157
|
+
position: absolute;
|
|
158
|
+
top: 1px;
|
|
159
|
+
left: 0;
|
|
160
|
+
width: 4px;
|
|
161
|
+
height: 18px;
|
|
162
|
+
background-color: ${theme.theme.colors.primaryBase};
|
|
163
|
+
content: '';
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
&[data-size='lg'] {
|
|
167
|
+
font-size: 18px;
|
|
168
|
+
padding-left: 12px;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
&[data-size='sm'] {
|
|
172
|
+
font-size: 14px;
|
|
173
|
+
padding-left: 8px;
|
|
174
|
+
|
|
175
|
+
&::after {
|
|
176
|
+
width: 2px;
|
|
177
|
+
height: 15px;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
&[data-type='bold'] {
|
|
182
|
+
font-weight: ${theme.theme.sizes.fwBold};
|
|
183
|
+
}
|
|
184
|
+
&[data-type='semiBold'] {
|
|
185
|
+
font-weight: ${theme.theme.sizes.fwSemiBold};
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
&[data-uppercase] {
|
|
189
|
+
text-transform: uppercase;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
${utils.MediaQueries.mbDown} {
|
|
193
|
+
&[data-size='lg'] {
|
|
194
|
+
font-size: 16px;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
`;
|
|
198
|
+
|
|
199
|
+
const BorderHeading = ({ style, children, className, size = 'lg', type = 'bold', upperCase, as = 'h4', color, }) => (React__default["default"].createElement(StyledBorderHeading, { style: Object.assign({ color }, style), className: className, "data-size": size, "data-type": type, "data-uppercase": upperCase, as: as }, children));
|
|
200
|
+
|
|
201
|
+
const StyledDropdown = styled__default["default"].div `
|
|
202
|
+
position: relative;
|
|
203
|
+
box-sizing: border-box;
|
|
204
|
+
border: 1px solid ${theme.theme.colors.gray200};
|
|
205
|
+
background: url('../../../public/bgSvg/arrow-down.svg') no-repeat;
|
|
206
|
+
background-position: right 16px center;
|
|
207
|
+
border-radius: ${theme.theme.borderRadius};
|
|
208
|
+
|
|
209
|
+
&[data-has-icons='true'] {
|
|
210
|
+
border: none;
|
|
211
|
+
background: ${theme.theme.colors.gray100};
|
|
212
|
+
|
|
213
|
+
img,
|
|
214
|
+
svg {
|
|
215
|
+
display: inline-block;
|
|
216
|
+
max-width: 16px;
|
|
217
|
+
margin-right: 6px;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
span {
|
|
221
|
+
vertical-align: middle;
|
|
222
|
+
display: inline-block;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
&:hover {
|
|
226
|
+
box-shadow: none;
|
|
227
|
+
}
|
|
228
|
+
> div {
|
|
229
|
+
position: relative;
|
|
230
|
+
width: 100%;
|
|
231
|
+
display: flex;
|
|
232
|
+
align-items: center;
|
|
233
|
+
box-sizing: border-box;
|
|
234
|
+
}
|
|
235
|
+
> div::after {
|
|
236
|
+
content: '';
|
|
237
|
+
right: 12px;
|
|
238
|
+
top: 50%;
|
|
239
|
+
background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23595959' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A");
|
|
240
|
+
width: 10px;
|
|
241
|
+
height: 8px;
|
|
242
|
+
position: absolute;
|
|
243
|
+
background-repeat: no-repeat;
|
|
244
|
+
transform: translateY(-50%);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
&:hover {
|
|
249
|
+
box-shadow: 0 0 2px 2px ${theme.theme.colors.primary200};
|
|
250
|
+
}
|
|
251
|
+
`;
|
|
252
|
+
const StyledDropdownName = styled__default["default"].div `
|
|
253
|
+
padding: 12px 18px 12px 16px;
|
|
254
|
+
cursor: pointer;
|
|
255
|
+
&[data-dropdown-open] {
|
|
256
|
+
padding: 11px 15px 11px 15px;
|
|
257
|
+
border: 1px solid ${theme.theme.colors.primaryBase};
|
|
258
|
+
border-radius: ${theme.theme.borderRadius};
|
|
259
|
+
box-shadow: 0 0 2px 2px ${theme.theme.colors.primary200};
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
& > svg {
|
|
263
|
+
height: 16px;
|
|
264
|
+
width: 16px;
|
|
265
|
+
}
|
|
266
|
+
`;
|
|
267
|
+
const StyledDropdownList = styled__default["default"].ul `
|
|
268
|
+
position: absolute;
|
|
269
|
+
top: 100%;
|
|
270
|
+
right: 0;
|
|
271
|
+
left: 0;
|
|
272
|
+
display: block;
|
|
273
|
+
margin-top: 4px;
|
|
274
|
+
background: ${theme.theme.colors.white};
|
|
275
|
+
border-radius: ${theme.theme.borderRadius};
|
|
276
|
+
box-shadow: -1px 1px 2px rgba(67, 70, 74, 0.0001),
|
|
277
|
+
-2px 2px 5px rgba(67, 86, 100, 0.123689);
|
|
278
|
+
cursor: pointer;
|
|
279
|
+
|
|
280
|
+
&[data-has-icons='true'] {
|
|
281
|
+
background: white;
|
|
282
|
+
box-shadow: none;
|
|
283
|
+
border: 1px solid ${theme.theme.colors.gray200};
|
|
284
|
+
filter: drop-shadow(0px 10px 16px rgba(0, 0, 0, 0.04));
|
|
285
|
+
}
|
|
286
|
+
`;
|
|
287
|
+
const StyledDropdownOption = styled__default["default"].li `
|
|
288
|
+
margin: 8px;
|
|
289
|
+
padding: 12px 18px 12px 16px;
|
|
290
|
+
border-radius: ${theme.theme.borderRadius};
|
|
291
|
+
display: flex;
|
|
292
|
+
&:hover,
|
|
293
|
+
:active {
|
|
294
|
+
background: ${theme.theme.colors.gray100};
|
|
295
|
+
}
|
|
296
|
+
`;
|
|
297
|
+
const StyledIcon = styled__default["default"].div `
|
|
298
|
+
display: flex;
|
|
299
|
+
align-items: center;
|
|
300
|
+
margin-right: 8px;
|
|
301
|
+
|
|
302
|
+
& > svg {
|
|
303
|
+
height: 16px;
|
|
304
|
+
width: 16px;
|
|
305
|
+
}
|
|
306
|
+
`;
|
|
307
|
+
|
|
308
|
+
const ShareIconPathStyle = () => (React__default["default"].createElement("style", null, '.file-dropdown-path{fill:none;stroke:#595959;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.5px}'));
|
|
309
|
+
const DefaultFileIcon = () => (React__default["default"].createElement("svg", { id: "prefix__Layer_1", "data-name": "Layer 1", viewBox: "0 0 12.17 14.83" },
|
|
310
|
+
React__default["default"].createElement("defs", null,
|
|
311
|
+
React__default["default"].createElement("clipPath", { id: "prefix__clip-path", transform: "translate(-1.92 -1.54)" },
|
|
312
|
+
React__default["default"].createElement("path", { fill: "none", d: "M0 .96h16v16H0z" }))),
|
|
313
|
+
React__default["default"].createElement("title", null, 'File'),
|
|
314
|
+
React__default["default"].createElement("g", { clipPath: "url(#prefix__clip-path)" },
|
|
315
|
+
React__default["default"].createElement("path", { className: "file-dropdown-path", d: "M8.67 2.29H4a1.33 1.33 0 00-1.33 1.33v10.67A1.33 1.33 0 004 15.62h8a1.33 1.33 0 001.33-1.33V7z", transform: "translate(-1.92 -1.54)" }),
|
|
316
|
+
React__default["default"].createElement("path", { className: "file-dropdown-path", d: "M8.67 2.29V7h4.66", transform: "translate(-1.92 -1.54)" }))));
|
|
317
|
+
const DownloadIcon = () => (React__default["default"].createElement("svg", { id: "prefix__Layer_1", "data-name": "Layer 1", viewBox: "0 0 13.5 13.5" },
|
|
318
|
+
React__default["default"].createElement("title", null, 'download'),
|
|
319
|
+
React__default["default"].createElement("path", { className: "file-dropdown-path", d: "M14 11v2.66A1.33 1.33 0 0112.67 15H3.33A1.33 1.33 0 012 13.62V11M4.67 7.62L8 11l3.33-3.34M8 11V3", transform: "translate(-1.25 -2.21)" })));
|
|
320
|
+
const UploadIcon = () => (React__default["default"].createElement("svg", { id: "prefix__Layer_1", "data-name": "Layer 1", viewBox: "0 0 13.5 13.5" },
|
|
321
|
+
React__default["default"].createElement("title", null, 'upload'),
|
|
322
|
+
React__default["default"].createElement("path", { className: "file-dropdown-path", d: "M14 11v2.66A1.33 1.33 0 0112.67 15H3.33A1.33 1.33 0 012 13.62V11M11.33 6.29L8 3 4.67 6.29M8 3v8", transform: "translate(-1.25 -2.21)" })));
|
|
323
|
+
const FileDropdown = ({ className, value, options, onUploadSelected, id, placeholderIcon, placeholder, style, }) => {
|
|
324
|
+
const [isDropdownOpen, setIsDropdownOpen] = React.useState(false);
|
|
325
|
+
const showDropdown = () => setIsDropdownOpen(!isDropdownOpen);
|
|
326
|
+
const inputList = React.useRef(options.map((option) => {
|
|
327
|
+
return (option.type === 'upload' && (React__default["default"].createElement("input", { id: 'uploader-dropdown-input-' + id + '-' + option.value, key: 'uploader-dropdown-input-' + id + '-' + option.value, accept: option.fileAcceptedType, multiple: option.multiple, type: "file", style: { display: 'none' }, onChange: (e) => {
|
|
328
|
+
console.log('change');
|
|
329
|
+
onUploadSelected(e.target.files);
|
|
330
|
+
} })));
|
|
331
|
+
}));
|
|
332
|
+
const onUpload = (dropdownId) => {
|
|
333
|
+
var _a;
|
|
334
|
+
(_a = document.querySelector(dropdownId)) === null || _a === void 0 ? void 0 : _a.click();
|
|
335
|
+
};
|
|
336
|
+
const onDownload = (url) => {
|
|
337
|
+
url && window.open(url, '_blank');
|
|
338
|
+
};
|
|
339
|
+
return (React__default["default"].createElement(StyledDropdown, { className: className, "data-dropdown-open": !!isDropdownOpen, id: id, "data-has-icons": true, style: style, onBlur: () => setIsDropdownOpen(false), tabIndex: 0 },
|
|
340
|
+
React__default["default"].createElement(ShareIconPathStyle, null),
|
|
341
|
+
React__default["default"].createElement(StyledDropdownName, { onClick: showDropdown },
|
|
342
|
+
placeholderIcon || React__default["default"].createElement(DefaultFileIcon, null),
|
|
343
|
+
' ',
|
|
344
|
+
React__default["default"].createElement("span", null, value && value.value ? value.label : placeholder)),
|
|
345
|
+
isDropdownOpen && (React__default["default"].createElement(StyledDropdownList, { onClick: showDropdown, "data-has-icons": true }, options.map((option) => (React__default["default"].createElement(StyledDropdownOption, { key: `${id}-${option.value}`, "data-selected": (value && value.value === option.value) || undefined, onClick: () => option.type === 'upload'
|
|
346
|
+
? onUpload('#uploader-dropdown-input-' + id + '-' + option.value)
|
|
347
|
+
: onDownload(option.url) },
|
|
348
|
+
React__default["default"].createElement(StyledIcon, null, option.icon || option.type === 'download' ? (React__default["default"].createElement(DownloadIcon, null)) : (React__default["default"].createElement(UploadIcon, null))),
|
|
349
|
+
option.label))))),
|
|
350
|
+
React__default["default"].createElement(React__default["default"].Fragment, null, inputList.current)));
|
|
351
|
+
};
|
|
352
|
+
|
|
353
|
+
const StyledGrid = styled__default["default"].div `
|
|
354
|
+
--columns: var(--grid-template-columns, repeat(var(--columns-count), 1fr));
|
|
355
|
+
--columns-desktop: var(
|
|
356
|
+
--grid-template-columns-desktop,
|
|
357
|
+
repeat(var(--columns-count-desktop), 1fr)
|
|
358
|
+
);
|
|
359
|
+
display: grid;
|
|
360
|
+
grid-template-columns: var(--columns);
|
|
361
|
+
grid-gap: var(--grid-gap);
|
|
362
|
+
align-items: var(--align-items);
|
|
363
|
+
|
|
364
|
+
${utils.MediaQueries.tdUp} {
|
|
365
|
+
grid-template-columns: var(--columns-desktop);
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
> * {
|
|
369
|
+
justify-self: var(--justify-children);
|
|
370
|
+
}
|
|
371
|
+
`;
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* @deprecated Consider to use mantine
|
|
375
|
+
*/
|
|
376
|
+
const Grid = ({ className, columns, columnsDesktop, gridTemplateColumns, gridTemplateColumnsDesktop, gap, children, justifyChildren, style, alignItems, }) => {
|
|
377
|
+
return (React__default["default"].createElement(StyledGrid, { className: className, style: Object.assign({ '--columns-count': columns, '--columns-count-desktop': columnsDesktop, '--grid-template-columns': gridTemplateColumns, '--grid-template-columns-desktop': gridTemplateColumnsDesktop, '--justify-children': justifyChildren, '--grid-gap': gap, '--align-items': alignItems }, style) }, children));
|
|
378
|
+
};
|
|
379
|
+
|
|
380
|
+
const StyledPagination = styled__default["default"].div `
|
|
381
|
+
display: flex;
|
|
382
|
+
align-items: center;
|
|
383
|
+
justify-content: space-between;
|
|
384
|
+
user-select: none;
|
|
385
|
+
li {
|
|
386
|
+
transition: all 0.3s ease;
|
|
387
|
+
}
|
|
388
|
+
[data-page-active] {
|
|
389
|
+
background: ${theme.theme.colors.primaryBase};
|
|
390
|
+
color: ${theme.theme.colors.white};
|
|
391
|
+
|
|
392
|
+
> a {
|
|
393
|
+
color: ${theme.theme.colors.white};
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
`;
|
|
397
|
+
const StyledPageBlock = styled__default["default"].div `
|
|
398
|
+
display: flex;
|
|
399
|
+
width: 32px;
|
|
400
|
+
height: 32px;
|
|
401
|
+
box-sizing: border-box;
|
|
402
|
+
align-items: center;
|
|
403
|
+
justify-content: center;
|
|
404
|
+
border: 1px solid ${theme.theme.colors.gray200};
|
|
405
|
+
margin: 0 2px;
|
|
406
|
+
border-radius: 4px;
|
|
407
|
+
color: ${theme.theme.colors.gray800};
|
|
408
|
+
cursor: pointer;
|
|
409
|
+
font-size: 14px;
|
|
410
|
+
font-weight: ${theme.theme.sizes.fwBold};
|
|
411
|
+
|
|
412
|
+
&[data-last-page] {
|
|
413
|
+
border: none;
|
|
414
|
+
background-color: ${theme.theme.colors.gray100};
|
|
415
|
+
cursor: not-allowed;
|
|
416
|
+
pointer-events: none;
|
|
417
|
+
|
|
418
|
+
svg {
|
|
419
|
+
path {
|
|
420
|
+
stroke: ${theme.theme.colors.gray300};
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
`;
|
|
425
|
+
const StyledPaginationBlock = styled__default["default"].li `
|
|
426
|
+
display: flex;
|
|
427
|
+
width: 32px;
|
|
428
|
+
height: 32px;
|
|
429
|
+
align-items: center;
|
|
430
|
+
justify-content: center;
|
|
431
|
+
margin: 0 2px;
|
|
432
|
+
border-radius: 4px;
|
|
433
|
+
color: ${theme.theme.colors.gray800};
|
|
434
|
+
cursor: pointer;
|
|
435
|
+
font-size: 14px;
|
|
436
|
+
font-weight: ${theme.theme.sizes.fwBold};
|
|
437
|
+
|
|
438
|
+
> a {
|
|
439
|
+
color: ${theme.theme.colors.gray800};
|
|
440
|
+
text-decoration: unset;
|
|
441
|
+
display: block;
|
|
442
|
+
width: 100%;
|
|
443
|
+
height: 100%;
|
|
444
|
+
line-height: 32px;
|
|
445
|
+
text-align: center;
|
|
446
|
+
}
|
|
447
|
+
`;
|
|
448
|
+
|
|
449
|
+
const RenderPagiWithDots = ({ pagesAmount, activePage, handlePageChange, handleClick, href, queryPageName = 'page', }) => {
|
|
450
|
+
const pages = [...Array(pagesAmount)].map((__v, i) => i + 1);
|
|
451
|
+
const [visiblePages, setVisiblePages] = React.useState(activePage <= 4
|
|
452
|
+
? pages.slice(0, 5)
|
|
453
|
+
: activePage >= pages.length - 3
|
|
454
|
+
? pages.slice(pages.length - 5, pages.length)
|
|
455
|
+
: pages.slice(activePage - 2, activePage + 1));
|
|
456
|
+
React.useEffect(() => {
|
|
457
|
+
if (activePage <= 4) {
|
|
458
|
+
setVisiblePages(pages.slice(0, 5));
|
|
459
|
+
}
|
|
460
|
+
else if (activePage >= pages.length - 3) {
|
|
461
|
+
setVisiblePages(pages.slice(pages.length - 5, pages.length));
|
|
462
|
+
}
|
|
463
|
+
else {
|
|
464
|
+
setVisiblePages(pages.slice(activePage - 2, activePage + 1));
|
|
465
|
+
}
|
|
466
|
+
}, [activePage]);
|
|
467
|
+
return (React__default["default"].createElement(React.Fragment, null,
|
|
468
|
+
activePage > 4 && (React__default["default"].createElement(React.Fragment, null,
|
|
469
|
+
React__default["default"].createElement(StyledPaginationBlock, { onClick: () => handlePageChange(1) }, href ? (React__default["default"].createElement("a", { href: href, onClick: handleClick }, 1)) : (1)),
|
|
470
|
+
React__default["default"].createElement(StyledPaginationBlock, null, "..."))),
|
|
471
|
+
visiblePages.map((i) => (React__default["default"].createElement(StyledPaginationBlock, { key: `${'pagination'}+${i}`, "data-page-active": i === activePage || undefined, onClick: () => handlePageChange(i) }, href ? (React__default["default"].createElement("a", { href: utils.formatUrlWithPageParam(href, i, queryPageName), onClick: handleClick }, i)) : (i)))),
|
|
472
|
+
activePage < pages.length - 3 && (React__default["default"].createElement(React.Fragment, null,
|
|
473
|
+
React__default["default"].createElement(StyledPaginationBlock, null, "..."),
|
|
474
|
+
React__default["default"].createElement(StyledPaginationBlock, { onClick: () => handlePageChange(pages.length) }, href ? (React__default["default"].createElement("a", { href: utils.formatUrlWithPageParam(href, pages.length, queryPageName), onClick: handleClick }, pages.length)) : (pages.length))))));
|
|
475
|
+
};
|
|
476
|
+
const Pagination = ({ className, pagesAmount, currentPage, onChange, onClick, style, href: _href, queryPageName = 'page', }) => {
|
|
477
|
+
const pages = [...Array(pagesAmount)].map((__v, i) => i + 1);
|
|
478
|
+
const [activePage, setActivePage] = React.useState(currentPage);
|
|
479
|
+
const href = React.useMemo(() => {
|
|
480
|
+
// Props `href` is updated from the version 1.8.4 and later. Please change the way to use this props properly
|
|
481
|
+
// - To avoid crash app, transform href for the old way and remove the part &page=
|
|
482
|
+
// /care/ho-chi-minh/hospital/da-khoa/&page=
|
|
483
|
+
// -> /care/ho-chi-minh/hospital/da-khoa/
|
|
484
|
+
if (_href && _href.endsWith('&page=')) {
|
|
485
|
+
return _href.replace('&page=', '');
|
|
486
|
+
}
|
|
487
|
+
return _href;
|
|
488
|
+
}, [_href]);
|
|
489
|
+
const totalArray = pagesAmount - 1;
|
|
490
|
+
const handlePageChange = (p) => {
|
|
491
|
+
if (p <= pagesAmount && p > 0) {
|
|
492
|
+
setActivePage(p);
|
|
493
|
+
onChange(p);
|
|
494
|
+
}
|
|
495
|
+
};
|
|
496
|
+
const handleClick = (e) => {
|
|
497
|
+
onClick && onClick(e);
|
|
498
|
+
};
|
|
499
|
+
React.useEffect(() => {
|
|
500
|
+
setActivePage(currentPage);
|
|
501
|
+
}, [currentPage]);
|
|
502
|
+
return (React__default["default"].createElement(StyledPagination, { className: className, style: style },
|
|
503
|
+
React__default["default"].createElement(StyledPageBlock, { className: "prev-page", onClick: () => handlePageChange(activePage - 1), "data-last-page": activePage === 1 || undefined }, href ? (React__default["default"].createElement("a", { href: utils.formatUrlWithPageParam(href, activePage, queryPageName), onClick: handleClick },
|
|
504
|
+
React__default["default"].createElement("svg", { width: "7", height: "10", viewBox: "0 0 7 10", fill: "none" },
|
|
505
|
+
React__default["default"].createElement("path", { d: "M5.5 9L1.5 5L5.5 1", stroke: "#2D87F3", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })))) : (React__default["default"].createElement("svg", { width: "7", height: "10", viewBox: "0 0 7 10", fill: "none" },
|
|
506
|
+
React__default["default"].createElement("path", { d: "M5.5 9L1.5 5L5.5 1", stroke: "#2D87F3", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })))),
|
|
507
|
+
pages.length > 8 ? (React__default["default"].createElement(RenderPagiWithDots, { pagesAmount: pagesAmount, activePage: activePage, handlePageChange: handlePageChange, handleClick: handleClick, href: href, queryPageName: queryPageName })) : (pages.map((i) => (React__default["default"].createElement(StyledPaginationBlock, { key: `${'pagination'}+${i}`, "data-page-active": i === activePage || undefined, onClick: () => handlePageChange(i) }, href ? (React__default["default"].createElement("a", { href: utils.formatUrlWithPageParam(href, i, queryPageName), onClick: handleClick }, i)) : (i))))),
|
|
508
|
+
React__default["default"].createElement(StyledPageBlock, { className: "next-page", onClick: () => handlePageChange(activePage + 1), "data-last-page": activePage === totalArray + 1 || undefined }, href ? (React__default["default"].createElement("a", { href: utils.formatUrlWithPageParam(href, activePage, queryPageName), onClick: handleClick },
|
|
509
|
+
React__default["default"].createElement("svg", { width: "7", height: "10", viewBox: "0 0 7 10", fill: "none" },
|
|
510
|
+
React__default["default"].createElement("path", { d: "M1.5 9L5.5 5L1.5 1", stroke: "#2D87F3", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })))) : (React__default["default"].createElement("svg", { width: "7", height: "10", viewBox: "0 0 7 10", fill: "none" },
|
|
511
|
+
React__default["default"].createElement("path", { d: "M1.5 9L5.5 5L1.5 1", stroke: "#2D87F3", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }))))));
|
|
512
|
+
};
|
|
513
|
+
|
|
514
|
+
/**
|
|
515
|
+
* @deprecated Consider to use import { Radio } from '@mantine/core'
|
|
516
|
+
*/
|
|
517
|
+
const Radio = ({ size = 'small', label, name, checked, value, className, isDisabled = false, onChange, dataEventCategory, dataEventAction, dataEventLabel, }) => {
|
|
518
|
+
const isHasTracking = !!dataEventAction && !!dataEventCategory && !!dataEventLabel;
|
|
519
|
+
const trackingProps = isHasTracking
|
|
520
|
+
? {
|
|
521
|
+
'data-event-category': dataEventCategory,
|
|
522
|
+
'data-event-action': dataEventAction,
|
|
523
|
+
'data-event-label': dataEventLabel,
|
|
524
|
+
}
|
|
525
|
+
: {};
|
|
526
|
+
return (React__default["default"].createElement(index$1.Radio
|
|
527
|
+
// type,
|
|
528
|
+
, Object.assign({
|
|
529
|
+
// type,
|
|
530
|
+
size: size === 'small' ? 'md' : 'lg', label: label, name: name, checked: checked, value: value, className: className, disabled: isDisabled, onChange: (e) => onChange === null || onChange === void 0 ? void 0 : onChange(e.target.value) }, trackingProps)));
|
|
531
|
+
};
|
|
532
|
+
|
|
533
|
+
const getTag = (tag, isLight) => {
|
|
534
|
+
switch (tag) {
|
|
535
|
+
case 'yellow': {
|
|
536
|
+
const color = isLight ? theme.theme.colors.yellow50 : theme.theme.colors.yellow600;
|
|
537
|
+
return `
|
|
538
|
+
background: ${color};
|
|
539
|
+
p {
|
|
540
|
+
color: var(
|
|
541
|
+
--text-props-color,
|
|
542
|
+
${theme.theme.colors.gray800}
|
|
543
|
+
);
|
|
544
|
+
}
|
|
545
|
+
`;
|
|
546
|
+
}
|
|
547
|
+
case 'standard': {
|
|
548
|
+
return `
|
|
549
|
+
background: ${theme.theme.colors.white};
|
|
550
|
+
border: 1px solid ${theme.theme.colors.gray200};
|
|
551
|
+
|
|
552
|
+
p {
|
|
553
|
+
color: var(
|
|
554
|
+
--text-props-color,
|
|
555
|
+
${theme.theme.colors.gray800}
|
|
556
|
+
);
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
&:hover {
|
|
560
|
+
background: ${theme.theme.colors.gray100};
|
|
561
|
+
}
|
|
562
|
+
`;
|
|
563
|
+
}
|
|
564
|
+
case 'red': {
|
|
565
|
+
const color = isLight ? theme.theme.colors.red50 : theme.theme.colors.red500;
|
|
566
|
+
return `
|
|
567
|
+
background: ${color};
|
|
568
|
+
`;
|
|
569
|
+
}
|
|
570
|
+
case 'green': {
|
|
571
|
+
const color = isLight ? theme.theme.colors.green50 : theme.theme.colors.green500;
|
|
572
|
+
return `
|
|
573
|
+
background: ${color};
|
|
574
|
+
`;
|
|
575
|
+
}
|
|
576
|
+
case 'blue': {
|
|
577
|
+
const color = isLight ? theme.theme.colors.primary50 : theme.theme.colors.primaryBase;
|
|
578
|
+
return `
|
|
579
|
+
background: ${color};
|
|
580
|
+
`;
|
|
581
|
+
}
|
|
582
|
+
case 'teal': {
|
|
583
|
+
const color = isLight ? theme.theme.colors.teal100 : theme.theme.colors.teal600;
|
|
584
|
+
return `
|
|
585
|
+
background: ${color};
|
|
586
|
+
`;
|
|
587
|
+
}
|
|
588
|
+
case 'pink': {
|
|
589
|
+
const color = isLight ? theme.theme.colors.pink200 : theme.theme.colors.pink800;
|
|
590
|
+
return `
|
|
591
|
+
background: ${color};
|
|
592
|
+
`;
|
|
593
|
+
}
|
|
594
|
+
case 'violet': {
|
|
595
|
+
const color = isLight ? theme.theme.colors.violet100 : theme.theme.colors.violet500;
|
|
596
|
+
return `
|
|
597
|
+
background: ${color};
|
|
598
|
+
`;
|
|
599
|
+
}
|
|
600
|
+
case 'grey': {
|
|
601
|
+
const color = isLight ? theme.theme.colors.gray100 : theme.theme.colors.gray600;
|
|
602
|
+
return `
|
|
603
|
+
background: ${color};
|
|
604
|
+
`;
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
};
|
|
608
|
+
const StyledTag = styled__default["default"].div `
|
|
609
|
+
--padding-horizontal: 8px;
|
|
610
|
+
--pading-vertical: 2px;
|
|
611
|
+
display: flex;
|
|
612
|
+
align-items: center;
|
|
613
|
+
justify-content: center;
|
|
614
|
+
padding: var(--pading-vertical) var(--padding-horizontal);
|
|
615
|
+
border-radius: 24px;
|
|
616
|
+
|
|
617
|
+
${(props) => props.tagType === 'sponsored' &&
|
|
618
|
+
`
|
|
619
|
+
--offset-size: 4px;
|
|
620
|
+
display: flex;
|
|
621
|
+
align-items: center;
|
|
622
|
+
justify-content: center;
|
|
623
|
+
box-sizing: content-box;
|
|
624
|
+
position: relative;
|
|
625
|
+
box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.08);
|
|
626
|
+
border-radius: 0 4px 18px 0;
|
|
627
|
+
height: 24px;
|
|
628
|
+
width: 90px;
|
|
629
|
+
border-left: var(--offset-size) solid ${theme.theme.colors.accentLight};
|
|
630
|
+
padding: 0;
|
|
631
|
+
margin-left: calc(var(--offset-size) * -1);
|
|
632
|
+
|
|
633
|
+
p {
|
|
634
|
+
font-weight: ${theme.theme.sizes.fwBold};
|
|
635
|
+
color: var(
|
|
636
|
+
--text-props-color,
|
|
637
|
+
${theme.theme.colors.secondaryDark}
|
|
638
|
+
);
|
|
639
|
+
font-size: 11px;
|
|
640
|
+
margin-left: calc(var(--offset-size) * -1);
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
&::after {
|
|
644
|
+
width: calc(var(--offset-size) * 2);
|
|
645
|
+
height: var(--offset-size);
|
|
646
|
+
background: ${theme.theme.colors.accentMain};
|
|
647
|
+
position: absolute;
|
|
648
|
+
left: calc(var(--offset-size) * -1);
|
|
649
|
+
bottom: calc(var(--offset-size) * -1);
|
|
650
|
+
clip-path: polygon(0 1%, 100% 0%, 100% 100%);
|
|
651
|
+
content: '';
|
|
652
|
+
}
|
|
653
|
+
`}
|
|
654
|
+
|
|
655
|
+
${(props) => props.isInline &&
|
|
656
|
+
`
|
|
657
|
+
display: inline-block;
|
|
658
|
+
`}
|
|
659
|
+
|
|
660
|
+
${(props) => props.tagHasMorePadding &&
|
|
661
|
+
`
|
|
662
|
+
&[data-has-more-padding] {
|
|
663
|
+
padding: calc(var(--pading-vertical) + 5px) var(--padding-horizontal);
|
|
664
|
+
}
|
|
665
|
+
`}
|
|
666
|
+
|
|
667
|
+
p {
|
|
668
|
+
${(props) => props.tagIsLight
|
|
669
|
+
? `
|
|
670
|
+
color: var(--text-props-color, #000);
|
|
671
|
+
`
|
|
672
|
+
: `
|
|
673
|
+
color: var(--text-props-color, ${theme.theme.colors.white});
|
|
674
|
+
`}
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
${(props) => getTag(props.tagType, props.tagIsLight)}
|
|
678
|
+
|
|
679
|
+
${(props) => props.tagIsSquared &&
|
|
680
|
+
props.tagType !== 'sponsored' &&
|
|
681
|
+
`
|
|
682
|
+
border-radius: 4px;
|
|
683
|
+
`}
|
|
684
|
+
|
|
685
|
+
${(props) => props.tagIsALink &&
|
|
686
|
+
`
|
|
687
|
+
cursor: pointer;
|
|
688
|
+
`}
|
|
689
|
+
|
|
690
|
+
&[data-is-selected],
|
|
691
|
+
&:active {
|
|
692
|
+
background: ${theme.theme.colors.primary50};
|
|
693
|
+
}
|
|
694
|
+
`;
|
|
695
|
+
|
|
696
|
+
const Tag = ({ type, children, style, isInline, isSquared = false, className, isLight, hasMorePadding, isLink, isSelected, textProps = {
|
|
697
|
+
size: 'sm',
|
|
698
|
+
}, }) => {
|
|
699
|
+
const textColor = textProps.color
|
|
700
|
+
? { '--text-props-color': textProps.color }
|
|
701
|
+
: {};
|
|
702
|
+
return (React__default["default"].createElement(StyledTag, { "data-is-squared": isSquared || undefined, "data-tag-type": type, "data-is-light": isLight || undefined, "data-has-more-padding": hasMorePadding || undefined, "data-is-inline": isInline || undefined, style: Object.assign(Object.assign({}, style), textColor), className: className, "data-is-selected": isSelected || undefined, "data-is-link": isLink || undefined, tagType: type, isInline: isInline, tagHasMorePadding: hasMorePadding, tagIsLight: isLight, tagIsSquared: isSquared, tagIsALink: isLink },
|
|
703
|
+
React__default["default"].createElement(index$2.Text, Object.assign({}, textProps), children)));
|
|
704
|
+
};
|
|
705
|
+
|
|
706
|
+
const heightIcon = '24px';
|
|
707
|
+
const StyledToggleIcon = defaultClassWrapper.setDefaultClass(styled__default["default"].span `
|
|
708
|
+
position: relative;
|
|
709
|
+
display: block;
|
|
710
|
+
width: 40px;
|
|
711
|
+
height: ${heightIcon};
|
|
712
|
+
background: #c3cbd4;
|
|
713
|
+
border-radius: 100px;
|
|
714
|
+
cursor: pointer;
|
|
715
|
+
|
|
716
|
+
&:after {
|
|
717
|
+
position: absolute;
|
|
718
|
+
top: 2px;
|
|
719
|
+
left: 2px;
|
|
720
|
+
width: 20px;
|
|
721
|
+
height: 20px;
|
|
722
|
+
background: #fff;
|
|
723
|
+
border-radius: 90px;
|
|
724
|
+
content: '';
|
|
725
|
+
transition: 0.3s;
|
|
726
|
+
}
|
|
727
|
+
`, 'hhgcomp-toggle-icon');
|
|
728
|
+
const StyledToggleLabel = styled__default["default"].span `
|
|
729
|
+
padding-left: 15px;
|
|
730
|
+
`;
|
|
731
|
+
const StyledToggle = styled__default["default"].div `
|
|
732
|
+
height: ${heightIcon};
|
|
733
|
+
|
|
734
|
+
input[type='checkbox'] {
|
|
735
|
+
width: 0;
|
|
736
|
+
height: 0;
|
|
737
|
+
visibility: hidden;
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
label {
|
|
741
|
+
cursor: pointer;
|
|
742
|
+
display: inline-flex;
|
|
743
|
+
color: ${theme.theme.colors.gray600};
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
input:checked + label ${StyledToggleIcon.classSelector} {
|
|
747
|
+
background: ${theme.theme.colors.primaryBase};
|
|
748
|
+
&:after {
|
|
749
|
+
left: calc(100% - 2px);
|
|
750
|
+
transform: translateX(-100%);
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
`;
|
|
754
|
+
|
|
755
|
+
/**
|
|
756
|
+
* @deprecated Consider to use {@link Switch} at {@link https://www.npmjs.com/package/@hhgtech/hhg-components/mantine}
|
|
757
|
+
*/
|
|
758
|
+
const Toggle = ({ className, id, onChange, checked, style, label }) => (React__default["default"].createElement(StyledToggle, { className: className, style: style },
|
|
759
|
+
React__default["default"].createElement("input", { type: "checkbox", id: id, onChange: onChange, checked: checked }),
|
|
760
|
+
React__default["default"].createElement("label", { htmlFor: id },
|
|
761
|
+
React__default["default"].createElement(StyledToggleIcon, null),
|
|
762
|
+
label && React__default["default"].createElement(StyledToggleLabel, null, label))));
|
|
763
|
+
|
|
764
|
+
const StyledRateStars = styled__default["default"].div `
|
|
765
|
+
display: inline-flex;
|
|
766
|
+
|
|
767
|
+
gap: calc(var(--gap) * 1px);
|
|
768
|
+
> svg {
|
|
769
|
+
width: calc(var(--star-size) * 1px);
|
|
770
|
+
height: calc(var(--star-size) * 1px);
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
&[data-selectable='true'] {
|
|
774
|
+
> svg {
|
|
775
|
+
cursor: pointer;
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
`;
|
|
779
|
+
|
|
780
|
+
const StarHalfIcon = (props) => {
|
|
781
|
+
return (React__default["default"].createElement("svg", Object.assign({}, props, { viewBox: "0 0 24 24", fill: "none" }),
|
|
782
|
+
React__default["default"].createElement("path", { d: "m139.287 144.772 5.17 3.12c.38.23.85-.11.75-.54l-1.37-5.88 4.56-3.95c.33-.29.16-.84-.29-.88l-6.01-.51-2.35-5.54a.498.498 0 0 0-.92 0l-2.35 5.54-6.01.51a.499.499 0 0 0-.28.88l4.56 3.95-1.37 5.88c-.1.43.37.77.75.54z", fill: "#E4E8EC" }),
|
|
783
|
+
React__default["default"].createElement("path", { d: "M139.289 144.771s.013-14.488 0-14.488a.49.49 0 0 0-.46.308l-2.35 5.54-6.01.51a.499.499 0 0 0-.28.88l4.56 3.95-1.37 5.88c-.1.43.37.77.75.54z", fill: "#FFC326" })));
|
|
784
|
+
};
|
|
785
|
+
|
|
786
|
+
const StarIcon = (_a) => {
|
|
787
|
+
var { isFull } = _a, props = tslib_es6.__rest(_a, ["isFull"]);
|
|
788
|
+
return (React__default["default"].createElement("svg", Object.assign({}, props, { viewBox: "0 0 32 32", fill: "none" }),
|
|
789
|
+
React__default["default"].createElement("path", { d: "m16 23.027 6.893 4.16c.507.306 1.134-.147 1-.72l-1.826-7.84 6.08-5.267a.67.67 0 0 0-.387-1.173l-8.013-.68-3.134-7.387a.664.664 0 0 0-1.226 0l-3.133 7.387-8.014.68a.668.668 0 0 0-.373 1.173l6.08 5.267-1.827 7.84c-.133.573.493 1.026 1 .72z", fill: isFull ? '#FFC326' : '#D2D6DC' })));
|
|
790
|
+
};
|
|
791
|
+
|
|
792
|
+
/**
|
|
793
|
+
*
|
|
794
|
+
* Show 5 (or more) stars and allow user vote (optional)
|
|
795
|
+
*
|
|
796
|
+
*/
|
|
797
|
+
const RateStars = ({ gap = 2, size = 24, star, totalStars = 5, onSelect, hideEmptyStars, style, className, }) => {
|
|
798
|
+
const numberOfFullStars = Math.floor(star);
|
|
799
|
+
const numberOfHalfStars = star - numberOfFullStars >= 0.5 ? 1 : 0;
|
|
800
|
+
const [tempStar, setTempStar] = React.useState(null);
|
|
801
|
+
const tempFullStars = tempStar || numberOfFullStars;
|
|
802
|
+
const tempHalfStars = tempStar ? 0 : numberOfHalfStars;
|
|
803
|
+
return (React__default["default"].createElement(StyledRateStars, { "data-selectable": !!onSelect, style: Object.assign({ '--gap': gap, '--star-size': size }, style), className: className }, Array.from({
|
|
804
|
+
length: hideEmptyStars
|
|
805
|
+
? numberOfFullStars + numberOfHalfStars
|
|
806
|
+
: totalStars,
|
|
807
|
+
}).map((_, index) => {
|
|
808
|
+
const onMouseOver = () => !!onSelect && setTempStar(index + 1);
|
|
809
|
+
const onMouseLeave = () => !!onSelect && setTempStar(null);
|
|
810
|
+
return index + 1 <= tempFullStars ? (React__default["default"].createElement(StarIcon, { key: index, onClick: () => onSelect === null || onSelect === void 0 ? void 0 : onSelect(index + 1), onMouseOver: onMouseOver, onMouseLeave: onMouseLeave, isFull: true })) : index + 1 === tempFullStars + tempHalfStars ? (React__default["default"].createElement(StarHalfIcon, { key: index, onClick: () => onSelect === null || onSelect === void 0 ? void 0 : onSelect(index + 1), onMouseOver: onMouseOver, onMouseLeave: onMouseLeave })) : (React__default["default"].createElement(StarIcon, { key: index, onClick: () => onSelect === null || onSelect === void 0 ? void 0 : onSelect(index + 1), onMouseOver: onMouseOver, onMouseLeave: onMouseLeave }));
|
|
811
|
+
})));
|
|
812
|
+
};
|
|
813
|
+
|
|
814
|
+
// define shared context
|
|
815
|
+
const StepRendererContext = React.createContext({
|
|
816
|
+
currentStep: 0,
|
|
817
|
+
setCurrentStep: () => false,
|
|
818
|
+
setMaxStep: () => false,
|
|
819
|
+
nextStep: () => false,
|
|
820
|
+
prevStep: () => false,
|
|
821
|
+
});
|
|
822
|
+
const StepRenderer = ({ children, onStepChange }) => {
|
|
823
|
+
const [currentStep, setCurrentStep] = React.useState(0);
|
|
824
|
+
const [maxStep, setMaxStep] = React.useState(0);
|
|
825
|
+
const childrenCount = React__default["default"].Children.count(children);
|
|
826
|
+
React.useEffect(() => {
|
|
827
|
+
setMaxStep(childrenCount - 1);
|
|
828
|
+
}, [childrenCount]);
|
|
829
|
+
React.useEffect(() => {
|
|
830
|
+
onStepChange === null || onStepChange === void 0 ? void 0 : onStepChange(currentStep);
|
|
831
|
+
}, [currentStep]);
|
|
832
|
+
const nextStep = () => currentStep + 1 <= maxStep && setCurrentStep(currentStep + 1);
|
|
833
|
+
const prevStep = () => currentStep - 1 >= 0 && setCurrentStep(currentStep - 1);
|
|
834
|
+
return (React__default["default"].createElement(StepRendererContext.Provider, { value: {
|
|
835
|
+
currentStep,
|
|
836
|
+
setCurrentStep,
|
|
837
|
+
setMaxStep,
|
|
838
|
+
nextStep,
|
|
839
|
+
prevStep,
|
|
840
|
+
} }, flattenChildren__default["default"](children).map((element, idx) => {
|
|
841
|
+
const active = idx === currentStep;
|
|
842
|
+
return (React__default["default"].createElement(React.Fragment, { key: idx }, !React__default["default"].isValidElement(element)
|
|
843
|
+
? active
|
|
844
|
+
? element
|
|
845
|
+
: null
|
|
846
|
+
: element.props.alwaysRender || active
|
|
847
|
+
? React__default["default"].cloneElement(element, {
|
|
848
|
+
isActive: idx === currentStep,
|
|
849
|
+
stepIndex: idx,
|
|
850
|
+
})
|
|
851
|
+
: null));
|
|
852
|
+
})));
|
|
853
|
+
};
|
|
854
|
+
|
|
855
|
+
exports.Alert = Alert;
|
|
856
|
+
exports.Badge = Badge;
|
|
857
|
+
exports.BorderHeading = BorderHeading;
|
|
858
|
+
exports.FileDropdown = FileDropdown;
|
|
859
|
+
exports.Grid = Grid;
|
|
860
|
+
exports.Pagination = Pagination;
|
|
861
|
+
exports.Radio = Radio;
|
|
862
|
+
exports.RateStars = RateStars;
|
|
863
|
+
exports.StepRenderer = StepRenderer;
|
|
864
|
+
exports.StepRendererContext = StepRendererContext;
|
|
865
|
+
exports.Tag = Tag;
|
|
866
|
+
exports.Toggle = Toggle;
|