@postenbring/hedwig-react 0.0.0-include-css-in-react-package-k6QhqAlv → 0.0.0-include-css-in-react-package-k6QhqAlv-20231129150130
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/accordion/index.mjs +3 -3
- package/dist/chunk-TES7CVGU.mjs +34 -0
- package/dist/index.js +47 -56
- package/dist/index.mjs +14 -14
- package/dist/link/index.d.mts +1 -1
- package/dist/link/index.d.ts +1 -1
- package/dist/link/index.js +20 -29
- package/dist/link/index.mjs +1 -1
- package/dist/link/link.d.mts +2 -10
- package/dist/link/link.d.ts +2 -10
- package/dist/link/link.js +20 -29
- package/dist/link/link.mjs +1 -1
- package/dist/message/index.d.mts +1 -1
- package/dist/message/index.d.ts +1 -1
- package/package.json +1 -1
- package/dist/chunk-53AQCCBR.mjs +0 -43
package/dist/accordion/index.mjs
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import "../chunk-Z36ETKOZ.mjs";
|
|
2
|
-
import {
|
|
3
|
-
Accordion
|
|
4
|
-
} from "../chunk-GMGUONH5.mjs";
|
|
5
2
|
import {
|
|
6
3
|
AccordionContent
|
|
7
4
|
} from "../chunk-J7U4Z726.mjs";
|
|
@@ -11,6 +8,9 @@ import {
|
|
|
11
8
|
import {
|
|
12
9
|
AccordionItem
|
|
13
10
|
} from "../chunk-L7DYK6OS.mjs";
|
|
11
|
+
import {
|
|
12
|
+
Accordion
|
|
13
|
+
} from "../chunk-GMGUONH5.mjs";
|
|
14
14
|
import "../chunk-2V6SWZ5G.mjs";
|
|
15
15
|
import "../chunk-FUJQIYOF.mjs";
|
|
16
16
|
export {
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__objRest,
|
|
3
|
+
__spreadProps,
|
|
4
|
+
__spreadValues
|
|
5
|
+
} from "./chunk-FUJQIYOF.mjs";
|
|
6
|
+
|
|
7
|
+
// src/link/link.tsx
|
|
8
|
+
import { clsx } from "@postenbring/hedwig-css/typed-classname/index.mjs";
|
|
9
|
+
import { forwardRef } from "react";
|
|
10
|
+
import { jsx } from "react/jsx-runtime";
|
|
11
|
+
var Link = forwardRef(
|
|
12
|
+
(_a, ref) => {
|
|
13
|
+
var _b = _a, { as: Component = "a", children, variant = "underline", size = "medium", className } = _b, rest = __objRest(_b, ["as", "children", "variant", "size", "className"]);
|
|
14
|
+
return /* @__PURE__ */ jsx(
|
|
15
|
+
Component,
|
|
16
|
+
__spreadProps(__spreadValues({
|
|
17
|
+
className: clsx(
|
|
18
|
+
"hds-link",
|
|
19
|
+
variant !== "underline" && `hds-link--${variant}`,
|
|
20
|
+
size !== "medium" && `hds-link--${size}`,
|
|
21
|
+
className
|
|
22
|
+
),
|
|
23
|
+
ref
|
|
24
|
+
}, rest), {
|
|
25
|
+
children
|
|
26
|
+
})
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
Link.displayName = "Link";
|
|
31
|
+
|
|
32
|
+
export {
|
|
33
|
+
Link
|
|
34
|
+
};
|
package/dist/index.js
CHANGED
|
@@ -153,36 +153,27 @@ var import_link = require("@postenbring/hedwig-css/dist/link.css");
|
|
|
153
153
|
|
|
154
154
|
// src/link/link.tsx
|
|
155
155
|
var import_typed_classname2 = require("@postenbring/hedwig-css/typed-classname/index.mjs");
|
|
156
|
+
var import_react2 = require("react");
|
|
156
157
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
children,
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
variant !== "underline" && `hds-link--${variant}`,
|
|
177
|
-
size !== "medium" && `hds-link--${size}`,
|
|
178
|
-
className
|
|
179
|
-
),
|
|
180
|
-
ref: anchorRef
|
|
181
|
-
}, rest), {
|
|
182
|
-
children
|
|
183
|
-
})
|
|
184
|
-
);
|
|
185
|
-
}
|
|
158
|
+
var Link = (0, import_react2.forwardRef)(
|
|
159
|
+
(_a, ref) => {
|
|
160
|
+
var _b = _a, { as: Component = "a", children, variant = "underline", size = "medium", className } = _b, rest = __objRest(_b, ["as", "children", "variant", "size", "className"]);
|
|
161
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
162
|
+
Component,
|
|
163
|
+
__spreadProps(__spreadValues({
|
|
164
|
+
className: (0, import_typed_classname2.clsx)(
|
|
165
|
+
"hds-link",
|
|
166
|
+
variant !== "underline" && `hds-link--${variant}`,
|
|
167
|
+
size !== "medium" && `hds-link--${size}`,
|
|
168
|
+
className
|
|
169
|
+
),
|
|
170
|
+
ref
|
|
171
|
+
}, rest), {
|
|
172
|
+
children
|
|
173
|
+
})
|
|
174
|
+
);
|
|
175
|
+
}
|
|
176
|
+
);
|
|
186
177
|
Link.displayName = "Link";
|
|
187
178
|
|
|
188
179
|
// src/badge/index.tsx
|
|
@@ -338,10 +329,10 @@ var import_base5 = require("@postenbring/hedwig-css/dist/base.css");
|
|
|
338
329
|
var import_box = require("@postenbring/hedwig-css/dist/box.css");
|
|
339
330
|
|
|
340
331
|
// src/box/box.tsx
|
|
341
|
-
var
|
|
332
|
+
var import_react3 = require("react");
|
|
342
333
|
var import_typed_classname6 = require("@postenbring/hedwig-css/typed-classname/index.mjs");
|
|
343
334
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
344
|
-
var Box = (0,
|
|
335
|
+
var Box = (0, import_react3.forwardRef)(
|
|
345
336
|
(_a, ref) => {
|
|
346
337
|
var _b = _a, {
|
|
347
338
|
as: Component = "div",
|
|
@@ -362,8 +353,8 @@ var Box = (0, import_react2.forwardRef)(
|
|
|
362
353
|
"children",
|
|
363
354
|
"className"
|
|
364
355
|
]);
|
|
365
|
-
const [closedState, setClosedState] = (0,
|
|
366
|
-
const onClose = (0,
|
|
356
|
+
const [closedState, setClosedState] = (0, import_react3.useState)(false);
|
|
357
|
+
const onClose = (0, import_react3.useCallback)(() => {
|
|
367
358
|
if (onCloseProp) {
|
|
368
359
|
const result = onCloseProp();
|
|
369
360
|
if (result === true) {
|
|
@@ -394,7 +385,7 @@ var Box = (0, import_react2.forwardRef)(
|
|
|
394
385
|
}
|
|
395
386
|
);
|
|
396
387
|
Box.displayName = "Box";
|
|
397
|
-
var BoxCloseButton = (0,
|
|
388
|
+
var BoxCloseButton = (0, import_react3.forwardRef)(
|
|
398
389
|
(_a, ref) => {
|
|
399
390
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
|
400
391
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
@@ -417,10 +408,10 @@ var import_box3 = require("@postenbring/hedwig-css/dist/box.css");
|
|
|
417
408
|
var import_message = require("@postenbring/hedwig-css/dist/message.css");
|
|
418
409
|
|
|
419
410
|
// src/message/message.tsx
|
|
420
|
-
var
|
|
411
|
+
var import_react4 = require("react");
|
|
421
412
|
var import_typed_classname7 = require("@postenbring/hedwig-css/typed-classname/index.mjs");
|
|
422
413
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
423
|
-
var Message = (0,
|
|
414
|
+
var Message = (0, import_react4.forwardRef)(
|
|
424
415
|
(_a, ref) => {
|
|
425
416
|
var _b = _a, { children, className, variant = "success", icon, iconClassName } = _b, rest = __objRest(_b, ["children", "className", "variant", "icon", "iconClassName"]);
|
|
426
417
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
@@ -438,7 +429,7 @@ var Message = (0, import_react3.forwardRef)(
|
|
|
438
429
|
}
|
|
439
430
|
);
|
|
440
431
|
Message.displayName = "Message";
|
|
441
|
-
var MessageTitle = (0,
|
|
432
|
+
var MessageTitle = (0, import_react4.forwardRef)(
|
|
442
433
|
(_a, ref) => {
|
|
443
434
|
var _b = _a, { as: Component = "p", className } = _b, rest = __objRest(_b, ["as", "className"]);
|
|
444
435
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
@@ -451,7 +442,7 @@ var MessageTitle = (0, import_react3.forwardRef)(
|
|
|
451
442
|
}
|
|
452
443
|
);
|
|
453
444
|
MessageTitle.displayName = "MessageTitle";
|
|
454
|
-
var MessageDescription = (0,
|
|
445
|
+
var MessageDescription = (0, import_react4.forwardRef)(
|
|
455
446
|
(_a, ref) => {
|
|
456
447
|
var _b = _a, { as: Component = "p", className } = _b, rest = __objRest(_b, ["as", "className"]);
|
|
457
448
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
@@ -479,12 +470,12 @@ var import_base7 = require("@postenbring/hedwig-css/dist/base.css");
|
|
|
479
470
|
var import_accordion = require("@postenbring/hedwig-css/dist/accordion.css");
|
|
480
471
|
|
|
481
472
|
// src/accordion/accordion.tsx
|
|
482
|
-
var
|
|
473
|
+
var import_react6 = require("react");
|
|
483
474
|
var import_typed_classname8 = require("@postenbring/hedwig-css/typed-classname/index.mjs");
|
|
484
475
|
|
|
485
476
|
// src/accordion/context.ts
|
|
486
|
-
var
|
|
487
|
-
var AccordionContext = (0,
|
|
477
|
+
var import_react5 = require("react");
|
|
478
|
+
var AccordionContext = (0, import_react5.createContext)({
|
|
488
479
|
variant: "multiple",
|
|
489
480
|
mounted: false,
|
|
490
481
|
openItems: [],
|
|
@@ -492,14 +483,14 @@ var AccordionContext = (0, import_react4.createContext)({
|
|
|
492
483
|
toggleOpenItem: (id) => {
|
|
493
484
|
}
|
|
494
485
|
});
|
|
495
|
-
var AccordionItemContext = (0,
|
|
486
|
+
var AccordionItemContext = (0, import_react5.createContext)(null);
|
|
496
487
|
|
|
497
488
|
// src/accordion/accordion.tsx
|
|
498
489
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
499
|
-
var Accordion = (0,
|
|
490
|
+
var Accordion = (0, import_react6.forwardRef)(
|
|
500
491
|
(_a, ref) => {
|
|
501
492
|
var _b = _a, { as: Component = "div", children, className, variant = "multiple" } = _b, rest = __objRest(_b, ["as", "children", "className", "variant"]);
|
|
502
|
-
const [openItems, setOpenItems] = (0,
|
|
493
|
+
const [openItems, setOpenItems] = (0, import_react6.useState)([]);
|
|
503
494
|
const toggleOpenItem = (itemId) => {
|
|
504
495
|
if (variant === "single") {
|
|
505
496
|
setOpenItems([itemId]);
|
|
@@ -515,15 +506,15 @@ var Accordion = (0, import_react5.forwardRef)(
|
|
|
515
506
|
Accordion.displayName = "Accordion";
|
|
516
507
|
|
|
517
508
|
// src/accordion/accordion-item.tsx
|
|
518
|
-
var
|
|
509
|
+
var import_react7 = require("react");
|
|
519
510
|
var import_typed_classname9 = require("@postenbring/hedwig-css/typed-classname/index.mjs");
|
|
520
511
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
521
|
-
var AccordionItem = (0,
|
|
512
|
+
var AccordionItem = (0, import_react7.forwardRef)(
|
|
522
513
|
(_a, ref) => {
|
|
523
514
|
var _b = _a, { as: Component = "div", children, className } = _b, rest = __objRest(_b, ["as", "children", "className"]);
|
|
524
|
-
const context = (0,
|
|
525
|
-
const [open, setOpen] = (0,
|
|
526
|
-
const accordionItemId = (0,
|
|
515
|
+
const context = (0, import_react7.useContext)(AccordionContext);
|
|
516
|
+
const [open, setOpen] = (0, import_react7.useState)(false);
|
|
517
|
+
const accordionItemId = (0, import_react7.useId)();
|
|
527
518
|
const handleOpen = () => {
|
|
528
519
|
setOpen(!open);
|
|
529
520
|
if (context.variant === "single") {
|
|
@@ -533,7 +524,7 @@ var AccordionItem = (0, import_react6.forwardRef)(
|
|
|
533
524
|
if (!context.mounted) {
|
|
534
525
|
throw new Error("Context required. Did you use <AccordionItem/> outside of <Accordion/>?");
|
|
535
526
|
}
|
|
536
|
-
(0,
|
|
527
|
+
(0, import_react7.useEffect)(() => {
|
|
537
528
|
if (context.variant === "multiple") {
|
|
538
529
|
return;
|
|
539
530
|
}
|
|
@@ -560,7 +551,7 @@ var AccordionItem = (0, import_react6.forwardRef)(
|
|
|
560
551
|
AccordionItem.displayName = "AccordionItem";
|
|
561
552
|
|
|
562
553
|
// src/accordion/accordion-item-trigger.tsx
|
|
563
|
-
var
|
|
554
|
+
var import_react8 = require("react");
|
|
564
555
|
var import_typed_classname10 = require("@postenbring/hedwig-css/typed-classname/index.mjs");
|
|
565
556
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
566
557
|
function FaArrowDownButNotReally() {
|
|
@@ -569,9 +560,9 @@ function FaArrowDownButNotReally() {
|
|
|
569
560
|
function FaArrowUpButNotReally() {
|
|
570
561
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children: "^ " });
|
|
571
562
|
}
|
|
572
|
-
var AccordionTrigger = (0,
|
|
563
|
+
var AccordionTrigger = (0, import_react8.forwardRef)((_a, ref) => {
|
|
573
564
|
var _b = _a, { as: Component = "button", children, className, onClick } = _b, rest = __objRest(_b, ["as", "children", "className", "onClick"]);
|
|
574
|
-
const itemContext = (0,
|
|
565
|
+
const itemContext = (0, import_react8.useContext)(AccordionItemContext);
|
|
575
566
|
if (itemContext === null) {
|
|
576
567
|
return null;
|
|
577
568
|
}
|
|
@@ -597,12 +588,12 @@ var AccordionTrigger = (0, import_react7.forwardRef)((_a, ref) => {
|
|
|
597
588
|
AccordionTrigger.displayName = "AccordionTrigger";
|
|
598
589
|
|
|
599
590
|
// src/accordion/accordion-item-content.tsx
|
|
600
|
-
var
|
|
591
|
+
var import_react9 = require("react");
|
|
601
592
|
var import_typed_classname11 = require("@postenbring/hedwig-css/typed-classname/index.mjs");
|
|
602
593
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
603
|
-
var AccordionContent = (0,
|
|
594
|
+
var AccordionContent = (0, import_react9.forwardRef)((_a, ref) => {
|
|
604
595
|
var _b = _a, { as: Component = "div", children, className } = _b, rest = __objRest(_b, ["as", "children", "className"]);
|
|
605
|
-
const context = (0,
|
|
596
|
+
const context = (0, import_react9.useContext)(AccordionItemContext);
|
|
606
597
|
if (context === null) {
|
|
607
598
|
return null;
|
|
608
599
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -18,32 +18,22 @@ import {
|
|
|
18
18
|
MessageDescription,
|
|
19
19
|
MessageTitle
|
|
20
20
|
} from "./chunk-X4D24ZRP.mjs";
|
|
21
|
-
import "./chunk-Z36ETKOZ.mjs";
|
|
22
|
-
import {
|
|
23
|
-
Accordion
|
|
24
|
-
} from "./chunk-GMGUONH5.mjs";
|
|
25
21
|
import "./chunk-BJANCH4F.mjs";
|
|
26
22
|
import {
|
|
27
23
|
Box,
|
|
28
24
|
BoxCloseButton
|
|
29
25
|
} from "./chunk-RXUPE4MM.mjs";
|
|
30
|
-
import "./chunk-5NDZ66M6.mjs";
|
|
31
|
-
import {
|
|
32
|
-
Link
|
|
33
|
-
} from "./chunk-53AQCCBR.mjs";
|
|
34
26
|
import "./chunk-N3EFZW7T.mjs";
|
|
35
27
|
import {
|
|
36
28
|
BaseButton,
|
|
37
29
|
PrimaryButton,
|
|
38
30
|
SecondaryButton
|
|
39
31
|
} from "./chunk-ENRMC5K7.mjs";
|
|
40
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-5NDZ66M6.mjs";
|
|
41
33
|
import {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
WhiteBadge
|
|
46
|
-
} from "./chunk-MNSMCSAR.mjs";
|
|
34
|
+
Link
|
|
35
|
+
} from "./chunk-TES7CVGU.mjs";
|
|
36
|
+
import "./chunk-Z36ETKOZ.mjs";
|
|
47
37
|
import {
|
|
48
38
|
AccordionContent
|
|
49
39
|
} from "./chunk-J7U4Z726.mjs";
|
|
@@ -53,7 +43,17 @@ import {
|
|
|
53
43
|
import {
|
|
54
44
|
AccordionItem
|
|
55
45
|
} from "./chunk-L7DYK6OS.mjs";
|
|
46
|
+
import {
|
|
47
|
+
Accordion
|
|
48
|
+
} from "./chunk-GMGUONH5.mjs";
|
|
56
49
|
import "./chunk-2V6SWZ5G.mjs";
|
|
50
|
+
import "./chunk-R55SMUE7.mjs";
|
|
51
|
+
import {
|
|
52
|
+
Badge,
|
|
53
|
+
DarkBadge,
|
|
54
|
+
WarningBadge,
|
|
55
|
+
WhiteBadge
|
|
56
|
+
} from "./chunk-MNSMCSAR.mjs";
|
|
57
57
|
import "./chunk-FUJQIYOF.mjs";
|
|
58
58
|
export {
|
|
59
59
|
Accordion,
|
package/dist/link/index.d.mts
CHANGED
package/dist/link/index.d.ts
CHANGED
package/dist/link/index.js
CHANGED
|
@@ -59,36 +59,27 @@ var import_link = require("@postenbring/hedwig-css/dist/link.css");
|
|
|
59
59
|
|
|
60
60
|
// src/link/link.tsx
|
|
61
61
|
var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
|
|
62
|
+
var import_react = require("react");
|
|
62
63
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
children,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
variant !== "underline" && `hds-link--${variant}`,
|
|
83
|
-
size !== "medium" && `hds-link--${size}`,
|
|
84
|
-
className
|
|
85
|
-
),
|
|
86
|
-
ref: anchorRef
|
|
87
|
-
}, rest), {
|
|
88
|
-
children
|
|
89
|
-
})
|
|
90
|
-
);
|
|
91
|
-
}
|
|
64
|
+
var Link = (0, import_react.forwardRef)(
|
|
65
|
+
(_a, ref) => {
|
|
66
|
+
var _b = _a, { as: Component = "a", children, variant = "underline", size = "medium", className } = _b, rest = __objRest(_b, ["as", "children", "variant", "size", "className"]);
|
|
67
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
68
|
+
Component,
|
|
69
|
+
__spreadProps(__spreadValues({
|
|
70
|
+
className: (0, import_typed_classname.clsx)(
|
|
71
|
+
"hds-link",
|
|
72
|
+
variant !== "underline" && `hds-link--${variant}`,
|
|
73
|
+
size !== "medium" && `hds-link--${size}`,
|
|
74
|
+
className
|
|
75
|
+
),
|
|
76
|
+
ref
|
|
77
|
+
}, rest), {
|
|
78
|
+
children
|
|
79
|
+
})
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
);
|
|
92
83
|
Link.displayName = "Link";
|
|
93
84
|
// Annotate the CommonJS export names for ESM import in node:
|
|
94
85
|
0 && (module.exports = {
|
package/dist/link/index.mjs
CHANGED
package/dist/link/link.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as React from 'react';
|
|
2
|
+
import { O as OverridableComponent } from '../utils-BfZsjuFH.mjs';
|
|
3
3
|
|
|
4
4
|
interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
5
5
|
/**
|
|
@@ -13,14 +13,6 @@ interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
|
13
13
|
children: React.ReactNode;
|
|
14
14
|
anchorRef?: React.ForwardedRef<HTMLAnchorElement>;
|
|
15
15
|
}
|
|
16
|
-
|
|
17
|
-
* ## TODO
|
|
18
|
-
*
|
|
19
|
-
* - [ ] Handle button styling
|
|
20
|
-
*/
|
|
21
|
-
declare function Link({ children, variant, size, anchorRef, className, ...rest }: LinkProps): react_jsx_runtime.JSX.Element;
|
|
22
|
-
declare namespace Link {
|
|
23
|
-
var displayName: string;
|
|
24
|
-
}
|
|
16
|
+
declare const Link: OverridableComponent<LinkProps, HTMLAnchorElement>;
|
|
25
17
|
|
|
26
18
|
export { Link, type LinkProps };
|
package/dist/link/link.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as React from 'react';
|
|
2
|
+
import { O as OverridableComponent } from '../utils-BfZsjuFH.js';
|
|
3
3
|
|
|
4
4
|
interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
5
5
|
/**
|
|
@@ -13,14 +13,6 @@ interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
|
13
13
|
children: React.ReactNode;
|
|
14
14
|
anchorRef?: React.ForwardedRef<HTMLAnchorElement>;
|
|
15
15
|
}
|
|
16
|
-
|
|
17
|
-
* ## TODO
|
|
18
|
-
*
|
|
19
|
-
* - [ ] Handle button styling
|
|
20
|
-
*/
|
|
21
|
-
declare function Link({ children, variant, size, anchorRef, className, ...rest }: LinkProps): react_jsx_runtime.JSX.Element;
|
|
22
|
-
declare namespace Link {
|
|
23
|
-
var displayName: string;
|
|
24
|
-
}
|
|
16
|
+
declare const Link: OverridableComponent<LinkProps, HTMLAnchorElement>;
|
|
25
17
|
|
|
26
18
|
export { Link, type LinkProps };
|
package/dist/link/link.js
CHANGED
|
@@ -53,36 +53,27 @@ __export(link_exports, {
|
|
|
53
53
|
});
|
|
54
54
|
module.exports = __toCommonJS(link_exports);
|
|
55
55
|
var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
|
|
56
|
+
var import_react = require("react");
|
|
56
57
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
children,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
variant !== "underline" && `hds-link--${variant}`,
|
|
77
|
-
size !== "medium" && `hds-link--${size}`,
|
|
78
|
-
className
|
|
79
|
-
),
|
|
80
|
-
ref: anchorRef
|
|
81
|
-
}, rest), {
|
|
82
|
-
children
|
|
83
|
-
})
|
|
84
|
-
);
|
|
85
|
-
}
|
|
58
|
+
var Link = (0, import_react.forwardRef)(
|
|
59
|
+
(_a, ref) => {
|
|
60
|
+
var _b = _a, { as: Component = "a", children, variant = "underline", size = "medium", className } = _b, rest = __objRest(_b, ["as", "children", "variant", "size", "className"]);
|
|
61
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
62
|
+
Component,
|
|
63
|
+
__spreadProps(__spreadValues({
|
|
64
|
+
className: (0, import_typed_classname.clsx)(
|
|
65
|
+
"hds-link",
|
|
66
|
+
variant !== "underline" && `hds-link--${variant}`,
|
|
67
|
+
size !== "medium" && `hds-link--${size}`,
|
|
68
|
+
className
|
|
69
|
+
),
|
|
70
|
+
ref
|
|
71
|
+
}, rest), {
|
|
72
|
+
children
|
|
73
|
+
})
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
);
|
|
86
77
|
Link.displayName = "Link";
|
|
87
78
|
// Annotate the CommonJS export names for ESM import in node:
|
|
88
79
|
0 && (module.exports = {
|
package/dist/link/link.mjs
CHANGED
package/dist/message/index.d.mts
CHANGED
|
@@ -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>, "icon" | "children" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "
|
|
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;
|
|
11
11
|
} & Pick<React.FC, "displayName"> & {
|
|
12
12
|
Title: typeof MessageTitle;
|
|
13
13
|
Description: typeof MessageDescription;
|
package/dist/message/index.d.ts
CHANGED
|
@@ -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>, "icon" | "children" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "
|
|
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;
|
|
11
11
|
} & Pick<React.FC, "displayName"> & {
|
|
12
12
|
Title: typeof MessageTitle;
|
|
13
13
|
Description: typeof MessageDescription;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@postenbring/hedwig-react",
|
|
3
|
-
"version": "0.0.0-include-css-in-react-package-k6QhqAlv",
|
|
3
|
+
"version": "0.0.0-include-css-in-react-package-k6QhqAlv-20231129150130",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
package/dist/chunk-53AQCCBR.mjs
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__objRest,
|
|
3
|
-
__spreadProps,
|
|
4
|
-
__spreadValues
|
|
5
|
-
} from "./chunk-FUJQIYOF.mjs";
|
|
6
|
-
|
|
7
|
-
// src/link/link.tsx
|
|
8
|
-
import { clsx } from "@postenbring/hedwig-css/typed-classname/index.mjs";
|
|
9
|
-
import { jsx } from "react/jsx-runtime";
|
|
10
|
-
function Link(_a) {
|
|
11
|
-
var _b = _a, {
|
|
12
|
-
children,
|
|
13
|
-
variant = "underline",
|
|
14
|
-
size = "medium",
|
|
15
|
-
anchorRef,
|
|
16
|
-
className
|
|
17
|
-
} = _b, rest = __objRest(_b, [
|
|
18
|
-
"children",
|
|
19
|
-
"variant",
|
|
20
|
-
"size",
|
|
21
|
-
"anchorRef",
|
|
22
|
-
"className"
|
|
23
|
-
]);
|
|
24
|
-
return /* @__PURE__ */ jsx(
|
|
25
|
-
"a",
|
|
26
|
-
__spreadProps(__spreadValues({
|
|
27
|
-
className: clsx(
|
|
28
|
-
"hds-link",
|
|
29
|
-
variant !== "underline" && `hds-link--${variant}`,
|
|
30
|
-
size !== "medium" && `hds-link--${size}`,
|
|
31
|
-
className
|
|
32
|
-
),
|
|
33
|
-
ref: anchorRef
|
|
34
|
-
}, rest), {
|
|
35
|
-
children
|
|
36
|
-
})
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
Link.displayName = "Link";
|
|
40
|
-
|
|
41
|
-
export {
|
|
42
|
-
Link
|
|
43
|
-
};
|