@ray-js/lamp-style-slider 0.0.2-beta-1

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