@mptw/skylens-ui 1.5.0 → 1.5.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.
Files changed (111) hide show
  1. package/AGENTS.md +59 -0
  2. package/CLAUDE.md +36 -0
  3. package/README.md +7 -7
  4. package/app/app.config.ts +11 -2
  5. package/app/app.vue +5 -0
  6. package/app/assets/css/layout.css +134 -0
  7. package/app/assets/css/main.css +189 -0
  8. package/app/components/SLAlertModal.vue +24 -16
  9. package/app/components/SLBreadcrumbs.vue +12 -8
  10. package/app/components/SLButton.vue +196 -163
  11. package/app/components/SLCalendarButton.vue +40 -34
  12. package/app/components/SLCalendarPopup.vue +79 -53
  13. package/app/components/SLCard.vue +57 -41
  14. package/app/components/SLChart.vue +6 -3
  15. package/app/components/SLCheckbox.vue +92 -49
  16. package/app/components/SLCircleButton.vue +25 -16
  17. package/app/components/SLCollapsableBlock.vue +44 -33
  18. package/app/components/SLCollapsableMulitPillSelect.vue +20 -15
  19. package/app/components/SLConfirmModal.vue +9 -6
  20. package/app/components/SLContextMenu.vue +88 -48
  21. package/app/components/SLDateInput.vue +109 -92
  22. package/app/components/SLDatePicker.vue +9 -7
  23. package/app/components/SLDistributor.vue +1 -1
  24. package/app/components/SLDownloadButton.vue +39 -29
  25. package/app/components/SLDraggable.vue +2 -2
  26. package/app/components/SLDropdown.vue +33 -25
  27. package/app/components/SLDropdownItem.vue +9 -5
  28. package/app/components/SLElementWithTitle.vue +12 -7
  29. package/app/components/SLEyeCheckbox.vue +44 -31
  30. package/app/components/SLFileInput.vue +23 -16
  31. package/app/components/SLGenderAgeSelect.vue +52 -36
  32. package/app/components/SLHourRangeInput.vue +45 -32
  33. package/app/components/SLIOSSwitch.vue +81 -60
  34. package/app/components/SLIcon.vue +4 -3
  35. package/app/components/SLIconButton.vue +31 -29
  36. package/app/components/SLInfoTip.vue +51 -40
  37. package/app/components/SLInsightSitePage.vue +12 -7
  38. package/app/components/SLLegend.vue +19 -12
  39. package/app/components/SLLinearProgressBar.vue +7 -20
  40. package/app/components/SLLink.vue +12 -8
  41. package/app/components/SLLoading.vue +34 -31
  42. package/app/components/SLMapChart.vue +5 -4
  43. package/app/components/SLModal.vue +90 -66
  44. package/app/components/SLMonthCalendarButton.vue +91 -45
  45. package/app/components/SLMonthPicker.vue +42 -37
  46. package/app/components/SLMultiEmailInput.vue +163 -113
  47. package/app/components/SLMultiSelect.vue +37 -26
  48. package/app/components/SLNoData.vue +16 -11
  49. package/app/components/SLNotification.vue +133 -129
  50. package/app/components/SLPageModal.vue +14 -9
  51. package/app/components/SLPagination.vue +45 -33
  52. package/app/components/SLPillCheckbox.vue +50 -42
  53. package/app/components/SLPillLabel.vue +43 -28
  54. package/app/components/SLPopupMenuButton.vue +26 -17
  55. package/app/components/SLProfileButton.vue +28 -20
  56. package/app/components/SLProjectShareItem.vue +30 -17
  57. package/app/components/SLRadioButton.vue +41 -33
  58. package/app/components/SLRadioButtonGroup.vue +28 -23
  59. package/app/components/SLRadioGroup.vue +90 -78
  60. package/app/components/SLRangeInput.vue +53 -38
  61. package/app/components/SLRegionsMapChart.vue +5 -4
  62. package/app/components/SLRightSider.vue +50 -40
  63. package/app/components/SLSearchInput.vue +24 -19
  64. package/app/components/SLSelect.vue +114 -87
  65. package/app/components/SLSelectAllToggle.vue +52 -37
  66. package/app/components/SLSidebarNav.vue +253 -193
  67. package/app/components/SLSidebarNavGroupItem.vue +13 -10
  68. package/app/components/SLSidebarNavGroupItemSection.vue +240 -179
  69. package/app/components/SLSidebarNavLinkItem.vue +131 -109
  70. package/app/components/SLSidebarNavSectionItem.vue +21 -18
  71. package/app/components/SLSitePage.vue +35 -24
  72. package/app/components/SLSkyInsightSitePage.vue +13 -8
  73. package/app/components/SLSortByDropdown.vue +35 -22
  74. package/app/components/SLSpinIcon.vue +6 -3
  75. package/app/components/SLStayRangeInput.vue +47 -36
  76. package/app/components/SLTab.vue +7 -2
  77. package/app/components/SLTable.vue +330 -313
  78. package/app/components/SLTableTooltip.vue +44 -30
  79. package/app/components/SLTabs.vue +333 -280
  80. package/app/components/SLTextInput.vue +162 -134
  81. package/app/components/SLTextarea.vue +40 -29
  82. package/app/components/SLToast.vue +19 -11
  83. package/app/components/SLToggleButton.vue +18 -11
  84. package/app/components/SLTwoLayerMultiSelect.vue +180 -85
  85. package/app/components/SLTwoLayerSelect.vue +47 -37
  86. package/app/components/SLTwoLayerSingleSelect.vue +52 -33
  87. package/app/components/SLWarnModal.vue +9 -7
  88. package/app/interface/commons.ts +7 -0
  89. package/app/utils/index.ts +213 -146
  90. package/eslint.config.js +3 -0
  91. package/nuxt.config.ts +17 -14
  92. package/package.json +9 -8
  93. package/skills-lock.json +59 -0
  94. package/tsconfig.json +1 -6
  95. package/.eslintrc.cjs +0 -4
  96. package/app/assets/css/layout.styl +0 -98
  97. package/app/assets/css/tailwind.css +0 -3
  98. package/app/pages/index.vue +0 -15
  99. package/interface/commons.ts +0 -7
  100. package/tailwind.config.js +0 -271
  101. /package/{interface → app/interface}/IDateRange.ts +0 -0
  102. /package/{interface → app/interface}/IHourRange.ts +0 -0
  103. /package/{interface → app/interface}/IInputOption.ts +0 -0
  104. /package/{interface → app/interface}/ILegendItem.ts +0 -0
  105. /package/{interface → app/interface}/IOrganization.ts +0 -0
  106. /package/{interface → app/interface}/IPopupMenuButton.ts +0 -0
  107. /package/{interface → app/interface}/IStayRange.ts +0 -0
  108. /package/{interface → app/interface}/ITableField.ts +0 -0
  109. /package/{interface → app/interface}/IWeb.ts +0 -0
  110. /package/{interface → app/interface}/NavConfigType.ts +0 -0
  111. /package/{models → app/models}/DateRange.ts +0 -0
