@janiscommerce/ui-web 1.7.0-beta.2 → 1.7.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 CHANGED
@@ -7,17 +7,17 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
- ## [1.7.0-beta.2] - 2026-01-06
10
+ ## [1.7.0] - 2026-01-12
11
11
 
12
12
  ### Added
13
13
 
14
- - ref to wrapper element in Collapse component, data-is-opened attribute to handle Collapse opening and closing
14
+ - ref to wrapper element in Collapse component
15
+ - data-is-opened attribute to handle Collapse opening and closing states dynamically
15
16
 
16
- ## [1.6.0-beta.1] - 2026-01-06
17
-
18
- ### Added
17
+ ### Changed
19
18
 
20
- - isExpanding state, data-is-expanding attribute to Collapse component
19
+ - Refactored collapseState useMemo to include data-is-opened attribute updates in expandStart and collapseEnd handlers
20
+ - Removed isOpen prop from styled.Wrapper and styled.HeaderWrapper components in favor of data-is-opened attribute
21
21
 
22
22
  ## [1.6.0] - 2025-11-28
23
23
 
package/dist/index.esm.js CHANGED
@@ -36305,10 +36305,11 @@ var Collapse = function Collapse(_ref) {
36305
36305
  setIsOpenState = _useState2[1];
36306
36306
 
36307
36307
  var collapseState = useMemo(function () {
36308
- var collapseElement = collapseRef.current;
36309
36308
  return {
36310
36309
  expandStart: function expandStart() {
36311
- collapseElement.setAttribute('data-is-opened', true);
36310
+ var _collapseRef$current;
36311
+
36312
+ (_collapseRef$current = collapseRef.current) === null || _collapseRef$current === void 0 || _collapseRef$current.setAttribute('data-is-opened', String(true));
36312
36313
  expandStartHandler();
36313
36314
  },
36314
36315
  expanding: expandingHandler,
@@ -36316,8 +36317,10 @@ var Collapse = function Collapse(_ref) {
36316
36317
  collapseStart: collapseStartHandler,
36317
36318
  collapsing: collapsingHandler,
36318
36319
  collapseEnd: function collapseEnd() {
36320
+ var _collapseRef$current2;
36321
+
36319
36322
  collapseEndHandler();
36320
- collapseElement.setAttribute('data-is-opened', false);
36323
+ (_collapseRef$current2 = collapseRef.current) === null || _collapseRef$current2 === void 0 || _collapseRef$current2.setAttribute('data-is-opened', String(false));
36321
36324
  }
36322
36325
  };
36323
36326
  }, [expandStartHandler, expandingHandler, expandEndHandler, collapseStartHandler, collapsingHandler, collapseEndHandler]);
@@ -36362,7 +36365,9 @@ var Collapse = function Collapse(_ref) {
36362
36365
  disabled: disabled
36363
36366
  };
36364
36367
  useEffect(function () {
36365
- collapseRef.current.setAttribute('data-is-opened', isOpenState);
36368
+ var _collapseRef$current3;
36369
+
36370
+ if (collapseRef.current) (_collapseRef$current3 = collapseRef.current) === null || _collapseRef$current3 === void 0 || _collapseRef$current3.setAttribute('data-is-opened', String(isOpen));
36366
36371
  setIsOpenState(isOpen);
36367
36372
  }, [isOpen]);
36368
36373
  if (!renderHeader || !isFunction(renderHeader) || !renderContent || !isFunction(renderContent)) return null;