@mptw/skylens-ui 1.4.109 → 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 (130) 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 +14 -0
  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/{components → app/components}/SLAlertModal.vue +24 -16
  9. package/{components → app/components}/SLBreadcrumbs.vue +12 -8
  10. package/app/components/SLButton.vue +370 -0
  11. package/{components → app/components}/SLCalendarButton.vue +40 -34
  12. package/{components → app/components}/SLCalendarPopup.vue +79 -53
  13. package/{components → app/components}/SLCard.vue +57 -41
  14. package/{components → app/components}/SLChart.vue +6 -3
  15. package/{components → app/components}/SLCheckbox.vue +92 -49
  16. package/{components → app/components}/SLCircleButton.vue +25 -16
  17. package/{components → app/components}/SLCollapsableBlock.vue +44 -33
  18. package/{components → app/components}/SLCollapsableMulitPillSelect.vue +20 -15
  19. package/{components → app/components}/SLConfirmModal.vue +9 -6
  20. package/{components → app/components}/SLContextMenu.vue +88 -48
  21. package/{components → app/components}/SLDateInput.vue +109 -92
  22. package/{components → app/components}/SLDatePicker.vue +9 -7
  23. package/{components → app/components}/SLDistributor.vue +1 -1
  24. package/{components → app/components}/SLDownloadButton.vue +39 -29
  25. package/{components → app/components}/SLDraggable.vue +2 -2
  26. package/{components → app/components}/SLDropdown.vue +33 -25
  27. package/{components → app/components}/SLDropdownItem.vue +9 -5
  28. package/{components → app/components}/SLElementWithTitle.vue +12 -7
  29. package/{components → app/components}/SLEyeCheckbox.vue +44 -31
  30. package/{components → app/components}/SLFileInput.vue +23 -16
  31. package/{components → app/components}/SLGenderAgeSelect.vue +52 -36
  32. package/{components → app/components}/SLHourRangeInput.vue +45 -32
  33. package/{components → app/components}/SLIOSSwitch.vue +81 -60
  34. package/{components → app/components}/SLIcon.vue +4 -3
  35. package/{components → app/components}/SLIconButton.vue +31 -29
  36. package/{components → app/components}/SLInfoTip.vue +51 -40
  37. package/{components → app/components}/SLInsightSitePage.vue +12 -7
  38. package/{components → app/components}/SLLegend.vue +19 -12
  39. package/app/components/SLLinearProgressBar.vue +22 -0
  40. package/{components → app/components}/SLLink.vue +12 -8
  41. package/{components → app/components}/SLLoading.vue +34 -31
  42. package/{components → app/components}/SLMapChart.vue +5 -4
  43. package/{components → app/components}/SLModal.vue +90 -66
  44. package/{components → app/components}/SLMonthCalendarButton.vue +91 -45
  45. package/{components → app/components}/SLMonthPicker.vue +42 -37
  46. package/{components → app/components}/SLMultiEmailInput.vue +163 -113
  47. package/{components → app/components}/SLMultiSelect.vue +37 -26
  48. package/{components → app/components}/SLNoData.vue +16 -11
  49. package/app/components/SLNotification.vue +155 -0
  50. package/{components → app/components}/SLPageModal.vue +14 -9
  51. package/{components → app/components}/SLPagination.vue +45 -33
  52. package/{components → app/components}/SLPillCheckbox.vue +50 -42
  53. package/{components → app/components}/SLPillLabel.vue +43 -28
  54. package/{components → app/components}/SLPopupMenuButton.vue +26 -17
  55. package/{components → app/components}/SLProfileButton.vue +28 -20
  56. package/{components → app/components}/SLProjectShareItem.vue +30 -17
  57. package/{components → app/components}/SLRadioButton.vue +41 -33
  58. package/{components → app/components}/SLRadioButtonGroup.vue +28 -23
  59. package/app/components/SLRadioGroup.vue +221 -0
  60. package/{components → app/components}/SLRangeInput.vue +53 -38
  61. package/{components → app/components}/SLRegionsMapChart.vue +5 -4
  62. package/{components → app/components}/SLRightSider.vue +50 -40
  63. package/{components → app/components}/SLSearchInput.vue +24 -19
  64. package/{components → app/components}/SLSelect.vue +114 -87
  65. package/{components → app/components}/SLSelectAllToggle.vue +52 -37
  66. package/app/components/SLSidebarNav.vue +487 -0
  67. package/{components → app/components}/SLSidebarNavGroupItem.vue +13 -10
  68. package/{components → app/components}/SLSidebarNavGroupItemSection.vue +240 -179
  69. package/{components → app/components}/SLSidebarNavLinkItem.vue +131 -109
  70. package/{components → app/components}/SLSidebarNavSectionItem.vue +21 -18
  71. package/{components → app/components}/SLSitePage.vue +35 -24
  72. package/{components → app/components}/SLSkyInsightSitePage.vue +13 -8
  73. package/{components → app/components}/SLSortByDropdown.vue +35 -22
  74. package/{components → app/components}/SLSpinIcon.vue +6 -3
  75. package/{components → app/components}/SLStayRangeInput.vue +47 -36
  76. package/{components → app/components}/SLTab.vue +7 -2
  77. package/app/components/SLTable.vue +472 -0
  78. package/{components → app/components}/SLTableTooltip.vue +44 -30
  79. package/app/components/SLTabs.vue +528 -0
  80. package/{components → app/components}/SLTextInput.vue +162 -134
  81. package/{components → app/components}/SLTextarea.vue +40 -29
  82. package/{components → app/components}/SLToast.vue +19 -11
  83. package/{components → app/components}/SLToggleButton.vue +18 -11
  84. package/{components → app/components}/SLTwoLayerMultiSelect.vue +180 -85
  85. package/{components → app/components}/SLTwoLayerSelect.vue +47 -37
  86. package/{components → app/components}/SLTwoLayerSingleSelect.vue +52 -33
  87. package/{components → app/components}/SLWarnModal.vue +9 -7
  88. package/app/interface/commons.ts +7 -0
  89. package/{utils → app/utils}/index.ts +213 -146
  90. package/eslint.config.js +3 -0
  91. package/nuxt.config.ts +17 -14
  92. package/package.json +10 -9
  93. package/skills-lock.json +59 -0
  94. package/tsconfig.json +1 -6
  95. package/.eslintrc.cjs +0 -4
  96. package/app.config.ts +0 -5
  97. package/assets/css/layout.styl +0 -98
  98. package/assets/css/tailwind.css +0 -3
  99. package/components/SLButton.vue +0 -337
  100. package/components/SLLinearProgressBar.vue +0 -35
  101. package/components/SLNotification.vue +0 -151
  102. package/components/SLRadioGroup.vue +0 -209
  103. package/components/SLSidebarNav.vue +0 -427
  104. package/components/SLTable.vue +0 -455
  105. package/components/SLTabs.vue +0 -475
  106. package/interface/commons.ts +0 -7
  107. package/pages/index.vue +0 -15
  108. package/tailwind.config.js +0 -271
  109. /package/{assets → app/assets}/css/fonts/MEShPlus-font-icon.eot +0 -0
  110. /package/{assets → app/assets}/css/fonts/MEShPlus-font-icon.svg +0 -0
  111. /package/{assets → app/assets}/css/fonts/MEShPlus-font-icon.ttf +0 -0
  112. /package/{assets → app/assets}/css/fonts/MEShPlus-font-icon.woff +0 -0
  113. /package/{assets → app/assets}/css/icons.css +0 -0
  114. /package/{assets → app/assets}/images/commons/app-logo-white.png +0 -0
  115. /package/{assets → app/assets}/images/commons/app-logo.png +0 -0
  116. /package/{assets → app/assets}/images/commons/empty-box.png +0 -0
  117. /package/{interface → app/interface}/IDateRange.ts +0 -0
  118. /package/{interface → app/interface}/IHourRange.ts +0 -0
  119. /package/{interface → app/interface}/IInputOption.ts +0 -0
  120. /package/{interface → app/interface}/ILegendItem.ts +0 -0
  121. /package/{interface → app/interface}/IOrganization.ts +0 -0
  122. /package/{interface → app/interface}/IPopupMenuButton.ts +0 -0
  123. /package/{interface → app/interface}/IStayRange.ts +0 -0
  124. /package/{interface → app/interface}/ITableField.ts +0 -0
  125. /package/{interface → app/interface}/IWeb.ts +0 -0
  126. /package/{interface → app/interface}/NavConfigType.ts +0 -0
  127. /package/{models → app/models}/DateRange.ts +0 -0
  128. /package/{plugins → app/plugins}/v-calendar.ts +0 -0
  129. /package/{utils → app/utils}/constants.ts +0 -0
  130. /package/{utils → app/utils}/generateSheet.ts +0 -0
