@node-core/ui-components 1.0.1-df203d0fe21ee5d80d258c60dc821e8ac0601ce4 → 1.0.1-e9ec33a60f54512653a136fe677cd7e04d47c7dc

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.
@@ -73,12 +73,6 @@
73
73
  }
74
74
  }
75
75
 
76
- .notification {
77
- @apply flex
78
- items-center
79
- gap-3;
80
- }
81
-
82
76
  .icon {
83
77
  @apply size-4;
84
78
  }
@@ -1,11 +1,8 @@
1
1
  'use client';
2
2
 
3
- import {
4
- DocumentDuplicateIcon,
5
- CodeBracketIcon,
6
- } from '@heroicons/react/24/outline';
3
+ import { DocumentDuplicateIcon } from '@heroicons/react/24/outline';
7
4
  import classNames from 'classnames';
8
- import type { FC, PropsWithChildren, ReactElement, ReactNode } from 'react';
5
+ import type { FC, PropsWithChildren, ReactElement } from 'react';
9
6
  import { Fragment, isValidElement, useRef } from 'react';
10
7
 
11
8
  import BaseButton from '#ui/Common/BaseButton';
@@ -69,10 +66,9 @@ const transformCode = <T extends ReactElement<PropsWithChildren>>(
69
66
  interface CodeBoxProps {
70
67
  language: string;
71
68
  className?: string;
72
- onCopy: (text: string, message: ReactNode) => void;
69
+ onCopy: (text: string) => void;
73
70
  as?: LinkLike;
74
- copyText: string;
75
- copiedText: string;
71
+ buttonText: string;
76
72
  showCopyButton?: boolean;
77
73
  }
78
74
 
@@ -81,8 +77,7 @@ const BaseCodeBox: FC<PropsWithChildren<CodeBoxProps>> = ({
81
77
  language,
82
78
  className,
83
79
  onCopy,
84
- copiedText,
85
- copyText,
80
+ buttonText,
86
81
  as = 'a',
87
82
  showCopyButton = true,
88
83
  }: PropsWithChildren<CodeBoxProps>) => {
@@ -91,13 +86,7 @@ const BaseCodeBox: FC<PropsWithChildren<CodeBoxProps>> = ({
91
86
  const handleCopy = (): void => {
92
87
  const text = containerRef.current?.textContent;
93
88
  if (text) {
94
- onCopy(
95
- text,
96
- <div className={styles.notification}>
97
- <CodeBracketIcon className={styles.icon} />
98
- {copiedText}
99
- </div>
100
- );
89
+ onCopy(text);
101
90
  }
102
91
  };
103
92
 
@@ -121,7 +110,7 @@ const BaseCodeBox: FC<PropsWithChildren<CodeBoxProps>> = ({
121
110
  onClick={handleCopy}
122
111
  >
123
112
  <DocumentDuplicateIcon className={styles.icon} />
124
- {copyText}
113
+ {buttonText}
125
114
  </BaseButton>
126
115
  )}
127
116
  </div>
@@ -40,8 +40,7 @@ server.listen(port, hostname, () => {
40
40
 
41
41
  const boxProps = {
42
42
  onCopy: console.log,
43
- copyText: '[Copy Text]',
44
- copiedText: '[Copied Text]',
43
+ buttonText: '[Button Text]',
45
44
  };
46
45
 
47
46
  const TabsContent: FC = () => (
package/package.json CHANGED
@@ -26,7 +26,7 @@
26
26
  "@radix-ui/react-label": "~2.1.2",
27
27
  "@radix-ui/react-select": "~2.2.2",
28
28
  "@radix-ui/react-separator": "~1.1.3",
29
- "@radix-ui/react-tabs": "~1.1.3",
29
+ "@radix-ui/react-tabs": "~1.1.9",
30
30
  "@radix-ui/react-toast": "~1.2.6",
31
31
  "@radix-ui/react-tooltip": "~1.2.4",
32
32
  "@tailwindcss/postcss": "~4.1.5",
@@ -76,7 +76,7 @@
76
76
  "engines": {
77
77
  "node": ">=20"
78
78
  },
79
- "version": "1.0.1-df203d0fe21ee5d80d258c60dc821e8ac0601ce4",
79
+ "version": "1.0.1-e9ec33a60f54512653a136fe677cd7e04d47c7dc",
80
80
  "scripts": {
81
81
  "check-types": "tsc --noEmit",
82
82
  "lint": "turbo run lint:js lint:css",