bge-ui 1.2.1 → 1.2.3

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.js CHANGED
@@ -10625,8 +10625,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
10625
10625
  function setPosition(percent) {
10626
10626
  state.sliderBarStyle = `width: ${percent}%`;
10627
10627
  state.sliderButtonStyle = `left: ${percent}%`;
10628
- state.stopValue = Number((percent / 100 * (Object.values(props.marks).length - 1)).toFixed());
10629
- state.newValue = Number(percent.toFixed());
10628
+ state.stopValue = Math.floor(percent / 100 * (Object.values(props.marks).length - 1));
10629
+ state.newValue = Math.floor(percent);
10630
10630
  emit("input", state.newValue);
10631
10631
  emit("update:modelValue", state.newValue);
10632
10632
  setTimeout(() => {
package/dist/style.css CHANGED
@@ -5,6 +5,7 @@
5
5
  border-radius: var(--radius-small, 4px);
6
6
  padding: 8px 16px;
7
7
  font-size: 14px;
8
+ line-height: 24px;
8
9
  font-weight: 500;
9
10
  border: none;
10
11
  outline: none;
@@ -1006,7 +1007,7 @@ to {
1006
1007
  top: 50%;
1007
1008
  transform: translate(-50%, -50%);
1008
1009
  height: 160px;
1009
- padding: 24px 0;
1010
+ padding: 16px 0;
1010
1011
  overflow: hidden;
1011
1012
  }
1012
1013
  .bge-dialog .bge-dialog__header {
@@ -1453,11 +1454,11 @@ to {
1453
1454
  position: absolute;
1454
1455
  }
1455
1456
  .bge-slider .bge-slider__runway .slider-button-wrapper {
1456
- height: 16px;
1457
- width: 16px;
1457
+ height: 14px;
1458
+ width: 14px;
1458
1459
  position: absolute;
1459
1460
  z-index: 100;
1460
- top: -15px;
1461
+ top: -6px;
1461
1462
  transform: translateX(-50%);
1462
1463
  background-color: transparent;
1463
1464
  text-align: center;
@@ -1466,17 +1467,18 @@ to {
1466
1467
  -ms-user-select: none;
1467
1468
  user-select: none;
1468
1469
  line-height: normal;
1470
+ display: flex;
1471
+ align-items: center;
1472
+ justify-content: center;
1469
1473
  }
1470
1474
  .bge-slider .bge-slider__runway .slider-button-wrapper .slider-button {
1471
1475
  background: var(--bg-slider-selected, #4F5C71);
1472
1476
  position: relative;
1473
- top: 6px;
1474
1477
  width: 14px;
1475
1478
  height: 14px;
1476
1479
  border-radius: 50%;
1477
1480
  transition: 0.2s;
1478
1481
  user-select: none;
1479
- vertical-align: middle;
1480
1482
  display: inline-block;
1481
1483
  }
1482
1484
  .bge-slider .bge-slider__runway .slider-button-wrapper .slider-button:hover {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bge-ui",
3
- "version": "1.2.1",
3
+ "version": "1.2.3",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -148,6 +148,7 @@ defineProps({
148
148
  border-radius: var(--radius-small, 4px);
149
149
  padding: 8px 16px;
150
150
  font-size: 14px;
151
+ line-height: 24px;
151
152
  font-weight: 500;
152
153
  border: none;
153
154
  outline: none;
@@ -132,7 +132,7 @@ function close() {
132
132
  top: 50%;
133
133
  transform: translate(-50%, -50%);
134
134
  height: 160px;
135
- padding: 24px 0;
135
+ padding: 16px 0;
136
136
  overflow: hidden;
137
137
 
138
138
  .bge-dialog__header {
@@ -146,8 +146,8 @@ const tooltip = ref()
146
146
  function setPosition (percent: any) {
147
147
  state.sliderBarStyle = `width: ${percent}%`
148
148
  state.sliderButtonStyle = `left: ${percent}%`
149
- state.stopValue = Number((percent / 100 * (Object.values(props.marks).length - 1)).toFixed())
150
- state.newValue = Number(percent.toFixed())
149
+ state.stopValue = Math.floor(percent / 100 * (Object.values(props.marks).length - 1))
150
+ state.newValue = Math.floor(percent)
151
151
  emit('input', state.newValue)
152
152
  emit('update:modelValue', state.newValue)
153
153
  setTimeout(() => {
@@ -189,11 +189,11 @@ watch(() => props.modelValue, (val: number) => {
189
189
  }
190
190
 
191
191
  .slider-button-wrapper {
192
- height: 16px;
193
- width: 16px;
192
+ height: 14px;
193
+ width: 14px;
194
194
  position: absolute;
195
195
  z-index: 100;
196
- top: -15px;
196
+ top: -6px;
197
197
  transform: translateX(-50%);
198
198
  background-color: transparent;
199
199
  text-align: center;
@@ -202,18 +202,19 @@ watch(() => props.modelValue, (val: number) => {
202
202
  -ms-user-select: none;
203
203
  user-select: none;
204
204
  line-height: normal;
205
+ display: flex;
206
+ align-items: center;
207
+ justify-content: center;
205
208
 
206
209
  .slider-button {
207
210
  // border: solid 4px rgba(255, 214, 51, 0.16);
208
211
  background: var(--bg-slider-selected, #4F5C71);
209
212
  position: relative;
210
- top: 6px;
211
213
  width: 14px;
212
214
  height: 14px;
213
215
  border-radius: 50%;
214
216
  transition: 0.2s;
215
217
  user-select: none;
216
- vertical-align: middle;
217
218
  display: inline-block;
218
219
 
219
220
  &:hover {