@hhgtech/hhg-components 1.29.79 → 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-aefa01a7.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 +18 -18
- package/build/components.js +179 -163
- package/build/{constants-94957c92.js → constants-3a475a22.js} +2 -2
- package/build/constants-513a9a41.js +318 -0
- package/build/{index-6036e2a0.js → constants-936f45e9.js} +0 -136
- package/build/constants-dd16fb4d.js +425 -0
- package/build/constants.js +3 -3
- package/build/{core-279a7b4f.js → core-9e44ee99.js} +2 -2
- package/build/{index-5033f644.js → dataTransform-6b4d7a4e.js} +85 -134
- package/build/{dataTransform-1c96db25.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-78d473b4.js → constants-ebf80e5f.js} +2 -2
- package/build/esm/{index-122dd8ee.js → constants-f77fc231.js} +1 -127
- package/build/esm/constants.js +3 -3
- package/build/esm/{core-2715a7c7.js → core-c72e0ff5.js} +2 -2
- package/build/esm/{index-f672661d.js → dataTransform-3e8e25ba.js} +87 -135
- package/build/esm/{dataTransform-24bd11e8.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-d805169a.js → getDynamicHealthTool-7681e43a.js} +4 -4
- package/build/esm/{getSocialList-c8edb201.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-2a4e676a.js → index-1da2ca0b.js} +2 -2
- package/build/esm/{utils-45e55363.js → index-1ecbcf21.js} +71 -105
- package/build/esm/{index-e2d856fc.js → index-21eac858.js} +1043 -1232
- package/build/esm/{index-c5b3a3ba.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-47a90477.js → index-598ab51b.js} +5 -5
- package/build/esm/{index-ecb46439.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-7c6316a6.js → index-73301602.js} +2 -2
- package/build/esm/index-76d20d3f.js +100 -0
- package/build/esm/{index-ec38e886.js → index-780a08de.js} +2 -2
- package/build/esm/{index-92fd8661.js → index-78255d6c.js} +2 -2
- package/build/esm/{index-9b3bf9da.js → index-7cbe2a10.js} +12 -11
- package/build/esm/{index-5265867b.js → index-7e756cb8.js} +11 -10
- package/build/esm/{index.styled-eb1001c3.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-272d3d01.js → index-9f1899f2.js} +4 -4
- package/build/esm/{index-63be4c47.js → index-b1bb27aa.js} +134 -62
- package/build/esm/{index-ef96fd13.js → index-bef3c9bd.js} +3 -3
- package/build/esm/{index-670d21ca.js → index-c1af3a8e.js} +13 -12
- package/build/esm/{index-b2eed677.js → index-c200bff6.js} +2 -2
- package/build/esm/{index-0de64a0f.js → index-cb4afb33.js} +6 -6
- package/build/esm/{index-741ce3ab.js → index-cdac57da.js} +1 -1
- package/build/esm/{index-49d819b7.js → index-cf6beac8.js} +2 -13
- package/build/esm/{index-ad5c69c9.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.css +1 -1
- 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-e7ff0e08.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-37f2c5d4.js → types-2580132c.js} +28 -30
- package/build/esm/{types-ce933060.js → types-be952df2.js} +13 -13
- package/build/esm/types.js +1 -1
- package/build/esm/{useCategory-8e1387db.js → useCategory-8f109eb7.js} +5 -5
- package/build/esm/{useHealthToolCache-28115f15.js → useHealthToolCache-d97dfa00.js} +2 -2
- package/build/esm/{useMantineLocale-bcfdeb0c.js → useMantineLocale-4fb67342.js} +3 -3
- package/build/esm/{usePlacesAutocomplete-837f491d.js → usePlacesAutocomplete-fe2e4cbe.js} +1 -1
- package/build/esm/{useTranslations-b8c49c9b.js → useTranslations-fbf6a6ab.js} +1 -1
- package/build/esm/{utils-86ef2283.js → utils-cef111b6.js} +1 -1
- package/build/esm/{defaultClassWrapper-fcdfc7a3.js → utils-d5a0b58f.js} +60 -408
- 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-27b332df.js → getDynamicHealthTool-2a92e1a5.js} +4 -4
- package/build/{getSocialList-d16604ba.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-e914bc7c.js → index-05f106c2.js} +1050 -1240
- package/build/index-06fa8444.js +102 -0
- package/build/{index-e932125b.js → index-1efa7d84.js} +2 -2
- package/build/index-247a9eb2.js +1693 -0
- package/build/{index-4f5ce9db.js → index-264eeddd.js} +2 -2
- package/build/index-3d0d22b3.js +565 -0
- package/build/index-3dcb9bc6.js +61 -0
- package/build/{index-aff82754.js → index-4af08ec2.js} +2 -2
- package/build/index-6acb08c0.js +343 -0
- package/build/{index-1b7f73fa.js → index-6bc3f8c3.js} +5 -5
- package/build/{index-a903fdaa.js → index-6c27b627.js} +58 -201
- package/build/index-73cde644.js +156 -0
- package/build/{index-65765b10.js → index-77a2b9ee.js} +1 -1
- package/build/{index-dbaa00eb.js → index-7c1dc717.js} +12 -11
- package/build/index-7da7b531.js +107 -0
- package/build/{index-8c04d412.js → index-838b0f95.js} +6 -6
- package/build/index-a7de42d1.js +202 -0
- package/build/{index-517f6538.js → index-a86ea1b6.js} +2 -2
- package/build/index-aa818139.js +49 -0
- package/build/{index-4cd9cc62.js → index-b773bc3d.js} +4 -4
- package/build/index-bef2bc73.js +136 -0
- package/build/{utils-120200ad.js → index-c225ef22.js} +76 -120
- package/build/{index-42621fec.js → index-c2900d8c.js} +2 -2
- package/build/index-cb0544e5.js +866 -0
- package/build/{index-5aac5fb6.js → index-d34cd464.js} +2 -2
- package/build/{index-4026b8c5.js → index-d5b4089d.js} +141 -68
- package/build/index-dba2e361.js +20 -0
- package/build/{index-586f0a4f.js → index-dcbd8bf3.js} +37 -9
- package/build/index-dd1392e3.js +167 -0
- package/build/{index-875d81d3.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-701c74a1.js → index-f1f4fbb9.js} +13 -12
- package/build/{index-27c71242.js → index-f28c47ce.js} +1 -13
- package/build/{index-e39f5b25.js → index-f6575703.js} +2 -2
- package/build/{index.styled-8c14cf6c.js → index-fe7345fa.js} +22 -4
- package/build/index.css +1 -1
- package/build/index.js +190 -174
- 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-40d4f591.js → routing-f6d54205.js} +2 -2
- package/build/subot.js +113 -109
- package/build/surveyOrPremiumBanner.js +53 -0
- package/build/surveyQuestionCard.js +22 -0
- package/build/surveyThankyouCard-ead6b355.js +454 -0
- package/build/together.js +41 -43
- package/build/{types-692f1edc.js → types-4ba4268f.js} +49 -49
- package/build/{types-ade68559.js → types-6c5643a2.js} +203 -205
- package/build/types.js +1 -1
- package/build/{useCategory-bbe47716.js → useCategory-e2c91f59.js} +5 -5
- package/build/{useHealthToolCache-80cb8990.js → useHealthToolCache-2a53367b.js} +2 -2
- package/build/{useMantineLocale-97b962eb.js → useMantineLocale-a4f0c61d.js} +3 -3
- package/build/{usePlacesAutocomplete-99a452c0.js → usePlacesAutocomplete-c76d0caf.js} +1 -1
- package/build/{useTranslations-76f64595.js → useTranslations-200168a3.js} +1 -1
- package/build/{defaultClassWrapper-feaae206.js → utils-95d9832e.js} +68 -427
- package/build/{utils-dc4471cf.js → utils-af695515.js} +1 -1
- package/build/vaccination.js +58 -69
- package/package.json +1 -1
- package/build/Instagram-5735e971.js +0 -32
- package/build/esm/Instagram-98c713bc.js +0 -26
- package/build/esm/index-18a80466.js +0 -33
- package/build/esm/index-1f6890ad.js +0 -1086
- package/build/esm/index-40fc06d9.js +0 -298
- package/build/esm/index-47d01c08.js +0 -23
- package/build/esm/index-687f9ee4.js +0 -71
- package/build/esm/index-aeb4ceda.js +0 -7245
- package/build/esm/index.styles-bff4ac47.js +0 -1322
- package/build/index-561d71d9.js +0 -7324
- package/build/index-5ff91adf.js +0 -39
- package/build/index-74b64958.js +0 -77
- package/build/index-84f7ce80.js +0 -30
- package/build/index-c9e324de.js +0 -1100
- package/build/index.styles-61201019.js +0 -1361
- /package/build/{BMI_BOYS.percentile.monthly-b2166d34.js → BMI_BOYS.percentile.monthly-71fb1c9f.js} +0 -0
- /package/build/{BMI_BOYS.percentile.weekly-8b80b329.js → BMI_BOYS.percentile.weekly-b2b344a7.js} +0 -0
- /package/build/{BMI_BOYS.percentile.yearly-233e699b.js → BMI_BOYS.percentile.yearly-031ddade.js} +0 -0
- /package/build/{BMI_BOYS.zscore.monthly-17ed8572.js → BMI_BOYS.zscore.monthly-bb1f9962.js} +0 -0
- /package/build/{BMI_BOYS.zscore.weekly-36c9735b.js → BMI_BOYS.zscore.weekly-d6198d53.js} +0 -0
- /package/build/{BMI_BOYS.zscore.yearly-e43d7246.js → BMI_BOYS.zscore.yearly-48255337.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.monthly-94ddebb1.js → BMI_GIRLS.percentile.monthly-e3e284ee.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.weekly-dc53474b.js → BMI_GIRLS.percentile.weekly-9f2d3977.js} +0 -0
- /package/build/{BMI_GIRLS.percentile.yearly-897e47f7.js → BMI_GIRLS.percentile.yearly-c79f34ce.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.monthly-44dcd046.js → BMI_GIRLS.zscore.monthly-11092df0.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.weekly-6e9400e5.js → BMI_GIRLS.zscore.weekly-5c375d2b.js} +0 -0
- /package/build/{BMI_GIRLS.zscore.yearly-3cd8c63d.js → BMI_GIRLS.zscore.yearly-adbba8e3.js} +0 -0
- /package/build/{ChevronDown-2775b53a.js → ChevronDown-f7e25d61.js} +0 -0
- /package/build/{Close-f419724f.js → Close-36b0da99.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-35ed4380.js → HEAD CIRCUM_BOYS.percentile.monthly-163b99ad.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-c7dc736d.js → HEAD CIRCUM_BOYS.percentile.weekly-c9882014.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-4c3b2318.js → HEAD CIRCUM_BOYS.percentile.yearly-9d2bc91e.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-1f1cc8dd.js → HEAD CIRCUM_BOYS.zscore.monthly-1d2a215c.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-67593063.js → HEAD CIRCUM_BOYS.zscore.weekly-1f139c91.js} +0 -0
- /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-197c548c.js → HEAD CIRCUM_BOYS.zscore.yearly-ba15501b.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-47029e7a.js → HEAD CIRCUM_GIRLS.percentile.monthly-a546201a.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-faf6b122.js → HEAD CIRCUM_GIRLS.percentile.weekly-66cd5a7e.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-f79cdc09.js → HEAD CIRCUM_GIRLS.percentile.yearly-9db3c653.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-329fc5a0.js → HEAD CIRCUM_GIRLS.zscore.monthly-0405e2cb.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-aa73a5d6.js → HEAD CIRCUM_GIRLS.zscore.weekly-b2cc3ad2.js} +0 -0
- /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-5fdab08f.js → HEAD CIRCUM_GIRLS.zscore.yearly-3115f993.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.monthly-190579ee.js → HEIGHT_BOYS.percentile.monthly-35138a98.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.weekly-d902f59f.js → HEIGHT_BOYS.percentile.weekly-0216c35b.js} +0 -0
- /package/build/{HEIGHT_BOYS.percentile.yearly-87254461.js → HEIGHT_BOYS.percentile.yearly-f698e45d.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.monthly-c741a8bb.js → HEIGHT_BOYS.zscore.monthly-01195728.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.weekly-c0b2c6c0.js → HEIGHT_BOYS.zscore.weekly-993e9cf2.js} +0 -0
- /package/build/{HEIGHT_BOYS.zscore.yearly-1a506923.js → HEIGHT_BOYS.zscore.yearly-fee3ed69.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.monthly-9b2b4c93.js → HEIGHT_GIRLS.percentile.monthly-27b2474a.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.weekly-5ddecf9a.js → HEIGHT_GIRLS.percentile.weekly-77bff236.js} +0 -0
- /package/build/{HEIGHT_GIRLS.percentile.yearly-fa289855.js → HEIGHT_GIRLS.percentile.yearly-6200a720.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.monthly-c9db2d0d.js → HEIGHT_GIRLS.zscore.monthly-94978e64.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.weekly-c38c0951.js → HEIGHT_GIRLS.zscore.weekly-7951beb1.js} +0 -0
- /package/build/{HEIGHT_GIRLS.zscore.yearly-d78a2a93.js → HEIGHT_GIRLS.zscore.yearly-c2eca714.js} +0 -0
- /package/build/{Visible-34df6ee7.js → Visible-eee51ba6.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.monthly-7a5f3721.js → WEIGHT_BOYS.percentile.monthly-6a6f901b.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.weekly-d86f23fa.js → WEIGHT_BOYS.percentile.weekly-737fb867.js} +0 -0
- /package/build/{WEIGHT_BOYS.percentile.yearly-c154651c.js → WEIGHT_BOYS.percentile.yearly-7772b5e5.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.monthly-8f39952a.js → WEIGHT_BOYS.zscore.monthly-8db2e7d6.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.weekly-3118363f.js → WEIGHT_BOYS.zscore.weekly-ddd37c1a.js} +0 -0
- /package/build/{WEIGHT_BOYS.zscore.yearly-d463cfe7.js → WEIGHT_BOYS.zscore.yearly-332a8f7b.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.monthly-4d025f09.js → WEIGHT_GIRLS.percentile.monthly-3edad688.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.weekly-89f1f560.js → WEIGHT_GIRLS.percentile.weekly-f113a82a.js} +0 -0
- /package/build/{WEIGHT_GIRLS.percentile.yearly-e79630f6.js → WEIGHT_GIRLS.percentile.yearly-95afbeaf.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.monthly-64bd7db5.js → WEIGHT_GIRLS.zscore.monthly-d27c4bd4.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.weekly-628674eb.js → WEIGHT_GIRLS.zscore.weekly-2b113519.js} +0 -0
- /package/build/{WEIGHT_GIRLS.zscore.yearly-5bb1b712.js → WEIGHT_GIRLS.zscore.yearly-c82b04db.js} +0 -0
- /package/build/{animation-21a29164.js → animation-e1375a3b.js} +0 -0
- /package/build/{cart-cd1f9e9e.js → cart-67147d06.js} +0 -0
- /package/build/{cookieHelper-6fd4e238.js → cookieHelper-17491ce8.js} +0 -0
- /package/build/{doctor-15fac518.js → doctor-17b525f8.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.monthly-bc430a4a.js → BMI_BOYS.percentile.monthly-7c9d4923.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.weekly-404f8241.js → BMI_BOYS.percentile.weekly-c410294a.js} +0 -0
- /package/build/esm/{BMI_BOYS.percentile.yearly-cc6a1393.js → BMI_BOYS.percentile.yearly-695a4fe2.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.monthly-e94926d8.js → BMI_BOYS.zscore.monthly-9fb9f281.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.weekly-8d1da103.js → BMI_BOYS.zscore.weekly-d2109e4b.js} +0 -0
- /package/build/esm/{BMI_BOYS.zscore.yearly-94f8b37e.js → BMI_BOYS.zscore.yearly-bfa5361b.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.monthly-356bd71d.js → BMI_GIRLS.percentile.monthly-f5f60596.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.weekly-72979d47.js → BMI_GIRLS.percentile.weekly-26e4e864.js} +0 -0
- /package/build/esm/{BMI_GIRLS.percentile.yearly-729c84f5.js → BMI_GIRLS.percentile.yearly-5a2b297d.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.monthly-6dea8018.js → BMI_GIRLS.zscore.monthly-4e80bed5.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.weekly-da7a5d01.js → BMI_GIRLS.zscore.weekly-03b79f0b.js} +0 -0
- /package/build/esm/{BMI_GIRLS.zscore.yearly-0b0a5cae.js → BMI_GIRLS.zscore.yearly-822ed949.js} +0 -0
- /package/build/esm/{ChevronDown-5f18ca6b.js → ChevronDown-74267eb8.js} +0 -0
- /package/build/esm/{Close-87c65991.js → Close-372aa467.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-1c910c23.js → HEAD CIRCUM_BOYS.percentile.monthly-21b04c4c.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-2da702f0.js → HEAD CIRCUM_BOYS.percentile.weekly-049a9d97.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-9fbeb684.js → HEAD CIRCUM_BOYS.percentile.yearly-a4bbbaba.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-c93df36e.js → HEAD CIRCUM_BOYS.zscore.monthly-7cb348c6.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-930f82b2.js → HEAD CIRCUM_BOYS.zscore.weekly-678a1a52.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-f7523042.js → HEAD CIRCUM_BOYS.zscore.yearly-db81b17e.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-d93ddef7.js → HEAD CIRCUM_GIRLS.percentile.monthly-cee33cd5.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-2c7db258.js → HEAD CIRCUM_GIRLS.percentile.weekly-2cec19c3.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-07202ee1.js → HEAD CIRCUM_GIRLS.percentile.yearly-5949e664.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-fafa785c.js → HEAD CIRCUM_GIRLS.zscore.monthly-7c2bffab.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-28b41bdb.js → HEAD CIRCUM_GIRLS.zscore.weekly-356dd00a.js} +0 -0
- /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-c5b3bc8b.js → HEAD CIRCUM_GIRLS.zscore.yearly-e7b62215.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.monthly-0a092d31.js → HEIGHT_BOYS.percentile.monthly-359c4335.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.weekly-5827b445.js → HEIGHT_BOYS.percentile.weekly-a4d4acd3.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.percentile.yearly-b88283c2.js → HEIGHT_BOYS.percentile.yearly-ec9a7f9b.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.monthly-d275f074.js → HEIGHT_BOYS.zscore.monthly-12331258.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.weekly-20bbf392.js → HEIGHT_BOYS.zscore.weekly-172054d3.js} +0 -0
- /package/build/esm/{HEIGHT_BOYS.zscore.yearly-2eea3a9c.js → HEIGHT_BOYS.zscore.yearly-bb47a3be.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-9ad65492.js → HEIGHT_GIRLS.percentile.monthly-c93c0b34.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-898065d3.js → HEIGHT_GIRLS.percentile.weekly-f1f83097.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-ac5ceb79.js → HEIGHT_GIRLS.percentile.yearly-ccee4e55.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-327bdfa5.js → HEIGHT_GIRLS.zscore.monthly-caf5410c.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-e25ddbc7.js → HEIGHT_GIRLS.zscore.weekly-b1e28b0e.js} +0 -0
- /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-5531c2e3.js → HEIGHT_GIRLS.zscore.yearly-c3af35d3.js} +0 -0
- /package/build/esm/{Visible-70c720bb.js → Visible-3f9d7dca.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.monthly-e199416b.js → WEIGHT_BOYS.percentile.monthly-8a4647df.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.weekly-0965076a.js → WEIGHT_BOYS.percentile.weekly-a2a6adf1.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.percentile.yearly-d04404d7.js → WEIGHT_BOYS.percentile.yearly-073df8b7.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.monthly-be1ae0cd.js → WEIGHT_BOYS.zscore.monthly-bb9e73d2.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.weekly-8b6854c4.js → WEIGHT_BOYS.zscore.weekly-ef32ce7a.js} +0 -0
- /package/build/esm/{WEIGHT_BOYS.zscore.yearly-bd90b96f.js → WEIGHT_BOYS.zscore.yearly-6cc77688.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-a4bb8428.js → WEIGHT_GIRLS.percentile.monthly-a4b518bc.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-c288d810.js → WEIGHT_GIRLS.percentile.weekly-dcedaebb.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-73a5ae07.js → WEIGHT_GIRLS.percentile.yearly-9e66577e.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-cbcfdab4.js → WEIGHT_GIRLS.zscore.monthly-c07cb81f.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-185ff336.js → WEIGHT_GIRLS.zscore.weekly-9c5c3e8e.js} +0 -0
- /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-c31a0aee.js → WEIGHT_GIRLS.zscore.yearly-e99ce511.js} +0 -0
- /package/build/esm/{animation-9a3ca482.js → animation-0b2299dc.js} +0 -0
- /package/build/esm/{cart-5f758c33.js → cart-f961dadc.js} +0 -0
- /package/build/esm/{cookieHelper-9c963e09.js → cookieHelper-73ce3871.js} +0 -0
- /package/build/esm/{doctor-1d62f054.js → doctor-8a07ca44.js} +0 -0
- /package/build/esm/{index-931414db.js → index-782fed08.js} +0 -0
- /package/build/esm/{index-4687d5f8.js → index-b65a8764.js} +0 -0
- /package/build/esm/{index-90e772e4.js → index-c3264b34.js} +0 -0
- /package/build/esm/{index-877eed06.js → index-e3787b20.js} +0 -0
- /package/build/esm/{isProduction-d39b7ab2.js → isProduction-5684a28c.js} +0 -0
- /package/build/esm/{localizeNumberFormat-f838842a.js → localizeNumberFormat-42ae8d89.js} +0 -0
- /package/build/esm/{normalizeLink-65565106.js → normalizeLink-d6f57223.js} +0 -0
- /package/build/esm/{number-cad310d0.js → number-13f075cf.js} +0 -0
- /package/build/esm/{paths-8fc18a86.js → paths-49a813e7.js} +0 -0
- /package/build/esm/{theme-eb1b39f6.js → theme-f18c2351.js} +0 -0
- /package/build/esm/{translationsContext-dfb42bf8.js → translationsContext-f3d1a7bd.js} +0 -0
- /package/build/esm/{tslib.es6-efad16cf.js → tslib.es6-761239c7.js} +0 -0
- /package/build/esm/{useIsInit-f341c0e8.js → useIsInit-ee864235.js} +0 -0
- /package/build/esm/{useOutsideClick-e10b28ce.js → useOutsideClick-7451aa57.js} +0 -0
- /package/build/esm/{useScrollbarSize-594c61c3.js → useScrollbarSize-84bb5b47.js} +0 -0
- /package/build/esm/{useUniqueId-d5f7586b.js → useUniqueId-c23213b6.js} +0 -0
- /package/build/esm/{utils-0d590d5e.js → utils-f8761b9d.js} +0 -0
- /package/build/{index-d54d6c50.js → index-97ebd7e1.js} +0 -0
- /package/build/{index-d8c60733.js → index-ba3797bb.js} +0 -0
- /package/build/{index-d628859e.js → index-bba97c2e.js} +0 -0
- /package/build/{index-0b957c10.js → index-df5cd44b.js} +0 -0
- /package/build/{isProduction-7f7f09ad.js → isProduction-aa963bf9.js} +0 -0
- /package/build/{localizeNumberFormat-011e6f65.js → localizeNumberFormat-90d4f9d5.js} +0 -0
- /package/build/{normalizeLink-23b10200.js → normalizeLink-451ae6d8.js} +0 -0
- /package/build/{number-249e0e0b.js → number-c2338382.js} +0 -0
- /package/build/{paths-02f54499.js → paths-e0bbfce7.js} +0 -0
- /package/build/{theme-416e0fd4.js → theme-e4f7f487.js} +0 -0
- /package/build/{translationsContext-6f3c14ea.js → translationsContext-39528d2f.js} +0 -0
- /package/build/{tslib.es6-dd1fc8f2.js → tslib.es6-7e140b89.js} +0 -0
- /package/build/{useIsInit-bb64ffbf.js → useIsInit-38cec0c4.js} +0 -0
- /package/build/{useOutsideClick-bd35bba1.js → useOutsideClick-e579e1ac.js} +0 -0
- /package/build/{useScrollbarSize-57b0fd8a.js → useScrollbarSize-5a8be010.js} +0 -0
- /package/build/{useUniqueId-4bafae28.js → useUniqueId-8929fe5f.js} +0 -0
- /package/build/{utils-3a589c92.js → utils-524bda7c.js} +0 -0
|
@@ -1,19 +1,8 @@
|
|
|
1
1
|
import React__default, { useRef, useState, useEffect } from 'react';
|
|
2
|
-
import { I as Icon } from './index-ecb46439.js';
|
|
3
|
-
import { u as useTranslations } from './useTranslations-b8c49c9b.js';
|
|
4
2
|
import { format } from 'date-fns';
|
|
5
3
|
import DayPickerInput from 'react-day-picker/DayPickerInput';
|
|
6
4
|
import styled from '@emotion/styled';
|
|
7
|
-
import { t as theme } from './theme-
|
|
8
|
-
|
|
9
|
-
var styles = {"loading":"tliWyii"};
|
|
10
|
-
|
|
11
|
-
const Loading = ({ className, theme, hideText }) => {
|
|
12
|
-
const { t } = useTranslations();
|
|
13
|
-
return (React__default.createElement("div", { className: `${styles.loading} ${className}` },
|
|
14
|
-
React__default.createElement(Icon.Spinner, { isMarryBaby: theme === 'marryBaby' }),
|
|
15
|
-
!hideText && t('loading')));
|
|
16
|
-
};
|
|
5
|
+
import { t as theme } from './theme-f18c2351.js';
|
|
17
6
|
|
|
18
7
|
const MONTHS_TRANSLATION = {
|
|
19
8
|
'vi-VN': [
|
|
@@ -612,4 +601,4 @@ const DatePicker = ({ alignRight = true, placeholder, displayDateFormat, onChang
|
|
|
612
601
|
}, format: displayDateFormat || defaultDateFormatString, formatDate: formatPickerDate, hideOnDayClick: isStatic ? false : true, placeholder: placeholder || '', onDayChange: handleDayChanged, showOverlay: isStatic })));
|
|
613
602
|
};
|
|
614
603
|
|
|
615
|
-
export { DatePicker as D
|
|
604
|
+
export { DatePicker as D };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { _ as __rest } from './tslib.es6-
|
|
1
|
+
import { _ as __rest } from './tslib.es6-761239c7.js';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
import { Modal as Modal$1 } from '@mantine/core';
|
|
4
|
-
import { g as useStyles } from './index-
|
|
4
|
+
import { g as useStyles } from './index-21eac858.js';
|
|
5
5
|
|
|
6
6
|
const Modal = (_a) => {
|
|
7
7
|
var { styles, classNames, transitionProps } = _a, rest = __rest(_a, ["styles", "classNames", "transitionProps"]);
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import styled from '@emotion/styled';
|
|
3
|
+
import { L as Label } from './index-16514f4d.js';
|
|
4
|
+
import { t as theme } from './theme-f18c2351.js';
|
|
5
|
+
|
|
6
|
+
const StyledTextArea = styled.div `
|
|
7
|
+
textarea {
|
|
8
|
+
width: 100%;
|
|
9
|
+
height: var(--textarea-height, 116px);
|
|
10
|
+
padding: 1rem;
|
|
11
|
+
border: 1px solid ${theme.colors.gray200};
|
|
12
|
+
border-radius: 6px;
|
|
13
|
+
color: ${theme.colors.gray800};
|
|
14
|
+
font-size: 14px;
|
|
15
|
+
resize: none;
|
|
16
|
+
|
|
17
|
+
&:focus {
|
|
18
|
+
box-shadow: 0px 0px 2px 2px #91caff;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&::placeholder {
|
|
22
|
+
color: ${theme.colors.gray500};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&:disabled {
|
|
26
|
+
background-color: ${theme.colors.neutral50};
|
|
27
|
+
cursor: not-allowed;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
`;
|
|
31
|
+
/**
|
|
32
|
+
* @deprecated Consider to use at '@hhgtech/hhg-components/mantine'
|
|
33
|
+
*/
|
|
34
|
+
const TextArea = React__default.forwardRef(({ height, placeholder, labelText, labelColor, id, name, onChange, value, className, onKeyPress, disabled = false, }, ref) => {
|
|
35
|
+
return (React__default.createElement(StyledTextArea, { className: className, style: { ['--textarea-height']: height || '116px' } },
|
|
36
|
+
labelText && (React__default.createElement(Label, { size: "label2", style: { color: labelColor || '#595959' }, htmlFor: id }, labelText)),
|
|
37
|
+
React__default.createElement("textarea", { name: name, ref: ref, placeholder: placeholder, id: id, onChange: (e) => onChange && onChange(e.target.value),
|
|
38
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
39
|
+
onKeyPress: (e) => onKeyPress && onKeyPress(e), value: value, disabled: disabled })));
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
export { TextArea as T };
|
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
import React__default, { useMemo, useState, useEffect } from 'react';
|
|
2
|
+
import { u as useTranslations } from './useTranslations-fbf6a6ab.js';
|
|
3
|
+
import { g as getCookie } from './cookieHelper-73ce3871.js';
|
|
4
|
+
import { C as CommonGAssets } from './index-78255d6c.js';
|
|
5
|
+
import { n as normalizeLinkSlash, a as normalizeLink } from './normalizeLink-d6f57223.js';
|
|
6
|
+
import { t as theme } from './theme-f18c2351.js';
|
|
7
|
+
import { A as Avatar } from './index-42ad7763.js';
|
|
8
|
+
import { d as getTogetherUserPostsApiPath } from './index-2774583d.js';
|
|
9
|
+
import { B as Button } from './index-1da2ca0b.js';
|
|
10
|
+
|
|
11
|
+
const INTERNAL_CARD_URLS = {
|
|
12
|
+
myBooking: 'booking',
|
|
13
|
+
mySaved: 'saved',
|
|
14
|
+
myHealth: 'health',
|
|
15
|
+
myFamily: 'family',
|
|
16
|
+
myCommunity: 'my-communities',
|
|
17
|
+
// TODO: this is hardcoded for VN, need to adapt to dynamic slug depend on locale
|
|
18
|
+
eCom: '/shop/ho-so/quan-li-don-hang/',
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
var styles$4 = {"navHeader":"uJQBNNg","navAvatar":"TfG3dM5","navHeaderUserInfos":"aMtjFNf","navHeaderUserName":"cSz2RR-","navHeaderMyProfileButton":"GyFm00F"};
|
|
22
|
+
|
|
23
|
+
function NavHeader({ userInfo, onClickMyProfileButton, themeName = 'helloSites', }) {
|
|
24
|
+
const { t } = useTranslations();
|
|
25
|
+
const nameFirstLetter = useMemo(() => {
|
|
26
|
+
const name = (userInfo === null || userInfo === void 0 ? void 0 : userInfo.name) || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.username);
|
|
27
|
+
if (name && name.length) {
|
|
28
|
+
return name[0].toUpperCase();
|
|
29
|
+
}
|
|
30
|
+
return 'A';
|
|
31
|
+
}, [userInfo === null || userInfo === void 0 ? void 0 : userInfo.username, userInfo === null || userInfo === void 0 ? void 0 : userInfo.name]);
|
|
32
|
+
const handleClickMyProfileButton = () => {
|
|
33
|
+
if (onClickMyProfileButton) {
|
|
34
|
+
onClickMyProfileButton();
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
return (React__default.createElement("div", { className: styles$4.navHeader, onClick: handleClickMyProfileButton },
|
|
38
|
+
React__default.createElement(Avatar, { className: styles$4.navAvatar, type: "rounded", size: "xl", avatarUrl: userInfo === null || userInfo === void 0 ? void 0 : userInfo.avatar, firstLetter: nameFirstLetter, backgroundColor: themeName === 'marryBaby'
|
|
39
|
+
? theme.mbColors.pink
|
|
40
|
+
: theme.colors.secondaryBase }),
|
|
41
|
+
React__default.createElement("div", { className: styles$4.navHeaderUserInfos },
|
|
42
|
+
React__default.createElement("div", { className: styles$4.navHeaderUserName }, (userInfo === null || userInfo === void 0 ? void 0 : userInfo.name) || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.username)),
|
|
43
|
+
React__default.createElement("div", { className: styles$4.navHeaderMyProfileButton, style: {
|
|
44
|
+
'--bg-hellosites': `url(${CommonGAssets.getAssetPath('userProfileNav/helloSites/icon-chevronRight.svg')})`,
|
|
45
|
+
'--bg-marrybaby': `url(${CommonGAssets.getAssetPath('userProfileNav/marryBaby/icon-arrowRight.svg')})`,
|
|
46
|
+
} }, t('userProfile.nav.header.viewProfile')))));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
var styles$3 = {"navigationCard":"fVk18fq","navigationCardLabel":"v8TCvUb","navigationCardIconWrapper":"mx7T4V3"};
|
|
50
|
+
|
|
51
|
+
const iconBgColorMap = {
|
|
52
|
+
myHealth: theme.mbColors.toneYellow,
|
|
53
|
+
myCommunity: theme.mbColors.toneBlue,
|
|
54
|
+
mySaved: theme.mbColors.toneGreen,
|
|
55
|
+
};
|
|
56
|
+
// type CardIconUrlMap = IconUrlMap<UserProfileMenuCard>
|
|
57
|
+
const cardIconUrlMap = {
|
|
58
|
+
helloSites: {
|
|
59
|
+
myBooking: () => CommonGAssets.getAssetPath('userProfileNav/helloSites/icon-myBooking.svg'),
|
|
60
|
+
myCommunity: () => CommonGAssets.getAssetPath('userProfileNav/helloSites/icon-myCommunity.svg'),
|
|
61
|
+
myFamily: () => CommonGAssets.getAssetPath('userProfileNav/helloSites/icon-myFamily.svg'),
|
|
62
|
+
myHealth: () => CommonGAssets.getAssetPath('userProfileNav/helloSites/icon-myHealth.svg'),
|
|
63
|
+
mySaved: () => CommonGAssets.getAssetPath('userProfileNav/helloSites/icon-mySaved.svg'),
|
|
64
|
+
eCom: () => CommonGAssets.getAssetPath('userProfileNav/helloSites/icon-eCom.svg'),
|
|
65
|
+
},
|
|
66
|
+
marryBaby: {
|
|
67
|
+
mySaved: () => CommonGAssets.getAssetPath('userProfileNav/marryBaby/icon-mySaved.svg'),
|
|
68
|
+
myCommunity: () => CommonGAssets.getAssetPath('userProfileNav/marryBaby/icon-myCommunity.svg'),
|
|
69
|
+
myHealth: () => CommonGAssets.getAssetPath('userProfileNav/marryBaby/icon-myHealth.svg'),
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
const NavigationCard = ({ type, themeName, className, onClick = () => undefined, }) => {
|
|
73
|
+
const { t } = useTranslations();
|
|
74
|
+
const iconUrl = useMemo(() => {
|
|
75
|
+
var _a, _b;
|
|
76
|
+
return ((_b = (_a = cardIconUrlMap[themeName]) === null || _a === void 0 ? void 0 : _a[type]) === null || _b === void 0 ? void 0 : _b.call(_a)) || '';
|
|
77
|
+
}, [type, themeName]);
|
|
78
|
+
const iconBgColor = useMemo(() => {
|
|
79
|
+
if (themeName !== 'marryBaby') {
|
|
80
|
+
return 'transparent';
|
|
81
|
+
}
|
|
82
|
+
return iconBgColorMap[type];
|
|
83
|
+
}, [type, themeName]);
|
|
84
|
+
function handleCardClick() {
|
|
85
|
+
onClick(type);
|
|
86
|
+
}
|
|
87
|
+
return (React__default.createElement("div", { onClick: handleCardClick, className: `${styles$3.navigationCard} ${className}` },
|
|
88
|
+
React__default.createElement("div", { className: styles$3.navigationCardIconWrapper, style: {
|
|
89
|
+
backgroundColor: iconBgColor,
|
|
90
|
+
backgroundImage: `url("${iconUrl}")`,
|
|
91
|
+
} }),
|
|
92
|
+
React__default.createElement("h3", { className: styles$3.navigationCardLabel }, t(`userProfile.nav.card.${type}`))));
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
const navMenuItemsHelloSites = () => [
|
|
96
|
+
{
|
|
97
|
+
key: 'userProfile.nav.menu.accountSettings',
|
|
98
|
+
icon: CommonGAssets.getAssetPath('userProfileNav/helloSites/icon-settingsWheel.svg'),
|
|
99
|
+
subMenu: [
|
|
100
|
+
// {
|
|
101
|
+
// key: 'common.profileNavigator.newsletterSubscription',
|
|
102
|
+
// link: 'subscriptions',
|
|
103
|
+
// disableLocale: [
|
|
104
|
+
// 'id-ID',
|
|
105
|
+
// 'ms-MY',
|
|
106
|
+
// 'km-KH',
|
|
107
|
+
// 'en-PH',
|
|
108
|
+
// 'tl-PH',
|
|
109
|
+
// 'th-TH',
|
|
110
|
+
// 'my-MM',
|
|
111
|
+
// 'zh-TW',
|
|
112
|
+
// 'hi-IN',
|
|
113
|
+
// ],
|
|
114
|
+
// },
|
|
115
|
+
{
|
|
116
|
+
key: 'userProfile.nav.menu.password',
|
|
117
|
+
link: 'password',
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
key: 'userProfile.nav.menu.disableAccount',
|
|
121
|
+
link: 'disable-account',
|
|
122
|
+
disableLocale: ['hi-IN'],
|
|
123
|
+
},
|
|
124
|
+
],
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
key: 'userProfile.nav.menu.help',
|
|
128
|
+
icon: CommonGAssets.getAssetPath('userProfileNav/helloSites/icon-helpCircle.svg'),
|
|
129
|
+
link: 'help',
|
|
130
|
+
},
|
|
131
|
+
];
|
|
132
|
+
const navMenuItemsMarryBaby = () => [
|
|
133
|
+
{
|
|
134
|
+
key: 'userProfile.nav.menu.password',
|
|
135
|
+
icon: CommonGAssets.getAssetPath('userProfileNav/marryBaby/icon-lock.svg'),
|
|
136
|
+
link: 'password',
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
key: 'userProfile.nav.menu.logout',
|
|
140
|
+
icon: CommonGAssets.getAssetPath('userProfileNav/marryBaby/icon-logOut.svg'),
|
|
141
|
+
link: 'logout',
|
|
142
|
+
},
|
|
143
|
+
];
|
|
144
|
+
|
|
145
|
+
var styles$2 = {"navMenu":"gn6HmGG","navMenuItem":"FCx8FEM","navMenuItemContent":"zMiRxaE","navMenuItemIcon":"lZ2Z9MQ","navMenuItemDropdown":"rwm-agG","navFooterSubMenu":"qMOscoq"};
|
|
146
|
+
|
|
147
|
+
const NavMenu = ({ themeName, locale, onClickItem }) => {
|
|
148
|
+
const [openKey, setOpenKey] = useState('');
|
|
149
|
+
const navMenuItems = useMemo(() => themeName === 'marryBaby'
|
|
150
|
+
? navMenuItemsMarryBaby()
|
|
151
|
+
: navMenuItemsHelloSites(), [themeName]);
|
|
152
|
+
function handleParentItemClick(item) {
|
|
153
|
+
if (item.subMenu) {
|
|
154
|
+
setOpenKey((k) => {
|
|
155
|
+
if (k) {
|
|
156
|
+
return '';
|
|
157
|
+
}
|
|
158
|
+
return item.key;
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
else if (onClickItem) {
|
|
162
|
+
onClickItem(item);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
return (React__default.createElement("div", { className: styles$2.navMenu }, navMenuItems.map((item) => (React__default.createElement(NavMenuItem, { key: item.key, item: item, openKey: openKey, onClickItem: handleParentItemClick, locale: locale })))));
|
|
166
|
+
};
|
|
167
|
+
const NavMenuItem = ({ item, openKey, onClickItem, locale, }) => {
|
|
168
|
+
var _a;
|
|
169
|
+
const { t } = useTranslations();
|
|
170
|
+
if ((_a = item.disableLocale) === null || _a === void 0 ? void 0 : _a.includes(locale)) {
|
|
171
|
+
return null;
|
|
172
|
+
}
|
|
173
|
+
return (React__default.createElement("div", { className: `${styles$2.navMenuItem} nav-menu-item`, "data-is-open": openKey === item.key, key: item.key, "data-has-submenu": !!item.subMenu },
|
|
174
|
+
React__default.createElement("div", { className: styles$2.navMenuItemContent, onClick: () => onClickItem(item) },
|
|
175
|
+
item.icon && (React__default.createElement("div", { className: styles$2.navMenuItemIcon, style: { backgroundImage: `url("${item.icon}")` } })),
|
|
176
|
+
t(item.key),
|
|
177
|
+
item.subMenu && (React__default.createElement("div", { className: styles$2.navMenuItemDropdown, style: {
|
|
178
|
+
'--after-bg': `url(${CommonGAssets.getAssetPath('userProfileNav/helloSites/icon-chevronDown.svg')})`,
|
|
179
|
+
} }))),
|
|
180
|
+
item.subMenu && (React__default.createElement("div", { className: styles$2.navFooterSubMenu }, item.subMenu.map((subItem) => (React__default.createElement(NavMenuItem, { key: subItem.key, item: subItem, openKey: openKey, onClickItem: onClickItem, locale: locale })))))));
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
var styles$1 = {"userNavScreen":"-AZt1au","navigationCardsWrapper":"IvSIfCI","navigationCard":"eahCJov","logoutButton":"XIyViFs"};
|
|
184
|
+
|
|
185
|
+
var styles = {"userStats":"_4y-O0w3","wrapper":"kO8iNgD","header":"a1d4E10","headerIcon":"Tdguxxf","headerTitle":"-mOxsaU","headerPoints":"yPeDBNZ"};
|
|
186
|
+
|
|
187
|
+
const rankIconUrlMap = {
|
|
188
|
+
helloSites: {
|
|
189
|
+
member: () => CommonGAssets.getAssetPath('userProfileNav/helloSites/icon-rank-member.svg'),
|
|
190
|
+
ambassador: () => CommonGAssets.getAssetPath('userProfileNav/helloSites/icon-rank-ambassador.svg'),
|
|
191
|
+
doctor: () => CommonGAssets.getAssetPath('userProfileNav/helloSites/icon-rank-doctor.svg'),
|
|
192
|
+
expert: () => CommonGAssets.getAssetPath('userProfileNav/helloSites/icon-rank-expert.svg'),
|
|
193
|
+
influencer: () => CommonGAssets.getAssetPath('userProfileNav/helloSites/icon-rank-influencer.svg'),
|
|
194
|
+
},
|
|
195
|
+
marryBaby: {
|
|
196
|
+
member: () => CommonGAssets.getAssetPath('userProfileNav/marryBaby/icon-rank-member.svg'),
|
|
197
|
+
ambassador: () => CommonGAssets.getAssetPath('userProfileNav/marryBaby/icon-rank-ambassador.svg'),
|
|
198
|
+
doctor: () => CommonGAssets.getAssetPath('userProfileNav/marryBaby/icon-rank-doctor.svg'),
|
|
199
|
+
expert: () => CommonGAssets.getAssetPath('userProfileNav/marryBaby/icon-rank-expert.svg'),
|
|
200
|
+
influencer: () => CommonGAssets.getAssetPath('userProfileNav/marryBaby/icon-rank-influencer.svg'),
|
|
201
|
+
},
|
|
202
|
+
};
|
|
203
|
+
const UserStats = ({ themeName, rank = 'member', numberOfPosts = 0, }) => {
|
|
204
|
+
const { t } = useTranslations();
|
|
205
|
+
const iconUrl = useMemo(() => {
|
|
206
|
+
var _a, _b;
|
|
207
|
+
return ((_b = (_a = rankIconUrlMap[themeName]) === null || _a === void 0 ? void 0 : _a[rank]) === null || _b === void 0 ? void 0 : _b.call(_a)) || '';
|
|
208
|
+
}, [rank, themeName]);
|
|
209
|
+
return (React__default.createElement("div", { className: styles.userStats, "data-user-rank": rank },
|
|
210
|
+
React__default.createElement("div", { className: styles.wrapper },
|
|
211
|
+
React__default.createElement("div", { className: styles.header },
|
|
212
|
+
React__default.createElement("div", { className: styles.headerIcon, style: { backgroundImage: `url("${iconUrl}")` } }),
|
|
213
|
+
React__default.createElement("h3", { className: styles.headerTitle }, t(`userProfile.userRank.${rank}`)),
|
|
214
|
+
numberOfPosts > 0 && (React__default.createElement("p", { className: styles.headerPoints },
|
|
215
|
+
numberOfPosts,
|
|
216
|
+
" ",
|
|
217
|
+
t('userProfile.nav.header.count.posts')))))));
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
const UserProfileNavigation = ({ SSO_URL, UP_BASEPATH = 'user', themeName = 'helloSites', cardUrls = INTERNAL_CARD_URLS, enableCare, enableTogether, enableEcom, enableMySaved, userInfo, togetherApiDomain, userPostsNumber, onClickNavigationCard, onClickMyProfileButton, onClickMenuItem, onClickLogout, isUserProfileNavigatorMenuHidden = false, isMyHealthEnabled = false, locale, }) => {
|
|
221
|
+
const { t } = useTranslations();
|
|
222
|
+
const [numberOfPosts, setNumberOfPosts] = useState(userPostsNumber || 0);
|
|
223
|
+
const isMarryBaby = themeName === 'marryBaby';
|
|
224
|
+
useEffect(() => {
|
|
225
|
+
if (userInfo && typeof userPostsNumber === 'undefined') {
|
|
226
|
+
const token = getCookie('hhg_user_token');
|
|
227
|
+
if (!!token) {
|
|
228
|
+
fetch(normalizeLinkSlash(getTogetherUserPostsApiPath(locale, isMarryBaby, togetherApiDomain)), {
|
|
229
|
+
headers: {
|
|
230
|
+
Authorization: `Bearer ${token}`,
|
|
231
|
+
},
|
|
232
|
+
})
|
|
233
|
+
.then((r) => r.json())
|
|
234
|
+
.then((r) => {
|
|
235
|
+
var _a, _b, _c;
|
|
236
|
+
if ((r === null || r === void 0 ? void 0 : r.status) === 1 && ((_a = r === null || r === void 0 ? void 0 : r.data) === null || _a === void 0 ? void 0 : _a.pagination)) {
|
|
237
|
+
setNumberOfPosts(((_c = (_b = r === null || r === void 0 ? void 0 : r.data) === null || _b === void 0 ? void 0 : _b.pagination) === null || _c === void 0 ? void 0 : _c.total_items) || 0);
|
|
238
|
+
}
|
|
239
|
+
})
|
|
240
|
+
.catch((err) => console.error('Error fetching post number', err));
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}, [
|
|
244
|
+
locale,
|
|
245
|
+
userInfo !== null,
|
|
246
|
+
userPostsNumber,
|
|
247
|
+
togetherApiDomain,
|
|
248
|
+
isMarryBaby,
|
|
249
|
+
]);
|
|
250
|
+
const cards = useMemo(() => {
|
|
251
|
+
let allCards;
|
|
252
|
+
if (isMarryBaby) {
|
|
253
|
+
allCards = ['myHealth', 'myCommunity', 'mySaved'];
|
|
254
|
+
}
|
|
255
|
+
else {
|
|
256
|
+
allCards = ['myHealth', 'mySaved', 'myBooking', 'myCommunity', 'eCom'];
|
|
257
|
+
}
|
|
258
|
+
return allCards.filter((cardType) => {
|
|
259
|
+
if (cardType === 'myBooking') {
|
|
260
|
+
return enableCare;
|
|
261
|
+
}
|
|
262
|
+
else if (cardType === 'myCommunity') {
|
|
263
|
+
return enableTogether;
|
|
264
|
+
}
|
|
265
|
+
else if (cardType === 'myHealth') {
|
|
266
|
+
return isMyHealthEnabled;
|
|
267
|
+
}
|
|
268
|
+
else if (cardType === 'eCom') {
|
|
269
|
+
return enableEcom;
|
|
270
|
+
}
|
|
271
|
+
else if (cardType === 'mySaved') {
|
|
272
|
+
return enableMySaved;
|
|
273
|
+
}
|
|
274
|
+
return true;
|
|
275
|
+
});
|
|
276
|
+
}, [isMarryBaby, isMyHealthEnabled]);
|
|
277
|
+
const logoutButton = useMemo(() => {
|
|
278
|
+
if (themeName === 'marryBaby') {
|
|
279
|
+
return null;
|
|
280
|
+
}
|
|
281
|
+
return (React__default.createElement(Button, { color: "tertiary", icon: React__default.createElement("img", { src: CommonGAssets.getAssetPath('userProfileNav/helloSites/icon-logOut.svg'), width: 15, height: 15, loading: "lazy" }), size: "md", onClick: onClickLogout, className: styles$1.logoutButton }, t('userProfile.nav.menu.logout')));
|
|
282
|
+
}, [themeName]);
|
|
283
|
+
const push = (link) => {
|
|
284
|
+
if (link.startsWith('http') || link.startsWith('/')) {
|
|
285
|
+
// direct to external link
|
|
286
|
+
window.location.href = normalizeLink(link);
|
|
287
|
+
}
|
|
288
|
+
else if (SSO_URL) {
|
|
289
|
+
// relative link go to user profile
|
|
290
|
+
window.location.href = normalizeLink(`${SSO_URL}${UP_BASEPATH}/${link}`);
|
|
291
|
+
}
|
|
292
|
+
};
|
|
293
|
+
const handleClickMenuItem = (item) => {
|
|
294
|
+
if (item.link === 'logout' && onClickLogout) {
|
|
295
|
+
onClickLogout();
|
|
296
|
+
}
|
|
297
|
+
else if (item.link && !item.subMenu) {
|
|
298
|
+
if (onClickMenuItem) {
|
|
299
|
+
onClickMenuItem(item.link);
|
|
300
|
+
}
|
|
301
|
+
else {
|
|
302
|
+
push(item.link);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
};
|
|
306
|
+
const handleClickCardItem = (item) => {
|
|
307
|
+
const url = cardUrls[item];
|
|
308
|
+
if (onClickNavigationCard) {
|
|
309
|
+
onClickNavigationCard(url);
|
|
310
|
+
}
|
|
311
|
+
else {
|
|
312
|
+
push(url);
|
|
313
|
+
}
|
|
314
|
+
};
|
|
315
|
+
const handleClickViewProfile = () => {
|
|
316
|
+
if (onClickMyProfileButton) {
|
|
317
|
+
onClickMyProfileButton();
|
|
318
|
+
}
|
|
319
|
+
else {
|
|
320
|
+
push('profile');
|
|
321
|
+
}
|
|
322
|
+
};
|
|
323
|
+
if (!userInfo) {
|
|
324
|
+
return null;
|
|
325
|
+
}
|
|
326
|
+
return (React__default.createElement("div", { className: styles$1.userNavScreen, "data-theme": themeName },
|
|
327
|
+
React__default.createElement(NavHeader, { userInfo: userInfo, themeName: themeName, onClickMyProfileButton: handleClickViewProfile }),
|
|
328
|
+
React__default.createElement(UserStats, { themeName: themeName, rank: "member", numberOfPosts: numberOfPosts }),
|
|
329
|
+
React__default.createElement("div", { className: styles$1.navigationCardsWrapper }, cards.map((cardType) => (React__default.createElement(NavigationCard, { className: styles$1.navigationCard, key: cardType, themeName: themeName, type: cardType, onClick: handleClickCardItem })))),
|
|
330
|
+
!isUserProfileNavigatorMenuHidden && (React__default.createElement(React__default.Fragment, null,
|
|
331
|
+
React__default.createElement(NavMenu, { themeName: themeName, locale: locale, onClickItem: handleClickMenuItem }),
|
|
332
|
+
logoutButton))));
|
|
333
|
+
};
|
|
334
|
+
|
|
335
|
+
export { NavHeader as N, UserProfileNavigation as U, UserStats as a };
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
import { _ as __rest } from './tslib.es6-761239c7.js';
|
|
2
|
+
import React__default, { useState } from 'react';
|
|
3
|
+
import styled from '@emotion/styled';
|
|
4
|
+
import { M as MediaQueries } from './utils-f8761b9d.js';
|
|
5
|
+
import { t as theme } from './theme-f18c2351.js';
|
|
6
|
+
import { L as Label, S as StyledDisplayIcon, a as StyledActionIcon, b as StyledErrorLabel } from './index-16514f4d.js';
|
|
7
|
+
|
|
8
|
+
const StyledInput = styled.div `
|
|
9
|
+
position: relative;
|
|
10
|
+
width: 100%;
|
|
11
|
+
|
|
12
|
+
&[data-has-error] {
|
|
13
|
+
input {
|
|
14
|
+
border-color: ${theme.colors.red700};
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
input {
|
|
19
|
+
width: 100%;
|
|
20
|
+
padding: 12px 16px;
|
|
21
|
+
border: solid 1px ${theme.colors.gray200};
|
|
22
|
+
border-radius: ${theme.borderRadius};
|
|
23
|
+
|
|
24
|
+
&:active,
|
|
25
|
+
&:focus,
|
|
26
|
+
.focused & {
|
|
27
|
+
border-color: ${theme.colors.primaryBase};
|
|
28
|
+
box-shadow: 0px 0px 2px 2px ${theme.colors.primary200};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&:disabled {
|
|
32
|
+
background-color: ${theme.colors.gray100};
|
|
33
|
+
cursor: not-allowed;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&[data-has-action-icon] {
|
|
38
|
+
input {
|
|
39
|
+
padding: 12px 48px 12px 16px;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
&[data-has-display-icon] {
|
|
43
|
+
input {
|
|
44
|
+
padding: 12px 16px 12px 48px;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&[data-has-action-icon][data-has-display-icon] {
|
|
49
|
+
input {
|
|
50
|
+
padding: 12px 48px;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&[data-size='lg'] {
|
|
55
|
+
input {
|
|
56
|
+
font-size: 16px;
|
|
57
|
+
font-weight: ${theme.sizes.fwRegular};
|
|
58
|
+
${MediaQueries.mbDown} {
|
|
59
|
+
font-size: 22px;
|
|
60
|
+
line-height: 1.2;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
${MediaQueries.mbUp} {
|
|
64
|
+
font-size: 26px;
|
|
65
|
+
line-height: 1.2;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
&[data-size='md'] {
|
|
70
|
+
input {
|
|
71
|
+
font-weight: ${theme.sizes.fwRegular};
|
|
72
|
+
${MediaQueries.mbDown} {
|
|
73
|
+
font-size: 14px;
|
|
74
|
+
line-height: 1.2;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
${MediaQueries.mbUp} {
|
|
78
|
+
font-size: 16px;
|
|
79
|
+
line-height: 1.2;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
&[data-size='sm'] {
|
|
84
|
+
input {
|
|
85
|
+
font-weight: ${theme.sizes.fwRegular};
|
|
86
|
+
${MediaQueries.mbDown} {
|
|
87
|
+
font-size: 13px;
|
|
88
|
+
line-height: 1.5;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
${MediaQueries.mbUp} {
|
|
92
|
+
font-size: 13px;
|
|
93
|
+
line-height: 1.5;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
`;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* @deprecated Consider to use at '@hhgtech/hhg-components/mantine'
|
|
101
|
+
*/
|
|
102
|
+
const PureInput = React__default.forwardRef((_a, ref) => {
|
|
103
|
+
var { name, errorMessage, autoComplete = 'off', defaultValue, actionIcon: ActionIcon, displayIcon: DisplayIcon, isDeleteAction, onActionClick, label, placeholder, className, onChange, onKeyPress, isDisabled, CustomInput, size, style, autoFocus, type = 'text', isNumerousKeyboard = false, onFocus, enterKeyHint, nativeOnChange } = _a, other = __rest(_a, ["name", "errorMessage", "autoComplete", "defaultValue", "actionIcon", "displayIcon", "isDeleteAction", "onActionClick", "label", "placeholder", "className", "onChange", "onKeyPress", "isDisabled", "CustomInput", "size", "style", "autoFocus", "type", "isNumerousKeyboard", "onFocus", "enterKeyHint", "nativeOnChange"]);
|
|
104
|
+
const [localValue, setLocalValue] = useState(defaultValue);
|
|
105
|
+
const handleOnChange = (v) => {
|
|
106
|
+
setLocalValue(v);
|
|
107
|
+
onChange(v);
|
|
108
|
+
};
|
|
109
|
+
const handleOnActionClick = () => {
|
|
110
|
+
var _a;
|
|
111
|
+
if (isDeleteAction) {
|
|
112
|
+
setLocalValue('');
|
|
113
|
+
(_a = ref.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
114
|
+
}
|
|
115
|
+
onActionClick && onActionClick();
|
|
116
|
+
};
|
|
117
|
+
return (React__default.createElement(StyledInput, { "data-size": size, className: className, "data-has-action-icon": !!ActionIcon || undefined, "data-has-display-icon": !!DisplayIcon || undefined, "data-has-error": (errorMessage && errorMessage.length > 0) || undefined, style: style },
|
|
118
|
+
label && (React__default.createElement(Label, { size: "label2", htmlFor: name, className: "inputLabel" }, label)),
|
|
119
|
+
React__default.createElement("div", { style: { position: 'relative' } },
|
|
120
|
+
CustomInput ? (CustomInput) : (React__default.createElement("input", Object.assign({ id: name, name: name, placeholder: placeholder, onChange: nativeOnChange !== null && nativeOnChange !== void 0 ? nativeOnChange : ((e) => handleOnChange(e.target.value)), onKeyPress: onKeyPress, type: type, "aria-label": type, disabled: isDisabled, value: localValue, autoComplete: autoComplete, ref: ref, autoFocus: autoFocus, inputMode: isNumerousKeyboard || type === 'number' ? 'numeric' : type, pattern: isNumerousKeyboard ? '[0-9]*' : '.*', onFocus: onFocus, enterKeyHint: enterKeyHint }, other))),
|
|
121
|
+
DisplayIcon && (React__default.createElement(StyledDisplayIcon, { className: "displayIcon" }, DisplayIcon)),
|
|
122
|
+
ActionIcon && (React__default.createElement(StyledActionIcon, { className: "actionIcon", onClick: handleOnActionClick }, ActionIcon))),
|
|
123
|
+
errorMessage && errorMessage.length > 0 && (React__default.createElement(StyledErrorLabel, { className: "errorLabel" }, errorMessage))));
|
|
124
|
+
});
|
|
125
|
+
PureInput.displayName = 'PureInput';
|
|
126
|
+
|
|
127
|
+
const StyledCheckbox = styled.div `
|
|
128
|
+
display: flex;
|
|
129
|
+
cursor: pointer;
|
|
130
|
+
|
|
131
|
+
&[data-theme='marryBaby'] {
|
|
132
|
+
input {
|
|
133
|
+
width: 20px;
|
|
134
|
+
height: 20px;
|
|
135
|
+
border: 1.3px solid ${theme.mbColors.midGray};
|
|
136
|
+
border-radius: 9px;
|
|
137
|
+
|
|
138
|
+
cursor: inherit;
|
|
139
|
+
transition: border-color 0.4s, box-shadow 0.4s;
|
|
140
|
+
|
|
141
|
+
&:hover,
|
|
142
|
+
&:active {
|
|
143
|
+
border-color: ${theme.mbColors.cobalt};
|
|
144
|
+
box-shadow: 0 0 2px 2px ${theme.mbColors.cobalt};
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
&:focus-visible {
|
|
148
|
+
border: 2px solid ${theme.mbColors.cobalt};
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
&:checked {
|
|
152
|
+
border: 0;
|
|
153
|
+
background: ${theme.mbColors.cobalt}
|
|
154
|
+
url("data:image/svg+xml,%3Csvg width='9' height='7' viewBox='0 0 9 7' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.5 4L3.45455 6L8 1' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A")
|
|
155
|
+
no-repeat center center;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
label {
|
|
160
|
+
max-width: 15rem;
|
|
161
|
+
margin-left: 8px;
|
|
162
|
+
width: calc(100% - 24px);
|
|
163
|
+
cursor: inherit;
|
|
164
|
+
font-weight: 600;
|
|
165
|
+
font-size: 12px;
|
|
166
|
+
line-height: 20px;
|
|
167
|
+
letter-spacing: -0.2px;
|
|
168
|
+
color: ${theme.mbColors.gray};
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
input {
|
|
172
|
+
width: 20px;
|
|
173
|
+
height: 20px;
|
|
174
|
+
border: solid 1px ${theme.colors.gray500};
|
|
175
|
+
border-radius: 2px;
|
|
176
|
+
|
|
177
|
+
cursor: inherit;
|
|
178
|
+
transition: border-color 0.4s, box-shadow 0.4s;
|
|
179
|
+
|
|
180
|
+
&:hover,
|
|
181
|
+
&:active {
|
|
182
|
+
border-color: ${theme.colors.primaryBase};
|
|
183
|
+
box-shadow: 0 0 2px 2px ${theme.colors.primary200};
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
&:focus-visible {
|
|
187
|
+
border: 2px solid ${theme.colors.primaryActive};
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
&:checked {
|
|
191
|
+
border: 0;
|
|
192
|
+
background: ${theme.colors.primaryBase}
|
|
193
|
+
url("data:image/svg+xml,%3Csvg width='12' height='9' viewBox='0 0 12 9' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 1L4.125 8L1 4.81819' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A")
|
|
194
|
+
no-repeat center center;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
label {
|
|
199
|
+
max-width: 15rem;
|
|
200
|
+
margin-left: 8px;
|
|
201
|
+
font-weight: ${theme.sizes.fwRegular};
|
|
202
|
+
width: calc(100% - 24px);
|
|
203
|
+
cursor: inherit;
|
|
204
|
+
|
|
205
|
+
${MediaQueries.mbDown} {
|
|
206
|
+
font-size: 14px;
|
|
207
|
+
line-height: 24px;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
${MediaQueries.mbUp} {
|
|
211
|
+
font-size: 16px;
|
|
212
|
+
line-height: 22px;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
&[data-is-rectangle] > input {
|
|
217
|
+
position: relative;
|
|
218
|
+
width: unset;
|
|
219
|
+
height: unset;
|
|
220
|
+
padding: 5px 12px;
|
|
221
|
+
border: 1px solid ${theme.colors.neutral100};
|
|
222
|
+
border-radius: 32px;
|
|
223
|
+
|
|
224
|
+
&::after {
|
|
225
|
+
color: ${theme.colors.gray800};
|
|
226
|
+
content: attr(data-label-text);
|
|
227
|
+
font-size: 13px;
|
|
228
|
+
}
|
|
229
|
+
&:checked {
|
|
230
|
+
border-color: ${theme.colors.primary50};
|
|
231
|
+
&::after {
|
|
232
|
+
color: ${theme.colors.primaryBase};
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
&:checked {
|
|
236
|
+
background: ${theme.colors.primary50};
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
&[data-disabled] {
|
|
241
|
+
color: ${theme.colors.gray300};
|
|
242
|
+
cursor: not-allowed;
|
|
243
|
+
input {
|
|
244
|
+
border-color: ${theme.colors.gray300};
|
|
245
|
+
&:hover {
|
|
246
|
+
border-color: ${theme.colors.gray300};
|
|
247
|
+
box-shadow: none;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
`;
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* @deprecated Consider to use at '@hhgtech/hhg-components/mantine'
|
|
255
|
+
*/
|
|
256
|
+
const Checkbox = ({ label, name, checked, className, isDisabled, onChange, value, isRectangle, inputDataTestId, siteType, }) => {
|
|
257
|
+
return (React__default.createElement(StyledCheckbox, { className: className, "data-disabled": isDisabled || undefined, "data-is-rectangle": isRectangle || undefined, "data-label-text": label, "data-theme": siteType },
|
|
258
|
+
React__default.createElement("input", { type: "checkbox", checked: checked, name: name, onChange: () => onChange(value, !checked), disabled: isDisabled, value: value, id: `${name}-${value}`, "data-label-text": label, "data-testid": inputDataTestId }),
|
|
259
|
+
!isRectangle && React__default.createElement("label", { htmlFor: `${name}-${value}` }, label)));
|
|
260
|
+
};
|
|
261
|
+
|
|
262
|
+
export { Checkbox as C, PureInput as P };
|