@@ -0,0 +1,370 @@
1
+ <template lang="pug">
2
+ button(:type='type', :class='btnClass' :disabled="disabled")
3
+ .btn-content
4
+ slot
5
+ SLIcon.btn-icon(v-if='icon !== ""', :icon='icon')
6
+ span(v-if='title !== ""') {{ title }}
7
+ SLIcon.btn-icon(v-if='postIcon !== ""', :icon='postIcon')
8
+ .btn-loading
9
+ .loading
10
+ div
11
+ div
12
+ div
13
+ div
14
+ </template>
15
+
16
+ <script lang="ts">
17
+ import type { PropType } from "vue";
18
+
19
+ export default defineComponent({
20
+ name: "SLButton",
21
+ components: {},
22
+ props: {
23
+ size: {
24
+ type: String,
25
+ default: "",
26
+ validator: (val: string) =>
27
+ ["", "lg", "md", "sm", "xs", "xxs"].includes(val),
28
+ },
29
+ color: {
30
+ type: String,
31
+ default: "",
32
+ validator: (val: string) =>
33
+ [
34
+ "",
35
+ "white",
36
+ "primary",
37
+ "primary-600",
38
+ "highlight-500",
39
+ "third",
40
+ "danger",
41
+ "pgray-5",
42
+ "pgray-2",
43
+ "secondary",
44
+ "secondary-200",
45
+ "secondary-600",
46
+ "blue-1",
47
+ "insight-title-line",
48
+ ].includes(val),
49
+ },
50
+ variant: {
51
+ type: String,
52
+ default: "",
53
+ validator: (val: string) => ["", "outline", "icon"].includes(val),
54
+ },
55
+ disabled: {
56
+ type: Boolean,
57
+ default: false,
58
+ },
59
+ icon: {
60
+ type: String,
61
+ default: "",
62
+ },
63
+ postIcon: {
64
+ type: String,
65
+ default: "",
66
+ },
67
+ title: {
68
+ type: String,
69
+ default: "",
70
+ },
71
+ type: {
72
+ type: String as PropType<"submit" | "reset" | "button">,
73
+ default: "button",
74
+ validator: (val: string) => ["submit", "reset", "button"].includes(val),
75
+ },
76
+ loading: {
77
+ type: Boolean,
78
+ default: false,
79
+ },
80
+ },
81
+ setup(props, { emit }) {
82
+ const { size, color, variant, disabled, loading } = toRefs(props);
83
+
84
+ const btnClass = computed(() => {
85
+ const btnClass = ["btn"];
86
+ if (size.value !== "") {
87
+ btnClass.push(`btn-${size.value}`);
88
+ }
89
+ if (color.value !== "") {
90
+ btnClass.push(`btn-${color.value}`);
91
+ }
92
+ if (variant.value !== "") {
93
+ btnClass.push(`btn-${variant.value}`);
94
+ }
95
+ if (disabled.value) {
96
+ btnClass.push("btn-disabled");
97
+ }
98
+ if (loading.value) {
99
+ btnClass.push("loading");
100
+ }
101
+
102
+ return btnClass.join(" ");
103
+ });
104
+
105
+ return {
106
+ btnClass,
107
+ };
108
+ },
109
+ });
110
+ </script>
111
+
112
+ <style>
113
+ @reference '~ui/app/assets/css/main.css';
114
+
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
+ }
118
+
119
+ .btn.btn-lg {
120
+ @apply px-7.75;
121
+ }
122
+
123
+ .btn.btn-md {
124
+ @apply px-3.75;
125
+ }
126
+
127
+ .btn.btn-sm {
128
+ @apply py-0.75 px-1.75;
129
+ }
130
+
131
+ .btn.btn-sm .btn-content {
132
+ @apply space-x-1;
133
+ }
134
+
135
+ .btn.btn-xs {
136
+ @apply py-0.75 px-1.75 text-xs;
137
+ }
138
+
139
+ .btn.btn-xs .btn-content {
140
+ @apply space-x-1;
141
+ }
142
+
143
+ .btn.btn-xxs {
144
+ @apply p-0.75 text-sm;
145
+ }
146
+
147
+ .btn.btn-xxs .btn-content {
148
+ @apply space-x-1;
149
+ }
150
+
151
+ .btn.btn-xxs .btn-content .icon.btn-icon {
152
+ @apply text-sm leading-none;
153
+ }
154
+
155
+ .btn-white {
156
+ @apply bg-white border-white text-pgray-2 hover:bg-white hover:border-white;
157
+ }
158
+
159
+ .btn-white.btn-outline {
160
+ @apply text-pgray-2 hover:text-pgray-2;
161
+ }
162
+
163
+ .btn-white .btn-loading .loading div {
164
+ border-color: white transparent transparent transparent;
165
+ }
166
+
167
+ .btn-primary {
168
+ @apply bg-primary border-primary text-white hover:bg-primary-800 hover:border-primary-800;
169
+ }
170
+
171
+ .btn-primary.btn-outline {
172
+ @apply text-primary hover:text-primary-800;
173
+ }
174
+
175
+ .btn-primary .btn-loading .loading div {
176
+ border-color: var(--color-primary) transparent transparent transparent;
177
+ }
178
+
179
+ .btn-primary-600 {
180
+ @apply bg-primary-600 border-primary-600 text-white hover:bg-primary hover:border-primary;
181
+ }
182
+
183
+ .btn-primary-600.btn-outline {
184
+ @apply text-primary-600 hover:text-primary;
185
+ }
186
+
187
+ .btn-primary-600 .btn-loading .loading div {
188
+ border-color: var(--color-primary-600) transparent transparent transparent;
189
+ }
190
+
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
+ }
194
+
195
+ .btn-highlight-500.btn-outline {
196
+ @apply text-highlight-500 hover:text-highlight-400;
197
+ }
198
+
199
+ .btn-highlight-500 .btn-loading .loading div {
200
+ border-color: var(--color-highlight-400) transparent transparent transparent;
201
+ }
202
+
203
+ .btn-third {
204
+ @apply bg-third border-third text-white hover:bg-third-600 hover:text-white hover:border-third-600;
205
+ }
206
+
207
+ .btn-third.btn-outline {
208
+ @apply text-third hover:text-third-600;
209
+ }
210
+
211
+ .btn-third .btn-loading .loading div {
212
+ border-color: var(--color-third-600) transparent transparent transparent;
213
+ }
214
+
215
+ .btn-danger {
216
+ @apply bg-danger border-danger text-white hover:bg-danger-light hover:border-danger-light;
217
+ }
218
+
219
+ .btn-danger.btn-outline {
220
+ @apply text-danger hover:text-danger-light;
221
+ }
222
+
223
+ .btn-danger .btn-loading .loading div {
224
+ border-color: var(--color-danger-light) transparent transparent transparent;
225
+ }
226
+
227
+ .btn-pgray-5 {
228
+ @apply bg-pgray-5 border-pgray-5 text-pgray-2 hover:bg-pgray-4p5 hover:border-pgray-4p5;
229
+ }
230
+
231
+ .btn-pgray-5.btn-outline {
232
+ @apply text-pgray-5 hover:text-pgray-4p5;
233
+ }
234
+
235
+ .btn-pgray-5 .btn-loading .loading div {
236
+ border-color: var(--color-pgray-4p5) transparent transparent transparent;
237
+ }
238
+
239
+ .btn-pgray-2 {
240
+ @apply bg-pgray-2 border-pgray-2 text-white hover:bg-pgray-3 hover:border-pgray-3;
241
+ }
242
+
243
+ .btn-pgray-2.btn-outline {
244
+ @apply text-pgray-2 hover:text-pgray-3;
245
+ }
246
+
247
+ .btn-pgray-2 .btn-loading .loading div {
248
+ border-color: var(--color-pgray-3) transparent transparent transparent;
249
+ }
250
+
251
+ .btn-secondary {
252
+ @apply bg-secondary border-secondary text-white hover:bg-secondary-800 hover:border-secondary-800;
253
+ }
254
+
255
+ .btn-secondary.btn-outline {
256
+ @apply text-secondary hover:text-secondary-800;
257
+ }
258
+
259
+ .btn-secondary .btn-loading .loading div {
260
+ border-color: var(--color-secondary-500) transparent transparent transparent;
261
+ }
262
+
263
+ .btn-secondary-200 {
264
+ @apply bg-secondary-200 border-secondary-200 text-secondary hover:bg-secondary hover:border-secondary hover:text-white;
265
+ }
266
+
267
+ .btn-secondary-200.btn-outline {
268
+ @apply text-secondary-200 hover:text-secondary;
269
+ }
270
+
271
+ .btn-secondary-200 .btn-loading .loading div {
272
+ border-color: var(--color-secondary-500) transparent transparent transparent;
273
+ }
274
+
275
+ .btn-secondary-600 {
276
+ @apply bg-secondary-600 border-secondary-600 text-white hover:bg-secondary hover:border-secondary;
277
+ }
278
+
279
+ .btn-secondary-600.btn-outline {
280
+ @apply text-secondary-600 hover:text-secondary;
281
+ }
282
+
283
+ .btn-secondary-600 .btn-loading .loading div {
284
+ border-color: var(--color-secondary-500) transparent transparent transparent;
285
+ }
286
+
287
+ .btn-blue-1 {
288
+ @apply bg-secondary border-secondary text-white hover:bg-blue-1 hover:border-blue-1;
289
+ }
290
+
291
+ .btn-blue-1.btn-outline {
292
+ @apply text-blue-1 hover:text-blue-1;
293
+ }
294
+
295
+ .btn-blue-1 .btn-loading .loading div {
296
+ border-color: var(--color-blue-1) transparent transparent transparent;
297
+ }
298
+
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
+ }
302
+
303
+ .btn-insight-title-line.btn-outline {
304
+ @apply text-insight-title hover:text-insight-title;
305
+ }
306
+
307
+ .btn-insight-title-line .btn-loading .loading div {
308
+ border-color: var(--color-blue-1) transparent transparent transparent;
309
+ }
310
+
311
+ .btn-outline {
312
+ @apply bg-transparent border hover:bg-white;
313
+ }
314
+
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
+ }
318
+
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
+ }
322
+
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
+ }
326
+
327
+ .btn.loading {
328
+ @apply bg-primary-200 border-primary-200 cursor-default;
329
+ }
330
+
331
+ .btn.loading .btn-content {
332
+ @apply opacity-0;
333
+ }
334
+
335
+ .btn.loading .btn-loading {
336
+ @apply block;
337
+ }
338
+
339
+ .btn-content {
340
+ @apply inline-flex items-center space-x-1;
341
+ }
342
+
343
+ .btn-content .icon.btn-icon {
344
+ @apply inline-flex text-xs leading-none;
345
+ }
346
+
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
+ }
350
+
351
+ .btn-loading .loading {
352
+ @apply relative inline-block w-4 h-4;
353
+ }
354
+
355
+ .btn-loading .loading div {
356
+ @apply absolute block w-4 h-4 border-2 rounded-full animate-loading;
357
+ }
358
+
359
+ .btn-loading .loading div:nth-child(1) {
360
+ animation-delay: -0.45s;
361
+ }
362
+
363
+ .btn-loading .loading div:nth-child(2) {
364
+ animation-delay: -0.3s;
365
+ }
366
+
367
+ .btn-loading .loading div:nth-child(3) {
368
+ animation-delay: -0.15s;
369
+ }
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>
@@ -122,9 +122,9 @@ import {
122
122
  isPreviousDateRange,
123
123
  previousDateRange,
124
124
  isValidDate,
125
- } from "~ui/utils";
126
- import type IDateRange from "~ui/interface/IDateRange";
127
- import { OnlineSourceType } from "~ui/interface/IWeb";
125
+ } from "~ui/app/utils";
126
+ import type IDateRange from "~ui/app/interface/IDateRange";
127
+ import { OnlineSourceType } from "~ui/app/interface/IWeb";
128
128
 
