From 483c47fe26363ba54fa4fd4a1953c7cbcbac00a2 Mon Sep 17 00:00:00 2001 From: shaharzil Date: Wed, 24 Apr 2024 14:20:34 +0300 Subject: [PATCH 1/6] fix(Dialog): prevent default for contextmenu event (#2087) --- packages/core/src/components/Dialog/Dialog.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/core/src/components/Dialog/Dialog.tsx b/packages/core/src/components/Dialog/Dialog.tsx index f928deeb75..894e6f9943 100644 --- a/packages/core/src/components/Dialog/Dialog.tsx +++ b/packages/core/src/components/Dialog/Dialog.tsx @@ -457,6 +457,13 @@ export default class Dialog extends PureComponent { } onContextMenu(e: React.MouseEvent) { + const isShown = this.isShown(); + if ( + (this.isShowTrigger(HideShowEvent.CONTEXT_MENU) && !isShown) || + (this.isHideTrigger(HideShowEvent.CONTEXT_MENU) && isShown) + ) { + e.preventDefault(); + } this.handleEvent(HideShowEvent.CONTEXT_MENU, e.target, e); } From 5544b3adce00b2d5f2bc42163c4f549229c77765 Mon Sep 17 00:00:00 2001 From: ci Date: Wed, 24 Apr 2024 13:02:38 +0000 Subject: [PATCH 2/6] Publish - monday-ui-react-core@2.105.0 - vibe-storybook-components@0.18.2 - monday-ui-style@0.5.1 --- packages/core/CHANGELOG.md | 18 ++++++++++++++++++ packages/core/package.json | 6 +++--- packages/storybook-blocks/CHANGELOG.md | 8 ++++++++ packages/storybook-blocks/package.json | 2 +- packages/style/CHANGELOG.md | 8 ++++++++ packages/style/package.json | 2 +- 6 files changed, 39 insertions(+), 5 deletions(-) diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index ed39037314..0da36fdf57 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -3,6 +3,24 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.105.0](https://github.com/mondaycom/vibe/compare/monday-ui-react-core@2.104.0...monday-ui-react-core@2.105.0) (2024-04-24) + + +### Bug Fixes + +* **Dialog:** prevent default for contextmenu event ([#2087](https://github.com/mondaycom/vibe/issues/2087)) ([483c47f](https://github.com/mondaycom/vibe/commit/483c47fe26363ba54fa4fd4a1953c7cbcbac00a2)) +* increase specificity ([#2074](https://github.com/mondaycom/vibe/issues/2074)) ([f8e18cc](https://github.com/mondaycom/vibe/commit/f8e18cccbe95cb91c6616363074719ce82b6d5e6)) + + +### Features + +* **withLiveEdit:** apply decorators from within self CSF module of a story ([#2077](https://github.com/mondaycom/vibe/issues/2077)) ([6b1e520](https://github.com/mondaycom/vibe/commit/6b1e5200bd6e2cf8587aec80be78a2f76d2a3808)) +* **withLiveEdit:** parse render attribute with ast instead of with regex for variety of cases ([#2078](https://github.com/mondaycom/vibe/issues/2078)) ([57ad30d](https://github.com/mondaycom/vibe/commit/57ad30d631f97ca055d2397edb12df21ae981ac0)) + + + + + # [2.104.0](https://github.com/mondaycom/monday-ui-react-core/compare/monday-ui-react-core@2.103.1...monday-ui-react-core@2.104.0) (2024-04-18) diff --git a/packages/core/package.json b/packages/core/package.json index b45c445c71..529c08b7b4 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "monday-ui-react-core", - "version": "2.104.0", + "version": "2.105.0", "description": "Official monday.com UI resources for application development in React.js", "main": "./dist/main.js", "types": "./dist/types.d.ts", @@ -109,7 +109,7 @@ "classnames": "^2.3.2", "framer-motion": "^6.5.1", "lodash-es": "^4.17.21", - "monday-ui-style": "0.5.0", + "monday-ui-style": "0.5.1", "prop-types": "^15.8.1", "react-dates": "21.8.0", "react-inlinesvg": "^3.0.1", @@ -121,7 +121,7 @@ "react-window": "^1.8.7", "react-windowed-select": "^2.0.4", "style-inject": "^0.3.0", - "vibe-storybook-components": "0.18.1" + "vibe-storybook-components": "0.18.2" }, "devDependencies": { "@babel/core": "^7.23.2", diff --git a/packages/storybook-blocks/CHANGELOG.md b/packages/storybook-blocks/CHANGELOG.md index deb9293c40..abe01b822f 100644 --- a/packages/storybook-blocks/CHANGELOG.md +++ b/packages/storybook-blocks/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.18.2](https://github.com/mondaycom/vibe/compare/vibe-storybook-components@0.18.1...vibe-storybook-components@0.18.2) (2024-04-24) + +**Note:** Version bump only for package vibe-storybook-components + + + + + ## [0.18.1](https://github.com/mondaycom/monday-ui-react-core/compare/vibe-storybook-components@0.18.0...vibe-storybook-components@0.18.1) (2024-04-10) **Note:** Version bump only for package vibe-storybook-components diff --git a/packages/storybook-blocks/package.json b/packages/storybook-blocks/package.json index a61a15f7be..442a227bbf 100644 --- a/packages/storybook-blocks/package.json +++ b/packages/storybook-blocks/package.json @@ -1,6 +1,6 @@ { "name": "vibe-storybook-components", - "version": "0.18.1", + "version": "0.18.2", "description": "Collection of Vibe's Storybook components", "license": "MIT", "repository": { diff --git a/packages/style/CHANGELOG.md b/packages/style/CHANGELOG.md index 69074bc44e..675b60f6a4 100644 --- a/packages/style/CHANGELOG.md +++ b/packages/style/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [0.5.1](https://github.com/mondaycom/vibe/compare/monday-ui-style@0.5.0...monday-ui-style@0.5.1) (2024-04-24) + +**Note:** Version bump only for package monday-ui-style + + + + + # [0.5.0](https://github.com/mondaycom/monday-ui-react-core/compare/monday-ui-style@0.4.2...monday-ui-style@0.5.0) (2024-04-18) diff --git a/packages/style/package.json b/packages/style/package.json index d2c7ec7f8c..29d1c95b3d 100644 --- a/packages/style/package.json +++ b/packages/style/package.json @@ -1,6 +1,6 @@ { "name": "monday-ui-style", - "version": "0.5.0", + "version": "0.5.1", "description": "Monday UI CSS Foundations", "main": "dist/index.css", "scripts": { From a0d56d3704d2eeaa704a6b4e0743111cdd9e4537 Mon Sep 17 00:00:00 2001 From: Tal Koren Date: Wed, 24 Apr 2024 16:23:44 +0300 Subject: [PATCH 3/6] fix: export Search from next (#2088) --- packages/core/src/next/next.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/core/src/next/next.ts b/packages/core/src/next/next.ts index 3dab68e7b2..8cd5171e77 100644 --- a/packages/core/src/next/next.ts +++ b/packages/core/src/next/next.ts @@ -1,2 +1,3 @@ export { default as Heading } from "../components/Heading/Heading"; export { default as EditableHeading } from "../components/EditableHeading/EditableHeading"; +export { default as Search } from "../components/Search/Search"; From 01b0d085616eee28d07f0b09483ef759409d56da Mon Sep 17 00:00:00 2001 From: ci Date: Wed, 24 Apr 2024 13:51:33 +0000 Subject: [PATCH 4/6] Publish - monday-ui-react-core@2.105.1 --- packages/core/CHANGELOG.md | 11 +++++++++++ packages/core/package.json | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 0da36fdf57..10e87747f2 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.105.1](https://github.com/mondaycom/vibe/compare/monday-ui-react-core@2.105.0...monday-ui-react-core@2.105.1) (2024-04-24) + + +### Bug Fixes + +* export Search from next ([#2088](https://github.com/mondaycom/vibe/issues/2088)) ([a0d56d3](https://github.com/mondaycom/vibe/commit/a0d56d3704d2eeaa704a6b4e0743111cdd9e4537)) + + + + + # [2.105.0](https://github.com/mondaycom/vibe/compare/monday-ui-react-core@2.104.0...monday-ui-react-core@2.105.0) (2024-04-24) diff --git a/packages/core/package.json b/packages/core/package.json index 529c08b7b4..31bad5ff70 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "monday-ui-react-core", - "version": "2.105.0", + "version": "2.105.1", "description": "Official monday.com UI resources for application development in React.js", "main": "./dist/main.js", "types": "./dist/types.d.ts", From 32ae49b512422a8de126b048fe5668e07003cb8c Mon Sep 17 00:00:00 2001 From: Tal Koren Date: Thu, 25 Apr 2024 11:49:28 +0300 Subject: [PATCH 5/6] chore: remove unused script (#2089) --- packages/core/package.json | 1 - .../core/scripts/add-forward-ref-icons.js | 44 ------------------- 2 files changed, 45 deletions(-) delete mode 100644 packages/core/scripts/add-forward-ref-icons.js diff --git a/packages/core/package.json b/packages/core/package.json index 31bad5ff70..13f1b45502 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -78,7 +78,6 @@ "chromatic:local": "chromatic -t $CHROMATIC_PROJECT_TOKEN", "link-local": "npm link && npm start", "plop": "plop", - "add-ref-to-icons": "node ./scripts/add-forward-ref-icons.js", "lint": "eslint \"./src/**/*.{js,jsx,ts,tsx}\"", "lint:fix": "yarn lint -- --fix", "stylelint": "stylelint \"**/*.scss\"", diff --git a/packages/core/scripts/add-forward-ref-icons.js b/packages/core/scripts/add-forward-ref-icons.js deleted file mode 100644 index 75d5f32e57..0000000000 --- a/packages/core/scripts/add-forward-ref-icons.js +++ /dev/null @@ -1,44 +0,0 @@ -var fs = require("fs"); - -const startReplaceOrigin = "({size, ...props}) => ("; -const startReplaceReplaced = " React.forwardRef(({size, ...props}, ref) => ("; -const replaceRefOrigin = "{...props}>"; -const replaceRefReplaced = "{...props} ref={ref}>"; -const endReplaceOrigin = ");"; -const endReplaceReplaced = "));"; - -function readFiles(dirname, onFileContent, onError) { - fs.readdir(dirname, function(err, filenames) { - if (err) { - onError(err); - return; - } - filenames.forEach(function(filename) { - fs.readFile(dirname + filename, "utf-8", function(err, content) { - if (err) { - onError(err); - return; - } - onFileContent(filename, content); - }); - }); - }); -} -const dirName = "src/components/Icon/Icons/components/"; -readFiles( - dirName, - function(filename, content) { - console.log("optimizing:: ", filename); - const newContent = content - .replace(replaceRefOrigin, replaceRefReplaced) - .replace(startReplaceOrigin, startReplaceReplaced) - .replace(endReplaceOrigin, endReplaceReplaced); - - fs.writeFile(`${dirName}/${filename}`, newContent, "utf8", function(err) { - if (err) return console.log(err); - }); - }, - function(err) { - throw err; - } -); From 5485d6e7284fa5a91f994e5a3d221fa3d1566391 Mon Sep 17 00:00:00 2001 From: Yossi Saadi Date: Tue, 30 Apr 2024 11:59:18 +0300 Subject: [PATCH 6/6] fix(types): Decorator type should be taken from storybook, not custom (#2090) --- .../createStoryMetaSettings/createStoryMetaSettings.ts | 3 ++- .../src/functions/createStoryMetaSettings/types.ts | 6 ++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/storybook-blocks/src/functions/createStoryMetaSettings/createStoryMetaSettings.ts b/packages/storybook-blocks/src/functions/createStoryMetaSettings/createStoryMetaSettings.ts index 5bef6ea0e5..5feee95e2c 100644 --- a/packages/storybook-blocks/src/functions/createStoryMetaSettings/createStoryMetaSettings.ts +++ b/packages/storybook-blocks/src/functions/createStoryMetaSettings/createStoryMetaSettings.ts @@ -1,7 +1,8 @@ import { useCallback, useMemo, useState } from 'react'; import { action } from '@storybook/addon-actions'; -import { AllowedIcons, Decorator, IconMetaData, StoryMetaSettingsArgs, StoryMetaSettingsResult } from './types'; +import { AllowedIcons, IconMetaData, StoryMetaSettingsArgs, StoryMetaSettingsResult } from './types'; import { ArgTypes } from '@storybook/types'; +import { Decorator } from '@storybook/react'; function parseStringForEnums(componentName: string, enumName: string, enumObj: { [key: string]: unknown }) { let returnValue; diff --git a/packages/storybook-blocks/src/functions/createStoryMetaSettings/types.ts b/packages/storybook-blocks/src/functions/createStoryMetaSettings/types.ts index e09d01aac0..f384eabfd7 100644 --- a/packages/storybook-blocks/src/functions/createStoryMetaSettings/types.ts +++ b/packages/storybook-blocks/src/functions/createStoryMetaSettings/types.ts @@ -1,4 +1,5 @@ -import { ArgTypes, PartialStoryFn, StoryContext } from '@storybook/types'; +import { ArgTypes } from '@storybook/types'; +import { Decorator } from '@storybook/react'; export type EnumPropNames = { propName: string; @@ -20,9 +21,6 @@ export type AllowedIcons = { mapping: { [key: string]: unknown }; }; -// eslint-disable-next-line @typescript-eslint/no-explicit-any -export type Decorator = (story: PartialStoryFn, context: StoryContext) => { storyResult: any }; - export type StoryMetaSettingsArgs = { // eslint-disable-next-line @typescript-eslint/no-explicit-any component: any;