@djangocfg/ui-core 2.1.58 → 2.1.59
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.
- package/package.json +2 -2
- package/src/components/copy.tsx +6 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@djangocfg/ui-core",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.59",
|
|
4
4
|
"description": "Pure React UI component library without Next.js dependencies - for Electron, Vite, CRA apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ui-components",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"vaul": "1.1.2"
|
|
103
103
|
},
|
|
104
104
|
"devDependencies": {
|
|
105
|
-
"@djangocfg/typescript-config": "^2.1.
|
|
105
|
+
"@djangocfg/typescript-config": "^2.1.59",
|
|
106
106
|
"@types/node": "^24.7.2",
|
|
107
107
|
"@types/react": "^19.1.0",
|
|
108
108
|
"@types/react-dom": "^19.1.0",
|
package/src/components/copy.tsx
CHANGED
|
@@ -92,8 +92,10 @@ export interface CopyFieldProps extends Omit<React.HTMLAttributes<HTMLDivElement
|
|
|
92
92
|
onCopy?: (value: string) => void
|
|
93
93
|
/** Show as monospace font */
|
|
94
94
|
mono?: boolean
|
|
95
|
-
/** Truncate long text */
|
|
95
|
+
/** Truncate long text (default: true). Set to false to allow wrapping */
|
|
96
96
|
truncate?: boolean
|
|
97
|
+
/** Break long words to prevent overflow (use with truncate={false}) */
|
|
98
|
+
breakAll?: boolean
|
|
97
99
|
}
|
|
98
100
|
|
|
99
101
|
const CopyField = React.forwardRef<HTMLDivElement, CopyFieldProps>(
|
|
@@ -105,6 +107,7 @@ const CopyField = React.forwardRef<HTMLDivElement, CopyFieldProps>(
|
|
|
105
107
|
className,
|
|
106
108
|
mono = true,
|
|
107
109
|
truncate = true,
|
|
110
|
+
breakAll = false,
|
|
108
111
|
...props
|
|
109
112
|
}, ref) => {
|
|
110
113
|
return (
|
|
@@ -124,7 +127,8 @@ const CopyField = React.forwardRef<HTMLDivElement, CopyFieldProps>(
|
|
|
124
127
|
className={cn(
|
|
125
128
|
'text-sm',
|
|
126
129
|
mono && 'font-mono',
|
|
127
|
-
truncate && 'truncate'
|
|
130
|
+
truncate && 'truncate',
|
|
131
|
+
breakAll && 'break-all'
|
|
128
132
|
)}
|
|
129
133
|
title={value}
|
|
130
134
|
>
|