@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
@@ -23,7 +23,8 @@ export default defineComponent({
23
23
  size: {
24
24
  type: String,
25
25
  default: "",
26
- validator: (val: string) => ["", "lg", "md", "sm", "xs", 'xxs'].includes(val),
26
+ validator: (val: string) =>
27
+ ["", "lg", "md", "sm", "xs", "xxs"].includes(val),
27
28
  },
28
29
  color: {
29
30
  type: String,
@@ -108,230 +109,262 @@ export default defineComponent({
108
109
  });
109
110
  </script>
110
111
 
111
- <style lang="stylus">
112
- .btn
113
- @apply relative inline-flex items-center justify-center s("p-1.75") border border-transparent rounded bg-transparent text-base leading-normal s("focus:outline-none")
114
-
115
- &.btn-lg
116
- @apply s("px-7.75")
112
+ <style>
113
+ @reference '~ui/app/assets/css/main.css';
117
114
 
118
- &.btn-md
119
- @apply s("px-3.75")
115
+ .btn {
116
+ @apply relative inline-flex items-center justify-center p-1.75 border border-transparent rounded bg-transparent text-base leading-[1.3125] focus:outline-none;
117
+ }
120
118
 
121
- &.btn-sm
122
- @apply s("py-0.75") s("px-1.75")
119
+ .btn.btn-lg {
120
+ @apply px-7.75;
121
+ }
123
122
 
124
- .btn-content
125
- @apply space-x-1
123
+ .btn.btn-md {
124
+ @apply px-3.75;
125
+ }
126
126
 
127
- &.btn-xs
128
- @apply s("py-0.75") s("px-1.75") text-xs
127
+ .btn.btn-sm {
128
+ @apply py-0.75 px-1.75;
129
+ }
129
130
 
130
- .btn-content
131
- @apply space-x-1
131
+ .btn.btn-sm .btn-content {
132
+ @apply space-x-1;
133
+ }
132
134
 
133
- &.btn-xxs
134
- @apply s("p-0.75") text-sm
135
+ .btn.btn-xs {
136
+ @apply py-0.75 px-1.75 text-xs;
137
+ }
135
138
 
136
- .btn-content
137
- @apply space-x-1
139
+ .btn.btn-xs .btn-content {
140
+ @apply space-x-1;
141
+ }
138
142
 
139
- .icon.btn-icon
140
- @apply text-sm leading-none
143
+ .btn.btn-xxs {
144
+ @apply p-0.75 text-sm;
145
+ }
141
146
 
142
- &-white
143
- @apply bg-white border-white text-pgray-2 s("hover:bg-white") s("hover:border-white")
147
+ .btn.btn-xxs .btn-content {
148
+ @apply space-x-1;
149
+ }
144
150
 
145
- &.btn-outline
146
- @apply text-pgray-2 s("hover:text-pgray-2")
151
+ .btn.btn-xxs .btn-content .icon.btn-icon {
152
+ @apply text-sm leading-none;
153
+ }
147
154
 
148
- .btn-loading
149
- .loading
150
- div
151
- border-color white transparent transparent transparent
155
+ .btn-white {
156
+ @apply bg-white border-white text-pgray-2 hover:bg-white hover:border-white;
157
+ }
152
158
 
153
- &-primary
154
- @apply bg-primary border-primary text-white s("hover:bg-primary-800") s("hover:border-primary-800")
159
+ .btn-white.btn-outline {
160
+ @apply text-pgray-2 hover:text-pgray-2;
161
+ }
155
162
 
156
- &.btn-outline
157
- @apply text-primary s("hover:text-primary-800")
163
+ .btn-white .btn-loading .loading div {
164
+ border-color: white transparent transparent transparent;
165
+ }
158
166
 
159
- .btn-loading
160
- .loading
161
- div
162
- border-color theme('colors.primary.DEFAULT') transparent transparent transparent
167
+ .btn-primary {
168
+ @apply bg-primary border-primary text-white hover:bg-primary-800 hover:border-primary-800;
169
+ }
163
170
 
164
- &-primary-600
165
- @apply bg-primary-600 border-primary-600 text-white s("hover:bg-primary") s("hover:border-primary")
171
+ .btn-primary.btn-outline {
172
+ @apply text-primary hover:text-primary-800;
173
+ }
166
174
 
167
- &.btn-outline
168
- @apply text-primary-600 s("hover:text-primary")
175
+ .btn-primary .btn-loading .loading div {
176
+ border-color: var(--color-primary) transparent transparent transparent;
177
+ }
169
178
 
170
- .btn-loading
171
- .loading
172
- div
173
- border-color theme('colors.primary.600') transparent transparent transparent
179
+ .btn-primary-600 {
180
+ @apply bg-primary-600 border-primary-600 text-white hover:bg-primary hover:border-primary;
181
+ }
174
182
 
175
- &-highlight-500
176
- @apply bg-highlight-500 border-highlight-500 text-white s("hover:bg-highlight-400") s("hover:text-white") s("hover:border-highlight-400")
183
+ .btn-primary-600.btn-outline {
184
+ @apply text-primary-600 hover:text-primary;
185
+ }
177
186
 
178
- &.btn-outline
179
- @apply text-highlight-500 s("hover:text-highlight-400")
187
+ .btn-primary-600 .btn-loading .loading div {
188
+ border-color: var(--color-primary-600) transparent transparent transparent;
189
+ }
180
190
 
181
- .btn-loading
182
- .loading
183
- div
184
- border-color theme('colors.highlight.400') transparent transparent transparent
191
+ .btn-highlight-500 {
192
+ @apply bg-highlight-500 border-highlight-500 text-white hover:bg-highlight-400 hover:text-white hover:border-highlight-400;
193
+ }
185
194
 
186
- &-third
187
- @apply bg-third border-third text-white s("hover:bg-third-600") s("hover:text-white") s("hover:border-third-600")
195
+ .btn-highlight-500.btn-outline {
196
+ @apply text-highlight-500 hover:text-highlight-400;
197
+ }
188
198
 
189
- &.btn-outline
190
- @apply text-third s("hover:text-third-600")
199
+ .btn-highlight-500 .btn-loading .loading div {
200
+ border-color: var(--color-highlight-400) transparent transparent transparent;
201
+ }
191
202
 
192
- .btn-loading
193
- .loading
194
- div
195
- border-color theme('colors.third.600') transparent transparent transparent
203
+ .btn-third {
204
+ @apply bg-third border-third text-white hover:bg-third-600 hover:text-white hover:border-third-600;
205
+ }
196
206
 
197
- &-danger
198
- @apply bg-danger border-danger text-white s("hover:bg-danger-light") s("hover:border-danger-light")
207
+ .btn-third.btn-outline {
208
+ @apply text-third hover:text-third-600;
209
+ }
199
210
 
200
- &.btn-outline
201
- @apply text-danger s("hover:text-danger-light")
211
+ .btn-third .btn-loading .loading div {
212
+ border-color: var(--color-third-600) transparent transparent transparent;
213
+ }
202
214
 
203
- .btn-loading
204
- .loading
205
- div
206
- border-color theme('colors.danger.light') transparent transparent transparent
215
+ .btn-danger {
216
+ @apply bg-danger border-danger text-white hover:bg-danger-light hover:border-danger-light;
217
+ }
207
218
 
208
- &-pgray-5
209
- @apply bg-pgray-5 border-pgray-5 text-pgray-2 s("hover:bg-pgray-4.5") s("hover:border-pgray-4.5")
219
+ .btn-danger.btn-outline {
220
+ @apply text-danger hover:text-danger-light;
221
+ }
210
222
 
211
- &.btn-outline
212
- @apply text-pgray-5 s("hover:text-pgray-4.5")
223
+ .btn-danger .btn-loading .loading div {
224
+ border-color: var(--color-danger-light) transparent transparent transparent;
225
+ }
213
226
 
214
- .btn-loading
215
- .loading
216
- div
217
- border-color theme('colors.pgray[4.5]') transparent transparent transparent
227
+ .btn-pgray-5 {
228
+ @apply bg-pgray-5 border-pgray-5 text-pgray-2 hover:bg-pgray-4p5 hover:border-pgray-4p5;
229
+ }
218
230
 
219
- &-pgray-2
220
- @apply bg-pgray-2 border-pgray-2 text-white s("hover:bg-pgray-3") s("hover:border-pgray-3")
231
+ .btn-pgray-5.btn-outline {
232
+ @apply text-pgray-5 hover:text-pgray-4p5;
233
+ }
221
234
 
222
- &.btn-outline
223
- @apply text-pgray-2 s("hover:text-pgray-3")
235
+ .btn-pgray-5 .btn-loading .loading div {
236
+ border-color: var(--color-pgray-4p5) transparent transparent transparent;
237
+ }
224
238
 
225
- .btn-loading
226
- .loading
227
- div
228
- border-color theme('colors.pgray.3') transparent transparent transparent
239
+ .btn-pgray-2 {
240
+ @apply bg-pgray-2 border-pgray-2 text-white hover:bg-pgray-3 hover:border-pgray-3;
241
+ }
229
242
 
230
- &-secondary
231
- @apply bg-secondary border-secondary text-white s("hover:bg-secondary-800") s("hover:border-secondary-800")
243
+ .btn-pgray-2.btn-outline {
244
+ @apply text-pgray-2 hover:text-pgray-3;
245
+ }
232
246
 
233
- &.btn-outline
234
- @apply text-secondary s("hover:text-secondary-800")
247
+ .btn-pgray-2 .btn-loading .loading div {
248
+ border-color: var(--color-pgray-3) transparent transparent transparent;
249
+ }
235
250
 
236
- .btn-loading
237
- .loading
238
- div
239
- border-color theme('colors.secondary.500') transparent transparent transparent
251
+ .btn-secondary {
252
+ @apply bg-secondary border-secondary text-white hover:bg-secondary-800 hover:border-secondary-800;
253
+ }
240
254
 
241
- &-secondary-200
242
- @apply bg-secondary-200 border-secondary-200 text-secondary s("hover:bg-secondary") s("hover:border-secondary") s("hover:text-white")
255
+ .btn-secondary.btn-outline {
256
+ @apply text-secondary hover:text-secondary-800;
257
+ }
243
258
 
244
- &.btn-outline
245
- @apply text-secondary-200 s("hover:text-secondary")
259
+ .btn-secondary .btn-loading .loading div {
260
+ border-color: var(--color-secondary-500) transparent transparent transparent;
261
+ }
246
262
 
247
- .btn-loading
248
- .loading
249
- div
250
- border-color theme('colors.secondary.500') transparent transparent transparent
263
+ .btn-secondary-200 {
264
+ @apply bg-secondary-200 border-secondary-200 text-secondary hover:bg-secondary hover:border-secondary hover:text-white;
265
+ }
251
266
 
252
- &-secondary-600
253
- @apply bg-secondary-600 border-secondary-600 text-white s("hover:bg-secondary") s("hover:border-secondary")
267
+ .btn-secondary-200.btn-outline {
268
+ @apply text-secondary-200 hover:text-secondary;
269
+ }
254
270
 
255
- &.btn-outline
256
- @apply text-secondary-600 s("hover:text-secondary")
271
+ .btn-secondary-200 .btn-loading .loading div {
272
+ border-color: var(--color-secondary-500) transparent transparent transparent;
273
+ }
257
274
 
258
- .btn-loading
259
- .loading
260
- div
261
- border-color theme('colors.secondary.500') transparent transparent transparent
275
+ .btn-secondary-600 {
276
+ @apply bg-secondary-600 border-secondary-600 text-white hover:bg-secondary hover:border-secondary;
277
+ }
262
278
 
263
- &-blue-1
264
- @apply bg-secondary border-secondary text-white s("hover:bg-blue-1") s("hover:border-blue-1")
279
+ .btn-secondary-600.btn-outline {
280
+ @apply text-secondary-600 hover:text-secondary;
281
+ }
265
282
 
266
- &.btn-outline
267
- @apply text-blue-1 s("hover:text-blue-1")
283
+ .btn-secondary-600 .btn-loading .loading div {
284
+ border-color: var(--color-secondary-500) transparent transparent transparent;
285
+ }
268
286
 
269
- .btn-loading
270
- .loading
271
- div
272
- border-color theme('colors.blue.1') transparent transparent transparent
287
+ .btn-blue-1 {
288
+ @apply bg-secondary border-secondary text-white hover:bg-blue-1 hover:border-blue-1;
289
+ }
273
290
 
274
- &-insight-title-line
275
- @apply bg-insight-title-line border-insight-title-line text-white s("hover:bg-insight-title-line") s("hover:border-insight-title-line")
291
+ .btn-blue-1.btn-outline {
292
+ @apply text-blue-1 hover:text-blue-1;
293
+ }
276
294
 
277
- &.btn-outline
278
- @apply text-insight-title s("hover:text-insight-title")
295
+ .btn-blue-1 .btn-loading .loading div {
296
+ border-color: var(--color-blue-1) transparent transparent transparent;
297
+ }
279
298
 
280
- .btn-loading
281
- .loading
282
- div
283
- border-color theme('colors.blue.1') transparent transparent transparent
299
+ .btn-insight-title-line {
300
+ @apply bg-insight-title-line border-insight-title-line text-white hover:bg-insight-title-line hover:border-insight-title-line;
301
+ }
284
302
 
285
- &-outline
286
- @apply bg-transparent border s("hover:bg-white")
303
+ .btn-insight-title-line.btn-outline {
304
+ @apply text-insight-title hover:text-insight-title;
305
+ }
287
306
 
288
- &-disabled
289
- @apply bg-pgray-5 border-pgray-5 text-white cursor-default s("hover:bg-pgray-5") s("hover:border-pgray-5") s("hover:text-white")
307
+ .btn-insight-title-line .btn-loading .loading div {
308
+ border-color: var(--color-blue-1) transparent transparent transparent;
309
+ }
290
310
 
291
- &.btn-outline
292
- @apply bg-white border-pgray-5 text-pgray-5 s("hover:bg-white") s("hover:border-pgray-5") s("hover:text-pgray-5")
311
+ .btn-outline {
312
+ @apply bg-transparent border hover:bg-white;
313
+ }
293
314
 
294
- &.btn-icon
295
- @apply bg-transparent border-transparent text-pgray-5 s("hover:bg-transparent") s("hover:border-transparent") s("hover:text-pgray-5")
315
+ .btn-disabled {
316
+ @apply bg-pgray-5 border-pgray-5 text-white cursor-default hover:bg-pgray-5 hover:border-pgray-5 hover:text-white;
317
+ }
296
318
 
297
- &.loading
298
- @apply bg-primary-200 border-primary-200 cursor-default
319
+ .btn-disabled.btn-outline {
320
+ @apply bg-white border-pgray-5 text-pgray-5 hover:bg-white hover:border-pgray-5 hover:text-pgray-5;
321
+ }
299
322
 
300
- .btn-content
301
- @apply opacity-0
323
+ .btn-disabled.btn-icon {
324
+ @apply bg-transparent border-transparent text-pgray-5 hover:bg-transparent hover:border-transparent hover:text-pgray-5;
325
+ }
302
326
 
303
- .btn-loading
304
- @apply block
327
+ .btn.loading {
328
+ @apply bg-primary-200 border-primary-200 cursor-default;
329
+ }
305
330
 
306
- .btn-content
307
- @apply inline-flex items-center space-x-1
331
+ .btn.loading .btn-content {
332
+ @apply opacity-0;
333
+ }
308
334
 
309
- .icon.btn-icon
310
- @apply inline-flex text-xs leading-none
335
+ .btn.loading .btn-loading {
336
+ @apply block;
337
+ }
311
338
 
312
- .btn-loading
313
- @apply absolute s('top-1/2') s('left-1/2') w-4 h-4 s('-translate-x-1/2') s('-translate-y-1/2') pointer-events-none hidden
339
+ .btn-content {
340
+ @apply inline-flex items-center space-x-1;
341
+ }
314
342
 
315
- .loading
316
- @apply relative inline-block w-4 h-4
343
+ .btn-content .icon.btn-icon {
344
+ @apply inline-flex text-xs leading-none;
345
+ }
317
346
 
318
- div
319
- @apply absolute block w-4 h-4 border-2 rounded-full
320
- animation loading 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite
347
+ .btn-loading {
348
+ @apply absolute top-1/2 left-1/2 w-4 h-4 -translate-x-1/2 -translate-y-1/2 pointer-events-none hidden;
349
+ }
321
350
 
322
- &:nth-child(1)
323
- animation-delay -0.45s
351
+ .btn-loading .loading {
352
+ @apply relative inline-block w-4 h-4;
353
+ }
324
354
 
325
- &:nth-child(2)
326
- animation-delay -0.3s
355
+ .btn-loading .loading div {
356
+ @apply absolute block w-4 h-4 border-2 rounded-full animate-loading;
357
+ }
327
358
 
328
- &:nth-child(3)
329
- animation-delay -0.15s
359
+ .btn-loading .loading div:nth-child(1) {
360
+ animation-delay: -0.45s;
361
+ }
330
362
 
331
- @keyframes loading
332
- 0%
333
- transform rotate(0deg)
363
+ .btn-loading .loading div:nth-child(2) {
364
+ animation-delay: -0.3s;
365
+ }
334
366
 
335
- 100%
336
- transform rotate(360deg)
367
+ .btn-loading .loading div:nth-child(3) {
368
+ animation-delay: -0.15s;
369
+ }
337
370
  </style>
@@ -40,9 +40,9 @@ import { fromEvent } from "rxjs";
40
40
  import { differenceInCalendarDays, subDays } from "date-fns";
41
41
  import { createPopper } from "@popperjs/core";
42
42
  import type { Placement } from "@popperjs/core";
43
- import DateRange from "~ui/models/DateRange";
44
- import type IDateRange from "~ui/interface/IDateRange";
45
- import { OnlineSourceType } from "~ui/interface/IWeb";
43
+ import DateRange from "~ui/app/models/DateRange";
44
+ import type IDateRange from "~ui/app/interface/IDateRange";
45
+ import { OnlineSourceType } from "~ui/app/interface/IWeb";
46
46
 
47
47
  type SLCalendarPopupType = InstanceType<typeof SLCalendarPopup>;
48
48
 
@@ -60,12 +60,7 @@ export default defineComponent({
60
60
  },
61
61
  allowQuicks: {
62
62
  type: Array as PropType<Array<string>>,
63
- default: () => [
64
- 'last7Days',
65
- 'last30Days',
66
- 'last90Days',
67
- 'lastMonth'
68
- ],
63
+ default: () => ["last7Days", "last30Days", "last90Days", "lastMonth"],
69
64
  },
70
65
  showCompareSwitch: {
71
66
  type: Boolean,
@@ -165,7 +160,7 @@ export default defineComponent({
165
160
  },
166
161
  },
167
162
  { name: "eventListeners", enabled: true },
168
- { name: 'preventOverflow', options: { altAxis: true } },
163
+ { name: "preventOverflow", options: { altAxis: true } },
169
164
  ],
170
165
  });
171
166
 
@@ -214,9 +209,9 @@ export default defineComponent({
214
209
  placement: placement.value as Placement,
215
210
  modifiers: [
216
211
  { name: "eventListeners", enabled: false },
217
- { name: 'preventOverflow', options: { altAxis: true } },
212
+ { name: "preventOverflow", options: { altAxis: true } },
218
213
  ],
219
- }
214
+ },
220
215
  );
221
216
  }
