@digital-b2c/coreui-kit 0.5.0 → 0.5.2

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.cjs CHANGED
@@ -673,40 +673,54 @@ function resolveCompoundSlots(children, slots) {
673
673
  return resolved;
674
674
  }
675
675
 
676
+ // src/components/primitives/Container/Container.module.scss
677
+ var Container_module_default = {
678
+ container: "Container_module_container"
679
+ };
680
+ var Container = React52.forwardRef(
681
+ (_a, ref) => {
682
+ var _b = _a, { children, className } = _b, props = __objRest(_b, ["children", "className"]);
683
+ return /* @__PURE__ */ jsxRuntime.jsx("div", __spreadProps(__spreadValues({ ref, className: clsx19__default.default(Container_module_default.container, className) }, props), { children }));
684
+ }
685
+ );
686
+ Container.displayName = "Container";
687
+
676
688
  // src/components/Card/Card.module.scss
677
689
  var Card_module_default = {
678
690
  card: "Card_module_card",
679
691
  logo: "Card_module_logo",
680
692
  subtitle: "Card_module_subtitle"
681
693
  };
682
- var Card = React52.forwardRef(
683
- ({ className, title, subtitle, cta, icon, logo, children }, ref) => {
684
- var _a, _b;
685
- const slots = resolveCompoundSlots(children, {
686
- title: CardTitle,
687
- subtitle: CardSubtitle
688
- });
689
- const titleNode = (_a = slots.title) != null ? _a : title;
690
- const subtitleNode = (_b = slots.subtitle) != null ? _b : subtitle;
691
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: clsx19__default.default(Card_module_default.card, className), children: [
692
- (logo == null ? void 0 : logo.src) ? /* @__PURE__ */ jsxRuntime.jsx(Picture, __spreadValues({ className: Card_module_default.logo }, logo)) : icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, { type: icon, className: Card_module_default.logo }),
693
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: Card_module_default.content, children: [
694
- titleNode && /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "h4", children: titleNode }),
695
- subtitleNode && /* @__PURE__ */ jsxRuntime.jsx("div", { className: Card_module_default.subtitle, children: subtitleNode })
696
- ] }),
697
- cta && /* @__PURE__ */ jsxRuntime.jsx(
698
- Button,
699
- {
700
- href: cta.url,
701
- isExternal: cta.isExternal,
702
- variant: "secondary",
703
- icon: cta.url ? "rightBlack" : void 0,
704
- children: cta.label
705
- }
706
- )
707
- ] });
708
- }
709
- );
694
+ var Card = ({ className, title, subtitle, cta, icon, logo, children, ref }) => {
695
+ var _a, _b;
696
+ const { url: href, label, isExternal } = cta != null ? cta : {};
697
+ const slots = resolveCompoundSlots(children, {
698
+ title: CardTitle,
699
+ subtitle: CardSubtitle
700
+ });
701
+ const titleNode = (_a = slots.title) != null ? _a : title;
702
+ const subtitleNode = (_b = slots.subtitle) != null ? _b : subtitle;
703
+ console.log(href && !label, href, !label);
704
+ return /* @__PURE__ */ jsxRuntime.jsxs(
705
+ ConditionalWrapper,
706
+ __spreadProps(__spreadValues({
707
+ ref,
708
+ className: clsx19__default.default(Card_module_default.card, className),
709
+ wrapper: Anchor,
710
+ fallback: "div",
711
+ condition: href && !label
712
+ }, href ? { href, isExternal } : {}), {
713
+ children: [
714
+ (logo == null ? void 0 : logo.src) ? /* @__PURE__ */ jsxRuntime.jsx(Picture, __spreadValues({ className: Card_module_default.logo }, logo)) : icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, { type: icon, className: Card_module_default.logo }),
715
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: Card_module_default.content, children: [
716
+ titleNode && /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "h4", children: titleNode }),
717
+ subtitleNode && /* @__PURE__ */ jsxRuntime.jsx("div", { className: Card_module_default.subtitle, children: subtitleNode })
718
+ ] }),
719
+ (cta == null ? void 0 : cta.label) && /* @__PURE__ */ jsxRuntime.jsx(Button, { href: cta.url, isExternal: cta.isExternal, variant: "secondary", icon: cta.icon, children: cta.label })
720
+ ]
721
+ })
722
+ );
723
+ };
710
724
  Card.displayName = "Card";
711
725
 
712
726
  // src/components/Card/index.ts
@@ -869,18 +883,6 @@ var Pagination = ({
869
883
  ] });
870
884
  };
871
885
 
872
- // src/components/primitives/Container/Container.module.scss
873
- var Container_module_default = {
874
- container: "Container_module_container"
875
- };
876
- var Container = React52.forwardRef(
877
- (_a, ref) => {
878
- var _b = _a, { children, className } = _b, props = __objRest(_b, ["children", "className"]);
879
- return /* @__PURE__ */ jsxRuntime.jsx("div", __spreadProps(__spreadValues({ ref, className: clsx19__default.default(Container_module_default.container, className) }, props), { children }));
880
- }
881
- );
882
- Container.displayName = "Container";
883
-
884
886
  // src/components/PracticeCard/PracticeCard.module.scss
