Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@postenbring/hedwig-react

Package Overview
Dependencies
Maintainers
3
Versions
477
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@postenbring/hedwig-react - npm Package Compare versions

Comparing version 0.0.0-font-size-and-line-height-with-min-max-fluid-20231117121357 to 0.0.0-icon-button-C0L88PWY-20231125000521

dist/box/box.d.mts

2

dist/badge/badge.d.ts
import * as react_jsx_runtime from 'react/jsx-runtime';
import * as React from 'react';
interface BadgeProps extends Omit<React.AnchorHTMLAttributes<HTMLSpanElement>, "className" | "style"> {
interface BadgeProps extends React.AnchorHTMLAttributes<HTMLSpanElement> {
/**

@@ -6,0 +6,0 @@ * Font size of the badge

@@ -60,14 +60,2 @@ "use strict";

var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
// src/utils.ts
function warnForStyleOverrides(props) {
if (props.className) {
console.warn("Overriding styles are not premited");
}
if (props.styles) {
console.warn("Overriding styles are not premited");
}
}
// src/badge/badge.tsx
var import_jsx_runtime = require("react/jsx-runtime");

@@ -84,3 +72,2 @@ function BaseBadge(_a) {

]);
warnForStyleOverrides(rest);
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(

@@ -87,0 +74,0 @@ "span",

@@ -66,14 +66,2 @@ "use strict";

var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
// src/utils.ts
function warnForStyleOverrides(props) {
if (props.className) {
console.warn("Overriding styles are not premited");
}
if (props.styles) {
console.warn("Overriding styles are not premited");
}
}
// src/badge/badge.tsx
var import_jsx_runtime = require("react/jsx-runtime");

@@ -90,3 +78,2 @@ function BaseBadge(_a) {

]);
warnForStyleOverrides(rest);
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(

@@ -93,0 +80,0 @@ "span",

import * as react_jsx_runtime from 'react/jsx-runtime';
import * as React from 'react';
interface ButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "className" | "style"> {
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
/**

@@ -21,2 +21,8 @@ * The height, font size and padding of the button

}
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;
}
/**

@@ -38,2 +44,2 @@ * ## TODO

export { type ButtonProps, PrimaryButton, SecondaryButton };
export { BaseButton, type ButtonProps, PrimaryButton, SecondaryButton };

@@ -52,2 +52,3 @@ "use strict";

__export(button_exports, {
BaseButton: () => BaseButton,
PrimaryButton: () => PrimaryButton,

@@ -59,14 +60,2 @@ SecondaryButton: () => SecondaryButton

var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
// src/utils.ts
function warnForStyleOverrides(props) {
if (props.className) {
console.warn("Overriding styles are not premited");
}
if (props.styles) {
console.warn("Overriding styles are not premited");
}
}
// src/button/button.tsx
var import_jsx_runtime = require("react/jsx-runtime");

@@ -80,3 +69,4 @@ function BaseButton(_a) {

fill = "contained",
buttonRef
buttonRef,
className
} = _b, rest = __objRest(_b, [

@@ -88,14 +78,19 @@ "children",

"fill",
"buttonRef"
"buttonRef",
"className"
]);
warnForStyleOverrides(rest);
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"button",
__spreadProps(__spreadValues({
className: (0, import_clsx.clsx)((0, import_typed_classname.t)("hds-button"), (0, import_typed_classname.t)(`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"
}),
className: (0, import_clsx.clsx)(
(0, import_typed_classname.t)("hds-button"),
(0, import_typed_classname.t)(`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"
},
className
),
ref: buttonRef

@@ -118,4 +113,5 @@ }, rest), {

0 && (module.exports = {
BaseButton,
PrimaryButton,
SecondaryButton
});

@@ -1,3 +0,4 @@

export { ButtonProps, PrimaryButton, SecondaryButton } from './button.js';
export { BaseButton, ButtonProps, PrimaryButton, SecondaryButton } from './button.js';
export { IconButton, IconButtonProps } from './icon-button.js';
import 'react/jsx-runtime';
import 'react';

@@ -52,2 +52,4 @@ "use strict";

__export(button_exports, {
BaseButton: () => BaseButton,
IconButton: () => IconButton,
PrimaryButton: () => PrimaryButton,

@@ -60,3 +62,4 @@ SecondaryButton: () => SecondaryButton

var import_base = require("@postenbring/hedwig-css/dist/base.css");
var import_button = require("@postenbring/hedwig-css/dist/button/button.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");

@@ -66,14 +69,2 @@ // src/button/button.tsx

var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
// src/utils.ts
function warnForStyleOverrides(props) {
if (props.className) {
console.warn("Overriding styles are not premited");
}
if (props.styles) {
console.warn("Overriding styles are not premited");
}
}
// src/button/button.tsx
var import_jsx_runtime = require("react/jsx-runtime");

@@ -87,3 +78,4 @@ function BaseButton(_a) {

fill = "contained",
buttonRef
buttonRef,
className
} = _b, rest = __objRest(_b, [

@@ -95,14 +87,19 @@ "children",

"fill",
"buttonRef"
"buttonRef",
"className"
]);
warnForStyleOverrides(rest);
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"button",
__spreadProps(__spreadValues({
className: (0, import_clsx.clsx)((0, import_typed_classname.t)("hds-button"), (0, import_typed_classname.t)(`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"
}),
className: (0, import_clsx.clsx)(
(0, import_typed_classname.t)("hds-button"),
(0, import_typed_classname.t)(`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"
},
className
),
ref: buttonRef

@@ -123,6 +120,18 @@ }, rest), {

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,6 +0,11 @@

export { ButtonProps, PrimaryButton, SecondaryButton } from './button/button.js';
export { BaseButton, ButtonProps, PrimaryButton, SecondaryButton } from './button/button.js';
export { IconButton, IconButtonProps } from './button/icon-button.js';
export { Link, LinkProps } from './link/link.js';
export { Badge, BadgeProps, DarkBadge, WarningBadge, WhiteBadge } from './badge/badge.js';
export { DescriptionDetails, DescriptionDetailsProps, default as DescriptionList, DescriptionListProps, DescriptionTerm, DescriptionTermProps } from './list/description-list.js';
export { ListProps, OrderedList, UnorderedList } from './list/list.js';
export { LinkList, LinkListProps } from './list/link-list.js';
export { a as Box, c as BoxCloseButton, b as BoxCloseButtonProps, B as BoxProps } from './index-OpbVH1tp.js';
export { Message, MessageProps } from './message/message.js';
import 'react/jsx-runtime';
import 'react';

@@ -53,2 +53,5 @@ "use strict";

Badge: () => Badge,
BaseButton: () => BaseButton,
Box: () => Box,
BoxCloseButton: () => BoxCloseButton,
DarkBadge: () => DarkBadge,

@@ -58,5 +61,10 @@ DescriptionDetails: () => DescriptionDetails,

DescriptionTerm: () => DescriptionTerm,
IconButton: () => IconButton,
Link: () => Link,
LinkList: () => LinkList,
Message: () => Message,
OrderedList: () => OrderedList,
PrimaryButton: () => PrimaryButton,
SecondaryButton: () => SecondaryButton,
UnorderedList: () => UnorderedList,
WarningBadge: () => WarningBadge,

@@ -67,17 +75,12 @@ WhiteBadge: () => WhiteBadge

// src/button/index.tsx
var import_fonts = require("@postenbring/hedwig-tokens/tokens-output/css/fonts.css");
var import_tokens = require("@postenbring/hedwig-tokens/tokens-output/css/tokens.css");
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");
// src/button/button.tsx
var import_clsx = require("clsx");
var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
// src/utils.ts
function warnForStyleOverrides(props) {
if (props.className) {
console.warn("Overriding styles are not premited");
}
if (props.styles) {
console.warn("Overriding styles are not premited");
}
}
// src/button/button.tsx
var import_jsx_runtime = require("react/jsx-runtime");

@@ -91,3 +94,4 @@ function BaseButton(_a) {

fill = "contained",
buttonRef
buttonRef,
className
} = _b, rest = __objRest(_b, [

@@ -99,14 +103,19 @@ "children",

"fill",
"buttonRef"
"buttonRef",
"className"
]);
warnForStyleOverrides(rest);
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"button",
__spreadProps(__spreadValues({
className: (0, import_clsx.clsx)((0, import_typed_classname.t)("hds-button"), (0, import_typed_classname.t)(`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"
}),
className: (0, import_clsx.clsx)(
(0, import_typed_classname.t)("hds-button"),
(0, import_typed_classname.t)(`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"
},
className
),
ref: buttonRef

@@ -128,6 +137,22 @@ }, rest), {

// src/link/link.tsx
// 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
var import_fonts2 = require("@postenbring/hedwig-tokens/tokens-output/css/fonts.css");
var import_tokens2 = require("@postenbring/hedwig-tokens/tokens-output/css/tokens.css");
var import_base2 = require("@postenbring/hedwig-css/dist/base.css");
var import_link = require("@postenbring/hedwig-css/dist/link/link.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");
function Link(_a) {

@@ -145,10 +170,9 @@ var _b = _a, {

]);
warnForStyleOverrides(rest);
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
"a",
__spreadProps(__spreadValues({
className: (0, import_clsx2.clsx)(
(0, import_typed_classname2.t)("hds-link"),
variant !== "underline" && (0, import_typed_classname2.t)(`hds-link--${variant}`),
size !== "medium" && (0, import_typed_classname2.t)(`hds-link--${size}`)
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}`)
),

@@ -163,6 +187,12 @@ ref: anchorRef

// src/badge/index.tsx
var import_fonts3 = require("@postenbring/hedwig-tokens/tokens-output/css/fonts.css");
var import_tokens3 = require("@postenbring/hedwig-tokens/tokens-output/css/tokens.css");
var import_base3 = require("@postenbring/hedwig-css/dist/base.css");
var import_badge = require("@postenbring/hedwig-css/dist/badge/badge.css");
// src/badge/badge.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_clsx4 = require("clsx");
var import_typed_classname4 = require("@postenbring/hedwig-css/typed-classname/index.mjs");
var import_jsx_runtime4 = require("react/jsx-runtime");
function BaseBadge(_a) {

@@ -178,7 +208,6 @@ var _b = _a, {

]);
warnForStyleOverrides(rest);
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
"span",
__spreadProps(__spreadValues({
className: (0, import_clsx3.clsx)((0, import_typed_classname3.t)("hds-badge"), (0, import_typed_classname3.t)(`hds-badge--${size}`), (0, import_typed_classname3.t)(`hds-badge--${variant}`))
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}`))
}, rest), {

@@ -191,40 +220,44 @@ children

function Badge(props) {
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(BaseBadge, __spreadProps(__spreadValues({}, props), { variant: "primary" }));
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(BaseBadge, __spreadProps(__spreadValues({}, props), { variant: "primary" }));
}
Badge.displayName = "Badge";
function DarkBadge(props) {
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(BaseBadge, __spreadProps(__spreadValues({}, props), { variant: "dark" }));
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(BaseBadge, __spreadProps(__spreadValues({}, props), { variant: "dark" }));
}
DarkBadge.displayName = "DarkBadge";
function WhiteBadge(props) {
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(BaseBadge, __spreadProps(__spreadValues({}, props), { variant: "white" }));
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(BaseBadge, __spreadProps(__spreadValues({}, props), { variant: "white" }));
}
WhiteBadge.displayName = "WhiteBadge";
function WarningBadge(props) {
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(BaseBadge, __spreadProps(__spreadValues({}, props), { variant: "warning" }));
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(BaseBadge, __spreadProps(__spreadValues({}, props), { variant: "warning" }));
}
WarningBadge.displayName = "WarningBadge";
// src/list/index.tsx
var import_fonts4 = require("@postenbring/hedwig-tokens/tokens-output/css/fonts.css");
var import_tokens4 = require("@postenbring/hedwig-tokens/tokens-output/css/tokens.css");
var import_base4 = require("@postenbring/hedwig-css/dist/base.css");
var import_description_list = require("@postenbring/hedwig-css/dist/list/description-list.css");
var import_list2 = require("@postenbring/hedwig-css/dist/list/list.css");
// src/list/description-list.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_clsx5 = require("clsx");
var import_typed_classname5 = require("@postenbring/hedwig-css/typed-classname/index.mjs");
var import_jsx_runtime5 = require("react/jsx-runtime");
function DescriptionDetails(_a) {
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
warnForStyleOverrides(rest);
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("dd", __spreadProps(__spreadValues({}, rest), { children }));
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("dd", __spreadProps(__spreadValues({}, rest), { children }));
}
function DescriptionTerm(_a) {
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
warnForStyleOverrides(rest);
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("dt", __spreadProps(__spreadValues({}, rest), { children }));
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("dt", __spreadProps(__spreadValues({}, rest), { children }));
}
function DescriptionList(_a) {
var _b = _a, { variant = "vertical" } = _b, rest = __objRest(_b, ["variant"]);
warnForStyleOverrides(rest);
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
"dl",
__spreadValues({
className: (0, import_clsx4.clsx)((0, import_typed_classname4.t)("hds-description-list"), {
[(0, import_typed_classname4.t)("hds-description-list--horizontal")]: variant === "horizontal"
className: (0, import_clsx5.clsx)((0, import_typed_classname5.t)("hds-description-list"), {
[(0, import_typed_classname5.t)("hds-description-list--horizontal")]: variant === "horizontal"
})

@@ -237,5 +270,163 @@ }, rest)

DescriptionDetails.displayName = "DescriptionDetails";
// 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");
function BaseList(_a) {
var _b = _a, {
as: ListTag = "ul",
children,
listStyle = "inherit",
size = "medium"
} = _b, rest = __objRest(_b, [
"as",
"children",
"listStyle",
"size"
]);
return /* @__PURE__ */ (0, import_jsx_runtime6.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"
})
}, rest), {
children
})
);
}
function UnorderedList(props) {
return /* @__PURE__ */ (0, import_jsx_runtime6.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 }));
}
BaseList.displayName = "BaseList";
OrderedList.displayName = "UnorderedList";
UnorderedList.displayName = "UnorderedList";
// src/list/link-list.tsx
var import_jsx_runtime7 = require("react/jsx-runtime");
function LinkList(props) {
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(UnorderedList, __spreadProps(__spreadValues({ listStyle: "no-bullets" }, props), { children: props.children }));
}
LinkList.displayName = "LinkList";
// src/box/index.tsx
var import_fonts5 = require("@postenbring/hedwig-tokens/tokens-output/css/fonts.css");
var import_tokens5 = require("@postenbring/hedwig-tokens/tokens-output/css/tokens.css");
var import_base5 = require("@postenbring/hedwig-css/dist/base.css");
var import_box = require("@postenbring/hedwig-css/dist/box/box.css");
var import_message = require("@postenbring/hedwig-css/dist/message/message.css");
// src/box/box.tsx
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 Box = (0, import_react.forwardRef)(
(_a, ref) => {
var _b = _a, {
as: Component = "div",
variant = "light-grey",
hideCloseButton,
onClose: onCloseProp,
closed: closedProp,
closeButtonProps,
children,
className
} = _b, rest = __objRest(_b, [
"as",
"variant",
"hideCloseButton",
"onClose",
"closed",
"closeButtonProps",
"children",
"className"
]);
const [closedState, setClosedState] = (0, import_react.useState)(false);
const onClose = (0, import_react.useCallback)(() => {
if (onCloseProp) {
const result = onCloseProp();
if (result === true) {
setClosedState(true);
}
} else {
setClosedState(true);
}
}, []);
const closed = closedProp != null ? closedProp : closedState;
return /* @__PURE__ */ (0, import_jsx_runtime8.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
),
ref
}, rest), {
children: [
!hideCloseButton && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(BoxCloseButton, __spreadValues({ onClick: onClose }, closeButtonProps)),
children
]
})
);
}
);
Box.displayName = "Box";
var BoxCloseButton = (0, import_react.forwardRef)(
(_a, ref) => {
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
"button",
__spreadValues({
className: (0, import_clsx7.clsx)((0, import_typed_classname7.t)("hds-box__close-button"), className),
ref,
type: "button"
}, rest)
);
}
);
BoxCloseButton.displayName = "BoxCloseButton";
// src/message/index.tsx
var import_fonts6 = require("@postenbring/hedwig-tokens/tokens-output/css/fonts.css");
var import_tokens6 = require("@postenbring/hedwig-tokens/tokens-output/css/tokens.css");
var import_base6 = require("@postenbring/hedwig-css/dist/base.css");
var import_box3 = require("@postenbring/hedwig-css/dist/box/box.css");
var import_message2 = require("@postenbring/hedwig-css/dist/message/message.css");
// src/message/message.tsx
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 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)(
Box,
__spreadProps(__spreadValues({
className: (0, import_clsx8.clsx)((0, import_typed_classname8.t)(`hds-message`), (0, import_typed_classname8.t)(`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 }),
children
]
})
);
}
);
Message.displayName = "Message";
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
Badge,
BaseButton,
Box,
BoxCloseButton,
DarkBadge,

@@ -245,7 +436,12 @@ DescriptionDetails,

DescriptionTerm,
IconButton,
Link,
LinkList,
Message,
OrderedList,
PrimaryButton,
SecondaryButton,
UnorderedList,
WarningBadge,
WhiteBadge
});

@@ -63,14 +63,2 @@ "use strict";

var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
// src/utils.ts
function warnForStyleOverrides(props) {
if (props.className) {
console.warn("Overriding styles are not premited");
}
if (props.styles) {
console.warn("Overriding styles are not premited");
}
}
// src/link/link.tsx
var import_jsx_runtime = require("react/jsx-runtime");

@@ -89,3 +77,2 @@ function Link(_a) {

]);
warnForStyleOverrides(rest);
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(

@@ -92,0 +79,0 @@ "a",

import * as react_jsx_runtime from 'react/jsx-runtime';
import * as React from 'react';
interface LinkProps extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "className" | "style"> {
interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
/**

@@ -6,0 +6,0 @@ * The visual style of the link

@@ -57,14 +57,2 @@ "use strict";

var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
// src/utils.ts
function warnForStyleOverrides(props) {
if (props.className) {
console.warn("Overriding styles are not premited");
}
if (props.styles) {
console.warn("Overriding styles are not premited");
}
}
// src/link/link.tsx
var import_jsx_runtime = require("react/jsx-runtime");

@@ -83,3 +71,2 @@ function Link(_a) {

]);
warnForStyleOverrides(rest);
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(

@@ -86,0 +73,0 @@ "a",

import * as react_jsx_runtime from 'react/jsx-runtime';
import React__default, { ReactNode, HTMLAttributes } from 'react';
import { HTMLAttributes, ReactNode } from 'react';
type DescriptionDetailsProps = DLDTProps;
type DescriptionTermProps = DLDTProps;
interface DLDTProps extends Omit<React__default.HTMLAttributes<HTMLBaseElement>, "className" | "style"> {
interface DLDTProps extends HTMLAttributes<HTMLBaseElement> {
children: ReactNode;
}
interface DescriptionListProps extends Omit<HTMLAttributes<HTMLDListElement>, "className" | "style"> {
interface DescriptionListProps extends HTMLAttributes<HTMLDListElement> {
/**

@@ -11,0 +11,0 @@ * Either `DescriptionDetails` or `DescriptionTerm` elements

@@ -60,18 +60,5 @@ "use strict";

var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
// src/utils.ts
function warnForStyleOverrides(props) {
if (props.className) {
console.warn("Overriding styles are not premited");
}
if (props.styles) {
console.warn("Overriding styles are not premited");
}
}
// src/list/description-list.tsx
var import_jsx_runtime = require("react/jsx-runtime");
function DescriptionDetails(_a) {
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
warnForStyleOverrides(rest);
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("dd", __spreadProps(__spreadValues({}, rest), { children }));

@@ -81,3 +68,2 @@ }

var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
warnForStyleOverrides(rest);
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("dt", __spreadProps(__spreadValues({}, rest), { children }));

@@ -87,3 +73,2 @@ }

var _b = _a, { variant = "vertical" } = _b, rest = __objRest(_b, ["variant"]);
warnForStyleOverrides(rest);
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(

@@ -90,0 +75,0 @@ "dl",

export { DescriptionDetails, DescriptionDetailsProps, default as DescriptionList, DescriptionListProps, DescriptionTerm, DescriptionTermProps } from './description-list.js';
export { ListProps, OrderedList, UnorderedList } from './list.js';
export { LinkList, LinkListProps } from './link-list.js';
import 'react/jsx-runtime';
import 'react';

@@ -54,3 +54,6 @@ "use strict";

DescriptionList: () => DescriptionList,
DescriptionTerm: () => DescriptionTerm
DescriptionTerm: () => DescriptionTerm,
LinkList: () => LinkList,
OrderedList: () => OrderedList,
UnorderedList: () => UnorderedList
});

@@ -62,2 +65,3 @@ module.exports = __toCommonJS(list_exports);

var import_description_list = require("@postenbring/hedwig-css/dist/list/description-list.css");
var import_list2 = require("@postenbring/hedwig-css/dist/list/list.css");

@@ -67,18 +71,5 @@ // src/list/description-list.tsx

var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
// src/utils.ts
function warnForStyleOverrides(props) {
if (props.className) {
console.warn("Overriding styles are not premited");
}
if (props.styles) {
console.warn("Overriding styles are not premited");
}
}
// src/list/description-list.tsx
var import_jsx_runtime = require("react/jsx-runtime");
function DescriptionDetails(_a) {
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
warnForStyleOverrides(rest);
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("dd", __spreadProps(__spreadValues({}, rest), { children }));

@@ -88,3 +79,2 @@ }

var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
warnForStyleOverrides(rest);
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("dt", __spreadProps(__spreadValues({}, rest), { children }));

@@ -94,3 +84,2 @@ }

var _b = _a, { variant = "vertical" } = _b, rest = __objRest(_b, ["variant"]);
warnForStyleOverrides(rest);
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(

@@ -108,2 +97,46 @@ "dl",

DescriptionDetails.displayName = "DescriptionDetails";
// src/list/list.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 BaseList(_a) {
var _b = _a, {
as: ListTag = "ul",
children,
listStyle = "inherit",
size = "medium"
} = _b, rest = __objRest(_b, [
"as",
"children",
"listStyle",
"size"
]);
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
ListTag,
__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"
})
}, rest), {
children
})
);
}
function UnorderedList(props) {
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(BaseList, __spreadProps(__spreadValues({ as: "ul" }, props), { children: props.children }));
}
function OrderedList(props) {
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(BaseList, __spreadProps(__spreadValues({ as: "ol" }, props), { children: props.children }));
}
BaseList.displayName = "BaseList";
OrderedList.displayName = "UnorderedList";
UnorderedList.displayName = "UnorderedList";
// src/list/link-list.tsx
var import_jsx_runtime3 = require("react/jsx-runtime");
function LinkList(props) {
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(UnorderedList, __spreadProps(__spreadValues({ listStyle: "no-bullets" }, props), { children: props.children }));
}
LinkList.displayName = "LinkList";
// Annotate the CommonJS export names for ESM import in node:

@@ -113,3 +146,6 @@ 0 && (module.exports = {

DescriptionList,
DescriptionTerm
DescriptionTerm,
LinkList,
OrderedList,
UnorderedList
});
{
"name": "@postenbring/hedwig-react",
"version": "0.0.0-font-size-and-line-height-with-min-max-fluid-20231117121357",
"version": "0.0.0-icon-button-C0L88PWY-20231125000521",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"sideEffects": false,
"sideEffects": true,
"license": "MIT",

@@ -12,26 +12,26 @@ "files": [

],
"scripts": {
"build": "tsup --format esm,cjs --dts --external react",
"dev": "tsup --format esm,cjs --watch --dts --external react",
"lint": "eslint src/",
"typecheck": "tsc --noEmit",
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
},
"devDependencies": {
"@types/react": "^18.2.37",
"@types/react-dom": "^18.2.15",
"eslint-config-custom": "*",
"hedwig-tsconfig": "*",
"react": "^18.2.0",
"tsup": "^7.3.0",
"typescript": "^5.2.2"
"tsup": "^8.0.1",
"typescript": "^5.2.2",
"eslint-config-custom": "0.0.0-icon-button-C0L88PWY-20231125000521",
"hedwig-tsconfig": "0.0.0"
},
"dependencies": {
"@postenbring/hedwig-css": "0.0.0-font-size-and-line-height-with-min-max-fluid-20231117121357",
"@postenbring/hedwig-tokens": "0.0.0-font-size-and-line-height-with-min-max-fluid-20231117121357",
"clsx": "^2.0.0"
"clsx": "^2.0.0",
"@postenbring/hedwig-css": "0.0.0-icon-button-C0L88PWY-20231125000521",
"@postenbring/hedwig-tokens": "0.0.0-icon-button-C0L88PWY-20231125000521"
},
"publishConfig": {
"access": "public"
},
"scripts": {
"build": "tsup --format esm,cjs --dts --external react",
"dev": "tsup --format esm,cjs --watch --dts --external react",
"lint": "eslint src/",
"typecheck": "tsc --noEmit",
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
}
}
}

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc