@utrecht/component-library-react 10.0.0 → 10.2.0
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/CHANGELOG.md +30 -0
- package/dist/.jest-test-results.json +1 -1
- package/dist/Alert.d.ts +7 -1
- package/dist/Alert.d.ts.map +1 -1
- package/dist/BreadcrumbNav.d.ts.map +1 -1
- package/dist/Card.d.ts +8 -0
- package/dist/Card.d.ts.map +1 -0
- package/dist/css-module/Alert.d.ts +7 -1
- package/dist/css-module/Alert.d.ts.map +1 -1
- package/dist/css-module/BreadcrumbNav.d.ts.map +1 -1
- package/dist/css-module/Card.d.ts +8 -0
- package/dist/css-module/Card.d.ts.map +1 -0
- package/dist/css-module/css-module/Card.d.ts +7 -0
- package/dist/css-module/css-module/Card.d.ts.map +1 -0
- package/dist/css-module/index.mjs +24 -7
- package/dist/css-module/index.mjs.map +1 -1
- package/dist/index.mjs +24 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +10 -8
package/dist/Alert.d.ts
CHANGED
|
@@ -4,10 +4,16 @@
|
|
|
4
4
|
* Copyright (c) 2021-2024 Gemeente Utrecht
|
|
5
5
|
*/
|
|
6
6
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
7
|
-
export
|
|
7
|
+
export declare const ROLES: readonly ["status", "alert"];
|
|
8
|
+
export type AlertRole = (typeof ROLES)[number];
|
|
9
|
+
export declare const isAlertRole: <T>(x: unknown) => x is T;
|
|
10
|
+
export declare const TYPES: readonly ["error", "warning", "info", "ok"];
|
|
11
|
+
export type AlertType = (typeof TYPES)[number];
|
|
12
|
+
export declare const isAlertType: <T>(x: unknown) => x is T;
|
|
8
13
|
export interface AlertProps extends HTMLAttributes<HTMLDivElement> {
|
|
9
14
|
icon?: ReactNode;
|
|
10
15
|
type?: string | AlertType;
|
|
16
|
+
role?: string | AlertRole;
|
|
11
17
|
}
|
|
12
18
|
export declare const Alert: import("react").ForwardRefExoticComponent<AlertProps & {
|
|
13
19
|
children?: ReactNode | undefined;
|
package/dist/Alert.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../src/Alert.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAA4B,cAAc,EAAqB,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../src/Alert.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAA4B,cAAc,EAAqB,SAAS,EAAE,MAAM,OAAO,CAAC;AAO/F,eAAO,MAAM,KAAK,8BAA+B,CAAC;AAClD,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;AAC/C,eAAO,MAAM,WAAW,GALrB,CAAC,KAAM,OAAO,KAAG,CAAC,KAKsB,CAAC;AAE5C,eAAO,MAAM,KAAK,6CAA8C,CAAC;AACjE,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;AAC/C,eAAO,MAAM,WAAW,GATrB,CAAC,KAAM,OAAO,KAAG,CAAC,KASsB,CAAC;AAS5C,MAAM,WAAW,UAAW,SAAQ,cAAc,CAAC,cAAc,CAAC;IAChE,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,KAAK;;kDA+BjB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BreadcrumbNav.d.ts","sourceRoot":"","sources":["../src/BreadcrumbNav.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,aAAa,EAA4B,cAAc,EAAqB,SAAS,EAAS,MAAM,OAAO,CAAC;AAGrH,MAAM,WAAW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;iDAkBlC,CAAC;AAIF,MAAM,WAAW,sBAAuB,SAAQ,cAAc,CAAC,WAAW,CAAC;IACzE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC;CAC3B;AAED,eAAO,MAAM,iBAAiB;;qDA4C7B,CAAC"}
|
package/dist/Card.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../src/Card.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -4,10 +4,16 @@
|
|
|
4
4
|
* Copyright (c) 2021-2024 Gemeente Utrecht
|
|
5
5
|
*/
|
|
6
6
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
7
|
-
export
|
|
7
|
+
export declare const ROLES: readonly ["status", "alert"];
|
|
8
|
+
export type AlertRole = (typeof ROLES)[number];
|
|
9
|
+
export declare const isAlertRole: <T>(x: unknown) => x is T;
|
|
10
|
+
export declare const TYPES: readonly ["error", "warning", "info", "ok"];
|
|
11
|
+
export type AlertType = (typeof TYPES)[number];
|
|
12
|
+
export declare const isAlertType: <T>(x: unknown) => x is T;
|
|
8
13
|
export interface AlertProps extends HTMLAttributes<HTMLDivElement> {
|
|
9
14
|
icon?: ReactNode;
|
|
10
15
|
type?: string | AlertType;
|
|
16
|
+
role?: string | AlertRole;
|
|
11
17
|
}
|
|
12
18
|
export declare const Alert: import("react").ForwardRefExoticComponent<AlertProps & {
|
|
13
19
|
children?: ReactNode | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../src/Alert.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAA4B,cAAc,EAAqB,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../src/Alert.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAA4B,cAAc,EAAqB,SAAS,EAAE,MAAM,OAAO,CAAC;AAO/F,eAAO,MAAM,KAAK,8BAA+B,CAAC;AAClD,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;AAC/C,eAAO,MAAM,WAAW,GALrB,CAAC,KAAM,OAAO,KAAG,CAAC,KAKsB,CAAC;AAE5C,eAAO,MAAM,KAAK,6CAA8C,CAAC;AACjE,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;AAC/C,eAAO,MAAM,WAAW,GATrB,CAAC,KAAM,OAAO,KAAG,CAAC,KASsB,CAAC;AAS5C,MAAM,WAAW,UAAW,SAAQ,cAAc,CAAC,cAAc,CAAC;IAChE,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,KAAK;;kDA+BjB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BreadcrumbNav.d.ts","sourceRoot":"","sources":["../../src/BreadcrumbNav.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,aAAa,EAA4B,cAAc,EAAqB,SAAS,EAAS,MAAM,OAAO,CAAC;AAGrH,MAAM,WAAW,kBAAmB,SAAQ,cAAc,CAAC,WAAW,CAAC;IACrE,UAAU,CAAC,EAAE,MAAM,CA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C;IACzE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC;CAC3B;AAED,eAAO,MAAM,iBAAiB;;qDA4C7B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../src/Card.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../src/css-module/Card.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,cAAc,SAAS,CAAC"}
|
|
@@ -450,22 +450,38 @@ AccordionProvider.displayName = 'AccordionProvider';
|
|
|
450
450
|
*/
|
|
451
451
|
insertStyle(css);
|
|
452
452
|
|
|
453
|
-
var _excluded$1e = ["children", "className", "icon", "type"];
|
|
453
|
+
var _excluded$1e = ["children", "className", "icon", "type", "role"];
|
|
454
454
|
function ownKeys$1f(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
455
455
|
function _objectSpread$1f(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1f(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1f(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
456
|
+
var enumGuard = function enumGuard(values) {
|
|
457
|
+
return function (x) {
|
|
458
|
+
return values.includes(x);
|
|
459
|
+
};
|
|
460
|
+
};
|
|
461
|
+
var TYPES = ['error', 'warning', 'info', 'ok'];
|
|
462
|
+
var isAlertType = enumGuard(TYPES);
|
|
463
|
+
var typeToRole = {
|
|
464
|
+
info: 'status',
|
|
465
|
+
ok: 'status',
|
|
466
|
+
warning: 'alert',
|
|
467
|
+
error: 'alert'
|
|
468
|
+
};
|
|
456
469
|
var Alert = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
457
470
|
var children = _ref.children,
|
|
458
471
|
className = _ref.className,
|
|
459
472
|
icon = _ref.icon,
|
|
460
473
|
type = _ref.type,
|
|
474
|
+
role = _ref.role,
|
|
461
475
|
restProps = _objectWithoutProperties(_ref, _excluded$1e);
|
|
476
|
+
var computedType = isAlertType(type) ? type : 'info';
|
|
477
|
+
var computedRole = role || typeToRole[computedType];
|
|
462
478
|
return jsxs("div", _objectSpread$1f(_objectSpread$1f({}, restProps), {}, {
|
|
463
479
|
ref: ref,
|
|
464
480
|
className: clsx('utrecht-alert', {
|
|
465
|
-
'utrecht-alert--error':
|
|
466
|
-
'utrecht-alert--info':
|
|
467
|
-
'utrecht-alert--ok':
|
|
468
|
-
'utrecht-alert--warning':
|
|
481
|
+
'utrecht-alert--error': computedType === 'error',
|
|
482
|
+
'utrecht-alert--info': computedType === 'info',
|
|
483
|
+
'utrecht-alert--ok': computedType === 'ok',
|
|
484
|
+
'utrecht-alert--warning': computedType === 'warning'
|
|
469
485
|
}, className),
|
|
470
486
|
children: [icon && jsx("div", {
|
|
471
487
|
className: "utrecht-alert__icon",
|
|
@@ -474,7 +490,7 @@ var Alert = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
474
490
|
className: "utrecht-alert__content",
|
|
475
491
|
children: jsx("div", {
|
|
476
492
|
className: "utrecht-alert__message",
|
|
477
|
-
role:
|
|
493
|
+
role: computedRole,
|
|
478
494
|
children: children
|
|
479
495
|
})
|
|
480
496
|
})]
|
|
@@ -788,7 +804,8 @@ var BreadcrumbNavLink = /*#__PURE__*/forwardRef(function (_ref5, ref) {
|
|
|
788
804
|
children: jsxs(LinkComponent, _objectSpread$18(_objectSpread$18(_objectSpread$18({
|
|
789
805
|
className: clsx('utrecht-breadcrumb-nav__link', className, {
|
|
790
806
|
'utrecht-breadcrumb-nav__link--current': current,
|
|
791
|
-
'utrecht-breadcrumb-nav__link--disabled': disabled
|
|
807
|
+
'utrecht-breadcrumb-nav__link--disabled': disabled,
|
|
808
|
+
'utrecht-breadcrumb-nav__link--first': index === 0
|
|
792
809
|
}),
|
|
793
810
|
href: disabled ? undefined : href,
|
|
794
811
|
rel: rel,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.mjs
CHANGED
|
@@ -358,22 +358,38 @@ var AccordionProvider = function AccordionProvider(_ref4) {
|
|
|
358
358
|
};
|
|
359
359
|
AccordionProvider.displayName = 'AccordionProvider';
|
|
360
360
|
|
|
361
|
-
var _excluded$1e = ["children", "className", "icon", "type"];
|
|
361
|
+
var _excluded$1e = ["children", "className", "icon", "type", "role"];
|
|
362
362
|
function ownKeys$1f(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
363
363
|
function _objectSpread$1f(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1f(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1f(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
364
|
+
var enumGuard = function enumGuard(values) {
|
|
365
|
+
return function (x) {
|
|
366
|
+
return values.includes(x);
|
|
367
|
+
};
|
|
368
|
+
};
|
|
369
|
+
var TYPES = ['error', 'warning', 'info', 'ok'];
|
|
370
|
+
var isAlertType = enumGuard(TYPES);
|
|
371
|
+
var typeToRole = {
|
|
372
|
+
info: 'status',
|
|
373
|
+
ok: 'status',
|
|
374
|
+
warning: 'alert',
|
|
375
|
+
error: 'alert'
|
|
376
|
+
};
|
|
364
377
|
var Alert = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
365
378
|
var children = _ref.children,
|
|
366
379
|
className = _ref.className,
|
|
367
380
|
icon = _ref.icon,
|
|
368
381
|
type = _ref.type,
|
|
382
|
+
role = _ref.role,
|
|
369
383
|
restProps = _objectWithoutProperties(_ref, _excluded$1e);
|
|
384
|
+
var computedType = isAlertType(type) ? type : 'info';
|
|
385
|
+
var computedRole = role || typeToRole[computedType];
|
|
370
386
|
return jsxs("div", _objectSpread$1f(_objectSpread$1f({}, restProps), {}, {
|
|
371
387
|
ref: ref,
|
|
372
388
|
className: clsx('utrecht-alert', {
|
|
373
|
-
'utrecht-alert--error':
|
|
374
|
-
'utrecht-alert--info':
|
|
375
|
-
'utrecht-alert--ok':
|
|
376
|
-
'utrecht-alert--warning':
|
|
389
|
+
'utrecht-alert--error': computedType === 'error',
|
|
390
|
+
'utrecht-alert--info': computedType === 'info',
|
|
391
|
+
'utrecht-alert--ok': computedType === 'ok',
|
|
392
|
+
'utrecht-alert--warning': computedType === 'warning'
|
|
377
393
|
}, className),
|
|
378
394
|
children: [icon && jsx("div", {
|
|
379
395
|
className: "utrecht-alert__icon",
|
|
@@ -382,7 +398,7 @@ var Alert = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
382
398
|
className: "utrecht-alert__content",
|
|
383
399
|
children: jsx("div", {
|
|
384
400
|
className: "utrecht-alert__message",
|
|
385
|
-
role:
|
|
401
|
+
role: computedRole,
|
|
386
402
|
children: children
|
|
387
403
|
})
|
|
388
404
|
})]
|
|
@@ -647,7 +663,8 @@ var BreadcrumbNavLink = /*#__PURE__*/forwardRef(function (_ref5, ref) {
|
|
|
647
663
|
children: jsxs(LinkComponent, _objectSpread$18(_objectSpread$18(_objectSpread$18({
|
|
648
664
|
className: clsx('utrecht-breadcrumb-nav__link', className, {
|
|
649
665
|
'utrecht-breadcrumb-nav__link--current': current,
|
|
650
|
-
'utrecht-breadcrumb-nav__link--disabled': disabled
|
|
666
|
+
'utrecht-breadcrumb-nav__link--disabled': disabled,
|
|
667
|
+
'utrecht-breadcrumb-nav__link--first': index === 0
|
|
651
668
|
}),
|
|
652
669
|
href: disabled ? undefined : href,
|
|
653
670
|
rel: rel,
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@utrecht/component-library-react",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.2.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "React component library bundle for the Municipality of Utrecht based on the NL Design System architecture",
|
|
6
6
|
"keywords": [
|
|
@@ -114,8 +114,8 @@
|
|
|
114
114
|
"dependencies": {
|
|
115
115
|
"clsx": "2.1.1",
|
|
116
116
|
"lodash.chunk": "4.2.0",
|
|
117
|
-
"@utrecht/alert-css": "2.2.1",
|
|
118
117
|
"@utrecht/accordion-css": "2.0.0",
|
|
118
|
+
"@utrecht/alert-css": "2.3.0",
|
|
119
119
|
"@utrecht/alert-dialog-css": "1.4.2",
|
|
120
120
|
"@utrecht/alternate-lang-nav-css": "1.3.1",
|
|
121
121
|
"@utrecht/article-css": "1.5.1",
|
|
@@ -124,11 +124,13 @@
|
|
|
124
124
|
"@utrecht/badge-list-css": "2.2.1",
|
|
125
125
|
"@utrecht/badge-status-css": "1.4.1",
|
|
126
126
|
"@utrecht/blockquote-css": "1.6.1",
|
|
127
|
-
"@utrecht/breadcrumb-nav-css": "1.
|
|
127
|
+
"@utrecht/breadcrumb-nav-css": "1.5.0",
|
|
128
128
|
"@utrecht/button-group-react": "1.0.1",
|
|
129
129
|
"@utrecht/button-link-css": "1.3.1",
|
|
130
130
|
"@utrecht/button-react": "2.0.7",
|
|
131
131
|
"@utrecht/calendar-react": "1.0.11",
|
|
132
|
+
"@utrecht/card-css": "0.1.0",
|
|
133
|
+
"@utrecht/card-react": "0.0.1",
|
|
132
134
|
"@utrecht/checkbox-react": "1.0.8",
|
|
133
135
|
"@utrecht/code-block-css": "1.5.1",
|
|
134
136
|
"@utrecht/code-css": "1.5.1",
|
|
@@ -161,6 +163,7 @@
|
|
|
161
163
|
"@utrecht/heading-5-css": "1.5.1",
|
|
162
164
|
"@utrecht/heading-6-css": "1.5.1",
|
|
163
165
|
"@utrecht/heading-group-css": "1.5.1",
|
|
166
|
+
"@utrecht/html-content-css": "1.4.1",
|
|
164
167
|
"@utrecht/iban-data-css": "1.3.1",
|
|
165
168
|
"@utrecht/icon-css": "2.0.1",
|
|
166
169
|
"@utrecht/img-css": "1.3.1",
|
|
@@ -173,13 +176,13 @@
|
|
|
173
176
|
"@utrecht/listbox-react": "1.0.10",
|
|
174
177
|
"@utrecht/logo-button-css": "1.4.1",
|
|
175
178
|
"@utrecht/logo-css": "1.4.1",
|
|
179
|
+
"@utrecht/logo-image-css": "1.4.1",
|
|
176
180
|
"@utrecht/map-control-button-css": "2.2.1",
|
|
177
181
|
"@utrecht/map-marker-css": "1.4.1",
|
|
178
182
|
"@utrecht/mark-css": "1.5.1",
|
|
179
183
|
"@utrecht/multiline-data-css": "1.3.1",
|
|
180
184
|
"@utrecht/nav-bar-css": "1.4.1",
|
|
181
185
|
"@utrecht/nav-list-css": "1.3.1",
|
|
182
|
-
"@utrecht/logo-image-css": "1.4.1",
|
|
183
186
|
"@utrecht/number-badge-css": "2.3.1",
|
|
184
187
|
"@utrecht/number-data-css": "1.4.1",
|
|
185
188
|
"@utrecht/open-forms-container-css": "1.0.1",
|
|
@@ -199,14 +202,13 @@
|
|
|
199
202
|
"@utrecht/select-css": "1.8.1",
|
|
200
203
|
"@utrecht/separator-css": "1.5.1",
|
|
201
204
|
"@utrecht/skip-link-css": "1.5.1",
|
|
202
|
-
"@utrecht/spotlight-section-css": "1.6.1",
|
|
203
|
-
"@utrecht/html-content-css": "1.4.1",
|
|
204
205
|
"@utrecht/subscript-css": "1.3.1",
|
|
206
|
+
"@utrecht/spotlight-section-css": "1.6.1",
|
|
205
207
|
"@utrecht/superscript-css": "1.3.1",
|
|
206
208
|
"@utrecht/surface-css": "1.4.1",
|
|
207
|
-
"@utrecht/table-css": "1.6.1",
|
|
208
|
-
"@utrecht/table-of-contents-css": "0.3.1",
|
|
209
209
|
"@utrecht/textarea-css": "2.3.2",
|
|
210
|
+
"@utrecht/table-of-contents-css": "0.3.1",
|
|
211
|
+
"@utrecht/table-css": "1.6.1",
|
|
210
212
|
"@utrecht/textbox-react": "1.0.8",
|
|
211
213
|
"@utrecht/top-task-link-css": "1.4.1",
|
|
212
214
|
"@utrecht/top-task-nav-css": "1.3.1",
|