@utrecht/component-library-react 1.0.0-alpha.1 → 1.0.0-alpha.101
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/README.md +48 -48
- package/dist/{Article.d.ts → cjs/Article.d.ts} +1 -2
- package/dist/{Article.js → cjs/Article.js} +12 -6
- package/dist/{Backdrop.d.ts → cjs/Backdrop.d.ts} +0 -0
- package/dist/{Backdrop.js → cjs/Backdrop.js} +12 -6
- package/dist/cjs/Button.d.ts +24 -0
- package/dist/cjs/Button.js +43 -0
- package/dist/cjs/ButtonLink.d.ts +11 -0
- package/dist/cjs/ButtonLink.js +47 -0
- package/dist/{Checkbox.d.ts → cjs/Checkbox.d.ts} +1 -2
- package/dist/cjs/Checkbox.js +25 -0
- package/dist/cjs/CustomRadioButton.d.ts +11 -0
- package/dist/cjs/CustomRadioButton.js +29 -0
- package/dist/{Document.d.ts → cjs/Document.d.ts} +0 -0
- package/dist/{Document.js → cjs/Document.js} +12 -6
- package/dist/{Fieldset.d.ts → cjs/Fieldset.d.ts} +1 -2
- package/dist/cjs/Fieldset.js +25 -0
- package/dist/{FieldsetLegend.d.ts → cjs/FieldsetLegend.d.ts} +1 -2
- package/dist/cjs/FieldsetLegend.js +25 -0
- package/dist/{FormField.d.ts → cjs/FormField.d.ts} +1 -2
- package/dist/cjs/FormField.js +25 -0
- package/dist/{FormFieldDescription.d.ts → cjs/FormFieldDescription.d.ts} +1 -2
- package/dist/cjs/FormFieldDescription.js +25 -0
- package/dist/{FormLabel.d.ts → cjs/FormLabel.d.ts} +1 -2
- package/dist/cjs/FormLabel.js +25 -0
- package/dist/{HTMLContent.d.ts → cjs/HTMLContent.d.ts} +0 -0
- package/dist/cjs/HTMLContent.js +29 -0
- package/dist/{Heading1.d.ts → cjs/Heading1.d.ts} +1 -2
- package/dist/{Heading1.js → cjs/Heading1.js} +12 -6
- package/dist/{Heading2.d.ts → cjs/Heading2.d.ts} +1 -2
- package/dist/{Heading2.js → cjs/Heading2.js} +12 -6
- package/dist/{Heading3.d.ts → cjs/Heading3.d.ts} +1 -2
- package/dist/{Heading3.js → cjs/Heading3.js} +12 -6
- package/dist/{Heading4.d.ts → cjs/Heading4.d.ts} +1 -2
- package/dist/{Heading4.js → cjs/Heading4.js} +12 -6
- package/dist/{Heading5.d.ts → cjs/Heading5.d.ts} +1 -2
- package/dist/{Heading5.js → cjs/Heading5.js} +12 -6
- package/dist/{Heading6.d.ts → cjs/Heading6.d.ts} +1 -2
- package/dist/{Heading6.js → cjs/Heading6.js} +12 -6
- package/dist/{Link.d.ts → cjs/Link.d.ts} +1 -2
- package/dist/{Link.js → cjs/Link.js} +12 -6
- package/dist/{OrderedList.d.ts → cjs/OrderedList.d.ts} +1 -2
- package/dist/cjs/OrderedList.js +29 -0
- package/dist/{OrderedListItem.d.ts → cjs/OrderedListItem.d.ts} +1 -2
- package/dist/cjs/OrderedListItem.js +29 -0
- package/dist/{Page.d.ts → cjs/Page.d.ts} +0 -0
- package/dist/{Page.js → cjs/Page.js} +12 -6
- package/dist/{PageContent.d.ts → cjs/PageContent.d.ts} +2 -3
- package/dist/cjs/PageContent.js +34 -0
- package/dist/{PageFooter.d.ts → cjs/PageFooter.d.ts} +0 -0
- package/dist/cjs/PageFooter.js +29 -0
- package/dist/{PageHeader.d.ts → cjs/PageHeader.d.ts} +0 -0
- package/dist/cjs/PageHeader.js +29 -0
- package/dist/{Paragraph.d.ts → cjs/Paragraph.d.ts} +1 -2
- package/dist/cjs/Paragraph.js +29 -0
- package/dist/{RadioButton.d.ts → cjs/RadioButton.d.ts} +1 -2
- package/dist/cjs/RadioButton.js +25 -0
- package/dist/{Select.d.ts → cjs/Select.d.ts} +2 -3
- package/dist/cjs/Select.js +31 -0
- package/dist/{Separator.d.ts → cjs/Separator.d.ts} +1 -2
- package/dist/{Separator.js → cjs/Separator.js} +12 -6
- package/dist/{Surface.d.ts → cjs/Surface.d.ts} +0 -0
- package/dist/{Surface.js → cjs/Surface.js} +12 -6
- package/dist/{Table.d.ts → cjs/Table.d.ts} +1 -2
- package/dist/{Table.js → cjs/Table.js} +12 -6
- package/dist/{TableBody.d.ts → cjs/TableBody.d.ts} +1 -2
- package/dist/cjs/TableBody.js +29 -0
- package/dist/{TableCaption.d.ts → cjs/TableCaption.d.ts} +1 -2
- package/dist/cjs/TableCaption.js +29 -0
- package/dist/{TableCell.d.ts → cjs/TableCell.d.ts} +1 -2
- package/dist/cjs/TableCell.js +29 -0
- package/dist/{TableFooter.d.ts → cjs/TableFooter.d.ts} +1 -2
- package/dist/cjs/TableFooter.js +29 -0
- package/dist/{TableHeader.d.ts → cjs/TableHeader.d.ts} +1 -2
- package/dist/cjs/TableHeader.js +29 -0
- package/dist/{TableHeaderCell.d.ts → cjs/TableHeaderCell.d.ts} +1 -2
- package/dist/cjs/TableHeaderCell.js +29 -0
- package/dist/{TableRow.d.ts → cjs/TableRow.d.ts} +1 -2
- package/dist/{TableRow.js → cjs/TableRow.js} +12 -6
- package/dist/{Textarea.d.ts → cjs/Textarea.d.ts} +1 -2
- package/dist/cjs/Textarea.js +25 -0
- package/dist/{Textbox.d.ts → cjs/Textbox.d.ts} +1 -2
- package/dist/cjs/Textbox.js +25 -0
- package/dist/{URLValue.d.ts → cjs/URLValue.d.ts} +0 -0
- package/dist/{URLValue.js → cjs/URLValue.js} +12 -6
- package/dist/{UnorderedList.d.ts → cjs/UnorderedList.d.ts} +1 -2
- package/dist/cjs/UnorderedList.js +29 -0
- package/dist/{UnorderedListItem.d.ts → cjs/UnorderedListItem.d.ts} +0 -0
- package/dist/cjs/UnorderedListItem.js +29 -0
- package/dist/{index.d.ts → cjs/index.d.ts} +3 -1
- package/dist/cjs/index.js +99 -0
- package/dist/cjs/tsconfig.tsbuildinfo +6101 -0
- package/package.json +340 -15
- package/dist/Button.d.ts +0 -6
- package/dist/Button.js +0 -19
- package/dist/Checkbox.js +0 -19
- package/dist/Fieldset.js +0 -19
- package/dist/FieldsetLegend.js +0 -19
- package/dist/FormField.js +0 -19
- package/dist/FormFieldDescription.js +0 -19
- package/dist/FormLabel.js +0 -19
- package/dist/HTMLContent.js +0 -23
- package/dist/OrderedList.js +0 -23
- package/dist/OrderedListItem.js +0 -23
- package/dist/PageContent.js +0 -28
- package/dist/PageFooter.js +0 -23
- package/dist/PageHeader.js +0 -23
- package/dist/Paragraph.js +0 -23
- package/dist/RadioButton.js +0 -19
- package/dist/Select.js +0 -25
- package/dist/TableBody.js +0 -23
- package/dist/TableCaption.js +0 -23
- package/dist/TableCell.js +0 -23
- package/dist/TableFooter.js +0 -23
- package/dist/TableHeader.js +0 -23
- package/dist/TableHeaderCell.js +0 -23
- package/dist/Textarea.js +0 -19
- package/dist/Textbox.js +0 -19
- package/dist/UnorderedList.js +0 -23
- package/dist/UnorderedListItem.js +0 -23
- package/dist/index.js +0 -46
- package/dist/tsconfig.tsbuildinfo +0 -2533
package/README.md
CHANGED
|
@@ -27,8 +27,8 @@ npm install --save-dev --save-exact @utrecht/component-library-react
|
|
|
27
27
|
With this package available, you can render any component from the library in your page. For example:
|
|
28
28
|
|
|
29
29
|
```jsx
|
|
30
|
-
import { Document } from "@utrecht/component-library-react/
|
|
31
|
-
import { Heading1 } from "@utrecht/component-library-react/
|
|
30
|
+
import { Document } from "@utrecht/component-library-react/Document";
|
|
31
|
+
import { Heading1 } from "@utrecht/component-library-react/Heading1";
|
|
32
32
|
|
|
33
33
|
export const MyPage = () => (
|
|
34
34
|
<Document>
|
|
@@ -41,15 +41,15 @@ Additionally you should also include the CSS for the components and the design t
|
|
|
41
41
|
|
|
42
42
|
```js
|
|
43
43
|
// Package with the HTML rendering of components
|
|
44
|
-
import { Document } from "@utrecht/component-library-react/
|
|
45
|
-
import { Heading1 } from "@utrecht/component-library-react/
|
|
44
|
+
import { Document } from "@utrecht/component-library-react/Document";
|
|
45
|
+
import { Heading1 } from "@utrecht/component-library-react/Heading1";
|
|
46
46
|
|
|
47
47
|
// Package with CSS for white-label components
|
|
48
|
-
import "@utrecht/component-library-css
|
|
48
|
+
import "@utrecht/component-library-css";
|
|
49
49
|
|
|
50
50
|
// Package with Utrecht design tokens for the white-label components
|
|
51
51
|
// Substitute with your another theme for other organisations.
|
|
52
|
-
import "@utrecht/design-tokens/dist/
|
|
52
|
+
import "@utrecht/design-tokens/dist/index.css";
|
|
53
53
|
|
|
54
54
|
export const MyPage = () => (
|
|
55
55
|
// Class name to apply the design tokens from the theme
|
|
@@ -66,48 +66,48 @@ We make components for React available when needed in a project. Not every compo
|
|
|
66
66
|
Currently the following components are available:
|
|
67
67
|
|
|
68
68
|
```js
|
|
69
|
-
import { Article } from "@utrecht/component-library-react/
|
|
70
|
-
import { Backdrop } from "@utrecht/component-library-react/
|
|
71
|
-
import { Button } from "@utrecht/component-library-react/
|
|
72
|
-
import { Checkbox } from "@utrecht/component-library-react/
|
|
73
|
-
import { Document } from "@utrecht/component-library-react/
|
|
74
|
-
import { Fieldset } from "@utrecht/component-library-react/
|
|
75
|
-
import { FieldsetLegend } from "@utrecht/component-library-react/
|
|
76
|
-
import { FormField } from "@utrecht/component-library-react/
|
|
77
|
-
import { FormFieldDescription } from "@utrecht/component-library-react/
|
|
78
|
-
import { FormLabel } from "@utrecht/component-library-react/
|
|
79
|
-
import { HTMLContent } from "@utrecht/component-library-react/
|
|
80
|
-
import { Heading1 } from "@utrecht/component-library-react/
|
|
81
|
-
import { Heading2 } from "@utrecht/component-library-react/
|
|
82
|
-
import { Heading3 } from "@utrecht/component-library-react/
|
|
83
|
-
import { Heading4 } from "@utrecht/component-library-react/
|
|
84
|
-
import { Heading5 } from "@utrecht/component-library-react/
|
|
85
|
-
import { Heading6 } from "@utrecht/component-library-react/
|
|
86
|
-
import { Link } from "@utrecht/component-library-react/
|
|
87
|
-
import { OrderedList } from "@utrecht/component-library-react/
|
|
88
|
-
import { OrderedListItem } from "@utrecht/component-library-react/
|
|
89
|
-
import { Page } from "@utrecht/component-library-react/
|
|
90
|
-
import { PageContent } from "@utrecht/component-library-react/
|
|
91
|
-
import { PageFooter } from "@utrecht/component-library-react/
|
|
92
|
-
import { PageHeader } from "@utrecht/component-library-react/
|
|
93
|
-
import { Paragraph } from "@utrecht/component-library-react/
|
|
94
|
-
import { RadioButton } from "@utrecht/component-library-react/
|
|
95
|
-
import { Select, SelectOption } from "@utrecht/component-library-react/
|
|
96
|
-
import { Separator } from "@utrecht/component-library-react/
|
|
97
|
-
import { Surface } from "@utrecht/component-library-react/
|
|
98
|
-
import { Table } from "@utrecht/component-library-react/
|
|
99
|
-
import { TableBody } from "@utrecht/component-library-react/
|
|
100
|
-
import { TableCaption } from "@utrecht/component-library-react/
|
|
101
|
-
import { TableCell } from "@utrecht/component-library-react/
|
|
102
|
-
import { TableFooter } from "@utrecht/component-library-react/
|
|
103
|
-
import { TableHeader } from "@utrecht/component-library-react/
|
|
104
|
-
import { TableHeaderCell } from "@utrecht/component-library-react/
|
|
105
|
-
import { TableRow } from "@utrecht/component-library-react/
|
|
106
|
-
import { Textarea } from "@utrecht/component-library-react/
|
|
107
|
-
import { Textbox } from "@utrecht/component-library-react/
|
|
108
|
-
import { URLValue } from "@utrecht/component-library-react/
|
|
109
|
-
import { UnorderedList } from "@utrecht/component-library-react/
|
|
110
|
-
import { UnorderedListItem } from "@utrecht/component-library-react/
|
|
69
|
+
import { Article } from "@utrecht/component-library-react/Article";
|
|
70
|
+
import { Backdrop } from "@utrecht/component-library-react/Backdrop";
|
|
71
|
+
import { Button } from "@utrecht/component-library-react/Button";
|
|
72
|
+
import { Checkbox } from "@utrecht/component-library-react/Checkbox";
|
|
73
|
+
import { Document } from "@utrecht/component-library-react/Document";
|
|
74
|
+
import { Fieldset } from "@utrecht/component-library-react/Fieldset";
|
|
75
|
+
import { FieldsetLegend } from "@utrecht/component-library-react/FieldsetLegend";
|
|
76
|
+
import { FormField } from "@utrecht/component-library-react/FormField";
|
|
77
|
+
import { FormFieldDescription } from "@utrecht/component-library-react/FormFieldDescription";
|
|
78
|
+
import { FormLabel } from "@utrecht/component-library-react/FormLabel";
|
|
79
|
+
import { HTMLContent } from "@utrecht/component-library-react/HTMLContent";
|
|
80
|
+
import { Heading1 } from "@utrecht/component-library-react/Heading1";
|
|
81
|
+
import { Heading2 } from "@utrecht/component-library-react/Heading2";
|
|
82
|
+
import { Heading3 } from "@utrecht/component-library-react/Heading3";
|
|
83
|
+
import { Heading4 } from "@utrecht/component-library-react/Heading4";
|
|
84
|
+
import { Heading5 } from "@utrecht/component-library-react/Heading5";
|
|
85
|
+
import { Heading6 } from "@utrecht/component-library-react/Heading6";
|
|
86
|
+
import { Link } from "@utrecht/component-library-react/Link";
|
|
87
|
+
import { OrderedList } from "@utrecht/component-library-react/OrderedList";
|
|
88
|
+
import { OrderedListItem } from "@utrecht/component-library-react/OrderedListItem";
|
|
89
|
+
import { Page } from "@utrecht/component-library-react/Page";
|
|
90
|
+
import { PageContent } from "@utrecht/component-library-react/PageContent";
|
|
91
|
+
import { PageFooter } from "@utrecht/component-library-react/PageFooter";
|
|
92
|
+
import { PageHeader } from "@utrecht/component-library-react/PageHeader";
|
|
93
|
+
import { Paragraph } from "@utrecht/component-library-react/Paragraph";
|
|
94
|
+
import { RadioButton } from "@utrecht/component-library-react/RadioButton";
|
|
95
|
+
import { Select, SelectOption } from "@utrecht/component-library-react/Select";
|
|
96
|
+
import { Separator } from "@utrecht/component-library-react/Separator";
|
|
97
|
+
import { Surface } from "@utrecht/component-library-react/Surface";
|
|
98
|
+
import { Table } from "@utrecht/component-library-react/Table";
|
|
99
|
+
import { TableBody } from "@utrecht/component-library-react/TableBody";
|
|
100
|
+
import { TableCaption } from "@utrecht/component-library-react/TableCaption";
|
|
101
|
+
import { TableCell } from "@utrecht/component-library-react/TableCell";
|
|
102
|
+
import { TableFooter } from "@utrecht/component-library-react/TableFooter";
|
|
103
|
+
import { TableHeader } from "@utrecht/component-library-react/TableHeader";
|
|
104
|
+
import { TableHeaderCell } from "@utrecht/component-library-react/TableHeaderCell";
|
|
105
|
+
import { TableRow } from "@utrecht/component-library-react/TableRow";
|
|
106
|
+
import { Textarea } from "@utrecht/component-library-react/Textarea";
|
|
107
|
+
import { Textbox } from "@utrecht/component-library-react/Textbox";
|
|
108
|
+
import { URLValue } from "@utrecht/component-library-react/URLValue";
|
|
109
|
+
import { UnorderedList } from "@utrecht/component-library-react/UnorderedList";
|
|
110
|
+
import { UnorderedListItem } from "@utrecht/component-library-react/UnorderedListItem";
|
|
111
111
|
```
|
|
112
112
|
|
|
113
113
|
Alternatively it is possible to include them via the collection of components too, but be careful: you will likely need to take additional steps prevent your site from also including the code for components you don't actually use. Including unused components would negatively impact the performance of your site.
|
|
@@ -3,6 +3,5 @@
|
|
|
3
3
|
* Copyright (c) 2021 Robbert Broersma
|
|
4
4
|
*/
|
|
5
5
|
import { HTMLAttributes } from 'react';
|
|
6
|
-
declare type ArticleProps = HTMLAttributes<HTMLElement>;
|
|
6
|
+
export declare type ArticleProps = HTMLAttributes<HTMLElement>;
|
|
7
7
|
export declare const Article: import("react").ForwardRefExoticComponent<ArticleProps & import("react").RefAttributes<HTMLElement>>;
|
|
8
|
-
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
3
|
var t = {};
|
|
3
4
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -9,15 +10,20 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
9
10
|
}
|
|
10
11
|
return t;
|
|
11
12
|
};
|
|
12
|
-
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.Article = void 0;
|
|
18
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
13
19
|
/**
|
|
14
20
|
* @license EUPL-1.2
|
|
15
21
|
* Copyright (c) 2021 Robbert Broersma
|
|
16
22
|
*/
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
23
|
+
const clsx_1 = __importDefault(require("clsx"));
|
|
24
|
+
const react_1 = require("react");
|
|
25
|
+
exports.Article = react_1.forwardRef((_a, ref) => {
|
|
20
26
|
var { children, className } = _a, restProps = __rest(_a, ["children", "className"]);
|
|
21
|
-
return (
|
|
27
|
+
return (jsx_runtime_1.jsx("article", Object.assign({}, restProps, { ref: ref, className: clsx_1.default('utrecht-article', className) }, { children: children }), void 0));
|
|
22
28
|
});
|
|
23
|
-
Article.displayName = '
|
|
29
|
+
exports.Article.displayName = 'Article';
|
|
File without changes
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
3
|
var t = {};
|
|
3
4
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -9,15 +10,20 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
9
10
|
}
|
|
10
11
|
return t;
|
|
11
12
|
};
|
|
12
|
-
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.Backdrop = void 0;
|
|
18
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
13
19
|
/**
|
|
14
20
|
* @license EUPL-1.2
|
|
15
21
|
* Copyright (c) 2021 Robbert Broersma
|
|
16
22
|
*/
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
23
|
+
const clsx_1 = __importDefault(require("clsx"));
|
|
24
|
+
const react_1 = require("react");
|
|
25
|
+
exports.Backdrop = react_1.forwardRef((_a, ref) => {
|
|
20
26
|
var { children, className } = _a, restProps = __rest(_a, ["children", "className"]);
|
|
21
|
-
return (
|
|
27
|
+
return (jsx_runtime_1.jsx("div", Object.assign({}, restProps, { ref: ref, className: clsx_1.default('utrecht-backdrop', className) }, { children: children }), void 0));
|
|
22
28
|
});
|
|
23
|
-
Backdrop.displayName = '
|
|
29
|
+
exports.Backdrop.displayName = 'Backdrop';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes } from 'react';
|
|
2
|
+
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3
|
+
appearance?: string;
|
|
4
|
+
busy?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
export declare const PrimaryActionButton: {
|
|
8
|
+
({ ...args }: {
|
|
9
|
+
[x: string]: any;
|
|
10
|
+
}): JSX.Element;
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
13
|
+
export declare const SecondaryActionButton: {
|
|
14
|
+
({ ...args }: {
|
|
15
|
+
[x: string]: any;
|
|
16
|
+
}): JSX.Element;
|
|
17
|
+
displayName: string;
|
|
18
|
+
};
|
|
19
|
+
export declare const SubtleButton: {
|
|
20
|
+
({ ...args }: {
|
|
21
|
+
[x: string]: any;
|
|
22
|
+
}): JSX.Element;
|
|
23
|
+
displayName: string;
|
|
24
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.SubtleButton = exports.SecondaryActionButton = exports.PrimaryActionButton = exports.Button = void 0;
|
|
18
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
|
+
const clsx_1 = __importDefault(require("clsx"));
|
|
20
|
+
const react_1 = require("react");
|
|
21
|
+
exports.Button = react_1.forwardRef((_a, ref) => {
|
|
22
|
+
var { appearance, busy, disabled, children, className, type } = _a, restProps = __rest(_a, ["appearance", "busy", "disabled", "children", "className", "type"]);
|
|
23
|
+
return (jsx_runtime_1.jsx("button", Object.assign({}, restProps, { ref: ref, className: clsx_1.default('utrecht-button', busy && 'utrecht-button--busy', disabled && 'utrecht-button--disabled', type === 'submit' && 'utrecht-button--submit', appearance === 'primary-action-button' && 'utrecht-button--primary-action', appearance === 'secondary-action-button' && 'utrecht-button--secondary-action', appearance === 'subtle-button' && 'utrecht-button--subtle', className), "aria-busy": busy || undefined, disabled: disabled, type: type || 'button' }, { children: children }), void 0));
|
|
24
|
+
});
|
|
25
|
+
exports.Button.displayName = 'Button';
|
|
26
|
+
const PrimaryActionButton = (_a) => {
|
|
27
|
+
var args = __rest(_a, []);
|
|
28
|
+
return jsx_runtime_1.jsx(exports.Button, Object.assign({}, args, { appearance: "primary-action-button" }), void 0);
|
|
29
|
+
};
|
|
30
|
+
exports.PrimaryActionButton = PrimaryActionButton;
|
|
31
|
+
exports.PrimaryActionButton.displayName = 'PrimaryActionButton';
|
|
32
|
+
const SecondaryActionButton = (_a) => {
|
|
33
|
+
var args = __rest(_a, []);
|
|
34
|
+
return jsx_runtime_1.jsx(exports.Button, Object.assign({}, args, { appearance: "secondary-action-button" }), void 0);
|
|
35
|
+
};
|
|
36
|
+
exports.SecondaryActionButton = SecondaryActionButton;
|
|
37
|
+
exports.SecondaryActionButton.displayName = 'SecondaryActionButton';
|
|
38
|
+
const SubtleButton = (_a) => {
|
|
39
|
+
var args = __rest(_a, []);
|
|
40
|
+
return jsx_runtime_1.jsx(exports.Button, Object.assign({}, args, { appearance: "subtle-button" }), void 0);
|
|
41
|
+
};
|
|
42
|
+
exports.SubtleButton = SubtleButton;
|
|
43
|
+
exports.SubtleButton.displayName = 'SubtleButton';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2
|
|
3
|
+
* Copyright (c) 2021 Gemeente Utrecht
|
|
4
|
+
* Copyright (c) 2021 Robbert Broersma
|
|
5
|
+
*/
|
|
6
|
+
import { AnchorHTMLAttributes } from 'react';
|
|
7
|
+
interface ButtonLinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
8
|
+
external?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const ButtonLink: import("react").ForwardRefExoticComponent<ButtonLinkProps & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.ButtonLink = void 0;
|
|
18
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
|
+
/**
|
|
20
|
+
* @license EUPL-1.2
|
|
21
|
+
* Copyright (c) 2021 Gemeente Utrecht
|
|
22
|
+
* Copyright (c) 2021 Robbert Broersma
|
|
23
|
+
*/
|
|
24
|
+
const clsx_1 = __importDefault(require("clsx"));
|
|
25
|
+
const react_1 = require("react");
|
|
26
|
+
const onKeyDown = (evt) => {
|
|
27
|
+
var _a;
|
|
28
|
+
if (evt.key === ' ' && typeof ((_a = evt.target) === null || _a === void 0 ? void 0 : _a.click) === 'function') {
|
|
29
|
+
// Prevent other side-effects, such as scrolling
|
|
30
|
+
evt.preventDefault();
|
|
31
|
+
// Navigate to the link target
|
|
32
|
+
evt.target.click();
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
exports.ButtonLink = react_1.forwardRef((_a, ref) => {
|
|
36
|
+
var { children, className, external, role } = _a, restProps = __rest(_a, ["children", "className", "external", "role"]);
|
|
37
|
+
let props = restProps;
|
|
38
|
+
if (role === 'button') {
|
|
39
|
+
// When this link is announced as button by accessibility tools,
|
|
40
|
+
// it should also behave like a button. Links are not activated
|
|
41
|
+
// using `Space`, so we need to implement that behaviour here
|
|
42
|
+
// to reach parity with the `button` element.
|
|
43
|
+
props = Object.assign(Object.assign({}, restProps), { onKeyDown });
|
|
44
|
+
}
|
|
45
|
+
return (jsx_runtime_1.jsx("a", Object.assign({}, props, { ref: ref, role: role, className: clsx_1.default('utrecht-button-link', 'utrecht-button-link--html-button', { 'utrecht-button-link--external': external }, className), rel: external ? 'external noopener noreferrer' : undefined }, { children: children }), void 0));
|
|
46
|
+
});
|
|
47
|
+
exports.ButtonLink.displayName = 'ButtonLink';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { InputHTMLAttributes } from 'react';
|
|
2
|
-
interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'readOnly'> {
|
|
2
|
+
export interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'readOnly'> {
|
|
3
3
|
invalid?: boolean;
|
|
4
4
|
}
|
|
5
5
|
export declare const Checkbox: import("react").ForwardRefExoticComponent<CheckboxProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
6
|
-
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.Checkbox = void 0;
|
|
18
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
|
+
const clsx_1 = __importDefault(require("clsx"));
|
|
20
|
+
const react_1 = require("react");
|
|
21
|
+
exports.Checkbox = react_1.forwardRef((_a, ref) => {
|
|
22
|
+
var { disabled, invalid, required, className } = _a, restProps = __rest(_a, ["disabled", "invalid", "required", "className"]);
|
|
23
|
+
return (jsx_runtime_1.jsx("input", Object.assign({}, restProps, { ref: ref, type: "checkbox", className: clsx_1.default('utrecht-checkbox', 'utrecht-checkbox--html-input', disabled && 'utrecht-checkbox--disabled', invalid && 'utrecht-checkbox--invalid', required && 'utrecht-checkbox--required', className), "aria-invalid": invalid || undefined, disabled: disabled, required: required }), void 0));
|
|
24
|
+
});
|
|
25
|
+
exports.Checkbox.displayName = 'Checkbox';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license EUPL-1.2
|
|
3
|
+
* Copyright (c) 2021 Robbert Broersma
|
|
4
|
+
*/
|
|
5
|
+
import { InputHTMLAttributes } from 'react';
|
|
6
|
+
export declare type CustomRadioButtonProps = InputHTMLAttributes<HTMLInputElement> & {
|
|
7
|
+
invalid?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare const CustomRadioButton: import("react").ForwardRefExoticComponent<InputHTMLAttributes<HTMLInputElement> & {
|
|
10
|
+
invalid?: boolean | undefined;
|
|
11
|
+
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.CustomRadioButton = void 0;
|
|
18
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
|
+
/**
|
|
20
|
+
* @license EUPL-1.2
|
|
21
|
+
* Copyright (c) 2021 Robbert Broersma
|
|
22
|
+
*/
|
|
23
|
+
const clsx_1 = __importDefault(require("clsx"));
|
|
24
|
+
const react_1 = require("react");
|
|
25
|
+
exports.CustomRadioButton = react_1.forwardRef((_a, ref) => {
|
|
26
|
+
var { disabled, required, className, invalid } = _a, restProps = __rest(_a, ["disabled", "required", "className", "invalid"]);
|
|
27
|
+
return (jsx_runtime_1.jsx("input", Object.assign({ type: "radio", "aria-invalid": invalid || undefined, disabled: disabled, required: required, ref: ref, className: clsx_1.default('utrecht-custom-radio-button', disabled && 'utrecht-custom-radio-button--disabled', invalid && 'utrecht-custom-radio-button--invalid', className) }, restProps), void 0));
|
|
28
|
+
});
|
|
29
|
+
exports.CustomRadioButton.displayName = 'CustomRadioButton';
|
|
File without changes
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
3
|
var t = {};
|
|
3
4
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -9,15 +10,20 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
9
10
|
}
|
|
10
11
|
return t;
|
|
11
12
|
};
|
|
12
|
-
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.Document = void 0;
|
|
18
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
13
19
|
/**
|
|
14
20
|
* @license EUPL-1.2
|
|
15
21
|
* Copyright (c) 2021 Robbert Broersma
|
|
16
22
|
*/
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
23
|
+
const clsx_1 = __importDefault(require("clsx"));
|
|
24
|
+
const react_1 = require("react");
|
|
25
|
+
exports.Document = react_1.forwardRef((_a, ref) => {
|
|
20
26
|
var { children, className } = _a, restProps = __rest(_a, ["children", "className"]);
|
|
21
|
-
return (
|
|
27
|
+
return (jsx_runtime_1.jsx("div", Object.assign({}, restProps, { ref: ref, className: clsx_1.default('utrecht-document', className) }, { children: children }), void 0));
|
|
22
28
|
});
|
|
23
|
-
Document.displayName = '
|
|
29
|
+
exports.Document.displayName = 'Document';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { FieldsetHTMLAttributes } from 'react';
|
|
2
|
-
declare type FieldsetProps = FieldsetHTMLAttributes<HTMLFieldSetElement>;
|
|
2
|
+
export declare type FieldsetProps = FieldsetHTMLAttributes<HTMLFieldSetElement>;
|
|
3
3
|
export declare const Fieldset: import("react").ForwardRefExoticComponent<FieldsetProps & import("react").RefAttributes<HTMLFieldSetElement>>;
|
|
4
|
-
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.Fieldset = void 0;
|
|
18
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
|
+
const clsx_1 = __importDefault(require("clsx"));
|
|
20
|
+
const react_1 = require("react");
|
|
21
|
+
exports.Fieldset = react_1.forwardRef((_a, ref) => {
|
|
22
|
+
var { className, children } = _a, restProps = __rest(_a, ["className", "children"]);
|
|
23
|
+
return (jsx_runtime_1.jsx("fieldset", Object.assign({}, restProps, { ref: ref, className: clsx_1.default('utrecht-form-fieldset', 'utrecht-form-fieldset--reset-fieldset', className) }, { children: children }), void 0));
|
|
24
|
+
});
|
|
25
|
+
exports.Fieldset.displayName = 'Fieldset';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
|
-
declare type FieldsetLegendProps = HTMLAttributes<HTMLLegendElement>;
|
|
2
|
+
export declare type FieldsetLegendProps = HTMLAttributes<HTMLLegendElement>;
|
|
3
3
|
export declare const FieldsetLegend: import("react").ForwardRefExoticComponent<FieldsetLegendProps & import("react").RefAttributes<HTMLLegendElement>>;
|
|
4
|
-
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.FieldsetLegend = void 0;
|
|
18
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
|
+
const clsx_1 = __importDefault(require("clsx"));
|
|
20
|
+
const react_1 = require("react");
|
|
21
|
+
exports.FieldsetLegend = react_1.forwardRef((_a, ref) => {
|
|
22
|
+
var { className, children } = _a, restProps = __rest(_a, ["className", "children"]);
|
|
23
|
+
return (jsx_runtime_1.jsx("legend", Object.assign({}, restProps, { ref: ref, className: clsx_1.default('utrecht-form-fieldset__legend', 'utrecht-form-fieldset__legend--reset-legend', className) }, { children: children }), void 0));
|
|
24
|
+
});
|
|
25
|
+
exports.FieldsetLegend.displayName = 'FieldsetLegend';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
|
-
declare type FormFieldProps = HTMLAttributes<HTMLDivElement>;
|
|
2
|
+
export declare type FormFieldProps = HTMLAttributes<HTMLDivElement>;
|
|
3
3
|
export declare const FormField: import("react").ForwardRefExoticComponent<FormFieldProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
4
|
-
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.FormField = void 0;
|
|
18
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
|
+
const clsx_1 = __importDefault(require("clsx"));
|
|
20
|
+
const react_1 = require("react");
|
|
21
|
+
exports.FormField = react_1.forwardRef((_a, ref) => {
|
|
22
|
+
var { className, children } = _a, restProps = __rest(_a, ["className", "children"]);
|
|
23
|
+
return (jsx_runtime_1.jsx("div", Object.assign({}, restProps, { ref: ref, className: clsx_1.default('utrecht-form-field', 'utrecht-form-field--distanced', className) }, { children: children }), void 0));
|
|
24
|
+
});
|
|
25
|
+
exports.FormField.displayName = 'FormField';
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
|
-
interface FormFieldDescriptionProps extends HTMLAttributes<HTMLDivElement> {
|
|
2
|
+
export interface FormFieldDescriptionProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
3
|
invalid?: boolean;
|
|
4
4
|
valid?: boolean;
|
|
5
5
|
warning?: boolean;
|
|
6
6
|
}
|
|
7
7
|
export declare const FormFieldDescription: import("react").ForwardRefExoticComponent<FormFieldDescriptionProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
8
|
-
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.FormFieldDescription = void 0;
|
|
18
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
|
+
const clsx_1 = __importDefault(require("clsx"));
|
|
20
|
+
const react_1 = require("react");
|
|
21
|
+
exports.FormFieldDescription = react_1.forwardRef((_a, ref) => {
|
|
22
|
+
var { invalid, valid, warning, className, children } = _a, restProps = __rest(_a, ["invalid", "valid", "warning", "className", "children"]);
|
|
23
|
+
return (jsx_runtime_1.jsx("div", Object.assign({}, restProps, { ref: ref, className: clsx_1.default('utrecht-form-field-description', invalid && 'utrecht-form-field-description--invalid', valid && 'utrecht-form-field-description--valid', warning && 'utrecht-form-field-description--warning', className) }, { children: children }), void 0));
|
|
24
|
+
});
|
|
25
|
+
exports.FormFieldDescription.displayName = 'FormFieldDescription';
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { LabelHTMLAttributes } from 'react';
|
|
2
|
-
interface FormLabelProps extends LabelHTMLAttributes<HTMLLabelElement> {
|
|
2
|
+
export interface FormLabelProps extends LabelHTMLAttributes<HTMLLabelElement> {
|
|
3
3
|
htmlFor: string;
|
|
4
4
|
type?: 'checkbox' | 'radio';
|
|
5
5
|
disabled?: boolean;
|
|
6
6
|
checked?: boolean;
|
|
7
7
|
}
|
|
8
8
|
export declare const FormLabel: import("react").ForwardRefExoticComponent<FormLabelProps & import("react").RefAttributes<HTMLLabelElement>>;
|
|
9
|
-
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.FormLabel = void 0;
|
|
18
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
|
+
const clsx_1 = __importDefault(require("clsx"));
|
|
20
|
+
const react_1 = require("react");
|
|
21
|
+
exports.FormLabel = react_1.forwardRef((_a, ref) => {
|
|
22
|
+
var { children, className, type, disabled, checked } = _a, restProps = __rest(_a, ["children", "className", "type", "disabled", "checked"]);
|
|
23
|
+
return (jsx_runtime_1.jsx("label", Object.assign({}, restProps, { ref: ref, className: clsx_1.default('utrecht-form-label', type && `utrecht-form-label--${type}`, disabled && 'utrecht-form-label--disabled', checked && 'utrecht-form-label--checked', className) }, { children: children }), void 0));
|
|
24
|
+
});
|
|
25
|
+
exports.FormLabel.displayName = 'FormLabel';
|
|
File without changes
|