@postenbring/hedwig-react
Advanced tools
Comparing version 0.0.0-icon-button-C0L88PWY-20231125181552 to 0.0.0-improve-typed-classname-20231126112245
@@ -58,3 +58,2 @@ "use strict"; | ||
module.exports = __toCommonJS(badge_exports); | ||
var import_clsx = require("clsx"); | ||
var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs"); | ||
@@ -66,7 +65,9 @@ var import_jsx_runtime = require("react/jsx-runtime"); | ||
variant, | ||
size = "small" | ||
size = "small", | ||
className | ||
} = _b, rest = __objRest(_b, [ | ||
"children", | ||
"variant", | ||
"size" | ||
"size", | ||
"className" | ||
]); | ||
@@ -76,3 +77,8 @@ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( | ||
__spreadProps(__spreadValues({ | ||
className: (0, import_clsx.clsx)((0, import_typed_classname.t)("hds-badge"), (0, import_typed_classname.t)(`hds-badge--${size}`), (0, import_typed_classname.t)(`hds-badge--${variant}`)) | ||
className: (0, import_typed_classname.clsx)( | ||
"hds-badge", | ||
`hds-badge--${size}`, | ||
`hds-badge--${variant}`, | ||
className | ||
) | ||
}, rest), { | ||
@@ -79,0 +85,0 @@ children |
@@ -64,3 +64,2 @@ "use strict"; | ||
// src/badge/badge.tsx | ||
var import_clsx = require("clsx"); | ||
var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs"); | ||
@@ -72,7 +71,9 @@ var import_jsx_runtime = require("react/jsx-runtime"); | ||
variant, | ||
size = "small" | ||
size = "small", | ||
className | ||
} = _b, rest = __objRest(_b, [ | ||
"children", | ||
"variant", | ||
"size" | ||
"size", | ||
"className" | ||
]); | ||
@@ -82,3 +83,8 @@ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( | ||
__spreadProps(__spreadValues({ | ||
className: (0, import_clsx.clsx)((0, import_typed_classname.t)("hds-badge"), (0, import_typed_classname.t)(`hds-badge--${size}`), (0, import_typed_classname.t)(`hds-badge--${variant}`)) | ||
className: (0, import_typed_classname.clsx)( | ||
"hds-badge", | ||
`hds-badge--${size}`, | ||
`hds-badge--${variant}`, | ||
className | ||
) | ||
}, rest), { | ||
@@ -85,0 +91,0 @@ children |
@@ -57,3 +57,2 @@ "use strict"; | ||
var import_react = require("react"); | ||
var import_clsx = require("clsx"); | ||
var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs"); | ||
@@ -97,6 +96,6 @@ var import_jsx_runtime = require("react/jsx-runtime"); | ||
__spreadProps(__spreadValues({ | ||
className: (0, import_clsx.clsx)( | ||
(0, import_typed_classname.t)("hds-box"), | ||
(0, import_typed_classname.t)(`hds-box--${variant}`), | ||
{ [(0, import_typed_classname.t)("hds-box--closed")]: closed }, | ||
className: (0, import_typed_classname.clsx)( | ||
"hds-box", | ||
`hds-box--${variant}`, | ||
{ "hds-box--closed": closed }, | ||
className | ||
@@ -121,3 +120,3 @@ ), | ||
__spreadValues({ | ||
className: (0, import_clsx.clsx)((0, import_typed_classname.t)("hds-box__close-button"), className), | ||
className: (0, import_typed_classname.clsx)("hds-box__close-button", className), | ||
ref, | ||
@@ -124,0 +123,0 @@ type: "button" |
@@ -64,3 +64,2 @@ "use strict"; | ||
var import_react = require("react"); | ||
var import_clsx = require("clsx"); | ||
var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs"); | ||
@@ -104,6 +103,6 @@ var import_jsx_runtime = require("react/jsx-runtime"); | ||
__spreadProps(__spreadValues({ | ||
className: (0, import_clsx.clsx)( | ||
(0, import_typed_classname.t)("hds-box"), | ||
(0, import_typed_classname.t)(`hds-box--${variant}`), | ||
{ [(0, import_typed_classname.t)("hds-box--closed")]: closed }, | ||
className: (0, import_typed_classname.clsx)( | ||
"hds-box", | ||
`hds-box--${variant}`, | ||
{ "hds-box--closed": closed }, | ||
className | ||
@@ -128,3 +127,3 @@ ), | ||
__spreadValues({ | ||
className: (0, import_clsx.clsx)((0, import_typed_classname.t)("hds-box__close-button"), className), | ||
className: (0, import_typed_classname.clsx)("hds-box__close-button", className), | ||
ref, | ||
@@ -131,0 +130,0 @@ type: "button" |
@@ -21,8 +21,2 @@ import * as react_jsx_runtime from 'react/jsx-runtime'; | ||
} | ||
declare function BaseButton({ children, variant, size, fullWidth, fill, buttonRef, className, ...rest }: ButtonProps & { | ||
variant: "primary" | "secondary"; | ||
}): react_jsx_runtime.JSX.Element; | ||
declare namespace BaseButton { | ||
var displayName: string; | ||
} | ||
/** | ||
@@ -44,2 +38,2 @@ * ## TODO | ||
export { BaseButton, type ButtonProps, PrimaryButton, SecondaryButton }; | ||
export { type ButtonProps, PrimaryButton, SecondaryButton }; |
@@ -52,3 +52,2 @@ "use strict"; | ||
__export(button_exports, { | ||
BaseButton: () => BaseButton, | ||
PrimaryButton: () => PrimaryButton, | ||
@@ -58,3 +57,2 @@ SecondaryButton: () => SecondaryButton | ||
module.exports = __toCommonJS(button_exports); | ||
var import_clsx = require("clsx"); | ||
var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs"); | ||
@@ -83,10 +81,10 @@ var import_jsx_runtime = require("react/jsx-runtime"); | ||
__spreadProps(__spreadValues({ | ||
className: (0, import_clsx.clsx)( | ||
(0, import_typed_classname.t)("hds-button"), | ||
(0, import_typed_classname.t)(`hds-button--${size}`), | ||
className: (0, import_typed_classname.clsx)( | ||
"hds-button", | ||
`hds-button--${size}`, | ||
{ | ||
[(0, import_typed_classname.t)(`hds-button--${variant}`)]: fill === "contained", | ||
[(0, import_typed_classname.t)(`hds-button--outline-${variant}`)]: fill === "outlined", | ||
[(0, import_typed_classname.t)("hds-button--full")]: fullWidth === true, | ||
[(0, import_typed_classname.t)("hds-button--mobile-full")]: fullWidth === "mobile" | ||
[`hds-button--${variant}`]: fill === "contained", | ||
[`hds-button--outline-${variant}`]: fill === "outlined", | ||
"hds-button--full": fullWidth === true, | ||
"hds-button--mobile-full": fullWidth === "mobile" | ||
}, | ||
@@ -112,5 +110,4 @@ className | ||
0 && (module.exports = { | ||
BaseButton, | ||
PrimaryButton, | ||
SecondaryButton | ||
}); |
@@ -1,4 +0,3 @@ | ||
export { BaseButton, ButtonProps, PrimaryButton, SecondaryButton } from './button.js'; | ||
export { IconButton, IconButtonProps } from './icon-button.js'; | ||
export { ButtonProps, PrimaryButton, SecondaryButton } from './button.js'; | ||
import 'react/jsx-runtime'; | ||
import 'react'; |
@@ -52,4 +52,2 @@ "use strict"; | ||
__export(button_exports, { | ||
BaseButton: () => BaseButton, | ||
IconButton: () => IconButton, | ||
PrimaryButton: () => PrimaryButton, | ||
@@ -62,7 +60,5 @@ SecondaryButton: () => SecondaryButton | ||
var import_base = require("@postenbring/hedwig-css/dist/base.css"); | ||
var import_button2 = require("@postenbring/hedwig-css/dist/button/button.css"); | ||
var import_icon_button = require("@postenbring/hedwig-css/dist/button/icon-button.css"); | ||
var import_button = require("@postenbring/hedwig-css/dist/button/button.css"); | ||
// src/button/button.tsx | ||
var import_clsx = require("clsx"); | ||
var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs"); | ||
@@ -91,10 +87,10 @@ var import_jsx_runtime = require("react/jsx-runtime"); | ||
__spreadProps(__spreadValues({ | ||
className: (0, import_clsx.clsx)( | ||
(0, import_typed_classname.t)("hds-button"), | ||
(0, import_typed_classname.t)(`hds-button--${size}`), | ||
className: (0, import_typed_classname.clsx)( | ||
"hds-button", | ||
`hds-button--${size}`, | ||
{ | ||
[(0, import_typed_classname.t)(`hds-button--${variant}`)]: fill === "contained", | ||
[(0, import_typed_classname.t)(`hds-button--outline-${variant}`)]: fill === "outlined", | ||
[(0, import_typed_classname.t)("hds-button--full")]: fullWidth === true, | ||
[(0, import_typed_classname.t)("hds-button--mobile-full")]: fullWidth === "mobile" | ||
[`hds-button--${variant}`]: fill === "contained", | ||
[`hds-button--outline-${variant}`]: fill === "outlined", | ||
"hds-button--full": fullWidth === true, | ||
"hds-button--mobile-full": fullWidth === "mobile" | ||
}, | ||
@@ -118,18 +114,6 @@ className | ||
SecondaryButton.displayName = "SecondaryButton"; | ||
// src/button/icon-button.tsx | ||
var import_clsx2 = require("clsx"); | ||
var import_typed_classname2 = require("@postenbring/hedwig-css/typed-classname/index.mjs"); | ||
var import_jsx_runtime2 = require("react/jsx-runtime"); | ||
function IconButton(_a) { | ||
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]); | ||
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(BaseButton, __spreadValues({ className: (0, import_clsx2.clsx)((0, import_typed_classname2.t)("hds-icon-button"), className) }, rest)); | ||
} | ||
IconButton.displayName = "IconButton"; | ||
// Annotate the CommonJS export names for ESM import in node: | ||
0 && (module.exports = { | ||
BaseButton, | ||
IconButton, | ||
PrimaryButton, | ||
SecondaryButton | ||
}); |
@@ -1,3 +0,2 @@ | ||
export { BaseButton, ButtonProps, PrimaryButton, SecondaryButton } from './button/button.js'; | ||
export { IconButton, IconButtonProps } from './button/icon-button.js'; | ||
export { ButtonProps, PrimaryButton, SecondaryButton } from './button/button.js'; | ||
export { Link, LinkProps } from './link/link.js'; | ||
@@ -4,0 +3,0 @@ export { Badge, BadgeProps, DarkBadge, WarningBadge, WhiteBadge } from './badge/badge.js'; |
@@ -53,3 +53,2 @@ "use strict"; | ||
Badge: () => Badge, | ||
BaseButton: () => BaseButton, | ||
Box: () => Box, | ||
@@ -61,3 +60,2 @@ BoxCloseButton: () => BoxCloseButton, | ||
DescriptionTerm: () => DescriptionTerm, | ||
IconButton: () => IconButton, | ||
Link: () => Link, | ||
@@ -79,7 +77,5 @@ LinkList: () => LinkList, | ||
var import_base = require("@postenbring/hedwig-css/dist/base.css"); | ||
var import_button2 = require("@postenbring/hedwig-css/dist/button/button.css"); | ||
var import_icon_button = require("@postenbring/hedwig-css/dist/button/icon-button.css"); | ||
var import_button = require("@postenbring/hedwig-css/dist/button/button.css"); | ||
// src/button/button.tsx | ||
var import_clsx = require("clsx"); | ||
var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs"); | ||
@@ -108,10 +104,10 @@ var import_jsx_runtime = require("react/jsx-runtime"); | ||
__spreadProps(__spreadValues({ | ||
className: (0, import_clsx.clsx)( | ||
(0, import_typed_classname.t)("hds-button"), | ||
(0, import_typed_classname.t)(`hds-button--${size}`), | ||
className: (0, import_typed_classname.clsx)( | ||
"hds-button", | ||
`hds-button--${size}`, | ||
{ | ||
[(0, import_typed_classname.t)(`hds-button--${variant}`)]: fill === "contained", | ||
[(0, import_typed_classname.t)(`hds-button--outline-${variant}`)]: fill === "outlined", | ||
[(0, import_typed_classname.t)("hds-button--full")]: fullWidth === true, | ||
[(0, import_typed_classname.t)("hds-button--mobile-full")]: fullWidth === "mobile" | ||
[`hds-button--${variant}`]: fill === "contained", | ||
[`hds-button--outline-${variant}`]: fill === "outlined", | ||
"hds-button--full": fullWidth === true, | ||
"hds-button--mobile-full": fullWidth === "mobile" | ||
}, | ||
@@ -136,12 +132,2 @@ className | ||
// src/button/icon-button.tsx | ||
var import_clsx2 = require("clsx"); | ||
var import_typed_classname2 = require("@postenbring/hedwig-css/typed-classname/index.mjs"); | ||
var import_jsx_runtime2 = require("react/jsx-runtime"); | ||
function IconButton(_a) { | ||
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]); | ||
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(BaseButton, __spreadValues({ className: (0, import_clsx2.clsx)((0, import_typed_classname2.t)("hds-icon-button"), className) }, rest)); | ||
} | ||
IconButton.displayName = "IconButton"; | ||
// src/link/index.tsx | ||
@@ -154,5 +140,4 @@ var import_fonts2 = require("@postenbring/hedwig-tokens/tokens-output/css/fonts.css"); | ||
// src/link/link.tsx | ||
var import_clsx3 = require("clsx"); | ||
var import_typed_classname3 = require("@postenbring/hedwig-css/typed-classname/index.mjs"); | ||
var import_jsx_runtime3 = require("react/jsx-runtime"); | ||
var import_typed_classname2 = require("@postenbring/hedwig-css/typed-classname/index.mjs"); | ||
var import_jsx_runtime2 = require("react/jsx-runtime"); | ||
function Link(_a) { | ||
@@ -163,3 +148,4 @@ var _b = _a, { | ||
size = "medium", | ||
anchorRef | ||
anchorRef, | ||
className | ||
} = _b, rest = __objRest(_b, [ | ||
@@ -169,11 +155,13 @@ "children", | ||
"size", | ||
"anchorRef" | ||
"anchorRef", | ||
"className" | ||
]); | ||
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)( | ||
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)( | ||
"a", | ||
__spreadProps(__spreadValues({ | ||
className: (0, import_clsx3.clsx)( | ||
(0, import_typed_classname3.t)("hds-link"), | ||
variant !== "underline" && (0, import_typed_classname3.t)(`hds-link--${variant}`), | ||
size !== "medium" && (0, import_typed_classname3.t)(`hds-link--${size}`) | ||
className: (0, import_typed_classname2.clsx)( | ||
"hds-link", | ||
variant !== "underline" && `hds-link--${variant}`, | ||
size !== "medium" && `hds-link--${size}`, | ||
className | ||
), | ||
@@ -195,5 +183,4 @@ ref: anchorRef | ||
// src/badge/badge.tsx | ||
var import_clsx4 = require("clsx"); | ||
var import_typed_classname4 = require("@postenbring/hedwig-css/typed-classname/index.mjs"); | ||
var import_jsx_runtime4 = require("react/jsx-runtime"); | ||
var import_typed_classname3 = require("@postenbring/hedwig-css/typed-classname/index.mjs"); | ||
var import_jsx_runtime3 = require("react/jsx-runtime"); | ||
function BaseBadge(_a) { | ||
@@ -203,12 +190,19 @@ var _b = _a, { | ||
variant, | ||
size = "small" | ||
size = "small", | ||
className | ||
} = _b, rest = __objRest(_b, [ | ||
"children", | ||
"variant", | ||
"size" | ||
"size", | ||
"className" | ||
]); | ||
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)( | ||
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)( | ||
"span", | ||
__spreadProps(__spreadValues({ | ||
className: (0, import_clsx4.clsx)((0, import_typed_classname4.t)("hds-badge"), (0, import_typed_classname4.t)(`hds-badge--${size}`), (0, import_typed_classname4.t)(`hds-badge--${variant}`)) | ||
className: (0, import_typed_classname3.clsx)( | ||
"hds-badge", | ||
`hds-badge--${size}`, | ||
`hds-badge--${variant}`, | ||
className | ||
) | ||
}, rest), { | ||
@@ -221,15 +215,15 @@ children | ||
function Badge(props) { | ||
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(BaseBadge, __spreadProps(__spreadValues({}, props), { variant: "primary" })); | ||
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(BaseBadge, __spreadProps(__spreadValues({}, props), { variant: "primary" })); | ||
} | ||
Badge.displayName = "Badge"; | ||
function DarkBadge(props) { | ||
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(BaseBadge, __spreadProps(__spreadValues({}, props), { variant: "dark" })); | ||
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(BaseBadge, __spreadProps(__spreadValues({}, props), { variant: "dark" })); | ||
} | ||
DarkBadge.displayName = "DarkBadge"; | ||
function WhiteBadge(props) { | ||
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(BaseBadge, __spreadProps(__spreadValues({}, props), { variant: "white" })); | ||
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(BaseBadge, __spreadProps(__spreadValues({}, props), { variant: "white" })); | ||
} | ||
WhiteBadge.displayName = "WhiteBadge"; | ||
function WarningBadge(props) { | ||
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(BaseBadge, __spreadProps(__spreadValues({}, props), { variant: "warning" })); | ||
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(BaseBadge, __spreadProps(__spreadValues({}, props), { variant: "warning" })); | ||
} | ||
@@ -246,21 +240,30 @@ WarningBadge.displayName = "WarningBadge"; | ||
// src/list/description-list.tsx | ||
var import_clsx5 = require("clsx"); | ||
var import_typed_classname5 = require("@postenbring/hedwig-css/typed-classname/index.mjs"); | ||
var import_jsx_runtime5 = require("react/jsx-runtime"); | ||
var import_typed_classname4 = require("@postenbring/hedwig-css/typed-classname/index.mjs"); | ||
var import_jsx_runtime4 = require("react/jsx-runtime"); | ||
function DescriptionDetails(_a) { | ||
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]); | ||
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("dd", __spreadProps(__spreadValues({}, rest), { children })); | ||
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("dd", __spreadProps(__spreadValues({}, rest), { children })); | ||
} | ||
function DescriptionTerm(_a) { | ||
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]); | ||
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("dt", __spreadProps(__spreadValues({}, rest), { children })); | ||
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("dt", __spreadProps(__spreadValues({}, rest), { children })); | ||
} | ||
function DescriptionList(_a) { | ||
var _b = _a, { variant = "vertical" } = _b, rest = __objRest(_b, ["variant"]); | ||
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)( | ||
var _b = _a, { | ||
variant = "vertical", | ||
className | ||
} = _b, rest = __objRest(_b, [ | ||
"variant", | ||
"className" | ||
]); | ||
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)( | ||
"dl", | ||
__spreadValues({ | ||
className: (0, import_clsx5.clsx)((0, import_typed_classname5.t)("hds-description-list"), { | ||
[(0, import_typed_classname5.t)("hds-description-list--horizontal")]: variant === "horizontal" | ||
}) | ||
className: (0, import_typed_classname4.clsx)( | ||
"hds-description-list", | ||
{ | ||
"hds-description-list--horizontal": variant === "horizontal" | ||
}, | ||
className | ||
) | ||
}, rest) | ||
@@ -274,5 +277,4 @@ ); | ||
// src/list/list.tsx | ||
var import_clsx6 = require("clsx"); | ||
var import_typed_classname6 = require("@postenbring/hedwig-css/typed-classname/index.mjs"); | ||
var import_jsx_runtime6 = require("react/jsx-runtime"); | ||
var import_typed_classname5 = require("@postenbring/hedwig-css/typed-classname/index.mjs"); | ||
var import_jsx_runtime5 = require("react/jsx-runtime"); | ||
function BaseList(_a) { | ||
@@ -283,3 +285,4 @@ var _b = _a, { | ||
listStyle = "inherit", | ||
size = "medium" | ||
size = "medium", | ||
className | ||
} = _b, rest = __objRest(_b, [ | ||
@@ -289,10 +292,16 @@ "as", | ||
"listStyle", | ||
"size" | ||
"size", | ||
"className" | ||
]); | ||
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)( | ||
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)( | ||
ListTag, | ||
__spreadProps(__spreadValues({ | ||
className: (0, import_clsx6.clsx)((0, import_typed_classname6.t)("hds-list"), (0, import_typed_classname6.t)(`hds-list--${size}`), { | ||
[(0, import_typed_classname6.t)(`hds-list--style-hidden`)]: listStyle === "no-bullets" | ||
}) | ||
className: (0, import_typed_classname5.clsx)( | ||
"hds-list", | ||
`hds-list--${size}`, | ||
{ | ||
"hds-list--style-hidden": listStyle === "no-bullets" | ||
}, | ||
className | ||
) | ||
}, rest), { | ||
@@ -304,6 +313,6 @@ children | ||
function UnorderedList(props) { | ||
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(BaseList, __spreadProps(__spreadValues({ as: "ul" }, props), { children: props.children })); | ||
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(BaseList, __spreadProps(__spreadValues({ as: "ul" }, props), { children: props.children })); | ||
} | ||
function OrderedList(props) { | ||
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(BaseList, __spreadProps(__spreadValues({ as: "ol" }, props), { children: props.children })); | ||
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(BaseList, __spreadProps(__spreadValues({ as: "ol" }, props), { children: props.children })); | ||
} | ||
@@ -315,5 +324,5 @@ BaseList.displayName = "BaseList"; | ||
// src/list/link-list.tsx | ||
var import_jsx_runtime7 = require("react/jsx-runtime"); | ||
var import_jsx_runtime6 = require("react/jsx-runtime"); | ||
function LinkList(props) { | ||
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(UnorderedList, __spreadProps(__spreadValues({ listStyle: "no-bullets" }, props), { children: props.children })); | ||
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(UnorderedList, __spreadProps(__spreadValues({ listStyle: "no-bullets" }, props), { children: props.children })); | ||
} | ||
@@ -331,5 +340,4 @@ LinkList.displayName = "LinkList"; | ||
var import_react = require("react"); | ||
var import_clsx7 = require("clsx"); | ||
var import_typed_classname7 = require("@postenbring/hedwig-css/typed-classname/index.mjs"); | ||
var import_jsx_runtime8 = require("react/jsx-runtime"); | ||
var import_typed_classname6 = require("@postenbring/hedwig-css/typed-classname/index.mjs"); | ||
var import_jsx_runtime7 = require("react/jsx-runtime"); | ||
var Box = (0, import_react.forwardRef)( | ||
@@ -368,9 +376,9 @@ (_a, ref) => { | ||
const closed = closedProp != null ? closedProp : closedState; | ||
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)( | ||
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)( | ||
Component, | ||
__spreadProps(__spreadValues({ | ||
className: (0, import_clsx7.clsx)( | ||
(0, import_typed_classname7.t)("hds-box"), | ||
(0, import_typed_classname7.t)(`hds-box--${variant}`), | ||
{ [(0, import_typed_classname7.t)("hds-box--closed")]: closed }, | ||
className: (0, import_typed_classname6.clsx)( | ||
"hds-box", | ||
`hds-box--${variant}`, | ||
{ "hds-box--closed": closed }, | ||
className | ||
@@ -381,3 +389,3 @@ ), | ||
children: [ | ||
!hideCloseButton && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(BoxCloseButton, __spreadValues({ onClick: onClose }, closeButtonProps)), | ||
!hideCloseButton && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(BoxCloseButton, __spreadValues({ onClick: onClose }, closeButtonProps)), | ||
children | ||
@@ -393,6 +401,6 @@ ] | ||
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]); | ||
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)( | ||
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)( | ||
"button", | ||
__spreadValues({ | ||
className: (0, import_clsx7.clsx)((0, import_typed_classname7.t)("hds-box__close-button"), className), | ||
className: (0, import_typed_classname6.clsx)("hds-box__close-button", className), | ||
ref, | ||
@@ -415,16 +423,15 @@ type: "button" | ||
var import_react2 = require("react"); | ||
var import_clsx8 = require("clsx"); | ||
var import_typed_classname8 = require("@postenbring/hedwig-css/typed-classname/index.mjs"); | ||
var import_jsx_runtime9 = require("react/jsx-runtime"); | ||
var import_typed_classname7 = require("@postenbring/hedwig-css/typed-classname/index.mjs"); | ||
var import_jsx_runtime8 = require("react/jsx-runtime"); | ||
var Message = (0, import_react2.forwardRef)( | ||
(_a, ref) => { | ||
var _b = _a, { children, className, variant = "success", icon, iconClassName } = _b, rest = __objRest(_b, ["children", "className", "variant", "icon", "iconClassName"]); | ||
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)( | ||
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)( | ||
Box, | ||
__spreadProps(__spreadValues({ | ||
className: (0, import_clsx8.clsx)((0, import_typed_classname8.t)(`hds-message`), (0, import_typed_classname8.t)(`hds-message--${variant}`), className), | ||
className: (0, import_typed_classname7.clsx)(`hds-message`, `hds-message--${variant}`, className), | ||
ref | ||
}, rest), { | ||
children: [ | ||
variant === "neutral" && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: (0, import_clsx8.clsx)((0, import_typed_classname8.t)("hds-message--neutral__icon"), iconClassName), children: icon }), | ||
variant === "neutral" && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: (0, import_typed_classname7.clsx)("hds-message--neutral__icon", iconClassName), children: icon }), | ||
children | ||
@@ -440,3 +447,2 @@ ] | ||
Badge, | ||
BaseButton, | ||
Box, | ||
@@ -448,3 +454,2 @@ BoxCloseButton, | ||
DescriptionTerm, | ||
IconButton, | ||
Link, | ||
@@ -451,0 +456,0 @@ LinkList, |
@@ -11,4 +11,4 @@ import * as react_jsx_runtime from 'react/jsx-runtime'; | ||
} | ||
declare function Input({ variant, errorMessage, labelProps, label, id, ...rest }: InputProps): react_jsx_runtime.JSX.Element; | ||
declare function Input({ variant, errorMessage, labelProps, label, id, className, ...rest }: InputProps): react_jsx_runtime.JSX.Element; | ||
export { Input, type InputProps }; |
@@ -66,3 +66,3 @@ "use strict"; | ||
var React = __toESM(require("react")); | ||
var import_clsx = require("clsx"); | ||
var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs"); | ||
var import_jsx_runtime = require("react/jsx-runtime"); | ||
@@ -75,3 +75,4 @@ function Input(_a) { | ||
label, | ||
id | ||
id, | ||
className | ||
} = _b, rest = __objRest(_b, [ | ||
@@ -82,3 +83,4 @@ "variant", | ||
"label", | ||
"id" | ||
"id", | ||
"className" | ||
]); | ||
@@ -90,6 +92,10 @@ const errorMessageId = React.useId(); | ||
{ | ||
className: (0, import_clsx.clsx)("hds-input", { | ||
[`hds-input--${variant}`]: variant, | ||
"hds-input--error": errorMessage | ||
}), | ||
className: (0, import_typed_classname.clsx)( | ||
"hds-input", | ||
{ | ||
[`hds-input--${variant}`]: variant, | ||
"hds-input--error": errorMessage | ||
}, | ||
className | ||
), | ||
children: [ | ||
@@ -96,0 +102,0 @@ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", __spreadProps(__spreadValues({ className: "hds-input__label" }, labelProps), { htmlFor: id || inputId, children: label })), |
@@ -61,3 +61,2 @@ "use strict"; | ||
// src/link/link.tsx | ||
var import_clsx = require("clsx"); | ||
var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs"); | ||
@@ -70,3 +69,4 @@ var import_jsx_runtime = require("react/jsx-runtime"); | ||
size = "medium", | ||
anchorRef | ||
anchorRef, | ||
className | ||
} = _b, rest = __objRest(_b, [ | ||
@@ -76,3 +76,4 @@ "children", | ||
"size", | ||
"anchorRef" | ||
"anchorRef", | ||
"className" | ||
]); | ||
@@ -82,6 +83,7 @@ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( | ||
__spreadProps(__spreadValues({ | ||
className: (0, import_clsx.clsx)( | ||
(0, import_typed_classname.t)("hds-link"), | ||
variant !== "underline" && (0, import_typed_classname.t)(`hds-link--${variant}`), | ||
size !== "medium" && (0, import_typed_classname.t)(`hds-link--${size}`) | ||
className: (0, import_typed_classname.clsx)( | ||
"hds-link", | ||
variant !== "underline" && `hds-link--${variant}`, | ||
size !== "medium" && `hds-link--${size}`, | ||
className | ||
), | ||
@@ -88,0 +90,0 @@ ref: anchorRef |
@@ -21,3 +21,3 @@ import * as react_jsx_runtime from 'react/jsx-runtime'; | ||
*/ | ||
declare function Link({ children, variant, size, anchorRef, ...rest }: LinkProps): react_jsx_runtime.JSX.Element; | ||
declare function Link({ children, variant, size, anchorRef, className, ...rest }: LinkProps): react_jsx_runtime.JSX.Element; | ||
declare namespace Link { | ||
@@ -24,0 +24,0 @@ var displayName: string; |
@@ -55,3 +55,2 @@ "use strict"; | ||
module.exports = __toCommonJS(link_exports); | ||
var import_clsx = require("clsx"); | ||
var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs"); | ||
@@ -64,3 +63,4 @@ var import_jsx_runtime = require("react/jsx-runtime"); | ||
size = "medium", | ||
anchorRef | ||
anchorRef, | ||
className | ||
} = _b, rest = __objRest(_b, [ | ||
@@ -70,3 +70,4 @@ "children", | ||
"size", | ||
"anchorRef" | ||
"anchorRef", | ||
"className" | ||
]); | ||
@@ -76,6 +77,7 @@ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( | ||
__spreadProps(__spreadValues({ | ||
className: (0, import_clsx.clsx)( | ||
(0, import_typed_classname.t)("hds-link"), | ||
variant !== "underline" && (0, import_typed_classname.t)(`hds-link--${variant}`), | ||
size !== "medium" && (0, import_typed_classname.t)(`hds-link--${size}`) | ||
className: (0, import_typed_classname.clsx)( | ||
"hds-link", | ||
variant !== "underline" && `hds-link--${variant}`, | ||
size !== "medium" && `hds-link--${size}`, | ||
className | ||
), | ||
@@ -82,0 +84,0 @@ ref: anchorRef |
@@ -27,3 +27,3 @@ import * as react_jsx_runtime from 'react/jsx-runtime'; | ||
} | ||
declare function DescriptionList({ variant, ...rest }: DescriptionListProps): react_jsx_runtime.JSX.Element; | ||
declare function DescriptionList({ variant, className, ...rest }: DescriptionListProps): react_jsx_runtime.JSX.Element; | ||
declare namespace DescriptionList { | ||
@@ -30,0 +30,0 @@ var displayName: string; |
@@ -58,3 +58,2 @@ "use strict"; | ||
module.exports = __toCommonJS(description_list_exports); | ||
var import_clsx = require("clsx"); | ||
var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs"); | ||
@@ -71,9 +70,19 @@ var import_jsx_runtime = require("react/jsx-runtime"); | ||
function DescriptionList(_a) { | ||
var _b = _a, { variant = "vertical" } = _b, rest = __objRest(_b, ["variant"]); | ||
var _b = _a, { | ||
variant = "vertical", | ||
className | ||
} = _b, rest = __objRest(_b, [ | ||
"variant", | ||
"className" | ||
]); | ||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( | ||
"dl", | ||
__spreadValues({ | ||
className: (0, import_clsx.clsx)((0, import_typed_classname.t)("hds-description-list"), { | ||
[(0, import_typed_classname.t)("hds-description-list--horizontal")]: variant === "horizontal" | ||
}) | ||
className: (0, import_typed_classname.clsx)( | ||
"hds-description-list", | ||
{ | ||
"hds-description-list--horizontal": variant === "horizontal" | ||
}, | ||
className | ||
) | ||
}, rest) | ||
@@ -80,0 +89,0 @@ ); |
@@ -67,3 +67,2 @@ "use strict"; | ||
// src/list/description-list.tsx | ||
var import_clsx = require("clsx"); | ||
var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs"); | ||
@@ -80,9 +79,19 @@ var import_jsx_runtime = require("react/jsx-runtime"); | ||
function DescriptionList(_a) { | ||
var _b = _a, { variant = "vertical" } = _b, rest = __objRest(_b, ["variant"]); | ||
var _b = _a, { | ||
variant = "vertical", | ||
className | ||
} = _b, rest = __objRest(_b, [ | ||
"variant", | ||
"className" | ||
]); | ||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( | ||
"dl", | ||
__spreadValues({ | ||
className: (0, import_clsx.clsx)((0, import_typed_classname.t)("hds-description-list"), { | ||
[(0, import_typed_classname.t)("hds-description-list--horizontal")]: variant === "horizontal" | ||
}) | ||
className: (0, import_typed_classname.clsx)( | ||
"hds-description-list", | ||
{ | ||
"hds-description-list--horizontal": variant === "horizontal" | ||
}, | ||
className | ||
) | ||
}, rest) | ||
@@ -96,3 +105,2 @@ ); | ||
// src/list/list.tsx | ||
var import_clsx2 = require("clsx"); | ||
var import_typed_classname2 = require("@postenbring/hedwig-css/typed-classname/index.mjs"); | ||
@@ -105,3 +113,4 @@ var import_jsx_runtime2 = require("react/jsx-runtime"); | ||
listStyle = "inherit", | ||
size = "medium" | ||
size = "medium", | ||
className | ||
} = _b, rest = __objRest(_b, [ | ||
@@ -111,3 +120,4 @@ "as", | ||
"listStyle", | ||
"size" | ||
"size", | ||
"className" | ||
]); | ||
@@ -117,5 +127,10 @@ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)( | ||
__spreadProps(__spreadValues({ | ||
className: (0, import_clsx2.clsx)((0, import_typed_classname2.t)("hds-list"), (0, import_typed_classname2.t)(`hds-list--${size}`), { | ||
[(0, import_typed_classname2.t)(`hds-list--style-hidden`)]: listStyle === "no-bullets" | ||
}) | ||
className: (0, import_typed_classname2.clsx)( | ||
"hds-list", | ||
`hds-list--${size}`, | ||
{ | ||
"hds-list--style-hidden": listStyle === "no-bullets" | ||
}, | ||
className | ||
) | ||
}, rest), { | ||
@@ -122,0 +137,0 @@ children |
@@ -57,3 +57,2 @@ "use strict"; | ||
// src/list/list.tsx | ||
var import_clsx = require("clsx"); | ||
var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs"); | ||
@@ -66,3 +65,4 @@ var import_jsx_runtime = require("react/jsx-runtime"); | ||
listStyle = "inherit", | ||
size = "medium" | ||
size = "medium", | ||
className | ||
} = _b, rest = __objRest(_b, [ | ||
@@ -72,3 +72,4 @@ "as", | ||
"listStyle", | ||
"size" | ||
"size", | ||
"className" | ||
]); | ||
@@ -78,5 +79,10 @@ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( | ||
__spreadProps(__spreadValues({ | ||
className: (0, import_clsx.clsx)((0, import_typed_classname.t)("hds-list"), (0, import_typed_classname.t)(`hds-list--${size}`), { | ||
[(0, import_typed_classname.t)(`hds-list--style-hidden`)]: listStyle === "no-bullets" | ||
}) | ||
className: (0, import_typed_classname.clsx)( | ||
"hds-list", | ||
`hds-list--${size}`, | ||
{ | ||
"hds-list--style-hidden": listStyle === "no-bullets" | ||
}, | ||
className | ||
) | ||
}, rest), { | ||
@@ -83,0 +89,0 @@ children |
@@ -56,3 +56,2 @@ "use strict"; | ||
module.exports = __toCommonJS(list_exports); | ||
var import_clsx = require("clsx"); | ||
var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs"); | ||
@@ -65,3 +64,4 @@ var import_jsx_runtime = require("react/jsx-runtime"); | ||
listStyle = "inherit", | ||
size = "medium" | ||
size = "medium", | ||
className | ||
} = _b, rest = __objRest(_b, [ | ||
@@ -71,3 +71,4 @@ "as", | ||
"listStyle", | ||
"size" | ||
"size", | ||
"className" | ||
]); | ||
@@ -77,5 +78,10 @@ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)( | ||
__spreadProps(__spreadValues({ | ||
className: (0, import_clsx.clsx)((0, import_typed_classname.t)("hds-list"), (0, import_typed_classname.t)(`hds-list--${size}`), { | ||
[(0, import_typed_classname.t)(`hds-list--style-hidden`)]: listStyle === "no-bullets" | ||
}) | ||
className: (0, import_typed_classname.clsx)( | ||
"hds-list", | ||
`hds-list--${size}`, | ||
{ | ||
"hds-list--style-hidden": listStyle === "no-bullets" | ||
}, | ||
className | ||
) | ||
}, rest), { | ||
@@ -82,0 +88,0 @@ children |
@@ -63,3 +63,2 @@ "use strict"; | ||
var import_react2 = require("react"); | ||
var import_clsx2 = require("clsx"); | ||
var import_typed_classname2 = require("@postenbring/hedwig-css/typed-classname/index.mjs"); | ||
@@ -69,3 +68,2 @@ | ||
var import_react = require("react"); | ||
var import_clsx = require("clsx"); | ||
var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs"); | ||
@@ -109,6 +107,6 @@ var import_jsx_runtime = require("react/jsx-runtime"); | ||
__spreadProps(__spreadValues({ | ||
className: (0, import_clsx.clsx)( | ||
(0, import_typed_classname.t)("hds-box"), | ||
(0, import_typed_classname.t)(`hds-box--${variant}`), | ||
{ [(0, import_typed_classname.t)("hds-box--closed")]: closed }, | ||
className: (0, import_typed_classname.clsx)( | ||
"hds-box", | ||
`hds-box--${variant}`, | ||
{ "hds-box--closed": closed }, | ||
className | ||
@@ -133,3 +131,3 @@ ), | ||
__spreadValues({ | ||
className: (0, import_clsx.clsx)((0, import_typed_classname.t)("hds-box__close-button"), className), | ||
className: (0, import_typed_classname.clsx)("hds-box__close-button", className), | ||
ref, | ||
@@ -151,7 +149,7 @@ type: "button" | ||
__spreadProps(__spreadValues({ | ||
className: (0, import_clsx2.clsx)((0, import_typed_classname2.t)(`hds-message`), (0, import_typed_classname2.t)(`hds-message--${variant}`), className), | ||
className: (0, import_typed_classname2.clsx)(`hds-message`, `hds-message--${variant}`, className), | ||
ref | ||
}, rest), { | ||
children: [ | ||
variant === "neutral" && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: (0, import_clsx2.clsx)((0, import_typed_classname2.t)("hds-message--neutral__icon"), iconClassName), children: icon }), | ||
variant === "neutral" && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: (0, import_typed_classname2.clsx)("hds-message--neutral__icon", iconClassName), children: icon }), | ||
children | ||
@@ -158,0 +156,0 @@ ] |
@@ -56,3 +56,2 @@ "use strict"; | ||
var import_react2 = require("react"); | ||
var import_clsx2 = require("clsx"); | ||
var import_typed_classname2 = require("@postenbring/hedwig-css/typed-classname/index.mjs"); | ||
@@ -62,3 +61,2 @@ | ||
var import_react = require("react"); | ||
var import_clsx = require("clsx"); | ||
var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs"); | ||
@@ -102,6 +100,6 @@ var import_jsx_runtime = require("react/jsx-runtime"); | ||
__spreadProps(__spreadValues({ | ||
className: (0, import_clsx.clsx)( | ||
(0, import_typed_classname.t)("hds-box"), | ||
(0, import_typed_classname.t)(`hds-box--${variant}`), | ||
{ [(0, import_typed_classname.t)("hds-box--closed")]: closed }, | ||
className: (0, import_typed_classname.clsx)( | ||
"hds-box", | ||
`hds-box--${variant}`, | ||
{ "hds-box--closed": closed }, | ||
className | ||
@@ -126,3 +124,3 @@ ), | ||
__spreadValues({ | ||
className: (0, import_clsx.clsx)((0, import_typed_classname.t)("hds-box__close-button"), className), | ||
className: (0, import_typed_classname.clsx)("hds-box__close-button", className), | ||
ref, | ||
@@ -144,7 +142,7 @@ type: "button" | ||
__spreadProps(__spreadValues({ | ||
className: (0, import_clsx2.clsx)((0, import_typed_classname2.t)(`hds-message`), (0, import_typed_classname2.t)(`hds-message--${variant}`), className), | ||
className: (0, import_typed_classname2.clsx)(`hds-message`, `hds-message--${variant}`, className), | ||
ref | ||
}, rest), { | ||
children: [ | ||
variant === "neutral" && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: (0, import_clsx2.clsx)((0, import_typed_classname2.t)("hds-message--neutral__icon"), iconClassName), children: icon }), | ||
variant === "neutral" && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: (0, import_typed_classname2.clsx)("hds-message--neutral__icon", iconClassName), children: icon }), | ||
children | ||
@@ -151,0 +149,0 @@ ] |
{ | ||
"name": "@postenbring/hedwig-react", | ||
"version": "0.0.0-icon-button-C0L88PWY-20231125181552", | ||
"version": "0.0.0-improve-typed-classname-20231126112245", | ||
"main": "./dist/index.js", | ||
@@ -18,9 +18,8 @@ "module": "./dist/index.mjs", | ||
"typescript": "^5.2.2", | ||
"eslint-config-custom": "0.0.0-icon-button-C0L88PWY-20231125181552", | ||
"eslint-config-custom": "0.0.0-improve-typed-classname-20231126112245", | ||
"hedwig-tsconfig": "0.0.0" | ||
}, | ||
"dependencies": { | ||
"clsx": "^2.0.0", | ||
"@postenbring/hedwig-css": "0.0.0-icon-button-C0L88PWY-20231125181552", | ||
"@postenbring/hedwig-tokens": "0.0.0-icon-button-C0L88PWY-20231125181552" | ||
"@postenbring/hedwig-css": "0.0.0-improve-typed-classname-20231126112245", | ||
"@postenbring/hedwig-tokens": "0.0.0-improve-typed-classname-20231126112245" | ||
}, | ||
@@ -27,0 +26,0 @@ "publishConfig": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2
118364
82
3157
+ Added@postenbring/hedwig-css@0.0.0-improve-typed-classname-20231126112245(transitive)
+ Added@postenbring/hedwig-tokens@0.0.0-improve-typed-classname-20231126112245(transitive)
- Removedclsx@^2.0.0
- Removed@postenbring/hedwig-css@0.0.0-icon-button-C0L88PWY-20231125181552(transitive)
- Removed@postenbring/hedwig-tokens@0.0.0-icon-button-C0L88PWY-20231125181552(transitive)
Updated@postenbring/hedwig-css@0.0.0-improve-typed-classname-20231126112245
Updated@postenbring/hedwig-tokens@0.0.0-improve-typed-classname-20231126112245