woby-tooltip 1.0.4 → 1.0.9
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/README.md +99 -212
- package/build/index.es.js +2756 -0
- package/build/index.html +21 -0
- package/{dist → build}/style.css +249 -680
- package/dist/index.es.js +212 -387
- package/dist/index.es.js.map +1 -1
- package/dist/output.css +249 -680
- package/dist/types/Tooltip.d.ts +9 -46
- package/dist/types/Tooltip.d.ts.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -0
- package/package.json +24 -16
- package/tailwind.config.js +11 -11
- package/tsconfig.json +61 -59
- package/tsconfig.tsbuildinfo +1 -0
- package/tsconfig.web.json +61 -0
- package/{vite.config.ts → vite.config.mts} +40 -40
- package/{vite.config.web.ts → vite.config.web.mts} +8 -6
- package/dist/index.cjs.js +0 -406
- package/dist/index.cjs.js.map +0 -1
- package/dist/index.umd.js +0 -408
- package/dist/index.umd.js.map +0 -1
- package/dist/types/Arrow.d.ts +0 -7
- package/dist/types/TextBox.d.ts +0 -48
package/dist/types/Tooltip.d.ts
CHANGED
@@ -1,47 +1,10 @@
|
|
1
|
-
import { ObservableMaybe,
|
2
|
-
|
3
|
-
export type
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
position?: ObservableMaybe<string>;
|
9
|
-
/** tailwind */
|
10
|
-
hoverBackground?: ObservableMaybe<string>;
|
11
|
-
/** tailwind */
|
12
|
-
backgroundColor?: ObservableMaybe<string>;
|
13
|
-
arrowAlign?: ObservableMaybe<Align>;
|
14
|
-
moveDown?: ObservableMaybe<string>;
|
15
|
-
moveRight?: ObservableMaybe<string>;
|
16
|
-
moveLeft?: ObservableMaybe<string>;
|
17
|
-
moveUp?: ObservableMaybe<string>;
|
18
|
-
textAlign?: ObservableMaybe<string>;
|
19
|
-
fontFamily?: ObservableMaybe<string>;
|
20
|
-
fontWeight?: ObservableMaybe<string>;
|
21
|
-
/** tailwind */
|
22
|
-
fontSize?: ObservableMaybe<string>;
|
23
|
-
/** tailwind */
|
24
|
-
color?: ObservableMaybe<string>;
|
25
|
-
animation?: ObservableMaybe<string>;
|
26
|
-
zIndex?: ObservableMaybe<string>;
|
27
|
-
flat?: ObservableMaybe<boolean>;
|
28
|
-
show?: ObservableMaybe<boolean>;
|
29
|
-
/** tailwind */
|
30
|
-
hoverColor?: ObservableMaybe<string>;
|
31
|
-
/** no tailwind */
|
32
|
-
textboxWidth?: ObservableMaybe<string>;
|
33
|
-
/** tailwind */
|
34
|
-
padding?: ObservableMaybe<string>;
|
35
|
-
/** tailwind */
|
36
|
-
borderRadius?: ObservableMaybe<string>;
|
37
|
-
shadowColor?: ObservableMaybe<string>;
|
38
|
-
shadowShape?: ObservableMaybe<string>;
|
1
|
+
import { ObservableMaybe, type JSX } from 'woby';
|
2
|
+
export declare const Tooltip: ({ children, class: cls, className, ...props }: JSX.HTMLAttributes<HTMLDivElement>) => JSX.Child;
|
3
|
+
export type PositionType = 'top' | 'right' | 'bottom' | 'left';
|
4
|
+
export declare const TooltipContent: ({ children, style, class: cls, className, static: st, position, arrowLocation, arrowSize, ...props }: JSX.HTMLAttributes<HTMLDivElement> & {
|
5
|
+
position?: ObservableMaybe<PositionType>;
|
6
|
+
arrowLocation?: ObservableMaybe<string | number>;
|
7
|
+
arrowSize?: ObservableMaybe<string | number>;
|
39
8
|
static?: ObservableMaybe<boolean>;
|
40
|
-
|
41
|
-
|
42
|
-
};
|
43
|
-
export declare const Tooltip: <T extends HTMLElement>(properties?: TooltipType & JSX.HTMLAttributes<HTMLDivElement> & {
|
44
|
-
parentRef?: Observable<HTMLElement>;
|
45
|
-
parent?: JSX.Child;
|
46
|
-
containerClass?: JSX.Class;
|
47
|
-
}) => JSX.Element;
|
9
|
+
}) => JSX.Child;
|
10
|
+
//# sourceMappingURL=Tooltip.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../src/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoB,eAAe,EAA8C,KAAK,GAAG,EAAE,MAAM,MAAM,CAAA;AAkC9G,eAAO,MAAM,OAAO,kDAAgE,GAAG,CAAC,cAAc,CAAC,cAAc,CAAC,cAIrH,CAAA;AAkBD,MAAM,MAAM,YAAY,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAA;AAC9D,eAAO,MAAM,cAAc,yGAAyI,GAAG,CAAC,cAAc,CAAC,cAAc,CAAC,GACtM;IACI,QAAQ,CAAC,EAAE,eAAe,CAAC,YAAY,CAAC,CAAC;IACzC,aAAa,CAAC,EAAE,eAAe,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IACjD,SAAS,CAAC,EAAE,eAAe,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IAC7C,MAAM,CAAC,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;CACrC,cA+FA,CAAA"}
|
package/dist/types/index.d.ts
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "woby-tooltip",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.9",
|
4
4
|
"description": "A powerful tooltip and menu component library for woby.",
|
5
5
|
"main": "./dist/index.cjs.js",
|
6
6
|
"module": "./dist/index.es.js",
|
@@ -15,16 +15,17 @@
|
|
15
15
|
],
|
16
16
|
"license": "MIT",
|
17
17
|
"peerDependencies": {
|
18
|
-
"woby": "
|
18
|
+
"woby-styled": "1.0.13",
|
19
|
+
"use-woby": "0.0.16",
|
20
|
+
"woby": "0.58.7"
|
19
21
|
},
|
20
22
|
"devDependencies": {
|
21
|
-
"concurrently": "^
|
22
|
-
"puppeteer": "^
|
23
|
-
"style-loader": "^0.
|
24
|
-
"tailwindcss": "^3.4.
|
25
|
-
"vite": "^4.
|
26
|
-
"vite-plugin-
|
27
|
-
"svg2tsx": "^1.0.1"
|
23
|
+
"concurrently": "^9.0.1",
|
24
|
+
"puppeteer": "^23.6.0",
|
25
|
+
"style-loader": "^4.0.0",
|
26
|
+
"tailwindcss": "^3.4.14",
|
27
|
+
"vite": "^5.4.10",
|
28
|
+
"vite-plugin-tsconfig": "^1.0.5"
|
28
29
|
},
|
29
30
|
"author": "Chi Chong <wongchichong@gmail.com>",
|
30
31
|
"homepage": "https://github.com/wongchichong/woby-tooltip",
|
@@ -32,20 +33,27 @@
|
|
32
33
|
"type": "git",
|
33
34
|
"url": "git@github.com:wongchichong/woby-tooltip.git"
|
34
35
|
},
|
36
|
+
"dependencies": {
|
37
|
+
"typescript": "5.6.3"
|
38
|
+
},
|
35
39
|
"scripts": {
|
40
|
+
"git": "git add . && git commit -m \"Bump version\" && git push",
|
41
|
+
"bump": "pnpm version patch",
|
42
|
+
"npmjs": "pnpm publish",
|
43
|
+
"release": "run-s -c git bump npmjs",
|
36
44
|
"css:watch": "tailwindcss -i ./src/input.css -o ./dist/output.css --watch",
|
37
45
|
"css": "tailwindcss -i ./src/input.css -o ./dist/output.css",
|
38
|
-
"declaration": "tsc --build --force --declaration --emitDeclarationOnly --verbose",
|
39
|
-
"declaration:watch": "tsc --build --force --declaration --emitDeclarationOnly --verbose --watch",
|
46
|
+
"declaration": "tsc --build --force --declaration --emitDeclarationOnly --declarationMap --verbose",
|
47
|
+
"declaration:watch": "tsc --build --force --declaration --emitDeclarationOnly --declarationMap --verbose --watch",
|
40
48
|
"watch": "run-p build:watch css:watch",
|
41
|
-
"build": "run-s css build:vite css",
|
42
|
-
"build:web": "vite build --config=vite.config.web.
|
43
|
-
"web": "vite preview --config=vite.config.web.
|
44
|
-
"dev:only": "vite --config=vite.config.web.
|
49
|
+
"build": "run-s css build:vite css declaration",
|
50
|
+
"build:web": "vite build --config=vite.config.web.mts --mode production",
|
51
|
+
"web": "vite preview --config=vite.config.web.mts --host",
|
52
|
+
"dev:only": "vite --config=vite.config.web.mts --force --mode dev --host",
|
45
53
|
"dev": "run-p css:watch dev:only",
|
46
54
|
"build:vite": "vite build",
|
47
55
|
"build:watch": "vite build --watch",
|
48
56
|
"preview": "vite preview --host",
|
49
|
-
"icon": "node ./node_modules/svg2tsx/cli/index.js"
|
57
|
+
"icon//": "node ./node_modules/svg2tsx/cli/index.js"
|
50
58
|
}
|
51
59
|
}
|
package/tailwind.config.js
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
/** @type {import('tailwindcss').Config} */
|
2
|
-
module.exports = {
|
3
|
-
content: ["./src/**/*.{html,tsx}"],
|
4
|
-
theme: {
|
5
|
-
extend: {
|
6
|
-
|
7
|
-
},
|
8
|
-
},
|
9
|
-
plugins: [],
|
10
|
-
}
|
11
|
-
|
1
|
+
/** @type {import('tailwindcss').Config} */
|
2
|
+
module.exports = {
|
3
|
+
content: ["./src/**/*.{html,tsx}"],
|
4
|
+
theme: {
|
5
|
+
extend: {
|
6
|
+
|
7
|
+
},
|
8
|
+
},
|
9
|
+
plugins: [],
|
10
|
+
}
|
11
|
+
|
package/tsconfig.json
CHANGED
@@ -1,60 +1,62 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
"
|
5
|
-
"
|
6
|
-
"
|
7
|
-
"
|
8
|
-
"
|
9
|
-
"
|
10
|
-
"
|
11
|
-
"
|
12
|
-
"
|
13
|
-
|
14
|
-
"
|
15
|
-
"
|
16
|
-
|
17
|
-
"
|
18
|
-
"
|
19
|
-
"
|
20
|
-
|
21
|
-
"
|
22
|
-
"
|
23
|
-
|
24
|
-
|
25
|
-
"
|
26
|
-
"
|
27
|
-
"
|
28
|
-
"
|
29
|
-
"
|
30
|
-
"
|
31
|
-
"
|
32
|
-
"
|
33
|
-
"
|
34
|
-
"
|
35
|
-
"
|
36
|
-
"
|
37
|
-
"
|
38
|
-
"
|
39
|
-
"
|
40
|
-
"
|
41
|
-
"
|
42
|
-
"
|
43
|
-
"
|
44
|
-
"
|
45
|
-
"
|
46
|
-
"
|
47
|
-
"
|
48
|
-
"
|
49
|
-
|
50
|
-
"
|
51
|
-
|
52
|
-
|
53
|
-
// "
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
"
|
58
|
-
"
|
59
|
-
|
1
|
+
// GENERATED via 'vite-plugin-tsconfig' - this should be automatically created and deleted inside the build process.
|
2
|
+
{
|
3
|
+
"compilerOptions": {
|
4
|
+
"allowJs": false,
|
5
|
+
"allowSyntheticDefaultImports": true,
|
6
|
+
"allowUnreachableCode": false,
|
7
|
+
"allowUnusedLabels": false,
|
8
|
+
"alwaysStrict": true,
|
9
|
+
"declaration": true,
|
10
|
+
"declarationDir": "./dist/types",
|
11
|
+
"disableSizeLimit": true,
|
12
|
+
"esModuleInterop": false,
|
13
|
+
"forceConsistentCasingInFileNames": true,
|
14
|
+
// "importsNotUsedAsValues": "error",
|
15
|
+
"inlineSourceMap": false,
|
16
|
+
"inlineSources": false,
|
17
|
+
// "isolatedModules": true,
|
18
|
+
"jsx": "react-jsx",
|
19
|
+
"jsxImportSource": "woby",
|
20
|
+
"lib": [
|
21
|
+
"dom",
|
22
|
+
"esnext",
|
23
|
+
"WebWorker"
|
24
|
+
],
|
25
|
+
"module": "esnext",
|
26
|
+
"moduleResolution": "node",
|
27
|
+
"newLine": "lf",
|
28
|
+
"noEmitOnError": false,
|
29
|
+
"noImplicitThis": true,
|
30
|
+
"noPropertyAccessFromIndexSignature": false,
|
31
|
+
"noUnusedLocals": false,
|
32
|
+
"noUnusedParameters": false,
|
33
|
+
"outDir": "dist",
|
34
|
+
"pretty": true,
|
35
|
+
"skipDefaultLibCheck": true,
|
36
|
+
"skipLibCheck": true,
|
37
|
+
"sourceMap": false,
|
38
|
+
"strict": true,
|
39
|
+
"strictBindCallApply": true,
|
40
|
+
"strictFunctionTypes": true,
|
41
|
+
"strictNullChecks": false,
|
42
|
+
"target": "es2020",
|
43
|
+
"useDefineForClassFields": false,
|
44
|
+
"useUnknownInCatchVariables": true,
|
45
|
+
"noImplicitAny": false,
|
46
|
+
"noUncheckedIndexedAccess": false,
|
47
|
+
"baseUrl": ".",
|
48
|
+
"rootDir": "./src",
|
49
|
+
"typeRoots": [
|
50
|
+
"types",
|
51
|
+
"voby/dist/types/jsx"
|
52
|
+
],
|
53
|
+
// "tsBuildInfoFile": "./dist/tsconfig.tsbuildinfo",
|
54
|
+
// "composite": true,
|
55
|
+
},
|
56
|
+
"exclude": [
|
57
|
+
"node_modules",
|
58
|
+
"vite.*.*ts",
|
59
|
+
"dist*",
|
60
|
+
"svgx"
|
61
|
+
]
|
60
62
|
}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"root":["./src/tooltip.tsx","./src/index.tsx","./src/docs/index.tsx"],"version":"5.6.3"}
|
@@ -0,0 +1,61 @@
|
|
1
|
+
{
|
2
|
+
"compilerOptions": {
|
3
|
+
"allowJs": false,
|
4
|
+
"allowSyntheticDefaultImports": true,
|
5
|
+
"allowUnreachableCode": false,
|
6
|
+
"allowUnusedLabels": false,
|
7
|
+
"alwaysStrict": true,
|
8
|
+
"declaration": true,
|
9
|
+
"declarationDir": "./dist/types",
|
10
|
+
"disableSizeLimit": true,
|
11
|
+
"esModuleInterop": false,
|
12
|
+
"forceConsistentCasingInFileNames": true,
|
13
|
+
// "importsNotUsedAsValues": "error",
|
14
|
+
"inlineSourceMap": false,
|
15
|
+
"inlineSources": false,
|
16
|
+
// "isolatedModules": true,
|
17
|
+
"jsx": "react-jsx",
|
18
|
+
"jsxImportSource": "woby",
|
19
|
+
"lib": [
|
20
|
+
"dom",
|
21
|
+
"esnext",
|
22
|
+
"WebWorker"
|
23
|
+
],
|
24
|
+
"module": "esnext",
|
25
|
+
"moduleResolution": "node",
|
26
|
+
"newLine": "lf",
|
27
|
+
"noEmitOnError": false,
|
28
|
+
"noImplicitThis": true,
|
29
|
+
"noPropertyAccessFromIndexSignature": false,
|
30
|
+
"noUnusedLocals": false,
|
31
|
+
"noUnusedParameters": false,
|
32
|
+
"outDir": "dist",
|
33
|
+
"pretty": true,
|
34
|
+
"skipDefaultLibCheck": true,
|
35
|
+
"skipLibCheck": true,
|
36
|
+
"sourceMap": false,
|
37
|
+
"strict": true,
|
38
|
+
"strictBindCallApply": true,
|
39
|
+
"strictFunctionTypes": true,
|
40
|
+
"strictNullChecks": false,
|
41
|
+
"target": "es2020",
|
42
|
+
"useDefineForClassFields": false,
|
43
|
+
"useUnknownInCatchVariables": true,
|
44
|
+
"noImplicitAny": false,
|
45
|
+
"noUncheckedIndexedAccess": false,
|
46
|
+
"baseUrl": ".",
|
47
|
+
"rootDir": "./src",
|
48
|
+
"typeRoots": [
|
49
|
+
"types",
|
50
|
+
"voby/dist/types/jsx"
|
51
|
+
],
|
52
|
+
// "tsBuildInfoFile": "./dist/tsconfig.tsbuildinfo",
|
53
|
+
// "composite": true,
|
54
|
+
},
|
55
|
+
"exclude": [
|
56
|
+
"node_modules",
|
57
|
+
"vite.*.*ts",
|
58
|
+
"dist*",
|
59
|
+
"svgx"
|
60
|
+
]
|
61
|
+
}
|
@@ -1,40 +1,40 @@
|
|
1
|
-
import { defineConfig } from 'vite'
|
2
|
-
import path from 'path'
|
3
|
-
import dts from 'vite-plugin-dts'
|
4
|
-
|
5
|
-
const config = defineConfig({
|
6
|
-
build: {
|
7
|
-
minify: false,
|
8
|
-
lib: {
|
9
|
-
entry: ["./src/
|
10
|
-
name: 'woby',
|
11
|
-
formats: ['cjs', 'es'
|
12
|
-
fileName: (format: string, entryName: string) => `${entryName}.${format}.js`
|
13
|
-
},
|
14
|
-
sourcemap: true,
|
15
|
-
rollupOptions: {
|
16
|
-
external: ['woby', 'woby/jsx-runtime', 'oby', 'woby/jsx-runtime'],
|
17
|
-
output: {
|
18
|
-
globals: {
|
19
|
-
'woby': 'woby',
|
20
|
-
'woby/jsx-runtime': 'woby/jsx-runtime',
|
21
|
-
}
|
22
|
-
}
|
23
|
-
}
|
24
|
-
},
|
25
|
-
esbuild: {
|
26
|
-
jsx: 'automatic',
|
27
|
-
},
|
28
|
-
plugins: [
|
29
|
-
dts({ entryRoot: './src/lib', outputDir: './dist/types' })
|
30
|
-
],
|
31
|
-
resolve: {
|
32
|
-
alias: {
|
33
|
-
'~': path.resolve(__dirname, 'src'),
|
34
|
-
},
|
35
|
-
},
|
36
|
-
})
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
export default config
|
1
|
+
import { defineConfig } from 'vite'
|
2
|
+
import path from 'path'
|
3
|
+
// import dts from 'vite-plugin-dts'
|
4
|
+
|
5
|
+
const config = defineConfig({
|
6
|
+
build: {
|
7
|
+
minify: false,
|
8
|
+
lib: {
|
9
|
+
entry: ["./src/index.tsx"],
|
10
|
+
name: 'woby',
|
11
|
+
formats: [/*'cjs', '*/'es'/*, 'umd'*/],
|
12
|
+
fileName: (format: string, entryName: string) => `${entryName}.${format}.js`
|
13
|
+
},
|
14
|
+
sourcemap: true,
|
15
|
+
rollupOptions: {
|
16
|
+
external: ['woby', 'woby/jsx-runtime', 'oby', 'woby/jsx-runtime'],
|
17
|
+
output: {
|
18
|
+
globals: {
|
19
|
+
'woby': 'woby',
|
20
|
+
'woby/jsx-runtime': 'woby/jsx-runtime',
|
21
|
+
}
|
22
|
+
}
|
23
|
+
}
|
24
|
+
},
|
25
|
+
esbuild: {
|
26
|
+
jsx: 'automatic',
|
27
|
+
},
|
28
|
+
plugins: [
|
29
|
+
// dts({ entryRoot: './src/lib', outputDir: './dist/types' })
|
30
|
+
],
|
31
|
+
resolve: {
|
32
|
+
alias: {
|
33
|
+
'~': path.resolve(__dirname, 'src'),
|
34
|
+
},
|
35
|
+
},
|
36
|
+
})
|
37
|
+
|
38
|
+
|
39
|
+
|
40
|
+
export default config
|
@@ -1,14 +1,16 @@
|
|
1
1
|
import { defineConfig } from 'vite'
|
2
2
|
import path from 'path'
|
3
|
+
import tsconfig from 'vite-plugin-tsconfig'
|
4
|
+
|
3
5
|
// import dts from 'vite-plugin-dts'
|
4
6
|
|
5
7
|
const config = defineConfig({
|
6
8
|
build: {
|
7
9
|
minify: false,
|
8
10
|
lib: {
|
9
|
-
entry: ["
|
10
|
-
name: "woby-
|
11
|
-
formats: ['cjs', 'es'
|
11
|
+
entry: ["index.html"],
|
12
|
+
name: "woby-tooltip",
|
13
|
+
formats: [/*'cjs', '*/'es'/*, 'umd'*/],
|
12
14
|
fileName: (format: string, entryName: string) => `${entryName}.${format}.js`
|
13
15
|
},
|
14
16
|
outDir: './build',
|
@@ -19,13 +21,13 @@ const config = defineConfig({
|
|
19
21
|
},
|
20
22
|
plugins: [
|
21
23
|
// dts({ entryRoot: './src', outputDir: './dist/types' })
|
24
|
+
tsconfig({ filename: 'tsconfig.web.json' })
|
22
25
|
],
|
23
26
|
resolve: {
|
24
27
|
alias: {
|
25
28
|
'~': path.resolve(__dirname, 'src'),
|
26
|
-
'woby/jsx-dev-runtime':
|
27
|
-
'woby/jsx-runtime':
|
28
|
-
'woby': process.argv.includes('dev') ? path.resolve('../woby/src') : 'woby'
|
29
|
+
'woby/jsx-dev-runtime': 'woby',
|
30
|
+
'woby/jsx-runtime': 'woby',
|
29
31
|
},
|
30
32
|
},
|
31
33
|
})
|