@postenbring/hedwig-react 0.0.6 → 0.0.9

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.
Files changed (97) hide show
  1. package/dist/accordion/accordion-item-content.js +3 -4
  2. package/dist/accordion/accordion-item-content.mjs +1 -1
  3. package/dist/accordion/accordion-item-trigger.js +26 -13
  4. package/dist/accordion/accordion-item-trigger.mjs +1 -1
  5. package/dist/accordion/accordion-item.js +3 -4
  6. package/dist/accordion/accordion-item.mjs +1 -1
  7. package/dist/accordion/accordion.js +1 -2
  8. package/dist/accordion/accordion.mjs +1 -1
  9. package/dist/accordion/index.js +35 -25
  10. package/dist/accordion/index.mjs +5 -5
  11. package/dist/badge/badge.js +10 -4
  12. package/dist/badge/badge.mjs +1 -1
  13. package/dist/badge/index.js +12 -6
  14. package/dist/badge/index.mjs +2 -2
  15. package/dist/box/box.d.mts +2 -2
  16. package/dist/box/box.d.ts +2 -2
  17. package/dist/box/box.js +8 -9
  18. package/dist/box/box.mjs +1 -1
  19. package/dist/box/index.js +10 -11
  20. package/dist/box/index.mjs +2 -2
  21. package/dist/button/button.d.mts +14 -14
  22. package/dist/button/button.d.ts +14 -14
  23. package/dist/button/button.js +59 -38
  24. package/dist/button/button.mjs +3 -1
  25. package/dist/button/index.d.mts +2 -2
  26. package/dist/button/index.d.ts +2 -2
  27. package/dist/button/index.js +61 -40
  28. package/dist/button/index.mjs +4 -2
  29. package/dist/chunk-2QSL2PSS.mjs +63 -0
  30. package/dist/chunk-5NDZ66M6.mjs +5 -0
  31. package/dist/chunk-6AW5BEDP.mjs +21 -0
  32. package/dist/{chunk-B3PZUFG2.mjs → chunk-6XSKLHN6.mjs} +15 -6
  33. package/dist/chunk-BJANCH4F.mjs +5 -0
  34. package/dist/{chunk-NMSLCM2K.mjs → chunk-DQ2OO6EW.mjs} +1 -1
  35. package/dist/chunk-ENRMC5K7.mjs +75 -0
  36. package/dist/{chunk-IWV4FFE3.mjs → chunk-GMGUONH5.mjs} +2 -3
  37. package/dist/{chunk-LNYNZ4EG.mjs → chunk-J7U4Z726.mjs} +3 -4
  38. package/dist/{chunk-KBVDBI2L.mjs → chunk-L7DYK6OS.mjs} +3 -4
  39. package/dist/{chunk-O3NMR6GE.mjs → chunk-MNSMCSAR.mjs} +11 -5
  40. package/dist/chunk-N3EFZW7T.mjs +5 -0
  41. package/dist/{chunk-IOOSUX5O.mjs → chunk-QOVAYDPH.mjs} +2 -2
  42. package/dist/chunk-R55SMUE7.mjs +5 -0
  43. package/dist/{chunk-EX4U7YZF.mjs → chunk-RXUPE4MM.mjs} +8 -9
  44. package/dist/{chunk-IWDN3WGQ.mjs → chunk-STKOYB5H.mjs} +13 -7
  45. package/dist/chunk-TES7CVGU.mjs +34 -0
  46. package/dist/chunk-X4D24ZRP.mjs +63 -0
  47. package/dist/chunk-XJ44O3HY.mjs +58 -0
  48. package/dist/chunk-Z36ETKOZ.mjs +5 -0
  49. package/dist/index.d.mts +5 -4
  50. package/dist/index.d.ts +5 -4
  51. package/dist/index.js +235 -155
  52. package/dist/index.mjs +32 -25
  53. package/dist/input/index.d.mts +3 -0
  54. package/dist/input/index.d.ts +3 -0
  55. package/dist/input/index.js +121 -0
  56. package/dist/input/index.mjs +13 -0
  57. package/dist/input/input.d.mts +1 -1
  58. package/dist/input/input.d.ts +1 -1
  59. package/dist/input/input.js +13 -7
  60. package/dist/input/input.mjs +3 -47
  61. package/dist/link/index.d.mts +1 -1
  62. package/dist/link/index.d.ts +1 -1
  63. package/dist/link/index.js +22 -29
  64. package/dist/link/index.mjs +2 -2
  65. package/dist/link/link.d.mts +2 -10
  66. package/dist/link/link.d.ts +2 -10
  67. package/dist/link/link.js +20 -27
  68. package/dist/link/link.mjs +1 -1
  69. package/dist/list/description-list.d.mts +1 -1
  70. package/dist/list/description-list.d.ts +1 -1
  71. package/dist/list/description-list.js +14 -5
  72. package/dist/list/description-list.mjs +1 -1
  73. package/dist/list/index.js +28 -13
  74. package/dist/list/index.mjs +8 -8
  75. package/dist/list/link-list.js +12 -6
  76. package/dist/list/link-list.mjs +2 -2
  77. package/dist/list/list.js +12 -6
  78. package/dist/list/list.mjs +1 -1
  79. package/dist/message/index.d.mts +14 -2
  80. package/dist/message/index.d.ts +14 -2
  81. package/dist/message/index.js +51 -16
  82. package/dist/message/index.mjs +10 -5
  83. package/dist/message/message.d.mts +3 -1
  84. package/dist/message/message.d.ts +3 -1
  85. package/dist/message/message.js +42 -14
  86. package/dist/message/message.mjs +8 -4
  87. package/package.json +3 -5
  88. package/dist/chunk-4XWB4ZSR.mjs +0 -6
  89. package/dist/chunk-7F7QB4D5.mjs +0 -50
  90. package/dist/chunk-AYGPUYPZ.mjs +0 -5
  91. package/dist/chunk-CYW3DUD2.mjs +0 -5
  92. package/dist/chunk-EKFYWUBE.mjs +0 -36
  93. package/dist/chunk-GSPFHK2Z.mjs +0 -55
  94. package/dist/chunk-ID5KKZMK.mjs +0 -5
  95. package/dist/chunk-PCKWBORI.mjs +0 -5
  96. package/dist/chunk-VZNNGRKM.mjs +0 -5
  97. package/dist/chunk-X3OAJSS2.mjs +0 -41
