diff --git a/CHANGELOG.md b/CHANGELOG.md index 47c45e8d..23cd98ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [3.11.0](https://github.com/gravity-ui/components/compare/v3.10.1...v3.11.0) (2024-10-14) + + +### Features + +* **Stories:** Add content property ([#225](https://github.com/gravity-ui/components/issues/225)) ([3b59e08](https://github.com/gravity-ui/components/commit/3b59e088ff420dc7b078962afd9465c0c0e8494e)) + + +### Bug Fixes + +* update universal-cookie ([#227](https://github.com/gravity-ui/components/issues/227)) ([5f0b471](https://github.com/gravity-ui/components/commit/5f0b47100804bd9d61a95abb8e0566d596478681)) + ## [3.10.1](https://github.com/gravity-ui/components/compare/v3.10.0...v3.10.1) (2024-09-12) diff --git a/package-lock.json b/package-lock.json index 1045ce5d..1c4fc27f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@gravity-ui/components", - "version": "3.10.1", + "version": "3.11.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@gravity-ui/components", - "version": "3.10.1", + "version": "3.11.0", "license": "MIT", "dependencies": { "@bem-react/classname": "^1.6.0", @@ -15,7 +15,7 @@ "@gravity-ui/icons": "^2.8.1", "lodash": "^4.17.21", "resize-observer-polyfill": "^1.5.1", - "universal-cookie": "^6.1.3" + "universal-cookie": "^7.2.0" }, "devDependencies": { "@babel/preset-env": "^7.23.9", @@ -10206,6 +10206,7 @@ "version": "0.6.0", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", + "dev": true, "engines": { "node": ">= 0.6" } @@ -27365,12 +27366,20 @@ } }, "node_modules/universal-cookie": { - "version": "6.1.3", - "resolved": "https://registry.npmjs.org/universal-cookie/-/universal-cookie-6.1.3.tgz", - "integrity": "sha512-AETYRrhpRgl9T1YtnODmQE32G81U3A+f3HO3ZeK7efbXqe3x+RNOW4RTpV0iff7zJWhGYJA6EI0Mm+w50aFTAw==", + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/universal-cookie/-/universal-cookie-7.2.1.tgz", + "integrity": "sha512-GEKneQ0sz8qbobkYM5s9elAx6l7GQDNVl3Siqmc7bt/YccyyXWDPn+fht3J1qMcaLwPrzkty3i+dNfPGP2/9hA==", "dependencies": { "@types/cookie": "^0.6.0", - "cookie": "^0.6.0" + "cookie": "^0.7.2" + } + }, + "node_modules/universal-cookie/node_modules/cookie": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", + "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", + "engines": { + "node": ">= 0.6" } }, "node_modules/universalify": { diff --git a/package.json b/package.json index 56300b27..846387d5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@gravity-ui/components", - "version": "3.10.1", + "version": "3.11.0", "description": "", "license": "MIT", "main": "./build/cjs/index.js", @@ -45,7 +45,7 @@ "@gravity-ui/icons": "^2.8.1", "lodash": "^4.17.21", "resize-observer-polyfill": "^1.5.1", - "universal-cookie": "^6.1.3" + "universal-cookie": "^7.2.0" }, "devDependencies": { "@babel/preset-env": "^7.23.9", diff --git a/src/components/ActionsPanel/ActionsPanel.tsx b/src/components/ActionsPanel/ActionsPanel.tsx index b7db93ff..61bf3492 100644 --- a/src/components/ActionsPanel/ActionsPanel.tsx +++ b/src/components/ActionsPanel/ActionsPanel.tsx @@ -13,6 +13,8 @@ import './ActionsPanel.scss'; const b = block('actions-panel'); +// eslint-disable-next-line valid-jsdoc +/** @deprecated it's been moved to `@gravity-ui/uikit`. It's available there since version 6.30.0 */ export const ActionsPanel = ({className, actions, onClose, renderNote}: ActionsPanelProps) => { return (
diff --git a/src/components/ActionsPanel/README.md b/src/components/ActionsPanel/README.md index 17706da7..f2103333 100644 --- a/src/components/ActionsPanel/README.md +++ b/src/components/ActionsPanel/README.md @@ -1,4 +1,6 @@ -# ActionsPanel +# ⚠️[DEPRECATED] ActionsPanel + +⚠️ It's been moved to `@gravity-ui/uikit`. It's available there since version 6.30.0 ## Usage diff --git a/src/components/Stories/README.md b/src/components/Stories/README.md index 8c0c1191..0680ca46 100644 --- a/src/components/Stories/README.md +++ b/src/components/Stories/README.md @@ -18,12 +18,12 @@ Component for displaying stories. It looks like a carousel in a modal with given ### StoriesItem object -| Field | Type | Required | Default | Description | -| ----------- | ------------------ | -------- | ------- | -------------------------------- | -| title | `String` | | | Title | -| description | `String` | | | Main text | -| url | `String` | | | Link to display more information | -| media | `StoriesItemMedia` | | | Media content | +| Field | Type | Required | Default | Description | +| ------- | ------------------ | -------- | ------- | -------------------------------- | +| title | `String` | | | Title | +| content | `React.ReactNode` | | | Main content | +| url | `String` | | | Link to display more information | +| media | `StoriesItemMedia` | | | Media content | ### StoriesItemMedia object @@ -41,7 +41,7 @@ Component for displaying stories. It looks like a carousel in a modal with given items={[ { title: 'Story title', - description: 'Story text', + content: Story text, media: { url: 'https://storage.yandexcloud.net/uikit-storybook-assets/story-picture-2.png', }, diff --git a/src/components/Stories/__stories__/Stories.stories.tsx b/src/components/Stories/__stories__/Stories.stories.tsx index bb0ca091..83025dc9 100644 --- a/src/components/Stories/__stories__/Stories.stories.tsx +++ b/src/components/Stories/__stories__/Stories.stories.tsx @@ -15,7 +15,7 @@ export default { const items: StoriesItem[] = [ { title: 'New navigation', - description: + content: 'At the top of the panel is the service navigation for each service. ' + 'Below are common navigation elements: a component for switching between accounts ' + 'and organizations, settings, help center, search, notifications, favorites.', @@ -26,7 +26,7 @@ const items: StoriesItem[] = [ }, { title: 'New navigation (2)', - description: 'A little more about the new navigation', + content: 'A little more about the new navigation', media: { url: 'https://storage.yandexcloud.net/uikit-storybook-assets/sample_960x400_ocean_with_audio.mp4', type: 'video', @@ -34,7 +34,7 @@ const items: StoriesItem[] = [ }, { title: 'New navigation (3)', - description: 'Switch to the new navigation right now', + content: Switch to the new navigation right now, media: { url: 'https://storage.yandexcloud.net/uikit-storybook-assets/story-picture-4.png', }, diff --git a/src/components/Stories/components/StoriesLayout/StoriesLayout.tsx b/src/components/Stories/components/StoriesLayout/StoriesLayout.tsx index 16e290c1..47f1c3d2 100644 --- a/src/components/Stories/components/StoriesLayout/StoriesLayout.tsx +++ b/src/components/Stories/components/StoriesLayout/StoriesLayout.tsx @@ -55,9 +55,9 @@ export const StoriesLayout = (props: StoriesLayoutProps) => { {currentStory.title && (
{currentStory.title}
)} - {currentStory.description && ( + {currentStory.content && (
- {currentStory.description} + {currentStory.content}
)} {currentStory.url && ( diff --git a/src/components/Stories/types.ts b/src/components/Stories/types.ts index 281a25d7..18f56d40 100644 --- a/src/components/Stories/types.ts +++ b/src/components/Stories/types.ts @@ -1,3 +1,5 @@ +import type React from 'react'; + export type StoriesItemMedia = {url: string} & ( | { /** default 'image' */ @@ -12,7 +14,7 @@ export type StoriesItemMedia = {url: string} & ( export interface StoriesItem { title?: string; - description?: string; + content?: React.ReactNode; /** Url for link "more" */ url?: string; media?: StoriesItemMedia; diff --git a/src/components/StoriesGroup/__stories__/StoriesGroup.stories.tsx b/src/components/StoriesGroup/__stories__/StoriesGroup.stories.tsx index d512b9d1..a45fe276 100644 --- a/src/components/StoriesGroup/__stories__/StoriesGroup.stories.tsx +++ b/src/components/StoriesGroup/__stories__/StoriesGroup.stories.tsx @@ -17,7 +17,7 @@ const groups: StoriesGroupItem[] = [ items: [ { title: 'New navigation', - description: + content: 'At the top of the panel is the service navigation for each service. ' + 'Below are common navigation elements: a component for switching between accounts ' + 'and organizations, settings, help center, search, notifications, favorites.', @@ -28,7 +28,7 @@ const groups: StoriesGroupItem[] = [ }, { title: 'New navigation (2)', - description: 'A little more about the new navigation', + content: 'A little more about the new navigation', media: { url: 'https://storage.yandexcloud.net/uikit-storybook-assets/sample_960x400_ocean_with_audio.mp4', type: 'video', @@ -40,7 +40,7 @@ const groups: StoriesGroupItem[] = [ items: [ { title: 'New navigation (3)', - description: 'Switch to the new navigation right now', + content: 'Switch to the new navigation right now', media: { url: 'https://storage.yandexcloud.net/uikit-storybook-assets/story-picture-4.png', },