@postenbring/hedwig-react 0.0.13 → 0.0.15

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.
@@ -0,0 +1,48 @@
1
+ import {
2
+ __objRest,
3
+ __spreadProps,
4
+ __spreadValues
5
+ } from "./chunk-FUJQIYOF.mjs";
6
+
7
+ // src/dropdown/dropdown.tsx
8
+ import { clsx } from "@postenbring/hedwig-css/typed-classname/index.mjs";
9
+ import { jsx, jsxs } from "react/jsx-runtime";
10
+ function Dropdown(_a) {
11
+ var _b = _a, {
12
+ label,
13
+ variant,
14
+ errorMessage,
15
+ className,
16
+ children
17
+ } = _b, rest = __objRest(_b, [
18
+ "label",
19
+ "variant",
20
+ "errorMessage",
21
+ "className",
22
+ "children"
23
+ ]);
24
+ return /* @__PURE__ */ jsxs("label", { className: clsx("hds-dropdown__label", { "hds-dropdown--error": errorMessage }), children: [
25
+ label,
26
+ /* @__PURE__ */ jsx(
27
+ "select",
28
+ __spreadProps(__spreadValues({
29
+ className: clsx(
30
+ "hds-dropdown",
31
+ {
32
+ [`hds-dropdown--${variant}`]: variant,
33
+ "hds-dropdown--error": errorMessage
34
+ },
35
+ className
36
+ )
37
+ }, rest), {
38
+ children
39
+ })
40
+ ),
41
+ errorMessage ? /* @__PURE__ */ jsx("div", { className: "hds-dropdown-message", children: errorMessage }) : null
42
+ ] });
43
+ }
44
+ Dropdown.displayName = "Dropdown";
45
+
46
+ export {
47
+ Dropdown
48
+ };
@@ -0,0 +1,78 @@
1
+ import {
2
+ Box
3
+ } from "./chunk-RXUPE4MM.mjs";
4
+ import {
5
+ __objRest,
6
+ __spreadProps,
7
+ __spreadValues
8
+ } from "./chunk-FUJQIYOF.mjs";
9
+
10
+ // src/modal/modal.tsx
11
+ import { forwardRef, useRef } from "react";
12
+ import { clsx } from "@postenbring/hedwig-css/typed-classname/index.mjs";
13
+
14
+ // src/utils.ts
15
+ import * as React from "react";
16
+ function useMergeRefs(refs) {
17
+ return React.useMemo(() => {
18
+ if (refs.every((ref) => ref === null)) {
19
+ return null;
20
+ }
21
+ return (value) => {
22
+ refs.forEach((ref) => {
23
+ if (typeof ref === "function") {
24
+ ref(value);
25
+ } else if (ref !== null) {
26
+ ref.current = value;
27
+ }
28
+ });
29
+ };
30
+ }, refs);
31
+ }
32
+
33
+ // src/modal/modal.tsx
34
+ import { jsx } from "react/jsx-runtime";
35
+ var Modal = forwardRef(
36
+ (_a, ref) => {
37
+ var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
38
+ const modalRef = useRef(null);
39
+ const mergedRef = useMergeRefs([modalRef, ref]);
40
+ function onClose() {
41
+ var _a2;
42
+ (_a2 = modalRef.current) == null ? void 0 : _a2.close();
43
+ return false;
44
+ }
45
+ return /* @__PURE__ */ jsx(
46
+ Box,
47
+ __spreadProps(__spreadValues({
48
+ as: "dialog",
49
+ className: clsx("hds-modal", className),
50
+ closeable: true,
51
+ onClose,
52
+ ref: mergedRef,
53
+ variant: "white"
54
+ }, rest), {
55
+ children
56
+ })
57
+ );
58
+ }
59
+ );
60
+ Modal.displayName = "Modal";
61
+ var ModalHeader = forwardRef(
62
+ (_a, ref) => {
63
+ var _b = _a, { as: Component = "h1", className } = _b, rest = __objRest(_b, ["as", "className"]);
64
+ return /* @__PURE__ */ jsx(
65
+ Component,
66
+ __spreadValues({
67
+ className: clsx("hds-modal__header", className),
68
+ ref
69
+ }, rest)
70
+ );
71
+ }
72
+ );
73
+ ModalHeader.displayName = "ModalHeader";
74
+
75
+ export {
76
+ Modal,
77
+ ModalHeader
78
+ };
@@ -0,0 +1,5 @@
1
+ // src/dropdown/index.tsx
2
+ import "@postenbring/hedwig-css/dist/fonts.css";
3
+ import "@postenbring/hedwig-css/dist/tokens.css";
4
+ import "@postenbring/hedwig-css/dist/base.css";
5
+ import "@postenbring/hedwig-css/dist/dropdown.css";
@@ -0,0 +1,18 @@
1
+ import {
2
+ Modal,
3
+ ModalHeader
4
+ } from "./chunk-FFQBRM3W.mjs";
5
+
6
+ // src/modal/index.tsx
7
+ import "@postenbring/hedwig-css/dist/fonts.css";
8
+ import "@postenbring/hedwig-css/dist/tokens.css";
9
+ import "@postenbring/hedwig-css/dist/base.css";
10
+ import "@postenbring/hedwig-css/dist/box.css";
11
+ import "@postenbring/hedwig-css/dist/modal.css";
12
+ var ModalComponent = Modal;
13
+ ModalComponent.Header = ModalHeader;
14
+ ModalComponent.Header.displayName = "Modal";
15
+
16
+ export {
17
+ ModalComponent
18
+ };
@@ -0,0 +1,15 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+
4
+ interface DropdownProps extends Omit<React.SelectHTMLAttributes<HTMLSelectElement>, "children"> {
5
+ label: string;
6
+ variant: "default" | "white" | "lined";
7
+ errorMessage?: string;
8
+ children: React.ReactNode;
9
+ }
10
+ declare function Dropdown({ label, variant, errorMessage, className, children, ...rest }: DropdownProps): react_jsx_runtime.JSX.Element;
11
+ declare namespace Dropdown {
12
+ var displayName: string;
13
+ }
14
+
15
+ export { Dropdown, type DropdownProps };
@@ -0,0 +1,15 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+
4
+ interface DropdownProps extends Omit<React.SelectHTMLAttributes<HTMLSelectElement>, "children"> {
5
+ label: string;
6
+ variant: "default" | "white" | "lined";
7
+ errorMessage?: string;
8
+ children: React.ReactNode;
9
+ }
10
+ declare function Dropdown({ label, variant, errorMessage, className, children, ...rest }: DropdownProps): react_jsx_runtime.JSX.Element;
11
+ declare namespace Dropdown {
12
+ var displayName: string;
13
+ }
14
+
15
+ export { Dropdown, type DropdownProps };
@@ -0,0 +1,95 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __defProps = Object.defineProperties;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
10
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11
+ var __spreadValues = (a, b) => {
12
+ for (var prop in b || (b = {}))
13
+ if (__hasOwnProp.call(b, prop))
14
+ __defNormalProp(a, prop, b[prop]);
15
+ if (__getOwnPropSymbols)
16
+ for (var prop of __getOwnPropSymbols(b)) {
17
+ if (__propIsEnum.call(b, prop))
18
+ __defNormalProp(a, prop, b[prop]);
19
+ }
20
+ return a;
21
+ };
22
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
23
+ var __objRest = (source, exclude) => {
24
+ var target = {};
25
+ for (var prop in source)
26
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
27
+ target[prop] = source[prop];
28
+ if (source != null && __getOwnPropSymbols)
29
+ for (var prop of __getOwnPropSymbols(source)) {
30
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
31
+ target[prop] = source[prop];
32
+ }
33
+ return target;
34
+ };
35
+ var __export = (target, all) => {
36
+ for (var name in all)
37
+ __defProp(target, name, { get: all[name], enumerable: true });
38
+ };
39
+ var __copyProps = (to, from, except, desc) => {
40
+ if (from && typeof from === "object" || typeof from === "function") {
41
+ for (let key of __getOwnPropNames(from))
42
+ if (!__hasOwnProp.call(to, key) && key !== except)
43
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
44
+ }
45
+ return to;
46
+ };
47
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
48
+
49
+ // src/dropdown/dropdown.tsx
50
+ var dropdown_exports = {};
51
+ __export(dropdown_exports, {
52
+ Dropdown: () => Dropdown
53
+ });
54
+ module.exports = __toCommonJS(dropdown_exports);
55
+ var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
56
+ var import_jsx_runtime = require("react/jsx-runtime");
57
+ function Dropdown(_a) {
58
+ var _b = _a, {
59
+ label,
60
+ variant,
61
+ errorMessage,
62
+ className,
63
+ children
64
+ } = _b, rest = __objRest(_b, [
65
+ "label",
66
+ "variant",
67
+ "errorMessage",
68
+ "className",
69
+ "children"
70
+ ]);
71
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", { className: (0, import_typed_classname.clsx)("hds-dropdown__label", { "hds-dropdown--error": errorMessage }), children: [
72
+ label,
73
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
74
+ "select",
75
+ __spreadProps(__spreadValues({
76
+ className: (0, import_typed_classname.clsx)(
77
+ "hds-dropdown",
78
+ {
79
+ [`hds-dropdown--${variant}`]: variant,
80
+ "hds-dropdown--error": errorMessage
81
+ },
82
+ className
83
+ )
84
+ }, rest), {
85
+ children
86
+ })
87
+ ),
88
+ errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "hds-dropdown-message", children: errorMessage }) : null
89
+ ] });
90
+ }
91
+ Dropdown.displayName = "Dropdown";
92
+ // Annotate the CommonJS export names for ESM import in node:
93
+ 0 && (module.exports = {
94
+ Dropdown
95
+ });
@@ -0,0 +1,7 @@
1
+ import {
2
+ Dropdown
3
+ } from "../chunk-3VUAKZB2.mjs";
4
+ import "../chunk-FUJQIYOF.mjs";
5
+ export {
6
+ Dropdown
7
+ };
@@ -0,0 +1,3 @@
1
+ export { Dropdown, DropdownProps } from './dropdown.mjs';
2
+ import 'react/jsx-runtime';
3
+ import 'react';
@@ -0,0 +1,3 @@
1
+ export { Dropdown, DropdownProps } from './dropdown.js';
2
+ import 'react/jsx-runtime';
3
+ import 'react';
@@ -0,0 +1,101 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __defProps = Object.defineProperties;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
10
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11
+ var __spreadValues = (a, b) => {
12
+ for (var prop in b || (b = {}))
13
+ if (__hasOwnProp.call(b, prop))
14
+ __defNormalProp(a, prop, b[prop]);
15
+ if (__getOwnPropSymbols)
16
+ for (var prop of __getOwnPropSymbols(b)) {
17
+ if (__propIsEnum.call(b, prop))
18
+ __defNormalProp(a, prop, b[prop]);
19
+ }
20
+ return a;
21
+ };
22
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
23
+ var __objRest = (source, exclude) => {
24
+ var target = {};
25
+ for (var prop in source)
26
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
27
+ target[prop] = source[prop];
28
+ if (source != null && __getOwnPropSymbols)
29
+ for (var prop of __getOwnPropSymbols(source)) {
30
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
31
+ target[prop] = source[prop];
32
+ }
33
+ return target;
34
+ };
35
+ var __export = (target, all) => {
36
+ for (var name in all)
37
+ __defProp(target, name, { get: all[name], enumerable: true });
38
+ };
39
+ var __copyProps = (to, from, except, desc) => {
40
+ if (from && typeof from === "object" || typeof from === "function") {
41
+ for (let key of __getOwnPropNames(from))
42
+ if (!__hasOwnProp.call(to, key) && key !== except)
43
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
44
+ }
45
+ return to;
46
+ };
47
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
48
+
49
+ // src/dropdown/index.tsx
50
+ var dropdown_exports = {};
51
+ __export(dropdown_exports, {
52
+ Dropdown: () => Dropdown
53
+ });
54
+ module.exports = __toCommonJS(dropdown_exports);
55
+ var import_fonts = require("@postenbring/hedwig-css/dist/fonts.css");
56
+ var import_tokens = require("@postenbring/hedwig-css/dist/tokens.css");
57
+ var import_base = require("@postenbring/hedwig-css/dist/base.css");
58
+ var import_dropdown = require("@postenbring/hedwig-css/dist/dropdown.css");
59
+
60
+ // src/dropdown/dropdown.tsx
61
+ var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
62
+ var import_jsx_runtime = require("react/jsx-runtime");
63
+ function Dropdown(_a) {
64
+ var _b = _a, {
65
+ label,
66
+ variant,
67
+ errorMessage,
68
+ className,
69
+ children
70
+ } = _b, rest = __objRest(_b, [
71
+ "label",
72
+ "variant",
73
+ "errorMessage",
74
+ "className",
75
+ "children"
76
+ ]);
77
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", { className: (0, import_typed_classname.clsx)("hds-dropdown__label", { "hds-dropdown--error": errorMessage }), children: [
78
+ label,
79
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
80
+ "select",
81
+ __spreadProps(__spreadValues({
82
+ className: (0, import_typed_classname.clsx)(
83
+ "hds-dropdown",
84
+ {
85
+ [`hds-dropdown--${variant}`]: variant,
86
+ "hds-dropdown--error": errorMessage
87
+ },
88
+ className
89
+ )
90
+ }, rest), {
91
+ children
92
+ })
93
+ ),
94
+ errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "hds-dropdown-message", children: errorMessage }) : null
95
+ ] });
96
+ }
97
+ Dropdown.displayName = "Dropdown";
98
+ // Annotate the CommonJS export names for ESM import in node:
99
+ 0 && (module.exports = {
100
+ Dropdown
101
+ });
@@ -0,0 +1,8 @@
1
+ import "../chunk-JNIAIH63.mjs";
2
+ import {
3
+ Dropdown
4
+ } from "../chunk-3VUAKZB2.mjs";
5
+ import "../chunk-FUJQIYOF.mjs";
6
+ export {
7
+ Dropdown
8
+ };
package/dist/index.d.mts CHANGED
@@ -10,8 +10,11 @@ export { Accordion, AccordionProps } from './accordion/accordion.mjs';
10
10
  export { AccordionItem, AccordionItemChildrenType, AccordionItemProps } from './accordion/accordion-item.mjs';
