@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,1936 @@
|
|
|
1
|
+
import { _ as __rest, a as __awaiter } from './tslib.es6-1b1533a9.js';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import React__default, { useState, forwardRef, useEffect, Component, useCallback, createContext, useContext, useRef, useMemo, useImperativeHandle } from 'react';
|
|
4
|
+
import { ArrowDown, ArrowLeft, ArrowRight } from '@hhgtech/icons/other';
|
|
5
|
+
import { createStyles, useMantineTheme, Button as Button$1, Autocomplete, Image, ActionIcon, Select as Select$1, AspectRatio as AspectRatio$1, em, Box, Breadcrumbs as Breadcrumbs$1, Textarea, Accordion as Accordion$1, Indicator, Avatar as Avatar$1, FileInput as FileInput$1, createEmotionCache, NumberInput as NumberInput$1, PasswordInput as PasswordInput$1, TextInput, Input as Input$1, Checkbox as Checkbox$1, Slider, Radio as Radio$1, Flex, rem, Tabs as Tabs$1, ScrollArea, Popover as Popover$1, Chip } from '@mantine/core';
|
|
6
|
+
import { useUncontrolled, useDebouncedValue, useViewportSize, useResizeObserver, useDisclosure, useClickOutside } from '@mantine/hooks';
|
|
7
|
+
import { C as CommonGAssets } from './index-8858383e.js';
|
|
8
|
+
import dayjs from 'dayjs';
|
|
9
|
+
import { L as LOCALE } from './Subot-3289bd8e.js';
|
|
10
|
+
import { B as Breakpoints, M as MediaQueries } from './utils-2c484c05.js';
|
|
11
|
+
import styled from 'styled-components';
|
|
12
|
+
import { Carousel as Carousel$1 } from '@mantine/carousel';
|
|
13
|
+
import { T as Text, O as OTHER_THEME_CONFIG } from './index-3474401a.js';
|
|
14
|
+
import { t as theme } from './theme-e74db08c.js';
|
|
15
|
+
import { I as ISO_FORMAT, s as siteOptions } from './index-e612be9c.js';
|
|
16
|
+
import cn from 'classnames';
|
|
17
|
+
import { a as useUniqueId } from './useUniqueId-3638402f.js';
|
|
18
|
+
import { Check, Plus } from '@hhgtech/icons/core';
|
|
19
|
+
|
|
20
|
+
const ImageWrap = (_a) => {
|
|
21
|
+
var { alt, backupSrc, src, placeholderSrc, style, ref } = _a, props = __rest(_a, ["alt", "backupSrc", "src", "placeholderSrc", "style", "ref"]);
|
|
22
|
+
const [hasError, setHasError] = useState(false);
|
|
23
|
+
return (React__default.createElement(StyledImage, Object.assign({ loading: "lazy", alt: alt, onError: () => !hasError && setHasError(true), src: hasError ? backupSrc || src : src || backupSrc, style: Object.assign(Object.assign({}, (placeholderSrc
|
|
24
|
+
? {
|
|
25
|
+
backgroundImage: `url(${placeholderSrc})`,
|
|
26
|
+
}
|
|
27
|
+
: {})), style), "data-has-placeholder": !!placeholderSrc, ref: ref }, props)));
|
|
28
|
+
};
|
|
29
|
+
const StyledImage = styled.img `
|
|
30
|
+
&[data-has-placeholder='true'] {
|
|
31
|
+
background-position: center;
|
|
32
|
+
background-repeat: no-repeat;
|
|
33
|
+
background-size: cover;
|
|
34
|
+
}
|
|
35
|
+
`;
|
|
36
|
+
|
|
37
|
+
const ANIMATION_DURATION = '100ms';
|
|
38
|
+
|
|
39
|
+
var useStyles$4 = createStyles((_theme, _params) => {
|
|
40
|
+
var _a, _b, _c, _d, _e, _f;
|
|
41
|
+
const { other } = _theme;
|
|
42
|
+
const { template } = other;
|
|
43
|
+
const { size, variant, skipHover, isError, isSuccess, color, children, theme: themeProp, } = _params;
|
|
44
|
+
const isMb = template === 'mb' || themeProp === 'marryBaby';
|
|
45
|
+
const finalColor = color || (themeProp && isMb ? 'mb' : _theme.primaryColor);
|
|
46
|
+
const isHexColor = finalColor.startsWith('#');
|
|
47
|
+
const hexColor50 = isHexColor
|
|
48
|
+
? _theme.fn.lighten(color, 0.9)
|
|
49
|
+
: ((_b = (_a = _theme.colors) === null || _a === void 0 ? void 0 : _a[finalColor]) === null || _b === void 0 ? void 0 : _b[0]) || '';
|
|
50
|
+
const hexColor = isHexColor
|
|
51
|
+
? finalColor
|
|
52
|
+
: (_d = (_c = _theme.colors) === null || _c === void 0 ? void 0 : _c[finalColor]) === null || _d === void 0 ? void 0 : _d[_theme.fn.primaryShade()];
|
|
53
|
+
const hoverHexColor = isHexColor
|
|
54
|
+
? _theme.fn.darken(color, 0.05)
|
|
55
|
+
: (_f = (_e = _theme.colors) === null || _e === void 0 ? void 0 : _e[finalColor]) === null || _f === void 0 ? void 0 : _f[_theme.fn.primaryShade() + 1];
|
|
56
|
+
return {
|
|
57
|
+
root: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ transition: `all ${ANIMATION_DURATION} ease-in-out`, '&[data-event-category] > *': {
|
|
58
|
+
pointerEvents: 'none',
|
|
59
|
+
}, '&:focus': {
|
|
60
|
+
outline: 'none',
|
|
61
|
+
} }, (!children && {
|
|
62
|
+
paddingLeft: '10px',
|
|
63
|
+
paddingRight: '10px',
|
|
64
|
+
'.mantine-Button-icon': {
|
|
65
|
+
margin: 0,
|
|
66
|
+
},
|
|
67
|
+
})), (() => {
|
|
68
|
+
switch (size) {
|
|
69
|
+
case 'xl':
|
|
70
|
+
return {
|
|
71
|
+
height: 56,
|
|
72
|
+
fontWeight: 600,
|
|
73
|
+
fontSize: isMb ? '14px' : '16px',
|
|
74
|
+
lineHeight: '24px',
|
|
75
|
+
};
|
|
76
|
+
case 'lg':
|
|
77
|
+
return {
|
|
78
|
+
height: 48,
|
|
79
|
+
fontWeight: 600,
|
|
80
|
+
fontSize: isMb ? '14px' : '16px',
|
|
81
|
+
lineHeight: '24px',
|
|
82
|
+
};
|
|
83
|
+
case 'md':
|
|
84
|
+
return {
|
|
85
|
+
height: 40,
|
|
86
|
+
fontWeight: 600,
|
|
87
|
+
fontSize: '14px',
|
|
88
|
+
lineHeight: '22px',
|
|
89
|
+
};
|
|
90
|
+
case 'sm':
|
|
91
|
+
return {
|
|
92
|
+
height: 32,
|
|
93
|
+
fontWeight: 600,
|
|
94
|
+
fontSize: isMb ? '12px' : '14px',
|
|
95
|
+
lineHeight: '22px',
|
|
96
|
+
paddingLeft: '16px',
|
|
97
|
+
paddingRight: '16px',
|
|
98
|
+
};
|
|
99
|
+
case 'xs':
|
|
100
|
+
return {
|
|
101
|
+
height: 24,
|
|
102
|
+
fontWeight: 600,
|
|
103
|
+
fontSize: '12px',
|
|
104
|
+
lineHeight: '18px',
|
|
105
|
+
paddingLeft: '8px',
|
|
106
|
+
paddingRight: '8px',
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
})()), (() => {
|
|
110
|
+
switch (variant) {
|
|
111
|
+
case 'primary': {
|
|
112
|
+
return Object.assign({ color: _theme.white, backgroundColor: hexColor }, (!skipHover && {
|
|
113
|
+
'&:hover': {
|
|
114
|
+
backgroundColor: hoverHexColor,
|
|
115
|
+
},
|
|
116
|
+
}));
|
|
117
|
+
}
|
|
118
|
+
case 'secondary':
|
|
119
|
+
return Object.assign({ color: hexColor, backgroundColor: 'transparent', border: `1px solid ${hexColor}` }, (!skipHover && {
|
|
120
|
+
'&:hover': {
|
|
121
|
+
backgroundColor: hexColor50,
|
|
122
|
+
border: `1px solid ${hexColor}`,
|
|
123
|
+
},
|
|
124
|
+
}));
|
|
125
|
+
case 'white':
|
|
126
|
+
return {
|
|
127
|
+
color: hexColor,
|
|
128
|
+
backgroundColor: 'transparent',
|
|
129
|
+
borderColor: `transparent`,
|
|
130
|
+
'&:hover': {
|
|
131
|
+
backgroundColor: 'transparent',
|
|
132
|
+
border: `transparent`,
|
|
133
|
+
},
|
|
134
|
+
};
|
|
135
|
+
case 'tertiary':
|
|
136
|
+
return {
|
|
137
|
+
color: _theme.colors.gray[8],
|
|
138
|
+
backgroundColor: _theme.white,
|
|
139
|
+
border: `1px solid ${_theme.colors.neutral[2]}`,
|
|
140
|
+
'&:hover': Object.assign({}, (!skipHover
|
|
141
|
+
? {
|
|
142
|
+
backgroundColor: _theme.colors.neutral[0],
|
|
143
|
+
border: `1px solid ${_theme.colors.neutral[0]}`,
|
|
144
|
+
}
|
|
145
|
+
: {
|
|
146
|
+
backgroundColor: _theme.white,
|
|
147
|
+
border: `1px solid ${_theme.colors.neutral[2]}`,
|
|
148
|
+
})),
|
|
149
|
+
};
|
|
150
|
+
case 'light': {
|
|
151
|
+
return {
|
|
152
|
+
color: hexColor,
|
|
153
|
+
backgroundColor: hexColor50,
|
|
154
|
+
border: `1px solid transparent`,
|
|
155
|
+
'&:hover': Object.assign({}, (!skipHover
|
|
156
|
+
? {
|
|
157
|
+
backgroundColor: _theme.white,
|
|
158
|
+
border: `1px solid ${hexColor50}`,
|
|
159
|
+
}
|
|
160
|
+
: {
|
|
161
|
+
backgroundColor: hexColor50,
|
|
162
|
+
border: `1px solid transparent`,
|
|
163
|
+
})),
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
case 'ghost':
|
|
167
|
+
return Object.assign({ color: hexColor, backgroundColor: 'transparent', border: `1px solid transparent` }, (!skipHover && {
|
|
168
|
+
'&:hover': {
|
|
169
|
+
backgroundColor: hexColor50,
|
|
170
|
+
border: `1px solid transparent`,
|
|
171
|
+
},
|
|
172
|
+
}));
|
|
173
|
+
}
|
|
174
|
+
})()), { '&[data-disabled]': {
|
|
175
|
+
backgroundColor: _theme.colors.gray[1],
|
|
176
|
+
color: _theme.colors.gray[4],
|
|
177
|
+
} }), (isError
|
|
178
|
+
? Object.assign({ color: _theme.colors.red[6], backgroundColor: _theme.white, border: `1px solid ${_theme.colors.red[6]}` }, (!skipHover && {
|
|
179
|
+
'&:hover': {
|
|
180
|
+
backgroundColor: _theme.colors.red[0],
|
|
181
|
+
border: `1px solid ${_theme.colors.red[6]}`,
|
|
182
|
+
},
|
|
183
|
+
})) : {})), (isSuccess
|
|
184
|
+
? Object.assign({ color: _theme.colors.green[8], backgroundColor: _theme.colors.green[0] }, (!skipHover && {
|
|
185
|
+
'&:hover': {
|
|
186
|
+
backgroundColor: _theme.colors.green[0],
|
|
187
|
+
},
|
|
188
|
+
})) : {})),
|
|
189
|
+
};
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
const MAPPED_VARIANT = {
|
|
193
|
+
primary: 'filled',
|
|
194
|
+
secondary: 'outline',
|
|
195
|
+
tertiary: 'default',
|
|
196
|
+
light: 'light',
|
|
197
|
+
ghost: 'subtle',
|
|
198
|
+
error: 'outline',
|
|
199
|
+
white: 'white',
|
|
200
|
+
success: 'subtle',
|
|
201
|
+
};
|
|
202
|
+
function filterObject(obj) {
|
|
203
|
+
const ret = {};
|
|
204
|
+
Object.keys(obj)
|
|
205
|
+
.filter((key) => obj[key] !== undefined)
|
|
206
|
+
.forEach((key) => (ret[key] = obj[key]));
|
|
207
|
+
return ret;
|
|
208
|
+
}
|
|
209
|
+
const Button = (props) => {
|
|
210
|
+
var _a, _b;
|
|
211
|
+
const theme = useMantineTheme();
|
|
212
|
+
const _c = Object.assign(Object.assign({}, (_b = (_a = theme.components) === null || _a === void 0 ? void 0 : _a.Button) === null || _b === void 0 ? void 0 : _b.defaultProps), filterObject(props)), { variant, size, color, skipHover, className, dataEventCategory, dataEventAction, dataEventLabel, children, theme: themeProp } = _c, rest = __rest(_c, ["variant", "size", "color", "skipHover", "className", "dataEventCategory", "dataEventAction", "dataEventLabel", "children", "theme"]);
|
|
213
|
+
const isError = variant === 'error';
|
|
214
|
+
const { classes, cx } = useStyles$4({
|
|
215
|
+
variant,
|
|
216
|
+
size,
|
|
217
|
+
color,
|
|
218
|
+
skipHover,
|
|
219
|
+
isError,
|
|
220
|
+
isSuccess: variant === 'success',
|
|
221
|
+
children,
|
|
222
|
+
theme: themeProp,
|
|
223
|
+
});
|
|
224
|
+
return (React__default.createElement(Button$1, Object.assign({ className: cx(className, variant), classNames: {
|
|
225
|
+
root: classes.root,
|
|
226
|
+
}, variant: MAPPED_VARIANT[variant], "data-variant": variant, "data-event-category": dataEventCategory, "data-event-action": dataEventAction, "data-event-label": dataEventLabel }, rest), children));
|
|
227
|
+
};
|
|
228
|
+
|
|
229
|
+
const CambodiaRoundIcon = (props) => (React__default.createElement(ImageWrap, Object.assign({ alt: "round cambodia flag", src: CommonGAssets.getAssetPath('flags/cambodiaRound.png'), style: Object.assign({ borderRadius: '50%' }, props.style) }, props)));
|
|
230
|
+
const CambodiaSquareIcon = (props) => (React__default.createElement(ImageWrap, Object.assign({ alt: "square cambodia flag", src: CommonGAssets.getAssetPath('flags/cambodiaSquare.png') }, props)));
|
|
231
|
+
|
|
232
|
+
const EnglishRoundIcon = (props) => (React__default.createElement("svg", Object.assign({ viewBox: "0 0 20 20", fill: "none", style: Object.assign({ borderRadius: '50%' }, props.style) }, props),
|
|
233
|
+
React__default.createElement("g", null,
|
|
234
|
+
React__default.createElement("mask", { style: { maskType: 'alpha' }, maskUnits: "userSpaceOnUse", x: "0", y: "0", width: "20", height: "20" },
|
|
235
|
+
React__default.createElement("circle", { cx: "10", cy: "10", r: "10", fill: "#C4C4C4" })),
|
|
236
|
+
React__default.createElement("path", { d: "M7.49953 0.327881C5.47199 0.850891 3.69346 1.98591 2.37793 3.53444L7.49953 6.6655V0.327881Z", fill: "#3F51B5" }),
|
|
237
|
+
React__default.createElement("path", { d: "M2.30273 16.3824C3.62476 17.9749 5.4353 19.1399 7.50034 19.6729V13.2053L2.30273 16.3824Z", fill: "#3F51B5" }),
|
|
238
|
+
React__default.createElement("path", { d: "M0.328125 12.5C0.334625 12.526 0.341125 12.5515 0.348125 12.5775L0.474128 12.5H0.328125Z", fill: "white" }),
|
|
239
|
+
React__default.createElement("path", { d: "M17.7871 3.73445C16.4571 2.08391 14.6131 0.872891 12.499 0.327881V6.96651L17.7871 3.73445Z", fill: "#3F51B5" }),
|
|
240
|
+
React__default.createElement("path", { d: "M12.499 19.6722C14.6506 19.1172 16.5196 17.8707 17.8546 16.1752L12.499 12.9021V19.6722Z", fill: "#3F51B5" }),
|
|
241
|
+
React__default.createElement("path", { d: "M0.376626 7.31055C0.359125 7.37305 0.344125 7.43705 0.328125 7.50005H0.686632L0.376626 7.31055Z", fill: "white" }),
|
|
242
|
+
React__default.createElement("path", { d: "M19.8745 8.50006C19.827 8.18506 19.7655 7.87555 19.6895 7.57104L18.1699 8.50006H19.8745Z", fill: "white" }),
|
|
243
|
+
React__default.createElement("path", { d: "M0.686034 7.50024H0.327527C0.243026 7.82775 0.175524 8.16076 0.124023 8.50026H2.32207L0.686034 7.50024Z", fill: "white" }),
|
|
244
|
+
React__default.createElement("path", { d: "M19.7197 12.3148C19.7832 12.0473 19.8337 11.7752 19.8752 11.5002H18.3867L19.7197 12.3148Z", fill: "white" }),
|
|
245
|
+
React__default.createElement("path", { d: "M2.10956 11.5002H0.124023C0.175024 11.8398 0.243026 12.1728 0.327527 12.5003H0.47403L2.10956 11.5002Z", fill: "white" }),
|
|
246
|
+
React__default.createElement("path", { d: "M8.50002 7.27665V0.124512C8.16051 0.175513 7.82751 0.243514 7.5 0.328016V6.66564L8.50002 7.27665Z", fill: "white" }),
|
|
247
|
+
React__default.createElement("path", { d: "M11.5 12.2913V19.8759C11.8395 19.8249 12.1725 19.7569 12.5 19.6724V12.9023L11.5 12.2913Z", fill: "white" }),
|
|
248
|
+
React__default.createElement("path", { d: "M7.5 13.205V19.6721C7.82751 19.7566 8.16051 19.8241 8.50002 19.8756V12.594L7.5 13.205Z", fill: "white" }),
|
|
249
|
+
React__default.createElement("path", { d: "M11.5925 7.34715L11.7345 7.43415L12.5 6.96614V0.328016C12.1725 0.243514 11.8395 0.176013 11.5 0.124512V7.49865L11.5925 7.34715Z", fill: "white" }),
|
|
250
|
+
React__default.createElement("path", { d: "M2.32251 8.50002H7.01761L8.50014 7.594V7.277L7.50011 6.66548L2.37852 3.53442C1.95151 4.03743 1.572 4.58144 1.24949 5.16296L5.02507 7.5H2.29701L0.650482 6.47648C0.54748 6.74949 0.455478 7.02699 0.375977 7.3105L0.686483 7.5L2.32251 8.50002Z", fill: "white" }),
|
|
251
|
+
React__default.createElement("path", { d: "M11.7344 7.43419L13.4784 8.50021H18.171L19.6905 7.57119C19.528 6.92118 19.303 6.29767 19.02 5.70516L16.139 7.50019H13.4109L18.317 4.45013C18.1515 4.20313 17.9735 3.96562 17.7875 3.73462L12.4999 6.96618L11.7344 7.43419Z", fill: "white" }),
|
|
252
|
+
React__default.createElement("path", { d: "M5.02448 7.50013L1.2494 5.16309C1.0169 5.58259 0.821394 6.0231 0.650391 6.47661L2.29642 7.50013H5.02448Z", fill: "#E53935" }),
|
|
253
|
+
React__default.createElement("path", { d: "M16.1392 7.50024L19.0207 5.70521C18.8132 5.2702 18.5837 4.84819 18.3177 4.45068L13.4111 7.50024H16.1392Z", fill: "#E53935" }),
|
|
254
|
+
React__default.createElement("path", { d: "M11.5 11.5002V12.2913L12.5 12.9023L17.8556 16.1758C18.2416 15.6853 18.5836 15.1593 18.8736 14.6008L15.4856 12.5003H18.2136L19.4432 13.2673C19.5507 12.9563 19.6432 12.6393 19.7197 12.3153L18.3871 11.5002H11.5Z", fill: "white" }),
|
|
255
|
+
React__default.createElement("path", { d: "M13.4785 8.50019L11.7345 7.43417L11.5925 7.34717L11.5 7.49867V8.50019H13.4785Z", fill: "white" }),
|
|
256
|
+
React__default.createElement("path", { d: "M8.49934 12.5943V11.5002H2.10921L0.473182 12.5003L0.34668 12.5778C0.522683 13.2383 0.762688 13.8713 1.06319 14.4708L4.16375 12.5003H6.89181L1.80071 15.7168C1.95971 15.9448 2.12471 16.1688 2.30172 16.3823L7.49932 13.2053L8.49934 12.5943Z", fill: "white" }),
|
|
257
|
+
React__default.createElement("path", { d: "M7.01758 8.50026H8.50011V7.59424L7.01758 8.50026Z", fill: "white" }),
|
|
258
|
+
React__default.createElement("path", { d: "M15.4854 12.5L18.8729 14.6C19.0949 14.173 19.2834 13.727 19.4429 13.2665L18.2134 12.5H15.4854Z", fill: "#E53935" }),
|
|
259
|
+
React__default.createElement("path", { d: "M4.16501 12.5L1.06445 14.4705C1.28196 14.9045 1.52596 15.3216 1.80197 15.7166L6.89307 12.5H4.16501Z", fill: "#E53935" }),
|
|
260
|
+
React__default.createElement("path", { d: "M13.4785 8.5H11.5V11.5001H18.3871H19.8757C19.9497 11.0095 20.0002 10.511 20.0002 10C20.0002 9.48902 19.9497 8.99051 19.8757 8.5H18.1711H13.4785Z", fill: "#E53935" }),
|
|
261
|
+
React__default.createElement("path", { d: "M8.50017 11.5001V8.5H7.01764H2.32255H0.124502C0.050501 8.99051 0 9.48902 0 10C0 10.511 0.050501 11.0095 0.124502 11.5001H2.11004H8.50017Z", fill: "#E53935" }),
|
|
262
|
+
React__default.createElement("path", { d: "M11.5001 19.8759V12.2912V11.5002V8.50016V7.49865V0.124502C11.0095 0.050501 10.511 0 10 0C9.48902 0 8.99051 0.050501 8.5 0.124502V7.27664V7.59365V8.50016V11.5002V12.5942V19.8759C8.99051 19.9499 9.48902 20.0004 10 20.0004C10.511 20.0004 11.0095 19.9499 11.5001 19.8759Z", fill: "#E53935" }))));
|
|
263
|
+
const EnglishSquareIcon = (props) => (React__default.createElement("svg", Object.assign({ viewBox: "0 0 26 26", fill: "none" }, props),
|
|
264
|
+
React__default.createElement("g", null,
|
|
265
|
+
React__default.createElement("mask", { style: { maskType: 'alpha' }, maskUnits: "userSpaceOnUse", x: "1", y: "5", width: "24", height: "16" },
|
|
266
|
+
React__default.createElement("path", { d: "M1.08301 7.41675C1.08301 6.31218 1.97844 5.41675 3.08301 5.41675H22.9163C24.0209 5.41675 24.9163 6.31218 24.9163 7.41675V18.5834C24.9163 19.688 24.0209 20.5834 22.9163 20.5834H3.08301C1.97844 20.5834 1.08301 19.688 1.08301 18.5834V7.41675Z", fill: "#3F51B5" })),
|
|
267
|
+
React__default.createElement("path", { d: "M1.08301 5.41675H24.9163V20.5834H1.08301V5.41675Z", fill: "#3F51B5" }),
|
|
268
|
+
React__default.createElement("path", { d: "M1.08301 7.70041L12.3551 14.5899L14.05 11.8165L3.57901 5.41675H1.08301V7.70041Z", fill: "white" }),
|
|
269
|
+
React__default.createElement("path", { d: "M24.9165 5.41675H22.9616L12.4912 11.816L14.1855 14.5899L24.9165 8.03083V5.41675Z", fill: "white" }),
|
|
270
|
+
React__default.createElement("path", { d: "M14.1855 10.9802L12.4912 13.7536L23.6658 20.5834H24.9165V17.5387L14.1855 10.9802Z", fill: "white" }),
|
|
271
|
+
React__default.createElement("path", { d: "M1.08301 17.8702V20.5834H2.87592L14.05 13.7541L12.3556 10.9802L1.08301 17.8702Z", fill: "white" }),
|
|
272
|
+
React__default.createElement("path", { d: "M1.08301 10.8333H24.9163V15.1666H1.08301V10.8333Z", fill: "white" }),
|
|
273
|
+
React__default.createElement("path", { d: "M10.833 5.41675H15.1663V20.5834H10.833V5.41675Z", fill: "white" }),
|
|
274
|
+
React__default.createElement("path", { d: "M9.32609 10.8334L1.08301 5.79537V7.06504L7.24826 10.8334H9.32609ZM24.0004 5.41675L15.1376 10.8334H17.2149L24.9163 6.12687V5.41675H24.0004ZM17.9191 15.1667L24.9163 19.4432V18.1735L19.9964 15.1667H17.9191ZM8.62192 15.1667L1.08301 19.7742V20.5834H1.83701L10.6992 15.1667H8.62192ZM1.08301 11.9167H24.9163V14.0834H1.08301V11.9167Z", fill: "#E53935" }),
|
|
275
|
+
React__default.createElement("path", { d: "M11.917 5.41675H14.0837V20.5834H11.917V5.41675Z", fill: "#E53935" }))));
|
|
276
|
+
|
|
277
|
+
const IndiaRoundIcon = (props) => (React__default.createElement(ImageWrap, Object.assign({ alt: "round india flag", src: CommonGAssets.getAssetPath('flags/indiaRound.png'), style: Object.assign({ borderRadius: '50%' }, props.style) }, props)));
|
|
278
|
+
const IndiaSquareIcon = (props) => (React__default.createElement(ImageWrap, Object.assign({ alt: "square indian flag", src: CommonGAssets.getAssetPath('flags/indiaSquare.png') }, props)));
|
|
279
|
+
|
|
280
|
+
const IndonesiaRoundIcon = (_a) => {
|
|
281
|
+
var rest = __rest(_a, []);
|
|
282
|
+
const maskId = useUniqueId();
|
|
283
|
+
return (React__default.createElement("svg", Object.assign({ viewBox: "0 0 20 20", fill: "none" }, rest),
|
|
284
|
+
React__default.createElement("mask", { id: maskId, style: { maskType: 'alpha' }, maskUnits: "userSpaceOnUse", x: "0", y: "0", width: "20", height: "20" },
|
|
285
|
+
React__default.createElement("circle", { cx: "10", cy: "10", r: "10", fill: "#C4C4C4" })),
|
|
286
|
+
React__default.createElement("g", { mask: `url(#${maskId})` },
|
|
287
|
+
React__default.createElement("rect", { width: "20", height: "10", fill: "#CE1126" }),
|
|
288
|
+
React__default.createElement("rect", { y: "10", width: "20", height: "10", fill: "white" }))));
|
|
289
|
+
};
|
|
290
|
+
const IndonesiaSquareIcon = (_a) => {
|
|
291
|
+
var rest = __rest(_a, []);
|
|
292
|
+
const clipPathId = useUniqueId();
|
|
293
|
+
return (React__default.createElement("svg", Object.assign({ viewBox: "0 0 24 16", fill: "none" }, rest),
|
|
294
|
+
React__default.createElement("g", { clipPath: `url(#${clipPathId})` },
|
|
295
|
+
React__default.createElement("rect", { y: "0.0166016", width: "24", height: "8", fill: "#CE1126" }),
|
|
296
|
+
React__default.createElement("rect", { y: "8.0166", width: "24", height: "8", fill: "white" })),
|
|
297
|
+
React__default.createElement("defs", null,
|
|
298
|
+
React__default.createElement("clipPath", { id: clipPathId },
|
|
299
|
+
React__default.createElement("rect", { width: "24", height: "16", rx: "2", fill: "white" })))));
|
|
300
|
+
};
|
|
301
|
+
|
|
302
|
+
const MalaysiaRoundIcon = (props) => (React__default.createElement("svg", Object.assign({ viewBox: "0 0 20 20", fill: "none", style: Object.assign({ borderRadius: '50%' }, props.style) }, props),
|
|
303
|
+
React__default.createElement("g", null,
|
|
304
|
+
React__default.createElement("mask", { style: { maskType: 'alpha' }, maskUnits: "userSpaceOnUse", x: "0", y: "0", width: "20", height: "20" },
|
|
305
|
+
React__default.createElement("circle", { cx: "10", cy: "10", r: "10", fill: "#C4C4C4" })),
|
|
306
|
+
React__default.createElement("rect", { y: "1", width: "20", height: "20", fill: "#CC0001" }),
|
|
307
|
+
React__default.createElement("rect", { y: "16.106", width: "20", height: "1.02041", fill: "white" }),
|
|
308
|
+
React__default.createElement("rect", { y: "16", width: "20", height: "1.02041", fill: "white" }),
|
|
309
|
+
React__default.createElement("rect", { y: "18", width: "20", height: "1.02041", fill: "white" }),
|
|
310
|
+
React__default.createElement("rect", { y: "14.0652", width: "20", height: "1.02041", fill: "white" }),
|
|
311
|
+
React__default.createElement("rect", { y: "12.0242", width: "20", height: "1.02041", fill: "white" }),
|
|
312
|
+
React__default.createElement("rect", { y: "9.9834", width: "20", height: "1.02041", fill: "white" }),
|
|
313
|
+
React__default.createElement("rect", { y: "7.94263", width: "20", height: "1.02041", fill: "white" }),
|
|
314
|
+
React__default.createElement("rect", { y: "5.90186", width: "20", height: "1.02041", fill: "white" }),
|
|
315
|
+
React__default.createElement("rect", { y: "3.86084", width: "20", height: "1.02041", fill: "white" }),
|
|
316
|
+
React__default.createElement("rect", { y: "2", width: "20", height: "1.02041", fill: "white" }),
|
|
317
|
+
React__default.createElement("rect", { width: "20", height: "1.02041", fill: "white" }),
|
|
318
|
+
React__default.createElement("rect", { y: "-1", width: "10", height: "12", fill: "#010066" }),
|
|
319
|
+
React__default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4.11387 3.86084C2.92711 3.86084 1.96387 5.23232 1.96387 6.92206C1.96387 8.6118 2.92711 9.98329 4.11387 9.98329C4.54263 9.98329 4.94211 9.80406 5.27763 9.4957C5.08225 9.59203 4.87256 9.64471 4.65427 9.64471C3.60193 9.64471 2.74786 8.42866 2.74786 6.93032C2.74786 5.43198 3.60193 4.21594 4.65427 4.21594C4.88682 4.21594 5.10959 4.27527 5.31571 4.38397C4.97256 4.0538 4.5589 3.86084 4.11387 3.86084Z", fill: "#FFCC00" }),
|
|
320
|
+
React__default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M7.67935 8.51573L6.7737 7.8407L7.04147 9.22221L6.43573 8.06657L6.24676 9.47313L6.0609 8.06576L5.4526 9.2188L5.72343 7.83844L4.81629 8.50957L5.49017 7.42963L4.46387 7.48593L5.40732 6.9203L4.46512 6.35062L5.4913 6.41133L4.81981 5.3285L5.72546 6.00353L5.45769 4.62202L6.06343 5.77766L6.25241 4.37109L6.43827 5.77847L7.04656 4.62543L6.77574 6.00579L7.68287 5.33466L7.00899 6.4146L8.0353 6.3583L7.09184 6.92392L8.03404 7.49361L7.00786 7.43289L7.67935 8.51573Z", fill: "#FFCC00" }))));
|
|
321
|
+
const MalaysiaSquareIcon = (props) => (React__default.createElement("svg", Object.assign({ viewBox: "0 0 24 16", fill: "none" }, props),
|
|
322
|
+
React__default.createElement("rect", { width: "24", height: "16", rx: "2", fill: "#CC0001" }),
|
|
323
|
+
React__default.createElement("rect", { y: "12.2712", width: "24", height: "0.777454", fill: "white" }),
|
|
324
|
+
React__default.createElement("rect", { y: "12.1904", width: "24", height: "0.777454", fill: "white" }),
|
|
325
|
+
React__default.createElement("rect", { y: "13.7144", width: "24", height: "0.777454", fill: "white" }),
|
|
326
|
+
React__default.createElement("rect", { y: "10.7161", width: "24", height: "0.777454", fill: "white" }),
|
|
327
|
+
React__default.createElement("rect", { y: "9.16138", width: "24", height: "0.777454", fill: "white" }),
|
|
328
|
+
React__default.createElement("rect", { y: "7.60645", width: "24", height: "0.777454", fill: "white" }),
|
|
329
|
+
React__default.createElement("rect", { y: "6.05127", width: "24", height: "0.777454", fill: "white" }),
|
|
330
|
+
React__default.createElement("rect", { y: "4.49658", width: "24", height: "0.777454", fill: "white" }),
|
|
331
|
+
React__default.createElement("rect", { y: "2.94141", width: "24", height: "0.777454", fill: "white" }),
|
|
332
|
+
React__default.createElement("rect", { y: "1.52393", width: "24", height: "0.777454", fill: "white" }),
|
|
333
|
+
React__default.createElement("rect", { width: "24", height: "0.777454", fill: "white" }),
|
|
334
|
+
React__default.createElement("path", { d: "M0 2C0 0.895431 0.895431 0 2 0H12V8.38095H0V2Z", fill: "#010066" }),
|
|
335
|
+
React__default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4.93644 1.52393C3.51233 1.52393 2.35645 2.56887 2.35645 3.85629C2.35645 5.14371 3.51233 6.18865 4.93644 6.18865C5.45096 6.18865 5.93034 6.05209 6.33296 5.81716C6.09851 5.89054 5.84688 5.93068 5.58492 5.93068C4.32212 5.93068 3.29724 5.00417 3.29724 3.86258C3.29724 2.72099 4.32212 1.79448 5.58492 1.79448C5.86399 1.79448 6.13132 1.83968 6.37865 1.9225C5.96688 1.67094 5.47049 1.52393 4.93644 1.52393Z", fill: "#FFCC00" }),
|
|
336
|
+
React__default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9.216 5.07041L8.12923 4.55611L8.45055 5.60869L7.72366 4.72819L7.49689 5.79987L7.27386 4.72758L6.5439 5.60609L6.86889 4.55439L5.78033 5.06572L6.58899 4.24291L5.35742 4.28581L6.48957 3.85485L5.35893 3.42081L6.59034 3.46707L5.78456 2.64205L6.87133 3.15636L6.55001 2.10378L7.2769 2.98427L7.50367 1.9126L7.7267 2.98488L8.45666 2.10638L8.13166 3.15808L9.22022 2.64674L8.41157 3.46955L9.64314 3.42666L8.51099 3.85761L9.64163 4.29165L8.41022 4.2454L9.216 5.07041Z", fill: "#FFCC00" })));
|
|
337
|
+
|
|
338
|
+
const MyanmarRoundIcon = (props) => (React__default.createElement("svg", Object.assign({ viewBox: "0 0 20 20", fill: "none", style: Object.assign({ borderRadius: '50%' }, props.style) }, props),
|
|
339
|
+
React__default.createElement("g", null,
|
|
340
|
+
React__default.createElement("mask", { style: { maskType: 'alpha' }, maskUnits: "userSpaceOnUse", x: "0", y: "0", width: "20", height: "20" },
|
|
341
|
+
React__default.createElement("circle", { cx: "10", cy: "10", r: "10", fill: "#C4C4C4" })),
|
|
342
|
+
React__default.createElement("rect", { x: "-4", y: "-1", width: "28", height: "11", fill: "#FECB00" }),
|
|
343
|
+
React__default.createElement("rect", { x: "-4", y: "10", width: "28", height: "10", fill: "#EA2839" }),
|
|
344
|
+
React__default.createElement("rect", { x: "-4", y: "6.7041", width: "28", height: "6.47773", fill: "#34B233" }),
|
|
345
|
+
React__default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M8.56543 10.3272L10.1796 5.15527L11.7938 10.3272H8.56543Z", fill: "white" }),
|
|
346
|
+
React__default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11.5292 11.2775L7.18336 14.5129L8.91745 9.37991L11.5292 11.2775Z", fill: "white" }),
|
|
347
|
+
React__default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9.75181 11.8648L5.33182 8.73143L10.7494 8.79447L9.75181 11.8648Z", fill: "white" }),
|
|
348
|
+
React__default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9.6105 8.78962L15.0281 8.72658L10.6081 11.86L9.6105 8.78962Z", fill: "white" }),
|
|
349
|
+
React__default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11.4424 9.37686L13.1765 14.5098L8.83064 11.2744L11.4424 9.37686Z", fill: "white" }))));
|
|
350
|
+
const MyanmarSquareIcon = (props) => (React__default.createElement("svg", Object.assign({ viewBox: "0 0 24 16", fill: "none" }, props),
|
|
351
|
+
React__default.createElement("rect", { width: "24", height: "16", rx: "2", fill: "#FECB00" }),
|
|
352
|
+
React__default.createElement("rect", { y: "8.3811", width: "24", height: "7.61905", rx: "2", fill: "#EA2839" }),
|
|
353
|
+
React__default.createElement("rect", { y: "5.86987", width: "24", height: "4.93542", fill: "#34B233" }),
|
|
354
|
+
React__default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M10.7705 8.63046L12.1541 4.68994L13.5377 8.63046H10.7705Z", fill: "white" }),
|
|
355
|
+
React__default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M13.3108 9.35502L9.58574 11.8201L11.0721 7.90925L13.3108 9.35502Z", fill: "white" }),
|
|
356
|
+
React__default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11.7874 9.80216L7.99884 7.41482L12.6425 7.46285L11.7874 9.80216Z", fill: "white" }),
|
|
357
|
+
React__default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11.6667 7.4589L16.3104 7.41087L12.5218 9.79821L11.6667 7.4589Z", fill: "white" }),
|
|
358
|
+
React__default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M13.2361 7.90629L14.7225 11.8171L10.9974 9.35207L13.2361 7.90629Z", fill: "white" })));
|
|
359
|
+
|
|
360
|
+
const PhilippinesRoundIcon = (props) => (React__default.createElement(ImageWrap, Object.assign({ alt: "round philippines flag", src: CommonGAssets.getAssetPath('flags/philippineRound.png'), style: Object.assign({ borderRadius: '50%' }, props.style) }, props)));
|
|
361
|
+
const PhilippinesSquareIcon = (props) => (React__default.createElement(ImageWrap, Object.assign({ alt: "square philippines flag", src: CommonGAssets.getAssetPath('flags/philippineSquare.png') }, props)));
|
|
362
|
+
|
|
363
|
+
const TaiwanRoundIcon = (props) => (React__default.createElement("svg", Object.assign({ viewBox: "0 0 20 20", fill: "none", style: Object.assign({ borderRadius: '50%' }, props.style) }, props),
|
|
364
|
+
React__default.createElement("g", null,
|
|
365
|
+
React__default.createElement("mask", { style: { maskType: 'alpha' }, maskUnits: "userSpaceOnUse", x: "0", y: "0", width: "20", height: "20" },
|
|
366
|
+
React__default.createElement("circle", { cx: "10", cy: "10", r: "10", fill: "#C4C4C4" })),
|
|
367
|
+
React__default.createElement("circle", { cx: "10", cy: "10", r: "10", fill: "#D8D8D8" }),
|
|
368
|
+
React__default.createElement("g", null,
|
|
369
|
+
React__default.createElement("mask", { style: { maskType: 'alpha' }, maskUnits: "userSpaceOnUse", x: "0", y: "0", width: "20", height: "20" },
|
|
370
|
+
React__default.createElement("circle", { cx: "10", cy: "10", r: "10", fill: "white" })),
|
|
371
|
+
React__default.createElement("rect", { width: "30", height: "20", fill: "#ED1E24" }),
|
|
372
|
+
React__default.createElement("rect", { width: "15", height: "10", fill: "#2B2F84" }),
|
|
373
|
+
React__default.createElement("circle", { cx: "7.49791", cy: "4.99913", r: "1.869", fill: "white" }),
|
|
374
|
+
React__default.createElement("path", { d: "M7.93582 2.89402L7.49722 1.25732L7.05762 2.89812C7.28902 2.84212 7.64062 2.82912 7.93582 2.89402Z", fill: "white" }),
|
|
375
|
+
React__default.createElement("path", { d: "M6.82515 2.95674L5.62695 1.75854L6.06655 3.39934C6.23895 3.23514 6.53695 3.04814 6.82515 2.95674Z", fill: "white" }),
|
|
376
|
+
React__default.createElement("path", { d: "M5.89364 3.56677L4.25684 3.12817L5.45794 4.32927C5.52514 4.10107 5.68964 3.79007 5.89364 3.56677Z", fill: "white" }),
|
|
377
|
+
React__default.createElement("path", { d: "M5.39266 4.56055L3.75586 4.99915L5.39666 5.43885C5.34066 5.20745 5.32756 4.85585 5.39266 4.56055Z", fill: "white" }),
|
|
378
|
+
React__default.createElement("path", { d: "M5.45504 5.67188L4.25684 6.87007L5.89764 6.43047C5.73344 6.25807 5.54634 5.96007 5.45504 5.67188Z", fill: "white" }),
|
|
379
|
+
React__default.createElement("path", { d: "M6.06555 6.60278L5.62695 8.23958L6.82815 7.03838C6.59975 6.97128 6.28875 6.80678 6.06555 6.60278Z", fill: "white" }),
|
|
380
|
+
React__default.createElement("path", { d: "M7.05859 7.1041L7.49719 8.7409L7.93679 7.1001C7.70549 7.1561 7.35399 7.1692 7.05859 7.1041Z", fill: "white" }),
|
|
381
|
+
React__default.createElement("path", { d: "M8.16992 7.04148L9.36812 8.23968L8.92852 6.59888C8.75622 6.76308 8.45822 6.95018 8.16992 7.04148Z", fill: "white" }),
|
|
382
|
+
React__default.createElement("path", { d: "M9.10156 6.43145L10.7384 6.87005L9.53726 5.66895C9.47006 5.89725 9.30556 6.20825 9.10156 6.43145Z", fill: "white" }),
|
|
383
|
+
React__default.createElement("path", { d: "M9.60263 5.43763L11.2394 4.99903L9.59863 4.55933C9.65463 4.79073 9.66763 5.14223 9.60263 5.43763Z", fill: "white" }),
|
|
384
|
+
React__default.createElement("path", { d: "M9.54026 4.32637L10.7385 3.12817L9.09766 3.56777C9.26196 3.74007 9.44896 4.03807 9.54026 4.32637Z", fill: "white" }),
|
|
385
|
+
React__default.createElement("path", { d: "M8.92959 3.39534L9.36819 1.75854L8.16699 2.95964C8.39529 3.02674 8.70629 3.19124 8.92959 3.39534Z", fill: "white" })))));
|
|
386
|
+
const TaiwanSquareIcon = (props) => (React__default.createElement("svg", Object.assign({ viewBox: "0 0 24 16", fill: "none" }, props),
|
|
387
|
+
React__default.createElement("rect", { width: "24", height: "16", rx: "2", fill: "#ED1E24" }),
|
|
388
|
+
React__default.createElement("path", { d: "M0 2C0 0.89543 0.895431 0 2 0H15V10H0V2Z", fill: "#2B2F84" }),
|
|
389
|
+
React__default.createElement("circle", { cx: "7.49791", cy: "4.99913", r: "1.869", fill: "white" }),
|
|
390
|
+
React__default.createElement("path", { d: "M7.93582 2.89402L7.49722 1.25732L7.05762 2.89812C7.28902 2.84212 7.64062 2.82912 7.93582 2.89402Z", fill: "white" }),
|
|
391
|
+
React__default.createElement("path", { d: "M6.82515 2.95674L5.62695 1.75854L6.06655 3.39934C6.23895 3.23514 6.53695 3.04814 6.82515 2.95674Z", fill: "white" }),
|
|
392
|
+
React__default.createElement("path", { d: "M5.89364 3.56677L4.25684 3.12817L5.45794 4.32927C5.52514 4.10107 5.68964 3.79007 5.89364 3.56677Z", fill: "white" }),
|
|
393
|
+
React__default.createElement("path", { d: "M5.39266 4.56055L3.75586 4.99915L5.39666 5.43885C5.34066 5.20745 5.32756 4.85585 5.39266 4.56055Z", fill: "white" }),
|
|
394
|
+
React__default.createElement("path", { d: "M5.45504 5.67188L4.25684 6.87007L5.89764 6.43047C5.73344 6.25807 5.54634 5.96007 5.45504 5.67188Z", fill: "white" }),
|
|
395
|
+
React__default.createElement("path", { d: "M6.06555 6.60278L5.62695 8.23958L6.82815 7.03838C6.59975 6.97128 6.28875 6.80678 6.06555 6.60278Z", fill: "white" }),
|
|
396
|
+
React__default.createElement("path", { d: "M7.05859 7.1041L7.49719 8.7409L7.93679 7.1001C7.70549 7.1561 7.35399 7.1692 7.05859 7.1041Z", fill: "white" }),
|
|
397
|
+
React__default.createElement("path", { d: "M8.16992 7.04148L9.36812 8.23968L8.92852 6.59888C8.75622 6.76308 8.45822 6.95018 8.16992 7.04148Z", fill: "white" }),
|
|
398
|
+
React__default.createElement("path", { d: "M9.10156 6.43145L10.7384 6.87005L9.53726 5.66895C9.47006 5.89725 9.30556 6.20825 9.10156 6.43145Z", fill: "white" }),
|
|
399
|
+
React__default.createElement("path", { d: "M9.60263 5.43763L11.2394 4.99903L9.59863 4.55933C9.65463 4.79073 9.66763 5.14223 9.60263 5.43763Z", fill: "white" }),
|
|
400
|
+
React__default.createElement("path", { d: "M9.54026 4.32637L10.7385 3.12817L9.09766 3.56777C9.26196 3.74007 9.44896 4.03807 9.54026 4.32637Z", fill: "white" }),
|
|
401
|
+
React__default.createElement("path", { d: "M8.92959 3.39534L9.36819 1.75854L8.16699 2.95964C8.39529 3.02674 8.70629 3.19124 8.92959 3.39534Z", fill: "white" })));
|
|
402
|
+
|
|
403
|
+
const ThailandRoundIcon = (props) => (React__default.createElement("svg", Object.assign({ viewBox: "0 0 20 20", fill: "none", style: Object.assign({ borderRadius: '50%' }, props.style) }, props),
|
|
404
|
+
React__default.createElement("g", null,
|
|
405
|
+
React__default.createElement("mask", { style: { maskType: 'alpha' }, maskUnits: "userSpaceOnUse", x: "0", y: "0", width: "20", height: "20" },
|
|
406
|
+
React__default.createElement("circle", { cx: "10", cy: "10", r: "10", fill: "#C4C4C4" })),
|
|
407
|
+
React__default.createElement("rect", { x: "-4", y: "-0.0166016", width: "28", height: "20", fill: "#ED1C24" }),
|
|
408
|
+
React__default.createElement("rect", { x: "-4", y: "3.31665", width: "28", height: "13.3333", fill: "white" }),
|
|
409
|
+
React__default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M-4 6.65015H24V13.3168H-4V6.65015Z", fill: "#241D4F" }))));
|
|
410
|
+
const ThailandSquareIcon = (props) => (React__default.createElement("svg", Object.assign({ viewBox: "0 0 24 17", fill: "none" }, props),
|
|
411
|
+
React__default.createElement("rect", { y: "0.983398", width: "24", height: "16", rx: "2", fill: "#ED1C24" }),
|
|
412
|
+
React__default.createElement("rect", { y: "3.65039", width: "24", height: "10.6667", fill: "white" }),
|
|
413
|
+
React__default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M0 6.31689H24V11.6502H0V6.31689Z", fill: "#241D4F" })));
|
|
414
|
+
|
|
415
|
+
const VietnamRoundIcon = (props) => (React__default.createElement("svg", Object.assign({ viewBox: "0 0 20 20", fill: "none", style: Object.assign({ borderRadius: '50%' }, props.style) }, props),
|
|
416
|
+
React__default.createElement("g", null,
|
|
417
|
+
React__default.createElement("mask", { style: { maskType: 'alpha' }, maskUnits: "userSpaceOnUse", x: "0", y: "0", width: "20", height: "20" },
|
|
418
|
+
React__default.createElement("circle", { cx: "10", cy: "10", r: "10", fill: "#C4C4C4" })),
|
|
419
|
+
React__default.createElement("rect", { x: "-4", y: "-0.0166016", width: "28", height: "20", fill: "#DA251D" }),
|
|
420
|
+
React__default.createElement("path", { d: "M11.7228 10.8677L14.2819 9.00839L11.1187 9.00839L10.1409 6L9.16316 9.00839L6 9.00839L8.5591 10.8677L7.58184 13.8766L10.1409 12.0168L12.7 13.8766L11.7228 10.8677Z", fill: "#FFEB3B" }))));
|
|
421
|
+
const VietnamSquareIcon = (props) => (React__default.createElement("svg", Object.assign({ viewBox: "0 0 24 16", fill: "none" }, props),
|
|
422
|
+
React__default.createElement("g", null,
|
|
423
|
+
React__default.createElement("clipPath", null,
|
|
424
|
+
React__default.createElement("rect", { width: "24", height: "16", fill: "white" })),
|
|
425
|
+
React__default.createElement("path", { d: "M2.01386e-10 2C0 0.895431 0.895431 -7.50368e-10 2 -1.67599e-09L22 -1.84359e-08C23.1046 -1.93615e-08 24 0.895431 24 2L24 14C24 15.1046 23.1046 16 22 16L2 16C0.89543 16 1.52092e-09 15.1046 1.4097e-09 14L2.01386e-10 2Z", fill: "#DA251D" }),
|
|
426
|
+
React__default.createElement("path", { d: "M13.7823 8.92854L16.6663 6.8332L13.1016 6.8332L11.9997 3.44287L10.8978 6.8332L7.33301 6.8332L10.217 8.92854L9.11567 12.3195L11.9997 10.2235L14.8837 12.3195L13.7823 8.92854Z", fill: "#FFEB3B" }))));
|
|
427
|
+
|
|
428
|
+
var styles$2 = {"flag":"pfaLGRK"};
|
|
429
|
+
|
|
430
|
+
const Flag = ({ country, language, rounded, height, width, isTesting, className, }) => {
|
|
431
|
+
let flag;
|
|
432
|
+
let flagRounded;
|
|
433
|
+
switch (language) {
|
|
434
|
+
case 'en':
|
|
435
|
+
flag = React__default.createElement(EnglishSquareIcon, null);
|
|
436
|
+
flagRounded = React__default.createElement(EnglishRoundIcon, null);
|
|
437
|
+
break;
|
|
438
|
+
case 'vi':
|
|
439
|
+
flag = React__default.createElement(VietnamSquareIcon, null);
|
|
440
|
+
flagRounded = React__default.createElement(VietnamRoundIcon, null);
|
|
441
|
+
break;
|
|
442
|
+
case 'id':
|
|
443
|
+
flag = React__default.createElement(IndonesiaSquareIcon, { isTesting: isTesting });
|
|
444
|
+
flagRounded = React__default.createElement(IndonesiaRoundIcon, { isTesting: isTesting });
|
|
445
|
+
break;
|
|
446
|
+
case 'th':
|
|
447
|
+
flag = React__default.createElement(ThailandSquareIcon, null);
|
|
448
|
+
flagRounded = React__default.createElement(ThailandRoundIcon, null);
|
|
449
|
+
break;
|
|
450
|
+
case 'km':
|
|
451
|
+
flag = React__default.createElement(CambodiaSquareIcon, null);
|
|
452
|
+
flagRounded = React__default.createElement(CambodiaRoundIcon, null);
|
|
453
|
+
break;
|
|
454
|
+
case 'ms':
|
|
455
|
+
flag = React__default.createElement(MalaysiaSquareIcon, null);
|
|
456
|
+
flagRounded = React__default.createElement(MalaysiaRoundIcon, null);
|
|
457
|
+
break;
|
|
458
|
+
case 'my':
|
|
459
|
+
flag = React__default.createElement(MyanmarSquareIcon, null);
|
|
460
|
+
flagRounded = React__default.createElement(MyanmarRoundIcon, null);
|
|
461
|
+
break;
|
|
462
|
+
case 'tl':
|
|
463
|
+
flag = React__default.createElement(PhilippinesSquareIcon, null);
|
|
464
|
+
flagRounded = React__default.createElement(PhilippinesRoundIcon, null);
|
|
465
|
+
break;
|
|
466
|
+
case 'hi':
|
|
467
|
+
flag = React__default.createElement(IndiaSquareIcon, null);
|
|
468
|
+
flagRounded = React__default.createElement(IndiaRoundIcon, null);
|
|
469
|
+
break;
|
|
470
|
+
case 'zh':
|
|
471
|
+
flag = React__default.createElement(TaiwanSquareIcon, null);
|
|
472
|
+
flagRounded = React__default.createElement(TaiwanRoundIcon, null);
|
|
473
|
+
break;
|
|
474
|
+
}
|
|
475
|
+
if (!flag && !flagRounded) {
|
|
476
|
+
switch (country) {
|
|
477
|
+
case 'VN':
|
|
478
|
+
flag = React__default.createElement(VietnamSquareIcon, null);
|
|
479
|
+
flagRounded = React__default.createElement(VietnamRoundIcon, null);
|
|
480
|
+
break;
|
|
481
|
+
case 'ID':
|
|
482
|
+
flag = React__default.createElement(IndonesiaSquareIcon, { isTesting: isTesting });
|
|
483
|
+
flagRounded = React__default.createElement(IndonesiaRoundIcon, { isTesting: isTesting });
|
|
484
|
+
break;
|
|
485
|
+
case 'TH':
|
|
486
|
+
flag = React__default.createElement(ThailandSquareIcon, null);
|
|
487
|
+
flagRounded = React__default.createElement(ThailandRoundIcon, null);
|
|
488
|
+
break;
|
|
489
|
+
case 'KH':
|
|
490
|
+
flag = React__default.createElement(CambodiaSquareIcon, null);
|
|
491
|
+
flagRounded = React__default.createElement(CambodiaRoundIcon, null);
|
|
492
|
+
break;
|
|
493
|
+
case 'MY':
|
|
494
|
+
flag = React__default.createElement(MalaysiaSquareIcon, null);
|
|
495
|
+
flagRounded = React__default.createElement(MalaysiaRoundIcon, null);
|
|
496
|
+
break;
|
|
497
|
+
case 'MM':
|
|
498
|
+
flag = React__default.createElement(MyanmarSquareIcon, null);
|
|
499
|
+
flagRounded = React__default.createElement(MyanmarRoundIcon, null);
|
|
500
|
+
break;
|
|
501
|
+
case 'PH':
|
|
502
|
+
flag = React__default.createElement(PhilippinesSquareIcon, null);
|
|
503
|
+
flagRounded = React__default.createElement(PhilippinesRoundIcon, null);
|
|
504
|
+
break;
|
|
505
|
+
case 'IN':
|
|
506
|
+
flag = React__default.createElement(IndiaSquareIcon, null);
|
|
507
|
+
flagRounded = React__default.createElement(IndiaRoundIcon, null);
|
|
508
|
+
break;
|
|
509
|
+
case 'TW':
|
|
510
|
+
flag = React__default.createElement(TaiwanSquareIcon, null);
|
|
511
|
+
flagRounded = React__default.createElement(TaiwanRoundIcon, null);
|
|
512
|
+
break;
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
return (React__default.createElement("div", { className: `${styles$2.flag} ${className || ''}`, style: {
|
|
516
|
+
'--width': width || 20,
|
|
517
|
+
'--height': height || 20,
|
|
518
|
+
} }, rounded ? flagRounded : flag));
|
|
519
|
+
};
|
|
520
|
+
|
|
521
|
+
const Select = forwardRef((_a, ref) => {
|
|
522
|
+
var { keepSearch = false } = _a, props = __rest(_a, ["keepSearch"]);
|
|
523
|
+
if (keepSearch) {
|
|
524
|
+
return (React__default.createElement(_AutoComplete, Object.assign({}, props, { ref: ref })));
|
|
525
|
+
}
|
|
526
|
+
else {
|
|
527
|
+
return React__default.createElement(_Select, Object.assign({}, props, { ref: ref }));
|
|
528
|
+
}
|
|
529
|
+
});
|
|
530
|
+
const _AutoComplete = forwardRef((_a, ref) => {
|
|
531
|
+
var { value, defaultValue, onChange, clearable } = _a, props = __rest(_a, ["value", "defaultValue", "onChange", "clearable"]);
|
|
532
|
+
const [_value, handleChange] = useUncontrolled({
|
|
533
|
+
value,
|
|
534
|
+
defaultValue,
|
|
535
|
+
onChange,
|
|
536
|
+
});
|
|
537
|
+
const onClear = () => {
|
|
538
|
+
handleChange('');
|
|
539
|
+
};
|
|
540
|
+
return (React__default.createElement(Autocomplete, Object.assign({ ref: ref, rightSection: React__default.createElement(Image, { src: CommonGAssets.getAssetPath('chevron-down.svg'), fit: "none" }), size: "md", maxDropdownHeight: 300, onChange: (e) => handleChange(e), value: _value }, props, (clearable && (_value === null || _value === void 0 ? void 0 : _value.length) > 0
|
|
541
|
+
? {
|
|
542
|
+
rightSection: (React__default.createElement(ActionIcon, { onClick: onClear, sx: { cursor: 'pointer' } },
|
|
543
|
+
React__default.createElement(_IconSelect, null))),
|
|
544
|
+
}
|
|
545
|
+
: {}))));
|
|
546
|
+
});
|
|
547
|
+
const _Select = forwardRef((_a, ref) => {
|
|
548
|
+
var { searchValue, onSearchChange } = _a, props = __rest(_a, ["searchValue", "onSearchChange"]);
|
|
549
|
+
const [_searchValue, handleSearchChange] = useUncontrolled({
|
|
550
|
+
defaultValue: '',
|
|
551
|
+
value: searchValue,
|
|
552
|
+
onChange: onSearchChange,
|
|
553
|
+
});
|
|
554
|
+
const onClear = () => {
|
|
555
|
+
handleSearchChange('');
|
|
556
|
+
};
|
|
557
|
+
return (React__default.createElement(Select$1, Object.assign({ ref: ref, rightSection: React__default.createElement(ArrowDown, { size: 18 }), rightSectionProps: { style: { pointerEvents: 'none' } }, size: "md", maxDropdownHeight: 300, onSearchChange: (e) => handleSearchChange(e), searchValue: _searchValue }, props, (props.clearable && (_searchValue === null || _searchValue === void 0 ? void 0 : _searchValue.length) > 0
|
|
558
|
+
? {
|
|
559
|
+
rightSection: (React__default.createElement(ActionIcon, { onClick: onClear, sx: { cursor: 'pointer' } },
|
|
560
|
+
React__default.createElement(_IconSelect, null))),
|
|
561
|
+
}
|
|
562
|
+
: {}))));
|
|
563
|
+
});
|
|
564
|
+
const _IconSelect = () => (React__default.createElement("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none" },
|
|
565
|
+
React__default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M1.6665 9.99996C1.6665 5.39163 5.3915 1.66663 9.99984 1.66663C14.6082 1.66663 18.3332 5.39163 18.3332 9.99996C18.3332 14.6083 14.6082 18.3333 9.99984 18.3333C5.3915 18.3333 1.6665 14.6083 1.6665 9.99996ZM12.4083 13.5831C12.7333 13.9081 13.2583 13.9081 13.5833 13.5831C13.9 13.2581 13.9 12.7247 13.5833 12.4081L11.175 9.99973L13.5833 7.5914C13.9083 7.2664 13.9083 6.7414 13.5833 6.4164C13.2583 6.0914 12.7333 6.0914 12.4083 6.4164L10 8.82473L7.59167 6.4164C7.26667 6.0914 6.74167 6.0914 6.41667 6.4164C6.26063 6.57209 6.17293 6.78347 6.17293 7.0039C6.17293 7.22433 6.26063 7.43571 6.41667 7.5914L8.825 9.99973L6.41667 12.4081C6.26063 12.5638 6.17293 12.7751 6.17293 12.9956C6.17293 13.216 6.26063 13.4274 6.41667 13.5831C6.74167 13.9081 7.26667 13.9081 7.59167 13.5831L10 11.1747L12.4083 13.5831Z", fill: "#8C8C8C" })));
|
|
566
|
+
|
|
567
|
+
// Available locale list https://cdn.jsdelivr.net/npm/dayjs@1/locale.json
|
|
568
|
+
const MAPPED_LOCALE = {
|
|
569
|
+
[LOCALE.Vietnam]: 'vi',
|
|
570
|
+
[LOCALE.Cambodia]: 'km',
|
|
571
|
+
[LOCALE.India]: 'hi',
|
|
572
|
+
[LOCALE.Indonesia]: 'id',
|
|
573
|
+
[LOCALE.Malaysia]: 'ms',
|
|
574
|
+
[LOCALE.Thailand]: 'th',
|
|
575
|
+
[LOCALE.Taiwan]: 'zh-tw',
|
|
576
|
+
[LOCALE.PhilippinesTagalog]: 'tl-ph',
|
|
577
|
+
[LOCALE.PhilippinesEnglish]: 'en',
|
|
578
|
+
[LOCALE.Myanmar]: 'my',
|
|
579
|
+
};
|
|
580
|
+
const LOCALE_LOADERS = {
|
|
581
|
+
[LOCALE.Vietnam]: () => import('dayjs/locale/vi.js'),
|
|
582
|
+
[LOCALE.Cambodia]: () => import('dayjs/locale/km.js'),
|
|
583
|
+
[LOCALE.India]: () => import('dayjs/locale/hi.js'),
|
|
584
|
+
[LOCALE.Indonesia]: () => import('dayjs/locale/id.js'),
|
|
585
|
+
[LOCALE.Malaysia]: () => import('dayjs/locale/ms.js'),
|
|
586
|
+
[LOCALE.Thailand]: () => import('dayjs/locale/th.js'),
|
|
587
|
+
[LOCALE.Taiwan]: () => import('dayjs/locale/zh-tw.js'),
|
|
588
|
+
[LOCALE.PhilippinesTagalog]: () => import('dayjs/locale/tl-ph.js'),
|
|
589
|
+
[LOCALE.PhilippinesEnglish]: () => import('dayjs/locale/en.js'),
|
|
590
|
+
[LOCALE.Myanmar]: () => import('dayjs/locale/my.js'),
|
|
591
|
+
};
|
|
592
|
+
const useMantineLocale = (locale) => {
|
|
593
|
+
const [isLoaded, setIsLoaded] = useState(false);
|
|
594
|
+
useEffect(() => {
|
|
595
|
+
(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
596
|
+
var _a;
|
|
597
|
+
setIsLoaded(false);
|
|
598
|
+
yield ((_a = LOCALE_LOADERS[locale]) === null || _a === void 0 ? void 0 : _a.call(LOCALE_LOADERS));
|
|
599
|
+
dayjs.locale(MAPPED_LOCALE[locale]);
|
|
600
|
+
setIsLoaded(true);
|
|
601
|
+
}))();
|
|
602
|
+
}, [locale]);
|
|
603
|
+
return {
|
|
604
|
+
isLoaded,
|
|
605
|
+
};
|
|
606
|
+
};
|
|
607
|
+
|
|
608
|
+
const getIsMobile = () => {
|
|
609
|
+
return (typeof window !== 'undefined' &&
|
|
610
|
+
window.innerWidth < Breakpoints.BREAK_POINT_MOBILE);
|
|
611
|
+
};
|
|
612
|
+
const getIsLargeMobile = () => {
|
|
613
|
+
return (typeof window !== 'undefined' &&
|
|
614
|
+
window.innerWidth >= Breakpoints.BREAK_POINT_MOBILE &&
|
|
615
|
+
window.innerWidth < Breakpoints.BREAK_POINT_PC);
|
|
616
|
+
};
|
|
617
|
+
const useScreenSize = () => {
|
|
618
|
+
const [isMobile, setIsMobile] = useState(getIsMobile());
|
|
619
|
+
const [isLargeMobile, setIsLargeMobile] = useState(getIsLargeMobile());
|
|
620
|
+
useEffect(() => {
|
|
621
|
+
const handleResize = () => {
|
|
622
|
+
setIsMobile(getIsMobile());
|
|
623
|
+
setIsLargeMobile(getIsLargeMobile());
|
|
624
|
+
};
|
|
625
|
+
window.addEventListener('resize', handleResize, {
|
|
626
|
+
passive: true,
|
|
627
|
+
});
|
|
628
|
+
return () => {
|
|
629
|
+
window.removeEventListener('resize', handleResize);
|
|
630
|
+
};
|
|
631
|
+
}, []);
|
|
632
|
+
return { isMobile, isLargeMobile };
|
|
633
|
+
};
|
|
634
|
+
|
|
635
|
+
class ErrorBoundary extends Component {
|
|
636
|
+
constructor() {
|
|
637
|
+
super(...arguments);
|
|
638
|
+
this.state = {
|
|
639
|
+
hasError: false,
|
|
640
|
+
};
|
|
641
|
+
}
|
|
642
|
+
static getDerivedStateFromError() {
|
|
643
|
+
// Update state so the next render will show the fallback UI.
|
|
644
|
+
return { hasError: true };
|
|
645
|
+
}
|
|
646
|
+
componentDidCatch(error, errorInfo) {
|
|
647
|
+
console.error('Uncaught error:', error, errorInfo);
|
|
648
|
+
}
|
|
649
|
+
render() {
|
|
650
|
+
if (this.state.hasError) {
|
|
651
|
+
return this.props.fallback || React__default.createElement(React__default.Fragment, null);
|
|
652
|
+
}
|
|
653
|
+
return this.props.children;
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
const CarouselWrapper$1 = (_a) => {
|
|
658
|
+
var { slidesToShow = 1, children } = _a, props = __rest(_a, ["slidesToShow", "children"]);
|
|
659
|
+
const length = Array.isArray(children) ? children.length : 1;
|
|
660
|
+
if (!length)
|
|
661
|
+
return null;
|
|
662
|
+
return (React__default.createElement(ErrorBoundary, null,
|
|
663
|
+
React__default.createElement(Carousel$1
|
|
664
|
+
// get 2 precision number
|
|
665
|
+
, Object.assign({
|
|
666
|
+
// get 2 precision number
|
|
667
|
+
slideSize: String(Math.floor((1 / slidesToShow) * 10000) / 100) + '%', containScroll: "trimSnaps" }, props), children)));
|
|
668
|
+
};
|
|
669
|
+
const Carousel = CarouselWrapper$1;
|
|
670
|
+
Carousel.Slide = Carousel$1.Slide;
|
|
671
|
+
|
|
672
|
+
const StyledCarousel = styled(Carousel) `
|
|
673
|
+
cursor: grab;
|
|
674
|
+
width: 100%;
|
|
675
|
+
.mantine-Carousel-control {
|
|
676
|
+
background: rgb(255, 255, 255);
|
|
677
|
+
opacity: 1;
|
|
678
|
+
border: none;
|
|
679
|
+
border-radius: 0;
|
|
680
|
+
box-shadow: none;
|
|
681
|
+
&[data-inactive] {
|
|
682
|
+
opacity: 0;
|
|
683
|
+
cursor: default;
|
|
684
|
+
}
|
|
685
|
+
&:first-child {
|
|
686
|
+
padding-right: 24px;
|
|
687
|
+
background: linear-gradient(
|
|
688
|
+
90deg,
|
|
689
|
+
rgba(255, 255, 255, 1) 0%,
|
|
690
|
+
rgba(255, 255, 255, 1) 50%,
|
|
691
|
+
rgba(255, 255, 255, 0) 100%
|
|
692
|
+
);
|
|
693
|
+
}
|
|
694
|
+
&:last-child {
|
|
695
|
+
padding-left: 24px;
|
|
696
|
+
background: linear-gradient(
|
|
697
|
+
270deg,
|
|
698
|
+
rgba(255, 255, 255, 1) 0%,
|
|
699
|
+
rgba(255, 255, 255, 1) 50%,
|
|
700
|
+
rgba(255, 255, 255, 0) 100%
|
|
701
|
+
);
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
.mantine-Carousel-container {
|
|
706
|
+
align-items: center;
|
|
707
|
+
}
|
|
708
|
+
`;
|
|
709
|
+
|
|
710
|
+
var useStyles$3 = createStyles((_theme, _params) => {
|
|
711
|
+
return {
|
|
712
|
+
root: {
|
|
713
|
+
color: _params.color ||
|
|
714
|
+
(_theme.primaryColor === 'hb'
|
|
715
|
+
? _theme.colors.hb[6]
|
|
716
|
+
: _theme.fn.primaryColor()),
|
|
717
|
+
'&[data-event-category] > *': {
|
|
718
|
+
pointerEvents: 'none',
|
|
719
|
+
},
|
|
720
|
+
},
|
|
721
|
+
};
|
|
722
|
+
});
|
|
723
|
+
|
|
724
|
+
const Anchor = (_a) => {
|
|
725
|
+
var { color, styles, className } = _a, rest = __rest(_a, ["color", "styles", "className"]);
|
|
726
|
+
const { classes, cx } = useStyles$3({ color }, { name: 'Anchor', styles });
|
|
727
|
+
return React__default.createElement(Text, Object.assign({ as: "a", className: cx(classes.root, className) }, rest));
|
|
728
|
+
};
|
|
729
|
+
|
|
730
|
+
const BreadcrumbItem = (_a) => {
|
|
731
|
+
var { children } = _a, rest = __rest(_a, ["children"]);
|
|
732
|
+
return (React__default.createElement(Anchor, Object.assign({ size: "p4", color: 'gray.8' }, rest), children));
|
|
733
|
+
};
|
|
734
|
+
|
|
735
|
+
const AspectRatio = (props) => {
|
|
736
|
+
return (React__default.createElement(AspectRatio$1, Object.assign({ sx: {
|
|
737
|
+
borderRadius: 4,
|
|
738
|
+
overflow: 'hidden',
|
|
739
|
+
'> img': {
|
|
740
|
+
objectFit: 'contain',
|
|
741
|
+
},
|
|
742
|
+
} }, props)));
|
|
743
|
+
};
|
|
744
|
+
|
|
745
|
+
const GlobalButtonStyle = {
|
|
746
|
+
Button: {
|
|
747
|
+
defaultProps: {
|
|
748
|
+
variant: 'primary',
|
|
749
|
+
size: 'md',
|
|
750
|
+
},
|
|
751
|
+
},
|
|
752
|
+
};
|
|
753
|
+
|
|
754
|
+
const headingStyles = [
|
|
755
|
+
{ size: '40px', lineHeight: '52px', letterSpacing: '-1.2px' },
|
|
756
|
+
{ size: '32px', lineHeight: '42px', letterSpacing: '-1px' },
|
|
757
|
+
{ size: '26px', lineHeight: '36px', letterSpacing: '-0.8px' },
|
|
758
|
+
{ size: '22px', lineHeight: '32px', letterSpacing: '-0.6px' },
|
|
759
|
+
{ size: '18px', lineHeight: '28px', letterSpacing: '-0.2px' },
|
|
760
|
+
{ size: '16px', lineHeight: '24px', letterSpacing: 0 },
|
|
761
|
+
];
|
|
762
|
+
const headingStylesMBDown = [
|
|
763
|
+
{ size: '26px', lineHeight: '34px', letterSpacing: '-0.9px' },
|
|
764
|
+
{ size: '24px', lineHeight: '32px', letterSpacing: '-0.8px' },
|
|
765
|
+
{ size: '20px', lineHeight: '26px', letterSpacing: '-0.7px' },
|
|
766
|
+
{ size: '18px', lineHeight: '26px', letterSpacing: '-0.6px' },
|
|
767
|
+
{ size: '16px', lineHeight: '24px', letterSpacing: '-0.2px' },
|
|
768
|
+
{ size: '14px', lineHeight: '22px', letterSpacing: '-0.2px' },
|
|
769
|
+
];
|
|
770
|
+
const getHeadingStyles = (mbDown = false) => Object.fromEntries((mbDown ? headingStylesMBDown : headingStyles).map((style, index) => [
|
|
771
|
+
`h${index + 1}`,
|
|
772
|
+
{
|
|
773
|
+
fontSize: style.size,
|
|
774
|
+
lineHeight: style.lineHeight,
|
|
775
|
+
letterSpacing: style.letterSpacing,
|
|
776
|
+
},
|
|
777
|
+
]));
|
|
778
|
+
const GlobalHeadingStyle = {
|
|
779
|
+
Title: {
|
|
780
|
+
styles: {
|
|
781
|
+
root: Object.assign(Object.assign({ fontWeight: OTHER_THEME_CONFIG.fontWeight.bold }, getHeadingStyles()), { [`&${MediaQueries.mbDown}`]: Object.assign({}, getHeadingStyles(true)) }),
|
|
782
|
+
},
|
|
783
|
+
},
|
|
784
|
+
};
|
|
785
|
+
|
|
786
|
+
const GlobalInputStyle = (locale) => {
|
|
787
|
+
var _a;
|
|
788
|
+
return ({
|
|
789
|
+
InputWrapper: {
|
|
790
|
+
styles: {
|
|
791
|
+
label: {
|
|
792
|
+
display: 'inline-flex',
|
|
793
|
+
gap: 4,
|
|
794
|
+
marginBottom: '0.25rem',
|
|
795
|
+
fontWeight: 600,
|
|
796
|
+
fontSize: '14px',
|
|
797
|
+
lineHeight: '22px',
|
|
798
|
+
color: theme.colors.gray600,
|
|
799
|
+
},
|
|
800
|
+
description: {
|
|
801
|
+
fontWeight: 400,
|
|
802
|
+
fontSize: '12px',
|
|
803
|
+
lineHeight: '18px',
|
|
804
|
+
color: theme.colors.gray600,
|
|
805
|
+
marginBottom: '0.25rem',
|
|
806
|
+
},
|
|
807
|
+
error: {
|
|
808
|
+
marginTop: '0.25rem',
|
|
809
|
+
},
|
|
810
|
+
},
|
|
811
|
+
},
|
|
812
|
+
NumberInput: {
|
|
813
|
+
defaultProps: {
|
|
814
|
+
decimalSeparator: (_a = ISO_FORMAT[locale]) === null || _a === void 0 ? void 0 : _a.separator,
|
|
815
|
+
},
|
|
816
|
+
},
|
|
817
|
+
Input: {
|
|
818
|
+
styles: (_theme, _, { size }) => ({
|
|
819
|
+
input: {
|
|
820
|
+
border: `1px solid ${theme.colors.gray200}`,
|
|
821
|
+
transition: `all ${ANIMATION_DURATION} ease-in-out`,
|
|
822
|
+
['&:not(.mantine-Textarea-input)']: Object.assign({}, (() => {
|
|
823
|
+
switch (size) {
|
|
824
|
+
case 'lg':
|
|
825
|
+
return {
|
|
826
|
+
height: 48,
|
|
827
|
+
fontSize: 16,
|
|
828
|
+
minHeight: 'unset',
|
|
829
|
+
lineHeight: '24px',
|
|
830
|
+
};
|
|
831
|
+
case 'md':
|
|
832
|
+
return {
|
|
833
|
+
height: 40,
|
|
834
|
+
fontSize: 14,
|
|
835
|
+
lineHeight: '22px',
|
|
836
|
+
minHeight: 'unset',
|
|
837
|
+
};
|
|
838
|
+
case 'sm':
|
|
839
|
+
return {
|
|
840
|
+
height: 32,
|
|
841
|
+
fontSize: 14,
|
|
842
|
+
lineHeight: '22px',
|
|
843
|
+
minHeight: 'unset',
|
|
844
|
+
};
|
|
845
|
+
}
|
|
846
|
+
})()),
|
|
847
|
+
'&:hover': {
|
|
848
|
+
border: `1px solid ${_theme.primaryColor}`,
|
|
849
|
+
// boxShadow: `0 0 2px 2px ${theme.colors.primary200}`,
|
|
850
|
+
},
|
|
851
|
+
'&:focus': {
|
|
852
|
+
boxShadow: `0px 0px 0px 2px ${_theme.colors[_theme.primaryColor][2]}`,
|
|
853
|
+
},
|
|
854
|
+
},
|
|
855
|
+
'&[data-invalid="true"]': {
|
|
856
|
+
border: `1px solid ${theme.colors.red600}`,
|
|
857
|
+
color: '#000',
|
|
858
|
+
},
|
|
859
|
+
}),
|
|
860
|
+
},
|
|
861
|
+
});
|
|
862
|
+
};
|
|
863
|
+
|
|
864
|
+
const getGlobalRadioStyle = {
|
|
865
|
+
Radio: {
|
|
866
|
+
defaultProps: {
|
|
867
|
+
size: 'sm',
|
|
868
|
+
color: 'blue.6',
|
|
869
|
+
},
|
|
870
|
+
styles: {
|
|
871
|
+
radio: {
|
|
872
|
+
backgroundColor: 'transparent',
|
|
873
|
+
'&:checked': {
|
|
874
|
+
backgroundColor: 'transparent',
|
|
875
|
+
},
|
|
876
|
+
},
|
|
877
|
+
},
|
|
878
|
+
},
|
|
879
|
+
};
|
|
880
|
+
|
|
881
|
+
const themeColors = {
|
|
882
|
+
hb: [
|
|
883
|
+
'#e3f2ff',
|
|
884
|
+
'#bcdeff',
|
|
885
|
+
'#91caff',
|
|
886
|
+
'#65b5ff',
|
|
887
|
+
'#45a4ff',
|
|
888
|
+
'#2b94ff',
|
|
889
|
+
'#2d87f3',
|
|
890
|
+
'#2c74df',
|
|
891
|
+
'#2b62cd',
|
|
892
|
+
'#2743ad',
|
|
893
|
+
],
|
|
894
|
+
mb: [
|
|
895
|
+
'#FFE9F1',
|
|
896
|
+
'#F8CCDC',
|
|
897
|
+
'#F5B4CB',
|
|
898
|
+
'#F29CBA',
|
|
899
|
+
'#EE84AA',
|
|
900
|
+
'#EB6B99',
|
|
901
|
+
'#E85388',
|
|
902
|
+
'#D34C7C',
|
|
903
|
+
'#BE446F',
|
|
904
|
+
'#A93D63',
|
|
905
|
+
],
|
|
906
|
+
blue: [
|
|
907
|
+
'#e3f2ff',
|
|
908
|
+
'#bcdeff',
|
|
909
|
+
'#91caff',
|
|
910
|
+
'#65b5ff',
|
|
911
|
+
'#45a4ff',
|
|
912
|
+
'#2b94ff',
|
|
913
|
+
'#2d87f3',
|
|
914
|
+
'#2c74df',
|
|
915
|
+
'#2b62cd',
|
|
916
|
+
'#2743ad',
|
|
917
|
+
],
|
|
918
|
+
gray: [
|
|
919
|
+
'#fafafa',
|
|
920
|
+
'#f2f2f2',
|
|
921
|
+
'#d9d9d9',
|
|
922
|
+
'#bfbfbf',
|
|
923
|
+
'#8c8c8c',
|
|
924
|
+
'#737373',
|
|
925
|
+
'#595959',
|
|
926
|
+
'#404040',
|
|
927
|
+
'#262626',
|
|
928
|
+
'#1a1a1a',
|
|
929
|
+
],
|
|
930
|
+
delftGray: [
|
|
931
|
+
'#F3F3F3',
|
|
932
|
+
'#EAEAEC',
|
|
933
|
+
'#D9DAE2',
|
|
934
|
+
'#B9BAC8',
|
|
935
|
+
'#9898A9',
|
|
936
|
+
'#7C7C8F',
|
|
937
|
+
'#5A5A72',
|
|
938
|
+
'#3E3F58',
|
|
939
|
+
'#202135',
|
|
940
|
+
'#0C0C12',
|
|
941
|
+
],
|
|
942
|
+
neutral: [
|
|
943
|
+
'#f7f9fc',
|
|
944
|
+
'#e4e8ec',
|
|
945
|
+
'#d2d6dc',
|
|
946
|
+
'#bfc5cc',
|
|
947
|
+
'#adb3bc',
|
|
948
|
+
'#9aa2ac',
|
|
949
|
+
'#87909c',
|
|
950
|
+
'#757f8c',
|
|
951
|
+
'#626d7c',
|
|
952
|
+
'#545E6C',
|
|
953
|
+
],
|
|
954
|
+
green: [
|
|
955
|
+
'#e0f8ee',
|
|
956
|
+
'#b3eed5',
|
|
957
|
+
'#7ce2b9',
|
|
958
|
+
'#2ed69e',
|
|
959
|
+
'#00CB8A',
|
|
960
|
+
'#00C076',
|
|
961
|
+
'#00B16A',
|
|
962
|
+
'#009E5C',
|
|
963
|
+
'#008C50',
|
|
964
|
+
'#006C39',
|
|
965
|
+
],
|
|
966
|
+
pink: [
|
|
967
|
+
'#fff1f6',
|
|
968
|
+
'#fec7dc',
|
|
969
|
+
'#fec7dc',
|
|
970
|
+
'#fec2cf',
|
|
971
|
+
'#fe9dc2',
|
|
972
|
+
'#fd87b4',
|
|
973
|
+
'#fd72a7',
|
|
974
|
+
'#fc5d9a',
|
|
975
|
+
'#fc488d',
|
|
976
|
+
'#E92D74',
|
|
977
|
+
],
|
|
978
|
+
violet: [
|
|
979
|
+
'#F5EDFF',
|
|
980
|
+
'#E7D2F7',
|
|
981
|
+
'#D8B7F0',
|
|
982
|
+
'#CA9CE8',
|
|
983
|
+
'#BB82E1',
|
|
984
|
+
'#AD67D9',
|
|
985
|
+
'#9E4CD1',
|
|
986
|
+
'#9031CA',
|
|
987
|
+
'#8116C2',
|
|
988
|
+
'#63059D',
|
|
989
|
+
],
|
|
990
|
+
yellow: [
|
|
991
|
+
'#fff8e2',
|
|
992
|
+
'#ffecb6',
|
|
993
|
+
'#ffe187',
|
|
994
|
+
'#ffd658',
|
|
995
|
+
'#ffcb37',
|
|
996
|
+
'#ffc326',
|
|
997
|
+
'#ffb521',
|
|
998
|
+
'#fea21e',
|
|
999
|
+
'#fe921d',
|
|
1000
|
+
'#fc7419',
|
|
1001
|
+
],
|
|
1002
|
+
teal: [
|
|
1003
|
+
'#e0f7fc',
|
|
1004
|
+
'#b1ebf8',
|
|
1005
|
+
'#7ddff3',
|
|
1006
|
+
'#44d1ec',
|
|
1007
|
+
'#00c7e6',
|
|
1008
|
+
'#00bee0',
|
|
1009
|
+
'#00aecd',
|
|
1010
|
+
'#0099b2',
|
|
1011
|
+
'#008599',
|
|
1012
|
+
'#00626c',
|
|
1013
|
+
],
|
|
1014
|
+
indigol: [
|
|
1015
|
+
'#CEDDF0',
|
|
1016
|
+
'#ACC5E6',
|
|
1017
|
+
'#95B3DA',
|
|
1018
|
+
'#85A6CF',
|
|
1019
|
+
'#6D91BE',
|
|
1020
|
+
'#5F85B5',
|
|
1021
|
+
'#4C77AC',
|
|
1022
|
+
'#35639C',
|
|
1023
|
+
'#284A75',
|
|
1024
|
+
'#1B3250',
|
|
1025
|
+
],
|
|
1026
|
+
red: [
|
|
1027
|
+
'#fae9e8',
|
|
1028
|
+
'#feccbf',
|
|
1029
|
+
'#FEAA96',
|
|
1030
|
+
'#f44d2c',
|
|
1031
|
+
'#ff6f4d',
|
|
1032
|
+
'#ff5331',
|
|
1033
|
+
'#f44d2c',
|
|
1034
|
+
'#e64728',
|
|
1035
|
+
'#d84023',
|
|
1036
|
+
'#bf331b',
|
|
1037
|
+
],
|
|
1038
|
+
redViolet: [
|
|
1039
|
+
'#F3EAEB',
|
|
1040
|
+
'#E8D5D7',
|
|
1041
|
+
'#DDC1C4',
|
|
1042
|
+
'#D1ACB0',
|
|
1043
|
+
'#C5979C',
|
|
1044
|
+
'#BA8288',
|
|
1045
|
+
'#AF6D74',
|
|
1046
|
+
'#A35961',
|
|
1047
|
+
'#97444D',
|
|
1048
|
+
'#8C2F39',
|
|
1049
|
+
],
|
|
1050
|
+
};
|
|
1051
|
+
const getMantineThemeOverride = (locale, template = 'hb') => {
|
|
1052
|
+
return {
|
|
1053
|
+
defaultRadius: template === 'hb' ? 4 : 16,
|
|
1054
|
+
cursorType: 'pointer',
|
|
1055
|
+
colors: Object.assign(Object.assign(Object.assign({}, themeColors), theme.colors), { toneYellow: '#fff9eb', toneGreen: '#f2fcf7', toneBlue: '#e0e9fb', tonePink: '#ffeaf1' }),
|
|
1056
|
+
primaryColor: template,
|
|
1057
|
+
primaryShade: 6,
|
|
1058
|
+
fontFamily: (locale === LOCALE.Cambodia
|
|
1059
|
+
? 'Battambang'
|
|
1060
|
+
: locale === LOCALE.Thailand
|
|
1061
|
+
? 'Noto Sans Thai'
|
|
1062
|
+
: 'Inter') +
|
|
1063
|
+
`, -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif`,
|
|
1064
|
+
breakpoints: {
|
|
1065
|
+
xs: em(Breakpoints.BREAK_POINT_SMALL_MOBILE),
|
|
1066
|
+
sm: em(Breakpoints.BREAK_POINT_MOBILE),
|
|
1067
|
+
md: em(Breakpoints.BREAK_POINT_TABLET),
|
|
1068
|
+
lg: em(Breakpoints.BREAK_POINT_PC),
|
|
1069
|
+
xl: em(Breakpoints.BREAK_POINT_LGPC),
|
|
1070
|
+
},
|
|
1071
|
+
components: Object.assign(Object.assign(Object.assign(Object.assign({}, GlobalInputStyle(locale)), getGlobalRadioStyle), GlobalButtonStyle), GlobalHeadingStyle),
|
|
1072
|
+
other: {
|
|
1073
|
+
template,
|
|
1074
|
+
defaultImage: CommonGAssets.getAssetPath(template === 'mb' ? 'default-image-mb.jpg' : 'default-image.jpg'),
|
|
1075
|
+
},
|
|
1076
|
+
};
|
|
1077
|
+
};
|
|
1078
|
+
|
|
1079
|
+
const _Breadcrumbs = (_a) => {
|
|
1080
|
+
var _b;
|
|
1081
|
+
var { children, showHomeIcon = true, homeIconHref = '/' } = _a, rest = __rest(_a, ["children", "showHomeIcon", "homeIconHref"]);
|
|
1082
|
+
const theme = useMantineTheme();
|
|
1083
|
+
const isMarryBaby = ((_b = theme === null || theme === void 0 ? void 0 : theme.other) === null || _b === void 0 ? void 0 : _b.template) === 'mb';
|
|
1084
|
+
const [embla, setEmbla] = useState(null);
|
|
1085
|
+
const { isMobile } = useScreenSize();
|
|
1086
|
+
const [, setShouldAllowClick] = useState(true);
|
|
1087
|
+
const handleScroll = useCallback(() => {
|
|
1088
|
+
setShouldAllowClick(false);
|
|
1089
|
+
}, []);
|
|
1090
|
+
const handlePointerUp = useCallback(() => {
|
|
1091
|
+
setTimeout(() => {
|
|
1092
|
+
setShouldAllowClick(true);
|
|
1093
|
+
}, 1000);
|
|
1094
|
+
}, []);
|
|
1095
|
+
useEffect(() => {
|
|
1096
|
+
if (embla) {
|
|
1097
|
+
embla.on('scroll', handleScroll);
|
|
1098
|
+
embla.on('pointerUp', handlePointerUp);
|
|
1099
|
+
}
|
|
1100
|
+
return () => {
|
|
1101
|
+
if (embla) {
|
|
1102
|
+
embla.off('scroll', handleScroll);
|
|
1103
|
+
embla.on('pointerUp', handlePointerUp);
|
|
1104
|
+
}
|
|
1105
|
+
};
|
|
1106
|
+
}, [embla, handleScroll, handlePointerUp]);
|
|
1107
|
+
return (React__default.createElement(StyledCarousel, Object.assign({ align: "center", slideGap: "xs", dragFree: true, draggable: isMobile, slideSize: "0", getEmblaApi: setEmbla, controlsOffset: -52, previousControlIcon: React__default.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" },
|
|
1108
|
+
React__default.createElement("path", { d: "M6.86589 3.56104C7.03647 3.56104 7.20724 3.62732 7.33724 3.75765L7.39453 3.81494C7.6552 4.07561 7.6552 4.49765 7.39453 4.75765L4.81901 7.33317L13.5326 7.33317C13.9006 7.33317 14.1992 7.63184 14.1992 7.99984C14.1992 8.36784 13.9006 8.6665 13.5326 8.6665L4.81901 8.66651L7.39453 11.242C7.6552 11.5027 7.6552 11.9247 7.39453 12.1847L7.33724 12.242C7.07657 12.5027 6.65453 12.5027 6.39453 12.242L2.6237 8.47119C2.36303 8.21053 2.36303 7.78849 2.6237 7.52849L6.39453 3.75765C6.52487 3.62732 6.6953 3.56104 6.86589 3.56104Z", fill: "#595959" })), nextControlIcon: React__default.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" },
|
|
1109
|
+
React__default.createElement("path", { d: "M9.13411 12.439C8.96353 12.439 8.79276 12.3727 8.66276 12.2423L8.60547 12.1851C8.3448 11.9244 8.3448 11.5023 8.60547 11.2423L11.181 8.66683L2.46745 8.66683C2.09945 8.66683 1.80078 8.36816 1.80078 8.00016C1.80078 7.63216 2.09945 7.3335 2.46745 7.3335L11.181 7.3335L8.60547 4.75797C8.3448 4.49731 8.3448 4.07527 8.60547 3.81527L8.66276 3.75797C8.92343 3.49731 9.34547 3.49731 9.60547 3.75797L13.3763 7.52881C13.637 7.78947 13.637 8.21152 13.3763 8.47152L9.60547 12.2423C9.47513 12.3727 9.3047 12.439 9.13411 12.439Z", fill: "#595959" })) }, rest),
|
|
1110
|
+
showHomeIcon && (React__default.createElement(Carousel.Slide, { style: { borderRight: `1px solid ${themeColors.neutral[1]}` } },
|
|
1111
|
+
React__default.createElement(BreadcrumbItem, { href: homeIconHref, target: "_blank", className: "pointer-event-child-none" },
|
|
1112
|
+
React__default.createElement(Box, { sx: Object.assign({}, (!isMarryBaby && {
|
|
1113
|
+
borderRadius: '50%',
|
|
1114
|
+
display: 'flex',
|
|
1115
|
+
justifyContent: 'center',
|
|
1116
|
+
alignItems: 'center',
|
|
1117
|
+
})), bg: !isMarryBaby && themeColors.neutral[0], p: !isMarryBaby ? 6 : 0 },
|
|
1118
|
+
React__default.createElement(AspectRatio, { ratio: 1, w: 18 }, isMarryBaby ? (React__default.createElement("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" },
|
|
1119
|
+
React__default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M14.1183 3.67722C12.8727 2.70772 11.1281 2.708 9.88187 3.67718L14.1183 3.67722ZM14.1183 3.67722L19.718 8.03283C20.5589 8.68632 21.05 9.69173 21.05 10.7562V17.6002C21.05 19.5057 19.5055 21.0502 17.6 21.0502H6.40016C4.49466 21.0502 2.9502 19.5057 2.9502 17.6002V10.7562C2.9502 9.69163 3.44113 8.68632 4.28216 8.03283L9.88187 3.67718M10.6799 4.70339L5.08006 9.05916C4.55657 9.46592 4.2502 10.0923 4.2502 10.7562V17.6002C4.2502 18.7878 5.21263 19.7502 6.40016 19.7502H17.6C18.7875 19.7502 19.75 18.7878 19.75 17.6002V10.7562C19.75 10.0923 19.4438 9.46612 18.9204 9.05936L13.3202 4.70335C12.5443 4.09941 11.4571 4.09905 10.6799 4.70339Z", fill: "#3E3F58" }),
|
|
1120
|
+
React__default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M13.2373 13.1626C12.5546 12.4794 11.4466 12.4791 10.7629 13.1628C10.0793 13.8464 10.0793 14.9538 10.7629 15.6374C11.4465 16.321 12.5539 16.321 13.2375 15.6374C13.9211 14.9538 13.9211 13.8464 13.2375 13.1628L13.2373 13.1626ZM14.1567 12.2436C12.9661 11.0521 11.0348 11.0525 9.84366 12.2436C8.65237 13.4348 8.65237 15.3653 9.84366 16.5566C11.0349 17.7479 12.9654 17.7479 14.1567 16.5566C15.348 15.3653 15.348 13.4348 14.1567 12.2436Z", fill: "#3E3F58" }))) : (React__default.createElement("svg", { width: "18", height: "18", viewBox: "0 0 18 18", fill: "none" },
|
|
1121
|
+
React__default.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M2.58691 5.59863L8.58691 1.62305C8.83594 1.45898 9.16406 1.45898 9.41309 1.62305L15.4131 5.59863C15.624 5.73926 15.75 5.97363 15.75 6.22559V14.25C15.75 15.0791 15.0791 15.75 14.25 15.75H3.75C2.9209 15.75 2.25 15.0791 2.25 14.25V6.22559C2.25 5.97363 2.37598 5.73926 2.58691 5.59863ZM5.5017 11.7602C5.1717 11.5108 5.17316 11.0321 5.46521 10.7391C5.75775 10.4456 6.24936 10.4292 6.5986 10.6522C7.17818 11.0223 8.12516 11.4889 9.21628 11.4889C10.3074 11.4889 11.2543 11.0223 11.8339 10.6522C12.1832 10.4292 12.6748 10.4456 12.9673 10.7391C13.2594 11.0321 13.2608 11.5108 12.9308 11.7602C11.8743 12.5589 10.535 12.9889 9.21628 12.9889C7.89758 12.9889 6.55824 12.5589 5.5017 11.7602Z", fill: "#595959" })))))))),
|
|
1122
|
+
React__default.createElement(Carousel.Slide, null),
|
|
1123
|
+
React__default.createElement(Carousel.Slide, null,
|
|
1124
|
+
React__default.createElement(Breadcrumbs$1, { styles: {
|
|
1125
|
+
separator: {
|
|
1126
|
+
marginInline: 4,
|
|
1127
|
+
},
|
|
1128
|
+
}, separator: React__default.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" },
|
|
1129
|
+
React__default.createElement("path", { d: "M8.71527 7.99969L6.16794 5.45236C5.89194 5.17636 5.89194 4.72836 6.16794 4.45236C6.44394 4.17636 6.89194 4.17636 7.16794 4.45236L10.2439 7.52836C10.5046 7.78903 10.5046 8.21103 10.2439 8.47103L7.16794 11.547C6.89194 11.823 6.44394 11.823 6.16794 11.547C5.89194 11.271 5.89194 10.823 6.16794 10.547L8.71527 7.99969Z", fill: "#8C8C8C" })) }, children))));
|
|
1130
|
+
};
|
|
1131
|
+
const Breadcrumbs = _Breadcrumbs;
|
|
1132
|
+
Breadcrumbs.Item = BreadcrumbItem;
|
|
1133
|
+
|
|
1134
|
+
const StyledTextArea = styled(Textarea) `
|
|
1135
|
+
.mantine-Textarea-input {
|
|
1136
|
+
padding: 12px 16px;
|
|
1137
|
+
background: #ffffff;
|
|
1138
|
+
border: 1px solid ${theme.colors.gray200};
|
|
1139
|
+
border-radius: 4px;
|
|
1140
|
+
}
|
|
1141
|
+
`;
|
|
1142
|
+
|
|
1143
|
+
var useStyles$2 = createStyles((theme) => {
|
|
1144
|
+
return {
|
|
1145
|
+
root: {},
|
|
1146
|
+
inner: {},
|
|
1147
|
+
content: {
|
|
1148
|
+
padding: 0,
|
|
1149
|
+
},
|
|
1150
|
+
header: {
|
|
1151
|
+
borderBottom: `1px solid ${theme.colors.neutral[1]}`,
|
|
1152
|
+
marginRight: 0,
|
|
1153
|
+
marginBottom: 0,
|
|
1154
|
+
padding: '1rem',
|
|
1155
|
+
},
|
|
1156
|
+
overlay: {},
|
|
1157
|
+
title: {
|
|
1158
|
+
width: '100%',
|
|
1159
|
+
display: 'flex',
|
|
1160
|
+
alignItems: 'center',
|
|
1161
|
+
justifyContent: 'space-between',
|
|
1162
|
+
marginRight: 0,
|
|
1163
|
+
},
|
|
1164
|
+
body: {},
|
|
1165
|
+
close: {
|
|
1166
|
+
cursor: 'pointer',
|
|
1167
|
+
width: '24px',
|
|
1168
|
+
height: '24px',
|
|
1169
|
+
},
|
|
1170
|
+
};
|
|
1171
|
+
});
|
|
1172
|
+
|
|
1173
|
+
const StyledAccordion = styled(Accordion$1) `
|
|
1174
|
+
.mantine-Accordion-label {
|
|
1175
|
+
padding: 0;
|
|
1176
|
+
}
|
|
1177
|
+
.mantine-Accordion-control {
|
|
1178
|
+
&:hover {
|
|
1179
|
+
background-color: transparent;
|
|
1180
|
+
}
|
|
1181
|
+
}
|
|
1182
|
+
.mantine-Accordion-item {
|
|
1183
|
+
.mantine-Accordion-chevron {
|
|
1184
|
+
> div {
|
|
1185
|
+
background-repeat: no-repeat;
|
|
1186
|
+
width: 16px;
|
|
1187
|
+
height: 16px;
|
|
1188
|
+
background-position: center;
|
|
1189
|
+
background-image: url(${(props) => props.closeChevron || CommonGAssets.getAssetPath('plus-icon.svg')});
|
|
1190
|
+
}
|
|
1191
|
+
}
|
|
1192
|
+
&[data-active='true'] {
|
|
1193
|
+
.mantine-Accordion-chevron {
|
|
1194
|
+
> div {
|
|
1195
|
+
background-image: url(${(props) => props.openChevron || CommonGAssets.getAssetPath('minus-icon.svg')});
|
|
1196
|
+
}
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
.mantine-Accordion-panel {
|
|
1201
|
+
border-radius: ${theme.borderRadius};
|
|
1202
|
+
}
|
|
1203
|
+
.mantine-Accordion-content {
|
|
1204
|
+
white-space: pre-wrap;
|
|
1205
|
+
}
|
|
1206
|
+
`;
|
|
1207
|
+
|
|
1208
|
+
const _Accordion = (_a) => {
|
|
1209
|
+
var { children } = _a, rest = __rest(_a, ["children"]);
|
|
1210
|
+
return (React__default.createElement(StyledAccordion, Object.assign({ chevron: React__default.createElement("div", null), disableChevronRotation: true, transitionDuration: 300 }, rest), children));
|
|
1211
|
+
};
|
|
1212
|
+
const Accordion = _Accordion;
|
|
1213
|
+
Accordion.Control = Accordion$1.Control;
|
|
1214
|
+
Accordion.Item = Accordion$1.Item;
|
|
1215
|
+
Accordion.Panel = Accordion$1.Panel;
|
|
1216
|
+
|
|
1217
|
+
const DEFAULT_AVATAR = CommonGAssets.getAssetPath('avatar.jpg');
|
|
1218
|
+
const Avatar = (_a) => {
|
|
1219
|
+
var { withIndicator = false, indicatorConfig = null, size = 56, children, styles, placeholderText } = _a, // usually first letter of name
|
|
1220
|
+
avatarProps = __rest(_a, ["withIndicator", "indicatorConfig", "size", "children", "styles", "placeholderText"]);
|
|
1221
|
+
const generateAvatar = () => {
|
|
1222
|
+
return (React__default.createElement(Avatar$1, Object.assign({ size: size, radius: "xl" }, avatarProps, { imageProps: Object.assign({ loading: 'lazy' }, avatarProps.imageProps), styles: {
|
|
1223
|
+
placeholder: {
|
|
1224
|
+
backgroundColor: avatarProps.color,
|
|
1225
|
+
color: 'white',
|
|
1226
|
+
},
|
|
1227
|
+
} }), children ? (children) : placeholderText ? (placeholderText) : (React__default.createElement(ImageWrap, { src: DEFAULT_AVATAR, width: size, alt: avatarProps.alt || 'avatar' }))));
|
|
1228
|
+
};
|
|
1229
|
+
if (withIndicator)
|
|
1230
|
+
return (React__default.createElement(Indicator, Object.assign({ inline: true, position: "bottom-end", offset: 9 }, indicatorConfig, { styles: Object.assign({ indicator: {
|
|
1231
|
+
backgroundColor: React__default.isValidElement(indicatorConfig.label) && 'transparent',
|
|
1232
|
+
zIndex: 1,
|
|
1233
|
+
} }, styles) }), generateAvatar()));
|
|
1234
|
+
return generateAvatar();
|
|
1235
|
+
};
|
|
1236
|
+
|
|
1237
|
+
const FileInput = (props) => {
|
|
1238
|
+
return React__default.createElement(FileInput$1, Object.assign({ size: "md" }, props));
|
|
1239
|
+
};
|
|
1240
|
+
|
|
1241
|
+
const DEBOUNCED_TIME = 300;
|
|
1242
|
+
const emotionCache = createEmotionCache({
|
|
1243
|
+
key: 'mantine',
|
|
1244
|
+
prepend: false,
|
|
1245
|
+
});
|
|
1246
|
+
|
|
1247
|
+
const NumberInput = (_a) => {
|
|
1248
|
+
var { value: _value, onChange: _onChange } = _a, props = __rest(_a, ["value", "onChange"]);
|
|
1249
|
+
const [value, setValue] = useState(_value);
|
|
1250
|
+
const [debounced] = useDebouncedValue(value, DEBOUNCED_TIME);
|
|
1251
|
+
useEffect(() => {
|
|
1252
|
+
_onChange === null || _onChange === void 0 ? void 0 : _onChange(debounced);
|
|
1253
|
+
}, [debounced]);
|
|
1254
|
+
useEffect(() => {
|
|
1255
|
+
setValue(_value);
|
|
1256
|
+
}, [_value]);
|
|
1257
|
+
return (React__default.createElement(NumberInput$1, Object.assign({ size: "md", stepHoldDelay: 500, stepHoldInterval: (t) => Math.max(1000 / Math.pow(t, 2), 25), onChange: setValue, hideControls: true, min: 0, formatter: (value) => {
|
|
1258
|
+
if (Number(value) === 0)
|
|
1259
|
+
return value;
|
|
1260
|
+
return value || '';
|
|
1261
|
+
}, removeTrailingZeros: true, value: value }, props)));
|
|
1262
|
+
};
|
|
1263
|
+
|
|
1264
|
+
const EyeVisible = CommonGAssets.getAssetPath('EyeVisible.svg');
|
|
1265
|
+
const EyeHidden = CommonGAssets.getAssetPath('EyeHidden.svg');
|
|
1266
|
+
const PasswordInput = forwardRef((props, ref) => {
|
|
1267
|
+
const { size = 'md', visibilityToggleIcon: visibilityToggleIconProps } = props, restProps = __rest(props, ["size", "visibilityToggleIcon"]);
|
|
1268
|
+
const visibilityToggleIcon = visibilityToggleIconProps ||
|
|
1269
|
+
(({ reveal, size }) => reveal ? (React__default.createElement("img", { src: EyeVisible, width: size, loading: "lazy" })) : (React__default.createElement("img", { src: EyeHidden, width: size, loading: "lazy" })));
|
|
1270
|
+
return (React__default.createElement(PasswordInput$1, Object.assign({ ref: ref, size: size, visibilityToggleIcon: visibilityToggleIcon }, restProps, { className: `input-control ${(restProps === null || restProps === void 0 ? void 0 : restProps.className) || ''}` })));
|
|
1271
|
+
});
|
|
1272
|
+
|
|
1273
|
+
const InputWrapper = forwardRef((_a, ref) => {
|
|
1274
|
+
var { value: _value, onChange: _onChange, onChangeRaw, maxLength } = _a, props = __rest(_a, ["value", "onChange", "onChangeRaw", "maxLength"]);
|
|
1275
|
+
const [value, setValue] = useState(_value || '');
|
|
1276
|
+
const [debounced] = useDebouncedValue(value, DEBOUNCED_TIME);
|
|
1277
|
+
useEffect(() => {
|
|
1278
|
+
_onChange === null || _onChange === void 0 ? void 0 : _onChange(debounced);
|
|
1279
|
+
}, [debounced]);
|
|
1280
|
+
useEffect(() => {
|
|
1281
|
+
setValue(_value);
|
|
1282
|
+
}, [_value]);
|
|
1283
|
+
return (React__default.createElement(TextInput, Object.assign({ ref: ref, size: "md", onChange: (event) => {
|
|
1284
|
+
if (typeof maxLength === 'number' &&
|
|
1285
|
+
event.currentTarget.value.length > maxLength) {
|
|
1286
|
+
return;
|
|
1287
|
+
}
|
|
1288
|
+
onChangeRaw === null || onChangeRaw === void 0 ? void 0 : onChangeRaw(event);
|
|
1289
|
+
setValue(event.currentTarget.value);
|
|
1290
|
+
}, value: value }, props, { maxLength: maxLength, className: `input-control ${(props === null || props === void 0 ? void 0 : props.className) || ''}` })));
|
|
1291
|
+
});
|
|
1292
|
+
const Input = InputWrapper;
|
|
1293
|
+
Input.File = FileInput;
|
|
1294
|
+
Input.Password = PasswordInput;
|
|
1295
|
+
Input.Number = NumberInput;
|
|
1296
|
+
Input.Wrapper = Input$1.Wrapper;
|
|
1297
|
+
|
|
1298
|
+
const StyledSlide = Carousel$1.Slide;
|
|
1299
|
+
|
|
1300
|
+
const SlideContext = createContext({});
|
|
1301
|
+
const CustomSlide = (_a) => {
|
|
1302
|
+
var { children, onClick, innerSlideProps } = _a, rest = __rest(_a, ["children", "onClick", "innerSlideProps"]);
|
|
1303
|
+
const { slider, selectSlideWhenClick } = useContext(SlideContext);
|
|
1304
|
+
const ref = useRef();
|
|
1305
|
+
const key = useRef('');
|
|
1306
|
+
const [index, setIndex] = useState(0);
|
|
1307
|
+
useEffect(() => {
|
|
1308
|
+
key.current = String(Math.round(Math.random() * 10000));
|
|
1309
|
+
}, []);
|
|
1310
|
+
useEffect(() => {
|
|
1311
|
+
const slidesNode = (slider === null || slider === void 0 ? void 0 : slider.slideNodes()) || [];
|
|
1312
|
+
setIndex(slidesNode.findIndex((obj) => obj.dataset.key === key.current));
|
|
1313
|
+
}, [slider]);
|
|
1314
|
+
const sliderProps = {
|
|
1315
|
+
ref,
|
|
1316
|
+
'data-key': key.current,
|
|
1317
|
+
'data-index': index,
|
|
1318
|
+
};
|
|
1319
|
+
return (React__default.createElement(StyledSlide, Object.assign({}, sliderProps, rest),
|
|
1320
|
+
React__default.createElement("div", Object.assign({ style: {
|
|
1321
|
+
height: '100%',
|
|
1322
|
+
}, onClick: () => {
|
|
1323
|
+
selectSlideWhenClick && (slider === null || slider === void 0 ? void 0 : slider.scrollTo(index));
|
|
1324
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(index);
|
|
1325
|
+
} }, innerSlideProps), children)));
|
|
1326
|
+
};
|
|
1327
|
+
const findIndexFromLeftSide = (position, slideLength) => {
|
|
1328
|
+
return position >= slideLength ? position - slideLength : position;
|
|
1329
|
+
};
|
|
1330
|
+
const findIndexFromRight = (position, slideLength) => {
|
|
1331
|
+
return position < 0 ? slideLength + position : position;
|
|
1332
|
+
};
|
|
1333
|
+
const CarouselWrapper = (_a) => {
|
|
1334
|
+
var { children, blurFromCenter, blurFromIndex, blurLength = 3, maxBlurOpacity = 0.5, onSlideChange, selectSlideWhenClick } = _a, props = __rest(_a, ["children", "blurFromCenter", "blurFromIndex", "blurLength", "maxBlurOpacity", "onSlideChange", "selectSlideWhenClick"]);
|
|
1335
|
+
const { width } = useViewportSize();
|
|
1336
|
+
const [ref] = useResizeObserver();
|
|
1337
|
+
const slider = useRef(null);
|
|
1338
|
+
const [centerSlide, setCenterSlide] = useState(0);
|
|
1339
|
+
const handleStyle = () => {
|
|
1340
|
+
var _a, _b, _c, _d, _e;
|
|
1341
|
+
const slidesNode = ((_a = slider === null || slider === void 0 ? void 0 : slider.current) === null || _a === void 0 ? void 0 : _a.slideNodes()) || [];
|
|
1342
|
+
if (((_b = slider === null || slider === void 0 ? void 0 : slider.current) === null || _b === void 0 ? void 0 : _b.slideNodes().length) <=
|
|
1343
|
+
((_c = slider === null || slider === void 0 ? void 0 : slider.current) === null || _c === void 0 ? void 0 : _c.slidesInView().length)) {
|
|
1344
|
+
slidesNode.map((item) => {
|
|
1345
|
+
item.classList.remove('center-slide');
|
|
1346
|
+
item.style.opacity = '1';
|
|
1347
|
+
});
|
|
1348
|
+
return false;
|
|
1349
|
+
}
|
|
1350
|
+
const centerSlideIndex = (_d = slider === null || slider === void 0 ? void 0 : slider.current) === null || _d === void 0 ? void 0 : _d.selectedScrollSnap();
|
|
1351
|
+
setCenterSlide(centerSlideIndex);
|
|
1352
|
+
const slidesNodeLength = slidesNode.length;
|
|
1353
|
+
const slidesInView = (_e = slider === null || slider === void 0 ? void 0 : slider.current) === null || _e === void 0 ? void 0 : _e.slidesInView();
|
|
1354
|
+
const slidesInViewLength = slidesInView.length;
|
|
1355
|
+
const halfSideLength = Math.floor(slidesInViewLength / 2);
|
|
1356
|
+
const halfSideBlurLength = blurFromCenter
|
|
1357
|
+
? blurFromIndex + blurLength - 1
|
|
1358
|
+
: halfSideLength;
|
|
1359
|
+
const lastRightBlurIndexTmp = centerSlideIndex + halfSideBlurLength;
|
|
1360
|
+
const lastRightBlurIndex = lastRightBlurIndexTmp === slidesNodeLength
|
|
1361
|
+
? 0
|
|
1362
|
+
: lastRightBlurIndexTmp > slidesNodeLength
|
|
1363
|
+
? lastRightBlurIndexTmp - slidesNodeLength
|
|
1364
|
+
: lastRightBlurIndexTmp;
|
|
1365
|
+
const lastLeftBlurIndexTmp = centerSlideIndex - halfSideBlurLength;
|
|
1366
|
+
const lastLeftBlurIndex = lastLeftBlurIndexTmp < 0
|
|
1367
|
+
? slidesNodeLength + lastLeftBlurIndexTmp
|
|
1368
|
+
: lastLeftBlurIndexTmp > 0
|
|
1369
|
+
? centerSlideIndex - halfSideBlurLength
|
|
1370
|
+
: 0;
|
|
1371
|
+
const visibleSlide = [
|
|
1372
|
+
...new Set(Array(halfSideBlurLength * 2 + 1)
|
|
1373
|
+
.fill('')
|
|
1374
|
+
.map((i, idx) => {
|
|
1375
|
+
const findFrom = lastLeftBlurIndex;
|
|
1376
|
+
return findIndexFromLeftSide(findFrom + idx, slidesNodeLength);
|
|
1377
|
+
})),
|
|
1378
|
+
];
|
|
1379
|
+
slidesNode.map((item, index) => {
|
|
1380
|
+
if (index === centerSlideIndex) {
|
|
1381
|
+
item.classList.add('center-slide');
|
|
1382
|
+
}
|
|
1383
|
+
else {
|
|
1384
|
+
item.classList.remove('center-slide');
|
|
1385
|
+
}
|
|
1386
|
+
if (visibleSlide.indexOf(index) !== -1) {
|
|
1387
|
+
const opacityGap = maxBlurOpacity / blurLength;
|
|
1388
|
+
for (let i = 0; i < blurLength; i++) {
|
|
1389
|
+
if (index ===
|
|
1390
|
+
findIndexFromLeftSide(lastLeftBlurIndex + i, slidesNodeLength) ||
|
|
1391
|
+
index ===
|
|
1392
|
+
findIndexFromRight(lastRightBlurIndex - i, slidesNodeLength)) {
|
|
1393
|
+
item.style.opacity = String((i + 1) * opacityGap);
|
|
1394
|
+
break;
|
|
1395
|
+
}
|
|
1396
|
+
item.style.opacity = '1';
|
|
1397
|
+
}
|
|
1398
|
+
}
|
|
1399
|
+
else {
|
|
1400
|
+
item.style.opacity = '0';
|
|
1401
|
+
}
|
|
1402
|
+
});
|
|
1403
|
+
};
|
|
1404
|
+
const sliderProps = {
|
|
1405
|
+
getEmblaApi: (embla) => {
|
|
1406
|
+
slider.current = embla;
|
|
1407
|
+
},
|
|
1408
|
+
onSlideChange: (index) => {
|
|
1409
|
+
handleStyle();
|
|
1410
|
+
onSlideChange === null || onSlideChange === void 0 ? void 0 : onSlideChange(index);
|
|
1411
|
+
},
|
|
1412
|
+
};
|
|
1413
|
+
useEffect(() => {
|
|
1414
|
+
(slider === null || slider === void 0 ? void 0 : slider.current) && handleStyle();
|
|
1415
|
+
}, [width]);
|
|
1416
|
+
const useStyles = createStyles(() => {
|
|
1417
|
+
var _a, _b;
|
|
1418
|
+
return ({
|
|
1419
|
+
control: Object.assign({}, (((_a = slider === null || slider === void 0 ? void 0 : slider.current) === null || _a === void 0 ? void 0 : _a.slideNodes().length) <=
|
|
1420
|
+
((_b = slider === null || slider === void 0 ? void 0 : slider.current) === null || _b === void 0 ? void 0 : _b.slidesInView().length) && {
|
|
1421
|
+
display: 'none',
|
|
1422
|
+
})),
|
|
1423
|
+
});
|
|
1424
|
+
});
|
|
1425
|
+
const { classes } = useStyles();
|
|
1426
|
+
return (React__default.createElement(SlideContext.Provider, { value: { slider: slider === null || slider === void 0 ? void 0 : slider.current, centerSlide, selectSlideWhenClick } },
|
|
1427
|
+
React__default.createElement(Carousel$1, Object.assign({ classNames: {
|
|
1428
|
+
control: classes.control,
|
|
1429
|
+
}, ref: ref, slideSize: 'auto', containScroll: "trimSnaps" }, sliderProps, props, { loop: true }), typeof children === 'function' ? children(centerSlide) : children)));
|
|
1430
|
+
};
|
|
1431
|
+
const CentralCarousel = CarouselWrapper;
|
|
1432
|
+
CentralCarousel.Slide = CustomSlide;
|
|
1433
|
+
|
|
1434
|
+
const CheckboxWrapper = (_a) => {
|
|
1435
|
+
var { styles, color = 'blue' } = _a, props = __rest(_a, ["styles", "color"]);
|
|
1436
|
+
const theme = useMantineTheme();
|
|
1437
|
+
const hexColor = useMemo(() => {
|
|
1438
|
+
var _a, _b;
|
|
1439
|
+
return ((color === null || color === void 0 ? void 0 : color.includes('.'))
|
|
1440
|
+
? (_a = theme.colors[color.split('.')[0]]) === null || _a === void 0 ? void 0 : _a[color.split('.')[1]]
|
|
1441
|
+
: (_b = theme.colors[color]) === null || _b === void 0 ? void 0 : _b[theme.primaryShade || 6]) ||
|
|
1442
|
+
theme.colors.blue[6];
|
|
1443
|
+
}, [color]);
|
|
1444
|
+
return (React__default.createElement(Checkbox$1, Object.assign({ styles: Object.assign({ input: {
|
|
1445
|
+
'&:hover': {
|
|
1446
|
+
border: `1px solid ${hexColor}`,
|
|
1447
|
+
},
|
|
1448
|
+
} }, styles), color: color }, props)));
|
|
1449
|
+
};
|
|
1450
|
+
const Checkbox = CheckboxWrapper;
|
|
1451
|
+
Checkbox.Group = Checkbox$1.Group;
|
|
1452
|
+
|
|
1453
|
+
const StyledSlider = styled(Slider) `
|
|
1454
|
+
${(props) => {
|
|
1455
|
+
const color = props.color || theme.colors.primaryBase;
|
|
1456
|
+
return `
|
|
1457
|
+
.mantine-Slider-bar {
|
|
1458
|
+
background-color: ${color};
|
|
1459
|
+
}
|
|
1460
|
+
.mantine-Slider-thumb {
|
|
1461
|
+
border-color: ${color};
|
|
1462
|
+
color: ${color};
|
|
1463
|
+
}
|
|
1464
|
+
`;
|
|
1465
|
+
}}
|
|
1466
|
+
[data-theme='marryBaby'] & {
|
|
1467
|
+
${(props) => {
|
|
1468
|
+
const color = props.color || theme.mbColors.pink;
|
|
1469
|
+
return `
|
|
1470
|
+
.mantine-Slider-bar {
|
|
1471
|
+
background-color: ${color};
|
|
1472
|
+
}
|
|
1473
|
+
.mantine-Slider-thumb {
|
|
1474
|
+
border-color: ${color};
|
|
1475
|
+
color: ${color};
|
|
1476
|
+
}
|
|
1477
|
+
`;
|
|
1478
|
+
}}
|
|
1479
|
+
}
|
|
1480
|
+
|
|
1481
|
+
.mantine-Slider-label {
|
|
1482
|
+
background-color: transparent;
|
|
1483
|
+
color: #000;
|
|
1484
|
+
font-size: 14px;
|
|
1485
|
+
font-weight: bold;
|
|
1486
|
+
}
|
|
1487
|
+
`;
|
|
1488
|
+
const StyledSliderWrapper = styled.div `
|
|
1489
|
+
display: flex;
|
|
1490
|
+
align-items: center;
|
|
1491
|
+
.hhg-mantine-slider {
|
|
1492
|
+
flex-grow: 1;
|
|
1493
|
+
}
|
|
1494
|
+
button {
|
|
1495
|
+
path:not([stroke]) {
|
|
1496
|
+
stroke: ${theme.colors.primaryBase};
|
|
1497
|
+
}
|
|
1498
|
+
}
|
|
1499
|
+
[data-theme='marryBaby'] & {
|
|
1500
|
+
button {
|
|
1501
|
+
path:not([stroke]) {
|
|
1502
|
+
stroke: ${theme.mbColors.pink};
|
|
1503
|
+
}
|
|
1504
|
+
}
|
|
1505
|
+
}
|
|
1506
|
+
`;
|
|
1507
|
+
|
|
1508
|
+
const RadioWrapper = (_a) => {
|
|
1509
|
+
var { styles, color = 'blue' } = _a, props = __rest(_a, ["styles", "color"]);
|
|
1510
|
+
const theme = useMantineTheme();
|
|
1511
|
+
const hexColor = useMemo(() => {
|
|
1512
|
+
var _a, _b;
|
|
1513
|
+
return ((color === null || color === void 0 ? void 0 : color.includes('.'))
|
|
1514
|
+
? (_a = theme.colors[color.split('.')[0]]) === null || _a === void 0 ? void 0 : _a[color.split('.')[1]]
|
|
1515
|
+
: (_b = theme.colors[color]) === null || _b === void 0 ? void 0 : _b[theme.primaryShade || 6]) ||
|
|
1516
|
+
theme.colors.blue[6];
|
|
1517
|
+
}, [color]);
|
|
1518
|
+
return (React__default.createElement(Radio$1, Object.assign({ styles: Object.assign({ radio: {
|
|
1519
|
+
'&:hover': {
|
|
1520
|
+
border: `1px solid ${hexColor}`,
|
|
1521
|
+
},
|
|
1522
|
+
}, icon: {
|
|
1523
|
+
color: `${hexColor}`,
|
|
1524
|
+
} }, styles), color: color }, props)));
|
|
1525
|
+
};
|
|
1526
|
+
const Radio = RadioWrapper;
|
|
1527
|
+
Radio.Group = Radio$1.Group;
|
|
1528
|
+
|
|
1529
|
+
function transferValueToOtp(value, valueLength = 6) {
|
|
1530
|
+
const otp = new Array(valueLength).fill('');
|
|
1531
|
+
if (value) {
|
|
1532
|
+
const arr = value.toString().split('');
|
|
1533
|
+
otp.map((_, index) => {
|
|
1534
|
+
if (arr[index]) {
|
|
1535
|
+
otp[index] = arr[index] || '';
|
|
1536
|
+
}
|
|
1537
|
+
});
|
|
1538
|
+
}
|
|
1539
|
+
return otp;
|
|
1540
|
+
}
|
|
1541
|
+
function transferOtpToValue(otp) {
|
|
1542
|
+
return otp.join('');
|
|
1543
|
+
}
|
|
1544
|
+
|
|
1545
|
+
var styles$1 = {"otpContainer":"_2iQs0sk","otpInput":"Ia6IojY","error":"yJs9MaD"};
|
|
1546
|
+
|
|
1547
|
+
const BACKSPACE = 8;
|
|
1548
|
+
const LEFT_ARROW = 37;
|
|
1549
|
+
const RIGHT_ARROW = 39;
|
|
1550
|
+
const DELETE = 46;
|
|
1551
|
+
const SPACEBAR = 32;
|
|
1552
|
+
const OTPInputFunction = (props, ref) => {
|
|
1553
|
+
const { maxLength = 1, placeholder, className } = props, restProps = __rest(props, ["maxLength", "placeholder", "className"]);
|
|
1554
|
+
return (React__default.createElement("input", Object.assign({ maxLength: maxLength, className: cn(styles$1.otpInput, 'otpInput', className), placeholder: placeholder, type: "number" }, restProps, { ref: ref })));
|
|
1555
|
+
};
|
|
1556
|
+
const OTPInput = forwardRef(OTPInputFunction);
|
|
1557
|
+
const OTPFowardRef = (props, ref) => {
|
|
1558
|
+
const { valueLength = 6, type = 'number', value: valueProps, defaultValue, placeholder, onChange, onBlur, } = props;
|
|
1559
|
+
const inputRef = useRef(new Array(valueLength).fill(null));
|
|
1560
|
+
const [value, setValue] = useState(defaultValue || valueProps);
|
|
1561
|
+
const [activeOtp, setActiveOtp] = useState(-1);
|
|
1562
|
+
const [otp, setOtp] = useState(() => transferValueToOtp(value, valueLength));
|
|
1563
|
+
const changeCodeAtFocus = useCallback(() => {
|
|
1564
|
+
if (activeOtp === -1) {
|
|
1565
|
+
return;
|
|
1566
|
+
}
|
|
1567
|
+
const activeInput = inputRef.current[activeOtp];
|
|
1568
|
+
if (activeInput) {
|
|
1569
|
+
activeInput.value = '';
|
|
1570
|
+
const newOtp = otp;
|
|
1571
|
+
newOtp[activeOtp] = '';
|
|
1572
|
+
setOtp(newOtp);
|
|
1573
|
+
setValue(() => transferOtpToValue(newOtp));
|
|
1574
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(transferOtpToValue(newOtp));
|
|
1575
|
+
}
|
|
1576
|
+
}, [activeOtp, onChange, otp]);
|
|
1577
|
+
const focusPrevInput = useCallback(() => {
|
|
1578
|
+
if (activeOtp === 0) {
|
|
1579
|
+
return;
|
|
1580
|
+
}
|
|
1581
|
+
const curInput = inputRef.current[activeOtp];
|
|
1582
|
+
if (curInput) {
|
|
1583
|
+
curInput.blur();
|
|
1584
|
+
}
|
|
1585
|
+
const prevInput = inputRef.current[activeOtp - 1];
|
|
1586
|
+
if (prevInput) {
|
|
1587
|
+
prevInput.focus();
|
|
1588
|
+
}
|
|
1589
|
+
}, [activeOtp]);
|
|
1590
|
+
const focusNextInput = useCallback(() => {
|
|
1591
|
+
if (activeOtp === valueLength - 1) {
|
|
1592
|
+
return;
|
|
1593
|
+
}
|
|
1594
|
+
const curInput = inputRef.current[activeOtp];
|
|
1595
|
+
if (curInput) {
|
|
1596
|
+
curInput.blur();
|
|
1597
|
+
}
|
|
1598
|
+
const nextInput = inputRef.current[activeOtp + 1];
|
|
1599
|
+
if (nextInput) {
|
|
1600
|
+
nextInput.focus();
|
|
1601
|
+
}
|
|
1602
|
+
}, [activeOtp, valueLength]);
|
|
1603
|
+
const inputOnChange = useCallback((e) => {
|
|
1604
|
+
const target = e.target;
|
|
1605
|
+
const targetValue = target.value;
|
|
1606
|
+
const code = targetValue.toString().slice(0, 1);
|
|
1607
|
+
const indexTarget = inputRef.current.findIndex((input) => input === target);
|
|
1608
|
+
if (indexTarget !== -1) {
|
|
1609
|
+
const newOtp = otp;
|
|
1610
|
+
newOtp[indexTarget] = code;
|
|
1611
|
+
setOtp(newOtp);
|
|
1612
|
+
setValue(() => transferOtpToValue(newOtp));
|
|
1613
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(transferOtpToValue(newOtp));
|
|
1614
|
+
}
|
|
1615
|
+
focusNextInput();
|
|
1616
|
+
}, [focusNextInput, onChange, otp]);
|
|
1617
|
+
const inputOnFocus = useCallback((e) => {
|
|
1618
|
+
const target = e.target;
|
|
1619
|
+
const targetIndex = inputRef.current.findIndex((input) => input === target);
|
|
1620
|
+
if (type === 'number') {
|
|
1621
|
+
target.select();
|
|
1622
|
+
}
|
|
1623
|
+
else {
|
|
1624
|
+
target.setSelectionRange(0, target.value.length, 'backward');
|
|
1625
|
+
}
|
|
1626
|
+
if (targetIndex !== -1) {
|
|
1627
|
+
setActiveOtp(targetIndex);
|
|
1628
|
+
}
|
|
1629
|
+
}, []);
|
|
1630
|
+
const inputOnPaste = useCallback((e) => {
|
|
1631
|
+
const clipboard = e.clipboardData.getData('text/plain');
|
|
1632
|
+
const newOtp = transferValueToOtp(clipboard, valueLength);
|
|
1633
|
+
const newValue = transferOtpToValue(newOtp);
|
|
1634
|
+
setOtp(newOtp);
|
|
1635
|
+
setValue(newValue);
|
|
1636
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
1637
|
+
}, [onChange, type, valueLength]);
|
|
1638
|
+
// Handle cases of backspace, delete, left arrow, right arrow, space
|
|
1639
|
+
const inputOnKeyDown = useCallback((e) => {
|
|
1640
|
+
if (e.keyCode === BACKSPACE || e.key === 'Backspace') {
|
|
1641
|
+
e.preventDefault();
|
|
1642
|
+
changeCodeAtFocus();
|
|
1643
|
+
focusPrevInput();
|
|
1644
|
+
}
|
|
1645
|
+
else if (e.keyCode === DELETE || e.key === 'Delete') {
|
|
1646
|
+
e.preventDefault();
|
|
1647
|
+
changeCodeAtFocus();
|
|
1648
|
+
}
|
|
1649
|
+
else if (e.keyCode === LEFT_ARROW || e.key === 'ArrowLeft') {
|
|
1650
|
+
e.preventDefault();
|
|
1651
|
+
focusPrevInput();
|
|
1652
|
+
}
|
|
1653
|
+
else if (e.keyCode === RIGHT_ARROW || e.key === 'ArrowRight') {
|
|
1654
|
+
e.preventDefault();
|
|
1655
|
+
focusNextInput();
|
|
1656
|
+
}
|
|
1657
|
+
else if (e.keyCode === SPACEBAR ||
|
|
1658
|
+
e.key === ' ' ||
|
|
1659
|
+
e.key === 'Spacebar' ||
|
|
1660
|
+
e.key === 'Space') {
|
|
1661
|
+
e.preventDefault();
|
|
1662
|
+
}
|
|
1663
|
+
}, [changeCodeAtFocus, focusNextInput, focusPrevInput]);
|
|
1664
|
+
useImperativeHandle(ref, () => inputRef.current[0], []);
|
|
1665
|
+
useEffect(() => {
|
|
1666
|
+
setOtp(() => transferValueToOtp(valueProps, valueLength));
|
|
1667
|
+
setValue(valueProps);
|
|
1668
|
+
}, [valueLength, valueProps]);
|
|
1669
|
+
return (React__default.createElement(Flex, { justify: "center", columnGap: 8, className: cn(styles$1.otpContainer, 'otpContainer') }, otp.map((val, index) => {
|
|
1670
|
+
return (React__default.createElement(OTPInput, { ref: (iRef) => {
|
|
1671
|
+
inputRef.current[index] = iRef;
|
|
1672
|
+
}, key: '' + index, value: val, type: type, onChange: inputOnChange, onFocus: inputOnFocus, onKeyDown: inputOnKeyDown, onPaste: inputOnPaste, onBlur: onBlur, placeholder: placeholder }));
|
|
1673
|
+
})));
|
|
1674
|
+
};
|
|
1675
|
+
const OTP = forwardRef(OTPFowardRef);
|
|
1676
|
+
|
|
1677
|
+
const countriesDefault = Object.values(siteOptions).reduce((countries, { phoneCountry: phone }) => {
|
|
1678
|
+
if (!countries.includes(phone)) {
|
|
1679
|
+
countries.push(phone);
|
|
1680
|
+
}
|
|
1681
|
+
return countries;
|
|
1682
|
+
}, []);
|
|
1683
|
+
|
|
1684
|
+
var styles = {"phoneInput":"i-9Ibox","error":"YDWHh9b"};
|
|
1685
|
+
|
|
1686
|
+
/* eslint-disable prettier/prettier */
|
|
1687
|
+
const CaretDown = (props) => (React.createElement("svg", Object.assign({ width: "1em", height: "1em", viewBox: "0 0 8 5", fill: "currentColor" }, props),
|
|
1688
|
+
React.createElement("path", { d: "M4 5L0.535898 0.5L7.4641 0.5L4 5Z" })));
|
|
1689
|
+
|
|
1690
|
+
const PhoneForwardRef = (props, ref) => {
|
|
1691
|
+
const { isError, defaultCountry, countries = countriesDefault, countryCallingCodeEditable = false, defaultValue, value: valueProps, onChange: onChangeProps, className } = props, inputProps = __rest(props, ["isError", "defaultCountry", "countries", "countryCallingCodeEditable", "defaultValue", "value", "onChange", "className"]);
|
|
1692
|
+
const [value, setValue] = useState(defaultValue || valueProps);
|
|
1693
|
+
const [PhoneInputUtils, setPhoneInputUtils] = useState(null);
|
|
1694
|
+
const onChange = (val) => {
|
|
1695
|
+
setValue(val);
|
|
1696
|
+
onChangeProps === null || onChangeProps === void 0 ? void 0 : onChangeProps(val);
|
|
1697
|
+
};
|
|
1698
|
+
useEffect(() => {
|
|
1699
|
+
setValue(valueProps);
|
|
1700
|
+
}, [valueProps]);
|
|
1701
|
+
useEffect(() => {
|
|
1702
|
+
(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
1703
|
+
const PhoneInput = yield import('react-phone-number-input');
|
|
1704
|
+
setPhoneInputUtils(PhoneInput);
|
|
1705
|
+
}))();
|
|
1706
|
+
}, []);
|
|
1707
|
+
if (!PhoneInputUtils)
|
|
1708
|
+
return null;
|
|
1709
|
+
return (React__default.createElement(PhoneInputUtils.default
|
|
1710
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1711
|
+
, Object.assign({
|
|
1712
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1713
|
+
ref: ref, value: value, onChange: onChange, countries: countries, defaultCountry: defaultCountry, countryCallingCodeEditable: countryCallingCodeEditable, className: cn(styles.phoneInput, { isError, [styles.error]: isError }, className), flagUrl: undefined, flagComponent: (props) => {
|
|
1714
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1715
|
+
const { country, countryName, flagUrl } = props, restProps = __rest(props, ["country", "countryName", "flagUrl"]);
|
|
1716
|
+
const callingCode = country
|
|
1717
|
+
? `(+${PhoneInputUtils.getCountryCallingCode(country)})`
|
|
1718
|
+
: '';
|
|
1719
|
+
return (React__default.createElement(React__default.Fragment, null,
|
|
1720
|
+
React__default.createElement(Flag, Object.assign({ country: country, title: countryName }, restProps)),
|
|
1721
|
+
React__default.createElement("span", { className: cn(styles.callingCode, 'PhoneInputCountryIconCallingCode') }, callingCode)));
|
|
1722
|
+
}, countrySelectProps: {
|
|
1723
|
+
arrowComponent: () => {
|
|
1724
|
+
return (React__default.createElement("div", { className: cn(styles.arrowSelect, 'PhoneInputArrowContainer') },
|
|
1725
|
+
React__default.createElement(CaretDown, null)));
|
|
1726
|
+
},
|
|
1727
|
+
} }, inputProps)));
|
|
1728
|
+
};
|
|
1729
|
+
const Phone = forwardRef(PhoneForwardRef);
|
|
1730
|
+
|
|
1731
|
+
var useStyles$1 = createStyles((theme, params) => {
|
|
1732
|
+
const { variant } = params;
|
|
1733
|
+
const gradientOverlay = {
|
|
1734
|
+
content: 'none',
|
|
1735
|
+
top: 0,
|
|
1736
|
+
bottom: 0,
|
|
1737
|
+
zIndex: 1,
|
|
1738
|
+
width: rem(56),
|
|
1739
|
+
};
|
|
1740
|
+
return Object.assign({}, (variant === 'inline' && {
|
|
1741
|
+
root: {},
|
|
1742
|
+
tabsList: {
|
|
1743
|
+
gap: rem(24),
|
|
1744
|
+
borderBottom: 'none',
|
|
1745
|
+
flexWrap: 'nowrap',
|
|
1746
|
+
},
|
|
1747
|
+
tab: {
|
|
1748
|
+
padding: `${rem(8)} 0`,
|
|
1749
|
+
color: theme.colors.gray[4],
|
|
1750
|
+
borderColor: 'transparent',
|
|
1751
|
+
borderBottomWidth: rem(2),
|
|
1752
|
+
marginBottom: rem(-1),
|
|
1753
|
+
transition: 'border 0.2s ease',
|
|
1754
|
+
['&:hover']: {
|
|
1755
|
+
backgroundColor: 'initial',
|
|
1756
|
+
borderColor: 'transparent',
|
|
1757
|
+
},
|
|
1758
|
+
[`&[data-active='true']`]: {
|
|
1759
|
+
color: theme.fn.primaryColor(),
|
|
1760
|
+
borderColor: theme.fn.primaryColor(),
|
|
1761
|
+
},
|
|
1762
|
+
},
|
|
1763
|
+
tabRightSection: {},
|
|
1764
|
+
tabLabel: {},
|
|
1765
|
+
tabIcon: {},
|
|
1766
|
+
panel: {},
|
|
1767
|
+
scrollArea: {
|
|
1768
|
+
position: 'relative',
|
|
1769
|
+
'&.prev-bg': {
|
|
1770
|
+
'&:before': Object.assign(Object.assign({}, gradientOverlay), { content: '""', position: 'absolute', left: 0, background: 'linear-gradient(90deg, #FFF 0%, rgba(255, 255, 255, 0.00) 100%)' }),
|
|
1771
|
+
},
|
|
1772
|
+
'&.next-bg': {
|
|
1773
|
+
'&:after': Object.assign(Object.assign({}, gradientOverlay), { content: '""', position: 'absolute', right: 0, background: 'linear-gradient(90deg, rgba(255,255,255,0) 0%,rgba(255,255,255,1) 100%)' }),
|
|
1774
|
+
},
|
|
1775
|
+
},
|
|
1776
|
+
list: {
|
|
1777
|
+
borderBottom: `1px solid ${theme.colors.neutral[1]}`,
|
|
1778
|
+
},
|
|
1779
|
+
btn: {
|
|
1780
|
+
position: 'absolute',
|
|
1781
|
+
top: '50%',
|
|
1782
|
+
zIndex: 2,
|
|
1783
|
+
transform: 'translate(0, -50%)',
|
|
1784
|
+
width: rem(28),
|
|
1785
|
+
height: rem(28),
|
|
1786
|
+
padding: 0,
|
|
1787
|
+
background: 'white',
|
|
1788
|
+
borderRadius: '50%',
|
|
1789
|
+
cursor: 'pointer',
|
|
1790
|
+
filter: 'drop-shadow(0px 0px 1px rgba(0, 0, 0, 0.04)) drop-shadow(0px 2px 8px rgba(0, 0, 0, 0.04)) drop-shadow(0px 10px 16px rgba(0, 0, 0, 0.04))',
|
|
1791
|
+
'.mantine-Button-icon': {
|
|
1792
|
+
display: 'flex',
|
|
1793
|
+
alignItems: 'center',
|
|
1794
|
+
justifyContent: 'center',
|
|
1795
|
+
},
|
|
1796
|
+
'&.disabled': {
|
|
1797
|
+
opacity: 0,
|
|
1798
|
+
zIndex: 0,
|
|
1799
|
+
},
|
|
1800
|
+
},
|
|
1801
|
+
prevBtn: {
|
|
1802
|
+
left: 0,
|
|
1803
|
+
},
|
|
1804
|
+
nextBtn: {
|
|
1805
|
+
right: 0,
|
|
1806
|
+
},
|
|
1807
|
+
}));
|
|
1808
|
+
});
|
|
1809
|
+
|
|
1810
|
+
const _Tabs = (_a) => {
|
|
1811
|
+
var _b;
|
|
1812
|
+
var { variant = 'inline', value, styles, children, dataList = [], tabProps, listProps, panelProps, TabComponentDisplay, startPadding = 40, defaultValue } = _a, rest = __rest(_a, ["variant", "value", "styles", "children", "dataList", "tabProps", "listProps", "panelProps", "TabComponentDisplay", "startPadding", "defaultValue"]);
|
|
1813
|
+
const { cx, classes } = useStyles$1({ variant }, { name: 'Tabs', styles });
|
|
1814
|
+
const listRef = useRef(null);
|
|
1815
|
+
const tabRef = useRef([]);
|
|
1816
|
+
const [activeTab, setActiveTab] = useState(defaultValue || ((_b = dataList === null || dataList === void 0 ? void 0 : dataList[0]) === null || _b === void 0 ? void 0 : _b.value));
|
|
1817
|
+
const [currentSlide, setCurrentSlide] = useState(0);
|
|
1818
|
+
const [disableNext, setDisableNext] = useState(false);
|
|
1819
|
+
const [disablePrevious, setDisablePrevious] = useState(true);
|
|
1820
|
+
const [scrollPosition, onScrollPositionChange] = useState({ x: 0, y: 0 });
|
|
1821
|
+
const viewport = useRef(null);
|
|
1822
|
+
const props = Object.assign({ defaultValue, classNames: classes }, (!children
|
|
1823
|
+
? {
|
|
1824
|
+
value: activeTab,
|
|
1825
|
+
onTabChange: (v) => setActiveTab(v),
|
|
1826
|
+
}
|
|
1827
|
+
: {
|
|
1828
|
+
value,
|
|
1829
|
+
}));
|
|
1830
|
+
useEffect(() => {
|
|
1831
|
+
setActiveTab(value);
|
|
1832
|
+
}, [value]);
|
|
1833
|
+
useEffect(() => {
|
|
1834
|
+
var _a, _b, _c;
|
|
1835
|
+
(_a = viewport.current) === null || _a === void 0 ? void 0 : _a.scrollTo({
|
|
1836
|
+
left: ((_c = (_b = tabRef === null || tabRef === void 0 ? void 0 : tabRef.current) === null || _b === void 0 ? void 0 : _b[currentSlide]) === null || _c === void 0 ? void 0 : _c.offsetLeft) - startPadding,
|
|
1837
|
+
behavior: 'smooth',
|
|
1838
|
+
});
|
|
1839
|
+
}, [currentSlide]);
|
|
1840
|
+
useEffect(() => {
|
|
1841
|
+
setCurrentSlide(dataList.findIndex((i) => i.value == activeTab));
|
|
1842
|
+
}, [activeTab]);
|
|
1843
|
+
useEffect(() => {
|
|
1844
|
+
var _a, _b;
|
|
1845
|
+
setDisablePrevious(scrollPosition.x === 0);
|
|
1846
|
+
setDisableNext(((_a = viewport === null || viewport === void 0 ? void 0 : viewport.current) === null || _a === void 0 ? void 0 : _a.clientWidth) + scrollPosition.x ===
|
|
1847
|
+
((_b = viewport === null || viewport === void 0 ? void 0 : viewport.current) === null || _b === void 0 ? void 0 : _b.scrollWidth));
|
|
1848
|
+
}, [scrollPosition]);
|
|
1849
|
+
const TabTextComponent = ({ text, dataEventCategory, dataEventAction, dataEventLabel, }) => TabComponentDisplay ? (React__default.createElement(TabComponentDisplay, null, text)) : (React__default.createElement(Text, { size: "s3", color: "inherit", weight: "semiBold", "data-event-category": dataEventCategory, "data-event-action": dataEventAction, "data-event-label": dataEventLabel }, text));
|
|
1850
|
+
return (React__default.createElement(Tabs$1, Object.assign({}, props, rest), children || (React__default.createElement(React__default.Fragment, null,
|
|
1851
|
+
React__default.createElement(ScrollArea, { className: cx(classes.scrollArea, `${!disablePrevious ? 'prev-bg' : ''} ${!disableNext ? 'next-bg' : ''}`), scrollbarSize: 0, viewportRef: viewport, onScrollPositionChange: onScrollPositionChange },
|
|
1852
|
+
React__default.createElement(Tabs$1.List, Object.assign({ className: classes.list, ref: listRef }, listProps), dataList.map((i, idx) => (React__default.createElement(Tabs$1.Tab, Object.assign({ ref: (e) => (tabRef.current[idx] = e), className: classes.tab, key: String(i.value), value: String(i.value) }, tabProps),
|
|
1853
|
+
React__default.createElement(TabTextComponent, Object.assign({}, i)))))),
|
|
1854
|
+
React__default.createElement(Button, { className: cx(classes.btn, classes.prevBtn, disablePrevious ? 'disabled' : ''), unstyled: true, onClick: () => setCurrentSlide(currentSlide - 1 > -1 ? currentSlide - 1 : 0), leftIcon: React__default.createElement(ArrowLeft, { size: 16 }) }),
|
|
1855
|
+
React__default.createElement(Button, { className: cx(classes.btn, classes.nextBtn, disableNext ? 'disabled' : ''), unstyled: true, onClick: () => setCurrentSlide(currentSlide + 1 < dataList.length - 1
|
|
1856
|
+
? currentSlide + 1
|
|
1857
|
+
: dataList.length - 1), leftIcon: React__default.createElement(ArrowRight, { size: 16 }) })),
|
|
1858
|
+
dataList.map((i) => (React__default.createElement(Tabs$1.Panel, Object.assign({ value: String(i.value), key: String(i.value) }, panelProps), i.content)))))));
|
|
1859
|
+
};
|
|
1860
|
+
const Tabs = _Tabs;
|
|
1861
|
+
Tabs.List = Tabs$1.List;
|
|
1862
|
+
Tabs.Tab = Tabs$1.Tab;
|
|
1863
|
+
Tabs.Panel = Tabs$1.Panel;
|
|
1864
|
+
|
|
1865
|
+
const PopoverContext = createContext({});
|
|
1866
|
+
const _Popover = (_a) => {
|
|
1867
|
+
var { children, closeOnClickOutside = true } = _a, rest = __rest(_a, ["children", "closeOnClickOutside"]);
|
|
1868
|
+
const [opened, { close, open }] = useDisclosure(false);
|
|
1869
|
+
const ref = closeOnClickOutside
|
|
1870
|
+
? useClickOutside(close)
|
|
1871
|
+
: useRef();
|
|
1872
|
+
const props = Object.assign({}, (typeof children === 'function' ? { opened: opened } : {}));
|
|
1873
|
+
return (React__default.createElement(PopoverContext.Provider, { value: { opened, close, open } },
|
|
1874
|
+
React__default.createElement(Popover$1, Object.assign({ closeOnClickOutside: closeOnClickOutside }, props, rest),
|
|
1875
|
+
React__default.createElement("div", { ref: ref }, typeof children === 'function'
|
|
1876
|
+
? children({ open, close, opened })
|
|
1877
|
+
: children))));
|
|
1878
|
+
};
|
|
1879
|
+
const Popover = _Popover;
|
|
1880
|
+
Popover.Target = Popover$1.Target;
|
|
1881
|
+
Popover.Dropdown = Popover$1.Dropdown;
|
|
1882
|
+
|
|
1883
|
+
var useStyles = createStyles((theme) => {
|
|
1884
|
+
var _a;
|
|
1885
|
+
return {
|
|
1886
|
+
root: {},
|
|
1887
|
+
iconWrapper: {
|
|
1888
|
+
display: 'none',
|
|
1889
|
+
},
|
|
1890
|
+
label: {
|
|
1891
|
+
display: 'inline-block',
|
|
1892
|
+
cursor: 'pointer',
|
|
1893
|
+
'.checked': {
|
|
1894
|
+
display: 'none',
|
|
1895
|
+
},
|
|
1896
|
+
'.unchecked': {
|
|
1897
|
+
display: 'inline-block',
|
|
1898
|
+
},
|
|
1899
|
+
'&[data-checked="true"]': {
|
|
1900
|
+
'.checked': {
|
|
1901
|
+
display: 'inline-block',
|
|
1902
|
+
},
|
|
1903
|
+
'.unchecked': {
|
|
1904
|
+
display: 'none',
|
|
1905
|
+
},
|
|
1906
|
+
},
|
|
1907
|
+
'&,&[data-checked="true"]': {
|
|
1908
|
+
padding: 0,
|
|
1909
|
+
border: 0,
|
|
1910
|
+
height: 'auto',
|
|
1911
|
+
},
|
|
1912
|
+
},
|
|
1913
|
+
btnRoot: {
|
|
1914
|
+
pointerEvents: 'none',
|
|
1915
|
+
'&[data-variant="secondary"]': {
|
|
1916
|
+
backgroundColor: (_a = theme.colors[theme.primaryColor]) === null || _a === void 0 ? void 0 : _a[0],
|
|
1917
|
+
},
|
|
1918
|
+
'.mantine-Button-label': {
|
|
1919
|
+
fontWeight: 'normal',
|
|
1920
|
+
fontSize: rem(14),
|
|
1921
|
+
},
|
|
1922
|
+
},
|
|
1923
|
+
};
|
|
1924
|
+
});
|
|
1925
|
+
|
|
1926
|
+
const _ChipButton = (_a) => {
|
|
1927
|
+
var { variant = 'secondary', withIcon, children, buttonProps } = _a, rest = __rest(_a, ["variant", "withIcon", "children", "buttonProps"]);
|
|
1928
|
+
const { classes, cx } = useStyles();
|
|
1929
|
+
return (React__default.createElement(Chip, Object.assign({ classNames: classes }, rest, { unstyled: true }),
|
|
1930
|
+
React__default.createElement(Button, Object.assign({ className: cx(classes.btnRoot, 'checked'), leftIcon: withIcon ? React__default.createElement(Check, { size: 18, color: "currentColor" }) : undefined, variant: variant }, buttonProps), children),
|
|
1931
|
+
React__default.createElement(Button, Object.assign({ className: cx(classes.btnRoot, 'unchecked'), leftIcon: withIcon ? React__default.createElement(Plus, { size: 18, color: "currentColor" }) : undefined, variant: 'tertiary' }, buttonProps), children)));
|
|
1932
|
+
};
|
|
1933
|
+
const ChipButton = _ChipButton;
|
|
1934
|
+
ChipButton.Group = Chip.Group;
|
|
1935
|
+
|
|
1936
|
+
export { Anchor as A, Button as B, CaretDown as C, DEBOUNCED_TIME as D, Flag as F, ImageWrap as I, MAPPED_LOCALE as M, NumberInput as N, OTP as O, Phone as P, Radio as R, Select as S, Tabs as T, Avatar as a, AspectRatio as b, Input as c, Checkbox as d, ChipButton as e, CentralCarousel as f, StyledSliderWrapper as g, StyledSlider as h, useStyles$2 as i, StyledTextArea as j, useMantineLocale as k, getMantineThemeOverride as l, Breadcrumbs as m, Accordion as n, Carousel as o, emotionCache as p, getHeadingStyles as q, Popover as r, themeColors as t, useScreenSize as u };
|