@roku-ui/preset 0.15.2 → 0.16.0
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/dist/index.cjs +932 -7
- package/dist/index.d.ts +1 -4
- package/dist/index.mjs +932 -7
- package/dist/scrollbar.d.ts +63 -0
- package/package.json +7 -5
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { Preset } from 'unocss';
|
|
2
|
+
export interface PresetScrollbarDefaultOption {
|
|
3
|
+
/**
|
|
4
|
+
* default scrollbar width
|
|
5
|
+
* @default '8px'
|
|
6
|
+
*/
|
|
7
|
+
scrollbarWidth?: string;
|
|
8
|
+
/**
|
|
9
|
+
* default scrollbar height
|
|
10
|
+
* @default '8px'
|
|
11
|
+
*/
|
|
12
|
+
scrollbarHeight?: string;
|
|
13
|
+
/**
|
|
14
|
+
* default scrollbar track radius
|
|
15
|
+
* @default '4px'
|
|
16
|
+
*/
|
|
17
|
+
scrollbarTrackRadius?: string;
|
|
18
|
+
/**
|
|
19
|
+
* default scrollbar thumb radius
|
|
20
|
+
* @default '4px'
|
|
21
|
+
*/
|
|
22
|
+
scrollbarThumbRadius?: string;
|
|
23
|
+
/**
|
|
24
|
+
* default scrollbar track background color
|
|
25
|
+
* @default '#f5f5f5'
|
|
26
|
+
*/
|
|
27
|
+
scrollbarTrackColor?: string;
|
|
28
|
+
/**
|
|
29
|
+
* default scrollbar thumb background color
|
|
30
|
+
* @default '#ddd'
|
|
31
|
+
*/
|
|
32
|
+
scrollbarThumbColor?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Apply prefix to all utilities and shortcuts
|
|
35
|
+
*/
|
|
36
|
+
prefix?: string | string[];
|
|
37
|
+
/**
|
|
38
|
+
* css variable prefix
|
|
39
|
+
* @default ''
|
|
40
|
+
*/
|
|
41
|
+
varPrefix?: string;
|
|
42
|
+
/**
|
|
43
|
+
* convert number to unit
|
|
44
|
+
* @default value => `${value / 4}rem`
|
|
45
|
+
* @example
|
|
46
|
+
* numberToUnit: value => `${value / 4}rem`
|
|
47
|
+
* p-4 => padding: 1rem
|
|
48
|
+
* p-4px => padding: 4px
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* numberToUnit: value => `${value}rpx`
|
|
52
|
+
* p-4 => padding: 4rpx
|
|
53
|
+
*/
|
|
54
|
+
numberToUnit?: (value: number) => string;
|
|
55
|
+
/**
|
|
56
|
+
* if false will use scrollbar-color and scrollbar-width, rounded and scrollbar-w, scrollbar-h and scrollbar-radius will not work
|
|
57
|
+
* if true, won't have any effect in Firefox
|
|
58
|
+
*
|
|
59
|
+
* @default true
|
|
60
|
+
*/
|
|
61
|
+
noCompatible?: boolean;
|
|
62
|
+
}
|
|
63
|
+
export declare function presetScrollbar(option?: PresetScrollbarDefaultOption): Preset;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@roku-ui/preset",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.16.0",
|
|
5
5
|
"author": "Jianqi Pan <jannchie@gmail.com>",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -28,21 +28,23 @@
|
|
|
28
28
|
"index.d.ts"
|
|
29
29
|
],
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@jannchie/eslint-config": "^3.4.
|
|
31
|
+
"@jannchie/eslint-config": "^3.4.2",
|
|
32
32
|
"@rollup/plugin-commonjs": "^28.0.1",
|
|
33
33
|
"@rollup/plugin-node-resolve": "^15.3.0",
|
|
34
34
|
"@rollup/plugin-typescript": "^12.1.1",
|
|
35
|
-
"@types/node": "^22.7.
|
|
35
|
+
"@types/node": "^22.7.7",
|
|
36
36
|
"@unocss/preset-icons": "^0.63.4",
|
|
37
|
+
"@unocss/preset-mini": "^0.63.6",
|
|
37
38
|
"@unocss/reset": "^0.63.4",
|
|
38
|
-
"eslint": "^9.
|
|
39
|
+
"eslint": "^9.13.0",
|
|
39
40
|
"eslint-plugin-format": "^0.1.2",
|
|
40
41
|
"rollup": "^4.24.0",
|
|
41
42
|
"rollup-plugin-dts": "^6.1.1",
|
|
42
43
|
"rollup-plugin-import-css": "^3.5.5",
|
|
43
44
|
"rollup-plugin-string": "^3.0.0",
|
|
44
45
|
"typescript": "^5.6.3",
|
|
45
|
-
"unocss": "^0.63.4"
|
|
46
|
+
"unocss": "^0.63.4",
|
|
47
|
+
"unocss-preset-scrollbar": "^0.3.1"
|
|
46
48
|
},
|
|
47
49
|
"scripts": {
|
|
48
50
|
"build": "rollup --config",
|