@postenbring/hedwig-react 4.3.0 → 4.4.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/card/card.d.ts +44 -9
- package/dist/card/card.d.ts.map +1 -1
- package/dist/card/card.js +14 -7
- package/dist/card/card.js.map +1 -1
- package/dist/card/card.mjs +1 -1
- package/dist/card/index.js +14 -7
- package/dist/card/index.js.map +1 -1
- package/dist/card/index.mjs +1 -1
- package/dist/{chunk-TTDR3NZL.mjs → chunk-EWZYDO7Z.mjs} +16 -9
- package/dist/chunk-EWZYDO7Z.mjs.map +1 -0
- package/dist/form/index.mjs +18 -18
- package/dist/index.js +14 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +42 -42
- package/package.json +2 -2
- package/src/card/card.stories.tsx +2 -2
- package/src/card/card.tsx +77 -30
- package/dist/chunk-TTDR3NZL.mjs.map +0 -1
package/dist/index.js
CHANGED
|
@@ -830,23 +830,24 @@ var CardBody = (0, import_react15.forwardRef)(
|
|
|
830
830
|
}
|
|
831
831
|
);
|
|
832
832
|
CardBody.displayName = "Card.Body";
|
|
833
|
+
var CardBodyHeaderContext = (0, import_react15.createContext)("h2");
|
|
833
834
|
var CardBodyHeader = (0, import_react15.forwardRef)((_a, ref) => {
|
|
834
835
|
var _b = _a, { as: Tag, asChild, className, children } = _b, rest = __objRest(_b, ["as", "asChild", "className", "children"]);
|
|
835
|
-
const Component = asChild ? import_react_slot6.Slot :
|
|
836
|
-
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
836
|
+
const Component = asChild ? import_react_slot6.Slot : "hgroup";
|
|
837
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(CardBodyHeaderContext.Provider, { value: Tag != null ? Tag : "h2", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
837
838
|
Component,
|
|
838
839
|
__spreadProps(__spreadValues({}, rest), {
|
|
839
840
|
className: (0, import_typed_classname12.clsx)("hds-card__body-header", className),
|
|
840
841
|
ref,
|
|
841
842
|
children
|
|
842
843
|
})
|
|
843
|
-
);
|
|
844
|
+
) });
|
|
844
845
|
});
|
|
845
846
|
CardBodyHeader.displayName = "Card.BodyHeader";
|
|
846
847
|
var CardBodyHeaderOverline = (0, import_react15.forwardRef)(
|
|
847
848
|
(_a, ref) => {
|
|
848
849
|
var _b = _a, { asChild, className, children } = _b, rest = __objRest(_b, ["asChild", "className", "children"]);
|
|
849
|
-
const Component = asChild ? import_react_slot6.Slot : "
|
|
850
|
+
const Component = asChild ? import_react_slot6.Slot : "p";
|
|
850
851
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
851
852
|
Component,
|
|
852
853
|
__spreadProps(__spreadValues({}, rest), {
|
|
@@ -860,12 +861,18 @@ var CardBodyHeaderOverline = (0, import_react15.forwardRef)(
|
|
|
860
861
|
CardBodyHeaderOverline.displayName = "Card.BodyHeaderOverline";
|
|
861
862
|
var CardBodyHeaderTitle = (0, import_react15.forwardRef)(
|
|
862
863
|
(_a, ref) => {
|
|
863
|
-
var _b = _a, { asChild, className, children } = _b, rest = __objRest(_b, ["asChild", "className", "children"]);
|
|
864
|
-
const
|
|
864
|
+
var _b = _a, { as: TitleTag, variant = "h2", asChild, className, children } = _b, rest = __objRest(_b, ["as", "variant", "asChild", "className", "children"]);
|
|
865
|
+
const ParentTag = (0, import_react15.useContext)(CardBodyHeaderContext);
|
|
866
|
+
const Tag = TitleTag != null ? TitleTag : ParentTag;
|
|
867
|
+
const Component = asChild ? import_react_slot6.Slot : Tag;
|
|
865
868
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
866
869
|
Component,
|
|
867
870
|
__spreadProps(__spreadValues({}, rest), {
|
|
868
|
-
className: (0, import_typed_classname12.clsx)(
|
|
871
|
+
className: (0, import_typed_classname12.clsx)(
|
|
872
|
+
"hds-card__body-header-title",
|
|
873
|
+
{ "hds-card__body-header-title-h1": variant === "h1" },
|
|
874
|
+
className
|
|
875
|
+
),
|
|
869
876
|
ref,
|
|
870
877
|
children
|
|
871
878
|
})
|