@riligar/components-kit 1.0.1 → 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.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import { createTheme, Stack, Text, Title, Center, Box, Button, Container, Paper, Group, SimpleGrid, Image, List, ThemeIcon, Grid, Badge, Code, RingProgress, Divider, SegmentedControl, Accordion, Avatar, Anchor, ActionIcon } from '@mantine/core';
1
+ import { createTheme, Stack, Text, Title, Center, Box, Button, Container, Paper, Group, SimpleGrid, Image, List, ThemeIcon, Grid, Badge, Code, RingProgress, Divider, SegmentedControl, Accordion, Avatar } from '@mantine/core';
2
2
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
3
3
  import { useWindowScroll } from '@mantine/hooks';
4
4
  import { IconCheck, IconBolt, IconQuote, IconCircleCheck } from '@tabler/icons-react';
@@ -239,12 +239,30 @@ function CTAButton({
239
239
  });
240
240
  }
241
241
 
242
+ /**
243
+ * SECTION_BACKGROUNDS - Central configuration for section backgrounds.
244
+ * Supports "white" and "gray" (Mantine gray.0).
245
+ */
246
+ const SECTION_BACKGROUNDS = {
247
+ white: "white",
248
+ gray: "gray.0"
249
+ };
250
+
251
+ /**
252
+ * Helper to resolve the background token for Mantine's 'bg' prop.
253
+ * @param {string} background - "white" | "gray"
254
+ * @returns {string} - The Mantine color token
255
+ */
256
+ const resolveBackground = background => {
257
+ return SECTION_BACKGROUNDS[background] || SECTION_BACKGROUNDS.white;
258
+ };
259
+
242
260
  function Layout({
243
261
  children,
244
262
  title,
245
263
  subtitle,
246
264
  id,
247
- bg = "white",
265
+ background = "white",
248
266
  py = {
249
267
  base: 80,
250
268
  md: 120
@@ -253,6 +271,7 @@ function Layout({
253
271
  ta = "left",
254
272
  stackGap = "xl"
255
273
  }) {
274
+ const bg = resolveBackground(background);
256
275
  return /*#__PURE__*/jsx(Box, {
257
276
  component: "section",
258
277
  id: id,
@@ -282,8 +301,10 @@ function Header({
282
301
  logo,
283
302
  navLinks = [],
284
303
  loginCta,
285
- signupCta
304
+ signupCta,
305
+ background = "white"
286
306
  }) {
307
+ const bg = resolveBackground(background);
287
308
  const [scroll] = useWindowScroll();
288
309
  const scrolled = scroll.y > 10;
289
310
  const handleNavClick = target => {
@@ -320,7 +341,7 @@ function Header({
320
341
  shadow: scrolled ? "sm" : "none",
321
342
  radius: "0",
322
343
  p: "xs",
323
- bg: "white",
344
+ bg: bg,
324
345
  bd: scrolled ? "1px solid var(--mantine-color-gray-2)" : "1px solid transparent",
325
346
  style: {
326
347
  pointerEvents: "auto",
@@ -428,8 +449,10 @@ function Hero({
428
449
  description,
429
450
  cta,
430
451
  video,
431
- image
452
+ image,
453
+ background = "white"
432
454
  }) {
455
+ const bg = resolveBackground(background);
433
456
  return /*#__PURE__*/jsx(Box, {
434
457
  py: {
435
458
  base: 80,
@@ -437,7 +460,7 @@ function Hero({
437
460
  md: 140
438
461
  },
439
462
  id: "hero",
440
- bg: "white",
463
+ bg: bg,
441
464
  children: /*#__PURE__*/jsx(Container, {
442
465
  size: "lg",
443
466
  children: /*#__PURE__*/jsxs(SimpleGrid, {
@@ -556,8 +579,10 @@ function LogoItem({
556
579
  function SocialProof({
557
580
  id,
558
581
  title,
559
- logos
582
+ logos,
583
+ background = "gray"
560
584
  }) {
585
+ const bg = resolveBackground(background);
561
586
  if (!logos || logos.length === 0) return null;
562
587
  return /*#__PURE__*/jsx(Box, {
563
588
  component: "section",
@@ -566,7 +591,7 @@ function SocialProof({
566
591
  base: 40,
567
592
  md: 60
568
593
  },
569
- bg: "white",
594
+ bg: bg,
570
595
  bd: {
571
596
  bottom: "1px solid var(--mantine-color-gray-1)"
572
597
  },
@@ -613,7 +638,7 @@ function FeatureSplit({
613
638
  video,
614
639
  image,
615
640
  reverse = false,
616
- bg
641
+ background = "white"
617
642
  }) {
618
643
  const listComponent = featuresList && featuresList.length > 0 && /*#__PURE__*/jsx(List, {
619
644
  spacing: "md",
@@ -661,7 +686,7 @@ function FeatureSplit({
661
686
  id: id,
662
687
  subtitle: subtitle,
663
688
  title: title,
664
- bg: bg,
689
+ background: background,
665
690
  children: /*#__PURE__*/jsx(SimpleGrid, {
666
691
  cols: {
667
692
  base: 1,
@@ -688,14 +713,14 @@ function FeaturesGrid({
688
713
  id,
689
714
  subtitle,
690
715
  title,
691
- bg = "gray.0",
716
+ background = "gray.0",
692
717
  items = []
693
718
  }) {
694
719
  return /*#__PURE__*/jsx(Layout, {
695
720
  id: id,
696
721
  subtitle: subtitle,
697
722
  title: title,
698
- bg: bg,
723
+ background: background,
699
724
  children: /*#__PURE__*/jsx(Grid, {
700
725
  gutter: "lg",
701
726
  children: items.map((item, idx) => /*#__PURE__*/jsx(FeatureCard, {
@@ -1013,13 +1038,14 @@ function Comparison({
1013
1038
  subtitle,
1014
1039
  title,
1015
1040
  traditionalCol,
1016
- newCol
1041
+ newCol,
1042
+ background = "white"
1017
1043
  }) {
1018
1044
  return /*#__PURE__*/jsx(Layout, {
1019
1045
  id: id,
1020
1046
  subtitle: subtitle,
1021
1047
  title: title,
1022
- bg: "white",
1048
+ background: background,
1023
1049
  children: /*#__PURE__*/jsx(Paper, {
1024
1050
  radius: "0",
1025
1051
  bd: "1px solid var(--mantine-color-gray-2)",
@@ -1206,13 +1232,15 @@ function Pricing({
1206
1232
  billing,
1207
1233
  setBilling,
1208
1234
  promoBadge,
1209
- plans
1235
+ plans,
1236
+ background = "white"
1210
1237
  }) {
1211
1238
  return /*#__PURE__*/jsxs(Layout, {
1212
1239
  id: id,
1213
1240
  subtitle: subtitle,
1214
1241
  title: title,
1215
1242
  ta: "center",
1243
+ background: background,
1216
1244
  children: [billingOptions && billingOptions.length > 0 && /*#__PURE__*/jsx(Stack, {
1217
1245
  align: "center",
1218
1246
  gap: "xl",
@@ -1384,7 +1412,8 @@ function FAQ({
1384
1412
  subtitle,
1385
1413
  title,
1386
1414
  questions = [],
1387
- contactCard
1415
+ contactCard,
1416
+ background = "white"
1388
1417
  }) {
1389
1418
  const accordionStyles = {
1390
1419
  item: {
@@ -1409,7 +1438,7 @@ function FAQ({
1409
1438
  id: id,
1410
1439
  subtitle: subtitle,
1411
1440
  title: title,
1412
- bg: "white",
1441
+ background: background,
1413
1442
  children: [/*#__PURE__*/jsxs(SimpleGrid, {
1414
1443
  cols: {
1415
1444
  base: 1,
@@ -1533,14 +1562,13 @@ function FAQ({
1533
1562
 
1534
1563
  function Testimonials({
1535
1564
  id,
1536
- bg = "gray.0",
1537
- title,
1538
1565
  subtitle,
1539
- items = []
1566
+ items = [],
1567
+ background = "gray"
1540
1568
  }) {
1541
1569
  return /*#__PURE__*/jsx(Layout, {
1542
1570
  id: id,
1543
- bg: bg,
1571
+ background: background,
1544
1572
  title: title,
1545
1573
  subtitle: subtitle,
1546
1574
  children: /*#__PURE__*/jsx(SimpleGrid, {
@@ -1604,11 +1632,11 @@ function CTABanner({
1604
1632
  title,
1605
1633
  description,
1606
1634
  cta,
1607
- bg = "gray.0"
1635
+ background = "gray.0"
1608
1636
  }) {
1609
1637
  return /*#__PURE__*/jsx(Layout, {
1610
1638
  id: id,
1611
- bg: bg,
1639
+ background: background,
1612
1640
  ta: "center",
1613
1641
  children: /*#__PURE__*/jsx(Paper, {
1614
1642
  p: {
@@ -1661,11 +1689,13 @@ const SecondaryCTA = CTABanner;
1661
1689
 
1662
1690
  function TrustBadge({
1663
1691
  text = "Selo Exclusivo RiLiGar",
1664
- color = "green.6"
1692
+ color = "green.6",
1693
+ background = "gray"
1665
1694
  }) {
1695
+ const bg = resolveBackground(background);
1666
1696
  return /*#__PURE__*/jsx(Box, {
1667
1697
  p: "xs",
1668
- bg: "gray.1",
1698
+ bg: bg,
1669
1699
  style: {
1670
1700
  borderRadius: "8px",
1671
1701
  border: "1px solid var(--mantine-color-gray-2)",
@@ -1697,127 +1727,5 @@ function TrustBadge({
1697
1727
  /** @deprecated Use TrustBadge instead */
1698
1728
  const SeloExclusivo = TrustBadge;
1699
1729
 
1700
- function Footer({
1701
- logo,
1702
- description,
1703
- sections = [],
1704
- socialLinks = [],
1705
- copyrightText,
1706
- madeByText,
1707
- bg = "gray.0"
1708
- }) {
1709
- return /*#__PURE__*/jsx(Box, {
1710
- component: "footer",
1711
- py: "xl",
1712
- bg: bg,
1713
- bd: {
1714
- top: "1px solid var(--mantine-color-gray-2)"
1715
- },
1716
- children: /*#__PURE__*/jsxs(Container, {
1717
- size: "xl",
1718
- children: [/*#__PURE__*/jsxs(SimpleGrid, {
1719
- cols: {
1720
- base: 1,
1721
- sm: 2
1722
- },
1723
- spacing: "xl",
1724
- children: [/*#__PURE__*/jsxs(Stack, {
1725
- gap: "lg",
1726
- children: [logo && /*#__PURE__*/jsx("img", {
1727
- src: logo.src,
1728
- alt: logo.alt || "",
1729
- height: logo.height || 32,
1730
- style: {
1731
- objectFit: "contain",
1732
- objectPosition: "left"
1733
- }
1734
- }), description && /*#__PURE__*/jsx(Text, {
1735
- size: "md",
1736
- c: "gray.6",
1737
- lh: 1.6,
1738
- maw: 400,
1739
- children: description
1740
- })]
1741
- }), /*#__PURE__*/jsxs(SimpleGrid, {
1742
- cols: {
1743
- base: 2,
1744
- sm: sections.length || 4
1745
- },
1746
- spacing: "xl",
1747
- children: [sections.map((section, idx) => /*#__PURE__*/jsxs(Stack, {
1748
- gap: "md",
1749
- children: [/*#__PURE__*/jsx(Text, {
1750
- fw: 900,
1751
- size: "xs",
1752
- tt: "uppercase",
1753
- ls: "1.5px",
1754
- children: section.title
1755
- }), /*#__PURE__*/jsx(Stack, {
1756
- gap: "xs",
1757
- children: section.links.map((link, linkIdx) => /*#__PURE__*/jsx(Anchor, {
1758
- c: "gray.6",
1759
- size: "sm",
1760
- component: link.href ? "a" : "button",
1761
- href: link.href,
1762
- onClick: link.onClick,
1763
- fw: 500,
1764
- children: link.label
1765
- }, linkIdx))
1766
- })]
1767
- }, idx)), socialLinks && socialLinks.length > 0 && /*#__PURE__*/jsxs(Stack, {
1768
- gap: "md",
1769
- children: [/*#__PURE__*/jsx(Text, {
1770
- fw: 900,
1771
- size: "xs",
1772
- tt: "uppercase",
1773
- ls: "1.5px",
1774
- children: "Social"
1775
- }), /*#__PURE__*/jsx(Group, {
1776
- gap: "xs",
1777
- children: socialLinks.map((social, socialIdx) => /*#__PURE__*/jsx(ActionIcon, {
1778
- size: "md",
1779
- variant: "subtle",
1780
- color: "gray",
1781
- component: "a",
1782
- href: social.href,
1783
- target: "_blank",
1784
- radius: "0",
1785
- "aria-label": social.label || `Social link ${socialIdx + 1}`,
1786
- children: social.icon
1787
- }, socialIdx))
1788
- })]
1789
- })]
1790
- })]
1791
- }), /*#__PURE__*/jsx(Divider, {
1792
- my: "xl",
1793
- color: "gray.2"
1794
- }), /*#__PURE__*/jsxs(Group, {
1795
- justify: "space-between",
1796
- mt: 30,
1797
- wrap: "wrap",
1798
- gap: "sm",
1799
- children: [/*#__PURE__*/jsx(Text, {
1800
- size: "xs",
1801
- fw: 800,
1802
- tt: "uppercase",
1803
- ls: "1px",
1804
- c: "gray.5",
1805
- children: copyrightText
1806
- }), madeByText && /*#__PURE__*/jsx(Group, {
1807
- gap: "sm",
1808
- children: /*#__PURE__*/jsx(Text, {
1809
- size: "xs",
1810
- fw: 800,
1811
- tt: "uppercase",
1812
- ls: "1px",
1813
- c: "gray.5",
1814
- children: madeByText
1815
- })
1816
- })]
1817
- })]
1818
- })
1819
- });
1820
- }
1821
-
1822
- export { CTABanner, CTAButton, Comparison, FAQ, FeatureSplit, FeaturesGrid, Footer, Header, Hero, Layout, MediaBlock, Navbar, Pricing, SecondaryCTA, SectionHeader, SeloExclusivo, SocialProof, Testimonials, TrustBadge, theme };
1730
+ export { CTABanner, CTAButton, Comparison, FAQ, FeatureSplit, FeaturesGrid, Header, Hero, Layout, MediaBlock, Navbar, Pricing, SECTION_BACKGROUNDS, SecondaryCTA, SectionHeader, SeloExclusivo, SocialProof, Testimonials, TrustBadge, resolveBackground, theme };
1823
1731
  //# sourceMappingURL=index.esm.js.map