@riligar/components-kit 1.0.0 → 1.1.0

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/index.js CHANGED
@@ -241,12 +241,30 @@ function CTAButton({
241
241
  });
242
242
  }
243
243
 
244
+ /**
245
+ * SECTION_BACKGROUNDS - Central configuration for section backgrounds.
246
+ * Supports "white" and "gray" (Mantine gray.0).
247
+ */
248
+ const SECTION_BACKGROUNDS = {
249
+ white: "white",
250
+ gray: "gray.0"
251
+ };
252
+
253
+ /**
254
+ * Helper to resolve the background token for Mantine's 'bg' prop.
255
+ * @param {string} background - "white" | "gray"
256
+ * @returns {string} - The Mantine color token
257
+ */
258
+ const resolveBackground = background => {
259
+ return SECTION_BACKGROUNDS[background] || SECTION_BACKGROUNDS.white;
260
+ };
261
+
244
262
  function Layout({
245
263
  children,
246
264
  title,
247
265
  subtitle,
248
266
  id,
249
- bg = "white",
267
+ background = "white",
250
268
  py = {
251
269
  base: 80,
252
270
  md: 120
@@ -255,6 +273,7 @@ function Layout({
255
273
  ta = "left",
256
274
  stackGap = "xl"
257
275
  }) {
276
+ const bg = resolveBackground(background);
258
277
  return /*#__PURE__*/jsxRuntime.jsx(core.Box, {
259
278
  component: "section",
260
279
  id: id,
@@ -284,8 +303,10 @@ function Header({
284
303
  logo,
285
304
  navLinks = [],
286
305
  loginCta,
287
- signupCta
306
+ signupCta,
307
+ background = "white"
288
308
  }) {
309
+ const bg = resolveBackground(background);
289
310
  const [scroll] = hooks.useWindowScroll();
290
311
  const scrolled = scroll.y > 10;
291
312
  const handleNavClick = target => {
@@ -322,7 +343,7 @@ function Header({
322
343
  shadow: scrolled ? "sm" : "none",
323
344
  radius: "0",
324
345
  p: "xs",
325
- bg: "white",
346
+ bg: bg,
326
347
  bd: scrolled ? "1px solid var(--mantine-color-gray-2)" : "1px solid transparent",
327
348
  style: {
328
349
  pointerEvents: "auto",
@@ -430,8 +451,10 @@ function Hero({
430
451
  description,
431
452
  cta,
432
453
  video,
433
- image
454
+ image,
455
+ background = "white"
434
456
  }) {
457
+ const bg = resolveBackground(background);
435
458
  return /*#__PURE__*/jsxRuntime.jsx(core.Box, {
436
459
  py: {
437
460
  base: 80,
@@ -439,7 +462,7 @@ function Hero({
439
462
  md: 140
440
463
  },
441
464
  id: "hero",
442
- bg: "white",
465
+ bg: bg,
443
466
  children: /*#__PURE__*/jsxRuntime.jsx(core.Container, {
444
467
  size: "lg",
445
468
  children: /*#__PURE__*/jsxRuntime.jsxs(core.SimpleGrid, {
@@ -558,8 +581,10 @@ function LogoItem({
558
581
  function SocialProof({
559
582
  id,
560
583
  title,
561
- logos
584
+ logos,
585
+ background = "gray"
562
586
  }) {
587
+ const bg = resolveBackground(background);
563
588
  if (!logos || logos.length === 0) return null;
564
589
  return /*#__PURE__*/jsxRuntime.jsx(core.Box, {
565
590
  component: "section",
@@ -568,7 +593,7 @@ function SocialProof({
568
593
  base: 40,
569
594
  md: 60
570
595
  },
571
- bg: "white",
596
+ bg: bg,
572
597
  bd: {
573
598
  bottom: "1px solid var(--mantine-color-gray-1)"
574
599
  },
@@ -615,7 +640,7 @@ function FeatureSplit({
615
640
  video,
616
641
  image,
617
642
  reverse = false,
618
- bg
643
+ background = "white"
619
644
  }) {
620
645
  const listComponent = featuresList && featuresList.length > 0 && /*#__PURE__*/jsxRuntime.jsx(core.List, {
621
646
  spacing: "md",
@@ -663,7 +688,7 @@ function FeatureSplit({
663
688
  id: id,
664
689
  subtitle: subtitle,
665
690
  title: title,
666
- bg: bg,
691
+ background: background,
667
692
  children: /*#__PURE__*/jsxRuntime.jsx(core.SimpleGrid, {
668
693
  cols: {
669
694
  base: 1,
@@ -690,14 +715,14 @@ function FeaturesGrid({
690
715
  id,
691
716
  subtitle,
692
717
  title,
693
- bg = "gray.0",
718
+ background = "gray.0",
694
719
  items = []
695
720
  }) {
696
721
  return /*#__PURE__*/jsxRuntime.jsx(Layout, {
697
722
  id: id,
698
723
  subtitle: subtitle,
699
724
  title: title,
700
- bg: bg,
725
+ background: background,
701
726
  children: /*#__PURE__*/jsxRuntime.jsx(core.Grid, {
702
727
  gutter: "lg",
703
728
  children: items.map((item, idx) => /*#__PURE__*/jsxRuntime.jsx(FeatureCard, {
@@ -1015,13 +1040,14 @@ function Comparison({
1015
1040
  subtitle,
1016
1041
  title,
1017
1042
  traditionalCol,
1018
- newCol
1043
+ newCol,
1044
+ background = "white"
1019
1045
  }) {
1020
1046
  return /*#__PURE__*/jsxRuntime.jsx(Layout, {
1021
1047
  id: id,
1022
1048
  subtitle: subtitle,
1023
1049
  title: title,
1024
- bg: "white",
1050
+ background: background,
1025
1051
  children: /*#__PURE__*/jsxRuntime.jsx(core.Paper, {
1026
1052
  radius: "0",
1027
1053
  bd: "1px solid var(--mantine-color-gray-2)",
@@ -1208,13 +1234,15 @@ function Pricing({
1208
1234
  billing,
1209
1235
  setBilling,
1210
1236
  promoBadge,
1211
- plans
1237
+ plans,
1238
+ background = "white"
1212
1239
  }) {
1213
1240
  return /*#__PURE__*/jsxRuntime.jsxs(Layout, {
1214
1241
  id: id,
1215
1242
  subtitle: subtitle,
1216
1243
  title: title,
1217
1244
  ta: "center",
1245
+ background: background,
1218
1246
  children: [billingOptions && billingOptions.length > 0 && /*#__PURE__*/jsxRuntime.jsx(core.Stack, {
1219
1247
  align: "center",
1220
1248
  gap: "xl",
@@ -1386,7 +1414,8 @@ function FAQ({
1386
1414
  subtitle,
1387
1415
  title,
1388
1416
  questions = [],
1389
- contactCard
1417
+ contactCard,
1418
+ background = "white"
1390
1419
  }) {
1391
1420
  const accordionStyles = {
1392
1421
  item: {
@@ -1411,7 +1440,7 @@ function FAQ({
1411
1440
  id: id,
1412
1441
  subtitle: subtitle,
1413
1442
  title: title,
1414
- bg: "white",
1443
+ background: background,
1415
1444
  children: [/*#__PURE__*/jsxRuntime.jsxs(core.SimpleGrid, {
1416
1445
  cols: {
1417
1446
  base: 1,
@@ -1535,14 +1564,13 @@ function FAQ({
1535
1564
 
1536
1565
  function Testimonials({
1537
1566
  id,
1538
- bg = "gray.0",
1539
- title,
1540
1567
  subtitle,
1541
- items = []
1568
+ items = [],
1569
+ background = "gray"
1542
1570
  }) {
1543
1571
  return /*#__PURE__*/jsxRuntime.jsx(Layout, {
1544
1572
  id: id,
1545
- bg: bg,
1573
+ background: background,
1546
1574
  title: title,
1547
1575
  subtitle: subtitle,
1548
1576
  children: /*#__PURE__*/jsxRuntime.jsx(core.SimpleGrid, {
@@ -1606,11 +1634,11 @@ function CTABanner({
1606
1634
  title,
1607
1635
  description,
1608
1636
  cta,
1609
- bg = "gray.0"
1637
+ background = "gray.0"
1610
1638
  }) {
1611
1639
  return /*#__PURE__*/jsxRuntime.jsx(Layout, {
1612
1640
  id: id,
1613
- bg: bg,
1641
+ background: background,
1614
1642
  ta: "center",
1615
1643
  children: /*#__PURE__*/jsxRuntime.jsx(core.Paper, {
1616
1644
  p: {
@@ -1663,11 +1691,13 @@ const SecondaryCTA = CTABanner;
1663
1691
 
1664
1692
  function TrustBadge({
1665
1693
  text = "Selo Exclusivo RiLiGar",
1666
- color = "green.6"
1694
+ color = "green.6",
1695
+ background = "gray"
1667
1696
  }) {
1697
+ const bg = resolveBackground(background);
1668
1698
  return /*#__PURE__*/jsxRuntime.jsx(core.Box, {
1669
1699
  p: "xs",
1670
- bg: "gray.1",
1700
+ bg: bg,
1671
1701
  style: {
1672
1702
  borderRadius: "8px",
1673
1703
  border: "1px solid var(--mantine-color-gray-2)",
@@ -1699,146 +1729,25 @@ function TrustBadge({
1699
1729
  /** @deprecated Use TrustBadge instead */
1700
1730
  const SeloExclusivo = TrustBadge;
1701
1731
 
1702
- function Footer({
1703
- logo,
1704
- description,
1705
- sections = [],
1706
- socialLinks = [],
1707
- copyrightText,
1708
- madeByText,
1709
- bg = "gray.0"
1710
- }) {
1711
- return /*#__PURE__*/jsxRuntime.jsx(core.Box, {
1712
- component: "footer",
1713
- py: "xl",
1714
- bg: bg,
1715
- bd: {
1716
- top: "1px solid var(--mantine-color-gray-2)"
1717
- },
1718
- children: /*#__PURE__*/jsxRuntime.jsxs(core.Container, {
1719
- size: "xl",
1720
- children: [/*#__PURE__*/jsxRuntime.jsxs(core.SimpleGrid, {
1721
- cols: {
1722
- base: 1,
1723
- sm: 2
1724
- },
1725
- spacing: "xl",
1726
- children: [/*#__PURE__*/jsxRuntime.jsxs(core.Stack, {
1727
- gap: "lg",
1728
- children: [logo && /*#__PURE__*/jsxRuntime.jsx("img", {
1729
- src: logo.src,
1730
- alt: logo.alt || "",
1731
- height: logo.height || 32,
1732
- style: {
1733
- objectFit: "contain",
1734
- objectPosition: "left"
1735
- }
1736
- }), description && /*#__PURE__*/jsxRuntime.jsx(core.Text, {
1737
- size: "md",
1738
- c: "gray.6",
1739
- lh: 1.6,
1740
- maw: 400,
1741
- children: description
1742
- })]
1743
- }), /*#__PURE__*/jsxRuntime.jsxs(core.SimpleGrid, {
1744
- cols: {
1745
- base: 2,
1746
- sm: sections.length || 4
1747
- },
1748
- spacing: "xl",
1749
- children: [sections.map((section, idx) => /*#__PURE__*/jsxRuntime.jsxs(core.Stack, {
1750
- gap: "md",
1751
- children: [/*#__PURE__*/jsxRuntime.jsx(core.Text, {
1752
- fw: 900,
1753
- size: "xs",
1754
- tt: "uppercase",
1755
- ls: "1.5px",
1756
- children: section.title
1757
- }), /*#__PURE__*/jsxRuntime.jsx(core.Stack, {
1758
- gap: "xs",
1759
- children: section.links.map((link, linkIdx) => /*#__PURE__*/jsxRuntime.jsx(core.Anchor, {
1760
- c: "gray.6",
1761
- size: "sm",
1762
- component: link.href ? "a" : "button",
1763
- href: link.href,
1764
- onClick: link.onClick,
1765
- fw: 500,
1766
- children: link.label
1767
- }, linkIdx))
1768
- })]
1769
- }, idx)), socialLinks && socialLinks.length > 0 && /*#__PURE__*/jsxRuntime.jsxs(core.Stack, {
1770
- gap: "md",
1771
- children: [/*#__PURE__*/jsxRuntime.jsx(core.Text, {
1772
- fw: 900,
1773
- size: "xs",
1774
- tt: "uppercase",
1775
- ls: "1.5px",
1776
- children: "Social"
1777
- }), /*#__PURE__*/jsxRuntime.jsx(core.Group, {
1778
- gap: "xs",
1779
- children: socialLinks.map((social, socialIdx) => /*#__PURE__*/jsxRuntime.jsx(core.ActionIcon, {
1780
- size: "md",
1781
- variant: "subtle",
1782
- color: "gray",
1783
- component: "a",
1784
- href: social.href,
1785
- target: "_blank",
1786
- radius: "0",
1787
- "aria-label": social.label || `Social link ${socialIdx + 1}`,
1788
- children: social.icon
1789
- }, socialIdx))
1790
- })]
1791
- })]
1792
- })]
1793
- }), /*#__PURE__*/jsxRuntime.jsx(core.Divider, {
1794
- my: "xl",
1795
- color: "gray.2"
1796
- }), /*#__PURE__*/jsxRuntime.jsxs(core.Group, {
1797
- justify: "space-between",
1798
- mt: 30,
1799
- wrap: "wrap",
1800
- gap: "sm",
1801
- children: [/*#__PURE__*/jsxRuntime.jsx(core.Text, {
1802
- size: "xs",
1803
- fw: 800,
1804
- tt: "uppercase",
1805
- ls: "1px",
1806
- c: "gray.5",
1807
- children: copyrightText
1808
- }), madeByText && /*#__PURE__*/jsxRuntime.jsx(core.Group, {
1809
- gap: "sm",
1810
- children: /*#__PURE__*/jsxRuntime.jsx(core.Text, {
1811
- size: "xs",
1812
- fw: 800,
1813
- tt: "uppercase",
1814
- ls: "1px",
1815
- c: "gray.5",
1816
- children: madeByText
1817
- })
1818
- })]
1819
- })]
1820
- })
1821
- });
1822
- }
1823
-
1824
1732
  exports.CTABanner = CTABanner;
1825
1733
  exports.CTAButton = CTAButton;
1826
1734
  exports.Comparison = Comparison;
1827
1735
  exports.FAQ = FAQ;
1828
1736
  exports.FeatureSplit = FeatureSplit;
1829
1737
  exports.FeaturesGrid = FeaturesGrid;
1830
- exports.Footer = Footer;
1831
1738
  exports.Header = Header;
1832
1739
  exports.Hero = Hero;
1833
1740
  exports.Layout = Layout;
1834
1741
  exports.MediaBlock = MediaBlock;
1835
1742
  exports.Navbar = Navbar;
1836
1743
  exports.Pricing = Pricing;
1744
+ exports.SECTION_BACKGROUNDS = SECTION_BACKGROUNDS;
1837
1745
  exports.SecondaryCTA = SecondaryCTA;
1838
1746
  exports.SectionHeader = SectionHeader;
1839
1747
  exports.SeloExclusivo = SeloExclusivo;
1840
1748
  exports.SocialProof = SocialProof;
1841
1749
  exports.Testimonials = Testimonials;
1842
1750
  exports.TrustBadge = TrustBadge;
1751
+ exports.resolveBackground = resolveBackground;
1843
1752
  exports.theme = theme;
1844
1753
  //# sourceMappingURL=index.js.map