222
217
  });
@@ -245,35 +240,46 @@ export default defineComponent({
245
240
  });
246
241
  </script>
247
242
 
248
- <style lang="stylus" scoped>
249
- .calendar-button
250
- @apply inline-block
243
+ <style scoped>
244
+ @reference '~ui/app/assets/css/main.css';
251
245
 
252
- &.calendar-button--compact
253
- .toggle-button
254
- @apply s('h-[37px]')
246
+ .calendar-button {
247
+ @apply inline-block;
248
+ }
255
249
 
256
- .toggle-button
257
- @apply inline-flex flex-col justify-center s('h-[58px]') s('px-2.75') space-y-1 border s('border-white/20') rounded bg-white text-sm leading-normal text-pgray-2
250
+ .calendar-button.calendar-button--compact .toggle-button {
251
+ @apply h-[37px];
252
+ }
258
253
 
259
- .date-range
260
- @apply flex items-center
254
+ .calendar-button .toggle-button {
255
+ @apply inline-flex flex-col justify-center h-[58px] px-2.75 space-y-1 border border-white/20 rounded bg-white text-sm leading-[1.3125] text-pgray-2;
256
+ }
257
+
258
+ .calendar-button .toggle-button .date-range {
259
+ @apply flex items-center;
260
+ }
261
261
 
