@utrecht/component-library-react 1.0.0-alpha.10 → 1.0.0-alpha.102

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 (53) hide show
  1. package/README.md +27 -3
  2. package/dist/cjs/Article.js +1 -1
  3. package/dist/cjs/Backdrop.js +1 -1
  4. package/dist/cjs/Button.d.ts +19 -0
  5. package/dist/cjs/Button.js +22 -4
  6. package/dist/cjs/ButtonLink.d.ts +11 -0
  7. package/dist/cjs/ButtonLink.js +47 -0
  8. package/dist/cjs/Checkbox.js +1 -1
  9. package/dist/cjs/CustomRadioButton.d.ts +11 -0
  10. package/dist/cjs/CustomRadioButton.js +29 -0
  11. package/dist/cjs/Document.js +1 -1
  12. package/dist/cjs/Fieldset.js +1 -1
  13. package/dist/cjs/FieldsetLegend.js +1 -1
  14. package/dist/cjs/FormField.js +1 -1
  15. package/dist/cjs/FormFieldDescription.js +1 -1
  16. package/dist/cjs/FormLabel.js +1 -1
  17. package/dist/cjs/HTMLContent.js +1 -1
  18. package/dist/cjs/Heading1.js +1 -1
  19. package/dist/cjs/Heading2.js +1 -1
  20. package/dist/cjs/Heading3.js +1 -1
  21. package/dist/cjs/Heading4.js +1 -1
  22. package/dist/cjs/Heading5.js +1 -1
  23. package/dist/cjs/Heading6.js +1 -1
  24. package/dist/cjs/Link.d.ts +0 -5
  25. package/dist/cjs/Link.js +3 -10
  26. package/dist/cjs/OrderedList.js +1 -1
  27. package/dist/cjs/OrderedListItem.js +1 -1
  28. package/dist/cjs/Page.js +1 -1
  29. package/dist/cjs/PageContent.js +2 -2
  30. package/dist/cjs/PageFooter.js +1 -1
  31. package/dist/cjs/PageHeader.js +1 -1
  32. package/dist/cjs/Paragraph.js +1 -1
  33. package/dist/cjs/RadioButton.js +2 -2
  34. package/dist/cjs/Select.js +2 -2
  35. package/dist/cjs/Separator.js +1 -1
  36. package/dist/cjs/Surface.js +1 -1
  37. package/dist/cjs/Table.js +1 -1
  38. package/dist/cjs/TableBody.js +1 -1
  39. package/dist/cjs/TableCaption.js +1 -1
  40. package/dist/cjs/TableCell.js +1 -1
  41. package/dist/cjs/TableFooter.js +1 -1
  42. package/dist/cjs/TableHeader.js +1 -1
  43. package/dist/cjs/TableHeaderCell.js +1 -1
  44. package/dist/cjs/TableRow.js +1 -1
  45. package/dist/cjs/Textarea.js +1 -1
  46. package/dist/cjs/Textbox.js +2 -2
  47. package/dist/cjs/URLValue.js +1 -1
  48. package/dist/cjs/UnorderedList.js +1 -1
  49. package/dist/cjs/UnorderedListItem.js +1 -1
  50. package/dist/cjs/index.d.ts +3 -1
  51. package/dist/cjs/index.js +8 -1
  52. package/dist/cjs/tsconfig.tsbuildinfo +4132 -564
  53. package/package.json +203 -51
package/README.md CHANGED
@@ -45,11 +45,11 @@ import { Document } from "@utrecht/component-library-react/Document";
45
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/dist/bem.css";
48
+ import "@utrecht/component-library-css";
49
49
 
50
50
  // Package with Utrecht design tokens for the white-label components
51
- // Substitute with your another theme for other organisations.
52
- import "@utrecht/design-tokens/dist/theme/index.css";
51
+ // Substitute with your another theme for other organizations.
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
@@ -59,6 +59,30 @@ export const MyPage = () => (
59
59
  );