11
11
  export { AccordionTrigger, AccordionTriggerProps } from './accordion/accordion-item-trigger.mjs';
12
12
  export { AccordionContent, AccordionContentProps } from './accordion/accordion-item-content.mjs';
13
+ export { Dropdown, DropdownProps } from './dropdown/dropdown.mjs';
14
+ export { Modal } from './modal/index.mjs';
13
15
  export { Breadcrumbs, BreadcrumbsProps } from './breadcrumb/breadcrumb.mjs';
14
16
  export { MessageDescription, MessageTitle } from './message/message.mjs';
17
+ export { ModalHeader } from './modal/modal.mjs';
15
18
  import './utils-BfZsjuFH.mjs';
16
19
  import 'react';
17
20
  import 'react/jsx-runtime';
package/dist/index.d.ts CHANGED
@@ -10,8 +10,11 @@ export { Accordion, AccordionProps } from './accordion/accordion.js';
10
10
  export { AccordionItem, AccordionItemChildrenType, AccordionItemProps } from './accordion/accordion-item.js';
11
11
  export { AccordionTrigger, AccordionTriggerProps } from './accordion/accordion-item-trigger.js';
12
12
  export { AccordionContent, AccordionContentProps } from './accordion/accordion-item-content.js';
13
+ export { Dropdown, DropdownProps } from './dropdown/dropdown.js';
14
+ export { Modal } from './modal/index.js';
13
15
  export { Breadcrumbs, BreadcrumbsProps } from './breadcrumb/breadcrumb.js';
