@hhgtech/hhg-components 1.28.68 → 1.28.69
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/BMI_BOYS.percentile.monthly-48c9471d.js +688 -0
- package/build/BMI_BOYS.percentile.weekly-4965852e.js +182 -0
- package/build/BMI_BOYS.percentile.yearly-0f7cc8f4.js +83 -0
- package/build/BMI_BOYS.zscore.monthly-5bb8a433.js +440 -0
- package/build/BMI_BOYS.zscore.weekly-3d56f80f.js +118 -0
- package/build/BMI_BOYS.zscore.yearly-57081f24.js +55 -0
- package/build/BMI_GIRLS.percentile.monthly-95859cd9.js +688 -0
- package/build/BMI_GIRLS.percentile.weekly-009cf4df.js +182 -0
- package/build/BMI_GIRLS.percentile.yearly-4436947b.js +83 -0
- package/build/BMI_GIRLS.zscore.monthly-689b4eee.js +440 -0
- package/build/BMI_GIRLS.zscore.weekly-dff693df.js +118 -0
- package/build/BMI_GIRLS.zscore.yearly-05ef5f4f.js +55 -0
- package/build/ChevronDown-275f1ab5.js +29 -0
- package/build/HEAD CIRCUM_BOYS.percentile.monthly-55c580a7.js +688 -0
- package/build/HEAD CIRCUM_BOYS.percentile.weekly-e30f4a42.js +182 -0
- package/build/HEAD CIRCUM_BOYS.percentile.yearly-2378a5f0.js +83 -0
- package/build/HEAD CIRCUM_BOYS.zscore.monthly-102d5559.js +440 -0
- package/build/HEAD CIRCUM_BOYS.zscore.weekly-7b0f1ba8.js +118 -0
- package/build/HEAD CIRCUM_BOYS.zscore.yearly-e9237d31.js +55 -0
- package/build/HEAD CIRCUM_GIRLS.percentile.monthly-1ddda8b3.js +688 -0
- package/build/HEAD CIRCUM_GIRLS.percentile.weekly-843147ea.js +182 -0
- package/build/HEAD CIRCUM_GIRLS.percentile.yearly-9b51c237.js +83 -0
- package/build/HEAD CIRCUM_GIRLS.zscore.monthly-3f1b233c.js +440 -0
- package/build/HEAD CIRCUM_GIRLS.zscore.weekly-9e14d3fe.js +118 -0
- package/build/HEAD CIRCUM_GIRLS.zscore.yearly-d924f5ae.js +55 -0
- package/build/HEIGHT_BOYS.percentile.monthly-15538920.js +688 -0
- package/build/HEIGHT_BOYS.percentile.weekly-10bd0277.js +182 -0
- package/build/HEIGHT_BOYS.percentile.yearly-8e678d38.js +237 -0
- package/build/HEIGHT_BOYS.zscore.monthly-2c110da9.js +440 -0
- package/build/HEIGHT_BOYS.zscore.weekly-288b7733.js +118 -0
- package/build/HEIGHT_BOYS.zscore.yearly-42f6f9f7.js +153 -0
- package/build/HEIGHT_GIRLS.percentile.monthly-04abe7d2.js +688 -0
- package/build/HEIGHT_GIRLS.percentile.weekly-9653b16c.js +182 -0
- package/build/HEIGHT_GIRLS.percentile.yearly-9efacd67.js +237 -0
- package/build/HEIGHT_GIRLS.zscore.monthly-c64a97b2.js +440 -0
- package/build/HEIGHT_GIRLS.zscore.weekly-3302dd83.js +118 -0
- package/build/HEIGHT_GIRLS.zscore.yearly-ebe5114f.js +153 -0
- package/build/Subot-5fc40fb5.js +217 -0
- package/build/Visible-5c5d57cf.js +29 -0
- package/build/WEIGHT_BOYS.percentile.monthly-5e11e7a0.js +688 -0
- package/build/WEIGHT_BOYS.percentile.weekly-68ae2578.js +182 -0
- package/build/WEIGHT_BOYS.percentile.yearly-030c06a4.js +138 -0
- package/build/WEIGHT_BOYS.zscore.monthly-d22c7b57.js +440 -0
- package/build/WEIGHT_BOYS.zscore.weekly-d8d901e6.js +118 -0
- package/build/WEIGHT_BOYS.zscore.yearly-c311a084.js +90 -0
- package/build/WEIGHT_GIRLS.percentile.monthly-5c44f8eb.js +688 -0
- package/build/WEIGHT_GIRLS.percentile.weekly-faa98671.js +182 -0
- package/build/WEIGHT_GIRLS.percentile.yearly-560b862e.js +138 -0
- package/build/WEIGHT_GIRLS.zscore.monthly-5365ba1a.js +440 -0
- package/build/WEIGHT_GIRLS.zscore.weekly-0d9dc521.js +118 -0
- package/build/WEIGHT_GIRLS.zscore.yearly-5a3c4e43.js +90 -0
- package/build/adapters.js +36 -1
- package/build/{esm/animation-a158bfd1.js → animation-eb4e500b.js} +32 -10
- package/build/babyGrowth.js +913 -47
- package/build/cache.js +13 -1
- package/build/care.js +38 -1
- package/build/components.js +186 -1
- package/build/constants-8b8bc19f.js +255 -0
- package/build/constants-ae18ce18.js +935 -0
- package/build/constants.js +43 -1
- package/build/cookieHelper-5c9f4bb8.js +43 -0
- package/build/core-2aa8d86c.js +51 -0
- package/build/dataTransform-089f414c.js +66 -0
- package/build/ecom.js +745 -1
- package/build/esm/BMI_BOYS.percentile.monthly-de5dce68.js +686 -0
- package/build/esm/BMI_BOYS.percentile.weekly-9d3990b6.js +180 -0
- package/build/esm/BMI_BOYS.percentile.yearly-98b9114a.js +81 -0
- package/build/esm/BMI_BOYS.zscore.monthly-394646f0.js +438 -0
- package/build/esm/BMI_BOYS.zscore.weekly-c669ea51.js +116 -0
- package/build/esm/BMI_BOYS.zscore.yearly-771ef6b6.js +53 -0
- package/build/esm/BMI_GIRLS.percentile.monthly-1ff3d499.js +686 -0
- package/build/esm/BMI_GIRLS.percentile.weekly-211d2f27.js +180 -0
- package/build/esm/BMI_GIRLS.percentile.yearly-206fdcff.js +81 -0
- package/build/esm/BMI_GIRLS.zscore.monthly-b1137e36.js +438 -0
- package/build/esm/BMI_GIRLS.zscore.weekly-63ed3cd6.js +116 -0
- package/build/esm/BMI_GIRLS.zscore.yearly-221d187c.js +53 -0
- package/build/esm/ChevronDown-9a8ece61.js +7 -0
- package/build/esm/HEAD CIRCUM_BOYS.percentile.monthly-4c37847c.js +686 -0
- package/build/esm/HEAD CIRCUM_BOYS.percentile.weekly-8f6ea38a.js +180 -0
- package/build/esm/HEAD CIRCUM_BOYS.percentile.yearly-6c12a99a.js +81 -0
- package/build/esm/HEAD CIRCUM_BOYS.zscore.monthly-c531b497.js +438 -0
- package/build/esm/HEAD CIRCUM_BOYS.zscore.weekly-6cafba00.js +116 -0
- package/build/esm/HEAD CIRCUM_BOYS.zscore.yearly-fe8114a0.js +53 -0
- package/build/esm/HEAD CIRCUM_GIRLS.percentile.monthly-25ce0d36.js +686 -0
- package/build/esm/HEAD CIRCUM_GIRLS.percentile.weekly-5d3f2862.js +180 -0
- package/build/esm/HEAD CIRCUM_GIRLS.percentile.yearly-2b709ca5.js +81 -0
- package/build/esm/HEAD CIRCUM_GIRLS.zscore.monthly-e8617bae.js +438 -0
- package/build/esm/HEAD CIRCUM_GIRLS.zscore.weekly-f3252d67.js +116 -0
- package/build/esm/HEAD CIRCUM_GIRLS.zscore.yearly-5b62d41f.js +53 -0
- package/build/esm/HEIGHT_BOYS.percentile.monthly-63d2cf96.js +686 -0
- package/build/esm/HEIGHT_BOYS.percentile.weekly-8ea5102d.js +180 -0
- package/build/esm/HEIGHT_BOYS.percentile.yearly-8107b77b.js +235 -0
- package/build/esm/HEIGHT_BOYS.zscore.monthly-641cdfa3.js +438 -0
- package/build/esm/HEIGHT_BOYS.zscore.weekly-86da0362.js +116 -0
- package/build/esm/HEIGHT_BOYS.zscore.yearly-060f6e79.js +151 -0
- package/build/esm/HEIGHT_GIRLS.percentile.monthly-fb987d37.js +686 -0
- package/build/esm/HEIGHT_GIRLS.percentile.weekly-82655dc0.js +180 -0
- package/build/esm/HEIGHT_GIRLS.percentile.yearly-a63b8456.js +235 -0
- package/build/esm/HEIGHT_GIRLS.zscore.monthly-77d676a3.js +438 -0
- package/build/esm/HEIGHT_GIRLS.zscore.weekly-c0387a4e.js +116 -0
- package/build/esm/HEIGHT_GIRLS.zscore.yearly-41203c20.js +151 -0
- package/build/esm/Subot-3289bd8e.js +212 -0
- package/build/esm/Visible-a3d436dd.js +7 -0
- package/build/esm/WEIGHT_BOYS.percentile.monthly-50802d8b.js +686 -0
- package/build/esm/WEIGHT_BOYS.percentile.weekly-4d72ddd6.js +180 -0
- package/build/esm/WEIGHT_BOYS.percentile.yearly-20a29844.js +136 -0
- package/build/esm/WEIGHT_BOYS.zscore.monthly-729e6614.js +438 -0
- package/build/esm/WEIGHT_BOYS.zscore.weekly-90352f48.js +116 -0
- package/build/esm/WEIGHT_BOYS.zscore.yearly-fe1871cc.js +88 -0
- package/build/esm/WEIGHT_GIRLS.percentile.monthly-e6afb2e0.js +686 -0
- package/build/esm/WEIGHT_GIRLS.percentile.weekly-b66d3016.js +180 -0
- package/build/esm/WEIGHT_GIRLS.percentile.yearly-a55622c5.js +136 -0
- package/build/esm/WEIGHT_GIRLS.zscore.monthly-2cdcbe75.js +438 -0
- package/build/esm/WEIGHT_GIRLS.zscore.weekly-d5be31d5.js +116 -0
- package/build/esm/WEIGHT_GIRLS.zscore.yearly-99e8d3a7.js +88 -0
- package/build/esm/adapters.js +26 -1
- package/build/{animation-ea278d9a.js → esm/animation-3d5edc39.js} +22 -10
- package/build/esm/babyGrowth.js +883 -47
- package/build/esm/cache.js +3 -1
- package/build/esm/care.js +26 -1
- package/build/esm/components.js +88 -1
- package/build/esm/constants-2a6d2434.js +932 -0
- package/build/esm/constants-b77ffe3d.js +238 -0
- package/build/esm/constants.js +4 -1
- package/build/esm/cookieHelper-d314282c.js +39 -0
- package/build/esm/core-8c73d133.js +47 -0
- package/build/esm/dataTransform-8ecfc046.js +56 -0
- package/build/esm/ecom.js +737 -1
- package/build/esm/footer.js +31 -1
- package/build/esm/gAssets.js +5 -1
- package/build/esm/getDynamicHealthTool-f4497aa5.js +44 -0
- package/build/esm/getSocialList-a5b8462e.js +66 -0
- package/build/esm/hooks.js +21 -1
- package/build/esm/i18n-values/en-PH.js +600 -1
- package/build/esm/i18n-values/hi-IN.js +600 -1
- package/build/esm/i18n-values/id-ID.js +600 -1
- package/build/esm/i18n-values/km-KH.js +600 -1
- package/build/esm/i18n-values/ms-MY.js +602 -1
- package/build/esm/i18n-values/my-MM.js +600 -1
- package/build/esm/i18n-values/th-TH.js +600 -1
- package/build/esm/i18n-values/tl-PH.js +600 -1
- package/build/esm/i18n-values/vi-VN.js +607 -1
- package/build/esm/i18n-values/vi-VN_MB.js +607 -1
- package/build/esm/i18n-values/zh-TW.js +600 -1
- package/build/esm/i18n.js +55 -1
- package/build/esm/i18nV2.js +18 -1
- package/build/esm/index-12fa4985.js +8 -0
- package/build/esm/index-1e59f99a.js +152 -0
- package/build/esm/index-32e53dac.js +1936 -0
- package/build/esm/index-3474401a.js +149 -0
- package/build/esm/index-34899aa3.js +17 -0
- package/build/esm/index-350e8f5b.js +124 -0
- package/build/esm/index-41bf860a.js +151 -0
- package/build/esm/index-4aa8e518.js +116 -0
- package/build/esm/index-4fe2b03f.js +32 -0
- package/build/esm/index-6ea6484e.js +29 -0
- package/build/esm/index-717401ee.js +184 -0
- package/build/esm/index-7af5242a.js +24 -0
- package/build/esm/index-7b8c85cd.js +8302 -0
- package/build/esm/index-81f295b7.js +23 -0
- package/build/esm/index-8858383e.js +52 -0
- package/build/esm/index-8f52dcf3.js +33 -0
- package/build/esm/index-9ea7e838.js +33 -0
- package/build/esm/index-aabac2aa.js +3241 -0
- package/build/esm/index-b9b2c417.js +837 -0
- package/build/esm/index-c2da5293.js +12 -0
- package/build/esm/index-c56d60db.js +370 -0
- package/build/esm/index-c5d7f692.js +24 -0
- package/build/esm/index-cc93e010.js +53 -0
- package/build/esm/index-d7f046db.js +5 -0
- package/build/esm/index-d8177667.js +14 -0
- package/build/esm/index-da139dda.js +615 -0
- package/build/esm/index-e612be9c.js +905 -0
- package/build/esm/index-f3d0592b.js +71 -0
- package/build/esm/index.js +190 -1
- package/build/{index.styled-625bfdc7.js → esm/index.styled-9c9db9cc.js} +17 -5
- package/build/esm/index.styles-5add27c5.js +1303 -0
- package/build/esm/isProduction-0ea904dd.js +27 -0
- package/build/esm/lead.js +2140 -1
- package/build/esm/localizeNumberFormat-2ac3773e.js +23 -0
- package/build/esm/mantine.js +113 -1
- package/build/esm/misc.js +22 -1
- package/build/esm/navigation.js +51 -1
- package/build/esm/normalizeLink-d1c9617e.js +12 -0
- package/build/esm/number-0c126a39.js +38 -0
- package/build/esm/onboardingV2.js +860 -34
- package/build/esm/paths-a8204db4.js +14 -0
- package/build/esm/pwg.js +208 -7
- package/build/esm/routing-2474f896.js +40 -0
- package/build/esm/subot.js +4553 -134
- package/build/esm/theme-e74db08c.js +186 -0
- package/build/esm/together.js +52 -1
- package/build/esm/translationsContext-ad3e25de.js +5 -0
- package/build/esm/tslib.es6-1b1533a9.js +38 -0
- package/build/esm/types-06f00b3d.js +8015 -0
- package/build/esm/types-15e34418.js +3432 -0
- package/build/esm/types-ba190c26.js +21 -0
- package/build/esm/types.js +1 -1
- package/build/esm/unifyEnv.js +42 -1
- package/build/esm/useCategory-2c87152d.js +292 -0
- package/build/esm/useHealthToolCache-29d22ddb.js +17 -0
- package/build/esm/useIsInit-8a2fc8e5.js +11 -0
- package/build/esm/useOutsideClick-c8a7ff20.js +45 -0
- package/build/esm/usePlacesAutocomplete-63e04e8e.js +80 -0
- package/build/esm/useScrollbarSize-51ce1374.js +57 -0
- package/build/esm/useTranslations-4f1db486.js +26 -0
- package/build/esm/useUniqueId-3638402f.js +41 -0
- package/build/esm/utils-2c484c05.js +132 -0
- package/build/esm/utils-3a2a47d9.js +22 -0
- package/build/esm/utils-6d7b88da.js +367 -0
- package/build/esm/utils-70718e9c.js +1124 -0
- package/build/esm/vaccination.js +868 -40
- package/build/footer.js +39 -1
- package/build/gAssets.js +14 -1
- package/build/getDynamicHealthTool-114a1e27.js +48 -0
- package/build/getSocialList-4713441d.js +72 -0
- package/build/hooks.js +44 -1
- package/build/i18n-values/en-PH.js +611 -1
- package/build/i18n-values/hi-IN.js +611 -1
- package/build/i18n-values/id-ID.js +611 -1
- package/build/i18n-values/km-KH.js +611 -1
- package/build/i18n-values/ms-MY.js +613 -1
- package/build/i18n-values/my-MM.js +611 -1
- package/build/i18n-values/th-TH.js +611 -1
- package/build/i18n-values/tl-PH.js +611 -1
- package/build/i18n-values/vi-VN.js +618 -1
- package/build/i18n-values/vi-VN_MB.js +618 -1
- package/build/i18n-values/zh-TW.js +611 -1
- package/build/i18n.js +64 -1
- package/build/i18nV2.js +26 -1
- package/build/index-020e6908.js +39 -0
- package/build/index-0da9b2e8.js +59 -0
- package/build/index-11468c00.js +157 -0
- package/build/index-117448a5.js +133 -0
- package/build/index-12c07f71.js +18 -0
- package/build/index-1a105e87.js +123 -0
- package/build/index-1baaedb0.js +55 -0
- package/build/index-32d38318.js +7 -0
- package/build/index-38582ee0.js +8373 -0
- package/build/index-3e5fc2d6.js +1994 -0
- package/build/index-3eef6bed.js +853 -0
- package/build/index-4035e658.js +159 -0
- package/build/index-488d71ae.js +30 -0
- package/build/index-5553f9e1.js +930 -0
- package/build/index-5fa68e45.js +380 -0
- package/build/index-7b467209.js +39 -0
- package/build/index-81cb1142.js +77 -0
- package/build/index-84ab5b89.js +38 -0
- package/build/index-8a95d709.js +30 -0
- package/build/index-9da9f0c3.js +35 -0
- package/build/index-af91c83e.js +20 -0
- package/build/index-b6aea85e.js +191 -0
- package/build/index-bc4f4c33.js +156 -0
- package/build/index-c604d6bb.js +624 -0
- package/build/index-d330735e.js +30 -0
- package/build/index-d8a7efaf.js +14 -0
- package/build/index-e2e81fa2.js +23 -0
- package/build/index-e3d896b3.js +3261 -0
- package/build/index.js +436 -1
- package/build/{esm/index.styled-ac7ac0fc.js → index.styled-5628b3e7.js} +25 -5
- package/build/index.styles-b822bf42.js +1342 -0
- package/build/isProduction-5ce3a388.js +29 -0
- package/build/lead.js +2168 -1
- package/build/localizeNumberFormat-f5f50987.js +31 -0
- package/build/mantine.js +154 -1
- package/build/misc.js +70 -1
- package/build/navigation.js +61 -1
- package/build/normalizeLink-6f7b85d8.js +15 -0
- package/build/number-79fe92e1.js +40 -0
- package/build/onboardingV2.js +892 -34
- package/build/paths-a5643d9e.js +16 -0
- package/build/pwg.js +217 -7
- package/build/routing-191a9a00.js +46 -0
- package/build/subot.js +4592 -134
- package/build/theme-fa910869.js +189 -0
- package/build/together.js +112 -1
- package/build/translationsContext-950334bf.js +7 -0
- package/build/tslib.es6-65e312a5.js +41 -0
- package/build/types-0f117a9f.js +8084 -0
- package/build/types-1fedb3d1.js +3446 -0
- package/build/types-52a4e888.js +24 -0
- package/build/types.js +56 -1
- package/build/unifyEnv.js +46 -1
- package/build/useCategory-cfc702f5.js +299 -0
- package/build/useHealthToolCache-43a7014d.js +19 -0
- package/build/useIsInit-89535012.js +13 -0
- package/build/useOutsideClick-c6813964.js +49 -0
- package/build/usePlacesAutocomplete-297de092.js +84 -0
- package/build/useScrollbarSize-0fa31aa7.js +64 -0
- package/build/useTranslations-e1853417.js +32 -0
- package/build/useUniqueId-11369116.js +44 -0
- package/build/utils-52113753.js +384 -0
- package/build/utils-64bd0c42.js +143 -0
- package/build/utils-661411f6.js +1171 -0
- package/build/utils-e1513cbc.js +25 -0
- package/build/vaccination.js +891 -40
- package/package.json +4 -5
- package/build/BMI_BOYS.percentile.monthly-8cc875f7.js +0 -1
- package/build/BMI_BOYS.percentile.weekly-b45b05e3.js +0 -1
- package/build/BMI_BOYS.percentile.yearly-e4f1d19c.js +0 -1
- package/build/BMI_BOYS.zscore.monthly-e51737eb.js +0 -1
- package/build/BMI_BOYS.zscore.weekly-4080c0d5.js +0 -1
- package/build/BMI_BOYS.zscore.yearly-703e5747.js +0 -1
- package/build/BMI_GIRLS.percentile.monthly-ac5a001d.js +0 -1
- package/build/BMI_GIRLS.percentile.weekly-6a6f4703.js +0 -1
- package/build/BMI_GIRLS.percentile.yearly-8eb7e8e5.js +0 -1
- package/build/BMI_GIRLS.zscore.monthly-c2763465.js +0 -1
- package/build/BMI_GIRLS.zscore.weekly-7438d8b6.js +0 -1
- package/build/BMI_GIRLS.zscore.yearly-a56ffb0c.js +0 -1
- package/build/ChevronDown-81b50697.js +0 -1
- package/build/HEAD CIRCUM_BOYS.percentile.monthly-cccf9306.js +0 -1
- package/build/HEAD CIRCUM_BOYS.percentile.weekly-85fc8a7e.js +0 -1
- package/build/HEAD CIRCUM_BOYS.percentile.yearly-d22ad913.js +0 -1
- package/build/HEAD CIRCUM_BOYS.zscore.monthly-4db20906.js +0 -1
- package/build/HEAD CIRCUM_BOYS.zscore.weekly-1a4dc975.js +0 -1
- package/build/HEAD CIRCUM_BOYS.zscore.yearly-a2bcdd3a.js +0 -1
- package/build/HEAD CIRCUM_GIRLS.percentile.monthly-13e127f5.js +0 -1
- package/build/HEAD CIRCUM_GIRLS.percentile.weekly-95a7695c.js +0 -1
- package/build/HEAD CIRCUM_GIRLS.percentile.yearly-852dc893.js +0 -1
- package/build/HEAD CIRCUM_GIRLS.zscore.monthly-9865857d.js +0 -1
- package/build/HEAD CIRCUM_GIRLS.zscore.weekly-9bdf4dda.js +0 -1
- package/build/HEAD CIRCUM_GIRLS.zscore.yearly-ac24fb2f.js +0 -1
- package/build/HEIGHT_BOYS.percentile.monthly-691b0568.js +0 -1
- package/build/HEIGHT_BOYS.percentile.weekly-520bd6ac.js +0 -1
- package/build/HEIGHT_BOYS.percentile.yearly-9093722e.js +0 -1
- package/build/HEIGHT_BOYS.zscore.monthly-84db220e.js +0 -1
- package/build/HEIGHT_BOYS.zscore.weekly-ce0c52d1.js +0 -1
- package/build/HEIGHT_BOYS.zscore.yearly-dab7d4e0.js +0 -1
- package/build/HEIGHT_GIRLS.percentile.monthly-7f42e4cd.js +0 -1
- package/build/HEIGHT_GIRLS.percentile.weekly-79ca42e5.js +0 -1
- package/build/HEIGHT_GIRLS.percentile.yearly-4e11d0f8.js +0 -1
- package/build/HEIGHT_GIRLS.zscore.monthly-74be7929.js +0 -1
- package/build/HEIGHT_GIRLS.zscore.weekly-a47a1d90.js +0 -1
- package/build/HEIGHT_GIRLS.zscore.yearly-f4984496.js +0 -1
- package/build/Subot-b0700a95.js +0 -1
- package/build/Visible-0267024a.js +0 -1
- package/build/WEIGHT_BOYS.percentile.monthly-08b33be0.js +0 -1
- package/build/WEIGHT_BOYS.percentile.weekly-65a4fa70.js +0 -1
- package/build/WEIGHT_BOYS.percentile.yearly-f3b46cc5.js +0 -1
- package/build/WEIGHT_BOYS.zscore.monthly-d1191a6a.js +0 -1
- package/build/WEIGHT_BOYS.zscore.weekly-61c60cf9.js +0 -1
- package/build/WEIGHT_BOYS.zscore.yearly-0d89c866.js +0 -1
- package/build/WEIGHT_GIRLS.percentile.monthly-221c1ba4.js +0 -1
- package/build/WEIGHT_GIRLS.percentile.weekly-fbd203a6.js +0 -1
- package/build/WEIGHT_GIRLS.percentile.yearly-36a909c2.js +0 -1
- package/build/WEIGHT_GIRLS.zscore.monthly-09b6ae5b.js +0 -1
- package/build/WEIGHT_GIRLS.zscore.weekly-7ada849a.js +0 -1
- package/build/WEIGHT_GIRLS.zscore.yearly-5115a509.js +0 -1
- package/build/constants-47b9b5ff.js +0 -108
- package/build/constants-8d5fe5b9.js +0 -1
- package/build/cookieHelper-effc4373.js +0 -1
- package/build/core-fc6dbe08.js +0 -1
- package/build/dataTransform-ad721ec5.js +0 -1
- package/build/esm/BMI_BOYS.percentile.monthly-2aa26d5a.js +0 -1
- package/build/esm/BMI_BOYS.percentile.weekly-838f6b27.js +0 -1
- package/build/esm/BMI_BOYS.percentile.yearly-e77609d7.js +0 -1
- package/build/esm/BMI_BOYS.zscore.monthly-2657168d.js +0 -1
- package/build/esm/BMI_BOYS.zscore.weekly-d3c18887.js +0 -1
- package/build/esm/BMI_BOYS.zscore.yearly-3759a54e.js +0 -1
- package/build/esm/BMI_GIRLS.percentile.monthly-f3e35273.js +0 -1
- package/build/esm/BMI_GIRLS.percentile.weekly-7936ee97.js +0 -1
- package/build/esm/BMI_GIRLS.percentile.yearly-757b0bc4.js +0 -1
- package/build/esm/BMI_GIRLS.zscore.monthly-d9760b61.js +0 -1
- package/build/esm/BMI_GIRLS.zscore.weekly-a58e0db1.js +0 -1
- package/build/esm/BMI_GIRLS.zscore.yearly-92413c27.js +0 -1
- package/build/esm/ChevronDown-e7d44dc3.js +0 -1
- package/build/esm/HEAD CIRCUM_BOYS.percentile.monthly-c50f125e.js +0 -1
- package/build/esm/HEAD CIRCUM_BOYS.percentile.weekly-29038598.js +0 -1
- package/build/esm/HEAD CIRCUM_BOYS.percentile.yearly-32c4e2be.js +0 -1
- package/build/esm/HEAD CIRCUM_BOYS.zscore.monthly-cd04e4b1.js +0 -1
- package/build/esm/HEAD CIRCUM_BOYS.zscore.weekly-6b63745c.js +0 -1
- package/build/esm/HEAD CIRCUM_BOYS.zscore.yearly-3a5be78c.js +0 -1
- package/build/esm/HEAD CIRCUM_GIRLS.percentile.monthly-c7996a02.js +0 -1
- package/build/esm/HEAD CIRCUM_GIRLS.percentile.weekly-553c94d5.js +0 -1
- package/build/esm/HEAD CIRCUM_GIRLS.percentile.yearly-97f86688.js +0 -1
- package/build/esm/HEAD CIRCUM_GIRLS.zscore.monthly-a442f7cc.js +0 -1
- package/build/esm/HEAD CIRCUM_GIRLS.zscore.weekly-cdd37afd.js +0 -1
- package/build/esm/HEAD CIRCUM_GIRLS.zscore.yearly-50d9daff.js +0 -1
- package/build/esm/HEIGHT_BOYS.percentile.monthly-53580c1f.js +0 -1
- package/build/esm/HEIGHT_BOYS.percentile.weekly-60514fb8.js +0 -1
- package/build/esm/HEIGHT_BOYS.percentile.yearly-d6b456a7.js +0 -1
- package/build/esm/HEIGHT_BOYS.zscore.monthly-21bd1444.js +0 -1
- package/build/esm/HEIGHT_BOYS.zscore.weekly-2a4e7aa0.js +0 -1
- package/build/esm/HEIGHT_BOYS.zscore.yearly-7f68c522.js +0 -1
- package/build/esm/HEIGHT_GIRLS.percentile.monthly-d5d7448a.js +0 -1
- package/build/esm/HEIGHT_GIRLS.percentile.weekly-c3c18801.js +0 -1
- package/build/esm/HEIGHT_GIRLS.percentile.yearly-3491901c.js +0 -1
- package/build/esm/HEIGHT_GIRLS.zscore.monthly-9f15dd03.js +0 -1
- package/build/esm/HEIGHT_GIRLS.zscore.weekly-81319284.js +0 -1
- package/build/esm/HEIGHT_GIRLS.zscore.yearly-8a7db57c.js +0 -1
- package/build/esm/Subot-fcd7c77c.js +0 -1
- package/build/esm/Visible-66d0e6f3.js +0 -1
- package/build/esm/WEIGHT_BOYS.percentile.monthly-0f5ea175.js +0 -1
- package/build/esm/WEIGHT_BOYS.percentile.weekly-88f50098.js +0 -1
- package/build/esm/WEIGHT_BOYS.percentile.yearly-63383bc3.js +0 -1
- package/build/esm/WEIGHT_BOYS.zscore.monthly-bf93eec1.js +0 -1
- package/build/esm/WEIGHT_BOYS.zscore.weekly-fe0600be.js +0 -1
- package/build/esm/WEIGHT_BOYS.zscore.yearly-4212bebb.js +0 -1
- package/build/esm/WEIGHT_GIRLS.percentile.monthly-6cc8cf8c.js +0 -1
- package/build/esm/WEIGHT_GIRLS.percentile.weekly-05d66e6d.js +0 -1
- package/build/esm/WEIGHT_GIRLS.percentile.yearly-b8c1af06.js +0 -1
- package/build/esm/WEIGHT_GIRLS.zscore.monthly-8c9195d5.js +0 -1
- package/build/esm/WEIGHT_GIRLS.zscore.weekly-4ef9aeee.js +0 -1
- package/build/esm/WEIGHT_GIRLS.zscore.yearly-0ccaeb51.js +0 -1
- package/build/esm/constants-046883ea.js +0 -1
- package/build/esm/constants-1e65de37.js +0 -108
- package/build/esm/cookieHelper-e37e6893.js +0 -1
- package/build/esm/core-7a237cdc.js +0 -1
- package/build/esm/dataTransform-f4476a6b.js +0 -1
- package/build/esm/getDynamicHealthTool-e095ea8b.js +0 -1
- package/build/esm/getSocialList-5f74d2b2.js +0 -1
- package/build/esm/index-006bca17.js +0 -1
- package/build/esm/index-068a9606.js +0 -137
- package/build/esm/index-0d0e5f45.js +0 -1
- package/build/esm/index-1e29d7b0.js +0 -1
- package/build/esm/index-2b572b4f.js +0 -1
- package/build/esm/index-318d4230.js +0 -117
- package/build/esm/index-39174b30.js +0 -1
- package/build/esm/index-3bfcc95c.js +0 -1
- package/build/esm/index-3c612859.js +0 -1
- package/build/esm/index-4004c359.js +0 -113
- package/build/esm/index-41f67971.js +0 -177
- package/build/esm/index-42a8c7e8.js +0 -1430
- package/build/esm/index-461eded2.js +0 -2748
- package/build/esm/index-575f65cb.js +0 -1
- package/build/esm/index-7f4008ff.js +0 -1
- package/build/esm/index-81dbde00.js +0 -375
- package/build/esm/index-99348fe5.js +0 -1
- package/build/esm/index-9b8a2194.js +0 -1
- package/build/esm/index-9d529405.js +0 -1
- package/build/esm/index-a445a873.js +0 -1
- package/build/esm/index-ab99f4fa.js +0 -1
- package/build/esm/index-b7782e6c.js +0 -1
- package/build/esm/index-b7a87c5c.js +0 -50
- package/build/esm/index-c737fbcc.js +0 -1
- package/build/esm/index-dfe2918d.js +0 -1
- package/build/esm/index-e7dea007.js +0 -1
- package/build/esm/index-eab0e39a.js +0 -1
- package/build/esm/index-fa743e14.js +0 -1
- package/build/esm/index.styles-d0b249c6.js +0 -817
- package/build/esm/isProduction-819e0c5c.js +0 -1
- package/build/esm/localizeNumberFormat-87b8adfd.js +0 -1
- package/build/esm/normalizeLink-86ab5a4c.js +0 -1
- package/build/esm/number-087a7e5f.js +0 -1
- package/build/esm/paths-838a5528.js +0 -1
- package/build/esm/routing-c85cbf05.js +0 -1
- package/build/esm/theme-691eca44.js +0 -1
- package/build/esm/translationsContext-f8842fe7.js +0 -1
- package/build/esm/tslib.es6-1ab8a2bb.js +0 -1
- package/build/esm/types-2d76a291.js +0 -3004
- package/build/esm/types-81267cf7.js +0 -1
- package/build/esm/types-e02aa1d1.js +0 -785
- package/build/esm/useCategory-16048c77.js +0 -1
- package/build/esm/useHealthToolCache-b2ecca8b.js +0 -1
- package/build/esm/useIsInit-c9c6a218.js +0 -1
- package/build/esm/useOutsideClick-9787ba70.js +0 -1
- package/build/esm/usePlacesAutocomplete-1966a8e8.js +0 -1
- package/build/esm/useScrollbarSize-2cadb783.js +0 -1
- package/build/esm/useTranslations-06f29a74.js +0 -1
- package/build/esm/useUniqueId-8d28d0f0.js +0 -1
- package/build/esm/utils-21a3e198.js +0 -1
- package/build/esm/utils-581f9d39.js +0 -8
- package/build/esm/utils-8845cf64.js +0 -141
- package/build/esm/utils-9188a853.js +0 -1
- package/build/getDynamicHealthTool-110fd918.js +0 -1
- package/build/getSocialList-eca125e9.js +0 -1
- package/build/index-06e0154a.js +0 -177
- package/build/index-07abd94a.js +0 -1
- package/build/index-0c773078.js +0 -117
- package/build/index-170f5567.js +0 -1
- package/build/index-19ccb0c7.js +0 -1
- package/build/index-219cacd2.js +0 -1
- package/build/index-2c0386df.js +0 -50
- package/build/index-2ce34495.js +0 -1
- package/build/index-3f31aa06.js +0 -1
- package/build/index-686fe563.js +0 -1
- package/build/index-6c8c7fa5.js +0 -1
- package/build/index-76c307b4.js +0 -375
- package/build/index-78e20b2b.js +0 -1
- package/build/index-853a455f.js +0 -1
- package/build/index-9834ba3a.js +0 -1
- package/build/index-9c1259e4.js +0 -1
- package/build/index-9eed92e6.js +0 -1
- package/build/index-a046b313.js +0 -137
- package/build/index-ae78fa34.js +0 -113
- package/build/index-c4552011.js +0 -1
- package/build/index-d0a7d5e2.js +0 -1
- package/build/index-d59720e6.js +0 -1
- package/build/index-de63ce4e.js +0 -1
- package/build/index-e363ea7e.js +0 -1
- package/build/index-e4952f3b.js +0 -2748
- package/build/index-e9919dca.js +0 -1430
- package/build/index-f124e061.js +0 -1
- package/build/index-fc3d21c5.js +0 -1
- package/build/index.styles-e56f16e2.js +0 -817
- package/build/isProduction-b8d43f53.js +0 -1
- package/build/localizeNumberFormat-7b0e4009.js +0 -1
- package/build/normalizeLink-eb3980aa.js +0 -1
- package/build/number-03c2dc35.js +0 -1
- package/build/paths-38b399e5.js +0 -1
- package/build/routing-fa35242c.js +0 -1
- package/build/theme-58404344.js +0 -1
- package/build/translationsContext-6a4e467c.js +0 -1
- package/build/tslib.es6-f82cfdbc.js +0 -1
- package/build/types-006c0884.js +0 -785
- package/build/types-48100068.js +0 -3004
- package/build/types-b4886ab8.js +0 -1
- package/build/useCategory-5efbe937.js +0 -1
- package/build/useHealthToolCache-4085d047.js +0 -1
- package/build/useIsInit-cde99e17.js +0 -1
- package/build/useOutsideClick-8d455bb1.js +0 -1
- package/build/usePlacesAutocomplete-fa0acdc7.js +0 -1
- package/build/useScrollbarSize-3593573d.js +0 -1
- package/build/useTranslations-d91f297f.js +0 -1
- package/build/useUniqueId-76286c45.js +0 -1
- package/build/utils-6c4e6bc4.js +0 -8
- package/build/utils-dd2fab54.js +0 -141
- package/build/utils-e1f42597.js +0 -1
- package/build/utils-fade3897.js +0 -1
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { _ as __rest } from './tslib.es6-1b1533a9.js';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { rem, createStyles, Text as Text$1 } from '@mantine/core';
|
|
4
|
+
|
|
5
|
+
var FontWeight;
|
|
6
|
+
(function (FontWeight) {
|
|
7
|
+
FontWeight[FontWeight["regular"] = 400] = "regular";
|
|
8
|
+
FontWeight[FontWeight["semiBold"] = 600] = "semiBold";
|
|
9
|
+
FontWeight[FontWeight["bold"] = 700] = "bold";
|
|
10
|
+
})(FontWeight || (FontWeight = {}));
|
|
11
|
+
const GlobalTextStyle = {
|
|
12
|
+
fontSize: {
|
|
13
|
+
base: [rem(16), rem(16)],
|
|
14
|
+
lg: [rem(18), rem(16)],
|
|
15
|
+
md: [rem(18), rem(16)],
|
|
16
|
+
sm: [rem(16), rem(14)],
|
|
17
|
+
xs: [rem(14), rem(12)],
|
|
18
|
+
s1: [rem(22), rem(18)],
|
|
19
|
+
s2: [rem(18), rem(16)],
|
|
20
|
+
s3: [rem(16), rem(14)],
|
|
21
|
+
s4: [rem(14), rem(12)],
|
|
22
|
+
s5: [rem(12), rem(12)],
|
|
23
|
+
p1: [rem(18), rem(16)],
|
|
24
|
+
p2: [rem(16), rem(16)],
|
|
25
|
+
p3: [rem(16), rem(14)],
|
|
26
|
+
p4: [rem(14), rem(12)],
|
|
27
|
+
p5: [rem(12), rem(12)],
|
|
28
|
+
c1: [rem(16), rem(14)],
|
|
29
|
+
c2: [rem(14), rem(12)],
|
|
30
|
+
n1: [rem(12), rem(12)],
|
|
31
|
+
label1: [rem(14), rem(14)],
|
|
32
|
+
label2: [rem(12), rem(12)],
|
|
33
|
+
h1: [rem(40), rem(26)],
|
|
34
|
+
h2: [rem(32), rem(24)],
|
|
35
|
+
h3: [rem(26), rem(20)],
|
|
36
|
+
h4: [rem(22), rem(18)],
|
|
37
|
+
h5: [rem(18), rem(16)],
|
|
38
|
+
h6: [rem(16), rem(14)],
|
|
39
|
+
},
|
|
40
|
+
lineHeight: {
|
|
41
|
+
base: [rem(24), rem(24)],
|
|
42
|
+
lg: [rem(32), rem(28)],
|
|
43
|
+
md: [rem(32), rem(28)],
|
|
44
|
+
sm: [rem(24), rem(22)],
|
|
45
|
+
xs: [rem(24), rem(18)],
|
|
46
|
+
s1: [rem(32), rem(26)],
|
|
47
|
+
s2: [rem(28), rem(24)],
|
|
48
|
+
s3: [rem(24), rem(24)],
|
|
49
|
+
s4: [rem(22), rem(18)],
|
|
50
|
+
s5: [rem(18), rem(18)],
|
|
51
|
+
p1: [rem(28), rem(28)],
|
|
52
|
+
p2: [rem(24), rem(24)],
|
|
53
|
+
p3: [rem(24), rem(22)],
|
|
54
|
+
p4: [rem(22), rem(18)],
|
|
55
|
+
c1: [rem(24), rem(22)],
|
|
56
|
+
c2: [rem(22), rem(18)],
|
|
57
|
+
n1: [rem(18), rem(18)],
|
|
58
|
+
label1: [rem(22), rem(22)],
|
|
59
|
+
label2: [rem(18), rem(18)],
|
|
60
|
+
h1: [rem(52), rem(34)],
|
|
61
|
+
h2: [rem(42), rem(32)],
|
|
62
|
+
h3: [rem(36), rem(26)],
|
|
63
|
+
h4: [rem(32), rem(26)],
|
|
64
|
+
h5: [rem(28), rem(24)],
|
|
65
|
+
h6: [rem(24), rem(22)],
|
|
66
|
+
},
|
|
67
|
+
letterSpacing: {
|
|
68
|
+
lg: [-0.2, 0],
|
|
69
|
+
md: [-0.2, 0],
|
|
70
|
+
sm: [0, -0.2],
|
|
71
|
+
s1: [-0.6, -0.6],
|
|
72
|
+
s2: [-0.4, -0.2],
|
|
73
|
+
s3: [0, -0.2],
|
|
74
|
+
s4: [0, -0.2],
|
|
75
|
+
p1: [-0.2, -0.2],
|
|
76
|
+
p2: [0, -0.2],
|
|
77
|
+
p3: [0, -0.2],
|
|
78
|
+
p4: [-0.2, 0],
|
|
79
|
+
label1: [0, -0.2],
|
|
80
|
+
h1: [-1.2, -0.9],
|
|
81
|
+
h2: [-1, -0.8],
|
|
82
|
+
h3: [-0.8, -0.7],
|
|
83
|
+
h4: [-0.6, -0.6],
|
|
84
|
+
h5: [-0.2, -0.2],
|
|
85
|
+
h6: [0, -0.2],
|
|
86
|
+
},
|
|
87
|
+
fontWeightBySize: {
|
|
88
|
+
s1: FontWeight.semiBold,
|
|
89
|
+
s2: FontWeight.semiBold,
|
|
90
|
+
s3: FontWeight.semiBold,
|
|
91
|
+
s4: FontWeight.semiBold,
|
|
92
|
+
h1: FontWeight.bold,
|
|
93
|
+
h2: FontWeight.bold,
|
|
94
|
+
h3: FontWeight.bold,
|
|
95
|
+
h4: FontWeight.bold,
|
|
96
|
+
h5: FontWeight.bold,
|
|
97
|
+
h6: FontWeight.bold,
|
|
98
|
+
},
|
|
99
|
+
fontWeight: FontWeight,
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
const OTHER_THEME_CONFIG = Object.assign({}, GlobalTextStyle);
|
|
103
|
+
|
|
104
|
+
var useStyles = createStyles((theme, _params) => {
|
|
105
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
106
|
+
const TextConfig = Object.assign({}, OTHER_THEME_CONFIG);
|
|
107
|
+
const getFontSize = (_a = TextConfig.fontSize[_params === null || _params === void 0 ? void 0 : _params.size]) === null || _a === void 0 ? void 0 : _a[0];
|
|
108
|
+
const getLineHeight = (_b = TextConfig.lineHeight[_params === null || _params === void 0 ? void 0 : _params.size]) === null || _b === void 0 ? void 0 : _b[0];
|
|
109
|
+
const getLetterSpacing = (_e = (_d = (_c = TextConfig.letterSpacing) === null || _c === void 0 ? void 0 : _c[_params === null || _params === void 0 ? void 0 : _params.size]) === null || _d === void 0 ? void 0 : _d[0]) !== null && _e !== void 0 ? _e : 0;
|
|
110
|
+
const getFontSizeMbDown = (_f = TextConfig.fontSize[_params === null || _params === void 0 ? void 0 : _params.size]) === null || _f === void 0 ? void 0 : _f[1];
|
|
111
|
+
const getLineHeightMbDown = (_g = TextConfig.lineHeight[_params === null || _params === void 0 ? void 0 : _params.size]) === null || _g === void 0 ? void 0 : _g[1];
|
|
112
|
+
const getLetterSpacingMbDown = (_k = (_j = (_h = TextConfig.letterSpacing) === null || _h === void 0 ? void 0 : _h[_params === null || _params === void 0 ? void 0 : _params.size]) === null || _j === void 0 ? void 0 : _j[1]) !== null && _k !== void 0 ? _k : 0;
|
|
113
|
+
return {
|
|
114
|
+
root: Object.assign(Object.assign({}, ((_params === null || _params === void 0 ? void 0 : _params.size) && {
|
|
115
|
+
fontWeight: (_params === null || _params === void 0 ? void 0 : _params.as) === 'label'
|
|
116
|
+
? FontWeight.semiBold
|
|
117
|
+
: TextConfig.fontWeightBySize[_params === null || _params === void 0 ? void 0 : _params.size] ||
|
|
118
|
+
TextConfig.fontWeight[_params.weight],
|
|
119
|
+
fontSize: `${getFontSize}`,
|
|
120
|
+
lineHeight: `${getLineHeight}`,
|
|
121
|
+
letterSpacing: getLetterSpacing,
|
|
122
|
+
[theme.fn.smallerThan('sm')]: {
|
|
123
|
+
fontSize: `${getFontSizeMbDown}`,
|
|
124
|
+
lineHeight: `${getLineHeightMbDown}`,
|
|
125
|
+
letterSpacing: getLetterSpacingMbDown,
|
|
126
|
+
},
|
|
127
|
+
})), { '&[data-event-category] > *': {
|
|
128
|
+
pointerEvents: 'none',
|
|
129
|
+
} }),
|
|
130
|
+
};
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
const Text = (_a) => {
|
|
134
|
+
var _b;
|
|
135
|
+
var { size, color, weight = 'regular', as = 'p', styles, className, dataEventCategory, dataEventAction, dataEventLabel } = _a, rest = __rest(_a, ["size", "color", "weight", "as", "styles", "className", "dataEventCategory", "dataEventAction", "dataEventLabel"]);
|
|
136
|
+
const { theme, classes, cx } = useStyles({ size, weight: weight === 'caption' ? 'bold' : weight, as }, { name: 'Text', styles });
|
|
137
|
+
return (React__default.createElement(Text$1, Object.assign({ className: cx(classes.root, className), color: color ||
|
|
138
|
+
(as === 'label'
|
|
139
|
+
? theme.colors.gray[6]
|
|
140
|
+
: ((_b = theme === null || theme === void 0 ? void 0 : theme.other) === null || _b === void 0 ? void 0 : _b.template) === 'mb'
|
|
141
|
+
? theme.colors.delftGray[7]
|
|
142
|
+
: theme.colors.gray[7]), component: as, "data-event-category": dataEventCategory, "data-event-action": dataEventAction, "data-event-label": dataEventLabel, classNames: {
|
|
143
|
+
root: Object.assign(Object.assign({}, (rest.wordWrap ? { 'word-wrap': rest.wordWrap } : undefined)), (rest.isUppercase || weight === 'caption'
|
|
144
|
+
? { 'text-transform': 'uppercase' }
|
|
145
|
+
: undefined)),
|
|
146
|
+
} }, rest)));
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
export { OTHER_THEME_CONFIG as O, Text as T };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { _ as __rest } from './tslib.es6-1b1533a9.js';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { useMantineTheme } from '@mantine/core';
|
|
4
|
+
import { T as Text } from './index-3474401a.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated Consider to use import { Title } from '@mantine/core'
|
|
8
|
+
* if need to use custom tag, use Text from mantine instead
|
|
9
|
+
*/
|
|
10
|
+
const Heading = (_a) => {
|
|
11
|
+
var { as, tag, color, fontWeight, dataEventCategory, dataEventAction, dataEventLabel } = _a, rest = __rest(_a, ["as", "tag", "color", "fontWeight", "dataEventCategory", "dataEventAction", "dataEventLabel"]);
|
|
12
|
+
const asTag = as || tag;
|
|
13
|
+
const theme = useMantineTheme();
|
|
14
|
+
return (React__default.createElement(Text, Object.assign({ as: asTag, color: color || theme.colors.gray[8], "data-event-category": dataEventCategory, "data-event-action": dataEventAction, "data-event-label": dataEventLabel, weight: fontWeight === 'semibold' ? 'semiBold' : 'bold', size: tag }, rest)));
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export { Heading as H };
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import React__default, { useState, useEffect, useMemo, useCallback } from 'react';
|
|
2
|
+
import { v as StyledDivider, w as useStyles } from './index.styles-5add27c5.js';
|
|
3
|
+
import { _ as __rest, a as __awaiter } from './tslib.es6-1b1533a9.js';
|
|
4
|
+
import { u as useTranslations } from './useTranslations-4f1db486.js';
|
|
5
|
+
import { B as Button } from './index-32e53dac.js';
|
|
6
|
+
import { P as PATHS } from './paths-a8204db4.js';
|
|
7
|
+
import { a as LOCALIZED_SLUGS } from './constants-b77ffe3d.js';
|
|
8
|
+
import { d as domainLocales } from './index-e612be9c.js';
|
|
9
|
+
import { b as callApi, h as getCarePath } from './utils-70718e9c.js';
|
|
10
|
+
import { i as isProduction } from './isProduction-0ea904dd.js';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated Consider to use mantine
|
|
14
|
+
*/
|
|
15
|
+
const Divider = ({ type = 'solid', className, style }) => {
|
|
16
|
+
return (React__default.createElement(StyledDivider, { style: style, className: className, "data-diver-type": type, dividerType: type }));
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const AuthorLabelTextMapping = {
|
|
20
|
+
admin: 'cardAuthor.admin',
|
|
21
|
+
moderator: 'cardAuthor.moderator',
|
|
22
|
+
ambassador: 'cardAuthor.ambassador',
|
|
23
|
+
expert: 'cardAuthor.expert',
|
|
24
|
+
sponsor: 'cardAuthor.sponsor',
|
|
25
|
+
// 'local-admin': 'cardAuthor.localAdmin',
|
|
26
|
+
guide: 'cardAuthor.guide',
|
|
27
|
+
influencer: 'cardAuthor.influencer',
|
|
28
|
+
};
|
|
29
|
+
const looselyMatchRole = (role) => {
|
|
30
|
+
const allRoles = [
|
|
31
|
+
'admin',
|
|
32
|
+
'moderator',
|
|
33
|
+
'ambassador',
|
|
34
|
+
'expert',
|
|
35
|
+
'sponsor',
|
|
36
|
+
'guide',
|
|
37
|
+
'influencer',
|
|
38
|
+
];
|
|
39
|
+
return allRoles.find((r) => r === role);
|
|
40
|
+
};
|
|
41
|
+
const AuthorBadge = (_a) => {
|
|
42
|
+
var { siteType, role, title, styles, className } = _a, rest = __rest(_a, ["siteType", "role", "title", "styles", "className"]);
|
|
43
|
+
const { t } = useTranslations();
|
|
44
|
+
const matchedRole = role ? looselyMatchRole(role) : '';
|
|
45
|
+
const { classes, cx } = useStyles(undefined,
|
|
46
|
+
// Second argument is responsible for styles api integration
|
|
47
|
+
{ name: 'AuthorBadge', styles });
|
|
48
|
+
return matchedRole && AuthorLabelTextMapping[matchedRole] ? (React__default.createElement("div", Object.assign({
|
|
49
|
+
// className={styles.authorBadge}
|
|
50
|
+
className: cx(classes.root, className), "data-label-type": matchedRole, "data-is-marrybaby": siteType === 'marryBaby' }, rest), title || t(AuthorLabelTextMapping[matchedRole]))) : null;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
var styles = {"container":"Dudns9-"};
|
|
54
|
+
|
|
55
|
+
const BtnChoice = ({ value: valueInit, choices, onChange }) => {
|
|
56
|
+
const [value, setValue] = useState(valueInit);
|
|
57
|
+
useEffect(() => {
|
|
58
|
+
setValue(valueInit);
|
|
59
|
+
}, [valueInit]);
|
|
60
|
+
return (React__default.createElement("div", { className: styles.container }, choices.map((i, idx) => (React__default.createElement(Button, { dataEventCategory: i.dataEventCategory, dataEventAction: i.dataEventAction, dataEventLabel: i.dataEventLabel, size: "sm", variant: i.value === value ? 'primary' : 'tertiary', key: idx, onClick: () => {
|
|
61
|
+
setValue(i.value);
|
|
62
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(i.value);
|
|
63
|
+
} }, i.label || '')))));
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
const BookingBtn = (_a) => {
|
|
67
|
+
var { label, bookingId, bookingType = 'doctor', locale = 'vi-VN' } = _a, rest = __rest(_a, ["label", "bookingId", "bookingType", "locale"]);
|
|
68
|
+
const { t } = useTranslations();
|
|
69
|
+
const [loading, setLoading] = useState(false);
|
|
70
|
+
const currentUrl = useMemo(() => {
|
|
71
|
+
if (typeof window !== 'undefined') {
|
|
72
|
+
return window.location.href;
|
|
73
|
+
}
|
|
74
|
+
else
|
|
75
|
+
return '';
|
|
76
|
+
}, []);
|
|
77
|
+
const handleOnClick = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
78
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
79
|
+
const url = bookingType === 'doctor'
|
|
80
|
+
? PATHS.GET_DOCTOR_DETAIL
|
|
81
|
+
: bookingType === 'hospital'
|
|
82
|
+
? PATHS.GET_HOSPITAL_DETAIL
|
|
83
|
+
: bookingType === 'service'
|
|
84
|
+
? PATHS.GET_SERVICE_DETAIL
|
|
85
|
+
: '';
|
|
86
|
+
try {
|
|
87
|
+
setLoading(true);
|
|
88
|
+
const response = yield callApi(getCarePath(url, {
|
|
89
|
+
id: bookingId,
|
|
90
|
+
site: domainLocales[locale],
|
|
91
|
+
}), 'get');
|
|
92
|
+
if ((response === null || response === void 0 ? void 0 : response._status) === 1) {
|
|
93
|
+
const result = bookingType === 'doctor'
|
|
94
|
+
? {
|
|
95
|
+
id: (_c = (_b = response === null || response === void 0 ? void 0 : response._data) === null || _b === void 0 ? void 0 : _b.doctor) === null || _c === void 0 ? void 0 : _c.id,
|
|
96
|
+
slug: (_e = (_d = response === null || response === void 0 ? void 0 : response._data) === null || _d === void 0 ? void 0 : _d.doctor) === null || _e === void 0 ? void 0 : _e.slug,
|
|
97
|
+
localSlug: (_f = LOCALIZED_SLUGS[locale]) === null || _f === void 0 ? void 0 : _f.DOCTOR,
|
|
98
|
+
}
|
|
99
|
+
: bookingType === 'hospital'
|
|
100
|
+
? {
|
|
101
|
+
id: (_h = (_g = response === null || response === void 0 ? void 0 : response._data) === null || _g === void 0 ? void 0 : _g.branch) === null || _h === void 0 ? void 0 : _h.id,
|
|
102
|
+
slug: (_k = (_j = response === null || response === void 0 ? void 0 : response._data) === null || _j === void 0 ? void 0 : _j.branch) === null || _k === void 0 ? void 0 : _k.slug,
|
|
103
|
+
localSlug: (_l = LOCALIZED_SLUGS[locale]) === null || _l === void 0 ? void 0 : _l.HOSPITAL,
|
|
104
|
+
}
|
|
105
|
+
: {
|
|
106
|
+
id: (_o = (_m = response === null || response === void 0 ? void 0 : response._data) === null || _m === void 0 ? void 0 : _m.service) === null || _o === void 0 ? void 0 : _o.id,
|
|
107
|
+
slug: (_q = (_p = response === null || response === void 0 ? void 0 : response._data) === null || _p === void 0 ? void 0 : _p.service) === null || _q === void 0 ? void 0 : _q.slug,
|
|
108
|
+
localSlug: (_r = LOCALIZED_SLUGS[locale]) === null || _r === void 0 ? void 0 : _r.SERVICE,
|
|
109
|
+
};
|
|
110
|
+
window.location.href = `https://${!isProduction ? 'discover.' : ''}${domainLocales[locale]}/care/${result.localSlug}/${result.slug}-${result.id}/`;
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
setLoading(false);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
catch (err) {
|
|
117
|
+
console.log(err);
|
|
118
|
+
setLoading(false);
|
|
119
|
+
}
|
|
120
|
+
}), []);
|
|
121
|
+
return bookingId && bookingType ? (React__default.createElement(Button, Object.assign({ dataEventCategory: "Care", dataEventAction: "Comment - Quick Booking", dataEventLabel: currentUrl, onClick: handleOnClick, loading: loading }, rest), label || t('careBooking.bookAnAppointment'))) : null;
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
export { AuthorBadge as A, BtnChoice as B, Divider as D, BookingBtn as a };
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { a as __awaiter, _ as __rest } from './tslib.es6-1b1533a9.js';
|
|
2
|
+
import React__default, { useReducer, useState, useEffect } from 'react';
|
|
3
|
+
import { Stack, Input as Input$1 } from '@mantine/core';
|
|
4
|
+
import { c as Input, S as Select } from './index-32e53dac.js';
|
|
5
|
+
import '@mantine/dates';
|
|
6
|
+
import { c as CDN_ADDRESS } from './index-e612be9c.js';
|
|
7
|
+
import { L as LOCALE } from './Subot-3289bd8e.js';
|
|
8
|
+
import './index-8858383e.js';
|
|
9
|
+
import './index-3474401a.js';
|
|
10
|
+
import './theme-e74db08c.js';
|
|
11
|
+
import { u as useTranslations } from './useTranslations-4f1db486.js';
|
|
12
|
+
import '@mantine/hooks';
|
|
13
|
+
import './utils-2c484c05.js';
|
|
14
|
+
import { M as MAPPED_LOCALE } from './utils-3a2a47d9.js';
|
|
15
|
+
|
|
16
|
+
const generateGetAddressDetail = (locale) => {
|
|
17
|
+
return `${CDN_ADDRESS}/cities-data-${MAPPED_LOCALE[locale]}.json`;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const initialState = {
|
|
21
|
+
provinceByName: {},
|
|
22
|
+
provinces: [],
|
|
23
|
+
districts: [],
|
|
24
|
+
wards: [],
|
|
25
|
+
selectedProvince: '',
|
|
26
|
+
selectedDistrict: '',
|
|
27
|
+
selectedWard: '',
|
|
28
|
+
};
|
|
29
|
+
const reducer = (state, action) => {
|
|
30
|
+
switch (action.type) {
|
|
31
|
+
case 'SET_DATA':
|
|
32
|
+
return Object.assign(Object.assign({}, state), action.payload);
|
|
33
|
+
case 'SET_DISTRICTS':
|
|
34
|
+
return Object.assign(Object.assign({}, state), { districts: action.payload });
|
|
35
|
+
case 'SET_WARDS':
|
|
36
|
+
return Object.assign(Object.assign({}, state), { wards: action.payload });
|
|
37
|
+
case 'SELECT_PROVINCE':
|
|
38
|
+
return Object.assign(Object.assign({}, state), { selectedProvince: action.payload, selectedDistrict: '', selectedWard: '' });
|
|
39
|
+
case 'SELECT_DISTRICT':
|
|
40
|
+
return Object.assign(Object.assign({}, state), { selectedDistrict: action.payload, selectedWard: '' });
|
|
41
|
+
case 'SELECT_WARD':
|
|
42
|
+
return Object.assign(Object.assign({}, state), { selectedWard: action.payload });
|
|
43
|
+
default:
|
|
44
|
+
return state;
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
const mappingProvinceId = (provinces, hbProvincesList) => {
|
|
48
|
+
const listById = {};
|
|
49
|
+
for (const [, value] of Object.entries(hbProvincesList)) {
|
|
50
|
+
const { id } = value;
|
|
51
|
+
if (id) {
|
|
52
|
+
listById[id] = value;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
const list = {};
|
|
56
|
+
provinces.map((i) => {
|
|
57
|
+
list[i.name] = listById[i.id];
|
|
58
|
+
});
|
|
59
|
+
return list;
|
|
60
|
+
};
|
|
61
|
+
const useAddress = ({ provinces: provincesInit }) => {
|
|
62
|
+
const [state, dispatch] = useReducer(reducer, initialState);
|
|
63
|
+
const { provinceByName, provinces, districts, wards, selectedProvince, selectedDistrict, selectedWard, } = state;
|
|
64
|
+
const [addressData, setAddressData] = useState();
|
|
65
|
+
useEffect(() => {
|
|
66
|
+
// Simulating the API call to fetch the address data
|
|
67
|
+
const fetchAddressData = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
68
|
+
var _a, _b, _c;
|
|
69
|
+
try {
|
|
70
|
+
const _addressData = yield fetch(generateGetAddressDetail(process.env.UNIFY_LOCALE || LOCALE.Vietnam)).then((res) => res.json());
|
|
71
|
+
setAddressData(_addressData);
|
|
72
|
+
const { list } = _addressData;
|
|
73
|
+
const provinceByName = provincesInit
|
|
74
|
+
? mappingProvinceId(provincesInit, list)
|
|
75
|
+
: list;
|
|
76
|
+
const provincesData = Object.keys(provinceByName);
|
|
77
|
+
const districtsData = Object.keys(((_a = list[provincesData[0]]) === null || _a === void 0 ? void 0 : _a.list) || {});
|
|
78
|
+
const wardsData = Object.keys(((_c = (_b = list[provincesData[0]]) === null || _b === void 0 ? void 0 : _b[districtsData[0]]) === null || _c === void 0 ? void 0 : _c.list) || {});
|
|
79
|
+
dispatch({
|
|
80
|
+
type: 'SET_DATA',
|
|
81
|
+
payload: {
|
|
82
|
+
provinceByName,
|
|
83
|
+
provinces: provincesData,
|
|
84
|
+
districts: districtsData,
|
|
85
|
+
wards: wardsData,
|
|
86
|
+
},
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
catch (error) {
|
|
90
|
+
console.error('Error fetching address data:', error);
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
fetchAddressData();
|
|
94
|
+
}, [process.env.UNIFY_LOCALE]);
|
|
95
|
+
const handleProvinceChange = (_selectedProvince) => {
|
|
96
|
+
var _a;
|
|
97
|
+
const districtsData = Object.keys(((_a = provinceByName[_selectedProvince]) === null || _a === void 0 ? void 0 : _a.list) || {});
|
|
98
|
+
dispatch({ type: 'SET_DISTRICTS', payload: districtsData });
|
|
99
|
+
dispatch({ type: 'SET_WARDS', payload: [] });
|
|
100
|
+
dispatch({ type: 'SELECT_PROVINCE', payload: _selectedProvince });
|
|
101
|
+
};
|
|
102
|
+
const handleDistrictChange = (_selectedDistrict) => {
|
|
103
|
+
var _a, _b;
|
|
104
|
+
const wardsData = Object.keys(((_b = (_a = provinceByName[selectedProvince]) === null || _a === void 0 ? void 0 : _a.list[_selectedDistrict]) === null || _b === void 0 ? void 0 : _b.list) || {});
|
|
105
|
+
dispatch({ type: 'SET_WARDS', payload: wardsData });
|
|
106
|
+
dispatch({ type: 'SELECT_DISTRICT', payload: _selectedDistrict });
|
|
107
|
+
};
|
|
108
|
+
const handleWardChange = (_selectedWard) => {
|
|
109
|
+
dispatch({ type: 'SELECT_WARD', payload: _selectedWard });
|
|
110
|
+
};
|
|
111
|
+
return {
|
|
112
|
+
provinces,
|
|
113
|
+
districts,
|
|
114
|
+
wards,
|
|
115
|
+
selectedProvince,
|
|
116
|
+
selectedDistrict,
|
|
117
|
+
selectedWard,
|
|
118
|
+
handleProvinceChange,
|
|
119
|
+
handleDistrictChange,
|
|
120
|
+
handleWardChange,
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
const AddressInput = (_a) => {
|
|
125
|
+
var { error, provinces: provincesInit, placeholder } = _a, props = __rest(_a, ["error", "provinces", "placeholder"]);
|
|
126
|
+
const { t } = useTranslations();
|
|
127
|
+
const { provinces, districts, wards, selectedProvince, selectedDistrict, selectedWard, handleProvinceChange, handleDistrictChange, handleWardChange, } = useAddress({ provinces: provincesInit });
|
|
128
|
+
const [extraInfo, setExtraInfo] = useState('');
|
|
129
|
+
useEffect(() => {
|
|
130
|
+
if (selectedProvince && selectedDistrict && selectedWard && extraInfo) {
|
|
131
|
+
props.onChange({
|
|
132
|
+
selectedProvince,
|
|
133
|
+
selectedDistrict,
|
|
134
|
+
selectedWard,
|
|
135
|
+
extraInfo,
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
props.onChange(null);
|
|
140
|
+
}
|
|
141
|
+
}, [selectedProvince, selectedDistrict, selectedWard, extraInfo]);
|
|
142
|
+
return (React__default.createElement(Input.Wrapper, Object.assign({ withAsterisk: true }, props),
|
|
143
|
+
React__default.createElement(Stack, null,
|
|
144
|
+
React__default.createElement(Select, { placeholder: (placeholder === null || placeholder === void 0 ? void 0 : placeholder.province) || t('onboarding.similac.input.city'), data: provincesInit ? provinces : provinces.sort(), searchable: true, onChange: handleProvinceChange, value: selectedProvince }),
|
|
145
|
+
React__default.createElement(Select, { placeholder: (placeholder === null || placeholder === void 0 ? void 0 : placeholder.district) || t('onboarding.similac.input.district'), data: districts.sort(), searchable: true, onChange: handleDistrictChange, value: selectedDistrict, disabled: !selectedProvince }),
|
|
146
|
+
React__default.createElement(Select, { placeholder: (placeholder === null || placeholder === void 0 ? void 0 : placeholder.ward) || t('onboarding.similac.input.ward'), searchable: true, data: wards.sort(), value: selectedWard, onChange: handleWardChange, disabled: !selectedProvince || !selectedDistrict }),
|
|
147
|
+
React__default.createElement(Input, { placeholder: (placeholder === null || placeholder === void 0 ? void 0 : placeholder.address) || t('onboarding.similac.input.no'), disabled: !selectedProvince || !selectedDistrict || !selectedWard, value: extraInfo, onChange: setExtraInfo, style: { marginBottom: 0 } })),
|
|
148
|
+
React__default.createElement(Input$1.Error, { size: "md" }, error)));
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
export { AddressInput as A };
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { _ as __rest } from './tslib.es6-1b1533a9.js';
|
|
2
|
+
import React__default, { useMemo, useState, useEffect } from 'react';
|
|
3
|
+
import { L as LOCALE } from './Subot-3289bd8e.js';
|
|
4
|
+
import { C as CommonGAssets } from './index-8858383e.js';
|
|
5
|
+
import { t as theme } from './theme-e74db08c.js';
|
|
6
|
+
import styled from 'styled-components';
|
|
7
|
+
import { I as ImageWrap, f as CentralCarousel } from './index-32e53dac.js';
|
|
8
|
+
import { T as Text } from './index-7af5242a.js';
|
|
9
|
+
|
|
10
|
+
const StyledIconContainer = styled.div `
|
|
11
|
+
display: inline-flex;
|
|
12
|
+
overflow: hidden;
|
|
13
|
+
width: ${(props) => props.size}px;
|
|
14
|
+
height: ${(props) => props.size}px;
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
align-items: center;
|
|
17
|
+
justify-content: center;
|
|
18
|
+
|
|
19
|
+
border: 1px solid #e4e8ec;
|
|
20
|
+
background-color: ${(props) => props.backgroundColor || theme.colors.white};
|
|
21
|
+
border-radius: ${(props) => props.borderRadius || '50%'};
|
|
22
|
+
& > * {
|
|
23
|
+
width: ${(props) => props.iconSize}px;
|
|
24
|
+
height: ${(props) => props.iconSize}px;
|
|
25
|
+
}
|
|
26
|
+
`;
|
|
27
|
+
const StyledPillContainer = styled.div `
|
|
28
|
+
display: inline-block;
|
|
29
|
+
height: 108px;
|
|
30
|
+
background-color: ${(props) => props.theme.colors.white};
|
|
31
|
+
border-radius: 60px;
|
|
32
|
+
cursor: pointer;
|
|
33
|
+
&.selected-week-pill {
|
|
34
|
+
background-color: ${(props) => props.theme.colors.pink100};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
& > div:first-child {
|
|
38
|
+
margin: 4px 4px 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
& > p {
|
|
42
|
+
margin-top: 8px;
|
|
43
|
+
text-align: center;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
& > * {
|
|
47
|
+
pointer-events: none;
|
|
48
|
+
}
|
|
49
|
+
`;
|
|
50
|
+
|
|
51
|
+
const LONG_TITLE_LOCALE = [LOCALE.Myanmar, LOCALE.Taiwan];
|
|
52
|
+
const Pill = (_a) => {
|
|
53
|
+
var { icon, name, className, locale = 'en-PH', dataEventCategory, dataEventAction, dataEventLabel, onSelect } = _a, rest = __rest(_a, ["icon", "name", "className", "locale", "dataEventCategory", "dataEventAction", "dataEventLabel", "onSelect"]);
|
|
54
|
+
const isSelected = useMemo(() => className === null || className === void 0 ? void 0 : className.includes('selected-week-pill'), [className]);
|
|
55
|
+
return (React__default.createElement(StyledPillContainer, Object.assign({ onClick: onSelect, className: className
|
|
56
|
+
? 'week-pill'.concat(' non-pointer-event-child ', className)
|
|
57
|
+
: 'week-pill non-pointer-event-child', "data-event-category": dataEventCategory, "data-event-action": dataEventAction, "data-event-label": dataEventLabel }, rest),
|
|
58
|
+
React__default.createElement(StyledIconContainer, { size: 64, iconSize: 40, backgroundColor: theme.colors.white },
|
|
59
|
+
React__default.createElement(ImageWrap, { src: icon || CommonGAssets.getAssetPath('week_default.png'), alt: `week ${name}` })),
|
|
60
|
+
isSelected ? (React__default.createElement(Text, Object.assign({ type: "semiBold", size: "n1", color: theme.colors.gray800 }, (LONG_TITLE_LOCALE.includes(locale) && {
|
|
61
|
+
style: { fontSize: '10px' },
|
|
62
|
+
})), name)) : (React__default.createElement(Text, Object.assign({ size: "n1", color: theme.colors.gray600 }, (LONG_TITLE_LOCALE.includes(locale) && {
|
|
63
|
+
style: { fontSize: '10px' },
|
|
64
|
+
})), name))));
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
const StyledPill = styled(Pill) `
|
|
68
|
+
box-shadow: 0px 0px 24px rgba(0, 0, 0, 0.08);
|
|
69
|
+
`;
|
|
70
|
+
const StyledSlide = styled(CentralCarousel.Slide) `
|
|
71
|
+
cursor: pointer;
|
|
72
|
+
> div * {
|
|
73
|
+
pointer-events: none;
|
|
74
|
+
}
|
|
75
|
+
`;
|
|
76
|
+
const StyledCarousel = styled(CentralCarousel) `
|
|
77
|
+
.centerred-pill-wrapper {
|
|
78
|
+
padding: 16px 0;
|
|
79
|
+
}
|
|
80
|
+
`;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* @deprecated Consider to use at '@hhgtech/hhg-components/mantine'
|
|
84
|
+
*/
|
|
85
|
+
const PillCarousel = (_a) => {
|
|
86
|
+
var { data, isMobile, onSlideChange, pillProps, locale = LOCALE.Vietnam, blurFromIndex, blurLength } = _a, rest = __rest(_a, ["data", "isMobile", "onSlideChange", "pillProps", "locale", "blurFromIndex", "blurLength"]);
|
|
87
|
+
const sliderProps = {
|
|
88
|
+
withControls: !isMobile,
|
|
89
|
+
slideGap: 16,
|
|
90
|
+
blurFromCenter: true,
|
|
91
|
+
blurFromIndex: blurFromIndex || (isMobile ? 2 : 4),
|
|
92
|
+
blurLength: blurLength || (isMobile ? 1 : 3),
|
|
93
|
+
onSlideChange,
|
|
94
|
+
};
|
|
95
|
+
const [currentUrl, setCurrentUrl] = useState('');
|
|
96
|
+
useEffect(() => {
|
|
97
|
+
setCurrentUrl(window.location.href);
|
|
98
|
+
}, []);
|
|
99
|
+
return (React__default.createElement(StyledCarousel, Object.assign({}, sliderProps, rest, { selectSlideWhenClick: true, previousControlIcon: React__default.createElement(Arrow, { currentUrl: currentUrl }), nextControlIcon: React__default.createElement(Arrow, { currentUrl: currentUrl, isRight: true }) }), (centerSlide) => data.map((pill, idx) => (React__default.createElement(StyledSlide, Object.assign({ key: idx, onClick: onSlideChange, "data-event-category": "Health Tool", "data-event-action": "Pregnancy Week Click", "data-event-label": currentUrl, innerSlideProps: {
|
|
100
|
+
'data-event-category': 'Health Tool',
|
|
101
|
+
'data-event-action': 'Pregnancy Week Click',
|
|
102
|
+
'data-event-label': currentUrl,
|
|
103
|
+
} }, pillProps),
|
|
104
|
+
React__default.createElement("div", { className: "centerred-pill-wrapper" },
|
|
105
|
+
React__default.createElement(StyledPill, { "data-event-category": "Health Tool", "data-event-action": "Fetal Week Click", "data-event-label": currentUrl, locale: locale, name: pill.name, icon: pill.icon, className: idx === centerSlide
|
|
106
|
+
? 'selected-week-pill pointer-event-child-none'
|
|
107
|
+
: 'pointer-event-child-none' })))))));
|
|
108
|
+
};
|
|
109
|
+
const Arrow = ({ isRight, currentUrl, }) => {
|
|
110
|
+
return (React__default.createElement("svg", { viewBox: "0 0 15 15", fill: "none", width: "16", height: "16", style: isRight
|
|
111
|
+
? { transform: 'rotate(-90deg)' }
|
|
112
|
+
: { transform: 'rotate(90deg)' }, "data-event-category": "Health Tool", "data-event-action": "Pregnancy Week Arrow Click", "data-event-label": currentUrl, className: "pointer-event-child-none" },
|
|
113
|
+
React__default.createElement("path", { d: "M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z", fill: "currentColor", fillRule: "evenodd", clipRule: "evenodd" })));
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
export { PillCarousel as P };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { _ as __rest } from './tslib.es6-1b1533a9.js';
|
|
2
|
+
import React__default, { useState, useEffect } from 'react';
|
|
3
|
+
import { useDebouncedValue } from '@mantine/hooks';
|
|
4
|
+
import { D as DEBOUNCED_TIME, g as StyledSliderWrapper, B as Button, h as StyledSlider } from './index-32e53dac.js';
|
|
5
|
+
|
|
6
|
+
const Slider = (_a) => {
|
|
7
|
+
var { color, withControl, onChange, value, min, max, isStatic, containerClassName, containerStyle } = _a, props = __rest(_a, ["color", "withControl", "onChange", "value", "min", "max", "isStatic", "containerClassName", "containerStyle"]);
|
|
8
|
+
const [currentValue, setCurrentValue] = useState(value || min || 0);
|
|
9
|
+
const [debounced] = useDebouncedValue(currentValue, DEBOUNCED_TIME);
|
|
10
|
+
const increase = () => {
|
|
11
|
+
setCurrentValue((p) => (max && p === max ? p : p + 1));
|
|
12
|
+
};
|
|
13
|
+
const decrease = () => {
|
|
14
|
+
setCurrentValue((p) => (min && p === min ? p : p - 1));
|
|
15
|
+
};
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(debounced);
|
|
18
|
+
}, [debounced]);
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
setCurrentValue(value);
|
|
21
|
+
}, [value]);
|
|
22
|
+
return (React__default.createElement(StyledSliderWrapper, { className: containerClassName, style: containerStyle },
|
|
23
|
+
withControl && (React__default.createElement(Button, { type: "button", size: "sm", color: "ghost", onClick: decrease },
|
|
24
|
+
React__default.createElement("svg", { width: "10", height: "10", fill: "none", viewBox: "0 0 12 3" },
|
|
25
|
+
React__default.createElement("path", { d: "M1 1.004h8", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })))),
|
|
26
|
+
React__default.createElement(StyledSlider, Object.assign({ thumbSize: 21, labelAlwaysOn: true, radius: "xl", color: color, value: currentValue, onChange: !isStatic ? setCurrentValue : () => null, min: min, max: max }, props, { className: 'hhg-mantine-slider ' + (props.className || '') })),
|
|
27
|
+
withControl && (React__default.createElement(Button, { type: "button", size: "sm", variant: "ghost", onClick: increase },
|
|
28
|
+
React__default.createElement("svg", { width: "16", height: "20", fill: "none", viewBox: "0 0 16 16" },
|
|
29
|
+
React__default.createElement("path", { d: "M8 4v8M4 8h8", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }))))));
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export { Slider as S };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { _ as __rest } from './tslib.es6-1b1533a9.js';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { B as Button$1 } from './index-32e53dac.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated Consider to use at '@hhgtech/hhg-components/mantine'
|
|
7
|
+
*/
|
|
8
|
+
const Button = (_a) => {
|
|
9
|
+
var { size, color = 'primary', isDisabled, isBlock, title, onClick, icon, iconPosition = 'left', children, isLoading = false, loadingText, dataEventCategory, dataEventAction, dataEventLabel, dataProductChannel, dataProductSku, dataProductBrand, dataProductName, dataProductPrice, dataProductCategory, dataProductPosition, type } = _a, rest = __rest(_a, ["size", "color", "isDisabled", "isBlock", "title", "onClick", "icon", "iconPosition", "children", "isLoading", "loadingText", "dataEventCategory", "dataEventAction", "dataEventLabel", "dataProductChannel", "dataProductSku", "dataProductBrand", "dataProductName", "dataProductPrice", "dataProductCategory", "dataProductPosition", "type"]);
|
|
10
|
+
const gtmProps = {
|
|
11
|
+
'data-event-category': dataEventCategory,
|
|
12
|
+
'data-event-action': dataEventAction,
|
|
13
|
+
'data-event-label': dataEventLabel,
|
|
14
|
+
'data-product-channel': dataProductChannel,
|
|
15
|
+
'data-product-sku': dataProductSku,
|
|
16
|
+
'data-product-brand': dataProductBrand,
|
|
17
|
+
'data-product-name': dataProductName,
|
|
18
|
+
'data-product-price': dataProductPrice,
|
|
19
|
+
'data-product-category': dataProductCategory,
|
|
20
|
+
'data-product-position': dataProductPosition,
|
|
21
|
+
};
|
|
22
|
+
return (React__default.createElement(Button$1, Object.assign({}, gtmProps, { size: size, variant: color === 'transparent' ? 'white' : color === 'danger' ? 'error' : color, disabled: isDisabled, onClick: (evt) => {
|
|
23
|
+
!isLoading && !isDisabled && onClick && onClick(evt);
|
|
24
|
+
}, title: title, loading: isLoading, type: type, leftIcon: iconPosition === 'left' ? icon : undefined, rightIcon: iconPosition === 'right' ? icon : undefined,
|
|
25
|
+
// hasIcon={!!icon || undefined}
|
|
26
|
+
w: isBlock ? '100%' : undefined, p: isBlock ? '12px auto' : undefined }, rest), isLoading ? loadingText || children : children));
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export { Button as B };
|