@@ -1,50 +0,0 @@
1
- import {
2
- AccordionItemContext
3
- } from "./chunk-2V6SWZ5G.mjs";
4
- import {
5
- __objRest,
6
- __spreadProps,
7
- __spreadValues
8
- } from "./chunk-FUJQIYOF.mjs";
9
-
10
- // src/accordion/accordion-item-trigger.tsx
11
- import { forwardRef, useContext } from "react";
12
- import { t } from "@postenbring/hedwig-css/typed-classname/index.mjs";
13
- import { clsx } from "clsx";
14
- import { jsx, jsxs } from "react/jsx-runtime";
15
- function FaArrowDownButNotReally() {
16
- return /* @__PURE__ */ jsx("span", { children: "v " });
17
- }
18
- function FaArrowUpButNotReally() {
19
- return /* @__PURE__ */ jsx("span", { children: "^ " });
20
- }
21
- var AccordionTrigger = forwardRef((_a, ref) => {
22
- var _b = _a, { as: Component = "button", children, className, onClick } = _b, rest = __objRest(_b, ["as", "children", "className", "onClick"]);
23
- const itemContext = useContext(AccordionItemContext);
24
- if (itemContext === null) {
25
- return null;
26
- }
27
- const expandOrCollapse = (e) => {
28
- itemContext.setOpen(!itemContext.open);
29
- onClick && onClick(e);
30
- };
31
- return /* @__PURE__ */ jsx(
32
- Component,
33
- __spreadProps(__spreadValues({}, rest), {
34
- "aria-expanded": itemContext.open,
35
- className: clsx(t("hds-accordion-item-trigger"), className),
36
- onClick: expandOrCollapse,
37
- ref,
38
- type: "button",
39
- children: /* @__PURE__ */ jsxs("span", { children: [
40
- /* @__PURE__ */ jsx("div", { className: clsx(t("hds-accordion-item-trigger--icon")), children: itemContext.open ? /* @__PURE__ */ jsx(FaArrowUpButNotReally, {}) : /* @__PURE__ */ jsx(FaArrowDownButNotReally, {}) }),
41
- children
42
- ] })
43
- })
44
- );
45
- });
46
- AccordionTrigger.displayName = "AccordionTrigger";
47
-
48
- export {
49
- AccordionTrigger
50
- };
@@ -1,5 +0,0 @@
1
- // src/link/index.tsx
2
- import "@postenbring/hedwig-tokens/tokens-output/css/fonts.css";
3
- import "@postenbring/hedwig-tokens/tokens-output/css/tokens.css";
4
- import "@postenbring/hedwig-css/dist/base.css";
5
- import "@postenbring/hedwig-css/dist/link.css";
@@ -1,5 +0,0 @@
1
- // src/badge/index.tsx
2
- import "@postenbring/hedwig-tokens/tokens-output/css/fonts.css";
3
- import "@postenbring/hedwig-tokens/tokens-output/css/tokens.css";
4
- import "@postenbring/hedwig-css/dist/base.css";
5
- import "@postenbring/hedwig-css/dist/badge.css";
@@ -1,36 +0,0 @@
1
- import {
2
- Box
3
- } from "./chunk-EX4U7YZF.mjs";
4
- import {
5
- __objRest,
6
- __spreadProps,
7
- __spreadValues
8
- } from "./chunk-FUJQIYOF.mjs";
9
-
10
- // src/message/message.tsx
11
- import { forwardRef } from "react";
12
- import { clsx } from "clsx";
13
- import { t } from "@postenbring/hedwig-css/typed-classname/index.mjs";
14
- import { jsx, jsxs } from "react/jsx-runtime";
15
- var Message = forwardRef(
16
- (_a, ref) => {
17
- var _b = _a, { children, className, variant = "success", icon, iconClassName } = _b, rest = __objRest(_b, ["children", "className", "variant", "icon", "iconClassName"]);
18
- return /* @__PURE__ */ jsxs(
19
- Box,
20
- __spreadProps(__spreadValues({
21
- className: clsx(t(`hds-message`), t(`hds-message--${variant}`), className),
22
- ref
23
- }, rest), {
24
- children: [
25
- variant === "neutral" && /* @__PURE__ */ jsx("div", { className: clsx(t("hds-message--neutral__icon"), iconClassName), children: icon }),
26
- children
27
- ]
28
- })
29
- );
30
- }
31
- );
32
- Message.displayName = "Message";
33
-
34
- export {
35
- Message
36
- };
@@ -1,55 +0,0 @@
1
- import {
2
- __objRest,
3
- __spreadProps,
4
- __spreadValues
5
- } from "./chunk-FUJQIYOF.mjs";
6
-
7
- // src/button/button.tsx
8
- import { clsx } from "clsx";
9
- import { t } from "@postenbring/hedwig-css/typed-classname/index.mjs";
10
- import { jsx } from "react/jsx-runtime";
11
- function BaseButton(_a) {
12
- var _b = _a, {
13
- children,
14
- variant,
15
- size = "medium",
16
- fullWidth = false,
17
- fill = "contained",
18
- buttonRef
19
- } = _b, rest = __objRest(_b, [
20
- "children",
21
- "variant",
22
- "size",
23
- "fullWidth",
24
- "fill",
25
- "buttonRef"
26
- ]);
27
- return /* @__PURE__ */ jsx(
28
- "button",
29
- __spreadProps(__spreadValues({
30
- className: clsx(t("hds-button"), t(`hds-button--${size}`), {
31
- [t(`hds-button--${variant}`)]: fill === "contained",
32
- [t(`hds-button--outline-${variant}`)]: fill === "outlined",
33
- [t("hds-button--full")]: fullWidth === true,
34
- [t("hds-button--mobile-full")]: fullWidth === "mobile"
35
- }),
36
- ref: buttonRef
37
- }, rest), {
38
- children
39
- })
40
- );
41
- }
42
- BaseButton.displayName = "BaseButton";
43
- function PrimaryButton(props) {
44
- return /* @__PURE__ */ jsx(BaseButton, __spreadProps(__spreadValues({}, props), { variant: "primary" }));
45
- }
46
- PrimaryButton.displayName = "PrimaryButton";
47
- function SecondaryButton(props) {
48
- return /* @__PURE__ */ jsx(BaseButton, __spreadProps(__spreadValues({}, props), { variant: "secondary" }));
49
- }
50
- SecondaryButton.displayName = "SecondaryButton";
51
-
52
- export {
53
- PrimaryButton,
54
- SecondaryButton
55
- };
@@ -1,5 +0,0 @@
1
- // src/box/index.tsx
2
- import "@postenbring/hedwig-tokens/tokens-output/css/fonts.css";
3
- import "@postenbring/hedwig-tokens/tokens-output/css/tokens.css";
4
- import "@postenbring/hedwig-css/dist/base.css";
5
- import "@postenbring/hedwig-css/dist/box.css";
@@ -1,5 +0,0 @@
1
- // src/accordion/index.tsx
2
- import "@postenbring/hedwig-tokens/tokens-output/css/fonts.css";
3
- import "@postenbring/hedwig-tokens/tokens-output/css/tokens.css";
4
- import "@postenbring/hedwig-css/dist/base.css";
5
- import "@postenbring/hedwig-css/dist/accordion.css";
@@ -1,5 +0,0 @@
1
- // src/button/index.tsx
2
- import "@postenbring/hedwig-tokens/tokens-output/css/fonts.css";
3
- import "@postenbring/hedwig-tokens/tokens-output/css/tokens.css";
4
- import "@postenbring/hedwig-css/dist/base.css";
5
- import "@postenbring/hedwig-css/dist/button.css";
@@ -1,41 +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 "clsx";
9
- import { t } from "@postenbring/hedwig-css/typed-classname/index.mjs";
10
- import { jsx } from "react/jsx-runtime";
11
- function Link(_a) {
12
- var _b = _a, {
13
- children,
14
- variant = "underline",
15
- size = "medium",
16
- anchorRef
17
- } = _b, rest = __objRest(_b, [
18
- "children",
19
- "variant",
20
- "size",
21
- "anchorRef"
22
- ]);
23
- return /* @__PURE__ */ jsx(
24
- "a",
25
- __spreadProps(__spreadValues({
26
- className: clsx(
27
- t("hds-link"),
28
- variant !== "underline" && t(`hds-link--${variant}`),
29
- size !== "medium" && t(`hds-link--${size}`)
30
- ),
31
- ref: anchorRef
32
- }, rest), {
33
- children
34
- })
35
- );
36
- }
37
- Link.displayName = "Link";
38
-
39
- export {
40
- Link
41
- };