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
476
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-box-pEjLq4Vx-20231121084506 to 0.0.0-convert-link-to-pure-css-XUJw4VAo-20231121203059

dist/chunk-4M56UIIY.mjs

4

dist/index.d.ts

@@ -5,6 +5,4 @@ export { ButtonProps, PrimaryButton, SecondaryButton } from './button/button.js';

export { DescriptionDetails, DescriptionDetailsProps, default as DescriptionList, DescriptionListProps, DescriptionTerm, DescriptionTermProps } from './list/description-list.js';
export { ListItem, ListItemProps, ListProps, OrderedList, UnorderedList } from './list/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';
export { ListItem, ListItemProps, ListProps, OrderedList, UnorderedList } from './list/index.js';
import 'react/jsx-runtime';
import 'react';

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

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

@@ -62,3 +60,2 @@ DescriptionDetails: () => DescriptionDetails,

ListItem: () => ListItem,
Message: () => Message,
OrderedList: () => OrderedList,

@@ -279,104 +276,5 @@ PrimaryButton: () => PrimaryButton,

UnorderedList.displayName = "UnorderedList";
// src/box/box.tsx
var import_react = require("react");
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 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_runtime6.jsxs)(
Component,
__spreadProps(__spreadValues({
className: (0, import_clsx6.clsx)(
(0, import_typed_classname6.t)("hds-box"),
(0, import_typed_classname6.t)(`hds-box--${variant}`),
{ [(0, import_typed_classname6.t)("hds-box--closed")]: closed },
className
),
ref
}, rest), {
children: [
!hideCloseButton && /* @__PURE__ */ (0, import_jsx_runtime6.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_runtime6.jsx)(
"button",
__spreadValues({
className: (0, import_clsx6.clsx)((0, import_typed_classname6.t)("hds-box__close-button"), className),
ref,
type: "button"
}, rest)
);
}
);
BoxCloseButton.displayName = "BoxCloseButton";
// src/message/message.tsx
var import_react2 = require("react");
var import_clsx7 = require("clsx");
var import_typed_classname7 = require("@postenbring/hedwig-css/typed-classname/index.mjs");
var import_jsx_runtime7 = 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_runtime7.jsxs)(
Box,
__spreadProps(__spreadValues({
className: (0, import_clsx7.clsx)((0, import_typed_classname7.t)(`hds-message`), (0, import_typed_classname7.t)(`hds-message--${variant}`), className),
ref
}, rest), {
children: [
variant === "neutral" && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: (0, import_clsx7.clsx)((0, import_typed_classname7.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,
Box,
BoxCloseButton,
DarkBadge,

@@ -388,3 +286,2 @@ DescriptionDetails,

ListItem,
Message,
OrderedList,

@@ -391,0 +288,0 @@ PrimaryButton,

export { DescriptionDetails, DescriptionDetailsProps, default as DescriptionList, DescriptionListProps, DescriptionTerm, DescriptionTermProps } from './description-list.js';
export { ListItem, ListItemProps, ListProps, OrderedList, UnorderedList } from './list.js';
import 'react/jsx-runtime';
import 'react';
import * as react_jsx_runtime from 'react/jsx-runtime';
import * as React from 'react';
import { HTMLAttributes } from 'react';
interface ListItemProps extends Omit<React.HTMLAttributes<HTMLLIElement>, "className" | "style"> {
children: React.ReactNode;
}
interface ListProps extends Omit<HTMLAttributes<HTMLOListElement | HTMLUListElement>, "className" | "style"> {
children: React.ReactElement<ListItemProps> | React.ReactElement<ListItemProps>[];
/**
* Inherit list styles or do not show these
*/
listStyle?: "inherit" | "no-bullets";
/**
* Sets the size of the items (font)
*/
size?: "small" | "medium" | "large";
}
declare function ListItem({ children, ...rest }: ListItemProps): react_jsx_runtime.JSX.Element;
declare namespace ListItem {
var displayName: string;
}
declare function UnorderedList(props: ListProps): react_jsx_runtime.JSX.Element;
declare namespace UnorderedList {
var displayName: string;
}
declare function OrderedList(props: ListProps): react_jsx_runtime.JSX.Element;
declare namespace OrderedList {
var displayName: string;
}
export { ListItem, type ListItemProps, type ListProps, OrderedList, UnorderedList };
{
"name": "@postenbring/hedwig-react",
"version": "0.0.0-box-pEjLq4Vx-20231121084506",
"version": "0.0.0-convert-link-to-pure-css-XUJw4VAo-20231121203059",
"main": "./dist/index.js",

@@ -29,4 +29,4 @@ "module": "./dist/index.mjs",

"dependencies": {
"@postenbring/hedwig-css": "0.0.0-box-pEjLq4Vx-20231121084506",
"@postenbring/hedwig-tokens": "0.0.0-box-pEjLq4Vx-20231121084506",
"@postenbring/hedwig-css": "0.0.0-convert-link-to-pure-css-XUJw4VAo-20231121203059",
"@postenbring/hedwig-tokens": "0.0.0-convert-link-to-pure-css-XUJw4VAo-20231121203059",
"clsx": "^2.0.0"

@@ -33,0 +33,0 @@ },

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