@patternfly/chatbot 6.4.0-prerelease.13 → 6.4.0-prerelease.14

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.
@@ -28,9 +28,9 @@ const CodeBlockMessage = (_a) => {
28
28
  const [copied, setCopied] = (0, react_1.useState)(false);
29
29
  const [isExpanded, setIsExpanded] = (0, react_1.useState)(false);
30
30
  const buttonRef = (0, react_1.useRef)();
31
- const tooltipID = (0, react_1.useId)();
32
- const toggleId = (0, react_1.useId)();
33
- const contentId = (0, react_1.useId)();
31
+ const tooltipID = (0, react_core_1.getUniqueId)();
32
+ const toggleId = (0, react_core_1.getUniqueId)();
33
+ const contentId = (0, react_core_1.getUniqueId)();
34
34
  const codeBlockRef = (0, react_1.useRef)(null);
35
35
  const language = (_b = /language-(\w+)/.exec(className || '')) === null || _b === void 0 ? void 0 : _b[1];
36
36
  // Get custom toggle text from data attributes if available - for use with rehype plugins
@@ -13,9 +13,9 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
13
13
  // ============================================================================
14
14
  // Chatbot Main - Message - Content - Code Block
15
15
  // ============================================================================
16
- import { useState, useRef, useId, useCallback, useEffect } from 'react';
16
+ import { useState, useRef, useCallback, useEffect } from 'react';
17
17
  // Import PatternFly components
18
- import { CodeBlock, CodeBlockAction, CodeBlockCode, Button, Tooltip, ExpandableSection, ExpandableSectionToggle, ExpandableSectionVariant } from '@patternfly/react-core';
18
+ import { CodeBlock, CodeBlockAction, CodeBlockCode, Button, Tooltip, ExpandableSection, ExpandableSectionToggle, ExpandableSectionVariant, getUniqueId } from '@patternfly/react-core';
19
19
  import { CheckIcon } from '@patternfly/react-icons/dist/esm/icons/check-icon';
20
20
  import { CopyIcon } from '@patternfly/react-icons/dist/esm/icons/copy-icon';
21
21
  const DEFAULT_EXPANDED_TEXT = 'Show less';
@@ -26,9 +26,9 @@ const CodeBlockMessage = (_a) => {
26
26
  const [copied, setCopied] = useState(false);
27
27
  const [isExpanded, setIsExpanded] = useState(false);
28
28
  const buttonRef = useRef();
29
- const tooltipID = useId();
30
- const toggleId = useId();
31
- const contentId = useId();
29
+ const tooltipID = getUniqueId();
30
+ const toggleId = getUniqueId();
31
+ const contentId = getUniqueId();
32
32
  const codeBlockRef = useRef(null);
33
33
  const language = (_b = /language-(\w+)/.exec(className || '')) === null || _b === void 0 ? void 0 : _b[1];
34
34
  // Get custom toggle text from data attributes if available - for use with rehype plugins
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@patternfly/chatbot",
3
- "version": "6.4.0-prerelease.13",
3
+ "version": "6.4.0-prerelease.14",
4
4
  "description": "This library provides React components based on PatternFly 6 that can be used to build chatbots.",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -49,8 +49,8 @@
49
49
  "unist-util-visit": "^5.0.0"
50
50
  },
51
51
  "peerDependencies": {
52
- "react": "^17 || ^18 || ^19",
53
- "react-dom": "^17 || ^18 || ^19"
52
+ "react": "^18 || ^19",
53
+ "react-dom": "^18 || ^19"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@patternfly/documentation-framework": "6.16.0",
@@ -331,7 +331,16 @@ Setting up cluster console...`;
331
331
  </CardHeader>
332
332
  <CardExpandableContent>
333
333
  <CardBody>
334
- <hr className="pf-v6-u-mb-md" />
334
+ <hr
335
+ style={
336
+ {
337
+ border: 'none',
338
+ height: 'var(--pf-t--global--border--width--divider--default)',
339
+ backgroundColor: 'var(--pf-t--global--border--color--control--read-only)'
340
+ } as React.CSSProperties
341
+ }
342
+ className="pf-v6-u-mb-md"
343
+ />
335
344
  <Accordion
336
345
  style={
337
346
  {
@@ -1,7 +1,7 @@
1
1
  // ============================================================================
2
2
  // Chatbot Main - Message - Content - Code Block
3
3
  // ============================================================================
4
- import { useState, useRef, useId, useCallback, useEffect } from 'react';
4
+ import { useState, useRef, useCallback, useEffect } from 'react';
5
5
  // Import PatternFly components
6
6
  import {
7
7
  CodeBlock,
@@ -13,7 +13,8 @@ import {
13
13
  ExpandableSectionToggle,
14
14
  ExpandableSectionProps,
15
15
  ExpandableSectionToggleProps,
16
- ExpandableSectionVariant
16
+ ExpandableSectionVariant,
17
+ getUniqueId
17
18
  } from '@patternfly/react-core';
18
19
 
19
20
  import { CheckIcon } from '@patternfly/react-icons/dist/esm/icons/check-icon';
@@ -56,9 +57,9 @@ const CodeBlockMessage = ({
56
57
  const [isExpanded, setIsExpanded] = useState(false);
57
58
 
58
59
  const buttonRef = useRef();
59
- const tooltipID = useId();
60
- const toggleId = useId();
61
- const contentId = useId();
60
+ const tooltipID = getUniqueId();
61
+ const toggleId = getUniqueId();
62
+ const contentId = getUniqueId();
62
63
  const codeBlockRef = useRef<HTMLDivElement>(null);
63
64
 
64
65
  const language = /language-(\w+)/.exec(className || '')?.[1];