@linzjs/windows 10.1.0 → 10.1.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,7 +1,7 @@
|
|
|
1
1
|
import '../index.scss';
|
|
2
2
|
|
|
3
3
|
import clsx from 'clsx';
|
|
4
|
-
import { CSSProperties, ReactElement, useEffect, useRef, useState } from 'react';
|
|
4
|
+
import { CSSProperties, MouseEvent, ReactElement, useEffect, useRef, useState } from 'react';
|
|
5
5
|
|
|
6
6
|
export interface CopyableTextProps {
|
|
7
7
|
dataTestId?: string;
|
|
@@ -16,8 +16,9 @@ export const CopyableText = (props: CopyableTextProps): ReactElement => {
|
|
|
16
16
|
const { dataTestId, style, className, text } = props;
|
|
17
17
|
const timeoutRefDisplay = useRef<ReturnType<typeof setTimeout> | null>(null);
|
|
18
18
|
|
|
19
|
-
const copy = () => {
|
|
20
|
-
|
|
19
|
+
const copy = (event: MouseEvent<HTMLSpanElement>) => {
|
|
20
|
+
const win = event.currentTarget.ownerDocument.defaultView ?? window;
|
|
21
|
+
win.navigator.clipboard.writeText(String(text)).then(
|
|
21
22
|
() => {
|
|
22
23
|
setCopied(true);
|
|
23
24
|
timeoutRefDisplay.current = setTimeout(() => void setCopied(false), 3000);
|
|
@@ -45,7 +46,7 @@ export const CopyableText = (props: CopyableTextProps): ReactElement => {
|
|
|
45
46
|
className={clsx('windows_tooltip', className)}
|
|
46
47
|
onClick={(event) => {
|
|
47
48
|
event.stopPropagation();
|
|
48
|
-
copy();
|
|
49
|
+
copy(event);
|
|
49
50
|
}}
|
|
50
51
|
>
|
|
51
52
|
<span className="windows_tooltiptext" style={{ width: copied ? '62px' : '47px' }}>
|
package/dist/index.scss
CHANGED
package/package.json
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"popout"
|
|
14
14
|
],
|
|
15
15
|
"main": "./dist/index.ts",
|
|
16
|
-
"version": "10.1.
|
|
16
|
+
"version": "10.1.2",
|
|
17
17
|
"peerDependencies": {
|
|
18
18
|
"@linzjs/lui": ">=23",
|
|
19
19
|
"react": ">=18",
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
"node": ">=22"
|
|
31
31
|
},
|
|
32
32
|
"scripts": {
|
|
33
|
-
"build": "
|
|
34
|
-
"yalc": "run
|
|
33
|
+
"build": "node -e \"require('fs').mkdirSync('./dist',{recursive:true})\" && npm run clean && npm run lintall && npm run bundle",
|
|
34
|
+
"yalc": "npm run clean && npm run bundle && yalc push",
|
|
35
35
|
"clean": "node -e \"fs.rmSync('dist', { recursive: true, force: true })\"",
|
|
36
36
|
"bundle": "tsc --noEmit && rollup -c",
|
|
37
37
|
"test": "vitest run",
|
|
38
38
|
"test:watch": "vitest --watch",
|
|
39
|
-
"lintall": "run
|
|
39
|
+
"lintall": "npm run lint:style && npm run lint:oxlint",
|
|
40
40
|
"lint:style": "stylelint src/**/*.scss src/**/*.css --fix",
|
|
41
41
|
"lint:oxlint": "oxlint ./src",
|
|
42
42
|
"lint:fix": "oxlint --fix ./src",
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@chromatic-com/storybook": "^4.1.3",
|
|
57
|
-
"@linzjs/lui": "^24.
|
|
58
|
-
"@linzjs/step-ag-grid": "^
|
|
57
|
+
"@linzjs/lui": "^24.13.0",
|
|
58
|
+
"@linzjs/step-ag-grid": "^31.2.1",
|
|
59
59
|
"@rollup/plugin-commonjs": "^28.0.9",
|
|
60
60
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
61
61
|
"@storybook/addon-docs": "9.1.20",
|
|
@@ -69,19 +69,17 @@
|
|
|
69
69
|
"@types/react": "^18.3.28",
|
|
70
70
|
"@types/react-dom": "^18.3.7",
|
|
71
71
|
"@vitejs/plugin-react-swc": "^4.3.0",
|
|
72
|
-
"@vitest/ui": "^4.1.
|
|
72
|
+
"@vitest/ui": "^4.1.5",
|
|
73
73
|
"ag-grid-community": "34.2.0",
|
|
74
74
|
"ag-grid-react": "34.2.0",
|
|
75
75
|
"jsdom": "^27.3.0",
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"oxfmt": "^0.43.0",
|
|
79
|
-
"oxlint": "^1.58.0",
|
|
76
|
+
"oxfmt": "^0.47.0",
|
|
77
|
+
"oxlint": "^1.62.0",
|
|
80
78
|
"react": "^18.3.1",
|
|
81
79
|
"react-dom": "18.3.1",
|
|
82
|
-
"rollup": "^4.60.
|
|
80
|
+
"rollup": "^4.60.2",
|
|
83
81
|
"rollup-plugin-copy": "^3.5.0",
|
|
84
|
-
"sass": "^1.
|
|
82
|
+
"sass": "^1.99.0",
|
|
85
83
|
"storybook": "9.1.20",
|
|
86
84
|
"stylelint": "^16.26.1",
|
|
87
85
|
"stylelint-config-recommended": "^17.0.0",
|
|
@@ -90,9 +88,9 @@
|
|
|
90
88
|
"stylelint-prettier": "5.0.3",
|
|
91
89
|
"stylelint-scss": "6.14.0",
|
|
92
90
|
"typescript": "^5.9.3",
|
|
93
|
-
"vite": "^7.3.
|
|
91
|
+
"vite": "^7.3.2",
|
|
94
92
|
"vite-tsconfig-paths": "^5.1.4",
|
|
95
|
-
"vitest": "^4.1.
|
|
93
|
+
"vitest": "^4.1.5"
|
|
96
94
|
},
|
|
97
95
|
"browserslist": {
|
|
98
96
|
"production": [
|
|
@@ -105,10 +103,5 @@
|
|
|
105
103
|
"last 1 firefox version",
|
|
106
104
|
"last 1 safari version"
|
|
107
105
|
]
|
|
108
|
-
},
|
|
109
|
-
"husky": {
|
|
110
|
-
"hooks": {
|
|
111
|
-
"pre-commit": "npm run lintall"
|
|
112
|
-
}
|
|
113
106
|
}
|
|
114
107
|
}
|