wini-web-components 2.9.4 → 2.9.6
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 +18 -0
- package/dist/component/slider/slider.d.ts +42 -0
- package/dist/component/slider/slider.d.ts.map +1 -0
- package/dist/index.cjs.js +2 -2
- package/dist/index.es.js +5 -5
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Getting Started with Create React App
|
|
2
|
+
|
|
3
|
+
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
|
|
4
|
+
|
|
5
|
+
## Available Scripts
|
|
6
|
+
|
|
7
|
+
In the project directory, you can run:
|
|
8
|
+
|
|
9
|
+
### `npm i wini-web-components`
|
|
10
|
+
|
|
11
|
+
### Using Skin
|
|
12
|
+
add this cdn link into your App.css file. \
|
|
13
|
+
@import url(https://cdn.jsdelivr.net/gh/WiniGit/web-component@latest/src/skin/root.css); \
|
|
14
|
+
@import url(https://cdn.jsdelivr.net/gh/WiniGit/web-component@latest/src/skin/typography.css); \
|
|
15
|
+
@import url(https://cdn.jsdelivr.net/gh/WiniGit/web-component@latest/src/skin/layout.css);
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
interface SliderProps {
|
|
3
|
+
formatter: (value: number) => string;
|
|
4
|
+
style?: CSSProperties;
|
|
5
|
+
className?: string;
|
|
6
|
+
min?: number;
|
|
7
|
+
max?: number;
|
|
8
|
+
/**
|
|
9
|
+
* Dual thumb mode
|
|
10
|
+
* */
|
|
11
|
+
range?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* The default value of slider. When range is false, use number, otherwise, use [number, number]
|
|
14
|
+
* */
|
|
15
|
+
defaultValue?: number | [number, number];
|
|
16
|
+
/**
|
|
17
|
+
* Reverse the component
|
|
18
|
+
* */
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* default value: 6px
|
|
22
|
+
* */
|
|
23
|
+
rangeBarWidth: number | string;
|
|
24
|
+
marks?: Array<{
|
|
25
|
+
value: number;
|
|
26
|
+
label?: string;
|
|
27
|
+
}>;
|
|
28
|
+
tooltip?: boolean;
|
|
29
|
+
step?: number;
|
|
30
|
+
onChange?: (value: number | [number, number]) => void;
|
|
31
|
+
onChangeComplete?: (value: number | [number, number]) => void;
|
|
32
|
+
}
|
|
33
|
+
export declare function Slider({ min, max, formatter, className, rangeBarWidth, defaultValue, disabled, marks, onChange, onChangeComplete, range, step, style, tooltip }: SliderProps): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
export declare const TooltipElement: ({ rect, tooltip }: {
|
|
35
|
+
rect: any;
|
|
36
|
+
tooltip: {
|
|
37
|
+
message: string;
|
|
38
|
+
position?: "top" | "bottom" | "left" | "right";
|
|
39
|
+
};
|
|
40
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
export {};
|
|
42
|
+
//# sourceMappingURL=slider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slider.d.ts","sourceRoot":"","sources":["../../../src/component/slider/slider.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAA0D,MAAM,OAAO,CAAC;AAI9F,UAAU,WAAW;IACjB,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACrC,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;SAEK;IACL,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;SAEK;IACL,YAAY,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC;;SAEK;IAGL,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;SA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