14
16
  export { MessageDescription, MessageTitle } from './message/message.js';
17
+ export { ModalHeader } from './modal/modal.js';
15
18
  import './utils-BfZsjuFH.js';
16
19
  import 'react';
17
20
  import 'react/jsx-runtime';
package/dist/index.js CHANGED
@@ -1,10 +1,12 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __defProps = Object.defineProperties;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
6
7
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
8
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
+ var __getProtoOf = Object.getPrototypeOf;
8
10
  var __hasOwnProp = Object.prototype.hasOwnProperty;
9
11
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
10
12
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
@@ -44,6 +46,14 @@ var __copyProps = (to, from, except, desc) => {
44
46
  }
45
47
  return to;
46
48
  };
49
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
50
+ // If the importer is in node compatibility mode or this is not an ESM
51
+ // file that has been converted to a CommonJS file using a Babel-
52
+ // compatible transform (i.e. "__esModule" has not been set), then set
53
+ // "default" to the CommonJS "module.exports" for node compatibility.
54
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
55
+ mod
56
+ ));
47
57
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
48
58
 
49
59
  // src/index.tsx
@@ -62,11 +72,14 @@ __export(src_exports, {
62
72
  DescriptionDetails: () => DescriptionDetails,
63
73
  DescriptionList: () => DescriptionList,
64
74
  DescriptionTerm: () => DescriptionTerm,
75
+ Dropdown: () => Dropdown,
65
76
  Link: () => Link,
66
77
  LinkList: () => LinkList,
67
78
  Message: () => MessageComponent,
68
79
  MessageDescription: () => MessageDescription,
69
80
  MessageTitle: () => MessageTitle,
81
+ Modal: () => ModalComponent,
82
+ ModalHeader: () => ModalHeader,
70
83
  OrderedList: () => OrderedList,
71
84
  PrimaryButton: () => PrimaryButton,
72
85
  SecondaryButton: () => SecondaryButton,
@@ -629,17 +642,139 @@ var AccordionContent = (0, import_react9.forwardRef)((_a, ref) => {
629
642
  });
630
643
  AccordionContent.displayName = "AccordionContent";
631
644
 
632
- // src/breadcrumb/index.tsx
645
+ // src/dropdown/index.tsx
633
646
  var import_fonts8 = require("@postenbring/hedwig-css/dist/fonts.css");
634
647
  var import_tokens8 = require("@postenbring/hedwig-css/dist/tokens.css");
635
648
  var import_base8 = require("@postenbring/hedwig-css/dist/base.css");
636
- var import_breadcrumb = require("@postenbring/hedwig-css/dist/breadcrumb.css");
649
+ var import_dropdown = require("@postenbring/hedwig-css/dist/dropdown.css");
637
650
 
638
- // src/breadcrumb/breadcrumb.tsx
651
+ // src/dropdown/dropdown.tsx
639
652
  var import_typed_classname12 = require("@postenbring/hedwig-css/typed-classname/index.mjs");
640
653
  var import_jsx_runtime13 = require("react/jsx-runtime");
654
+ function Dropdown(_a) {
655
+ var _b = _a, {
656
+ label,
657
+ variant,
658
+ errorMessage,
659
+ className,
660
+ children
661
+ } = _b, rest = __objRest(_b, [
662
+ "label",
663
+ "variant",
664
+ "errorMessage",
665
+ "className",
666
+ "children"
667
+ ]);
668
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("label", { className: (0, import_typed_classname12.clsx)("hds-dropdown__label", { "hds-dropdown--error": errorMessage }), children: [
669
+ label,
670
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
671
+ "select",
672
+ __spreadProps(__spreadValues({
673
+ className: (0, import_typed_classname12.clsx)(
674
+ "hds-dropdown",
675
+ {
676
+ [`hds-dropdown--${variant}`]: variant,
677
+ "hds-dropdown--error": errorMessage
678
+ },
679
+ className
680
+ )
681
+ }, rest), {
682
+ children
683
+ })
684
+ ),
685
+ errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "hds-dropdown-message", children: errorMessage }) : null
686
+ ] });
687
+ }
688
+ Dropdown.displayName = "Dropdown";
689
+
690
+ // src/modal/index.tsx
691
+ var import_fonts9 = require("@postenbring/hedwig-css/dist/fonts.css");
692
+ var import_tokens9 = require("@postenbring/hedwig-css/dist/tokens.css");
693
+ var import_base9 = require("@postenbring/hedwig-css/dist/base.css");
694
+ var import_box5 = require("@postenbring/hedwig-css/dist/box.css");
695
+ var import_modal = require("@postenbring/hedwig-css/dist/modal.css");
696
+
697
+ // src/modal/modal.tsx
698
+ var import_react10 = require("react");
699
+ var import_typed_classname13 = require("@postenbring/hedwig-css/typed-classname/index.mjs");
700
+
701
+ // src/utils.ts
702
+ var React2 = __toESM(require("react"));
703
+ function useMergeRefs(refs) {
704
+ return React2.useMemo(() => {
705
+ if (refs.every((ref) => ref === null)) {
706
+ return null;
707
+ }
708
+ return (value) => {
709
+ refs.forEach((ref) => {
710
+ if (typeof ref === "function") {
711
+ ref(value);
712
+ } else if (ref !== null) {
713
+ ref.current = value;
714
+ }
715
+ });
716
+ };
717
+ }, refs);
718
+ }
719
+
720
+ // src/modal/modal.tsx
721
+ var import_jsx_runtime14 = require("react/jsx-runtime");
722
+ var Modal = (0, import_react10.forwardRef)(
723
+ (_a, ref) => {
724
+ var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
725
+ const modalRef = (0, import_react10.useRef)(null);
726
+ const mergedRef = useMergeRefs([modalRef, ref]);
727
+ function onClose() {
728
+ var _a2;
729
+ (_a2 = modalRef.current) == null ? void 0 : _a2.close();
730
+ return false;
731
+ }
732
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
733
+ Box,
734
+ __spreadProps(__spreadValues({
735
+ as: "dialog",
736
+ className: (0, import_typed_classname13.clsx)("hds-modal", className),
737
+ closeable: true,
738
+ onClose,
739
+ ref: mergedRef,
740
+ variant: "white"
741
+ }, rest), {
742
+ children
743
+ })
744
+ );
745
+ }
746
+ );
747
+ Modal.displayName = "Modal";
748
+ var ModalHeader = (0, import_react10.forwardRef)(
749
+ (_a, ref) => {
750
+ var _b = _a, { as: Component = "h1", className } = _b, rest = __objRest(_b, ["as", "className"]);
751
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
752
+ Component,
753
+ __spreadValues({
754
+ className: (0, import_typed_classname13.clsx)("hds-modal__header", className),
755
+ ref
756
+ }, rest)
757
+ );
758
+ }
759
+ );
760
+ ModalHeader.displayName = "ModalHeader";
761
+
762
+ // src/modal/index.tsx
763
+ var ModalComponent = Modal;
764
+ ModalComponent.Header = ModalHeader;
765
+ ModalComponent.Header.displayName = "Modal";
766
+
767
+ // src/breadcrumb/index.tsx
768
+ var import_fonts10 = require("@postenbring/hedwig-css/dist/fonts.css");
769
+ var import_tokens10 = require("@postenbring/hedwig-css/dist/tokens.css");
770
+ var import_base10 = require("@postenbring/hedwig-css/dist/base.css");
771
+ var import_breadcrumb = require("@postenbring/hedwig-css/dist/breadcrumb.css");
772
+
773
+ // src/breadcrumb/breadcrumb.tsx
774
+ var import_typed_classname14 = require("@postenbring/hedwig-css/typed-classname/index.mjs");
775
+ var import_jsx_runtime15 = require("react/jsx-runtime");
641
776
  function Breadcrumbs({ navProps, olProps, children }) {
642
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("nav", __spreadProps(__spreadValues({}, navProps), { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("ol", __spreadProps(__spreadValues({}, olProps), { className: (0, import_typed_classname12.clsx)("hds-breadcrumbs", olProps == null ? void 0 : olProps.className), children })) }));
777
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("nav", __spreadProps(__spreadValues({}, navProps), { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("ol", __spreadProps(__spreadValues({}, olProps), { className: (0, import_typed_classname14.clsx)("hds-breadcrumbs", olProps == null ? void 0 : olProps.className), children })) }));
643
778
  }
