@digigov/react-core 0.23.0 → 0.23.1

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.
@@ -2,8 +2,6 @@
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
4
 
5
- var _typeof = require("@babel/runtime/helpers/typeof");
6
-
7
5
  Object.defineProperty(exports, "__esModule", {
8
6
  value: true
9
7
  });
@@ -11,11 +9,9 @@ exports["default"] = exports.AccordionSectionSummaryHeading = void 0;
11
9
 
12
10
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
11
 
14
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
15
-
16
12
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
17
13
 
18
- var _react = _interopRequireWildcard(require("react"));
14
+ var _react = _interopRequireDefault(require("react"));
19
15
 
20
16
  var _Base = _interopRequireDefault(require("@digigov/react-core/Base"));
21
17
 
@@ -23,10 +19,6 @@ var _clsx = _interopRequireDefault(require("clsx"));
23
19
 
24
20
  var _excluded = ["className", "children"];
25
21
 
26
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
27
-
28
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
29
-
30
22
  /**
31
23
  * AccordionSectionSummaryHeading should be placed inside AccordionSectionSummary.
32
24
  */
@@ -34,24 +26,12 @@ var AccordionSectionSummaryHeading = /*#__PURE__*/_react["default"].forwardRef(f
34
26
  var className = _ref.className,
35
27
  children = _ref.children,
36
28
  props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
37
-
38
- var toggleExpanded = function toggleExpanded() {
39
- setExpanded(!isExpanded);
40
- };
41
-
42
- var _useState = (0, _react.useState)(false),
43
- _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
44
- isExpanded = _useState2[0],
45
- setExpanded = _useState2[1];
46
-
47
29
  return /*#__PURE__*/_react["default"].createElement(_Base["default"], (0, _extends2["default"])({
48
30
  as: "h2",
49
31
  ref: ref,
50
32
  className: (0, _clsx["default"])(className, true && 'govgr-accordion__section-heading')
51
33
  }, props, {
52
- role: "button",
53
- "aria-expanded": isExpanded,
54
- onClick: toggleExpanded
34
+ role: "button"
55
35
  }), /*#__PURE__*/_react["default"].createElement("span", {
56
36
  className: (0, _clsx["default"])(true && 'govgr-accordion__section-button')
57
37
  }, children));
package/CHANGELOG.md CHANGED
@@ -1,6 +1,13 @@
1
1
  # Change Log - @digigov/react-core
2
2
 
3
- This log was last generated on Tue, 02 May 2023 09:16:06 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 16 May 2023 13:42:28 GMT and should not be manually modified.
4
+
5
+ ## 0.23.1
6
+ Tue, 16 May 2023 13:42:28 GMT
7
+
8
+ ### Patches
9
+
10
+ - Remove functionality from AccordionSectionSummaryHeading component
4
11
 
5
12
  ## 0.23.0
6
13
  Tue, 02 May 2023 09:16:06 GMT
@@ -1,8 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
3
  var _excluded = ["className", "children"];
5
- import React, { useState } from 'react';
4
+ import React from 'react';
6
5
  import Base from '@digigov/react-core/Base';
7
6
  import clsx from 'clsx';
8
7
 
@@ -14,23 +13,12 @@ export var AccordionSectionSummaryHeading = /*#__PURE__*/React.forwardRef(functi
14
13
  children = _ref.children,
15
14
  props = _objectWithoutProperties(_ref, _excluded);
16
15
 
17
- var toggleExpanded = function toggleExpanded() {
18
- setExpanded(!isExpanded);
19
- };
20
-
21
- var _useState = useState(false),
22
- _useState2 = _slicedToArray(_useState, 2),
23
- isExpanded = _useState2[0],
24
- setExpanded = _useState2[1];
25
-
26
16
  return /*#__PURE__*/React.createElement(Base, _extends({
27
17
  as: "h2",
28
18
  ref: ref,
29
19
  className: clsx(className, true && 'govgr-accordion__section-heading')
30
20
  }, props, {
31
- role: "button",
32
- "aria-expanded": isExpanded,
33
- onClick: toggleExpanded
21
+ role: "button"
34
22
  }), /*#__PURE__*/React.createElement("span", {
35
23
  className: clsx(true && 'govgr-accordion__section-button')
36
24
  }, children));
@@ -1,8 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
3
  var _excluded = ["className", "children"];
5
- import React, { useState } from 'react';
4
+ import React from 'react';
6
5
  import Base from '@digigov/react-core/Base';
7
6
  import clsx from 'clsx';
8
7
 
@@ -14,23 +13,12 @@ export var AccordionSectionSummaryHeading = /*#__PURE__*/React.forwardRef(functi
14
13
  children = _ref.children,
15
14
  props = _objectWithoutProperties(_ref, _excluded);
16
15
 
17
- var toggleExpanded = function toggleExpanded() {
18
- setExpanded(!isExpanded);
19
- };
20
-
21
- var _useState = useState(false),
22
- _useState2 = _slicedToArray(_useState, 2),
23
- isExpanded = _useState2[0],
24
- setExpanded = _useState2[1];
25
-
26
16
  return /*#__PURE__*/React.createElement(Base, _extends({
27
17
  as: "h2",
28
18
  ref: ref,
29
19
  className: clsx(className, true && 'govgr-accordion__section-heading')
30
20
  }, props, {
31
- role: "button",
32
- "aria-expanded": isExpanded,
33
- onClick: toggleExpanded
21
+ role: "button"
34
22
  }), /*#__PURE__*/React.createElement("span", {
35
23
  className: clsx(true && 'govgr-accordion__section-button')
36
24
  }, children));
package/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Digigov v0.23.0
1
+ /** @license Digigov v0.23.1
2
2
  *
3
3
  * This source code is licensed under the BSD-2-Clause license found in the
4
4
  * LICENSE file in the root directory of this source tree.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digigov/react-core",
3
- "version": "0.23.0",
3
+ "version": "0.23.1",
4
4
  "description": "@digigov react core components",
5
5
  "author": "GRNET Developers <devs@lists.grnet.gr>",
6
6
  "license": "BSD-2-Clause",
@@ -1,4 +1,4 @@
1
- import React, { useState } from 'react';
1
+ import React from 'react';
2
2
  import Base, { BaseProps } from '@digigov/react-core/Base';
3
3
  import clsx from 'clsx';
4
4
 
@@ -13,11 +13,6 @@ export const AccordionSectionSummaryHeading = React.forwardRef<
13
13
  { className, children, ...props },
14
14
  ref
15
15
  ) {
16
- const toggleExpanded = () => {
17
- setExpanded(!isExpanded);
18
- };
19
- const [isExpanded, setExpanded] = useState(false);
20
-
21
16
  return (
22
17
  <Base
23
18
  as="h2"
@@ -27,8 +22,6 @@ export const AccordionSectionSummaryHeading = React.forwardRef<
27
22
  })}
28
23
  {...props}
29
24
  role="button"
30
- aria-expanded={isExpanded}
31
- onClick={toggleExpanded}
32
25
  >
33
26
  <span
34
27
  className={clsx({