@utrecht/component-library-react 1.0.0-alpha.155 → 1.0.0-alpha.157

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.
@@ -4,9 +4,10 @@
4
4
  * Copyright (c) 2021 Robbert Broersma
5
5
  */
6
6
  import { AnchorHTMLAttributes } from 'react';
7
- export interface ButtonLinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
7
+ export interface ButtonLinkProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'placeholder'> {
8
8
  appearance?: string;
9
9
  external?: boolean;
10
+ placeholder?: boolean;
10
11
  }
11
12
  export declare const ButtonLink: import("react").ForwardRefExoticComponent<ButtonLinkProps & {
12
13
  children?: import("react").ReactNode;
package/dist/Link.d.ts CHANGED
@@ -4,9 +4,10 @@
4
4
  * Copyright (c) 2021 Robbert Broersma
5
5
  */
6
6
  import { AnchorHTMLAttributes } from 'react';
7
- export interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
7
+ export interface LinkProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'placeholder'> {
8
8
  boxContent?: boolean;
9
9
  external?: boolean;
10
+ placeholder?: boolean;
10
11
  }
11
12
  export declare const Link: import("react").ForwardRefExoticComponent<LinkProps & {
12
13
  children?: import("react").ReactNode;
package/dist/index.cjs.js CHANGED
@@ -120,8 +120,10 @@ var ButtonLink = /*#__PURE__*/react.forwardRef(function (_a, ref) {
120
120
  children = _a.children,
121
121
  className = _a.className,
122
122
  external = _a.external,
123
+ href = _a.href,
124
+ placeholder = _a.placeholder,
123
125
  role = _a.role,
124
- restProps = tslib.__rest(_a, ["appearance", "children", "className", "external", "role"]);
126
+ restProps = tslib.__rest(_a, ["appearance", "children", "className", "external", "href", "placeholder", "role"]);
125
127
 
126
128
  var props = restProps;
127
129
 
@@ -135,17 +137,20 @@ var ButtonLink = /*#__PURE__*/react.forwardRef(function (_a, ref) {
135
137
  });
136
138
  }
137
139
 
138
- return jsxRuntime.jsx("a", Object.assign({}, props, {
140
+ return jsxRuntime.jsx("a", Object.assign({
141
+ href: placeholder ? undefined : href,
139
142
  ref: ref,
140
- role: role,
143
+ role: role || (placeholder ? 'link' : undefined),
141
144
  className: clsx__default["default"]('utrecht-button-link', 'utrecht-button-link--html-a', {
142
145
  'utrecht-button-link--external': external,
143
146
  'utrecht-button-link--primary-action': appearance === 'primary-action-button',
144
147
  'utrecht-button-link--secondary-action': appearance === 'secondary-action-button',
145
- 'utrecht-button-link--subtle': appearance === 'subtle-button'
148
+ 'utrecht-button-link--subtle': appearance === 'subtle-button',
149
+ 'utrecht-button-link--placeholder': placeholder
146
150
  }, className),
147
- rel: external ? 'external noopener noreferrer' : undefined
148
- }, {
151
+ rel: external ? 'external noopener noreferrer' : undefined,
152
+ "aria-disabled": placeholder ? 'true' : undefined
153
+ }, props, {
149
154
  children: children
150
155
  }));
151
156
  });
@@ -912,20 +917,27 @@ var Link = /*#__PURE__*/react.forwardRef(function (_a, ref) {
912
917
  children = _a.children,
913
918
  className = _a.className,
914
919
  external = _a.external,
915
- restProps = tslib.__rest(_a, ["boxContent", "children", "className", "external"]);
920
+ href = _a.href,
921
+ placeholder = _a.placeholder,
922
+ role = _a.role,
923
+ restProps = tslib.__rest(_a, ["boxContent", "children", "className", "external", "href", "placeholder", "role"]);
916
924
 
917
925
  return (// "utrecht-link--telephone" does not have a corresponding API,
918
926
  // since it is primarily a basis for implementing input[href^="tel"].
919
927
  // Telephone number rendering in React is best achieved using composition
920
928
  // of the TelephoneValue component.
921
- jsxRuntime.jsx("a", Object.assign({}, restProps, {
929
+ jsxRuntime.jsx("a", Object.assign({
930
+ href: placeholder ? undefined : href,
922
931
  ref: ref,
932
+ role: role || (placeholder ? 'link' : undefined),
923
933
  className: clsx__default["default"]('utrecht-link', {
924
934
  'utrecht-link--box-content': boxContent,
925
- 'utrecht-link--external': external
935
+ 'utrecht-link--external': external,
936
+ 'utrecht-link--placeholder': placeholder
926
937
  }, className),
938
+ "aria-disabled": placeholder ? 'true' : undefined,
927
939
  rel: external ? 'external noopener noreferrer' : undefined
928
- }, {
940
+ }, restProps, {
929
941
  children: children
930
942
  }))
931
943
  );
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index.esm.js CHANGED
@@ -111,8 +111,10 @@ var ButtonLink = /*#__PURE__*/forwardRef(function (_a, ref) {
111
111
  children = _a.children,
112
112
  className = _a.className,
113
113
  external = _a.external,
114
+ href = _a.href,
115
+ placeholder = _a.placeholder,
114
116
  role = _a.role,
115
- restProps = __rest(_a, ["appearance", "children", "className", "external", "role"]);
117
+ restProps = __rest(_a, ["appearance", "children", "className", "external", "href", "placeholder", "role"]);
116
118
 
117
119
  var props = restProps;
118
120
 
@@ -126,17 +128,20 @@ var ButtonLink = /*#__PURE__*/forwardRef(function (_a, ref) {
126
128
  });
127
129
  }
128
130
 
129
- return jsx("a", Object.assign({}, props, {
131
+ return jsx("a", Object.assign({
132
+ href: placeholder ? undefined : href,
130
133
  ref: ref,
131
- role: role,
134
+ role: role || (placeholder ? 'link' : undefined),
132
135
  className: clsx('utrecht-button-link', 'utrecht-button-link--html-a', {
133
136
  'utrecht-button-link--external': external,
134
137
  'utrecht-button-link--primary-action': appearance === 'primary-action-button',
135
138
  'utrecht-button-link--secondary-action': appearance === 'secondary-action-button',
136
- 'utrecht-button-link--subtle': appearance === 'subtle-button'
139
+ 'utrecht-button-link--subtle': appearance === 'subtle-button',
140
+ 'utrecht-button-link--placeholder': placeholder
137
141
  }, className),
138
- rel: external ? 'external noopener noreferrer' : undefined
139
- }, {
142
+ rel: external ? 'external noopener noreferrer' : undefined,
143
+ "aria-disabled": placeholder ? 'true' : undefined
144
+ }, props, {
140
145
  children: children
141
146
  }));
142
147
  });
@@ -903,20 +908,27 @@ var Link = /*#__PURE__*/forwardRef(function (_a, ref) {
903
908
  children = _a.children,
904
909
  className = _a.className,
905
910
  external = _a.external,
906
- restProps = __rest(_a, ["boxContent", "children", "className", "external"]);
911
+ href = _a.href,
912
+ placeholder = _a.placeholder,
913
+ role = _a.role,
914
+ restProps = __rest(_a, ["boxContent", "children", "className", "external", "href", "placeholder", "role"]);
907
915
 
908
916
  return (// "utrecht-link--telephone" does not have a corresponding API,
909
917
  // since it is primarily a basis for implementing input[href^="tel"].
910
918
  // Telephone number rendering in React is best achieved using composition
911
919
  // of the TelephoneValue component.
912
- jsx("a", Object.assign({}, restProps, {
920
+ jsx("a", Object.assign({
921
+ href: placeholder ? undefined : href,
913
922
  ref: ref,
923
+ role: role || (placeholder ? 'link' : undefined),
914
924
  className: clsx('utrecht-link', {
915
925
  'utrecht-link--box-content': boxContent,
916
- 'utrecht-link--external': external
926
+ 'utrecht-link--external': external,
927
+ 'utrecht-link--placeholder': placeholder
917
928
  }, className),
929
+ "aria-disabled": placeholder ? 'true' : undefined,
918
930
  rel: external ? 'external noopener noreferrer' : undefined
919
- }, {
931
+ }, restProps, {
920
932
  children: children
921
933
  }))
922
934
  );
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.0.0-alpha.155",
2
+ "version": "1.0.0-alpha.157",
3
3
  "author": "Community for NL Design System",
4
4
  "description": "React component library bundle for the Municipality of Utrecht based on the NL Design System architecture",
5
5
  "license": "EUPL-1.2",
@@ -73,5 +73,5 @@
73
73
  "react": "16 - 18",
74
74
  "react-dom": "16 - 18"
75
75
  },
76
- "gitHead": "eefef66129a595d2a749ef29413e41bbab5be527"
76
+ "gitHead": "0c4529c125c43307432bdd65df9048f644ba0bd4"
77
77
  }