644
779
  Breadcrumbs.displayName = "Breadcrumbs";
645
780
  // Annotate the CommonJS export names for ESM import in node:
@@ -657,11 +792,14 @@ Breadcrumbs.displayName = "Breadcrumbs";
657
792
  DescriptionDetails,
658
793
  DescriptionList,
659
794
  DescriptionTerm,
795
+ Dropdown,
660
796
  Link,
661
797
  LinkList,
662
798
  Message,
663
799
  MessageDescription,
664
800
  MessageTitle,
801
+ Modal,
802
+ ModalHeader,
665
803
  OrderedList,
666
804
  PrimaryButton,
667
805
  SecondaryButton,
package/dist/index.mjs CHANGED
@@ -1,3 +1,16 @@
1
+ import {
2
+ MessageComponent
3
+ } from "./chunk-6AW5BEDP.mjs";
4
+ import {
5
+ MessageDescription,
6
+ MessageTitle
7
+ } from "./chunk-X4D24ZRP.mjs";
8
+ import {
9
+ ModalComponent
10
+ } from "./chunk-ROSXRHEW.mjs";
11
+ import {
12
+ ModalHeader
13
+ } from "./chunk-FFQBRM3W.mjs";
1
14
  import "./chunk-5NDZ66M6.mjs";
