diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index ed39037314..10e87747f2 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -3,6 +3,35 @@ 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) + + +### 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..13f1b45502 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.1", "description": "Official monday.com UI resources for application development in React.js", "main": "./dist/main.js", "types": "./dist/types.d.ts", @@ -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\"", @@ -109,7 +108,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 +120,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/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; - } -); 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); } 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"; 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/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; 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": {