@ringpublishing/mui-components-mcp 1.16.0 → 1.16.2

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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "generated": "2026-08-13T11:39:20.856Z",
2
+ "generated": "2026-08-18T08:55:02.379Z",
3
3
  "importPath": "@ringpublishing/mui-components",
4
4
  "componentCount": 35,
5
5
  "components": {
@@ -1152,7 +1152,7 @@
1152
1152
  "type": "string"
1153
1153
  },
1154
1154
  "endDate": {
1155
- "description": "ISO date string after which the tooltip will no longer be shown. Example: `\"2026-12-31T00:00:00.000Z\"`.",
1155
+ "description": "ISO date string after which the tooltip will no longer be shown. Example: `\"2026-12-31T00:00:00.000Z\"`. Once the date has passed the tooltip renders nothing at all — no error and no console warning — so a stale value looks exactly like a broken component.",
1156
1156
  "control": "text",
1157
1157
  "category": "behavior",
1158
1158
  "type": "string"
@@ -1212,7 +1212,7 @@
1212
1212
  "WithNoActions",
1213
1213
  "WithImage"
1214
1214
  ],
1215
- "docs": "# FeatureTooltip\n\nA feature announcement tooltip that automatically manages its display state using `localStorage`. It extends MUI's [Tooltip](https://mui.com/material-ui/react-tooltip/) with a rich card layout, supporting media content, configurable action buttons, and frequency-capping logic.\n\n- Displays automatically on mount based on `capping` count and `endDate` expiration\n- Persists display history in `localStorage` to control re-display frequency\n- Supports text messages, embedded videos (`videoEmbed`), and images (`image`)\n- Configurable action buttons — up to two: primary and optional secondary\n- Close button always available for the user\n\n## Default\n\nShows two tooltip configurations side by side: a **standard tooltip** (displayed only once per user) and a **capping tooltip** (displayed up to 3 times). Both use `localStorage` to track display history.\n\n> **Note:** If you don't see the tooltip, click **Clear tooltip data** to reset the `localStorage` state and reload the page.\n\n```tsx\n// DefaultExample.tsx\nimport { Box, Button } from '@mui/material';\nimport { FeatureTooltip, FeatureTooltipProps } from '@ringpublishing/mui-components';\nimport React from 'react';\n\nconst actions: FeatureTooltipProps['actions'] = [\n { label: 'Default action', href: 'https://ringpublishing.com/' },\n { label: 'Secondary action', onClick: (): void => console.log('Secondary action clicked') },\n];\n\nexport default function DefaultExample(): React.JSX.Element {\n const clearTooltipData = (): void => {\n try {\n localStorage.removeItem('FeatureTooltips');\n location.reload();\n } catch (error) {\n console.warn(error);\n }\n };\n\n return (\n <Box sx={{ width: '80%' }}>\n <Box sx={{ display: 'flex', justifyContent: 'space-between' }}>\n <FeatureTooltip\n id=\"ring-feature-tooltip-1\"\n title=\"Standard tooltip\"\n message=\"There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form\"\n actions={actions}\n endDate=\"2026-06-24T10:49:20.823Z\"\n >\n <div style={{ width: '200px' }}>Tooltip shown only once, after closing not visible</div>\n </FeatureTooltip>\n\n <FeatureTooltip\n id=\"ring-feature-tooltip-capping\"\n title=\"Tooltip with capping\"\n capping={3}\n message=\"\"\n videoEmbed=\"https://www.youtube.com/embed/KRphOlc8tKg?si=xUR6gOpAPDcR74Dk\"\n actions={actions}\n endDate=\"2026-06-24T10:49:20.823Z\"\n >\n <div style={{ width: '200px' }}>Tooltip with capping (should be visible 3 times)</div>\n </FeatureTooltip>\n </Box>\n\n <Box sx={{ display: 'flex', justifyContent: 'center', alignItems: 'center', mt: 2 }}>\n If you do not see tooltip:\n <Button onClick={clearTooltipData} variant=\"outlined\" color=\"primary\" sx={{ ml: 1 }}>\n Clear tooltip data\n </Button>\n </Box>\n </Box>\n );\n}\n```\n\n## With One Action\n\nA tooltip with a **single primary action** button and an embedded YouTube video. Use this when you want to direct users to a specific resource without offering a secondary option.\n\n```tsx\n// WithOneActionExample.tsx\nimport React from 'react';\nimport { Box, Button } from '@mui/material';\nimport { FeatureTooltip } from '@ringpublishing/mui-components';\n\nexport default function WithOneActionExample(): React.JSX.Element {\n const clearTooltipData = (): void => {\n try {\n localStorage.removeItem('FeatureTooltips');\n location.reload();\n } catch (error) {\n console.warn(error);\n }\n };\n\n return (\n <Box sx={{ width: '80%' }}>\n <FeatureTooltip\n id=\"ring-feature-tooltip-2\"\n title=\"Tooltip with one action\"\n message=\"There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form\"\n actions={[{ label: 'Default action', href: 'https://ringpublishing.com/' }]}\n videoEmbed=\"https://www.youtube.com/embed/KRphOlc8tKg?si=xUR6gOpAPDcR74Dk\"\n endDate=\"2026-06-24T10:49:20.823Z\"\n >\n <div style={{ width: '200px' }}>Tooltip with one action and video embed</div>\n </FeatureTooltip>\n\n <Box sx={{ display: 'flex', justifyContent: 'center', alignItems: 'center', mt: 2 }}>\n If you do not see tooltip:\n <Button onClick={clearTooltipData} variant=\"outlined\" color=\"primary\" sx={{ ml: 1 }}>\n Clear tooltip data\n </Button>\n </Box>\n </Box>\n );\n}\n```\n\n## With No Actions\n\nA tooltip displaying only a title and message body — without any action buttons. Ideal for purely informational announcements where no user interaction is needed beyond dismissal.\n\n```tsx\n// WithNoActionsExample.tsx\nimport React from 'react';\nimport { Box, Button } from '@mui/material';\nimport { FeatureTooltip } from '@ringpublishing/mui-components';\n\nexport default function WithNoActionsExample(): React.JSX.Element {\n const clearTooltipData = (): void => {\n try {\n localStorage.removeItem('FeatureTooltips');\n location.reload();\n } catch (error) {\n console.warn(error);\n }\n };\n\n return (\n <Box sx={{ width: '80%' }}>\n <FeatureTooltip\n id=\"ring-feature-tooltip-3\"\n title=\"Tooltip with no actions\"\n message=\"There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form\"\n endDate=\"2026-06-24T10:49:20.823Z\"\n >\n <div style={{ width: '200px' }}>Tooltip without action buttons</div>\n </FeatureTooltip>\n\n <Box sx={{ display: 'flex', justifyContent: 'center', alignItems: 'center', mt: 2 }}>\n If you do not see tooltip:\n <Button onClick={clearTooltipData} variant=\"outlined\" color=\"primary\" sx={{ ml: 1 }}>\n Clear tooltip data\n </Button>\n </Box>\n </Box>\n );\n}\n```\n\n## With Image\n\nA tooltip enriched with an **image**. Shown side by side: one variant with two action buttons, another without actions — both using the same image URL.\n\n> **Note:** If both `image` and `videoEmbed` are passed, the **video takes priority** and the image is not rendered.\n\n```tsx\n// WithImageExample.tsx\nimport { Box, Button } from '@mui/material';\nimport { FeatureTooltip, FeatureTooltipProps } from '@ringpublishing/mui-components';\nimport React from 'react';\n\nconst IMAGE_URL = 'https://design.ringpublishing.com/images/sea_large.jpg';\n\nconst actions: FeatureTooltipProps['actions'] = [\n { label: 'Default action', href: 'https://ringpublishing.com/' },\n { label: 'Secondary action', onClick: (): void => console.log('Secondary action clicked') },\n];\n\nexport default function WithImageExample(): React.JSX.Element {\n const clearTooltipData = (): void => {\n try {\n localStorage.removeItem('FeatureTooltips');\n location.reload();\n } catch (error) {\n console.warn(error);\n }\n };\n\n return (\n <Box sx={{ width: '80%' }}>\n <Box sx={{ display: 'flex', justifyContent: 'space-between' }}>\n <FeatureTooltip\n id=\"ring-feature-tooltip-4\"\n title=\"Tooltip with image and actions\"\n message=\"\"\n image={IMAGE_URL}\n actions={actions}\n endDate=\"2026-06-24T10:49:20.823Z\"\n >\n <div style={{ width: '200px' }}>Tooltip with image and two actions</div>\n </FeatureTooltip>\n\n <FeatureTooltip\n id=\"ring-feature-tooltip-4b\"\n title=\"Tooltip with image, no actions\"\n message=\"\"\n image={IMAGE_URL}\n endDate=\"2026-06-24T10:49:20.823Z\"\n >\n <div style={{ width: '200px' }}>Tooltip with image and no actions</div>\n </FeatureTooltip>\n </Box>\n\n <Box sx={{ display: 'flex', justifyContent: 'center', alignItems: 'center', mt: 2 }}>\n If you do not see tooltip:\n <Button onClick={clearTooltipData} variant=\"outlined\" color=\"primary\" sx={{ ml: 1 }}>\n Clear tooltip data\n </Button>\n </Box>\n </Box>\n );\n}\n```"
1215
+ "docs": "# FeatureTooltip\n\nA feature announcement tooltip that automatically manages its display state using `localStorage`. It extends MUI's [Tooltip](https://mui.com/material-ui/react-tooltip/) with a rich card layout, supporting media content, configurable action buttons, and frequency-capping logic.\n\n- Displays automatically on mount based on `capping` count and `endDate` expiration\n- Persists display history in `localStorage` to control re-display frequency\n- Supports text messages, embedded videos (`videoEmbed`), and images (`image`)\n- Configurable action buttons — up to two: primary and optional secondary\n- Close button always available for the user\n\n## Default\n\nShows two tooltip configurations side by side: a **standard tooltip** (displayed only once per user) and a **capping tooltip** (displayed up to 3 times). Both use `localStorage` to track display history.\n\n> **Note:** If you don't see the tooltip, click **Clear tooltip data** to reset the `localStorage` state and reload the page.\n\n```tsx\n// DefaultExample.tsx\nimport { Box, Button } from '@mui/material';\nimport { FeatureTooltip, FeatureTooltipProps } from '@ringpublishing/mui-components';\nimport dayjs from 'dayjs';\nimport React from 'react';\n\nconst endDate = dayjs().add(1, 'year').toISOString();\n\nconst actions: FeatureTooltipProps['actions'] = [\n { label: 'Default action', href: 'https://ringpublishing.com/' },\n { label: 'Secondary action', onClick: (): void => console.log('Secondary action clicked') },\n];\n\nexport default function DefaultExample(): React.JSX.Element {\n const clearTooltipData = (): void => {\n try {\n localStorage.removeItem('FeatureTooltips');\n location.reload();\n } catch (error) {\n console.warn(error);\n }\n };\n\n return (\n <Box sx={{ width: '80%' }}>\n <Box sx={{ display: 'flex', justifyContent: 'space-between' }}>\n <FeatureTooltip\n id=\"ring-feature-tooltip-1\"\n title=\"Standard tooltip\"\n message=\"There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form\"\n actions={actions}\n endDate={endDate}\n >\n <div style={{ width: '200px' }}>Tooltip shown only once, after closing not visible</div>\n </FeatureTooltip>\n\n <FeatureTooltip\n id=\"ring-feature-tooltip-capping\"\n title=\"Tooltip with capping\"\n capping={3}\n message=\"\"\n videoEmbed=\"https://www.youtube.com/embed/KRphOlc8tKg?si=xUR6gOpAPDcR74Dk\"\n actions={actions}\n endDate={endDate}\n >\n <div style={{ width: '200px' }}>Tooltip with capping (should be visible 3 times)</div>\n </FeatureTooltip>\n </Box>\n\n <Box sx={{ display: 'flex', justifyContent: 'center', alignItems: 'center', mt: 2 }}>\n If you do not see tooltip:\n <Button onClick={clearTooltipData} variant=\"outlined\" color=\"primary\" sx={{ ml: 1 }}>\n Clear tooltip data\n </Button>\n </Box>\n </Box>\n );\n}\n```\n\n## With One Action\n\nA tooltip with a **single primary action** button and an embedded YouTube video. Use this when you want to direct users to a specific resource without offering a secondary option.\n\n```tsx\n// WithOneActionExample.tsx\nimport React from 'react';\nimport { Box, Button } from '@mui/material';\nimport { FeatureTooltip } from '@ringpublishing/mui-components';\nimport dayjs from 'dayjs';\n\nconst endDate = dayjs().add(1, 'year').toISOString();\n\nexport default function WithOneActionExample(): React.JSX.Element {\n const clearTooltipData = (): void => {\n try {\n localStorage.removeItem('FeatureTooltips');\n location.reload();\n } catch (error) {\n console.warn(error);\n }\n };\n\n return (\n <Box sx={{ width: '80%' }}>\n <FeatureTooltip\n id=\"ring-feature-tooltip-2\"\n title=\"Tooltip with one action\"\n message=\"There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form\"\n actions={[{ label: 'Default action', href: 'https://ringpublishing.com/' }]}\n videoEmbed=\"https://www.youtube.com/embed/KRphOlc8tKg?si=xUR6gOpAPDcR74Dk\"\n endDate={endDate}\n >\n <div style={{ width: '200px' }}>Tooltip with one action and video embed</div>\n </FeatureTooltip>\n\n <Box sx={{ display: 'flex', justifyContent: 'center', alignItems: 'center', mt: 2 }}>\n If you do not see tooltip:\n <Button onClick={clearTooltipData} variant=\"outlined\" color=\"primary\" sx={{ ml: 1 }}>\n Clear tooltip data\n </Button>\n </Box>\n </Box>\n );\n}\n```\n\n## With No Actions\n\nA tooltip displaying only a title and message body — without any action buttons. Ideal for purely informational announcements where no user interaction is needed beyond dismissal.\n\n```tsx\n// WithNoActionsExample.tsx\nimport React from 'react';\nimport { Box, Button } from '@mui/material';\nimport { FeatureTooltip } from '@ringpublishing/mui-components';\nimport dayjs from 'dayjs';\n\nconst endDate = dayjs().add(1, 'year').toISOString();\n\nexport default function WithNoActionsExample(): React.JSX.Element {\n const clearTooltipData = (): void => {\n try {\n localStorage.removeItem('FeatureTooltips');\n location.reload();\n } catch (error) {\n console.warn(error);\n }\n };\n\n return (\n <Box sx={{ width: '80%' }}>\n <FeatureTooltip\n id=\"ring-feature-tooltip-3\"\n title=\"Tooltip with no actions\"\n message=\"There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form\"\n endDate={endDate}\n >\n <div style={{ width: '200px' }}>Tooltip without action buttons</div>\n </FeatureTooltip>\n\n <Box sx={{ display: 'flex', justifyContent: 'center', alignItems: 'center', mt: 2 }}>\n If you do not see tooltip:\n <Button onClick={clearTooltipData} variant=\"outlined\" color=\"primary\" sx={{ ml: 1 }}>\n Clear tooltip data\n </Button>\n </Box>\n </Box>\n );\n}\n```\n\n## With Image\n\nA tooltip enriched with an **image**. Shown side by side: one variant with two action buttons, another without actions — both using the same image URL.\n\n> **Note:** If both `image` and `videoEmbed` are passed, the **video takes priority** and the image is not rendered.\n\n```tsx\n// WithImageExample.tsx\nimport { Box, Button } from '@mui/material';\nimport { FeatureTooltip, FeatureTooltipProps } from '@ringpublishing/mui-components';\nimport dayjs from 'dayjs';\nimport React from 'react';\n\nconst IMAGE_URL = 'https://design.ringpublishing.com/images/sea_large.jpg';\n\nconst endDate = dayjs().add(1, 'year').toISOString();\n\nconst actions: FeatureTooltipProps['actions'] = [\n { label: 'Default action', href: 'https://ringpublishing.com/' },\n { label: 'Secondary action', onClick: (): void => console.log('Secondary action clicked') },\n];\n\nexport default function WithImageExample(): React.JSX.Element {\n const clearTooltipData = (): void => {\n try {\n localStorage.removeItem('FeatureTooltips');\n location.reload();\n } catch (error) {\n console.warn(error);\n }\n };\n\n return (\n <Box sx={{ width: '80%' }}>\n <Box sx={{ display: 'flex', justifyContent: 'space-between' }}>\n <FeatureTooltip\n id=\"ring-feature-tooltip-4\"\n title=\"Tooltip with image and actions\"\n message=\"\"\n image={IMAGE_URL}\n actions={actions}\n endDate={endDate}\n >\n <div style={{ width: '200px' }}>Tooltip with image and two actions</div>\n </FeatureTooltip>\n\n <FeatureTooltip\n id=\"ring-feature-tooltip-4b\"\n title=\"Tooltip with image, no actions\"\n message=\"\"\n image={IMAGE_URL}\n endDate={endDate}\n >\n <div style={{ width: '200px' }}>Tooltip with image and no actions</div>\n </FeatureTooltip>\n </Box>\n\n <Box sx={{ display: 'flex', justifyContent: 'center', alignItems: 'center', mt: 2 }}>\n If you do not see tooltip:\n <Button onClick={clearTooltipData} variant=\"outlined\" color=\"primary\" sx={{ ml: 1 }}>\n Clear tooltip data\n </Button>\n </Box>\n </Box>\n );\n}\n```"
1216
1216
  },
1217
1217
  "molecules-media": {
1218
1218
  "id": "molecules-media",
package/package.json CHANGED
@@ -29,5 +29,5 @@
29
29
  "engines": {
30
30
  "node": "^18||^20||^22||^24"
31
31
  },
32
- "version": "1.16.0"
32
+ "version": "1.16.2"
33
33
  }