@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.
- package/AGENTS.md +59 -0
- package/CLAUDE.md +36 -0
- package/README.md +7 -7
- package/app/app.config.ts +14 -0
- package/app/app.vue +5 -0
- package/app/assets/css/layout.css +134 -0
- package/app/assets/css/main.css +189 -0
- package/{components → app/components}/SLAlertModal.vue +24 -16
- package/{components → app/components}/SLBreadcrumbs.vue +12 -8
- package/app/components/SLButton.vue +370 -0
- package/{components → app/components}/SLCalendarButton.vue +40 -34
- package/{components → app/components}/SLCalendarPopup.vue +79 -53
- package/{components → app/components}/SLCard.vue +57 -41
- package/{components → app/components}/SLChart.vue +6 -3
- package/{components → app/components}/SLCheckbox.vue +92 -49
- package/{components → app/components}/SLCircleButton.vue +25 -16
- package/{components → app/components}/SLCollapsableBlock.vue +44 -33
- package/{components → app/components}/SLCollapsableMulitPillSelect.vue +20 -15
- package/{components → app/components}/SLConfirmModal.vue +9 -6
- package/{components → app/components}/SLContextMenu.vue +88 -48
- package/{components → app/components}/SLDateInput.vue +109 -92
- package/{components → app/components}/SLDatePicker.vue +9 -7
- package/{components → app/components}/SLDistributor.vue +1 -1
- package/{components → app/components}/SLDownloadButton.vue +39 -29
- package/{components → app/components}/SLDraggable.vue +2 -2
- package/{components → app/components}/SLDropdown.vue +33 -25
- package/{components → app/components}/SLDropdownItem.vue +9 -5
- package/{components → app/components}/SLElementWithTitle.vue +12 -7
- package/{components → app/components}/SLEyeCheckbox.vue +44 -31
- package/{components → app/components}/SLFileInput.vue +23 -16
- package/{components → app/components}/SLGenderAgeSelect.vue +52 -36
- package/{components → app/components}/SLHourRangeInput.vue +45 -32
- package/{components → app/components}/SLIOSSwitch.vue +81 -60
- package/{components → app/components}/SLIcon.vue +4 -3
- package/{components → app/components}/SLIconButton.vue +31 -29
- package/{components → app/components}/SLInfoTip.vue +51 -40
- package/{components → app/components}/SLInsightSitePage.vue +12 -7
- package/{components → app/components}/SLLegend.vue +19 -12
- package/app/components/SLLinearProgressBar.vue +22 -0
- package/{components → app/components}/SLLink.vue +12 -8
- package/{components → app/components}/SLLoading.vue +34 -31
- package/{components → app/components}/SLMapChart.vue +5 -4
- package/{components → app/components}/SLModal.vue +90 -66
- package/{components → app/components}/SLMonthCalendarButton.vue +91 -45
- package/{components → app/components}/SLMonthPicker.vue +42 -37
- package/{components → app/components}/SLMultiEmailInput.vue +163 -113
- package/{components → app/components}/SLMultiSelect.vue +37 -26
- package/{components → app/components}/SLNoData.vue +16 -11
- package/app/components/SLNotification.vue +155 -0
- package/{components → app/components}/SLPageModal.vue +14 -9
- package/{components → app/components}/SLPagination.vue +45 -33
- package/{components → app/components}/SLPillCheckbox.vue +50 -42
- package/{components → app/components}/SLPillLabel.vue +43 -28
- package/{components → app/components}/SLPopupMenuButton.vue +26 -17
- package/{components → app/components}/SLProfileButton.vue +28 -20
- package/{components → app/components}/SLProjectShareItem.vue +30 -17
- package/{components → app/components}/SLRadioButton.vue +41 -33
- package/{components → app/components}/SLRadioButtonGroup.vue +28 -23
- package/app/components/SLRadioGroup.vue +221 -0
- package/{components → app/components}/SLRangeInput.vue +53 -38
- package/{components → app/components}/SLRegionsMapChart.vue +5 -4
- package/{components → app/components}/SLRightSider.vue +50 -40
- package/{components → app/components}/SLSearchInput.vue +24 -19
- package/{components → app/components}/SLSelect.vue +114 -87
- package/{components → app/components}/SLSelectAllToggle.vue +52 -37
- package/app/components/SLSidebarNav.vue +487 -0
- package/{components → app/components}/SLSidebarNavGroupItem.vue +13 -10
- package/{components → app/components}/SLSidebarNavGroupItemSection.vue +240 -179
- package/{components → app/components}/SLSidebarNavLinkItem.vue +131 -109
- package/{components → app/components}/SLSidebarNavSectionItem.vue +21 -18
- package/{components → app/components}/SLSitePage.vue +35 -24
- package/{components → app/components}/SLSkyInsightSitePage.vue +13 -8
- package/{components → app/components}/SLSortByDropdown.vue +35 -22
- package/{components → app/components}/SLSpinIcon.vue +6 -3
- package/{components → app/components}/SLStayRangeInput.vue +47 -36
- package/{components → app/components}/SLTab.vue +7 -2
- package/app/components/SLTable.vue +472 -0
- package/{components → app/components}/SLTableTooltip.vue +44 -30
- package/app/components/SLTabs.vue +528 -0
- package/{components → app/components}/SLTextInput.vue +162 -134
- package/{components → app/components}/SLTextarea.vue +40 -29
- package/{components → app/components}/SLToast.vue +19 -11
- package/{components → app/components}/SLToggleButton.vue +18 -11
- package/{components → app/components}/SLTwoLayerMultiSelect.vue +180 -85
- package/{components → app/components}/SLTwoLayerSelect.vue +47 -37
- package/{components → app/components}/SLTwoLayerSingleSelect.vue +52 -33
- package/{components → app/components}/SLWarnModal.vue +9 -7
- package/app/interface/commons.ts +7 -0
- package/{utils → app/utils}/index.ts +213 -146
- package/eslint.config.js +3 -0
- package/nuxt.config.ts +17 -14
- package/package.json +10 -9
- package/skills-lock.json +59 -0
- package/tsconfig.json +1 -6
- package/.eslintrc.cjs +0 -4
- package/app.config.ts +0 -5
- package/assets/css/layout.styl +0 -98
- package/assets/css/tailwind.css +0 -3
- package/components/SLButton.vue +0 -337
- package/components/SLLinearProgressBar.vue +0 -35
- package/components/SLNotification.vue +0 -151
- package/components/SLRadioGroup.vue +0 -209
- package/components/SLSidebarNav.vue +0 -427
- package/components/SLTable.vue +0 -455
- package/components/SLTabs.vue +0 -475
- package/interface/commons.ts +0 -7
- package/pages/index.vue +0 -15
- package/tailwind.config.js +0 -271
- /package/{assets → app/assets}/css/fonts/MEShPlus-font-icon.eot +0 -0
- /package/{assets → app/assets}/css/fonts/MEShPlus-font-icon.svg +0 -0
- /package/{assets → app/assets}/css/fonts/MEShPlus-font-icon.ttf +0 -0
- /package/{assets → app/assets}/css/fonts/MEShPlus-font-icon.woff +0 -0
- /package/{assets → app/assets}/css/icons.css +0 -0
- /package/{assets → app/assets}/images/commons/app-logo-white.png +0 -0
- /package/{assets → app/assets}/images/commons/app-logo.png +0 -0
- /package/{assets → app/assets}/images/commons/empty-box.png +0 -0
- /package/{interface → app/interface}/IDateRange.ts +0 -0
- /package/{interface → app/interface}/IHourRange.ts +0 -0
- /package/{interface → app/interface}/IInputOption.ts +0 -0
- /package/{interface → app/interface}/ILegendItem.ts +0 -0
- /package/{interface → app/interface}/IOrganization.ts +0 -0
- /package/{interface → app/interface}/IPopupMenuButton.ts +0 -0
- /package/{interface → app/interface}/IStayRange.ts +0 -0
- /package/{interface → app/interface}/ITableField.ts +0 -0
- /package/{interface → app/interface}/IWeb.ts +0 -0
- /package/{interface → app/interface}/NavConfigType.ts +0 -0
- /package/{models → app/models}/DateRange.ts +0 -0
- /package/{plugins → app/plugins}/v-calendar.ts +0 -0
- /package/{utils → app/utils}/constants.ts +0 -0
- /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:
|
|
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:
|
|
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
|
|
249
|
-
.
|
|
250
|
-
@apply inline-block
|
|
243
|
+
<style scoped>
|
|
244
|
+
@reference '~ui/app/assets/css/main.css';
|
|
251
245
|
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
246
|
+
.calendar-button {
|
|
247
|
+
@apply inline-block;
|
|
248
|
+
}
|
|
255
249
|
|
|
256
|
-
|
|
257
|
-
|
|
250
|
+
.calendar-button.calendar-button--compact .toggle-button {
|
|
251
|
+
@apply h-[37px];
|
|
252
|
+
}
|
|
258
253
|
|
|
259
|
-
|
|
260
|
-
|
|
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
|
-
|
|
263
|
-
|
|
262
|
+
.calendar-button .toggle-button .date-range .icon {
|
|
263
|
+
@apply grow-0 shrink-0 text-base text-primary leading-none;
|
|
264
|
+
}
|
|
264
265
|
|
|
265
|
-
|
|
266
|
-
|
|
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
|
-
|
|
269
|
-
|
|
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
|
-
|
|
272
|
-
|
|
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
|
-
|
|
278
|
-
|
|
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
|
|
778
|
-
.
|
|
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
|
-
|
|
782
|
-
|
|
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-
|
|
785
|
-
@apply
|
|
783
|
+
.popup-body {
|
|
784
|
+
@apply flex mb-2.5 divide-x divide-pgray-4;
|
|
785
|
+
}
|
|
786
786
|
|
|
787
|
-
|
|
788
|
-
|
|
787
|
+
.popup-footer {
|
|
788
|
+
@apply mx-3.75 border-t border-pgray-4 text-center;
|
|
789
789
|
|
|
790
|
-
|
|
791
|
-
|
|
790
|
+
.compare {
|
|
791
|
+
@apply pt-4 text-base leading-[1.3125] text-pgray-2;
|
|
792
792
|
|
|
793
|
-
.
|
|
794
|
-
@apply text-
|
|
793
|
+
.range1 {
|
|
794
|
+
@apply text-primary font-bold;
|
|
795
|
+
}
|
|
795
796
|
|
|
796
|
-
|
|
797
|
-
|
|
797
|
+
.range2 {
|
|
798
|
+
@apply text-pgray-2 font-bold;
|
|
799
|
+
}
|
|
800
|
+
}
|
|
798
801
|
|
|
799
|
-
|
|
800
|
-
|
|
802
|
+
.actions {
|
|
803
|
+
@apply pt-4 space-x-8;
|
|
804
|
+
}
|
|
805
|
+
}
|
|
801
806
|
|
|
802
|
-
|
|
803
|
-
|
|
807
|
+
.quicks {
|
|
808
|
+
@apply relative;
|
|
804
809
|
|
|
805
|
-
|
|
806
|
-
|
|
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
|
-
|
|
809
|
-
|
|
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
|
-
|
|
813
|
-
|
|
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
|
-
|
|
816
|
-
@apply text-
|
|
822
|
+
.quick-button-title {
|
|
823
|
+
@apply text-base;
|
|
824
|
+
}
|
|
817
825
|
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
826
|
+
.quick-button-notice {
|
|
827
|
+
@apply text-xs;
|
|
828
|
+
}
|
|
829
|
+
}
|
|
821
830
|
|
|
822
|
-
.
|
|
823
|
-
@apply
|
|
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
|
-
|
|
826
|
-
|
|
836
|
+
.compare-switch {
|
|
837
|
+
@apply absolute bottom-0 left-0 ml-4.75;
|
|
838
|
+
}
|
|
839
|
+
}
|
|
827
840
|
|
|
828
|
-
|
|
829
|
-
|
|
841
|
+
.calendar {
|
|
842
|
+
@apply pl-[1.4375rem] pr-6;
|
|
830
843
|
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
844
|
+
.vc-header {
|
|
845
|
+
@apply pt-2;
|
|
846
|
+
}
|
|
847
|
+
}
|
|
834
848
|
|
|
835
|
-
|
|
836
|
-
|
|
849
|
+
.calendar-compare {
|
|
850
|
+
.calendar-header {
|
|
851
|
+
@apply text-pgray-2;
|
|
852
|
+
}
|
|
853
|
+
}
|
|
837
854
|
|
|
838
|
-
|
|
839
|
-
|
|
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
|
-
|
|
842
|
-
|
|
858
|
+
.date-range {
|
|
859
|
+
@apply flex justify-start items-center space-x-1 text-sm;
|
|
843
860
|
|
|
844
|
-
|
|
845
|
-
|
|
861
|
+
.text-input {
|
|
862
|
+
@apply grow-0 shrink-0 w-[6.5rem];
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
}
|
|
846
866
|
|
|
847
|
-
|
|
848
|
-
|
|
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>
|