@postenbring/hedwig-react 0.0.48 → 0.0.50
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/button/button.d.mts +12 -5
- package/dist/button/button.d.ts +12 -5
- package/dist/button/button.js +5 -2
- package/dist/button/button.mjs +1 -1
- package/dist/button/index.js +5 -2
- package/dist/button/index.mjs +1 -1
- package/dist/card/card.d.mts +29 -5
- package/dist/card/card.d.ts +29 -5
- package/dist/card/card.js +26 -32
- package/dist/card/card.mjs +1 -1
- package/dist/card/index.d.mts +9 -8
- package/dist/card/index.d.ts +9 -8
- package/dist/card/index.js +26 -32
- package/dist/card/index.mjs +2 -2
- package/dist/{chunk-3WUAXFB3.mjs → chunk-3WKOOAQL.mjs} +7 -7
- package/dist/{chunk-S7FSULI3.mjs → chunk-52YSOWMY.mjs} +1 -1
- package/dist/{chunk-6KRJB36T.mjs → chunk-CCNB2ABL.mjs} +6 -15
- package/dist/{chunk-J5QNIAFL.mjs → chunk-JAHBNZTG.mjs} +4 -13
- package/dist/{chunk-DOWBGRCN.mjs → chunk-JOKO7Y7O.mjs} +3 -3
- package/dist/{chunk-MUGMWWNN.mjs → chunk-LCFKBPZC.mjs} +1 -1
- package/dist/{chunk-B3SD7RZV.mjs → chunk-OEOI74US.mjs} +26 -32
- package/dist/{chunk-4KBVX3Y7.mjs → chunk-OSCKYUZ3.mjs} +1 -1
- package/dist/{chunk-RNALWA7A.mjs → chunk-OX5NTX6M.mjs} +2 -25
- package/dist/{chunk-YBSM5D5N.mjs → chunk-PTLX7PHW.mjs} +5 -2
- package/dist/chunk-RBOWRO3L.mjs +18 -0
- package/dist/chunk-RSL23FEW.mjs +26 -0
- package/dist/{chunk-JTBZ4UL4.mjs → chunk-SDR3TESK.mjs} +3 -3
- package/dist/{chunk-IXH7S7RI.mjs → chunk-ZDZR5FVC.mjs} +1 -1
- package/dist/form/checkbox/checkbox.js +3 -3
- package/dist/form/checkbox/checkbox.mjs +1 -1
- package/dist/form/checkbox/index.js +3 -3
- package/dist/form/checkbox/index.mjs +1 -1
- package/dist/form/error-message/error-message.d.mts +1 -2
- package/dist/form/error-message/error-message.d.ts +1 -2
- package/dist/form/error-message/error-message.js +4 -28
- package/dist/form/error-message/error-message.mjs +1 -1
- package/dist/form/error-message/index.js +4 -28
- package/dist/form/error-message/index.mjs +1 -1
- package/dist/form/fieldset/fieldset.d.mts +0 -1
- package/dist/form/fieldset/fieldset.d.ts +0 -1
- package/dist/form/fieldset/fieldset.js +7 -23
- package/dist/form/fieldset/fieldset.mjs +2 -2
- package/dist/form/fieldset/index.js +7 -23
- package/dist/form/fieldset/index.mjs +2 -2
- package/dist/form/index.js +17 -65
- package/dist/form/index.mjs +8 -8
- package/dist/form/input/index.js +10 -49
- package/dist/form/input/index.mjs +3 -3
- package/dist/form/input/input.js +10 -49
- package/dist/form/input/input.mjs +3 -3
- package/dist/form/input-group/index.js +9 -25
- package/dist/form/input-group/index.mjs +2 -2
- package/dist/form/input-group/input-group.d.mts +0 -1
- package/dist/form/input-group/input-group.d.ts +0 -1
- package/dist/form/input-group/input-group.js +9 -25
- package/dist/form/input-group/input-group.mjs +2 -2
- package/dist/form/radiobutton/index.js +1 -1
- package/dist/form/radiobutton/index.mjs +1 -1
- package/dist/form/radiobutton/radiobutton.js +1 -1
- package/dist/form/radiobutton/radiobutton.mjs +1 -1
- package/dist/form/select/index.js +9 -25
- package/dist/form/select/index.mjs +3 -3
- package/dist/form/select/select.js +9 -25
- package/dist/form/select/select.mjs +3 -3
- package/dist/form/textarea/index.js +9 -25
- package/dist/form/textarea/index.mjs +3 -3
- package/dist/form/textarea/textarea.js +9 -25
- package/dist/form/textarea/textarea.mjs +3 -3
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +93 -136
- package/dist/index.mjs +17 -17
- package/dist/list/index.js +10 -2
- package/dist/list/index.mjs +1 -1
- package/dist/list/link-list.d.mts +1 -1
- package/dist/list/link-list.d.ts +1 -1
- package/dist/list/link-list.js +10 -2
- package/dist/list/link-list.mjs +1 -1
- package/dist/navbar/index.js +3 -3
- package/dist/navbar/index.mjs +1 -1
- package/dist/navbar/navbar-expandable-menu.js +3 -3
- package/dist/navbar/navbar-expandable-menu.mjs +1 -1
- package/dist/{prose/prose.d.mts → styled-html/styled-html.d.mts} +9 -15
- package/dist/{prose/prose.d.ts → styled-html/styled-html.d.ts} +9 -15
- package/dist/{prose/prose.js → styled-html/styled-html.js} +11 -11
- package/dist/styled-html/styled-html.mjs +7 -0
- package/package.json +5 -5
- package/dist/chunk-R7GQHCN4.mjs +0 -30
- package/dist/chunk-X5URKHFD.mjs +0 -18
- package/dist/prose/prose.mjs +0 -7
package/dist/list/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { ListProps } from './list.mjs';
|
|
|
5
5
|
interface LinkListProps extends Omit<ListProps, "listStyle"> {
|
|
6
6
|
children?: react.ReactElement<HTMLLIElement> | react.ReactElement<HTMLLIElement>[];
|
|
7
7
|
}
|
|
8
|
-
declare function LinkList(
|
|
8
|
+
declare function LinkList({ className, ...rest }: LinkListProps): react_jsx_runtime.JSX.Element;
|
|
9
9
|
declare namespace LinkList {
|
|
10
10
|
var displayName: string;
|
|
11
11
|
}
|
package/dist/list/link-list.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { ListProps } from './list.js';
|
|
|
5
5
|
interface LinkListProps extends Omit<ListProps, "listStyle"> {
|
|
6
6
|
children?: react.ReactElement<HTMLLIElement> | react.ReactElement<HTMLLIElement>[];
|
|
7
7
|
}
|
|
8
|
-
declare function LinkList(
|
|
8
|
+
declare function LinkList({ className, ...rest }: LinkListProps): react_jsx_runtime.JSX.Element;
|
|
9
9
|
declare namespace LinkList {
|
|
10
10
|
var displayName: string;
|
|
11
11
|
}
|
package/dist/list/link-list.js
CHANGED
|
@@ -52,6 +52,7 @@ __export(link_list_exports, {
|
|
|
52
52
|
LinkList: () => LinkList
|
|
53
53
|
});
|
|
54
54
|
module.exports = __toCommonJS(link_list_exports);
|
|
55
|
+
var import_typed_classname2 = require("@postenbring/hedwig-css/typed-classname/index.mjs");
|
|
55
56
|
|
|
56
57
|
// src/list/list.tsx
|
|
57
58
|
var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
|
|
@@ -98,8 +99,15 @@ UnorderedList.displayName = "UnorderedList";
|
|
|
98
99
|
|
|
99
100
|
// src/list/link-list.tsx
|
|
100
101
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
101
|
-
function LinkList(
|
|
102
|
-
|
|
102
|
+
function LinkList(_a) {
|
|
103
|
+
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
|
104
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
105
|
+
UnorderedList,
|
|
106
|
+
__spreadValues({
|
|
107
|
+
className: (0, import_typed_classname2.clsx)("hds-list--link-list", className),
|
|
108
|
+
listStyle: "no-bullets"
|
|
109
|
+
}, rest)
|
|
110
|
+
);
|
|
103
111
|
}
|
|
104
112
|
LinkList.displayName = "LinkList";
|
|
105
113
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/list/link-list.mjs
CHANGED
package/dist/navbar/index.js
CHANGED
|
@@ -29202,7 +29202,7 @@ function RenderButton(_a) {
|
|
|
29202
29202
|
__spreadProps(__spreadValues({
|
|
29203
29203
|
className: (0, import_typed_classname2.clsx)("hds-navbar__button", className),
|
|
29204
29204
|
onClick: toggleOpen,
|
|
29205
|
-
ref: ref
|
|
29205
|
+
ref: ref != null ? ref : innerRef,
|
|
29206
29206
|
style,
|
|
29207
29207
|
title,
|
|
29208
29208
|
type: "button"
|
|
@@ -29243,8 +29243,8 @@ var NavbarExpandableMenuTrigger = (0, import_react2.forwardRef)(
|
|
|
29243
29243
|
const root = (0, import_client.createRoot)(container);
|
|
29244
29244
|
root.render(element);
|
|
29245
29245
|
const getWidth = () => {
|
|
29246
|
-
var _a2;
|
|
29247
|
-
callback(((_a2 = measureButtonRef.current) == null ? void 0 : _a2.offsetWidth)
|
|
29246
|
+
var _a2, _b2;
|
|
29247
|
+
callback((_b2 = (_a2 = measureButtonRef.current) == null ? void 0 : _a2.offsetWidth) != null ? _b2 : 0);
|
|
29248
29248
|
root.unmount();
|
|
29249
29249
|
c.removeChild(container);
|
|
29250
29250
|
};
|
package/dist/navbar/index.mjs
CHANGED
|
@@ -29157,7 +29157,7 @@ function RenderButton(_a) {
|
|
|
29157
29157
|
__spreadProps(__spreadValues({
|
|
29158
29158
|
className: (0, import_typed_classname.clsx)("hds-navbar__button", className),
|
|
29159
29159
|
onClick: toggleOpen,
|
|
29160
|
-
ref: ref
|
|
29160
|
+
ref: ref != null ? ref : innerRef,
|
|
29161
29161
|
style,
|
|
29162
29162
|
title,
|
|
29163
29163
|
type: "button"
|
|
@@ -29198,8 +29198,8 @@ var NavbarExpandableMenuTrigger = (0, import_react.forwardRef)(
|
|
|
29198
29198
|
const root = (0, import_client.createRoot)(container);
|
|
29199
29199
|
root.render(element);
|
|
29200
29200
|
const getWidth = () => {
|
|
29201
|
-
var _a2;
|
|
29202
|
-
callback(((_a2 = measureButtonRef.current) == null ? void 0 : _a2.offsetWidth)
|
|
29201
|
+
var _a2, _b2;
|
|
29202
|
+
callback((_b2 = (_a2 = measureButtonRef.current) == null ? void 0 : _a2.offsetWidth) != null ? _b2 : 0);
|
|
29203
29203
|
root.unmount();
|
|
29204
29204
|
c.removeChild(container);
|
|
29205
29205
|
};
|
|
@@ -1,27 +1,21 @@
|
|
|
1
1
|
import react__default from 'react';
|
|
2
2
|
import { O as OverridableComponent } from '../utils-3jLhIyOS.mjs';
|
|
3
3
|
|
|
4
|
-
interface
|
|
4
|
+
interface StyledHtmlProps {
|
|
5
5
|
children?: react__default.ReactNode;
|
|
6
6
|
size?: "default" | "small";
|
|
7
7
|
darkmode?: boolean;
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* ### TODO: Choose a name
|
|
10
|
+
* A component for displaying dynamic content that you want to apply hedwig styling to.
|
|
11
|
+
* the styling depends on the semantic html elements you use inside the component.
|
|
13
12
|
*
|
|
14
|
-
*
|
|
15
|
-
* - Prose - [What tailwind calls it](https://tailwindcss.com/docs/typography-plugin)
|
|
16
|
-
* - RichText
|
|
17
|
-
* - Content
|
|
18
|
-
* - DynamicContent
|
|
13
|
+
* Useful when you have dynamic content that you want styled with hedwig, like content from a CMS.
|
|
19
14
|
*
|
|
20
|
-
*
|
|
21
|
-
* the styling depends on the semantic html elements you use inside the component.
|
|
15
|
+
* Previously known as `hw-wysiwyg` in hedwig legacy. In tailwind this kind of component it is known as `prose`.
|
|
22
16
|
*
|
|
23
17
|
* ```tsx
|
|
24
|
-
* <
|
|
18
|
+
* <StyledHtml>
|
|
25
19
|
* <h1>Heading 1</h1>
|
|
26
20
|
* <h2>Heading 2</h2>
|
|
27
21
|
* <a href="https://www.postenbring.no">Postenbring</a>
|
|
@@ -30,9 +24,9 @@ interface ProseProps {
|
|
|
30
24
|
* <li>Hallo</li>
|
|
31
25
|
* <li>Hello</li>
|
|
32
26
|
* </ul>
|
|
33
|
-
* </
|
|
27
|
+
* </StyledHtml>
|
|
34
28
|
* ```
|
|
35
29
|
*/
|
|
36
|
-
declare const
|
|
30
|
+
declare const StyledHtml: OverridableComponent<StyledHtmlProps, HTMLDivElement>;
|
|
37
31
|
|
|
38
|
-
export {
|
|
32
|
+
export { StyledHtml, type StyledHtmlProps };
|
|
@@ -1,27 +1,21 @@
|
|
|
1
1
|
import react__default from 'react';
|
|
2
2
|
import { O as OverridableComponent } from '../utils-3jLhIyOS.js';
|
|
3
3
|
|
|
4
|
-
interface
|
|
4
|
+
interface StyledHtmlProps {
|
|
5
5
|
children?: react__default.ReactNode;
|
|
6
6
|
size?: "default" | "small";
|
|
7
7
|
darkmode?: boolean;
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* ### TODO: Choose a name
|
|
10
|
+
* A component for displaying dynamic content that you want to apply hedwig styling to.
|
|
11
|
+
* the styling depends on the semantic html elements you use inside the component.
|
|
13
12
|
*
|
|
14
|
-
*
|
|
15
|
-
* - Prose - [What tailwind calls it](https://tailwindcss.com/docs/typography-plugin)
|
|
16
|
-
* - RichText
|
|
17
|
-
* - Content
|
|
18
|
-
* - DynamicContent
|
|
13
|
+
* Useful when you have dynamic content that you want styled with hedwig, like content from a CMS.
|
|
19
14
|
*
|
|
20
|
-
*
|
|
21
|
-
* the styling depends on the semantic html elements you use inside the component.
|
|
15
|
+
* Previously known as `hw-wysiwyg` in hedwig legacy. In tailwind this kind of component it is known as `prose`.
|
|
22
16
|
*
|
|
23
17
|
* ```tsx
|
|
24
|
-
* <
|
|
18
|
+
* <StyledHtml>
|
|
25
19
|
* <h1>Heading 1</h1>
|
|
26
20
|
* <h2>Heading 2</h2>
|
|
27
21
|
* <a href="https://www.postenbring.no">Postenbring</a>
|
|
@@ -30,9 +24,9 @@ interface ProseProps {
|
|
|
30
24
|
* <li>Hallo</li>
|
|
31
25
|
* <li>Hello</li>
|
|
32
26
|
* </ul>
|
|
33
|
-
* </
|
|
27
|
+
* </StyledHtml>
|
|
34
28
|
* ```
|
|
35
29
|
*/
|
|
36
|
-
declare const
|
|
30
|
+
declare const StyledHtml: OverridableComponent<StyledHtmlProps, HTMLDivElement>;
|
|
37
31
|
|
|
38
|
-
export {
|
|
32
|
+
export { StyledHtml, type StyledHtmlProps };
|
|
@@ -46,25 +46,25 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
46
46
|
};
|
|
47
47
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
48
48
|
|
|
49
|
-
// src/
|
|
50
|
-
var
|
|
51
|
-
__export(
|
|
52
|
-
|
|
49
|
+
// src/styled-html/styled-html.tsx
|
|
50
|
+
var styled_html_exports = {};
|
|
51
|
+
__export(styled_html_exports, {
|
|
52
|
+
StyledHtml: () => StyledHtml
|
|
53
53
|
});
|
|
54
|
-
module.exports = __toCommonJS(
|
|
54
|
+
module.exports = __toCommonJS(styled_html_exports);
|
|
55
55
|
var import_react = require("react");
|
|
56
56
|
var import_typed_classname = require("@postenbring/hedwig-css/typed-classname/index.mjs");
|
|
57
57
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
58
|
-
var
|
|
58
|
+
var StyledHtml = (0, import_react.forwardRef)(
|
|
59
59
|
(_a, ref) => {
|
|
60
60
|
var _b = _a, { as: Component = "div", children, size, darkmode = false, className } = _b, rest = __objRest(_b, ["as", "children", "size", "darkmode", "className"]);
|
|
61
61
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
62
62
|
Component,
|
|
63
63
|
__spreadProps(__spreadValues({
|
|
64
64
|
className: (0, import_typed_classname.clsx)(
|
|
65
|
-
`hds-
|
|
66
|
-
size === "small" && "hds-
|
|
67
|
-
darkmode && "hds-
|
|
65
|
+
`hds-styled-html`,
|
|
66
|
+
size === "small" && "hds-styled-html--small",
|
|
67
|
+
darkmode && "hds-styled-html--darkmode",
|
|
68
68
|
className
|
|
69
69
|
),
|
|
70
70
|
ref
|
|
@@ -74,8 +74,8 @@ var Prose = (0, import_react.forwardRef)(
|
|
|
74
74
|
);
|
|
75
75
|
}
|
|
76
76
|
);
|
|
77
|
-
|
|
77
|
+
StyledHtml.displayName = "Prose";
|
|
78
78
|
// Annotate the CommonJS export names for ESM import in node:
|
|
79
79
|
0 && (module.exports = {
|
|
80
|
-
|
|
80
|
+
StyledHtml
|
|
81
81
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@postenbring/hedwig-react",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.50",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -10,17 +10,17 @@
|
|
|
10
10
|
"dist/**"
|
|
11
11
|
],
|
|
12
12
|
"devDependencies": {
|
|
13
|
-
"@types/react": "^18.2.
|
|
14
|
-
"@types/react-dom": "^18.2.
|
|
13
|
+
"@types/react": "^18.2.64",
|
|
14
|
+
"@types/react-dom": "^18.2.21",
|
|
15
15
|
"react": "^18.2.0",
|
|
16
16
|
"react-dom": "18.2.0",
|
|
17
17
|
"tsup": "^8.0.1",
|
|
18
|
-
"typescript": "^5.
|
|
18
|
+
"typescript": "^5.4.2",
|
|
19
19
|
"eslint-config-custom": "0.0.1",
|
|
20
20
|
"hedwig-tsconfig": "0.0.0"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@postenbring/hedwig-css": "0.0.
|
|
23
|
+
"@postenbring/hedwig-css": "0.0.45"
|
|
24
24
|
},
|
|
25
25
|
"publishConfig": {
|
|
26
26
|
"access": "public"
|
package/dist/chunk-R7GQHCN4.mjs
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__spreadProps,
|
|
3
|
-
__spreadValues
|
|
4
|
-
} from "./chunk-FKR5F35B.mjs";
|
|
5
|
-
|
|
6
|
-
// src/form/error-message/error-message.tsx
|
|
7
|
-
import { clsx } from "@postenbring/hedwig-css/typed-classname/index.mjs";
|
|
8
|
-
import { jsx } from "react/jsx-runtime";
|
|
9
|
-
function ErrorMessage({
|
|
10
|
-
children,
|
|
11
|
-
id,
|
|
12
|
-
className,
|
|
13
|
-
_unstableAriaLiveOnErrorMessage
|
|
14
|
-
}) {
|
|
15
|
-
return /* @__PURE__ */ jsx(
|
|
16
|
-
"div",
|
|
17
|
-
__spreadProps(__spreadValues({}, _unstableAriaLiveOnErrorMessage && {
|
|
18
|
-
"aria-live": "polite",
|
|
19
|
-
"aria-relevant": "additions removals"
|
|
20
|
-
}), {
|
|
21
|
-
className: clsx("hds-error-message", className),
|
|
22
|
-
id,
|
|
23
|
-
children
|
|
24
|
-
})
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export {
|
|
29
|
-
ErrorMessage
|
|
30
|
-
};
|
package/dist/chunk-X5URKHFD.mjs
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
UnorderedList
|
|
3
|
-
} from "./chunk-BEXOLUXV.mjs";
|
|
4
|
-
import {
|
|
5
|
-
__spreadProps,
|
|
6
|
-
__spreadValues
|
|
7
|
-
} from "./chunk-FKR5F35B.mjs";
|
|
8
|
-
|
|
9
|
-
// src/list/link-list.tsx
|
|
10
|
-
import { jsx } from "react/jsx-runtime";
|
|
11
|
-
function LinkList(props) {
|
|
12
|
-
return /* @__PURE__ */ jsx(UnorderedList, __spreadProps(__spreadValues({ listStyle: "no-bullets" }, props), { children: props.children }));
|
|
13
|
-
}
|
|
14
|
-
LinkList.displayName = "LinkList";
|
|
15
|
-
|
|
16
|
-
export {
|
|
17
|
-
LinkList
|
|
18
|
-
};
|