262
- .icon
263
- @apply flex-grow-0 flex-shrink-0 text-base text-primary leading-none
262
+ .calendar-button .toggle-button .date-range .icon {
263
+ @apply grow-0 shrink-0 text-base text-primary leading-none;
264
+ }
264
265
 
265
- .divider
266
- @apply flex-grow-0 flex-shrink-0 block w-px s('h-4.75') ml-2 s('mr-1.75') bg-primary
266
+ .calendar-button .toggle-button .date-range .divider {
267
+ @apply grow-0 shrink-0 block w-px h-4.75 ml-2 mr-1.75 bg-primary;
268
+ }
267
269
 
268
- .range-days
269
- @apply block s('ml-0.5') px-1 s('py-0.5') bg-primary-50 rounded text-xs text-primary
270
+ .calendar-button .toggle-button .date-range .range-days {
271
+ @apply block ml-0.5 px-1 py-0.5 bg-primary-50 rounded text-xs text-primary;
272
+ }
270
273
 
271
- .compare-date-range
272
- @apply pl-1 space-x-2 text-sm text-pgray-3
274
+ .calendar-button .toggle-button .compare-date-range {
275
+ @apply pl-1 space-x-2 text-sm text-pgray-3;
276
+ }
273
277
 
274
- .calendar-popup
275
- @apply z-60 absolute invisible pointer-events-none
278
+ .calendar-popup {
279
+ @apply z-60 absolute invisible pointer-events-none;
280
+ }
276
281
 
277
- &[data-show]
278
- @apply visible pointer-events-auto
282
+ .calendar-popup[data-show] {
283
+ @apply visible pointer-events-auto;
284
+ }
279
285
  </style>