@utrecht/component-library-react 1.0.0-alpha.203 → 1.0.0-alpha.205
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/BreadcrumbNav.d.ts +22 -0
- package/dist/css-module/BreadcrumbNav.d.ts +22 -0
- package/dist/css-module/css-module/BreadcrumbNav.d.ts +6 -0
- package/dist/css-module/css-module/index.d.ts +1 -0
- package/dist/css-module/index.d.ts +1 -0
- package/dist/css-module/index.js +142 -57
- package/dist/css-module/index.js.map +1 -1
- package/dist/css-module/index.mjs +142 -59
- package/dist/css-module/index.mjs.map +1 -1
- package/dist/index.cjs.js +131 -49
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +131 -51
- package/dist/index.esm.js.map +1 -1
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __rest } from 'tslib';
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import clsx, { clsx as clsx$1 } from 'clsx';
|
|
4
|
-
import { forwardRef, useState } from 'react';
|
|
4
|
+
import { forwardRef, useId, useState } from 'react';
|
|
5
5
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
6
6
|
import { eachDayOfInterval, startOfWeek, endOfWeek, isSameDay, endOfDay, parseISO, setYear, getYear, addYears, setMonth, addMonths, format, isSameMonth, setDate, formatISO, startOfMonth, addWeeks } from 'date-fns';
|
|
7
7
|
import { enUS } from 'date-fns/locale';
|
|
@@ -93,6 +93,135 @@ var Backdrop = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
93
93
|
});
|
|
94
94
|
Backdrop.displayName = 'Backdrop';
|
|
95
95
|
|
|
96
|
+
var Heading = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
97
|
+
var appearance = _a.appearance,
|
|
98
|
+
className = _a.className,
|
|
99
|
+
level = _a.level,
|
|
100
|
+
restProps = __rest(_a, ["appearance", "className", "level"]);
|
|
101
|
+
|
|
102
|
+
var appearances = ['utrecht-heading-1', 'utrecht-heading-2', 'utrecht-heading-3', 'utrecht-heading-4', 'utrecht-heading-5', 'utrecht-heading-6'];
|
|
103
|
+
var HeadingX = level === 2 ? 'h2' : level === 3 ? 'h3' : level === 4 ? 'h4' : level === 5 ? 'h5' : level === 6 ? 'h6' : 'h1';
|
|
104
|
+
var headingClassName = appearance && appearances.indexOf(appearance) !== -1 ? appearance : appearances[level - 1] || 'utrecht-heading-1';
|
|
105
|
+
return jsx(HeadingX, Object.assign({
|
|
106
|
+
className: clsx(headingClassName, className)
|
|
107
|
+
}, restProps, {
|
|
108
|
+
ref: ref
|
|
109
|
+
}));
|
|
110
|
+
});
|
|
111
|
+
Heading.displayName = 'Heading';
|
|
112
|
+
|
|
113
|
+
var Link = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
114
|
+
var boxContent = _a.boxContent,
|
|
115
|
+
children = _a.children,
|
|
116
|
+
className = _a.className,
|
|
117
|
+
external = _a.external,
|
|
118
|
+
href = _a.href,
|
|
119
|
+
placeholder = _a.placeholder,
|
|
120
|
+
role = _a.role,
|
|
121
|
+
restProps = __rest(_a, ["boxContent", "children", "className", "external", "href", "placeholder", "role"]);
|
|
122
|
+
|
|
123
|
+
return (// "utrecht-link--telephone" does not have a corresponding API,
|
|
124
|
+
// since it is primarily a basis for implementing input[href^="tel"].
|
|
125
|
+
// Telephone number rendering in React is best achieved using composition
|
|
126
|
+
// of the TelephoneValue component.
|
|
127
|
+
jsx("a", Object.assign({
|
|
128
|
+
href: placeholder ? undefined : href,
|
|
129
|
+
ref: ref,
|
|
130
|
+
role: role || (placeholder ? 'link' : undefined),
|
|
131
|
+
className: clsx('utrecht-link', {
|
|
132
|
+
'utrecht-link--box-content': boxContent,
|
|
133
|
+
'utrecht-link--external': external,
|
|
134
|
+
'utrecht-link--placeholder': placeholder
|
|
135
|
+
}, className),
|
|
136
|
+
"aria-disabled": placeholder ? 'true' : undefined,
|
|
137
|
+
rel: external ? 'external noopener noreferrer' : undefined
|
|
138
|
+
}, restProps, {
|
|
139
|
+
children: children
|
|
140
|
+
}))
|
|
141
|
+
);
|
|
142
|
+
});
|
|
143
|
+
Link.displayName = 'Link';
|
|
144
|
+
|
|
145
|
+
var useMicrodataItem = function useMicrodataItem(_ref) {
|
|
146
|
+
var prop = _ref.prop,
|
|
147
|
+
type = _ref.type;
|
|
148
|
+
return {
|
|
149
|
+
itemScope: true,
|
|
150
|
+
itemType: type,
|
|
151
|
+
itemProp: prop
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
var useMicrodataProp = function useMicrodataProp(prop) {
|
|
156
|
+
return {
|
|
157
|
+
itemProp: prop
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
var BreadcrumbNav = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
162
|
+
var appearance = _a.appearance,
|
|
163
|
+
children = _a.children,
|
|
164
|
+
className = _a.className,
|
|
165
|
+
_a$headingLevel = _a.headingLevel,
|
|
166
|
+
headingLevel = _a$headingLevel === void 0 ? 2 : _a$headingLevel,
|
|
167
|
+
label = _a.label,
|
|
168
|
+
restProps = __rest(_a, ["appearance", "children", "className", "headingLevel", "label"]);
|
|
169
|
+
|
|
170
|
+
var headingId = label ? useId() : undefined;
|
|
171
|
+
return jsxs("nav", Object.assign({}, restProps, {
|
|
172
|
+
ref: ref,
|
|
173
|
+
className: clsx('utrecht-breadcrumb', {
|
|
174
|
+
'utrecht-breadcrumb--arrows': appearance === 'arrows'
|
|
175
|
+
}, className),
|
|
176
|
+
"aria-labelledby": headingId
|
|
177
|
+
}, {
|
|
178
|
+
children: [label && jsx(Heading, Object.assign({
|
|
179
|
+
id: headingId,
|
|
180
|
+
className: "utrecht-breadcrumb__heading",
|
|
181
|
+
level: headingLevel,
|
|
182
|
+
"aria-hidden": "true"
|
|
183
|
+
}, {
|
|
184
|
+
children: label
|
|
185
|
+
})), jsx("ol", Object.assign({
|
|
186
|
+
className: "utrecht-breadcrumb__list"
|
|
187
|
+
}, useMicrodataItem({
|
|
188
|
+
type: 'https://schema.org/BreadcrumbList'
|
|
189
|
+
}), {
|
|
190
|
+
children: children
|
|
191
|
+
}))]
|
|
192
|
+
}));
|
|
193
|
+
});
|
|
194
|
+
BreadcrumbNav.displayName = 'BreadcrumbNav';
|
|
195
|
+
var BreadcrumbLink = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
196
|
+
var children = _ref2.children,
|
|
197
|
+
current = _ref2.current,
|
|
198
|
+
href = _ref2.href,
|
|
199
|
+
index = _ref2.index;
|
|
200
|
+
return jsx("li", Object.assign({
|
|
201
|
+
className: "utrecht-breadcrumb__item"
|
|
202
|
+
}, useMicrodataItem({
|
|
203
|
+
type: 'https://schema.org/ListItem',
|
|
204
|
+
prop: 'itemListElement'
|
|
205
|
+
}), {
|
|
206
|
+
children: jsxs(Link, Object.assign({
|
|
207
|
+
className: "utrecht-breadcrumb__link",
|
|
208
|
+
href: href,
|
|
209
|
+
"aria-current": current && 'location'
|
|
210
|
+
}, useMicrodataProp('item'), {
|
|
211
|
+
ref: ref
|
|
212
|
+
}, {
|
|
213
|
+
children: [jsx("span", Object.assign({
|
|
214
|
+
className: "utrecht-breadcrumb__text"
|
|
215
|
+
}, useMicrodataProp('name'), {
|
|
216
|
+
children: children
|
|
217
|
+
})), typeof index === 'number' ? jsx("meta", Object.assign({}, useMicrodataProp('position'), {
|
|
218
|
+
content: String(index + 1)
|
|
219
|
+
})) : null]
|
|
220
|
+
}))
|
|
221
|
+
}));
|
|
222
|
+
});
|
|
223
|
+
BreadcrumbLink.displayName = 'BreadcrumbLink';
|
|
224
|
+
|
|
96
225
|
var Button = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
97
226
|
var appearance = _a.appearance,
|
|
98
227
|
busy = _a.busy,
|
|
@@ -965,23 +1094,6 @@ var HTMLContent = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
965
1094
|
});
|
|
966
1095
|
HTMLContent.displayName = 'HTMLContent';
|
|
967
1096
|
|
|
968
|
-
var Heading = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
969
|
-
var appearance = _a.appearance,
|
|
970
|
-
className = _a.className,
|
|
971
|
-
level = _a.level,
|
|
972
|
-
restProps = __rest(_a, ["appearance", "className", "level"]);
|
|
973
|
-
|
|
974
|
-
var appearances = ['utrecht-heading-1', 'utrecht-heading-2', 'utrecht-heading-3', 'utrecht-heading-4', 'utrecht-heading-5', 'utrecht-heading-6'];
|
|
975
|
-
var HeadingX = level === 2 ? 'h2' : level === 3 ? 'h3' : level === 4 ? 'h4' : level === 5 ? 'h5' : level === 6 ? 'h6' : 'h1';
|
|
976
|
-
var headingClassName = appearance && appearances.indexOf(appearance) !== -1 ? appearance : appearances[level - 1] || 'utrecht-heading-1';
|
|
977
|
-
return jsx(HeadingX, Object.assign({
|
|
978
|
-
className: clsx(headingClassName, className)
|
|
979
|
-
}, restProps, {
|
|
980
|
-
ref: ref
|
|
981
|
-
}));
|
|
982
|
-
});
|
|
983
|
-
Heading.displayName = 'Heading';
|
|
984
|
-
|
|
985
1097
|
var Heading1 = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
986
1098
|
var children = _a.children,
|
|
987
1099
|
className = _a.className,
|
|
@@ -1094,38 +1206,6 @@ var Image = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
1094
1206
|
});
|
|
1095
1207
|
Image.displayName = 'Image';
|
|
1096
1208
|
|
|
1097
|
-
var Link = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
1098
|
-
var boxContent = _a.boxContent,
|
|
1099
|
-
children = _a.children,
|
|
1100
|
-
className = _a.className,
|
|
1101
|
-
external = _a.external,
|
|
1102
|
-
href = _a.href,
|
|
1103
|
-
placeholder = _a.placeholder,
|
|
1104
|
-
role = _a.role,
|
|
1105
|
-
restProps = __rest(_a, ["boxContent", "children", "className", "external", "href", "placeholder", "role"]);
|
|
1106
|
-
|
|
1107
|
-
return (// "utrecht-link--telephone" does not have a corresponding API,
|
|
1108
|
-
// since it is primarily a basis for implementing input[href^="tel"].
|
|
1109
|
-
// Telephone number rendering in React is best achieved using composition
|
|
1110
|
-
// of the TelephoneValue component.
|
|
1111
|
-
jsx("a", Object.assign({
|
|
1112
|
-
href: placeholder ? undefined : href,
|
|
1113
|
-
ref: ref,
|
|
1114
|
-
role: role || (placeholder ? 'link' : undefined),
|
|
1115
|
-
className: clsx('utrecht-link', {
|
|
1116
|
-
'utrecht-link--box-content': boxContent,
|
|
1117
|
-
'utrecht-link--external': external,
|
|
1118
|
-
'utrecht-link--placeholder': placeholder
|
|
1119
|
-
}, className),
|
|
1120
|
-
"aria-disabled": placeholder ? 'true' : undefined,
|
|
1121
|
-
rel: external ? 'external noopener noreferrer' : undefined
|
|
1122
|
-
}, restProps, {
|
|
1123
|
-
children: children
|
|
1124
|
-
}))
|
|
1125
|
-
);
|
|
1126
|
-
});
|
|
1127
|
-
Link.displayName = 'Link';
|
|
1128
|
-
|
|
1129
1209
|
var LinkButton = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
1130
1210
|
var children = _a.children,
|
|
1131
1211
|
disabled = _a.disabled,
|
|
@@ -1684,5 +1764,5 @@ var UnorderedListItem = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
1684
1764
|
});
|
|
1685
1765
|
UnorderedListItem.displayName = 'UnorderedListItem';
|
|
1686
1766
|
|
|
1687
|
-
export { Alert, AlertDialog, Article, Backdrop, Button, ButtonGroup, ButtonLink, Calendar, Checkbox, Code, CodeBlock, CustomRadioButton, DataList, DataListActions, DataListItem, DataListKey, DataListValue, Document, Emphasis, Fieldset, FieldsetLegend, Figure, FigureCaption, FormField, FormFieldDescription, FormLabel, HTMLContent, Heading, Heading1, Heading2, Heading3, Heading4, Heading5, Heading6, HeadingGroup, Icon, Image, Link, LinkButton, LinkSocial, ListSocial, ListSocialItem, Mark, NumberValue, OrderedList, OrderedListItem, Page, PageContent, PageFooter, PageHeader, Paragraph, PreHeading, PrimaryActionButton, RadioButton, SecondaryActionButton, Select, SelectOption, Separator, SkipLink, SpotlightSection, Strong, SubtleButton, Surface, Table, TableBody, TableCaption, TableCell, TableFooter, TableHeader, TableHeaderCell, TableRow, Textarea, Textbox, URLValue, UnorderedList, UnorderedListItem };
|
|
1767
|
+
export { Alert, AlertDialog, Article, Backdrop, BreadcrumbLink, BreadcrumbNav, Button, ButtonGroup, ButtonLink, Calendar, Checkbox, Code, CodeBlock, CustomRadioButton, DataList, DataListActions, DataListItem, DataListKey, DataListValue, Document, Emphasis, Fieldset, FieldsetLegend, Figure, FigureCaption, FormField, FormFieldDescription, FormLabel, HTMLContent, Heading, Heading1, Heading2, Heading3, Heading4, Heading5, Heading6, HeadingGroup, Icon, Image, Link, LinkButton, LinkSocial, ListSocial, ListSocialItem, Mark, NumberValue, OrderedList, OrderedListItem, Page, PageContent, PageFooter, PageHeader, Paragraph, PreHeading, PrimaryActionButton, RadioButton, SecondaryActionButton, Select, SelectOption, Separator, SkipLink, SpotlightSection, Strong, SubtleButton, Surface, Table, TableBody, TableCaption, TableCell, TableFooter, TableHeader, TableHeaderCell, TableRow, Textarea, Textbox, URLValue, UnorderedList, UnorderedListItem };
|
|
1688
1768
|
//# sourceMappingURL=index.esm.js.map
|
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
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.
|
|
2
|
+
"version": "1.0.0-alpha.205",
|
|
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",
|
|
@@ -76,5 +76,5 @@
|
|
|
76
76
|
"react": "16 - 18",
|
|
77
77
|
"react-dom": "16 - 18"
|
|
78
78
|
},
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "63c5db156252b7c098295f31111b886564ad4f9b"
|
|
80
80
|
}
|