@janiscommerce/ui-web 1.5.0-beta.8 → 1.6.0-beta.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.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,42 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.6.0-beta.1] - 2026-01-06
11
+
12
+ ### Added
13
+
14
+ - isExpanding state, data-is-expanding attribute to Collapse component
15
+
16
+ ## [1.6.0] - 2025-11-28
17
+
18
+ ### Added
19
+
20
+ - npm-publish-beta workflow for pre-release tags (_-beta_, _-alpha_, _-rc_)
21
+
22
+ ### Changed
23
+
24
+ - Webpack 5 compatibility: added explicit `require` mapping in package.json exports field
25
+ - Peer dependencies: updated React/React-DOM to support `^16.8.0 || ^17.0.0 || ^18.0.0`
26
+ - package.json: added `module` field for better tree-shaking support
27
+ - package.json exports: now provides both `import` (ESM) and `require` (CommonJS) mappings
28
+ - rollup config: dist/package.json now includes `module` and `exports` fields for consistency
29
+ - GitHub Actions workflows: updated Node.js versions from 12.x/14.x (EOL) to 18.x/20.x (LTS)
30
+ - GitHub Actions: updated all action versions from v1/v2 to v4
31
+ - GitHub Actions: added yarn cache to improve CI/CD performance
32
+ - react-collapsed: now bundled within ui-web to prevent version conflicts with consuming projects
33
+ - rollup config: excludes bundled dependencies from dist/package.json
34
+
35
+ ### Fixed
36
+
37
+ - react-collapsed dependency: moved from peerDependencies to dependencies and bundled to avoid version conflicts
38
+ - Package structure: removed duplicate package.json generation in dist folder to avoid conflicts when publishing
39
+ - Error optional chain with plugins
40
+ - Add mjs extension in plugins
41
+
42
+ ## [1.5.0] - 2025-11-27
43
+
44
+ - Added `chevron_down` and `chevron_up` icons as available options for Collapse component toggle icons
45
+
10
46
  ## [1.5.0-beta.8] - 2025-11-26
11
47
 
12
48
  ### Changed
package/dist/index.esm.js CHANGED
@@ -36260,7 +36260,7 @@ var styled = {
36260
36260
  ContentWrapper: ContentWrapper
36261
36261
  };
36262
36262
 
36263
- var AVAILABLE_ICONS = ['minus_big_light', 'plus_big_light', 'arrow_down_flat', 'arrow_up_flat'];
36263
+ var AVAILABLE_ICONS = ['minus_big_light', 'plus_big_light', 'arrow_down_flat', 'arrow_up_flat', 'chevron_down', 'chevron_up'];
36264
36264
  var DEFAULT_TOGGLE_ICON = {
36265
36265
  iconNames: {
36266
36266
  opened: 'minus_big_light',
@@ -36303,14 +36303,25 @@ var Collapse = function Collapse(_ref) {
36303
36303
  isOpenState = _useState2[0],
36304
36304
  setIsOpenState = _useState2[1];
36305
36305
 
36306
+ var _useState3 = useState(isOpenState),
36307
+ _useState4 = _slicedToArray(_useState3, 2),
36308
+ isExpanding = _useState4[0],
36309
+ setIsExpanding = _useState4[1];
36310
+
36306
36311
  var collapseState = useMemo(function () {
36307
36312
  return {
36308
- expandStart: expandStartHandler,
36313
+ expandStart: function expandStart() {
36314
+ setIsExpanding(true);
36315
+ expandStartHandler();
36316
+ },
36309
36317
  expanding: expandingHandler,
36310
36318
  expandEnd: expandEndHandler,
36311
36319
  collapseStart: collapseStartHandler,
36312
36320
  collapsing: collapsingHandler,
36313
- collapseEnd: collapseEndHandler
36321
+ collapseEnd: function collapseEnd() {
36322
+ collapseEndHandler();
36323
+ setIsExpanding(false);
36324
+ }
36314
36325
  };
36315
36326
  }, [expandStartHandler, expandingHandler, expandEndHandler, collapseStartHandler, collapsingHandler, collapseEndHandler]);
36316
36327
 
@@ -36359,11 +36370,10 @@ var Collapse = function Collapse(_ref) {
36359
36370
  if (!renderHeader || !isFunction(renderHeader) || !renderContent || !isFunction(renderContent)) return null;
36360
36371
  return /*#__PURE__*/React__default.createElement(styled.Wrapper, {
36361
36372
  className: "collapse",
36362
- isOpen: isOpenState
36373
+ "data-is-expanding": isExpanding
36363
36374
  }, /*#__PURE__*/React__default.createElement(styled.HeaderWrapper, _extends$1({
36364
36375
  className: "collapse__header"
36365
36376
  }, getToggleProps(togglePropsParams), {
36366
- isOpen: isOpenState,
36367
36377
  position: position
36368
36378
  }), /*#__PURE__*/React__default.createElement(styled.CollapseButton, buttonProps), renderHeader()), /*#__PURE__*/React__default.createElement("div", getCollapseProps(), /*#__PURE__*/React__default.createElement(styled.ContentWrapper, {
36369
36379
  className: "collapse__content",