2
15
  import {
3
16
  Link
@@ -15,13 +28,6 @@ import {
15
28
  OrderedList,
16
29
  UnorderedList
17
30
  } from "./chunk-RY53CJI7.mjs";
18
- import {
19
- MessageComponent
20
- } from "./chunk-6AW5BEDP.mjs";
21
- import {
22
- MessageDescription,
23
- MessageTitle
24
- } from "./chunk-X4D24ZRP.mjs";
25
31
  import "./chunk-BJANCH4F.mjs";
26
32
  import {
27
33
  Box,
@@ -37,6 +43,10 @@ import {
37
43
  PrimaryButton,
38
44
  SecondaryButton
39
45
  } from "./chunk-ENRMC5K7.mjs";
46
+ import "./chunk-JNIAIH63.mjs";
47
+ import {
48
+ Dropdown
49
+ } from "./chunk-3VUAKZB2.mjs";
40
50
  import "./chunk-Z36ETKOZ.mjs";
41
51
  import {
42
52
  AccordionContent
@@ -73,11 +83,14 @@ export {
73
83
  DescriptionDetails,
74
84
  DescriptionList,
75
85
  DescriptionTerm,
86
+ Dropdown,
76
87
  Link,
77
88
  LinkList,
78
89
  MessageComponent as Message,
79
90
  MessageDescription,
80
91
  MessageTitle,
92
+ ModalComponent as Modal,
93
+ ModalHeader,
81
94
  OrderedList,
82
95
  PrimaryButton,
83
96
  SecondaryButton,
@@ -7,7 +7,7 @@ declare const MessageComponent: {
7
7
  (props: MessageProps & React.RefAttributes<HTMLDivElement>): React.ReactNode;
8
8
  <As extends React.ElementType>(props: {
9
9
  as?: As | undefined;
10
- } & MessageProps & Omit<React.ComponentPropsWithRef<As>, "slot" | "style" | "title" | "icon" | "children" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "variant" | "onClose" | "closeable" | "closed" | "closeButtonProps" | "iconClassName">): React.ReactNode;
10
+ } & MessageProps & Omit<React.ComponentPropsWithRef<As>, "slot" | "style" | "title" | "icon" | "children" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "variant" | "onClose" | "closeable" | "closed" | "closeButtonProps" | "iconClassName">): React.ReactNode;
11
11
  } & Pick<React.FC, "displayName"> & {
12
12
  Title: typeof MessageTitle;
13
13
  Description: typeof MessageDescription;
@@ -7,7 +7,7 @@ declare const MessageComponent: {
7
7
  (props: MessageProps & React.RefAttributes<HTMLDivElement>): React.ReactNode;
8
8
  <As extends React.ElementType>(props: {
9
9
  as?: As | undefined;
10
- } & MessageProps & Omit<React.ComponentPropsWithRef<As>, "slot" | "style" | "title" | "icon" | "children" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "variant" | "onClose" | "closeable" | "closed" | "closeButtonProps" | "iconClassName">): React.ReactNode;
10
+ } & MessageProps & Omit<React.ComponentPropsWithRef<As>, "slot" | "style" | "title" | "icon" | "children" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "variant" | "onClose" | "closeable" | "closed" | "closeButtonProps" | "iconClassName">): React.ReactNode;
11
11
  } & Pick<React.FC, "displayName"> & {
12
12
  Title: typeof MessageTitle;
13
13
  Description: typeof MessageDescription;
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ import { ModalProps, ModalHeader } from './modal.mjs';
3
+ import '../utils-BfZsjuFH.mjs';
4
+
5
+ declare const ModalComponent: React.ForwardRefExoticComponent<ModalProps & React.RefAttributes<HTMLDialogElement>> & {
6
+ Header: typeof ModalHeader;
7
+ };
8
+
9
+ export { ModalComponent as Modal, ModalHeader };
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ import { ModalProps, ModalHeader } from './modal.js';
3
+ import '../utils-BfZsjuFH.js';
4
+
5
+ declare const ModalComponent: React.ForwardRefExoticComponent<ModalProps & React.RefAttributes<HTMLDialogElement>> & {
6
+ Header: typeof ModalHeader;
7
+ };
8
+
9
+ export { ModalComponent as Modal, ModalHeader };
@@ -0,0 +1,217 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __defProps = Object.defineProperties;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
7
+ var __getOwnPropNames = Object.getOwnPropertyNames;
8
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
+ var __getProtoOf = Object.getPrototypeOf;
10
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
11
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
12
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13
+ var __spreadValues = (a, b) => {
14
+ for (var prop in b || (b = {}))
15
+ if (__hasOwnProp.call(b, prop))
16
+ __defNormalProp(a, prop, b[prop]);
17
+ if (__getOwnPropSymbols)
18
+ for (var prop of __getOwnPropSymbols(b)) {
19
+ if (__propIsEnum.call(b, prop))
20
+ __defNormalProp(a, prop, b[prop]);
21
+ }
22
+ return a;
23
+ };
24
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
25
+ var __objRest = (source, exclude) => {
26
+ var target = {};
27
+ for (var prop in source)
28
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
29
+ target[prop] = source[prop];
30
+ if (source != null && __getOwnPropSymbols)
31
+ for (var prop of __getOwnPropSymbols(source)) {
32
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
33
+ target[prop] = source[prop];
34
+ }
35
+ return target;
36
+ };
37
+ var __export = (target, all) => {
38
+ for (var name in all)
39
+ __defProp(target, name, { get: all[name], enumerable: true });
40
+ };
41
+ var __copyProps = (to, from, except, desc) => {
42
+ if (from && typeof from === "object" || typeof from === "function") {
43
+ for (let key of __getOwnPropNames(from))
44
+ if (!__hasOwnProp.call(to, key) && key !== except)
45
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
46
+ }
47
+ return to;
48
+ };
49
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
50
+ // If the importer is in node compatibility mode or this is not an ESM
51
+ // file that has been converted to a CommonJS file using a Babel-
52
+ // compatible transform (i.e. "__esModule" has not been set), then set
53
+ // "default" to the CommonJS "module.exports" for node compatibility.
54
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
55
+ mod
56
+ ));
57
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
58
+
59
+ // src/modal/index.tsx
60
+ var modal_exports = {};
61
+ __export(modal_exports, {
62
+ Modal: () => ModalComponent,
63
+ ModalHeader: () => ModalHeader
64
+ });
65
+ module.exports = __toCommonJS(modal_exports);
66
+ var import_fonts = require("@postenbring/hedwig-css/dist/fonts.css");
67
+ var import_tokens = require("@postenbring/hedwig-css/dist/tokens.css");
68
+ var import_base = require("@postenbring/hedwig-css/dist/base.css");
69
+ var import_box2 = require("@postenbring/hedwig-css/dist/box.css");
70
+ var import_modal = require("@postenbring/hedwig-css/dist/modal.css");
71
+
72
+ // src/modal/modal.tsx
73
+ var import_react2 = require("react");
74
+ var import_typed_classname2 = require("@postenbring/hedwig-css/typed-classname/index.mjs");
75
+
76
+ // src/box/box.tsx
77
+ var import_react = require("react");
78
+ var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
79
+ var import_jsx_runtime = require("react/jsx-runtime");
80
+ var Box = (0, import_react.forwardRef)(
81
+ (_a, ref) => {
82
+ var _b = _a, {
83
+ as: Component = "div",
84
+ variant = "light-grey",
85
+ closeable = false,
86
+ onClose: onCloseProp,
87
+ closed: closedProp,
88
+ closeButtonProps,
89
+ children,
90
+ className
91
+ } = _b, rest = __objRest(_b, [
92
+ "as",
93
+ "variant",
94
+ "closeable",
95
+ "onClose",
96
+ "closed",
97
+ "closeButtonProps",
98
+ "children",
99
+ "className"
100
+ ]);
101
+ const [closedState, setClosedState] = (0, import_react.useState)(false);
102
+ const onClose = (0, import_react.useCallback)(() => {
103
+ if (onCloseProp) {
104
+ const result = onCloseProp();
105
+ if (result === true) {
106
+ setClosedState(true);
107
+ }
108
+ } else {
109
+ setClosedState(true);
110
+ }
111
+ }, []);
112
+ const closed = closedProp != null ? closedProp : closedState;
113
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
114
+ Component,
115
+ __spreadProps(__spreadValues({
116
+ className: (0, import_typed_classname.clsx)(
117
+ "hds-box",
118
+ `hds-box--${variant}`,
119
+ { "hds-box--closed": closed },
120
+ className
121
+ ),
122
+ ref
123
+ }, rest), {
124
+ children: [
125
+ closeable ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BoxCloseButton, __spreadValues({ onClick: onClose }, closeButtonProps)) : null,
126
+ children
127
+ ]
128
+ })
129
+ );
130
+ }
131
+ );
132
+ Box.displayName = "Box";
133
+ var BoxCloseButton = (0, import_react.forwardRef)(
134
+ (_a, ref) => {
135
+ var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
136
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
137
+ "button",
138
+ __spreadValues({
139
+ className: (0, import_typed_classname.clsx)("hds-box__close-button", className),
140
+ ref,
141
+ type: "button"
142
+ }, rest)
143
+ );
144
+ }
145
+ );
146
+ BoxCloseButton.displayName = "BoxCloseButton";
147
+
148
+ // src/utils.ts
149
+ var React = __toESM(require("react"));
150
+ function useMergeRefs(refs) {
151
+ return React.useMemo(() => {
152
+ if (refs.every((ref) => ref === null)) {
153
+ return null;
154
+ }
155
+ return (value) => {
156
+ refs.forEach((ref) => {
157
+ if (typeof ref === "function") {
158
+ ref(value);
159
+ } else if (ref !== null) {
160
+ ref.current = value;
161
+ }
162
+ });
163
+ };
164
+ }, refs);
165
+ }
166
+
167
+ // src/modal/modal.tsx
168
+ var import_jsx_runtime2 = require("react/jsx-runtime");
169
+ var Modal = (0, import_react2.forwardRef)(
170
+ (_a, ref) => {
171
+ var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
172
+ const modalRef = (0, import_react2.useRef)(null);
173
+ const mergedRef = useMergeRefs([modalRef, ref]);
174
+ function onClose() {
175
+ var _a2;
176
+ (_a2 = modalRef.current) == null ? void 0 : _a2.close();
177
+ return false;
178
+ }
179
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
180
+ Box,
181
+ __spreadProps(__spreadValues({
182
+ as: "dialog",
183
+ className: (0, import_typed_classname2.clsx)("hds-modal", className),
184
+ closeable: true,
185
+ onClose,
186
+ ref: mergedRef,
187
+ variant: "white"
188
+ }, rest), {
189
+ children
190
+ })
191
+ );
192
+ }
193
+ );
194
+ Modal.displayName = "Modal";
195
+ var ModalHeader = (0, import_react2.forwardRef)(
196
+ (_a, ref) => {
197
+ var _b = _a, { as: Component = "h1", className } = _b, rest = __objRest(_b, ["as", "className"]);
198
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
199
+ Component,
200
+ __spreadValues({
201
+ className: (0, import_typed_classname2.clsx)("hds-modal__header", className),
202
+ ref
203
+ }, rest)
204
+ );
205
+ }
206
+ );
207
+ ModalHeader.displayName = "ModalHeader";
208
+
209
+ // src/modal/index.tsx
210
+ var ModalComponent = Modal;
211
+ ModalComponent.Header = ModalHeader;
212
+ ModalComponent.Header.displayName = "Modal";
213
+ // Annotate the CommonJS export names for ESM import in node:
214
+ 0 && (module.exports = {
215
+ Modal,
216
+ ModalHeader
217
+ });
@@ -0,0 +1,12 @@
1
+ import {
2
+ ModalComponent
3
+ } from "../chunk-ROSXRHEW.mjs";
4
+ import {
5
+ ModalHeader
6
+ } from "../chunk-FFQBRM3W.mjs";
7
+ import "../chunk-RXUPE4MM.mjs";
8
+ import "../chunk-FUJQIYOF.mjs";
9
+ export {
10
+ ModalComponent as Modal,
11
+ ModalHeader
12
+ };
@@ -0,0 +1,13 @@
1
+ import * as React$1 from 'react';
2
+ import { O as OverridableComponent } from '../utils-BfZsjuFH.mjs';
3
+
4
+ interface ModalProps extends React.HTMLAttributes<HTMLDialogElement> {
5
+ children: React.ReactNode;
6
+ }
7
+ /**
8
+ * # 🚨 WORK IN PROGRESS 🚨
9
+ */
10
+ declare const Modal: React$1.ForwardRefExoticComponent<ModalProps & React$1.RefAttributes<HTMLDialogElement>>;
11
+ declare const ModalHeader: OverridableComponent<object, HTMLParagraphElement>;
12
+
13
+ export { Modal, ModalHeader, type ModalProps };
@@ -0,0 +1,13 @@
1
+ import * as React$1 from 'react';
2
+ import { O as OverridableComponent } from '../utils-BfZsjuFH.js';
3
+
4
+ interface ModalProps extends React.HTMLAttributes<HTMLDialogElement> {
5
+ children: React.ReactNode;
6
+ }
7
+ /**
8
+ * # 🚨 WORK IN PROGRESS 🚨
9
+ */
10
+ declare const Modal: React$1.ForwardRefExoticComponent<ModalProps & React$1.RefAttributes<HTMLDialogElement>>;
11
+ declare const ModalHeader: OverridableComponent<object, HTMLParagraphElement>;
12
+
13
+ export { Modal, ModalHeader, type ModalProps };
@@ -0,0 +1,205 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __defProps = Object.defineProperties;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
7
+ var __getOwnPropNames = Object.getOwnPropertyNames;
8
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
+ var __getProtoOf = Object.getPrototypeOf;
10
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
11
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
12
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13
+ var __spreadValues = (a, b) => {
14
+ for (var prop in b || (b = {}))
15
+ if (__hasOwnProp.call(b, prop))
16
+ __defNormalProp(a, prop, b[prop]);
17
+ if (__getOwnPropSymbols)
18
+ for (var prop of __getOwnPropSymbols(b)) {
19
+ if (__propIsEnum.call(b, prop))
20
+ __defNormalProp(a, prop, b[prop]);
21
+ }
22
+ return a;
23
+ };
24
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
25
+ var __objRest = (source, exclude) => {
26
+ var target = {};
27
+ for (var prop in source)
28
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
29
+ target[prop] = source[prop];
30
+ if (source != null && __getOwnPropSymbols)
31
+ for (var prop of __getOwnPropSymbols(source)) {
32
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
33
+ target[prop] = source[prop];
34
+ }
35
+ return target;
36
+ };
37
+ var __export = (target, all) => {
38
+ for (var name in all)
39
+ __defProp(target, name, { get: all[name], enumerable: true });
40
+ };
41
+ var __copyProps = (to, from, except, desc) => {
42
+ if (from && typeof from === "object" || typeof from === "function") {
43
+ for (let key of __getOwnPropNames(from))
44
+ if (!__hasOwnProp.call(to, key) && key !== except)
45
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
46
+ }
47
+ return to;
48
+ };
49
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
50
+ // If the importer is in node compatibility mode or this is not an ESM
51
+ // file that has been converted to a CommonJS file using a Babel-
52
+ // compatible transform (i.e. "__esModule" has not been set), then set
53
+ // "default" to the CommonJS "module.exports" for node compatibility.
54
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
55
+ mod
56
+ ));
57
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
58
+
59
+ // src/modal/modal.tsx
60
+ var modal_exports = {};
61
+ __export(modal_exports, {
62
+ Modal: () => Modal,
63
+ ModalHeader: () => ModalHeader
64
+ });
65
+ module.exports = __toCommonJS(modal_exports);
66
+ var import_react2 = require("react");
67
+ var import_typed_classname2 = require("@postenbring/hedwig-css/typed-classname/index.mjs");
68
+
69
+ // src/box/box.tsx
70
+ var import_react = require("react");
71
+ var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
72
+ var import_jsx_runtime = require("react/jsx-runtime");
73
+ var Box = (0, import_react.forwardRef)(
74
+ (_a, ref) => {
75
+ var _b = _a, {
76
+ as: Component = "div",
77
+ variant = "light-grey",
78
+ closeable = false,
79
+ onClose: onCloseProp,
80
+ closed: closedProp,
81
+ closeButtonProps,
82
+ children,
83
+ className
84
+ } = _b, rest = __objRest(_b, [
85
+ "as",
86
+ "variant",
87
+ "closeable",
88
+ "onClose",
89
+ "closed",
90
+ "closeButtonProps",
91
+ "children",
92
+ "className"
93
+ ]);
94
+ const [closedState, setClosedState] = (0, import_react.useState)(false);
95
+ const onClose = (0, import_react.useCallback)(() => {
96
+ if (onCloseProp) {
97
+ const result = onCloseProp();
98
+ if (result === true) {
99
+ setClosedState(true);
100
+ }
101
+ } else {
102
+ setClosedState(true);
103
+ }
104
+ }, []);
105
+ const closed = closedProp != null ? closedProp : closedState;
106
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
107
+ Component,
108
+ __spreadProps(__spreadValues({
109
+ className: (0, import_typed_classname.clsx)(
110
+ "hds-box",
111
+ `hds-box--${variant}`,
112
+ { "hds-box--closed": closed },
113
+ className
114
+ ),
115
+ ref
116
+ }, rest), {
117
+ children: [
118
+ closeable ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BoxCloseButton, __spreadValues({ onClick: onClose }, closeButtonProps)) : null,
119
+ children
120
+ ]
121
+ })
122
+ );
123
+ }
124
+ );
125
+ Box.displayName = "Box";
126
+ var BoxCloseButton = (0, import_react.forwardRef)(
127
+ (_a, ref) => {
128
+ var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
129
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
130
+ "button",
131
+ __spreadValues({
132
+ className: (0, import_typed_classname.clsx)("hds-box__close-button", className),
133
+ ref,
134
+ type: "button"
135
+ }, rest)
136
+ );
137
+ }
138
+ );
139
+ BoxCloseButton.displayName = "BoxCloseButton";
140
+
141
+ // src/utils.ts
142
+ var React = __toESM(require("react"));
143
+ function useMergeRefs(refs) {
144
+ return React.useMemo(() => {
145
+ if (refs.every((ref) => ref === null)) {
146
+ return null;
147
+ }
148
+ return (value) => {
149
+ refs.forEach((ref) => {
150
+ if (typeof ref === "function") {
151
+ ref(value);
152
+ } else if (ref !== null) {
153
+ ref.current = value;
154
+ }
155
+ });
156
+ };
157
+ }, refs);
158
+ }
159
+
160
+ // src/modal/modal.tsx
161
+ var import_jsx_runtime2 = require("react/jsx-runtime");
162
+ var Modal = (0, import_react2.forwardRef)(
163
+ (_a, ref) => {
164
+ var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
165
+ const modalRef = (0, import_react2.useRef)(null);
166
+ const mergedRef = useMergeRefs([modalRef, ref]);
167
+ function onClose() {
168
+ var _a2;
169
+ (_a2 = modalRef.current) == null ? void 0 : _a2.close();
170
+ return false;
171
+ }
172
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
173
+ Box,
174
+ __spreadProps(__spreadValues({
175
+ as: "dialog",
176
+ className: (0, import_typed_classname2.clsx)("hds-modal", className),
177
+ closeable: true,
178
+ onClose,
179
+ ref: mergedRef,
180
+ variant: "white"
181
+ }, rest), {
182
+ children
183
+ })
184
+ );
185
+ }
186
+ );
187
+ Modal.displayName = "Modal";
188
+ var ModalHeader = (0, import_react2.forwardRef)(
189
+ (_a, ref) => {
190
+ var _b = _a, { as: Component = "h1", className } = _b, rest = __objRest(_b, ["as", "className"]);
191
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
192
+ Component,
193
+ __spreadValues({
194
+ className: (0, import_typed_classname2.clsx)("hds-modal__header", className),
195
+ ref
196
+ }, rest)
197
+ );
198
+ }
199
+ );
200
+ ModalHeader.displayName = "ModalHeader";
201
+ // Annotate the CommonJS export names for ESM import in node:
202
+ 0 && (module.exports = {
203
+ Modal,
204
+ ModalHeader
205
+ });
@@ -0,0 +1,10 @@
1
+ import {
2
+ Modal,
3
+ ModalHeader
4
+ } from "../chunk-FFQBRM3W.mjs";
5
+ import "../chunk-RXUPE4MM.mjs";
6
+ import "../chunk-FUJQIYOF.mjs";
7
+ export {
8
+ Modal,
9
+ ModalHeader
10
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@postenbring/hedwig-react",
3
- "version": "0.0.13",
3
+ "version": "0.0.15",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",
@@ -10,16 +10,16 @@
10
10
  "dist/**"
11
11
  ],
12
12
  "devDependencies": {
13
- "@types/react": "^18.2.41",
13
+ "@types/react": "^18.2.43",
14
14
  "@types/react-dom": "^18.2.15",
15
15
  "react": "^18.2.0",
16
16
  "tsup": "^8.0.1",
17
- "typescript": "^5.2.2",
17
+ "typescript": "^5.3.3",
18
18
  "eslint-config-custom": "0.0.1",
19
19
  "hedwig-tsconfig": "0.0.0"
20
20
  },
21
21
  "dependencies": {
22
- "@postenbring/hedwig-css": "0.0.12"
22
+ "@postenbring/hedwig-css": "0.0.14"
23
23
  },
24
24
  "publishConfig": {
25
25
  "access": "public"