@digital-b2c/coreui-kit 0.5.1 → 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 +42 -40
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +18 -15
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +35 -28
- package/dist/index.d.ts +35 -28
- package/dist/index.mjs +43 -41
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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 =
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
children:
|
|
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",
|