885
887
  var PracticeCard_module_default = {
886
888
  "practice-card": "PracticeCard_module_practice-card",
@@ -929,6 +931,7 @@ var CardCollection_module_default = {
929
931
  wrapper: "CardCollection_module_wrapper",
930
932
  cardWrapper: "CardCollection_module_cardWrapper",
931
933
  threeCols: "CardCollection_module_threeCols",
934
+ fourCols: "CardCollection_module_fourCols",
932
935
  examCard: "CardCollection_module_examCard",
933
936
  "reveal-wrapper": "CardCollection_module_reveal-wrapper",
934
937
  "reveal-inner": "CardCollection_module_reveal-inner",
@@ -1784,6 +1787,72 @@ var TextEvent2 = Object.assign(TextEvent, {
1784
1787
  Title: TextEventTitle,
1785
1788
  RichText: TextEventRichText
1786
1789
  });
1790
+ var TextCenterCtaInBottomTitle = ({ children }) => {
1791
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
1792
+ };
1793
+ var TextCenterCtaInBottomSubtitle = ({ children }) => {
1794
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
1795
+ };
1796
+
1797
+ // src/widgets/TextCenterCtaInBottom/TextCenterCtaInBottom.module.scss
1798
+ var TextCenterCtaInBottom_module_default = {
1799
+ textCenterCta: "TextCenterCtaInBottom_module_textCenterCta",
1800
+ container: "TextCenterCtaInBottom_module_container",
1801
+ content: "TextCenterCtaInBottom_module_content",
1802
+ title: "TextCenterCtaInBottom_module_title",
1803
+ subtitle: "TextCenterCtaInBottom_module_subtitle",
1804
+ ctaWrapper: "TextCenterCtaInBottom_module_ctaWrapper",
1805
+ iconOnly: "TextCenterCtaInBottom_module_iconOnly",
1806
+ cta: "TextCenterCtaInBottom_module_cta"
1807
+ };
1808
+ var TextCenterCtaInBottom = ({
1809
+ className,
1810
+ title,
1811
+ subtitle,
1812
+ ctas,
1813
+ children
1814
+ }) => {
1815
+ var _a, _b;
1816
+ const slots = resolveCompoundSlots(children, {
1817
+ title: TextCenterCtaInBottomTitle,
1818
+ subtitle: TextCenterCtaInBottomSubtitle
1819
+ });
1820
+ const titleNode = (_a = slots.title) != null ? _a : title;
1821
+ const subtitleNode = (_b = slots.subtitle) != null ? _b : subtitle;
1822
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx19__default.default(TextCenterCtaInBottom_module_default.textCenterCta, className), children: /* @__PURE__ */ jsxRuntime.jsxs(Container, { className: TextCenterCtaInBottom_module_default.container, children: [
1823
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: TextCenterCtaInBottom_module_default.content, children: [
1824
+ titleNode && /* @__PURE__ */ jsxRuntime.jsx("div", { className: TextCenterCtaInBottom_module_default.title, children: titleNode }),
1825
+ subtitleNode && /* @__PURE__ */ jsxRuntime.jsx("div", { className: TextCenterCtaInBottom_module_default.subtitle, children: subtitleNode })
1826
+ ] }),
1827
+ (ctas == null ? void 0 : ctas.length) && /* @__PURE__ */ jsxRuntime.jsx(
1828
+ "div",
1829
+ {
1830
+ className: clsx19__default.default(
1831
+ TextCenterCtaInBottom_module_default.ctaWrapper,
1832
+ ctas.every((cta) => !cta.label && cta.logo) && TextCenterCtaInBottom_module_default.iconOnly
1833
+ ),
1834
+ children: ctas.map((cta, key) => /* @__PURE__ */ jsxRuntime.jsx(
1835
+ Button,
1836
+ {
1837
+ className: TextCenterCtaInBottom_module_default.cta,
1838
+ variant: "secondary",
1839
+ href: cta == null ? void 0 : cta.url,
1840
+ isExternal: cta == null ? void 0 : cta.isExternal,
1841
+ logo: cta.logo,
1842
+ children: cta == null ? void 0 : cta.label
1843
+ },
1844
+ key
1845
+ ))
1846
+ }
1847
+ )
1848
+ ] }) });
1849
+ };
1850
+
1851
+ // src/widgets/TextCenterCtaInBottom/index.ts
1852
+ var TextCenterCtaInBottom2 = Object.assign(TextCenterCtaInBottom, {
1853
+ Title: TextCenterCtaInBottomTitle,
1854
+ Subtitle: TextCenterCtaInBottomSubtitle
1855
+ });
1787
1856
  function useIntersectionObserver({
1788
1857
  animateOnce = false,
1789
1858
  options = {}
@@ -1835,6 +1904,7 @@ exports.PracticeCard = PracticeCard;
1835
1904
  exports.PracticePathCards = PracticePathCards2;
1836
1905
  exports.Teaser5050With3Text = Teaser5050With3Text2;
1837
1906
  exports.Teaser5050WithCta = Teaser5050WithCta2;
1907
+ exports.TextCenterCtaInBottom = TextCenterCtaInBottom2;
1838
1908
  exports.TextEvent = TextEvent2;
1839
1909
  exports.resolveCompoundSlots = resolveCompoundSlots;
1840
1910
  exports.svgs = svgs;