@ray-js/lamp-saturation-slider 0.0.3-beta-1 → 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.
@@ -0,0 +1,194 @@
1
+ .rayui-slider {
2
+ --slider-width: 300px;
3
+ --slider-height: 10px;
4
+ --slider-top-position: 2.5px;
5
+ --range-width: 20px;
6
+ --range-left-position: 20px;
7
+ --thumb-height: 24px;
8
+ --thumb-width: 24px;
9
+ --thumb-left-position: 30px;
10
+ --thumb-active-color: #FFFFFF;
11
+
12
+ border-radius: 5px;
13
+ background: #E0E0E0;
14
+ width: var(--slider-width);
15
+ height: var(--slider-height);
16
+ margin: var(--slider-top-position);
17
+ position: relative;
18
+ display: flex;
19
+ align-items: center;
20
+
21
+ .rayui-slider-mask {
22
+ width: 100%;
23
+ height: 100%;
24
+ position: absolute;
25
+ left: 0;
26
+ top: 0;
27
+ background: rgba(0, 0, 0, 0.3);
28
+ border-radius: 16px;
29
+ }
30
+
31
+ &-steps {
32
+ position: absolute;
33
+ left: 0;
34
+ width: 100%;
35
+ height: 100%;
36
+ top: 50%;
37
+ transform: translateY(-50%);
38
+ display: flex;
39
+ justify-content: space-between;
40
+ align-items: center;
41
+
42
+ &-dot {
43
+ width: 4px;
44
+ height: 4px;
45
+ border-radius: 50%;
46
+ background-color: #328EFF;
47
+
48
+ &:first-child {
49
+ opacity: 0;
50
+ }
51
+
52
+ &:last-child {
53
+ opacity: 0;
54
+ }
55
+ }
56
+ }
57
+
58
+ &-bar {
59
+ position: absolute;
60
+ width: var(--range-width);
61
+ height: var(--slider-height);
62
+ background: #328EFF;
63
+ cursor: pointer;
64
+ border-top-left-radius: 5px;
65
+ border-bottom-left-radius: 5px;
66
+ flex-shrink: 0;
67
+ will-change: width;
68
+ overflow: hidden;
69
+
70
+ .rayui-slider-steps-dot {
71
+ background-color: rgba(51, 255, 241, 0.75);
72
+ }
73
+
74
+ &-text {
75
+ position: absolute;
76
+ top: 50%;
77
+ left: 50%;
78
+ transform: translate(-50%, -50%);
79
+ display: inline-block;
80
+ font-size: 12px;
81
+ color: #fff;
82
+ white-space: nowrap;
83
+ }
84
+
85
+ &-steps_wrap {
86
+ position: absolute;
87
+ pointer-events: none;
88
+ top: 0;
89
+ left: 0;
90
+ width: 100%;
91
+ height: 100%;
92
+ }
93
+ }
94
+
95
+ &-thumb {
96
+ position: absolute;
97
+ will-change: left;
98
+
99
+ &-start {
100
+ top: 50%;
101
+ transform: translateY(-50%);
102
+
103
+ &-render {
104
+ width: var(--thumb-width);
105
+ height: var(--thumb-height);
106
+ border-radius: 50%;
107
+ background: var(--thumb-active-color);
108
+ cursor: pointer;
109
+ box-shadow: rgb(0 0 0 / 12%) 0px 0.5px 4px, rgb(0 0 0 / 12%) 0px 6px 13px;
110
+ }
111
+ }
112
+
113
+ &-end {
114
+ top: 50%;
115
+ transform: translateY(-50%);
116
+
117
+ &-render {
118
+ width: var(--thumb-width);
119
+ height: var(--thumb-height);
120
+ border-radius: 50%;
121
+ background: var(--thumb-active-color);
122
+ cursor: pointer;
123
+ box-shadow: rgb(0 0 0 / 12%) 0px 0.5px 4px, rgb(0 0 0 / 12%) 0px 6px 13px;
124
+ }
125
+ }
126
+ }
127
+
128
+ &.reverse {
129
+ .rayui-slider {
130
+ &-bar {
131
+ right: 0;
132
+ left: auto;
133
+ border-top-right-radius: 5px;
134
+ border-bottom-right-radius: 5px;
135
+ }
136
+ }
137
+ }
138
+
139
+ &.vertical {
140
+ height: var(--slider-width);
141
+ width: var(--slider-height);
142
+ align-items: flex-start;
143
+ justify-content: center;
144
+
145
+ .rayui-slider {
146
+ &-steps {
147
+ height: 100%;
148
+ top: 0;
149
+ left: 50%;
150
+ transform: translateX(-50%);
151
+ flex-direction: column;
152
+ align-items: center;
153
+ }
154
+
155
+ &-bar {
156
+ height: var(--range-width);
157
+ width: var(--slider-height);
158
+ top: calc(var(--range-left-position) + var(--thumb-width)/2);
159
+ border-top-right-radius: 5px;
160
+ border-bottom-right-radius: 5px;
161
+ transform: translateX(-50%);
162
+ left: 50%;
163
+ will-change: height;
164
+ }
165
+
166
+ &-thumb {
167
+ will-change: top;
168
+
169
+ &-start {
170
+ left: 50%;
171
+ transform: translateX(-50%);
172
+ }
173
+
174
+ &-end {
175
+ left: 50%;
176
+ transform: translateX(-50%);
177
+ }
178
+ }
179
+ }
180
+ }
181
+
182
+ &.vertical.reverse {
183
+ .rayui-slider {
184
+ &-bar {
185
+ top: auto;
186
+ bottom: 0;
187
+ }
188
+ }
189
+ }
190
+
191
+ &.disabled {
192
+ pointer-events: none;
193
+ }
194
+ }