@postenbring/hedwig-react 0.0.0-dropdown-20231207122446 → 0.0.0-dropdown-20231207124052
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/box/box.d.mts +1 -1
- package/dist/box/box.d.ts +1 -1
- package/dist/breadcrumb/breadcrumb.d.mts +43 -0
- package/dist/breadcrumb/breadcrumb.d.ts +43 -0
- package/dist/breadcrumb/breadcrumb.js +52 -0
- package/dist/breadcrumb/breadcrumb.mjs +7 -0
- package/dist/breadcrumb/index.d.mts +3 -0
- package/dist/breadcrumb/index.d.ts +3 -0
- package/dist/breadcrumb/index.js +58 -0
- package/dist/breadcrumb/index.mjs +8 -0
- package/dist/{chunk-DQ2OO6EW.mjs → chunk-BRBGRJ2I.mjs} +1 -1
- package/dist/chunk-EMX6J4XG.mjs +5 -0
- package/dist/chunk-FFQBRM3W.mjs +78 -0
- package/dist/chunk-Q2HYT3Z7.mjs +16 -0
- package/dist/chunk-ROSXRHEW.mjs +18 -0
- package/dist/{chunk-STKOYB5H.mjs → chunk-RY53CJI7.mjs} +2 -2
- package/dist/index.d.mts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +109 -2
- package/dist/index.mjs +22 -9
- package/dist/list/description-list.d.mts +2 -2
- package/dist/list/description-list.d.ts +2 -2
- package/dist/list/index.js +2 -2
- package/dist/list/index.mjs +2 -2
- package/dist/list/link-list.d.mts +1 -1
- package/dist/list/link-list.d.ts +1 -1
- package/dist/list/link-list.js +2 -2
- package/dist/list/link-list.mjs +2 -2
- package/dist/list/list.d.mts +1 -1
- package/dist/list/list.d.ts +1 -1
- package/dist/list/list.js +2 -2
- package/dist/list/list.mjs +1 -1
- package/dist/modal/index.d.mts +9 -0
- package/dist/modal/index.d.ts +9 -0
- package/dist/modal/index.js +217 -0
- package/dist/modal/index.mjs +12 -0
- package/dist/modal/modal.d.mts +13 -0
- package/dist/modal/modal.d.ts +13 -0
- package/dist/modal/modal.js +205 -0
- package/dist/modal/modal.mjs +10 -0
- package/package.json +4 -4
package/dist/box/box.d.mts
CHANGED
|
@@ -3,7 +3,7 @@ import { O as OverridableComponent } from '../utils-BfZsjuFH.mjs';
|
|
|
3
3
|
|
|
4
4
|
interface BoxProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
5
|
variant?: "light-grey" | "lighter" | "white" | "warning";
|
|
6
|
-
children
|
|
6
|
+
children?: React.ReactNode;
|
|
7
7
|
/**
|
|
8
8
|
* If `true`, a close button will be shown.
|
|
9
9
|
* Use when you want to control the close button using the BoxCloseButton component.
|
package/dist/box/box.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { O as OverridableComponent } from '../utils-BfZsjuFH.js';
|
|
|
3
3
|
|
|
4
4
|
interface BoxProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
5
|
variant?: "light-grey" | "lighter" | "white" | "warning";
|
|
6
|
-
children
|
|
6
|
+
children?: React.ReactNode;
|
|
7
7
|
/**
|
|
8
8
|
* If `true`, a close button will be shown.
|
|
9
9
|
* Use when you want to control the close button using the BoxCloseButton component.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { HTMLAttributes, ReactElement } from 'react';
|
|
3
|
+
|
|
4
|
+
interface BreadcrumbsProps extends HTMLAttributes<HTMLOListElement> {
|
|
5
|
+
children: ReactElement<HTMLLIElement> | ReactElement<HTMLLIElement>[];
|
|
6
|
+
/**
|
|
7
|
+
* Props passed to the root `nav` html element
|
|
8
|
+
*/
|
|
9
|
+
navProps?: HTMLAttributes<HTMLElement>;
|
|
10
|
+
/**
|
|
11
|
+
* Props passed to the `ol` html element
|
|
12
|
+
*/
|
|
13
|
+
olProps?: HTMLAttributes<HTMLElement>;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* A breadcrumbs navigation menu
|
|
17
|
+
*
|
|
18
|
+
* **Usage**
|
|
19
|
+
*
|
|
20
|
+
* ```tsx
|
|
21
|
+
* <Breadcrumbs>
|
|
22
|
+
* <li><Link href="../">Previous page</Link></li>
|
|
23
|
+
* <li>Current page</li>
|
|
24
|
+
* </Breadcrumbs>
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* Outputs this html structure
|
|
28
|
+
*
|
|
29
|
+
* ```html
|
|
30
|
+
* <nav>
|
|
31
|
+
* <ol>
|
|
32
|
+
* <li><a href="../">Previous page</a></li>
|
|
33
|
+
* <li>Current page</li>
|
|
34
|
+
* </ol>
|
|
35
|
+
* </nav>
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
declare function Breadcrumbs({ navProps, olProps, children }: BreadcrumbsProps): react_jsx_runtime.JSX.Element;
|
|
39
|
+
declare namespace Breadcrumbs {
|
|
40
|
+
var displayName: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export { Breadcrumbs, type BreadcrumbsProps };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { HTMLAttributes, ReactElement } from 'react';
|
|
3
|
+
|
|
4
|
+
interface BreadcrumbsProps extends HTMLAttributes<HTMLOListElement> {
|
|
5
|
+
children: ReactElement<HTMLLIElement> | ReactElement<HTMLLIElement>[];
|
|
6
|
+
/**
|
|
7
|
+
* Props passed to the root `nav` html element
|
|
8
|
+
*/
|
|
9
|
+
navProps?: HTMLAttributes<HTMLElement>;
|
|
10
|
+
/**
|
|
11
|
+
* Props passed to the `ol` html element
|
|
12
|
+
*/
|
|
13
|
+
olProps?: HTMLAttributes<HTMLElement>;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* A breadcrumbs navigation menu
|
|
17
|
+
*
|
|
18
|
+
* **Usage**
|
|
19
|
+
*
|
|
20
|
+
* ```tsx
|
|
21
|
+
* <Breadcrumbs>
|
|
22
|
+
* <li><Link href="../">Previous page</Link></li>
|
|
23
|
+
* <li>Current page</li>
|
|
24
|
+
* </Breadcrumbs>
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* Outputs this html structure
|
|
28
|
+
*
|
|
29
|
+
* ```html
|
|
30
|
+
* <nav>
|
|
31
|
+
* <ol>
|
|
32
|
+
* <li><a href="../">Previous page</a></li>
|
|
33
|
+
* <li>Current page</li>
|
|
34
|
+
* </ol>
|
|
35
|
+
* </nav>
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
declare function Breadcrumbs({ navProps, olProps, children }: BreadcrumbsProps): react_jsx_runtime.JSX.Element;
|
|
39
|
+
declare namespace Breadcrumbs {
|
|
40
|
+
var displayName: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export { Breadcrumbs, type BreadcrumbsProps };
|
|
@@ -0,0 +1,52 @@
|
|
|
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 __export = (target, all) => {
|
|
24
|
+
for (var name in all)
|
|
25
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
26
|
+
};
|
|
27
|
+
var __copyProps = (to, from, except, desc) => {
|
|
28
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
29
|
+
for (let key of __getOwnPropNames(from))
|
|
30
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
31
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
32
|
+
}
|
|
33
|
+
return to;
|
|
34
|
+
};
|
|
35
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
36
|
+
|
|
37
|
+
// src/breadcrumb/breadcrumb.tsx
|
|
38
|
+
var breadcrumb_exports = {};
|
|
39
|
+
__export(breadcrumb_exports, {
|
|
40
|
+
Breadcrumbs: () => Breadcrumbs
|
|
41
|
+
});
|
|
42
|
+
module.exports = __toCommonJS(breadcrumb_exports);
|
|
43
|
+
var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
|
|
44
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
45
|
+
function Breadcrumbs({ navProps, olProps, children }) {
|
|
46
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("nav", __spreadProps(__spreadValues({}, navProps), { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("ol", __spreadProps(__spreadValues({}, olProps), { className: (0, import_typed_classname.clsx)("hds-breadcrumbs", olProps == null ? void 0 : olProps.className), children })) }));
|
|
47
|
+
}
|
|
48
|
+
Breadcrumbs.displayName = "Breadcrumbs";
|
|
49
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
50
|
+
0 && (module.exports = {
|
|
51
|
+
Breadcrumbs
|
|
52
|
+
});
|
|
@@ -0,0 +1,58 @@
|
|
|
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 __export = (target, all) => {
|
|
24
|
+
for (var name in all)
|
|
25
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
26
|
+
};
|
|
27
|
+
var __copyProps = (to, from, except, desc) => {
|
|
28
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
29
|
+
for (let key of __getOwnPropNames(from))
|
|
30
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
31
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
32
|
+
}
|
|
33
|
+
return to;
|
|
34
|
+
};
|
|
35
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
36
|
+
|
|
37
|
+
// src/breadcrumb/index.tsx
|
|
38
|
+
var breadcrumb_exports = {};
|
|
39
|
+
__export(breadcrumb_exports, {
|
|
40
|
+
Breadcrumbs: () => Breadcrumbs
|
|
41
|
+
});
|
|
42
|
+
module.exports = __toCommonJS(breadcrumb_exports);
|
|
43
|
+
var import_fonts = require("@postenbring/hedwig-css/dist/fonts.css");
|
|
44
|
+
var import_tokens = require("@postenbring/hedwig-css/dist/tokens.css");
|
|
45
|
+
var import_base = require("@postenbring/hedwig-css/dist/base.css");
|
|
46
|
+
var import_breadcrumb = require("@postenbring/hedwig-css/dist/breadcrumb.css");
|
|
47
|
+
|
|
48
|
+
// src/breadcrumb/breadcrumb.tsx
|
|
49
|
+
var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
|
|
50
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
51
|
+
function Breadcrumbs({ navProps, olProps, children }) {
|
|
52
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("nav", __spreadProps(__spreadValues({}, navProps), { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("ol", __spreadProps(__spreadValues({}, olProps), { className: (0, import_typed_classname.clsx)("hds-breadcrumbs", olProps == null ? void 0 : olProps.className), children })) }));
|
|
53
|
+
}
|
|
54
|
+
Breadcrumbs.displayName = "Breadcrumbs";
|
|
55
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
56
|
+
0 && (module.exports = {
|
|
57
|
+
Breadcrumbs
|
|
58
|
+
});
|
|
@@ -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,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__spreadProps,
|
|
3
|
+
__spreadValues
|
|
4
|
+
} from "./chunk-FUJQIYOF.mjs";
|
|
5
|
+
|
|
6
|
+
// src/breadcrumb/breadcrumb.tsx
|
|
7
|
+
import { clsx } from "@postenbring/hedwig-css/typed-classname/index.mjs";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
function Breadcrumbs({ navProps, olProps, children }) {
|
|
10
|
+
return /* @__PURE__ */ jsx("nav", __spreadProps(__spreadValues({}, navProps), { children: /* @__PURE__ */ jsx("ol", __spreadProps(__spreadValues({}, olProps), { className: clsx("hds-breadcrumbs", olProps == null ? void 0 : olProps.className), children })) }));
|
|
11
|
+
}
|
|
12
|
+
Breadcrumbs.displayName = "Breadcrumbs";
|
|
13
|
+
|
|
14
|
+
export {
|
|
15
|
+
Breadcrumbs
|
|
16
|
+
};
|
|
@@ -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
|
+
};
|
|
@@ -28,7 +28,7 @@ function BaseList(_a) {
|
|
|
28
28
|
"hds-list",
|
|
29
29
|
`hds-list--${size}`,
|
|
30
30
|
{
|
|
31
|
-
"hds-list--
|
|
31
|
+
"hds-list--no-bullets": listStyle === "no-bullets"
|
|
32
32
|
},
|
|
33
33
|
className
|
|
34
34
|
)
|
|
@@ -44,7 +44,7 @@ function OrderedList(props) {
|
|
|
44
44
|
return /* @__PURE__ */ jsx(BaseList, __spreadProps(__spreadValues({ as: "ol" }, props), { children: props.children }));
|
|
45
45
|
}
|
|
46
46
|
BaseList.displayName = "BaseList";
|
|
47
|
-
OrderedList.displayName = "
|
|
47
|
+
OrderedList.displayName = "OrderedList";
|
|
48
48
|
UnorderedList.displayName = "UnorderedList";
|
|
49
49
|
|
|
50
50
|
export {
|
package/dist/index.d.mts
CHANGED
|
@@ -11,7 +11,10 @@ export { AccordionItem, AccordionItemChildrenType, AccordionItemProps } from './
|
|
|
11
11
|
export { AccordionTrigger, AccordionTriggerProps } from './accordion/accordion-item-trigger.mjs';
|
|
12
12
|
export { AccordionContent, AccordionContentProps } from './accordion/accordion-item-content.mjs';
|
|
13
13
|
export { Dropdown, DropdownProps } from './dropdown/dropdown.mjs';
|
|
14
|
+
export { Modal } from './modal/index.mjs';
|
|
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
|
@@ -11,7 +11,10 @@ export { AccordionItem, AccordionItemChildrenType, AccordionItemProps } from './
|
|
|
11
11
|
export { AccordionTrigger, AccordionTriggerProps } from './accordion/accordion-item-trigger.js';
|
|
12
12
|
export { AccordionContent, AccordionContentProps } from './accordion/accordion-item-content.js';
|
|
13
13
|
export { Dropdown, DropdownProps } from './dropdown/dropdown.js';
|
|
14
|
+
export { Modal } from './modal/index.js';
|
|
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
|
|
@@ -57,6 +67,7 @@ __export(src_exports, {
|
|
|
57
67
|
BaseButton: () => BaseButton,
|
|
58
68
|
Box: () => Box,
|
|
59
69
|
BoxCloseButton: () => BoxCloseButton,
|
|
70
|
+
Breadcrumbs: () => Breadcrumbs,
|
|
60
71
|
DarkBadge: () => DarkBadge,
|
|
61
72
|
DescriptionDetails: () => DescriptionDetails,
|
|
62
73
|
DescriptionList: () => DescriptionList,
|
|
@@ -67,6 +78,8 @@ __export(src_exports, {
|
|
|
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,
|
|
@@ -297,7 +310,7 @@ function BaseList(_a) {
|
|
|
297
310
|
"hds-list",
|
|
298
311
|
`hds-list--${size}`,
|
|
299
312
|
{
|
|
300
|
-
"hds-list--
|
|
313
|
+
"hds-list--no-bullets": listStyle === "no-bullets"
|
|
301
314
|
},
|
|
302
315
|
className
|
|
303
316
|
)
|
|
@@ -313,7 +326,7 @@ function OrderedList(props) {
|
|
|
313
326
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(BaseList, __spreadProps(__spreadValues({ as: "ol" }, props), { children: props.children }));
|
|
314
327
|
}
|
|
315
328
|
BaseList.displayName = "BaseList";
|
|
316
|
-
OrderedList.displayName = "
|
|
329
|
+
OrderedList.displayName = "OrderedList";
|
|
317
330
|
UnorderedList.displayName = "UnorderedList";
|
|
318
331
|
|
|
319
332
|
// src/list/link-list.tsx
|
|
@@ -673,6 +686,97 @@ function Dropdown(_a) {
|
|
|
673
686
|
] });
|
|
674
687
|
}
|
|
675
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");
|
|
776
|
+
function Breadcrumbs({ navProps, olProps, 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 })) }));
|
|
778
|
+
}
|
|
779
|
+
Breadcrumbs.displayName = "Breadcrumbs";
|
|
676
780
|
// Annotate the CommonJS export names for ESM import in node:
|
|
677
781
|
0 && (module.exports = {
|
|
678
782
|
Accordion,
|
|
@@ -683,6 +787,7 @@ Dropdown.displayName = "Dropdown";
|
|
|
683
787
|
BaseButton,
|
|
684
788
|
Box,
|
|
685
789
|
BoxCloseButton,
|
|
790
|
+
Breadcrumbs,
|
|
686
791
|
DarkBadge,
|
|
687
792
|
DescriptionDetails,
|
|
688
793
|
DescriptionList,
|
|
@@ -693,6 +798,8 @@ Dropdown.displayName = "Dropdown";
|
|
|
693
798
|
Message,
|
|
694
799
|
MessageDescription,
|
|
695
800
|
MessageTitle,
|
|
801
|
+
Modal,
|
|
802
|
+
ModalHeader,
|
|
696
803
|
OrderedList,
|
|
697
804
|
PrimaryButton,
|
|
698
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
|
|
@@ -10,23 +23,20 @@ import {
|
|
|
10
23
|
} from "./chunk-6XSKLHN6.mjs";
|
|
11
24
|
import {
|
|
12
25
|
LinkList
|
|
13
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-BRBGRJ2I.mjs";
|
|
14
27
|
import {
|
|
15
28
|
OrderedList,
|
|
16
29
|
UnorderedList
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import {
|
|
19
|
-
MessageComponent
|
|
20
|
-
} from "./chunk-6AW5BEDP.mjs";
|
|
21
|
-
import {
|
|
22
|
-
MessageDescription,
|
|
23
|
-
MessageTitle
|
|
24
|
-
} from "./chunk-X4D24ZRP.mjs";
|
|
30
|
+
} from "./chunk-RY53CJI7.mjs";
|
|
25
31
|
import "./chunk-BJANCH4F.mjs";
|
|
26
32
|
import {
|
|
27
33
|
Box,
|
|
28
34
|
BoxCloseButton
|
|
29
35
|
} from "./chunk-RXUPE4MM.mjs";
|
|
36
|
+
import "./chunk-EMX6J4XG.mjs";
|
|
37
|
+
import {
|
|
38
|
+
Breadcrumbs
|
|
39
|
+
} from "./chunk-Q2HYT3Z7.mjs";
|
|
30
40
|
import "./chunk-N3EFZW7T.mjs";
|
|
31
41
|
import {
|
|
32
42
|
BaseButton,
|
|
@@ -68,6 +78,7 @@ export {
|
|
|
68
78
|
BaseButton,
|
|
69
79
|
Box,
|
|
70
80
|
BoxCloseButton,
|
|
81
|
+
Breadcrumbs,
|
|
71
82
|
DarkBadge,
|
|
72
83
|
DescriptionDetails,
|
|
73
84
|
DescriptionList,
|
|
@@ -78,6 +89,8 @@ export {
|
|
|
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,
|
|
@@ -4,13 +4,13 @@ import { HTMLAttributes, ReactNode } from 'react';
|
|
|
4
4
|
type DescriptionDetailsProps = DLDTProps;
|
|
5
5
|
type DescriptionTermProps = DLDTProps;
|
|
6
6
|
interface DLDTProps extends HTMLAttributes<HTMLBaseElement> {
|
|
7
|
-
children
|
|
7
|
+
children?: ReactNode;
|
|
8
8
|
}
|
|
9
9
|
interface DescriptionListProps extends HTMLAttributes<HTMLDListElement> {
|
|
10
10
|
/**
|
|
11
11
|
* Either `DescriptionDetails` or `DescriptionTerm` elements
|
|
12
12
|
*/
|
|
13
|
-
children
|
|
13
|
+
children?: ReactNode;
|
|
14
14
|
/**
|
|
15
15
|
* Direction of the description list
|
|
16
16
|
*/
|