60
60
  ```
61
61
 
62
+ Only when you use the `<HTMLContent/>` component, you should import the `html.css` from the `component-library-css`
63
+
64
+ ```jsx
65
+ import { HTMLContent } from "@utrecht/component-library-react";
66
+
67
+ import "@utrecht/component-library-css/dist/html.css";
68
+ import "@utrecht/design-tokens/dist/index.css";
69
+
70
+ export const MyPage = () => (
71
+ // Class name to apply the design tokens from the theme
72
+ <HTMLContent
73
+ className="utrecht-theme"
74
+ dangerouslySetInnerHTML={{
75
+ _html: `<h1>Heading 1</h1>
76
+ <h2>Heading 2</h2>
77
+ <h3>Heading 3</h3>
78
+ <h4>Heading 4</h4>
79
+ <h5>Heading 5</h5>
80
+ <h6>Heading 6</h6>`,
81
+ }}
82
+ />
83
+ );
84
+ ```
85
+
62
86
  ## Components overview
63
87
 
64
88
  We make components for React available when needed in a project. Not every component is available yet, and we welcome you to discuss contributions.
@@ -26,4 +26,4 @@ exports.Article = react_1.forwardRef((_a, ref) => {
26
26
  var { children, className } = _a, restProps = __rest(_a, ["children", "className"]);
27
27
  return (jsx_runtime_1.jsx("article", Object.assign({}, restProps, { ref: ref, className: clsx_1.default('utrecht-article', className) }, { children: children }), void 0));
28
28
  });
29
- exports.Article.displayName = 'utrecht-article';
29
+ exports.Article.displayName = 'Article';
@@ -26,4 +26,4 @@ exports.Backdrop = react_1.forwardRef((_a, ref) => {
26
26
  var { children, className } = _a, restProps = __rest(_a, ["children", "className"]);
27
27
  return (jsx_runtime_1.jsx("div", Object.assign({}, restProps, { ref: ref, className: clsx_1.default('utrecht-backdrop', className) }, { children: children }), void 0));
28
28
  });
29
- exports.Backdrop.displayName = 'utrecht-backdrop';
29
+ exports.Backdrop.displayName = 'Backdrop';
@@ -1,5 +1,24 @@
1
1
  import { ButtonHTMLAttributes } from 'react';
2
2
  export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
3
+ appearance?: string;
3
4
  busy?: boolean;
4
5
  }
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
+ };
@@ -14,12 +14,30 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
14
14
  return (mod && mod.__esModule) ? mod : { "default": mod };
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.Button = void 0;
17
+ exports.SubtleButton = exports.SecondaryActionButton = exports.PrimaryActionButton = exports.Button = void 0;
18
18
  const jsx_runtime_1 = require("react/jsx-runtime");
19
19
  const clsx_1 = __importDefault(require("clsx"));
20
20
  const react_1 = require("react");
21
21
  exports.Button = react_1.forwardRef((_a, ref) => {
22
- var { busy, disabled, children, className, type } = _a, restProps = __rest(_a, ["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', className), "aria-busy": busy || undefined, disabled: disabled, type: type || 'button' }, { children: children }), void 0));
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
24
  });
25
- exports.Button.displayName = 'utrecht-button';
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';
@@ -22,4 +22,4 @@ exports.Checkbox = react_1.forwardRef((_a, ref) => {
22
22
  var { disabled, invalid, required, className } = _a, restProps = __rest(_a, ["disabled", "invalid", "required", "className"]);
23
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
24
  });
25
- exports.Checkbox.displayName = 'utrecht-checkbox';
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';
@@ -26,4 +26,4 @@ exports.Document = react_1.forwardRef((_a, ref) => {
26
26
  var { children, className } = _a, restProps = __rest(_a, ["children", "className"]);
27
27
  return (jsx_runtime_1.jsx("div", Object.assign({}, restProps, { ref: ref, className: clsx_1.default('utrecht-document', className) }, { children: children }), void 0));
28
28
  });
29
- exports.Document.displayName = 'utrecht-document';
29
+ exports.Document.displayName = 'Document';
@@ -22,4 +22,4 @@ exports.Fieldset = react_1.forwardRef((_a, ref) => {
22
22
  var { className, children } = _a, restProps = __rest(_a, ["className", "children"]);
23
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
24
  });
25
- exports.Fieldset.displayName = 'utrecht-form-fieldset';
25
+ exports.Fieldset.displayName = 'Fieldset';
@@ -22,4 +22,4 @@ exports.FieldsetLegend = react_1.forwardRef((_a, ref) => {
22
22
  var { className, children } = _a, restProps = __rest(_a, ["className", "children"]);
23
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
24
  });
25
- exports.FieldsetLegend.displayName = 'utrecht-form-fieldset-legend';
25
+ exports.FieldsetLegend.displayName = 'FieldsetLegend';
@@ -22,4 +22,4 @@ exports.FormField = react_1.forwardRef((_a, ref) => {
22
22
  var { className, children } = _a, restProps = __rest(_a, ["className", "children"]);
23
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
24
  });
25
- exports.FormField.displayName = 'utrecht-form-field';
25
+ exports.FormField.displayName = 'FormField';
@@ -22,4 +22,4 @@ exports.FormFieldDescription = react_1.forwardRef((_a, ref) => {
22
22
  var { invalid, valid, warning, className, children } = _a, restProps = __rest(_a, ["invalid", "valid", "warning", "className", "children"]);
23
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
24
  });
25
- exports.FormFieldDescription.displayName = 'utrecht-form-field-description';
25
+ exports.FormFieldDescription.displayName = 'FormFieldDescription';
@@ -22,4 +22,4 @@ exports.FormLabel = react_1.forwardRef((_a, ref) => {
22
22
  var { children, className, type, disabled, checked } = _a, restProps = __rest(_a, ["children", "className", "type", "disabled", "checked"]);
23
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
24
  });
25
- exports.FormLabel.displayName = 'utrecht-form-label';
25
+ exports.FormLabel.displayName = 'FormLabel';
@@ -26,4 +26,4 @@ exports.HTMLContent = react_1.forwardRef((_a, ref) => {
26
26
  var { children, className } = _a, restProps = __rest(_a, ["children", "className"]);
27
27
  return (jsx_runtime_1.jsx("div", Object.assign({}, restProps, { ref: ref, className: clsx_1.default('utrecht-html', className) }, { children: children }), void 0));
28
28
  });
29
- exports.HTMLContent.displayName = 'utrecht-html';
29
+ exports.HTMLContent.displayName = 'HTMLContent';
@@ -26,4 +26,4 @@ exports.Heading1 = react_1.forwardRef((_a, ref) => {
26
26
  var { children, className } = _a, restProps = __rest(_a, ["children", "className"]);
27
27
  return (jsx_runtime_1.jsx("h1", Object.assign({}, restProps, { ref: ref, className: clsx_1.default('utrecht-heading-1', className) }, { children: children }), void 0));
28
28
  });
29
- exports.Heading1.displayName = 'utrecht-heading-1';
29
+ exports.Heading1.displayName = 'Heading1';
@@ -26,4 +26,4 @@ exports.Heading2 = react_1.forwardRef((_a, ref) => {
26
26
  var { children, className } = _a, restProps = __rest(_a, ["children", "className"]);
27
27
  return (jsx_runtime_1.jsx("h2", Object.assign({}, restProps, { ref: ref, className: clsx_1.default('utrecht-heading-2', className) }, { children: children }), void 0));
28
28
  });
29
- exports.Heading2.displayName = 'utrecht-heading-2';
29
+ exports.Heading2.displayName = 'Heading2';
@@ -26,4 +26,4 @@ exports.Heading3 = react_1.forwardRef((_a, ref) => {
26
26
  var { children, className } = _a, restProps = __rest(_a, ["children", "className"]);
27
27
  return (jsx_runtime_1.jsx("h3", Object.assign({}, restProps, { ref: ref, className: clsx_1.default('utrecht-heading-3', className) }, { children: children }), void 0));
28
28
  });
29
- exports.Heading3.displayName = 'utrecht-heading-3';
29
+ exports.Heading3.displayName = 'Heading3';
@@ -26,4 +26,4 @@ exports.Heading4 = react_1.forwardRef((_a, ref) => {
26
26
  var { children, className } = _a, restProps = __rest(_a, ["children", "className"]);
27
27
  return (jsx_runtime_1.jsx("h4", Object.assign({}, restProps, { ref: ref, className: clsx_1.default('utrecht-heading-4', className) }, { children: children }), void 0));
28
28
  });
29
- exports.Heading4.displayName = 'utrecht-heading-4';
29
+ exports.Heading4.displayName = 'Heading4';
@@ -26,4 +26,4 @@ exports.Heading5 = react_1.forwardRef((_a, ref) => {
26
26
  var { children, className } = _a, restProps = __rest(_a, ["children", "className"]);
27
27
  return (jsx_runtime_1.jsx("h5", Object.assign({}, restProps, { ref: ref, className: clsx_1.default('utrecht-heading-5', className) }, { children: children }), void 0));
28
28
  });
29
- exports.Heading5.displayName = 'utrecht-heading-5';
29
+ exports.Heading5.displayName = 'Heading5';
@@ -26,4 +26,4 @@ exports.Heading6 = react_1.forwardRef((_a, ref) => {
26
26
  var { children, className } = _a, restProps = __rest(_a, ["children", "className"]);
27
27
  return (jsx_runtime_1.jsx("h6", Object.assign({}, restProps, { ref: ref, className: clsx_1.default('utrecht-heading-6', className) }, { children: children }), void 0));
28
28
  });
29
- exports.Heading6.displayName = 'utrecht-heading-6';
29
+ exports.Heading6.displayName = 'Heading6';
@@ -5,11 +5,6 @@
5
5
  */
6
6
  import { AnchorHTMLAttributes } from 'react';
7
7
  export interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
8
- activeStyle?: boolean;
9
8
  external?: boolean;
10
- focusStyle?: boolean;
11
- focusVisibleStyle?: boolean;
12
- hoverStyle?: boolean;
13
- visitedStyle?: boolean;
14
9
  }
15
10
  export declare const Link: import("react").ForwardRefExoticComponent<LinkProps & import("react").RefAttributes<HTMLAnchorElement>>;
package/dist/cjs/Link.js CHANGED
@@ -24,19 +24,12 @@ const jsx_runtime_1 = require("react/jsx-runtime");
24
24
  const clsx_1 = __importDefault(require("clsx"));
25
25
  const react_1 = require("react");
26
26
  exports.Link = react_1.forwardRef((_a, ref) => {
27
- var { children, className, activeStyle, external, focusStyle, focusVisibleStyle, hoverStyle, visitedStyle } = _a, restProps = __rest(_a, ["children", "className", "activeStyle", "external", "focusStyle", "focusVisibleStyle", "hoverStyle", "visitedStyle"]);
27
+ var { children, className, external } = _a, restProps = __rest(_a, ["children", "className", "external"]);
28
28
  return (
29
29
  // "utrecht-link--telephone" does not have a corresponding API,
30
30
  // since it is primarily a basis for implementing input[href^="tel"].
31
31
  // Telephone number rendering in React is best achieved using composition
32
32
  // of the TelephoneValue component.
33
- jsx_runtime_1.jsx("a", Object.assign({}, restProps, { ref: ref, className: clsx_1.default('utrecht-link', {
34
- 'utrecht-link--active': activeStyle,
35
- 'utrecht-link--external': external,
36
- 'utrecht-link--focus': focusStyle,
37
- 'utrecht-link--focus-visible': focusVisibleStyle,
38
- 'utrecht-link--hover': hoverStyle,
39
- 'utrecht-link--visited': visitedStyle,
40
- }, className), rel: external ? 'external noopener noreferrer' : undefined }, { children: children }), void 0));
33
+ jsx_runtime_1.jsx("a", Object.assign({}, restProps, { ref: ref, className: clsx_1.default('utrecht-link', { 'utrecht-link--external': external }, className), rel: external ? 'external noopener noreferrer' : undefined }, { children: children }), void 0));
41
34
  });
42
- exports.Link.displayName = 'utrecht-link';
35
+ exports.Link.displayName = 'Link';
@@ -26,4 +26,4 @@ exports.OrderedList = react_1.forwardRef((_a, ref) => {
26
26
  var { children, className } = _a, restProps = __rest(_a, ["children", "className"]);
27
27
  return (jsx_runtime_1.jsx("ol", Object.assign({}, restProps, { ref: ref, className: clsx_1.default('utrecht-ordered-list', className) }, { children: children }), void 0));
28
28
  });
29
- exports.OrderedList.displayName = 'utrecht-ordered-list';
29
+ exports.OrderedList.displayName = 'OrderedList';
@@ -26,4 +26,4 @@ exports.OrderedListItem = react_1.forwardRef((_a, ref) => {
26
26
  var { children, className } = _a, restProps = __rest(_a, ["children", "className"]);
27
27
  return (jsx_runtime_1.jsx("li", Object.assign({}, restProps, { ref: ref, className: clsx_1.default('utrecht-ordered-list__item', className) }, { children: children }), void 0));
28
28
  });
29
- exports.OrderedListItem.displayName = 'utrecht-ordered-list-item';
29
+ exports.OrderedListItem.displayName = 'OrderedListItem';
package/dist/cjs/Page.js CHANGED
@@ -26,4 +26,4 @@ exports.Page = react_1.forwardRef((_a, ref) => {
26
26
  var { children, className } = _a, restProps = __rest(_a, ["children", "className"]);
27
27
  return (jsx_runtime_1.jsx("div", Object.assign({}, restProps, { ref: ref, className: clsx_1.default('utrecht-page', className) }, { children: children }), void 0));
28
28
  });
29
- exports.Page.displayName = 'utrecht-page';
29
+ exports.Page.displayName = 'Page';
@@ -26,9 +26,9 @@ exports.PageContent = react_1.forwardRef((_a, ref) => {
26
26
  var { children, className } = _a, restProps = __rest(_a, ["children", "className"]);
27
27
  return (jsx_runtime_1.jsx("div", Object.assign({}, restProps, { ref: ref, className: clsx_1.default('utrecht-page-content', className) }, { children: children }), void 0));
28
28
  });
29
- exports.PageContent.displayName = 'utrecht-page-content';
29
+ exports.PageContent.displayName = 'PageContent';
30
30
  exports.PageContentMain = react_1.forwardRef((_a, ref) => {
31
31
  var { children, className } = _a, restProps = __rest(_a, ["children", "className"]);
32
32
  return (jsx_runtime_1.jsx("main", Object.assign({}, restProps, { ref: ref, className: clsx_1.default('utrecht-page-content__main', className) }, { children: children }), void 0));
33
33
  });
34
- exports.PageContentMain.displayName = 'utrecht-page-content-main';
34
+ exports.PageContentMain.displayName = 'PageContentMain';
@@ -26,4 +26,4 @@ exports.PageFooter = react_1.forwardRef((_a, ref) => {
26
26
  var { children, className } = _a, restProps = __rest(_a, ["children", "className"]);
27
27
  return (jsx_runtime_1.jsx("footer", Object.assign({}, restProps, { ref: ref, className: clsx_1.default('utrecht-page-footer', className) }, { children: children }), void 0));
28
28
  });
29
- exports.PageFooter.displayName = 'utrecht-page-footer';
29
+ exports.PageFooter.displayName = 'PageFooter';
@@ -26,4 +26,4 @@ exports.PageHeader = react_1.forwardRef((_a, ref) => {
26
26
  var { children, className } = _a, restProps = __rest(_a, ["children", "className"]);
27
27
  return (jsx_runtime_1.jsx("header", Object.assign({}, restProps, { ref: ref, className: clsx_1.default('utrecht-page-header', className) }, { children: children }), void 0));
28
28
  });
29
- exports.PageHeader.displayName = 'utrecht-page-header';
29
+ exports.PageHeader.displayName = 'PageHeader';
@@ -26,4 +26,4 @@ exports.Paragraph = react_1.forwardRef((_a, ref) => {
26
26
  var { children, className, lead } = _a, restProps = __rest(_a, ["children", "className", "lead"]);
27
27
  return (jsx_runtime_1.jsx("p", Object.assign({}, restProps, { ref: ref, className: clsx_1.default('utrecht-paragraph', lead && 'utrecht-paragraph--lead', className) }, { children: children }), void 0));
28
28
  });
29
- exports.Paragraph.displayName = 'utrecht-paragraph';
29
+ exports.Paragraph.displayName = 'Paragraph';
@@ -20,6 +20,6 @@ const clsx_1 = __importDefault(require("clsx"));
20
20
  const react_1 = require("react");
21
21
  exports.RadioButton = react_1.forwardRef((_a, ref) => {
22
22
  var { checked, disabled, invalid, required, className } = _a, restProps = __rest(_a, ["checked", "disabled", "invalid", "required", "className"]);
23
- return (jsx_runtime_1.jsx("input", Object.assign({}, restProps, { ref: ref, type: "radio", checked: checked, className: clsx_1.default('utrecht-radio-button', 'utrecht-radio-button--html-input', checked && 'utrecht-radio-button--checked', disabled && 'utrecht-radio-button--disabled', invalid && 'utrecht-radio-button--invalid', required && 'utrecht-radio-button--required', className), disabled: disabled, required: required }), void 0));
23
+ return (jsx_runtime_1.jsx("input", Object.assign({}, restProps, { ref: ref, type: "radio", className: clsx_1.default('utrecht-radio-button', 'utrecht-radio-button--html-input', checked && 'utrecht-radio-button--checked', disabled && 'utrecht-radio-button--disabled', invalid && 'utrecht-radio-button--invalid', required && 'utrecht-radio-button--required', className), disabled: disabled, required: required }), void 0));
24
24
  });
25
- exports.RadioButton.displayName = 'utrecht-radio-button';
25
+ exports.RadioButton.displayName = 'RadioButton';
@@ -23,9 +23,9 @@ exports.Select = react_1.forwardRef((_a, ref) => {
23
23
  const noscript = true;
24
24
  return (jsx_runtime_1.jsx("select", Object.assign({}, restProps, { ref: ref, "aria-invalid": invalid || undefined, disabled: disabled, required: noscript ? required : false, "aria-required": noscript ? undefined : required, className: clsx_1.default('utrecht-select', disabled && 'utrecht-select--disabled', invalid && 'utrecht-select--invalid', required && 'utrecht-select--required', className) }, { children: children }), void 0));
25
25
  });
26
- exports.Select.displayName = 'utrecht-radio-button';
26
+ exports.Select.displayName = 'Select';
27
27
  exports.SelectOption = react_1.forwardRef((_a, ref) => {
28
28
  var { disabled, invalid, value, children, className } = _a, restProps = __rest(_a, ["disabled", "invalid", "value", "children", "className"]);
29
29
  return (jsx_runtime_1.jsx("option", Object.assign({}, restProps, { ref: ref, disabled: disabled, value: value, className: clsx_1.default('utrecht-select__option', disabled && 'utrecht-select__option--disabled', invalid && 'utrecht-select__option--invalid', className) }, { children: children }), void 0));
30
30
  });
31
- exports.SelectOption.displayName = 'utrecht-select-option';
31
+ exports.SelectOption.displayName = 'SelectOption';
@@ -27,4 +27,4 @@ exports.Separator = react_1.forwardRef((_a, ref) => {
27
27
  var { className, children: _children } = _a, restProps = __rest(_a, ["className", "children"]);
28
28
  return (jsx_runtime_1.jsx("hr", Object.assign({}, restProps, { ref: ref, className: clsx_1.default('utrecht-separator', className) }), void 0));
29
29
  });
30
- exports.Separator.displayName = 'utrecht-separator';
30
+ exports.Separator.displayName = 'Separator';
@@ -26,4 +26,4 @@ exports.Surface = react_1.forwardRef((_a, ref) => {
26
26
  var { children, className } = _a, restProps = __rest(_a, ["children", "className"]);
27
27
  return (jsx_runtime_1.jsx("div", Object.assign({}, restProps, { ref: ref, className: clsx_1.default('utrecht-surface', className) }, { children: children }), void 0));
28
28
  });
29
- exports.Surface.displayName = 'utrecht-surface';
29
+ exports.Surface.displayName = 'Surface';
package/dist/cjs/Table.js CHANGED
@@ -26,4 +26,4 @@ exports.Table = react_1.forwardRef((_a, ref) => {
26
26
  var { children, className } = _a, restProps = __rest(_a, ["children", "className"]);
27
27
  return (jsx_runtime_1.jsx("table", Object.assign({}, restProps, { ref: ref, className: clsx_1.default('utrecht-table', className) }, { children: children }), void 0));
28
28
  });
29
- exports.Table.displayName = 'utrecht-table';
29
+ exports.Table.displayName = 'Table';
@@ -26,4 +26,4 @@ exports.TableBody = react_1.forwardRef((_a, ref) => {
26
26
  var { children, className } = _a, restProps = __rest(_a, ["children", "className"]);
27
27
  return (jsx_runtime_1.jsx("tbody", Object.assign({}, restProps, { ref: ref, className: clsx_1.default('utrecht-table__body', className) }, { children: children }), void 0));
28
28
  });
29
- exports.TableBody.displayName = 'utrecht-table-body';
29
+ exports.TableBody.displayName = 'TableBody';
@@ -26,4 +26,4 @@ exports.TableCaption = react_1.forwardRef((_a, ref) => {
26
26
  var { children, className } = _a, restProps = __rest(_a, ["children", "className"]);
27
27
  return (jsx_runtime_1.jsx("caption", Object.assign({}, restProps, { ref: ref, className: clsx_1.default('utrecht-table__caption', className) }, { children: children }), void 0));
28
28
  });
29
- exports.TableCaption.displayName = 'utrecht-table-caption';
29
+ exports.TableCaption.displayName = 'TableCaption';
@@ -26,4 +26,4 @@ exports.TableCell = react_1.forwardRef((_a, ref) => {
26
26
  var { children, className } = _a, restProps = __rest(_a, ["children", "className"]);
27
27
  return (jsx_runtime_1.jsx("td", Object.assign({}, restProps, { ref: ref, className: clsx_1.default('utrecht-table__cell', className) }, { children: children }), void 0));
28
28
  });
29
- exports.TableCell.displayName = 'utrecht-table-cell';
29
+ exports.TableCell.displayName = 'TableCell';
@@ -26,4 +26,4 @@ exports.TableFooter = react_1.forwardRef((_a, ref) => {
26
26
  var { children, className } = _a, restProps = __rest(_a, ["children", "className"]);
27
27
  return (jsx_runtime_1.jsx("tfoot", Object.assign({}, restProps, { ref: ref, className: clsx_1.default('utrecht-table__footer', className) }, { children: children }), void 0));
28
28
  });
29
- exports.TableFooter.displayName = 'utrecht-table-footer';
29
+ exports.TableFooter.displayName = 'TableFooter';
@@ -26,4 +26,4 @@ exports.TableHeader = react_1.forwardRef((_a, ref) => {
26
26
  var { children, className } = _a, restProps = __rest(_a, ["children", "className"]);
27
27
  return (jsx_runtime_1.jsx("thead", Object.assign({}, restProps, { ref: ref, className: clsx_1.default('utrecht-table__header', className) }, { children: children }), void 0));
28
28
  });
29
- exports.TableHeader.displayName = 'utrecht-table-header';
29
+ exports.TableHeader.displayName = 'TableHeader';
@@ -26,4 +26,4 @@ exports.TableHeaderCell = react_1.forwardRef((_a, ref) => {
26
26
  var { children, className } = _a, restProps = __rest(_a, ["children", "className"]);
27
27
  return (jsx_runtime_1.jsx("th", Object.assign({}, restProps, { ref: ref, className: clsx_1.default('utrecht-table__header-cell', className) }, { children: children }), void 0));
28
28
  });
29
- exports.TableHeaderCell.displayName = 'utrecht-table-header-cell';
29
+ exports.TableHeaderCell.displayName = 'TableHeaderCell';
@@ -26,4 +26,4 @@ exports.TableRow = react_1.forwardRef((_a, ref) => {
26
26
  var { children, className } = _a, restProps = __rest(_a, ["children", "className"]);
27
27
  return (jsx_runtime_1.jsx("tr", Object.assign({}, restProps, { ref: ref, className: clsx_1.default('utrecht-table__row', className) }, { children: children }), void 0));
28
28
  });
29
- exports.TableRow.displayName = 'utrecht-table-row';
29
+ exports.TableRow.displayName = 'TableRow';
@@ -22,4 +22,4 @@ exports.Textarea = react_1.forwardRef((_a, ref) => {
22
22
  var { disabled, invalid, readOnly, required, className } = _a, restProps = __rest(_a, ["disabled", "invalid", "readOnly", "required", "className"]);
23
23
  return (jsx_runtime_1.jsx("textarea", Object.assign({}, restProps, { ref: ref, className: clsx_1.default('utrecht-textarea', 'utrecht-textarea--html-textarea', disabled && 'utrecht-textarea--disabled', invalid && 'utrecht-textarea--invalid', readOnly && 'utrecht-textarea--readonly', required && 'utrecht-textarea--required', className), disabled: disabled, readOnly: readOnly, required: required, "aria-invalid": invalid || undefined }), void 0));
24
24
  });
25
- exports.Textarea.displayName = 'utrecht-textarea';
25
+ exports.Textarea.displayName = 'Textarea';
@@ -20,6 +20,6 @@ const clsx_1 = __importDefault(require("clsx"));
20
20
  const react_1 = require("react");
21
21
  exports.Textbox = react_1.forwardRef((_a, ref) => {
22
22
  var { disabled, invalid, readOnly, required, className, type = 'text', maxLength, inputMode } = _a, restProps = __rest(_a, ["disabled", "invalid", "readOnly", "required", "className", "type", "maxLength", "inputMode"]);
23
- return (jsx_runtime_1.jsx("input", Object.assign({}, restProps, { ref: ref, type: type, className: clsx_1.default('utrecht-textbox', 'utrecht-textbox--html-input', type === 'email' && 'utrecht-textbox--url', type === 'password' && 'utrecht-textbox--password', type === 'number' && 'utrecht-textbox--numeric', type === 'tel' && 'utrecht-textbox--numeric', type === 'url' && 'utrecht-textbox--url', inputMode === 'numeric' && 'utrecht-textbox--numeric', disabled && 'utrecht-textbox--disabled', invalid && 'utrecht-textbox--invalid', readOnly && 'utrecht-textbox--readonly', required && 'utrecht-textbox--required', className), maxLength: maxLength, disabled: disabled, readOnly: readOnly, required: required, "aria-invalid": invalid || undefined, inputMode: inputMode || (type === 'number' ? 'numeric' : undefined) }), void 0));
23
+ return (jsx_runtime_1.jsx("input", Object.assign({}, restProps, { ref: ref, type: type, className: clsx_1.default('utrecht-textbox', 'utrecht-textbox--html-input', disabled && 'utrecht-textbox--disabled', invalid && 'utrecht-textbox--invalid', readOnly && 'utrecht-textbox--readonly', required && 'utrecht-textbox--required', className), maxLength: maxLength, disabled: disabled, readOnly: readOnly, required: required, "aria-invalid": invalid || undefined, inputMode: inputMode || (type === 'number' ? 'numeric' : undefined) }), void 0));
24
24
  });
25
- exports.Textbox.displayName = 'utrecht-textbox';
25
+ exports.Textbox.displayName = 'Textbox';
@@ -26,4 +26,4 @@ exports.URLValue = react_1.forwardRef((_a, ref) => {
26
26
  var { children, className } = _a, restProps = __rest(_a, ["children", "className"]);
27
27
  return (jsx_runtime_1.jsx("bdi", Object.assign({}, restProps, { ref: ref, className: clsx_1.default('utrecht-url', className) }, { children: children }), void 0));
28
28
  });
29
- exports.URLValue.displayName = 'utrecht-url';
29
+ exports.URLValue.displayName = 'URLValue';
@@ -26,4 +26,4 @@ exports.UnorderedList = react_1.forwardRef((_a, ref) => {
26
26
  var { children, className } = _a, restProps = __rest(_a, ["children", "className"]);
27
27
  return (jsx_runtime_1.jsx("ul", Object.assign({}, restProps, { ref: ref, className: clsx_1.default('utrecht-unordered-list', className) }, { children: children }), void 0));
28
28
  });
29
- exports.UnorderedList.displayName = 'utrecht-unordered-list';
29
+ exports.UnorderedList.displayName = 'UnorderedList';
@@ -26,4 +26,4 @@ exports.UnorderedListItem = react_1.forwardRef((_a, ref) => {
26
26
  var { children, className } = _a, restProps = __rest(_a, ["children", "className"]);
27
27
  return (jsx_runtime_1.jsx("li", Object.assign({}, restProps, { ref: ref, className: clsx_1.default('utrecht-unordered-list__item', className) }, { children: children }), void 0));
28
28
  });
29
- exports.UnorderedListItem.displayName = 'utrecht-unordered-list-item';
29
+ exports.UnorderedListItem.displayName = 'UnorderedListItem';
@@ -4,8 +4,10 @@
4
4
  */
5
5
  export { Article } from './Article';
6
6
  export { Backdrop } from './Backdrop';
7
- export { Button } from './Button';
7
+ export { Button, PrimaryActionButton, SecondaryActionButton, SubtleButton } from './Button';
8
+ export { ButtonLink } from './ButtonLink';
8
9
  export { Checkbox } from './Checkbox';
10
+ export { CustomRadioButton } from './CustomRadioButton';
9
11
  export { Document } from './Document';
10
12
  export { Fieldset } from './Fieldset';
11
13
  export { FieldsetLegend } from './FieldsetLegend';