From c27d1318fa79cbef3718f4ae21f96e69b929bcf8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Goran=20Alkovi=C4=87?=
<77000136+goranalkovic-infinum@users.noreply.github.com>
Date: Thu, 29 Feb 2024 10:00:40 +0100
Subject: [PATCH 1/5] Revert "Frontend libs 9.5.0"
---
CHANGELOG.md | 16 +--
package.json | 28 ++---
scripts/components/collapsable/collapsable.js | 11 +-
.../color-picker-component.js | 19 +--
.../color-picker-component.scss | 13 ++
.../{toggle => icon-toggle}/docs/readme.mdx | 4 +-
.../{toggle => icon-toggle}/docs/story.js | 18 +--
.../toggle.js => icon-toggle/icon-toggle.js} | 15 +--
scripts/components/index.js | 2 +-
.../components/number-picker/number-picker.js | 109 +++++++---------
.../number-picker/number-picker.scss | 49 +++-----
.../responsive-number-picker.js | 41 +++---
scripts/editor/icons/icons.js | 7 +-
scripts/index.js | 2 +-
styles/es-component-styles.scss | 1 +
.../es-gutenberg-component-style-updates.scss | 2 +-
styles/es-utility-classes.scss | 119 +++++-------------
17 files changed, 168 insertions(+), 288 deletions(-)
create mode 100644 scripts/components/color-picker-component/color-picker-component.scss
rename scripts/components/{toggle => icon-toggle}/docs/readme.mdx (94%)
rename scripts/components/{toggle => icon-toggle}/docs/story.js (92%)
rename scripts/components/{toggle/toggle.js => icon-toggle/icon-toggle.js} (91%)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5bbfe139f..f00102117 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,26 +4,12 @@ All notable changes to this project will be documented in this file.
This projects adheres to [Semantic Versioning](https://semver.org/) and [Keep a CHANGELOG](https://keepachangelog.com/).
-## [9.5.0] - 2024-02-29
-
-### Added
-- New `es-size`, `es-min-size`, and `es-max-size` (+ `-nested` variants) utility classes for setting height and width at once
-- New `prefix`, `suffix`, `extraButton`, and `noExtraButtonSeparator` props in `NumberPicker`
-- `Collapsable` now has a `disabled` prop to disable the expand/collapse button
-- 1 new UI icon
+## [9.5.0] - 2024-02-21
### Updated
-- `NumberPicker` has been completely updated visually
-- `ResponsiveNumberPicker` now better visually integrates the reset button
- Fixed block renaming (due to recent Gutenberg changes)
- `LinkInput` should now pop the suggestion panel only when focused into the input field
- Fixed typo in `MultiSelect` story
-- Tweaked Gutenberg override classes for `NumberControl` so they don't override FE libs `NumberPicker`
-- Utility classes now use logical properties for paddings, margins, borders, widths, and heights
-- `IconToggle` is now `Toggle`, but the previous name will also work (for now)
-- Refreshed 3 UI icons
-- Updated dependencies
-- `ColorPicker` now has a slot for additional controls
## [9.4.2] - 2024-02-21
diff --git a/package.json b/package.json
index dad607cc7..20a644e36 100644
--- a/package.json
+++ b/package.json
@@ -51,10 +51,10 @@
"@infinumjs/eslint-config-react-js": "^3.5.0",
"@stylistic/stylelint-plugin": "^2.1.0",
"@uidotdev/usehooks": "^2.4.1",
- "@wordpress/api-fetch": "^6.49.0",
- "@wordpress/block-editor": "^12.20.0",
- "@wordpress/dependency-extraction-webpack-plugin": "^5.3.0",
- "@wordpress/dom-ready": "^3.52.0",
+ "@wordpress/api-fetch": "^6.48.0",
+ "@wordpress/block-editor": "^12.19.1",
+ "@wordpress/dependency-extraction-webpack-plugin": "^5.2.0",
+ "@wordpress/dom-ready": "^3.51.0",
"autoprefixer": "^10.4.17",
"babel-loader": "^9.1.3",
"browser-sync": "^3.0.2",
@@ -64,7 +64,7 @@
"crypto-browserify": "^3.12.0",
"css-loader": "^6.10.0",
"css-minimizer-webpack-plugin": "^6.0.0",
- "eslint": "^8.57.0",
+ "eslint": "^8.56.0",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
@@ -78,9 +78,9 @@
"just-kebab-case": "^4.2.0",
"just-throttle": "^4.2.0",
"media-blender": "^2.1.0",
- "mini-css-extract-plugin": "^2.8.1",
+ "mini-css-extract-plugin": "^2.8.0",
"postcss": "^8.4.35",
- "postcss-loader": "^8.1.1",
+ "postcss-loader": "^8.1.0",
"postcss-scss": "^4.0.9",
"promisify-child-process": "^4.1.2",
"raw-loader": "^4.0.2",
@@ -91,9 +91,9 @@
"react-html-parser": "^2.0.2",
"react-select": "^5.8.0",
"regenerator-runtime": "^0.14.1",
- "sass": "^1.71.1",
- "sass-loader": "^14.1.1",
- "storybook": "^7.6.17",
+ "sass": "^1.71.0",
+ "sass-loader": "^14.1.0",
+ "storybook": "^7.6.16",
"stream-browserify": "^3.0.0",
"style-loader": "^3.3.4",
"stylelint": "^16.2.1",
@@ -106,7 +106,7 @@
"webpack-merge": "^5.10.0"
},
"devDependencies": {
- "@babel/preset-env": "^7.24.0",
+ "@babel/preset-env": "^7.23.9",
"@eightshift/storybook": "^1.6.1",
"@jest/globals": "^29.7.0",
"babel-jest": "^29.7.0",
@@ -116,11 +116,11 @@
"jest-environment-jsdom": "^29.7.0",
"lint-staged": "^15.2.2",
"micromodal": "^0.4.10",
- "ol": "^9.0.0",
- "ol-mapbox-style": "^12.2.1",
+ "ol": "^8.2.0",
+ "ol-mapbox-style": "^12.2.0",
"react-test-renderer": "^18.2.0",
"replace-in-file": "^7.1.0",
- "swiper": "^11.0.7"
+ "swiper": "^11.0.6"
},
"sideEffects": false,
"lint-staged": {
diff --git a/scripts/components/collapsable/collapsable.js b/scripts/components/collapsable/collapsable.js
index 8bd131cf7..f6a87028b 100644
--- a/scripts/components/collapsable/collapsable.js
+++ b/scripts/components/collapsable/collapsable.js
@@ -16,7 +16,7 @@ import { icons, AnimatedContentVisibility, Control, classnames } from '@eightshi
* @param {string?} [props.additionalClasses] - If passed, the classes are appended to the component classes.
* @param {React.Component?} [props.actions] - Actions to show to the right of the label.
* @param {boolean} [props.keepActionsOnExpand=false] - If `true`, the actions are kept visible when the component is expanded.
- * @param {boolean} [props.disabled=false] - If `true`, the expand button is disabled.
+ * @returns
*/
export const Collapsable = ({
icon,
@@ -32,15 +32,9 @@ export const Collapsable = ({
actions,
keepActionsOnExpand = false,
-
- disabled = false,
}) => {
const [isOpen, setIsOpen] = useState(false);
- if (disabled && isOpen) {
- setIsOpen(false);
- }
-
return (
diff --git a/scripts/components/color-picker-component/color-picker-component.js b/scripts/components/color-picker-component/color-picker-component.js
index 806c66216..55d6287b5 100644
--- a/scripts/components/color-picker-component/color-picker-component.js
+++ b/scripts/components/color-picker-component/color-picker-component.js
@@ -37,7 +37,6 @@ import { ColorPalette } from '../color-palette-custom/color-palette-custom';
* @param {React.Component?} [props.buttonIconOverride] - If provided, overrides the default trigger button icon.
* @param {object?} [props.additionalButtonArgs] - Allows passing additional arguments to the trigger button.
* @param {object?} [props.additionalColorPaletteArgs] - Allows passing additional arguments to the color palette component.
- * @param {React.Component?} [props.additionalControls] - Allows passing custom controls to the bottom of ColorPicker's popover.
*/
export const ColorPicker = (props) => {
const {
@@ -73,8 +72,6 @@ export const ColorPicker = (props) => {
buttonIconOverride,
additionalButtonArgs,
additionalColorPaletteArgs,
-
- additionalControls,
} = props;
let defaultPopupTitle = __('Pick a color', 'eightshift-frontend-libs');
@@ -182,8 +179,8 @@ export const ColorPicker = (props) => {
allowCloseFromChildren
noArrow
>
-
-
+
+
{pickerPopupTitle ?? defaultPopupTitle}
-
-
+
{
/>
- {additionalControls &&
-
- {additionalControls}
-
- }
-
{canReset &&
-
+