@utrecht/component-library-react 3.0.1-alpha.13 → 3.0.1-alpha.15
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/.jest-test-results.json +1 -1
- package/dist/css-module/index.js +12 -8
- package/dist/css-module/index.js.map +1 -1
- package/dist/css-module/index.mjs +12 -8
- package/dist/css-module/index.mjs.map +1 -1
- package/dist/index.cjs.js +12 -8
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +12 -8
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/css-module/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
4
|
-
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
5
4
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
5
|
+
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
6
6
|
var react = require('react');
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
8
8
|
var clsx = require('clsx');
|
|
@@ -105,7 +105,8 @@ var Heading = /*#__PURE__*/react.forwardRef(function (_ref, ref) {
|
|
|
105
105
|
});
|
|
106
106
|
Heading.displayName = 'Heading';
|
|
107
107
|
|
|
108
|
-
var _excluded$1g = ["
|
|
108
|
+
var _excluded$1g = ["id", "label", "className", "headingLevel", "expanded", "disabled", "section", "children", "buttonRef", "onActivate", "onButtonBlur", "onButtonFocus"],
|
|
109
|
+
_excluded2$7 = ["children", "group", "headingLevel", "heading"];
|
|
109
110
|
function ownKeys$1h(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; }
|
|
110
111
|
function _objectSpread$1h(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1h(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1h(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
111
112
|
/**
|
|
@@ -137,6 +138,7 @@ var previousItem = function previousItem(items, item) {
|
|
|
137
138
|
var AccordionSection = /*#__PURE__*/react.forwardRef(function (_ref, ref) {
|
|
138
139
|
var id = _ref.id,
|
|
139
140
|
label = _ref.label,
|
|
141
|
+
className = _ref.className,
|
|
140
142
|
_ref$headingLevel = _ref.headingLevel,
|
|
141
143
|
headingLevel = _ref$headingLevel === void 0 ? 1 : _ref$headingLevel,
|
|
142
144
|
_ref$expanded = _ref.expanded,
|
|
@@ -147,7 +149,8 @@ var AccordionSection = /*#__PURE__*/react.forwardRef(function (_ref, ref) {
|
|
|
147
149
|
buttonRef = _ref.buttonRef,
|
|
148
150
|
onActivate = _ref.onActivate,
|
|
149
151
|
onButtonBlur = _ref.onButtonBlur,
|
|
150
|
-
onButtonFocus = _ref.onButtonFocus
|
|
152
|
+
onButtonFocus = _ref.onButtonFocus,
|
|
153
|
+
props = _objectWithoutProperties(_ref, _excluded$1g);
|
|
151
154
|
var panelAttributes = {
|
|
152
155
|
className: clsx('utrecht-accordion__panel', {
|
|
153
156
|
'utrecht-accordion__panel--expanded': expanded
|
|
@@ -167,10 +170,11 @@ var AccordionSection = /*#__PURE__*/react.forwardRef(function (_ref, ref) {
|
|
|
167
170
|
// content of the landmark to be the actual content, instead of starting
|
|
168
171
|
// with the button that controls the region.
|
|
169
172
|
// - we only want expanded sections to show up as landmarks
|
|
170
|
-
return jsxRuntime.jsxs("div", {
|
|
171
|
-
className: clsx('utrecht-accordion__section'),
|
|
173
|
+
return jsxRuntime.jsxs("div", _objectSpread$1h(_objectSpread$1h({
|
|
174
|
+
className: clsx('utrecht-accordion__section', className),
|
|
172
175
|
id: id,
|
|
173
|
-
ref: ref
|
|
176
|
+
ref: ref
|
|
177
|
+
}, props), {}, {
|
|
174
178
|
children: [jsxRuntime.jsx(Heading, {
|
|
175
179
|
level: headingLevel,
|
|
176
180
|
className: clsx('utrecht-accordion__header'),
|
|
@@ -201,7 +205,7 @@ var AccordionSection = /*#__PURE__*/react.forwardRef(function (_ref, ref) {
|
|
|
201
205
|
})) : jsxRuntime.jsx("div", _objectSpread$1h(_objectSpread$1h({}, panelAttributes), {}, {
|
|
202
206
|
children: children
|
|
203
207
|
}))]
|
|
204
|
-
});
|
|
208
|
+
}));
|
|
205
209
|
});
|
|
206
210
|
AccordionSection.displayName = 'AccordionSection';
|
|
207
211
|
var Accordion = /*#__PURE__*/react.forwardRef(function (_ref2, ref) {
|
|
@@ -209,7 +213,7 @@ var Accordion = /*#__PURE__*/react.forwardRef(function (_ref2, ref) {
|
|
|
209
213
|
group = _ref2.group,
|
|
210
214
|
headingLevel = _ref2.headingLevel,
|
|
211
215
|
heading = _ref2.heading,
|
|
212
|
-
props = _objectWithoutProperties(_ref2,
|
|
216
|
+
props = _objectWithoutProperties(_ref2, _excluded2$7);
|
|
213
217
|
var headingId = react.useId();
|
|
214
218
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
215
219
|
children: [!!heading && typeof headingLevel === 'number' && jsxRuntime.jsx(Heading, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n"],"names":[],"mappings":";;;;;;;;;;;AAAA,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE;AAC/B,EAAE,KAAK,GAAG,KAAK,KAAK,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC;AACjC,EAAE,IAAI,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;AAC9B;AACA,EAAE,IAAI,CAAC,GAAG,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,EAAE,OAAO,EAAE;AAC1D;AACA,EAAE,IAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AACvE,EAAE,IAAI,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;AAC9C,EAAE,KAAK,CAAC,IAAI,GAAG,UAAU,CAAC;AAC1B;AACA,EAAE,IAAI,QAAQ,KAAK,KAAK,EAAE;AAC1B,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE;AACzB,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;AAChD,KAAK,MAAM;AACX,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC9B,KAAK;AACL,GAAG,MAAM;AACT,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5B,GAAG;AACH;AACA,EAAE,IAAI,KAAK,CAAC,UAAU,EAAE;AACxB,IAAI,KAAK,CAAC,UAAU,CAAC,OAAO,GAAG,GAAG,CAAC;AACnC,GAAG,MAAM;AACT,IAAI,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC;AACpD,GAAG;AACH
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n"],"names":[],"mappings":";;;;;;;;;;;AAAA,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE;AAC/B,EAAE,KAAK,GAAG,KAAK,KAAK,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC;AACjC,EAAE,IAAI,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;AAC9B;AACA,EAAE,IAAI,CAAC,GAAG,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,EAAE,OAAO,EAAE;AAC1D;AACA,EAAE,IAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AACvE,EAAE,IAAI,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;AAC9C,EAAE,KAAK,CAAC,IAAI,GAAG,UAAU,CAAC;AAC1B;AACA,EAAE,IAAI,QAAQ,KAAK,KAAK,EAAE;AAC1B,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE;AACzB,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;AAChD,KAAK,MAAM;AACX,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK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2
|
-
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
2
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
3
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
4
4
|
import { forwardRef, useId, useRef, useState, createElement, isValidElement, useImperativeHandle, useEffect } from 'react';
|
|
5
5
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
6
6
|
import clsx from 'clsx';
|
|
@@ -103,7 +103,8 @@ var Heading = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
103
103
|
});
|
|
104
104
|
Heading.displayName = 'Heading';
|
|
105
105
|
|
|
106
|
-
var _excluded$1g = ["
|
|
106
|
+
var _excluded$1g = ["id", "label", "className", "headingLevel", "expanded", "disabled", "section", "children", "buttonRef", "onActivate", "onButtonBlur", "onButtonFocus"],
|
|
107
|
+
_excluded2$7 = ["children", "group", "headingLevel", "heading"];
|
|
107
108
|
function ownKeys$1h(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; }
|
|
108
109
|
function _objectSpread$1h(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1h(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1h(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
109
110
|
/**
|
|
@@ -135,6 +136,7 @@ var previousItem = function previousItem(items, item) {
|
|
|
135
136
|
var AccordionSection = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
136
137
|
var id = _ref.id,
|
|
137
138
|
label = _ref.label,
|
|
139
|
+
className = _ref.className,
|
|
138
140
|
_ref$headingLevel = _ref.headingLevel,
|
|
139
141
|
headingLevel = _ref$headingLevel === void 0 ? 1 : _ref$headingLevel,
|
|
140
142
|
_ref$expanded = _ref.expanded,
|
|
@@ -145,7 +147,8 @@ var AccordionSection = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
145
147
|
buttonRef = _ref.buttonRef,
|
|
146
148
|
onActivate = _ref.onActivate,
|
|
147
149
|
onButtonBlur = _ref.onButtonBlur,
|
|
148
|
-
onButtonFocus = _ref.onButtonFocus
|
|
150
|
+
onButtonFocus = _ref.onButtonFocus,
|
|
151
|
+
props = _objectWithoutProperties(_ref, _excluded$1g);
|
|
149
152
|
var panelAttributes = {
|
|
150
153
|
className: clsx('utrecht-accordion__panel', {
|
|
151
154
|
'utrecht-accordion__panel--expanded': expanded
|
|
@@ -165,10 +168,11 @@ var AccordionSection = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
165
168
|
// content of the landmark to be the actual content, instead of starting
|
|
166
169
|
// with the button that controls the region.
|
|
167
170
|
// - we only want expanded sections to show up as landmarks
|
|
168
|
-
return jsxs("div", {
|
|
169
|
-
className: clsx('utrecht-accordion__section'),
|
|
171
|
+
return jsxs("div", _objectSpread$1h(_objectSpread$1h({
|
|
172
|
+
className: clsx('utrecht-accordion__section', className),
|
|
170
173
|
id: id,
|
|
171
|
-
ref: ref
|
|
174
|
+
ref: ref
|
|
175
|
+
}, props), {}, {
|
|
172
176
|
children: [jsx(Heading, {
|
|
173
177
|
level: headingLevel,
|
|
174
178
|
className: clsx('utrecht-accordion__header'),
|
|
@@ -199,7 +203,7 @@ var AccordionSection = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
199
203
|
})) : jsx("div", _objectSpread$1h(_objectSpread$1h({}, panelAttributes), {}, {
|
|
200
204
|
children: children
|
|
201
205
|
}))]
|
|
202
|
-
});
|
|
206
|
+
}));
|
|
203
207
|
});
|
|
204
208
|
AccordionSection.displayName = 'AccordionSection';
|
|
205
209
|
var Accordion = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
@@ -207,7 +211,7 @@ var Accordion = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
207
211
|
group = _ref2.group,
|
|
208
212
|
headingLevel = _ref2.headingLevel,
|
|
209
213
|
heading = _ref2.heading,
|
|
210
|
-
props = _objectWithoutProperties(_ref2,
|
|
214
|
+
props = _objectWithoutProperties(_ref2, _excluded2$7);
|
|
211
215
|
var headingId = useId();
|
|
212
216
|
return jsxs(Fragment, {
|
|
213
217
|
children: [!!heading && typeof headingLevel === 'number' && jsx(Heading, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n"],"names":[],"mappings":";;;;;;;;;AAAA,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE;AAC/B,EAAE,KAAK,GAAG,KAAK,KAAK,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC;AACjC,EAAE,IAAI,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;AAC9B;AACA,EAAE,IAAI,CAAC,GAAG,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,EAAE,OAAO,EAAE;AAC1D;AACA,EAAE,IAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AACvE,EAAE,IAAI,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;AAC9C,EAAE,KAAK,CAAC,IAAI,GAAG,UAAU,CAAC;AAC1B;AACA,EAAE,IAAI,QAAQ,KAAK,KAAK,EAAE;AAC1B,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE;AACzB,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;AAChD,KAAK,MAAM;AACX,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC9B,KAAK;AACL,GAAG,MAAM;AACT,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5B,GAAG;AACH;AACA,EAAE,IAAI,KAAK,CAAC,UAAU,EAAE;AACxB,IAAI,KAAK,CAAC,UAAU,CAAC,OAAO,GAAG,GAAG,CAAC;AACnC,GAAG,MAAM;AACT,IAAI,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC;AACpD,GAAG;AACH
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n"],"names":[],"mappings":";;;;;;;;;AAAA,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
|
package/dist/index.cjs.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
4
|
-
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
5
4
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
5
|
+
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
6
6
|
var react = require('react');
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
8
8
|
var clsx = require('clsx');
|
|
@@ -75,7 +75,8 @@ var Heading = /*#__PURE__*/react.forwardRef(function (_ref, ref) {
|
|
|
75
75
|
});
|
|
76
76
|
Heading.displayName = 'Heading';
|
|
77
77
|
|
|
78
|
-
var _excluded$1g = ["
|
|
78
|
+
var _excluded$1g = ["id", "label", "className", "headingLevel", "expanded", "disabled", "section", "children", "buttonRef", "onActivate", "onButtonBlur", "onButtonFocus"],
|
|
79
|
+
_excluded2$7 = ["children", "group", "headingLevel", "heading"];
|
|
79
80
|
function ownKeys$1h(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; }
|
|
80
81
|
function _objectSpread$1h(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1h(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1h(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
81
82
|
/**
|
|
@@ -107,6 +108,7 @@ var previousItem = function previousItem(items, item) {
|
|
|
107
108
|
var AccordionSection = /*#__PURE__*/react.forwardRef(function (_ref, ref) {
|
|
108
109
|
var id = _ref.id,
|
|
109
110
|
label = _ref.label,
|
|
111
|
+
className = _ref.className,
|
|
110
112
|
_ref$headingLevel = _ref.headingLevel,
|
|
111
113
|
headingLevel = _ref$headingLevel === void 0 ? 1 : _ref$headingLevel,
|
|
112
114
|
_ref$expanded = _ref.expanded,
|
|
@@ -117,7 +119,8 @@ var AccordionSection = /*#__PURE__*/react.forwardRef(function (_ref, ref) {
|
|
|
117
119
|
buttonRef = _ref.buttonRef,
|
|
118
120
|
onActivate = _ref.onActivate,
|
|
119
121
|
onButtonBlur = _ref.onButtonBlur,
|
|
120
|
-
onButtonFocus = _ref.onButtonFocus
|
|
122
|
+
onButtonFocus = _ref.onButtonFocus,
|
|
123
|
+
props = _objectWithoutProperties(_ref, _excluded$1g);
|
|
121
124
|
var panelAttributes = {
|
|
122
125
|
className: clsx('utrecht-accordion__panel', {
|
|
123
126
|
'utrecht-accordion__panel--expanded': expanded
|
|
@@ -137,10 +140,11 @@ var AccordionSection = /*#__PURE__*/react.forwardRef(function (_ref, ref) {
|
|
|
137
140
|
// content of the landmark to be the actual content, instead of starting
|
|
138
141
|
// with the button that controls the region.
|
|
139
142
|
// - we only want expanded sections to show up as landmarks
|
|
140
|
-
return jsxRuntime.jsxs("div", {
|
|
141
|
-
className: clsx('utrecht-accordion__section'),
|
|
143
|
+
return jsxRuntime.jsxs("div", _objectSpread$1h(_objectSpread$1h({
|
|
144
|
+
className: clsx('utrecht-accordion__section', className),
|
|
142
145
|
id: id,
|
|
143
|
-
ref: ref
|
|
146
|
+
ref: ref
|
|
147
|
+
}, props), {}, {
|
|
144
148
|
children: [jsxRuntime.jsx(Heading, {
|
|
145
149
|
level: headingLevel,
|
|
146
150
|
className: clsx('utrecht-accordion__header'),
|
|
@@ -171,7 +175,7 @@ var AccordionSection = /*#__PURE__*/react.forwardRef(function (_ref, ref) {
|
|
|
171
175
|
})) : jsxRuntime.jsx("div", _objectSpread$1h(_objectSpread$1h({}, panelAttributes), {}, {
|
|
172
176
|
children: children
|
|
173
177
|
}))]
|
|
174
|
-
});
|
|
178
|
+
}));
|
|
175
179
|
});
|
|
176
180
|
AccordionSection.displayName = 'AccordionSection';
|
|
177
181
|
var Accordion = /*#__PURE__*/react.forwardRef(function (_ref2, ref) {
|
|
@@ -179,7 +183,7 @@ var Accordion = /*#__PURE__*/react.forwardRef(function (_ref2, ref) {
|
|
|
179
183
|
group = _ref2.group,
|
|
180
184
|
headingLevel = _ref2.headingLevel,
|
|
181
185
|
heading = _ref2.heading,
|
|
182
|
-
props = _objectWithoutProperties(_ref2,
|
|
186
|
+
props = _objectWithoutProperties(_ref2, _excluded2$7);
|
|
183
187
|
var headingId = react.useId();
|
|
184
188
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
185
189
|
children: [!!heading && typeof headingLevel === 'number' && jsxRuntime.jsx(Heading, {
|
package/dist/index.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
2
|
-
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
2
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
3
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
4
4
|
import { forwardRef, useId, useRef, useState, createElement, isValidElement, useImperativeHandle, useEffect } from 'react';
|
|
5
5
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
6
6
|
import clsx from 'clsx';
|
|
@@ -73,7 +73,8 @@ var Heading = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
73
73
|
});
|
|
74
74
|
Heading.displayName = 'Heading';
|
|
75
75
|
|
|
76
|
-
var _excluded$1g = ["
|
|
76
|
+
var _excluded$1g = ["id", "label", "className", "headingLevel", "expanded", "disabled", "section", "children", "buttonRef", "onActivate", "onButtonBlur", "onButtonFocus"],
|
|
77
|
+
_excluded2$7 = ["children", "group", "headingLevel", "heading"];
|
|
77
78
|
function ownKeys$1h(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; }
|
|
78
79
|
function _objectSpread$1h(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1h(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1h(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
79
80
|
/**
|
|
@@ -105,6 +106,7 @@ var previousItem = function previousItem(items, item) {
|
|
|
105
106
|
var AccordionSection = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
106
107
|
var id = _ref.id,
|
|
107
108
|
label = _ref.label,
|
|
109
|
+
className = _ref.className,
|
|
108
110
|
_ref$headingLevel = _ref.headingLevel,
|
|
109
111
|
headingLevel = _ref$headingLevel === void 0 ? 1 : _ref$headingLevel,
|
|
110
112
|
_ref$expanded = _ref.expanded,
|
|
@@ -115,7 +117,8 @@ var AccordionSection = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
115
117
|
buttonRef = _ref.buttonRef,
|
|
116
118
|
onActivate = _ref.onActivate,
|
|
117
119
|
onButtonBlur = _ref.onButtonBlur,
|
|
118
|
-
onButtonFocus = _ref.onButtonFocus
|
|
120
|
+
onButtonFocus = _ref.onButtonFocus,
|
|
121
|
+
props = _objectWithoutProperties(_ref, _excluded$1g);
|
|
119
122
|
var panelAttributes = {
|
|
120
123
|
className: clsx('utrecht-accordion__panel', {
|
|
121
124
|
'utrecht-accordion__panel--expanded': expanded
|
|
@@ -135,10 +138,11 @@ var AccordionSection = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
135
138
|
// content of the landmark to be the actual content, instead of starting
|
|
136
139
|
// with the button that controls the region.
|
|
137
140
|
// - we only want expanded sections to show up as landmarks
|
|
138
|
-
return jsxs("div", {
|
|
139
|
-
className: clsx('utrecht-accordion__section'),
|
|
141
|
+
return jsxs("div", _objectSpread$1h(_objectSpread$1h({
|
|
142
|
+
className: clsx('utrecht-accordion__section', className),
|
|
140
143
|
id: id,
|
|
141
|
-
ref: ref
|
|
144
|
+
ref: ref
|
|
145
|
+
}, props), {}, {
|
|
142
146
|
children: [jsx(Heading, {
|
|
143
147
|
level: headingLevel,
|
|
144
148
|
className: clsx('utrecht-accordion__header'),
|
|
@@ -169,7 +173,7 @@ var AccordionSection = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
169
173
|
})) : jsx("div", _objectSpread$1h(_objectSpread$1h({}, panelAttributes), {}, {
|
|
170
174
|
children: children
|
|
171
175
|
}))]
|
|
172
|
-
});
|
|
176
|
+
}));
|
|
173
177
|
});
|
|
174
178
|
AccordionSection.displayName = 'AccordionSection';
|
|
175
179
|
var Accordion = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
@@ -177,7 +181,7 @@ var Accordion = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
177
181
|
group = _ref2.group,
|
|
178
182
|
headingLevel = _ref2.headingLevel,
|
|
179
183
|
heading = _ref2.heading,
|
|
180
|
-
props = _objectWithoutProperties(_ref2,
|
|
184
|
+
props = _objectWithoutProperties(_ref2, _excluded2$7);
|
|
181
185
|
var headingId = useId();
|
|
182
186
|
return jsxs(Fragment, {
|
|
183
187
|
children: [!!heading && typeof headingLevel === 'number' && jsx(Heading, {
|
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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