igloo-d2c-components 1.0.32 → 1.0.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.js CHANGED
@@ -2252,6 +2252,85 @@ const StyledDrawer = material.styled(material.Drawer)(() => ({
2252
2252
  maxHeight: '90vh',
2253
2253
  },
2254
2254
  }));
2255
+ // Desktop Dialog styles
2256
+ const StyledDialog = material.styled(material.Dialog)(() => ({
2257
+ '& .MuiDialog-paper': {
2258
+ borderRadius: '0px',
2259
+ maxHeight: '90vh',
2260
+ display: 'flex',
2261
+ flexDirection: 'column',
2262
+ width: '100%',
2263
+ maxWidth: '900px',
2264
+ },
2265
+ }));
2266
+ const DialogHeader = material.styled(material.Box)(() => ({
2267
+ position: 'sticky',
2268
+ top: 0,
2269
+ backgroundColor: '#fff',
2270
+ zIndex: 1,
2271
+ padding: '24px 24px 0',
2272
+ }));
2273
+ const DialogHeaderTitle = material.styled(material.Typography)(() => ({
2274
+ fontFamily: 'Montserrat, sans-serif',
2275
+ fontSize: '24px',
2276
+ fontWeight: 600,
2277
+ lineHeight: '32px',
2278
+ color: '#13131b',
2279
+ marginBottom: '8px',
2280
+ paddingRight: '32px',
2281
+ wordSpacing: '0px',
2282
+ }));
2283
+ const DialogHeaderSubtitle = material.styled(material.Typography)(() => ({
2284
+ fontFamily: 'Montserrat, sans-serif',
2285
+ fontSize: '14px',
2286
+ fontWeight: 400,
2287
+ lineHeight: '20px',
2288
+ color: '#5f5e62',
2289
+ wordSpacing: '-5px',
2290
+ }));
2291
+ const DialogContent = material.styled(material.Box)(() => ({
2292
+ flex: 1,
2293
+ overflowY: 'auto',
2294
+ padding: '24px',
2295
+ }));
2296
+ const DialogProductsGrid = material.styled(material.Box)(() => ({
2297
+ display: 'grid',
2298
+ gridTemplateColumns: 'repeat(2, 1fr)',
2299
+ gap: '16px',
2300
+ }));
2301
+ const DialogProductCard = material.styled(material.Box)(() => ({
2302
+ border: '1px solid #E0E0E0',
2303
+ borderRadius: '0px',
2304
+ padding: '16px',
2305
+ display: 'flex',
2306
+ flexDirection: 'column',
2307
+ alignItems: 'center',
2308
+ gap: '16px',
2309
+ }));
2310
+ const DialogProductLogo = material.styled(material.Box)(() => ({
2311
+ height: '32px',
2312
+ display: 'flex',
2313
+ alignItems: 'center',
2314
+ justifyContent: 'center',
2315
+ }));
2316
+ const DialogProductName = material.styled(material.Typography)(() => ({
2317
+ fontFamily: 'Montserrat, sans-serif',
2318
+ fontSize: '16px',
2319
+ fontWeight: 600,
2320
+ lineHeight: '24px',
2321
+ color: '#13131b',
2322
+ textAlign: 'center',
2323
+ wordSpacing: '0px',
2324
+ }));
2325
+ const DialogProductType = material.styled(material.Typography)(() => ({
2326
+ fontFamily: 'Montserrat, sans-serif',
2327
+ fontSize: '14px',
2328
+ fontWeight: 400,
2329
+ lineHeight: '20px',
2330
+ color: '#5f5e62',
2331
+ textAlign: 'center',
2332
+ wordSpacing: '-5px',
2333
+ }));
2255
2334
  const DrawerContent = material.styled(material.Box)({
2256
2335
  display: 'flex',
2257
2336
  flexDirection: 'column',
@@ -2306,7 +2385,7 @@ const ProductCard$1 = material.styled(material.Box)({
2306
2385
  flexDirection: 'column',
2307
2386
  gap: '16px',
2308
2387
  backgroundColor: '#ffffff',
2309
- borderRadius: '12px',
2388
+ borderRadius: '0',
2310
2389
  boxShadow: '0px 2px 10px 0px rgba(0, 0, 0, 0.12)',
2311
2390
  padding: '16px 12px 12px',
2312
2391
  height: '168px',
@@ -2349,20 +2428,40 @@ const ViewPlansButton = material.styled(material.Button)({
2349
2428
  borderRadius: '8px',
2350
2429
  height: '36px',
2351
2430
  textTransform: 'none',
2352
- fontFamily: 'Montserrat, sans-serif',
2353
2431
  fontSize: '14px',
2354
2432
  fontWeight: 500,
2355
2433
  lineHeight: '18px',
2356
- wordSpacing: '-5px',
2434
+ wordSpacing: '0px',
2357
2435
  });
2358
2436
 
2359
- function ProductSelectionDrawer({ open, onClose, products, onProductSelect, title = 'Select your product', subtitle = 'Pick the product that suits your protection goals to view available plans', viewPlansButtonText = 'View plans', }) {
2437
+ function ProductSelectionDrawer({ open, onClose, products, onProductSelect, title = 'Select your product', subtitle = 'Pick the product that suits your protection goals to view available plans', viewPlansButtonText = 'View plans', variant = 'drawer', }) {
2360
2438
  var _a, _b, _c, _d, _e, _f;
2361
2439
  const tenantTheme = useTenantTheme();
2362
2440
  // Get primary color from tenant theme, fallback to default
2363
- const primaryColor = ((_c = (_b = (_a = tenantTheme === null || tenantTheme === void 0 ? void 0 : tenantTheme.theme) === null || _a === void 0 ? void 0 : _a.palette) === null || _b === void 0 ? void 0 : _b.primary) === null || _c === void 0 ? void 0 : _c.main) || '#317abc';
2364
- const primaryDark = ((_f = (_e = (_d = tenantTheme === null || tenantTheme === void 0 ? void 0 : tenantTheme.theme) === null || _d === void 0 ? void 0 : _d.palette) === null || _e === void 0 ? void 0 : _e.primary) === null || _f === void 0 ? void 0 : _f.dark) || '#2869a8';
2365
- const primaryDarker = '#1f5489'; // Active state
2441
+ const primaryColor = ((_c = (_b = (_a = tenantTheme === null || tenantTheme === void 0 ? void 0 : tenantTheme.theme) === null || _a === void 0 ? void 0 : _a.palette) === null || _b === void 0 ? void 0 : _b.primary) === null || _c === void 0 ? void 0 : _c.main) || '#0090DA';
2442
+ const primaryDark = ((_f = (_e = (_d = tenantTheme === null || tenantTheme === void 0 ? void 0 : tenantTheme.theme) === null || _d === void 0 ? void 0 : _d.palette) === null || _e === void 0 ? void 0 : _e.primary) === null || _f === void 0 ? void 0 : _f.dark) || '#007bb8';
2443
+ const primaryDarker = '#006699'; // Active state
2444
+ // Desktop Dialog variant
2445
+ if (variant === 'dialog') {
2446
+ return (jsxRuntime.jsxs(StyledDialog, Object.assign({ open: open, onClose: onClose, maxWidth: "md", fullWidth: true }, { children: [jsxRuntime.jsxs(DialogHeader, { children: [jsxRuntime.jsx(material.IconButton, Object.assign({ onClick: onClose, sx: {
2447
+ position: 'absolute',
2448
+ right: 16,
2449
+ top: 16,
2450
+ } }, { children: jsxRuntime.jsx(CloseIcon, {}) })), jsxRuntime.jsx(DialogHeaderTitle, { children: title }), jsxRuntime.jsx(DialogHeaderSubtitle, { children: subtitle })] }), jsxRuntime.jsx(DialogContent, { children: jsxRuntime.jsx(DialogProductsGrid, { children: products.map((product) => (jsxRuntime.jsxs(DialogProductCard, { children: [jsxRuntime.jsx(DialogProductLogo, { children: jsxRuntime.jsx("img", { src: product.logo, alt: product.name, style: {
2451
+ width: '88px',
2452
+ height: '32px',
2453
+ objectFit: 'cover',
2454
+ } }) }), jsxRuntime.jsxs(material.Box, Object.assign({ sx: { textAlign: 'center' } }, { children: [jsxRuntime.jsx(DialogProductName, { children: product.name }), jsxRuntime.jsx(DialogProductType, { children: product.type })] })), jsxRuntime.jsx(ViewPlansButton, Object.assign({ variant: "contained", fullWidth: true, onClick: () => onProductSelect(product.id), sx: {
2455
+ backgroundColor: primaryColor,
2456
+ '&:hover': {
2457
+ backgroundColor: primaryDark,
2458
+ },
2459
+ '&:active': {
2460
+ backgroundColor: primaryDarker,
2461
+ },
2462
+ } }, { children: viewPlansButtonText }))] }, product.id))) }) })] })));
2463
+ }
2464
+ // Mobile Drawer variant (default)
2366
2465
  return (jsxRuntime.jsx(StyledDrawer, Object.assign({ anchor: "bottom", open: open, onClose: onClose }, { children: jsxRuntime.jsxs(DrawerContent, { children: [jsxRuntime.jsx(DrawerHeader, { children: jsxRuntime.jsx(CloseButtonContainer, { children: jsxRuntime.jsx(material.IconButton, Object.assign({ onClick: onClose, sx: { padding: 0 } }, { children: jsxRuntime.jsx(CloseIcon, { sx: { fontSize: 24, color: '#13131b' } }) })) }) }), jsxRuntime.jsxs(Header, { children: [jsxRuntime.jsx(HeaderTitle, { children: title }), jsxRuntime.jsx(HeaderSubtitle, { children: subtitle })] }), jsxRuntime.jsx(ProductsContainer, { children: jsxRuntime.jsx(ProductsGrid, { children: products.map((product) => (jsxRuntime.jsxs(ProductCard$1, { children: [jsxRuntime.jsxs(ProductInfo$1, { children: [jsxRuntime.jsx(ProductLogo, { children: jsxRuntime.jsx("img", { src: product.logo, alt: product.name, style: {
2367
2466
  width: '88px',
2368
2467
  height: '32px',
@@ -3390,7 +3489,7 @@ const StyledButton = styles.styled('button')(({ isDisabled, desktopWidth }) => (
3390
3489
  fontSize: '14px',
3391
3490
  fontWeight: 500,
3392
3491
  lineHeight: '18px',
3393
- wordSpacing: '-5px',
3492
+ wordSpacing: '0px',
3394
3493
  cursor: isDisabled ? 'not-allowed' : 'pointer',
3395
3494
  transition: 'all 0.2s ease',
3396
3495
  '&:hover': {
@@ -3593,7 +3692,7 @@ const FullWidthField = styles.styled(material.Box)({
3593
3692
  const CheckboxContainer = styles.styled(material.Box)({
3594
3693
  marginTop: '12px',
3595
3694
  '& .MuiFormControlLabel-root': {
3596
- alignItems: 'flex-start',
3695
+ alignItems: 'center',
3597
3696
  marginLeft: 0,
3598
3697
  '@media (min-width: 900px)': {
3599
3698
  alignItems: 'center',
@@ -3798,7 +3897,7 @@ const FAQTitle = material.styled(material.Typography)(({ theme }) => ({
3798
3897
  fontWeight: 700,
3799
3898
  fontSize: '20px',
3800
3899
  lineHeight: '28px',
3801
- wordSpacing: '0px',
3900
+ wordSpacing: '-5px',
3802
3901
  textAlign: 'center',
3803
3902
  width: '100%',
3804
3903
  margin: 0,
@@ -3847,7 +3946,7 @@ const FAQQuestion = material.styled(material.Typography)(({ theme }) => ({
3847
3946
  fontWeight: 700,
3848
3947
  fontSize: '14px',
3849
3948
  lineHeight: '20px',
3850
- wordSpacing: '0px',
3949
+ wordSpacing: '-5px',
3851
3950
  flex: 1,
3852
3951
  [theme.breakpoints.up('md')]: {
3853
3952
  fontSize: '18px',