react-circular-range 1.0.97 → 1.1.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.d.mts +13 -0
- package/dist/index.d.ts +13 -1
- package/dist/index.js +154 -2
- package/dist/index.mjs +132 -0
- package/package.json +23 -32
- package/dist/CircularRange.d.ts +0 -13
- package/dist/index.js.LICENSE.txt +0 -9
- package/dist/styles.css +0 -103
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type StyleSlots = 'knob' | 'knobRing' | 'knobBackground' | 'knobBackgroundPath' | 'knobIndicator' | 'knobCenter' | 'active';
|
|
2
|
+
type CircularRangeThemeProps = Partial<Record<StyleSlots, string>>;
|
|
3
|
+
interface CircularRangeProps {
|
|
4
|
+
min?: number;
|
|
5
|
+
max?: number;
|
|
6
|
+
value?: number;
|
|
7
|
+
step?: number;
|
|
8
|
+
onChange?: (value: number) => void;
|
|
9
|
+
theme: CircularRangeThemeProps;
|
|
10
|
+
}
|
|
11
|
+
declare const CircularRange: React.FC<CircularRangeProps>;
|
|
12
|
+
|
|
13
|
+
export { CircularRange, type CircularRangeProps, type CircularRangeThemeProps, type StyleSlots };
|
package/dist/index.d.ts
CHANGED
|
@@ -1 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
type StyleSlots = 'knob' | 'knobRing' | 'knobBackground' | 'knobBackgroundPath' | 'knobIndicator' | 'knobCenter' | 'active';
|
|
2
|
+
type CircularRangeThemeProps = Partial<Record<StyleSlots, string>>;
|
|
3
|
+
interface CircularRangeProps {
|
|
4
|
+
min?: number;
|
|
5
|
+
max?: number;
|
|
6
|
+
value?: number;
|
|
7
|
+
step?: number;
|
|
8
|
+
onChange?: (value: number) => void;
|
|
9
|
+
theme: CircularRangeThemeProps;
|
|
10
|
+
}
|
|
11
|
+
declare const CircularRange: React.FC<CircularRangeProps>;
|
|
12
|
+
|
|
13
|
+
export { CircularRange, type CircularRangeProps, type CircularRangeThemeProps, type StyleSlots };
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,154 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
CircularRange: () => CircularRange
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(index_exports);
|
|
26
|
+
|
|
27
|
+
// src/CircularRange.tsx
|
|
28
|
+
var import_react = require("react");
|
|
29
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
30
|
+
var ARC_LENGTH = 113.1;
|
|
31
|
+
var CircularRange = ({
|
|
32
|
+
min = 0,
|
|
33
|
+
max = 100,
|
|
34
|
+
value = 0,
|
|
35
|
+
step = 0.01,
|
|
36
|
+
onChange,
|
|
37
|
+
theme
|
|
38
|
+
}) => {
|
|
39
|
+
const knobRef = (0, import_react.useRef)(null);
|
|
40
|
+
const [internalValue, setInternalValue] = (0, import_react.useState)(value);
|
|
41
|
+
const [isActive, setIsActive] = (0, import_react.useState)(false);
|
|
42
|
+
const startY = (0, import_react.useRef)(0);
|
|
43
|
+
const startValue = (0, import_react.useRef)(0);
|
|
44
|
+
const sensitivity = 0.01;
|
|
45
|
+
(0, import_react.useEffect)(() => {
|
|
46
|
+
setInternalValue(value);
|
|
47
|
+
}, [value]);
|
|
48
|
+
const clamp = (v) => Math.min(max, Math.max(min, v));
|
|
49
|
+
const getNormalizedValue = (0, import_react.useCallback)(
|
|
50
|
+
(v) => {
|
|
51
|
+
return (v - min) / (max - min);
|
|
52
|
+
},
|
|
53
|
+
[min, max]
|
|
54
|
+
);
|
|
55
|
+
const setValue = (0, import_react.useCallback)(
|
|
56
|
+
(v) => {
|
|
57
|
+
let next = clamp(v);
|
|
58
|
+
if (step > 0) {
|
|
59
|
+
next = Math.round(next / step) * step;
|
|
60
|
+
}
|
|
61
|
+
setInternalValue(next);
|
|
62
|
+
onChange?.(next);
|
|
63
|
+
},
|
|
64
|
+
[min, max, step, onChange]
|
|
65
|
+
);
|
|
66
|
+
const handleStart = (e) => {
|
|
67
|
+
e.preventDefault();
|
|
68
|
+
setIsActive(true);
|
|
69
|
+
const clientY = "touches" in e ? e.touches[0].clientY : e.clientY;
|
|
70
|
+
startY.current = clientY;
|
|
71
|
+
startValue.current = internalValue;
|
|
72
|
+
};
|
|
73
|
+
const handleMove = (e) => {
|
|
74
|
+
if (!isActive) return;
|
|
75
|
+
e.preventDefault();
|
|
76
|
+
const clientY = "touches" in e ? e.touches[0].clientY : e.clientY;
|
|
77
|
+
const deltaY = startY.current - clientY;
|
|
78
|
+
const deltaValue = deltaY * sensitivity * (max - min);
|
|
79
|
+
setValue(startValue.current + deltaValue);
|
|
80
|
+
};
|
|
81
|
+
const handleEnd = () => {
|
|
82
|
+
setIsActive(false);
|
|
83
|
+
};
|
|
84
|
+
const handleDoubleClick = () => {
|
|
85
|
+
setValue((min + max) / 2);
|
|
86
|
+
};
|
|
87
|
+
(0, import_react.useEffect)(() => {
|
|
88
|
+
const el = knobRef.current;
|
|
89
|
+
if (!el) return;
|
|
90
|
+
el.addEventListener("mousedown", handleStart);
|
|
91
|
+
el.addEventListener("touchstart", handleStart);
|
|
92
|
+
document.addEventListener("mousemove", handleMove);
|
|
93
|
+
document.addEventListener("touchmove", handleMove);
|
|
94
|
+
document.addEventListener("mouseup", handleEnd);
|
|
95
|
+
document.addEventListener("touchend", handleEnd);
|
|
96
|
+
el.addEventListener("dblclick", handleDoubleClick);
|
|
97
|
+
return () => {
|
|
98
|
+
el.removeEventListener("mousedown", handleStart);
|
|
99
|
+
el.removeEventListener("touchstart", handleStart);
|
|
100
|
+
document.removeEventListener("mousemove", handleMove);
|
|
101
|
+
document.removeEventListener("touchmove", handleMove);
|
|
102
|
+
document.removeEventListener("mouseup", handleEnd);
|
|
103
|
+
document.removeEventListener("touchend", handleEnd);
|
|
104
|
+
el.removeEventListener("dblclick", handleDoubleClick);
|
|
105
|
+
};
|
|
106
|
+
}, [handleMove, isActive]);
|
|
107
|
+
const normalized = getNormalizedValue(internalValue);
|
|
108
|
+
const rotation = normalized * 270 - 135;
|
|
109
|
+
const dashOffset = ARC_LENGTH - normalized * ARC_LENGTH;
|
|
110
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
111
|
+
"div",
|
|
112
|
+
{
|
|
113
|
+
ref: knobRef,
|
|
114
|
+
className: `${theme.knob} ${isActive ? theme.active : ""}`,
|
|
115
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: `${theme.knobRing}`, children: [
|
|
116
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
117
|
+
"svg",
|
|
118
|
+
{
|
|
119
|
+
className: `${theme.knobBackground}`,
|
|
120
|
+
viewBox: "0 0 60 60",
|
|
121
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
122
|
+
"path",
|
|
123
|
+
{
|
|
124
|
+
className: `${theme.knobBackgroundPath}`,
|
|
125
|
+
d: "M 30 6 A 24 24 0 1 1 6 30",
|
|
126
|
+
strokeDasharray: ARC_LENGTH,
|
|
127
|
+
strokeDashoffset: dashOffset
|
|
128
|
+
}
|
|
129
|
+
)
|
|
130
|
+
}
|
|
131
|
+
),
|
|
132
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
133
|
+
"div",
|
|
134
|
+
{
|
|
135
|
+
className: `${theme.knobIndicator}`,
|
|
136
|
+
style: {
|
|
137
|
+
transform: `translateX(-50%) rotate(${rotation}deg)`
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
),
|
|
141
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
142
|
+
"div",
|
|
143
|
+
{
|
|
144
|
+
className: `${theme.knobCenter}`
|
|
145
|
+
}
|
|
146
|
+
)
|
|
147
|
+
] })
|
|
148
|
+
}
|
|
149
|
+
);
|
|
150
|
+
};
|
|
151
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
152
|
+
0 && (module.exports = {
|
|
153
|
+
CircularRange
|
|
154
|
+
});
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
// src/CircularRange.tsx
|
|
2
|
+
import {
|
|
3
|
+
useCallback,
|
|
4
|
+
useEffect,
|
|
5
|
+
useRef,
|
|
6
|
+
useState
|
|
7
|
+
} from "react";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
var ARC_LENGTH = 113.1;
|
|
10
|
+
var CircularRange = ({
|
|
11
|
+
min = 0,
|
|
12
|
+
max = 100,
|
|
13
|
+
value = 0,
|
|
14
|
+
step = 0.01,
|
|
15
|
+
onChange,
|
|
16
|
+
theme
|
|
17
|
+
}) => {
|
|
18
|
+
const knobRef = useRef(null);
|
|
19
|
+
const [internalValue, setInternalValue] = useState(value);
|
|
20
|
+
const [isActive, setIsActive] = useState(false);
|
|
21
|
+
const startY = useRef(0);
|
|
22
|
+
const startValue = useRef(0);
|
|
23
|
+
const sensitivity = 0.01;
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
setInternalValue(value);
|
|
26
|
+
}, [value]);
|
|
27
|
+
const clamp = (v) => Math.min(max, Math.max(min, v));
|
|
28
|
+
const getNormalizedValue = useCallback(
|
|
29
|
+
(v) => {
|
|
30
|
+
return (v - min) / (max - min);
|
|
31
|
+
},
|
|
32
|
+
[min, max]
|
|
33
|
+
);
|
|
34
|
+
const setValue = useCallback(
|
|
35
|
+
(v) => {
|
|
36
|
+
let next = clamp(v);
|
|
37
|
+
if (step > 0) {
|
|
38
|
+
next = Math.round(next / step) * step;
|
|
39
|
+
}
|
|
40
|
+
setInternalValue(next);
|
|
41
|
+
onChange?.(next);
|
|
42
|
+
},
|
|
43
|
+
[min, max, step, onChange]
|
|
44
|
+
);
|
|
45
|
+
const handleStart = (e) => {
|
|
46
|
+
e.preventDefault();
|
|
47
|
+
setIsActive(true);
|
|
48
|
+
const clientY = "touches" in e ? e.touches[0].clientY : e.clientY;
|
|
49
|
+
startY.current = clientY;
|
|
50
|
+
startValue.current = internalValue;
|
|
51
|
+
};
|
|
52
|
+
const handleMove = (e) => {
|
|
53
|
+
if (!isActive) return;
|
|
54
|
+
e.preventDefault();
|
|
55
|
+
const clientY = "touches" in e ? e.touches[0].clientY : e.clientY;
|
|
56
|
+
const deltaY = startY.current - clientY;
|
|
57
|
+
const deltaValue = deltaY * sensitivity * (max - min);
|
|
58
|
+
setValue(startValue.current + deltaValue);
|
|
59
|
+
};
|
|
60
|
+
const handleEnd = () => {
|
|
61
|
+
setIsActive(false);
|
|
62
|
+
};
|
|
63
|
+
const handleDoubleClick = () => {
|
|
64
|
+
setValue((min + max) / 2);
|
|
65
|
+
};
|
|
66
|
+
useEffect(() => {
|
|
67
|
+
const el = knobRef.current;
|
|
68
|
+
if (!el) return;
|
|
69
|
+
el.addEventListener("mousedown", handleStart);
|
|
70
|
+
el.addEventListener("touchstart", handleStart);
|
|
71
|
+
document.addEventListener("mousemove", handleMove);
|
|
72
|
+
document.addEventListener("touchmove", handleMove);
|
|
73
|
+
document.addEventListener("mouseup", handleEnd);
|
|
74
|
+
document.addEventListener("touchend", handleEnd);
|
|
75
|
+
el.addEventListener("dblclick", handleDoubleClick);
|
|
76
|
+
return () => {
|
|
77
|
+
el.removeEventListener("mousedown", handleStart);
|
|
78
|
+
el.removeEventListener("touchstart", handleStart);
|
|
79
|
+
document.removeEventListener("mousemove", handleMove);
|
|
80
|
+
document.removeEventListener("touchmove", handleMove);
|
|
81
|
+
document.removeEventListener("mouseup", handleEnd);
|
|
82
|
+
document.removeEventListener("touchend", handleEnd);
|
|
83
|
+
el.removeEventListener("dblclick", handleDoubleClick);
|
|
84
|
+
};
|
|
85
|
+
}, [handleMove, isActive]);
|
|
86
|
+
const normalized = getNormalizedValue(internalValue);
|
|
87
|
+
const rotation = normalized * 270 - 135;
|
|
88
|
+
const dashOffset = ARC_LENGTH - normalized * ARC_LENGTH;
|
|
89
|
+
return /* @__PURE__ */ jsx(
|
|
90
|
+
"div",
|
|
91
|
+
{
|
|
92
|
+
ref: knobRef,
|
|
93
|
+
className: `${theme.knob} ${isActive ? theme.active : ""}`,
|
|
94
|
+
children: /* @__PURE__ */ jsxs("div", { className: `${theme.knobRing}`, children: [
|
|
95
|
+
/* @__PURE__ */ jsx(
|
|
96
|
+
"svg",
|
|
97
|
+
{
|
|
98
|
+
className: `${theme.knobBackground}`,
|
|
99
|
+
viewBox: "0 0 60 60",
|
|
100
|
+
children: /* @__PURE__ */ jsx(
|
|
101
|
+
"path",
|
|
102
|
+
{
|
|
103
|
+
className: `${theme.knobBackgroundPath}`,
|
|
104
|
+
d: "M 30 6 A 24 24 0 1 1 6 30",
|
|
105
|
+
strokeDasharray: ARC_LENGTH,
|
|
106
|
+
strokeDashoffset: dashOffset
|
|
107
|
+
}
|
|
108
|
+
)
|
|
109
|
+
}
|
|
110
|
+
),
|
|
111
|
+
/* @__PURE__ */ jsx(
|
|
112
|
+
"div",
|
|
113
|
+
{
|
|
114
|
+
className: `${theme.knobIndicator}`,
|
|
115
|
+
style: {
|
|
116
|
+
transform: `translateX(-50%) rotate(${rotation}deg)`
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
),
|
|
120
|
+
/* @__PURE__ */ jsx(
|
|
121
|
+
"div",
|
|
122
|
+
{
|
|
123
|
+
className: `${theme.knobCenter}`
|
|
124
|
+
}
|
|
125
|
+
)
|
|
126
|
+
] })
|
|
127
|
+
}
|
|
128
|
+
);
|
|
129
|
+
};
|
|
130
|
+
export {
|
|
131
|
+
CircularRange
|
|
132
|
+
};
|
package/package.json
CHANGED
|
@@ -1,31 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-circular-range",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Simple VST-like circular slider/range.",
|
|
5
|
-
"
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/executable1210/react-circular-range.git"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://github.com/executable1210/react-circular-range",
|
|
11
|
+
"author": {
|
|
12
|
+
"name": "exec",
|
|
13
|
+
"url": "https://github.com/executable1210"
|
|
14
|
+
},
|
|
15
|
+
"main": "./dist/index.cjs",
|
|
6
16
|
"module": "./dist/index.js",
|
|
7
17
|
"types": "./dist/index.d.ts",
|
|
8
|
-
"sideEffects": [
|
|
9
|
-
"*.css",
|
|
10
|
-
"*.module.css"
|
|
11
|
-
],
|
|
12
|
-
"files": [
|
|
13
|
-
"dist"
|
|
14
|
-
],
|
|
15
18
|
"exports": {
|
|
16
19
|
".": {
|
|
17
20
|
"types": "./dist/index.d.ts",
|
|
18
21
|
"import": "./dist/index.js",
|
|
19
|
-
"require": "./dist/index.
|
|
22
|
+
"require": "./dist/index.cjs"
|
|
20
23
|
}
|
|
21
24
|
},
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
"repository": {
|
|
26
|
-
"type": "git",
|
|
27
|
-
"url": "git+https://github.com/executable1210/react-circular-range.git"
|
|
28
|
-
},
|
|
25
|
+
"files": [
|
|
26
|
+
"dist"
|
|
27
|
+
],
|
|
29
28
|
"keywords": [
|
|
30
29
|
"slider",
|
|
31
30
|
"round-slider",
|
|
@@ -35,25 +34,17 @@
|
|
|
35
34
|
"circle-slider",
|
|
36
35
|
"circe-range"
|
|
37
36
|
],
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"url": "https://github.com/executable1210"
|
|
37
|
+
"scripts": {
|
|
38
|
+
"build": "tsup src/index.ts --format esm,cjs --dts"
|
|
41
39
|
},
|
|
42
|
-
"license": "ISC",
|
|
43
|
-
"homepage": "https://github.com/executable1210/react-circular-range#readme",
|
|
44
40
|
"peerDependencies": {
|
|
45
|
-
"react": ">=16",
|
|
46
|
-
"react-dom": ">=16"
|
|
41
|
+
"react": ">=16 <20",
|
|
42
|
+
"react-dom": ">=16 <20"
|
|
47
43
|
},
|
|
48
44
|
"devDependencies": {
|
|
49
45
|
"@types/react": "^19.2.7",
|
|
50
46
|
"@types/react-dom": "^19.2.3",
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"style-loader": "^4.0.0",
|
|
54
|
-
"ts-loader": "^9.5.4",
|
|
55
|
-
"typescript": "^5.9.3",
|
|
56
|
-
"webpack": "^5.104.1",
|
|
57
|
-
"webpack-cli": "^6.0.1"
|
|
47
|
+
"tsup": "^8.5.1",
|
|
48
|
+
"typescript": "^5.9.3"
|
|
58
49
|
}
|
|
59
|
-
}
|
|
50
|
+
}
|
package/dist/CircularRange.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
type StyleSlots = 'knob' | 'knobRing' | 'knobBackground' | 'knobBackgroundPath' | 'knobIndicator' | 'knobCenter' | 'active';
|
|
3
|
-
export type CircularRangeThemeProps = Partial<Record<StyleSlots, string>>;
|
|
4
|
-
export interface CircularRangeProps {
|
|
5
|
-
min?: number;
|
|
6
|
-
max?: number;
|
|
7
|
-
value?: number;
|
|
8
|
-
step?: number;
|
|
9
|
-
onChange?: (value: number) => void;
|
|
10
|
-
theme?: CircularRangeThemeProps;
|
|
11
|
-
}
|
|
12
|
-
export declare const CircularRange: React.FC<CircularRangeProps>;
|
|
13
|
-
export {};
|
package/dist/styles.css
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
.CircularRange-module__knob--BAUKG {
|
|
2
|
-
width: 65px;
|
|
3
|
-
height: 65px;
|
|
4
|
-
position: relative;
|
|
5
|
-
cursor: pointer;
|
|
6
|
-
user-select: none;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.CircularRange-module__knobRing--F6qGP {
|
|
10
|
-
width: 100%;
|
|
11
|
-
height: 100%;
|
|
12
|
-
border: 3px solid #333;
|
|
13
|
-
border-radius: 50%;
|
|
14
|
-
background: linear-gradient(145deg, #1a1a1a, #252525);
|
|
15
|
-
box-shadow:
|
|
16
|
-
inset 2px 2px 5px rgba(0, 0, 0, 0.5),
|
|
17
|
-
inset -2px -2px 5px rgba(60, 60, 60, 0.1),
|
|
18
|
-
0 4px 8px rgba(0, 0, 0, 0.3);
|
|
19
|
-
transition: border-color 0.2s ease, box-shadow 0.2s ease;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.CircularRange-module__knobBackground--qxu1s {
|
|
23
|
-
position: absolute;
|
|
24
|
-
top: 0;
|
|
25
|
-
left: 0;
|
|
26
|
-
width: 100%;
|
|
27
|
-
height: 100%;
|
|
28
|
-
pointer-events: none;
|
|
29
|
-
transform: rotate(-135deg);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.CircularRange-module__knobBackgroundPath--rxKDz {
|
|
33
|
-
fill: none;
|
|
34
|
-
stroke: #8b5cf6;
|
|
35
|
-
stroke-width: 3.5;
|
|
36
|
-
stroke-linecap: round;
|
|
37
|
-
stroke-dasharray: 113.1;
|
|
38
|
-
stroke-dashoffset: 113.1;
|
|
39
|
-
transition: stroke-dashoffset 0.1s ease-out;
|
|
40
|
-
filter: drop-shadow(0 0 3px rgba(139, 92, 246, 0.7));
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.CircularRange-module__knobIndicator--lJKRO {
|
|
44
|
-
position: absolute;
|
|
45
|
-
width: 4px;
|
|
46
|
-
height: 20px;
|
|
47
|
-
background: linear-gradient(to bottom, #8b5cf6, #c084fc);
|
|
48
|
-
top: 5px;
|
|
49
|
-
left: 50%;
|
|
50
|
-
transform-origin: center 27.5px;
|
|
51
|
-
transform: translateX(-50%) rotate(-135deg);
|
|
52
|
-
border-radius: 2px;
|
|
53
|
-
z-index: 2;
|
|
54
|
-
/*transition: transform 0.05s ease-out;*/
|
|
55
|
-
box-shadow: 0 0 6px rgba(139, 92, 246, 0.8);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.CircularRange-module__knobCenter--UIeoG {
|
|
59
|
-
position: absolute;
|
|
60
|
-
width: 18px;
|
|
61
|
-
height: 18px;
|
|
62
|
-
background: radial-gradient(circle, #0a0a0a, #1a1a1a);
|
|
63
|
-
border-radius: 50%;
|
|
64
|
-
top: 50%;
|
|
65
|
-
left: 50%;
|
|
66
|
-
transform: translate(-50%, -50%);
|
|
67
|
-
box-shadow:
|
|
68
|
-
inset 1px 1px 3px rgba(0, 0, 0, 0.7),
|
|
69
|
-
0 1px 2px rgba(139, 92, 246, 0.3);
|
|
70
|
-
z-index: 3;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
/* Hover states */
|
|
74
|
-
.CircularRange-module__knob--BAUKG:hover .CircularRange-module__knobRing--F6qGP {
|
|
75
|
-
border-color: #8b5cf6;
|
|
76
|
-
box-shadow:
|
|
77
|
-
inset 2px 2px 5px rgba(0, 0, 0, 0.5),
|
|
78
|
-
inset -2px -2px 5px rgba(60, 60, 60, 0.1),
|
|
79
|
-
0 4px 12px rgba(139, 92, 246, 0.4);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.CircularRange-module__knob--BAUKG:hover .CircularRange-module__knobIndicator--lJKRO {
|
|
83
|
-
background: linear-gradient(to bottom, #a78bfa, #c084fc);
|
|
84
|
-
box-shadow: 0 0 8px rgba(167, 139, 250, 0.9);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.CircularRange-module__knob--BAUKG.CircularRange-module__active--BqXnY .CircularRange-module__knobRing--F6qGP {
|
|
88
|
-
border-color: #a78bfa;
|
|
89
|
-
box-shadow:
|
|
90
|
-
inset 2px 2px 5px rgba(0, 0, 0, 0.6),
|
|
91
|
-
inset -2px -2px 5px rgba(60, 60, 60, 0.15),
|
|
92
|
-
0 4px 16px rgba(167, 139, 250, 0.5);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.CircularRange-module__knob--BAUKG.CircularRange-module__active--BqXnY .CircularRange-module__knobIndicator--lJKRO {
|
|
96
|
-
background: linear-gradient(to bottom, #a78bfa, #c084fc);
|
|
97
|
-
box-shadow: 0 0 10px rgba(167, 139, 250, 1);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.CircularRange-module__knob--BAUKG.CircularRange-module__active--BqXnY .CircularRange-module__knobBackgroundPath--rxKDz {
|
|
101
|
-
stroke: #a78bfa;
|
|
102
|
-
filter: drop-shadow(0 0 4px rgba(167, 139, 250, 0.9));
|
|
103
|
-
}
|