@@ -16,7 +16,7 @@
16
16
  </template>
17
17
 
18
18
  <script lang="ts">
19
- import { getUID } from "~ui/utils";
19
+ import { getUID } from "~ui/app/utils";
20
20
 
21
21
  export default defineComponent({
22
22
  name: "SLIOSSwitch",
@@ -104,7 +104,7 @@ export default defineComponent({
104
104
  size.value !== "min"
105
105
  ) {
106
106
  width = Math.ceil(
107
- Math.max(trueLabelRect.width, falseLabelRect.width, elRect.width)
107
+ Math.max(trueLabelRect.width, falseLabelRect.width, elRect.width),
108
108
  );
109
109
  }
110
110
 
@@ -169,85 +169,106 @@ export default defineComponent({
169
169
  });
170
170
  </script>
171
171
 
172
- <style lang="stylus">
173
- .ios-switch
174
- @apply inline-block relative overflow-hidden
172
+ <style>
173
+ @reference '~ui/app/assets/css/main.css';
175
174
 
176
- &.ios-switch-min
177
- label
178
- @apply min-w-0 border-2 text-sm
179
- width 23px
180
- height 23px
175
+ .ios-switch {
176
+ @apply inline-block relative overflow-hidden;
177
+ }
181
178
 
182
- &:before
183
- @apply hidden
179
+ .ios-switch.ios-switch-min label {
180
+ @apply min-w-0 border-2 text-sm;
181
+ width: 23px;
182
+ height: 23px;
183
+ }
184
184
 
185
- .true-label, .false-label
186
- @apply p-0
185
+ .ios-switch.ios-switch-min label::before {
186
+ @apply hidden;
187
+ }
187
188
 
188
- &.ios-switch-sm
189
- label
190
- @apply s('min-w-[52px]') s('h-[28px]') text-sm
189
+ .ios-switch.ios-switch-min label .true-label,
190
+ .ios-switch.ios-switch-min label .false-label {
191
+ @apply p-0;
192
+ }
191
193
 
192
- &:before
193
- @apply s('w-[20px]')
194
+ .ios-switch.ios-switch-sm label {
195
+ @apply min-w-[52px] h-[28px] text-sm;
196
+ }
194
197
 
195
- .true-label
196
- @apply s('pr-[31px]')
198
+ .ios-switch.ios-switch-sm label::before {
199
+ @apply w-[20px];
200
+ }
197
201
 
198
- .false-label
199
- @apply s('pl-[31px]')
202
+ .ios-switch.ios-switch-sm label .true-label {
203
+ @apply pr-[31px];
204
+ }
200
205
 
201
- &.ios-switch-xs
202
- label
203
- @apply s('min-w-[60px]') s('h-[24px]') text-xs
206
+ .ios-switch.ios-switch-sm label .false-label {
207
+ @apply pl-[31px];
208
+ }
204
209
 
205
- &:before
206
- @apply s('inset-y-0.75') s('left-0.75') s('w-[16px]') border border-primary-100 rounded-full shadow-none
210
+ .ios-switch.ios-switch-xs label {
211
+ @apply min-w-[60px] h-[24px] text-xs;
212
+ }
207
213
 
208
- .true-label
209
- @apply s('pr-[27px]')
214
+ .ios-switch.ios-switch-xs label::before {
215
+ @apply inset-y-0.75 left-0.75 w-[16px] border border-primary-100 rounded-full shadow-none;
216
+ }
210
217
 
211
- .false-label
212
- @apply s('pl-[27px]')
218
+ .ios-switch.ios-switch-xs label .true-label {
219
+ @apply pr-[27px];
220
+ }
213
221
 
214
- &.ios-switch-primary-600
215
- input:checked + label
216
- @apply bg-primary-600 border-primary
222
+ .ios-switch.ios-switch-xs label .false-label {
223
+ @apply pl-[27px];
224
+ }
217
225
 
218
- &.ios-switch-primary
219
- label
220
- .false-label
221
- @apply text-primary
226
+ .ios-switch.ios-switch-primary-600 input:checked + label {
227
+ @apply bg-primary-600 border-primary;
228
+ }
222
229
 
223
- input
224
- @apply absolute s('left-1/2') s('top-1/2') transform s('-translate-x-1/2') s('-translate-y-1/2')
230
+ .ios-switch.ios-switch-primary label .false-label {
231
+ @apply text-primary;
232
+ }
225
233
 
226
- label
227
- @apply relative min-w-full s('h-[2.3125rem]') bg-primary-100 border border-primary-200 rounded-full text-base leading-normal align-top cursor-pointer transition-colors
234
+ .ios-switch input {
235
+ @apply absolute left-1/2 top-1/2 transform -translate-x-1/2 -translate-y-1/2;
236
+ }
228
237
 
229
- &:before
230
- content ''
231
- @apply block absolute s('left-0.75') s('inset-y-0.75') s('w-7.25') bg-white rounded-full shadow
238
+ .ios-switch label {
239
+ @apply relative min-w-full h-[2.3125rem] bg-primary-100 border border-primary-200 rounded-full text-base leading-[1.3125] align-top cursor-pointer transition-colors;
240
+ }
232
241
 
233
- span
234
- @apply flex items-center justify-center absolute top-0 left-0 min-w-full h-full whitespace-nowrap
242
+ .ios-switch label::before {
243
+ content: '';
244
+ @apply block absolute left-0.75 inset-y-0.75 w-7.25 bg-white rounded-full shadow-default;
245
+ }
235
246
 
236
- .true-label
237
- @apply pl-2 s('pr-[35px]') text-white opacity-0
247
+ .ios-switch label span {
248
+ @apply flex items-center justify-center absolute top-0 left-0 min-w-full h-full whitespace-nowrap;
249
+ }
238
250
 
239
- .false-label
240
- @apply s('pl-[35px]') pr-2 text-primary-600 opacity-100
251
+ .ios-switch label .true-label {
252
+ @apply pl-2 pr-[35px] text-white opacity-0;
253
+ }
241
254
 
242
- input:checked + label
243
- @apply bg-primary border-primary-800
255
+ .ios-switch label .false-label {
256
+ @apply pl-[35px] pr-2 text-primary-600 opacity-100;
257
+ }
244
258
 
245
- &:before
246
- @apply left-auto s('right-0.75')
259
+ .ios-switch input:checked + label {
260
+ @apply bg-primary border-primary-800;
261
+ }
247
262
 
248
- .true-label
249
- @apply opacity-100
263
+ .ios-switch input:checked + label::before {
264
+ @apply left-auto right-0.75;
265
+ }
250
266
 
251
- .false-label
252
- @apply opacity-0
267
+ .ios-switch input:checked + label .true-label {
268
+ @apply opacity-100;
269
+ }
270
+
271
+ .ios-switch input:checked + label .false-label {
272
+ @apply opacity-0;
273
+ }
253
274
  </style>
@@ -29,7 +29,8 @@ export default defineComponent({
29
29
  });
30
30
  </script>
31
31
 
32
- <style lang="stylus">
33
- i.icon
34
- @apply inline-block leading-none
32
+ <style>
33
+ i.icon {
34
+ @apply inline-block leading-none;
35
+ }
35
36
  </style>
@@ -24,8 +24,7 @@ export default defineComponent({
24
24
  color: {
25
25
  type: String,
26
26
  default: "",
27
- validator: (val: string) =>
28
- ["", "primary", "secondary"].includes(val),
27
+ validator: (val: string) => ["", "primary", "secondary"].includes(val),
29
28
  },
30
29
  variant: {
31
30
  type: String,
@@ -100,31 +99,34 @@ export default defineComponent({
100
99
  });
101
100
  </script>
102
101
 
103
- <style lang="stylus" scoped>
104
- .icon-btn
105
- @apply inline-flex flex-nowrap justify-start items-center s('p-[0.59375rem]') border rounded-full text-base text-white overflow-hidden transition-width duration-300
106
- &:hover
107
- .icon-btn-title
108
- @apply opacity-100
109
-
110
- &.icon-btn--primary
111
- @apply bg-primary border-primary
112
-
113
- &.icon-btn--outline
114
- @apply text-primary
115
-
116
- &.icon-btn--secondary
117
- @apply bg-secondary border-secondary
118
-
119
- &.icon-btn--outline
120
- @apply text-secondary
121
-
122
- &.icon-btn--outline
123
- @apply bg-transparent
124
-
125
- .icon
126
- @apply flex-grow-0 flex-shrink-0
127
-
128
- &-title
129
- @apply flex-grow-0 flex-shrink-0 pl-2 opacity-0 transition-opacity duration-300
102
+ <style scoped>
103
+ @reference '~ui/app/assets/css/main.css';
104
+
105
+ .icon-btn {
106
+ @apply inline-flex flex-nowrap justify-start items-center p-[0.59375rem] border rounded-full text-base text-white overflow-hidden transition-[width] duration-300;
107
+ }
108
+ .icon-btn:hover .icon-btn-title {
109
+ @apply opacity-100;
110
+ }
111
+ .icon-btn.icon-btn--primary {
112
+ @apply bg-primary border-primary;
113
+ }
114
+ .icon-btn.icon-btn--primary.icon-btn--outline {
115
+ @apply text-primary;
116
+ }
117
+ .icon-btn.icon-btn--secondary {
118
+ @apply bg-secondary border-secondary;
119
+ }
120
+ .icon-btn.icon-btn--secondary.icon-btn--outline {
121
+ @apply text-secondary;
122
+ }
123
+ .icon-btn.icon-btn--outline {
124
+ @apply bg-transparent;
125
+ }
126
+ .icon-btn .icon {
127
+ @apply grow-0 shrink-0;
128
+ }
129
+ .icon-btn-title {
130
+ @apply grow-0 shrink-0 pl-2 opacity-0 transition-opacity duration-300;
131
+ }
130
132
  </style>
@@ -79,7 +79,7 @@ export default defineComponent({
79
79
 
80
80
  maxWidth.value = Math.min(
81
81
  365,
82
- windowWidth - toggleRect.left - toggleRect.width - 11
82
+ windowWidth - toggleRect.left - toggleRect.width - 11,
83
83
  );
84
84
  });
85
85
  }
@@ -105,8 +105,8 @@ export default defineComponent({
105
105
  },
106
106
  },
107
107
  {
108
- name: 'preventOverflow',
109
- options: {
108
+ name: "preventOverflow",
109
+ options: {
110
110
  altAxis: true,
111
111
  },
112
112
  },
@@ -118,7 +118,11 @@ export default defineComponent({
118
118
  }
119
119
 
120
120
  function hide() {
121
- if (!popupEl.value || popupEl.value.getAttribute("data-show") === null || isPinned.value)
121
+ if (
122
+ !popupEl.value ||
123
+ popupEl.value.getAttribute("data-show") === null ||
124
+ isPinned.value
125
+ )
122
126
  return;
123
127
  popupEl.value.removeAttribute("data-show");
124
128
  popperInstance.setOptions({
@@ -176,52 +180,59 @@ export default defineComponent({
176
180
  });
177
181
  </script>
178
182
 
179
- <style lang="stylus">
180
- .info-tip
181
- @apply inline-flex ml-2 text-base s('leading-4.5') text-primary s('hover:text-primary-600') cursor-default
183
+ <style>
184
+ @reference '~ui/app/assets/css/main.css';
185
+
186
+ .info-tip {
187
+ @apply inline-flex ml-2 text-base leading-4.5 text-primary hover:text-primary-600 cursor-default;
188
+ }
182
189
 
183
- &--xs
184
- @apply ml-1 text-xs
190
+ .info-tip--xs {
191
+ @apply ml-1 text-xs;
192
+ }
185
193
 
186
- .info-tip-toggle
187
- @apply inline-flex cursor-default
194
+ .info-tip .info-tip-toggle {
195
+ @apply inline-flex cursor-default;
196
+ }
188
197
 
189
- .info
190
- @apply z-10 absolute invisible
198
+ .info-tip .info {
199
+ @apply z-10 absolute invisible;
200
+ }
191
201
 
192
- &[data-popper-placement^='bottom']
193
- @apply pt-1
202
+ .info-tip .info[data-popper-placement^="bottom"] {
203
+ @apply pt-1;
204
+ }
194
205
 
195
- &[data-popper-placement^='right']
196
- @apply pl-3
206
+ .info-tip .info[data-popper-placement^="right"] {
207
+ @apply pl-3;
208
+ }
197
209
 
198
- &[data-show], &.pinned
199
- @apply visible
210
+ .info-tip .info[data-show],
211
+ .info-tip .info.pinned {
212
+ @apply visible;
213
+ }
200
214
 
201
- &.pinned
202
- .info-content
203
- .pin-toggle
204
- &:hover
205
- .icon
206
- &:before
207
- content '\e943'
215
+ .info-tip .info.pinned .info-content .pin-toggle:hover .icon:before {
216
+ content: "\\e943";
217
+ }
208
218
 
209
- .icon
210
- &:before
211
- content '\e943'
219
+ .info-tip .info.pinned .info-content .pin-toggle .icon:before {
220
+ content: "\\e943";
221
+ }
212
222
 
213
- &-content
214
- @apply relative py-5 pl-4 pr-6 border s('border-primary-600/50') rounded-lg bg-white text-sm text-pgray-2 text-left font-normal whitespace-normal shadow-popup-sm
223
+ .info-tip .info-content {
224
+ @apply relative py-5 pl-4 pr-6 border border-primary-600/50 rounded-lg bg-white text-sm text-pgray-2 text-left font-normal whitespace-normal shadow-popup-sm;
225
+ }
215
226
 
216
- .pin-toggle
217
- @apply absolute top-0 right-0 mt-2 mr-2 text-base text-primary-600
227
+ .info-tip .info-content .pin-toggle {
228
+ @apply absolute top-0 right-0 mt-2 mr-2 text-base text-primary-600;
229
+ }
218
230
 
219
- &:hover
220
- .icon
221
- &:before
222
- content '\e967'
231
+ .info-tip .info-content .pin-toggle:hover .icon:before {
232
+ content: "\\e967";
233
+ }
223
234
 
224
- .icon
225
- &:before
226
- content '\e980'
235
+ .info-tip .info-content .pin-toggle .icon:before {
236
+ content: "\\e980";
237
+ }
227
238
  </style>
@@ -15,13 +15,18 @@ export default {
15
15
  };
16
16
  </script>
17
17
 
18
- <style lang="stylus">
19
- .insight-site-page
20
- @apply flex-grow flex flex-col
18
+ <style>
19
+ @reference '~ui/app/assets/css/main.css';
20
+
21
+ .insight-site-page {
22
+ @apply grow flex flex-col;
23
+ }
21
24
 
22
- &-header
23
- @apply s('-mx-4')
25
+ .insight-site-page-header {
26
+ @apply -mx-4;
27
+ }
24
28
 
25
- &-content
26
- @apply flex flex-col flex-grow w-full p-4 rounded bg-primary-50
29
+ .insight-site-page-content {
30
+ @apply flex flex-col grow w-full p-4 rounded bg-primary-50;
31
+ }
27
32
  </style>
@@ -24,7 +24,7 @@
24
24
 
25
25
  <script lang="ts">
26
26
  import type { PropType } from "vue";
27
- import type ILegendItem from "~ui/interface/ILegendItem";
27
+ import type ILegendItem from "~ui/app/interface/ILegendItem";
28
28
 
29
29
  export default defineComponent({
30
30
  name: "SLLegend",
@@ -58,19 +58,26 @@ export default defineComponent({
58
58
  });
59
59
  </script>
60
60
 
61
- <style lang="stylus">
62
- .chart-legend
63
- @apply text-center
61
+ <style>
62
+ @reference '~ui/app/assets/css/main.css';
63
+
64
+ .chart-legend {
65
+ @apply text-center;
66
+ }
64
67
 
65
- &-item
66
- @apply inline-flex items-center mx-2 text-base text-pgray-2
68
+ .chart-legend-item {
69
+ @apply inline-flex items-center mx-2 text-base text-pgray-2;
70
+ }
67
71
 
68
- &.unactive
69
- @apply text-pgray-5
72
+ .chart-legend-item.unactive {
73
+ @apply text-pgray-5;
74
+ }
70
75
 
71
- .item-icon
72
- @apply mr-1
76
+ .chart-legend-item .item-icon {
77
+ @apply mr-1;
78
+ }
73
79
 
74
- .item-marker
75
- @apply inline-block w-3 h-3 mr-1 rounded-full
80
+ .chart-legend-item .item-marker {
81
+ @apply inline-block w-3 h-3 mr-1 rounded-full;
82
+ }
76
83
  </style>
@@ -9,27 +9,14 @@ export default defineComponent({
9
9
  });
10
10
  </script>
11
11
 
12
- <style lang="stylus" scoped>
13
- .linear-progress-bar
14
- @apply w-full h-2 overflow-hidden
15
- background-color #D3D3D3
16
- border-radius 1px
12
+ <style scoped>
13
+ @reference '~ui/app/assets/css/main.css';
17
14
 
18
- &-value
19
- @apply w-full h-full
20
- background linear-gradient(270deg, rgba(211, 211, 211, 0.62) 0.08%, #E1E1E1 46.69%, rgba(211, 211, 211, 0.62) 100%)
21
- animation indeterminateAnimation 1s infinite linear
22
- transform-origin 0% 50%
15
+ .linear-progress-bar {
16
+ @apply w-full h-2 bg-[#D3D3D3] rounded-[1px] overflow-hidden;
17
+ }
23
18
 
24
- @keyframes indeterminateAnimation {
25
- 0% {
26
- transform translateX(0) scaleX(0)
27
- }
28
- 40% {
29
- transform translateX(0) scaleX(0.4)
30
- }
31
- 100% {
32
- transform translateX(100%) scaleX(0.5)
33
- }
19
+ .linear-progress-bar-value {
20
+ @apply w-full h-full bg-linear-progress-bar animate-indeterminate origin-[0%_50%];
34
21
  }
35
22
  </style>
@@ -149,14 +149,18 @@ export default defineComponent({
149
149
  });
150
150
  </script>
151
151
 
152
- <style lang="stylus">
153
- .sl-link
154
- *
155
- @apply pointer-events-none
152
+ <style>
153
+ @reference '~ui/app/assets/css/main.css';
156
154
 
157
- &-tooltip
158
- @apply p-1 bg-pgray-2 text-xs text-white whitespace-nowrap shadow invisible
155
+ .sl-link * {
156
+ @apply pointer-events-none;
157
+ }
159
158
 
160
- &[data-show]
161
- @apply visible
159
+ .sl-link-tooltip {
160
+ @apply p-1 bg-pgray-2 text-xs text-white whitespace-nowrap shadow-default invisible;
161
+ }
162
+
163
+ .sl-link-tooltip[data-show] {
164
+ @apply visible;
165
+ }
162
166
  </style>
@@ -27,7 +27,8 @@ export default defineComponent({
27
27
  color: {
28
28
  type: String,
29
29
  default: "primary",
30
- validator: (value: string) => ["primary", "highlight-500"].includes(value),
30
+ validator: (value: string) =>
31
+ ["primary", "highlight-500"].includes(value),
31
32
  },
32
33
  bgAlpha: {
33
34
  type: Number,
@@ -84,44 +85,46 @@ export default defineComponent({
84
85
  });
85
86
  </script>
86
87
 
87
- <style lang="stylus">
88
- .loading-modal
89
- @apply z-10
88
+ <style>
89
+ @reference '~ui/app/assets/css/main.css';
90
90
 
91
- &-primary
92
- @apply s('bg-primary-300/20')
91
+ .loading-modal {
92
+ @apply z-10;
93
+ }
93
94
 
94
- .loading
95
- div
96
- border-color theme('colors.primary.DEFAULT') transparent transparent transparent
97
-
98
- &-highlight-500
99
- @apply s('bg-highlight-500/20')
95
+ .loading-modal-primary {
96
+ @apply bg-primary-300/20;
97
+ }
100
98
 
101
- .loading
102
- div
103
- border-color theme('colors.highlight.500') transparent transparent transparent
99
+ .loading-modal-primary .loading div {
100
+ border-color: var(--color-primary) transparent transparent transparent;
101
+ }
104
102
 
105
- .loading
106
- @apply relative inline-block w-12 h-12
103
+ .loading-modal-highlight-500 {
104
+ @apply bg-highlight-500/20;
105
+ }
107
106
 
108
- div
109
- @apply absolute block w-8 h-8 m-2 border-4 rounded-full
110
- animation loading 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite
107
+ .loading-modal-highlight-500 .loading div {
108
+ border-color: var(--color-highlight-500) transparent transparent transparent;
109
+ }
111
110
 
112
- &:nth-child(1)
113
- animation-delay -0.45s
111
+ .loading-modal .loading {
112
+ @apply relative inline-block w-12 h-12;
113
+ }
114
114
 
115
- &:nth-child(2)
116
- animation-delay -0.3s
115
+ .loading-modal .loading div {
116
+ @apply absolute block w-8 h-8 m-2 border-4 rounded-full animate-loading;
117
+ }
117
118
 
118
- &:nth-child(3)
119
- animation-delay -0.15s
119
+ .loading-modal .loading div:nth-child(1) {
120
+ animation-delay: -0.45s;
121
+ }
120
122
 
121
- @keyframes loading
122
- 0%
123
- transform rotate(0deg)
123
+ .loading-modal .loading div:nth-child(2) {
124
+ animation-delay: -0.3s;
125
+ }
124
126
 
125
- 100%
126
- transform rotate(360deg)
127
+ .loading-modal .loading div:nth-child(3) {
128
+ animation-delay: -0.15s;
129
+ }
127
130
  </style>
@@ -1,5 +1,5 @@
1
1
  <template lang="pug">
2
- .chart
2
+ .map-chart
3
3
  ECharts(
4
4
  :loading="loading"
5
5
  :option="formatedOption"
@@ -166,7 +166,8 @@ export default defineComponent({
166
166
  });
167
167
  </script>
168
168
 
169
- <style lang="stylus">
170
- .chart
171
- @apply h-52
169
+ <style scoped>
170
+ .map-chart {
171
+ @apply h-52;
172
+ }
172
173
  </style>