129
129
  const DateStringRegexp = /[0-9]{4}\/[0-9]{2}\/[0-9]{2}/;
130
130
 
@@ -774,76 +774,102 @@ export default defineComponent({
774
774
  });
775
775
  </script>
776
776
 
777
- <style lang="stylus">
778
- .calendar-popup
779
- @apply w-auto py-4 border border-primary-100 rounded-lg bg-white shadow-md overflow-hidden
777
+ <style>
778
+ @reference '~ui/app/assets/css/main.css';
780
779
 
781
- .popup-body
782
- @apply flex s('mb-2.5') divide-x divide-pgray-4
780
+ .calendar-popup {
781
+ @apply w-auto py-4 border border-primary-100 rounded-lg bg-white shadow-md overflow-hidden;
783
782
 
784
- .popup-footer
785
- @apply s('mx-3.75') border-t border-pgray-4 text-center
783
+ .popup-body {
784
+ @apply flex mb-2.5 divide-x divide-pgray-4;
785
+ }
786
786
 
787
- .compare
788
- @apply pt-4 text-base leading-normal text-pgray-2
787
+ .popup-footer {
788
+ @apply mx-3.75 border-t border-pgray-4 text-center;
789
789
 
790
- .range1
791
- @apply text-primary font-bold
790
+ .compare {
791
+ @apply pt-4 text-base leading-[1.3125] text-pgray-2;
792
792
 
793
- .range2
794
- @apply text-pgray-2 font-bold
793
+ .range1 {
794
+ @apply text-primary font-bold;
795
+ }
795
796
 
796
- .actions
797
- @apply pt-4 space-x-8
797
+ .range2 {
798
+ @apply text-pgray-2 font-bold;
799
+ }
800
+ }
798
801
 
799
- .quicks
800
- @apply relative
802
+ .actions {
803
+ @apply pt-4 space-x-8;
804
+ }
805
+ }
801
806
 
802
- .quick-button
803
- @apply relative block s('w-[7.4375rem]') s('pl-6.5') s('py-2') space-y-1 bg-white text-pgray-3 s('hover:bg-primary-100') s('hover:text-pgray-2')
807
+ .quicks {
808
+ @apply relative;
804
809
 
805
- &.selected
806
- @apply bg-primary-100 text-primary s('hover:text-primary')
810
+ .quick-button {
811
+ @apply relative block w-[7.4375rem] pl-6.5 py-2 space-y-1 bg-white text-pgray-3 hover:bg-primary-100 hover:text-pgray-2;
807
812
 
808
- &:before
809
- content ''
810
- @apply block absolute s('top-1/2') s('left-0') s('w-1.5') s('h-1.5') s('ml-3') rounded-full bg-primary transform s('-translate-y-1/2')
813
+ &.selected {
814
+ @apply bg-primary-100 text-primary hover:text-primary;
811
815
 
812
- &-title
813
- @apply text-base
816
+ &:before {
817
+ content: "";
818
+ @apply block absolute top-1/2 left-0 w-1.5 h-1.5 ml-3 rounded-full bg-primary transform -translate-y-1/2;
819
+ }
820
+ }
814
821
 
815
- &-notice
816
- @apply text-xs
822
+ .quick-button-title {
823
+ @apply text-base;
824
+ }
817
825
 
818
- .quicks-divide
819
- @apply h-px ml-1 my-1 bg-pgray-4
820
- width calc(100% - theme('spacing.1'))
826
+ .quick-button-notice {
827
+ @apply text-xs;
828
+ }
829
+ }
821
830
 
822
- .compare-switch
823
- @apply absolute bottom-0 left-0 s('ml-4.75')
831
+ .quicks-divide {
832
+ @apply h-px ml-1 my-1 bg-pgray-4;
833
+ width: calc(100% - theme("spacing.1"));
834
+ }
824
835
 
825
- .calendar
826
- @apply s('pl-[1.4375rem]') s('pr-6')
836
+ .compare-switch {
837
+ @apply absolute bottom-0 left-0 ml-4.75;
838
+ }
839
+ }
827
840
 
828
- .vc-header
829
- @apply pt-2
841
+ .calendar {
842
+ @apply pl-[1.4375rem] pr-6;
830
843
 
831
- &-compare
832
- .calendar-header
833
- @apply text-pgray-2
844
+ .vc-header {
845
+ @apply pt-2;
846
+ }
847
+ }
834
848
 
835
- &-header
836
- @apply s('pt-1.5') s('pb-1.75') s('space-y-0.5') border-b border-primary text-sm s('leading-4.75') text-primary
849
+ .calendar-compare {
850
+ .calendar-header {
851
+ @apply text-pgray-2;
852
+ }
853
+ }
837
854
 
838
- .date-range
839
- @apply flex justify-start items-center space-x-1 text-sm
855
+ .calendar-header {
856
+ @apply pt-1.5 pb-1.75 space-y-0.5 border-b border-primary text-sm leading-4.75 text-primary;
840
857
 
841
- .text-input
842
- @apply flex-grow-0 flex-shrink-0 s('w-[6.5rem]')
858
+ .date-range {
859
+ @apply flex justify-start items-center space-x-1 text-sm;
843
860
 
844
- &-body
845
- @apply space-y-2
861
+ .text-input {
862
+ @apply grow-0 shrink-0 w-[6.5rem];
863
+ }
864
+ }
865
+ }
846
866
 
847
- .data-date
848
- @apply text-xs text-pgray-2 text-right
867
+ .calendar-body {
868
+ @apply space-y-2;
869
+
870
+ .data-date {
871
+ @apply text-xs text-pgray-2 text-right;
872
+ }
873
+ }
874
+ }
849
875
  </style>