bge-ui 1.2.2 → 1.2.4

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/style.css CHANGED
@@ -1432,11 +1432,13 @@ to {
1432
1432
  .bge-radio__inner:hover .border {
1433
1433
  fill: var(--tc-theme);
1434
1434
  }.bge-slider {
1435
- width: 100%;
1436
- height: 32px;
1437
1435
  display: flex;
1438
1436
  align-items: center;
1439
1437
  cursor: pointer;
1438
+ padding: 7px 16px;
1439
+ }
1440
+ .bge-slider.mark {
1441
+ margin-bottom: 32px;
1440
1442
  }
1441
1443
  .bge-slider .bge-slider__runway {
1442
1444
  background: var(--bg-slider, #2E3842);
@@ -1458,7 +1460,7 @@ to {
1458
1460
  width: 14px;
1459
1461
  position: absolute;
1460
1462
  z-index: 100;
1461
- top: -7px;
1463
+ top: -6px;
1462
1464
  transform: translateX(-50%);
1463
1465
  background-color: transparent;
1464
1466
  text-align: center;
@@ -1467,6 +1469,9 @@ to {
1467
1469
  -ms-user-select: none;
1468
1470
  user-select: none;
1469
1471
  line-height: normal;
1472
+ display: flex;
1473
+ align-items: center;
1474
+ justify-content: center;
1470
1475
  }
1471
1476
  .bge-slider .bge-slider__runway .slider-button-wrapper .slider-button {
1472
1477
  background: var(--bg-slider-selected, #4F5C71);
@@ -1503,6 +1508,19 @@ to {
1503
1508
  border-radius: 100%;
1504
1509
  transform: translateX(-50%);
1505
1510
  }
1511
+ .bge-slider .bge-slider__runway .bge-slider__stop .bge-slider__scale {
1512
+ position: absolute;
1513
+ left: -4px;
1514
+ top: 15px;
1515
+ color: var(--tc-tertiary);
1516
+ font-size: 14px;
1517
+ line-height: 24px;
1518
+ font-weight: 500;
1519
+ }
1520
+ .bge-slider .bge-slider__runway .bge-slider__stop:last-child .bge-slider__scale {
1521
+ left: unset;
1522
+ right: -4px;
1523
+ }
1506
1524
  .bge-slider .bge-slider__runway .bge-slider__stops.bge-slider__stop-0 .bge-slider__stop:nth-child(-n+1) {
1507
1525
  background: var(--bg-slider-selected, #4F5C71);
1508
1526
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bge-ui",
3
- "version": "1.2.2",
3
+ "version": "1.2.4",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="bge-slider" @mouseleave="onDragEnd" @click="onSliderClick">
2
+ <div class="bge-slider" :class="{mark: Object.values(marks)[0]}" @mouseleave="onDragEnd" @click="onSliderClick">
3
3
  <div ref="slider" class="bge-slider__runway" >
4
4
  <div class="ui-slider__bar" :style="state.sliderBarStyle"></div>
5
5
  <div class="slider-button-wrapper" :style="state.sliderButtonStyle"
@@ -16,7 +16,9 @@
16
16
  <div v-else class="slider-button" @mouseover="state.hovering = true" @mouseleave="state.hovering = false"></div>
17
17
  </div>
18
18
  <div :class="`bge-slider__stops bge-slider__stop-${state.stopValue}`">
19
- <div v-for="(mark, key) in marks" :key="key" class="bge-slider__stop" :style="`left: ${key}%;`"></div>
19
+ <div v-for="(mark, key) in marks" :key="key" class="bge-slider__stop" :style="`left: ${key}%;`">
20
+ <div class="bge-slider__scale">{{ mark }}</div>
21
+ </div>
20
22
  </div>
21
23
  </div>
22
24
  </div>
@@ -166,11 +168,14 @@ watch(() => props.modelValue, (val: number) => {
166
168
  </script>
167
169
  <style lang="scss">
168
170
  .bge-slider {
169
- width: 100%;
170
- height: 32px;
171
171
  display: flex;
172
172
  align-items: center;
173
173
  cursor: pointer;
174
+ padding: 7px 16px;
175
+
176
+ &.mark {
177
+ margin-bottom: 32px;
178
+ }
174
179
 
175
180
  .bge-slider__runway {
176
181
  background: var(--bg-slider, #2E3842);
@@ -193,7 +198,7 @@ watch(() => props.modelValue, (val: number) => {
193
198
  width: 14px;
194
199
  position: absolute;
195
200
  z-index: 100;
196
- top: -7px;
201
+ top: -6px;
197
202
  transform: translateX(-50%);
198
203
  background-color: transparent;
199
204
  text-align: center;
@@ -202,6 +207,9 @@ watch(() => props.modelValue, (val: number) => {
202
207
  -ms-user-select: none;
203
208
  user-select: none;
204
209
  line-height: normal;
210
+ display: flex;
211
+ align-items: center;
212
+ justify-content: center;
205
213
 
206
214
  .slider-button {
207
215
  // border: solid 4px rgba(255, 214, 51, 0.16);
@@ -242,6 +250,23 @@ watch(() => props.modelValue, (val: number) => {
242
250
  position: absolute;
243
251
  border-radius: 100%;
244
252
  transform: translateX(-50%);
253
+
254
+ .bge-slider__scale {
255
+ position: absolute;
256
+ left: -4px;
257
+ top: 15px;
258
+ color: var(--tc-tertiary);
259
+ font-size: 14px;
260
+ line-height: 24px;
261
+ font-weight: 500;
262
+ }
263
+
264
+ &:last-child {
265
+ .bge-slider__scale {
266
+ left: unset;
267
+ right: -4px;
268
+ }
269
+ }
245
270
  }
246
271
 
247
272
  .bge-slider__stops {