@mptw/skylens-ui 1.5.0 → 1.5.2
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 +11 -2
- package/app/app.vue +5 -0
- package/app/assets/css/layout.css +134 -0
- package/app/assets/css/main.css +189 -0
- package/app/components/SLAlertModal.vue +24 -16
- package/app/components/SLBreadcrumbs.vue +12 -8
- package/app/components/SLButton.vue +196 -163
- package/app/components/SLCalendarButton.vue +40 -34
- package/app/components/SLCalendarPopup.vue +79 -53
- package/app/components/SLCard.vue +57 -41
- package/app/components/SLChart.vue +6 -3
- package/app/components/SLCheckbox.vue +92 -49
- package/app/components/SLCircleButton.vue +25 -16
- package/app/components/SLCollapsableBlock.vue +44 -33
- package/app/components/SLCollapsableMulitPillSelect.vue +20 -15
- package/app/components/SLConfirmModal.vue +9 -6
- package/app/components/SLContextMenu.vue +88 -48
- package/app/components/SLDateInput.vue +109 -92
- package/app/components/SLDatePicker.vue +9 -7
- package/app/components/SLDistributor.vue +1 -1
- package/app/components/SLDownloadButton.vue +39 -29
- package/app/components/SLDraggable.vue +2 -2
- package/app/components/SLDropdown.vue +33 -25
- package/app/components/SLDropdownItem.vue +9 -5
- package/app/components/SLElementWithTitle.vue +12 -7
- package/app/components/SLEyeCheckbox.vue +44 -31
- package/app/components/SLFileInput.vue +23 -16
- package/app/components/SLGenderAgeSelect.vue +52 -36
- package/app/components/SLHourRangeInput.vue +45 -32
- package/app/components/SLIOSSwitch.vue +81 -60
- package/app/components/SLIcon.vue +4 -3
- package/app/components/SLIconButton.vue +31 -29
- package/app/components/SLInfoTip.vue +51 -40
- package/app/components/SLInsightSitePage.vue +12 -7
- package/app/components/SLLegend.vue +19 -12
- package/app/components/SLLinearProgressBar.vue +7 -20
- package/app/components/SLLink.vue +12 -8
- package/app/components/SLLoading.vue +34 -31
- package/app/components/SLMapChart.vue +5 -4
- package/app/components/SLModal.vue +90 -66
- package/app/components/SLMonthCalendarButton.vue +91 -45
- package/app/components/SLMonthPicker.vue +42 -37
- package/app/components/SLMultiEmailInput.vue +163 -113
- package/app/components/SLMultiSelect.vue +37 -26
- package/app/components/SLNoData.vue +16 -11
- package/app/components/SLNotification.vue +133 -129
- package/app/components/SLPageModal.vue +14 -9
- package/app/components/SLPagination.vue +45 -33
- package/app/components/SLPillCheckbox.vue +50 -42
- package/app/components/SLPillLabel.vue +43 -28
- package/app/components/SLPopupMenuButton.vue +26 -17
- package/app/components/SLProfileButton.vue +28 -20
- package/app/components/SLProjectShareItem.vue +30 -17
- package/app/components/SLRadioButton.vue +41 -33
- package/app/components/SLRadioButtonGroup.vue +28 -23
- package/app/components/SLRadioGroup.vue +90 -78
- package/app/components/SLRangeInput.vue +53 -38
- package/app/components/SLRegionsMapChart.vue +5 -4
- package/app/components/SLRightSider.vue +50 -40
- package/app/components/SLSearchInput.vue +24 -19
- package/app/components/SLSelect.vue +114 -87
- package/app/components/SLSelectAllToggle.vue +52 -37
- package/app/components/SLSidebarNav.vue +253 -193
- package/app/components/SLSidebarNavGroupItem.vue +13 -10
- package/app/components/SLSidebarNavGroupItemSection.vue +240 -179
- package/app/components/SLSidebarNavLinkItem.vue +131 -109
- package/app/components/SLSidebarNavSectionItem.vue +21 -18
- package/app/components/SLSitePage.vue +35 -24
- package/app/components/SLSkyInsightSitePage.vue +13 -8
- package/app/components/SLSortByDropdown.vue +35 -22
- package/app/components/SLSpinIcon.vue +6 -3
- package/app/components/SLStayRangeInput.vue +47 -36
- package/app/components/SLTab.vue +7 -2
- package/app/components/SLTable.vue +330 -313
- package/app/components/SLTableTooltip.vue +44 -30
- package/app/components/SLTabs.vue +333 -280
- package/app/components/SLTextInput.vue +162 -134
- package/app/components/SLTextarea.vue +40 -29
- package/app/components/SLToast.vue +19 -11
- package/app/components/SLToggleButton.vue +18 -11
- package/app/components/SLTwoLayerMultiSelect.vue +180 -85
- package/app/components/SLTwoLayerSelect.vue +47 -37
- package/app/components/SLTwoLayerSingleSelect.vue +52 -33
- package/app/components/SLWarnModal.vue +9 -7
- package/app/interface/commons.ts +7 -0
- package/app/utils/index.ts +213 -146
- package/eslint.config.js +3 -0
- package/nuxt.config.ts +17 -14
- package/package.json +9 -8
- package/skills-lock.json +59 -0
- package/tsconfig.json +1 -6
- package/.eslintrc.cjs +0 -4
- package/app/assets/css/layout.styl +0 -98
- package/app/assets/css/tailwind.css +0 -3
- package/app/pages/index.vue +0 -15
- package/interface/commons.ts +0 -7
- package/tailwind.config.js +0 -271
- /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
|
@@ -31,20 +31,15 @@ import { fromEvent, Subscription } from "rxjs";
|
|
|
31
31
|
import { createPopper } from "@popperjs/core";
|
|
32
32
|
import type { Instance as PopperInstance, Placement } from "@popperjs/core";
|
|
33
33
|
import ExcelJS from "exceljs";
|
|
34
|
-
import {
|
|
35
|
-
|
|
36
|
-
downloadBlob,
|
|
37
|
-
gaev,
|
|
38
|
-
ga4ev,
|
|
39
|
-
} from "~ui/utils";
|
|
40
|
-
import type IDateRange from "~ui/interface/IDateRange";
|
|
34
|
+
import { downloadURL, downloadBlob, gaev, ga4ev } from "~ui/app/utils";
|
|
35
|
+
import type IDateRange from "~ui/app/interface/IDateRange";
|
|
41
36
|
|
|
42
37
|
// http://www.excelcodex.com/2012/06/worksheets-naming-conventions/
|
|
43
38
|
function safeSheetName(name: string) {
|
|
44
39
|
return name.replace(/[\\/*?:[\]]/g, "").substring(0, 31);
|
|
45
40
|
}
|
|
46
41
|
|
|
47
|
-
const WatermarkImage =
|
|
42
|
+
const WatermarkImage = "/assets/images/commons/watermark-2.svg";
|
|
48
43
|
|
|
49
44
|
export default defineComponent({
|
|
50
45
|
name: "SLDownloadButton",
|
|
@@ -93,7 +88,7 @@ export default defineComponent({
|
|
|
93
88
|
},
|
|
94
89
|
customStyle: {
|
|
95
90
|
type: Object as PropType<Partial<CSSStyleDeclaration>>,
|
|
96
|
-
default: () => {
|
|
91
|
+
default: () => {},
|
|
97
92
|
},
|
|
98
93
|
evCategory: {
|
|
99
94
|
type: String,
|
|
@@ -204,7 +199,7 @@ export default defineComponent({
|
|
|
204
199
|
const workbook = new ExcelJS.Workbook();
|
|
205
200
|
sheets.value.map((sheetData) => {
|
|
206
201
|
const sheet = workbook.addWorksheet(
|
|
207
|
-
sheetData?.sheetName ? safeSheetName(sheetData.sheetName) : ""
|
|
202
|
+
sheetData?.sheetName ? safeSheetName(sheetData.sheetName) : "",
|
|
208
203
|
);
|
|
209
204
|
(sheetData?.sheetData || []).forEach((rowData) => {
|
|
210
205
|
sheet.addRow(rowData);
|
|
@@ -215,12 +210,20 @@ export default defineComponent({
|
|
|
215
210
|
downloadBlob(
|
|
216
211
|
buffer,
|
|
217
212
|
`${fileName.value}.xlsx`,
|
|
218
|
-
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
213
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
219
214
|
);
|
|
220
215
|
return;
|
|
221
216
|
}
|
|
222
217
|
|
|
223
|
-
const dataURL = await domToPngDataUrl(
|
|
218
|
+
const dataURL = await domToPngDataUrl(
|
|
219
|
+
imageTarget.value,
|
|
220
|
+
customFilter.value,
|
|
221
|
+
customStyle.value,
|
|
222
|
+
padding.value,
|
|
223
|
+
dateRanges.value,
|
|
224
|
+
watermark.value,
|
|
225
|
+
WatermarkImage,
|
|
226
|
+
);
|
|
224
227
|
if (!dataURL) {
|
|
225
228
|
console.log("Can not generate data URL!");
|
|
226
229
|
return;
|
|
@@ -269,27 +272,34 @@ export default defineComponent({
|
|
|
269
272
|
});
|
|
270
273
|
</script>
|
|
271
274
|
|
|
272
|
-
<style
|
|
273
|
-
.
|
|
274
|
-
@apply inline-block
|
|
275
|
+
<style>
|
|
276
|
+
@reference '~ui/app/assets/css/main.css';
|
|
275
277
|
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
278
|
+
.download-button {
|
|
279
|
+
@apply inline-block;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.download-button.disabled .download-button-toggle {
|
|
283
|
+
@apply border-pgray-5 text-pgray-5 cursor-default;
|
|
284
|
+
}
|
|
279
285
|
|
|
280
|
-
|
|
281
|
-
|
|
286
|
+
.download-button-toggle {
|
|
287
|
+
@apply inline-flex justify-center items-center w-[28px] h-[28px] bg-white border border-primary-600 rounded text-lg text-primary-600;
|
|
288
|
+
}
|
|
282
289
|
|
|
283
|
-
|
|
284
|
-
|
|
290
|
+
.download-button-toggle.active {
|
|
291
|
+
@apply bg-primary-600 text-white;
|
|
292
|
+
}
|
|
285
293
|
|
|
286
|
-
.download-button-popup
|
|
287
|
-
@apply z-60 absolute flex flex-col bg-white border border-primary-500 rounded overflow-hidden shadow invisible pointer-events-none
|
|
294
|
+
.download-button-popup {
|
|
295
|
+
@apply z-60 absolute flex flex-col bg-white border border-primary-500 rounded overflow-hidden shadow-default invisible pointer-events-none;
|
|
296
|
+
}
|
|
288
297
|
|
|
289
|
-
|
|
290
|
-
|
|
298
|
+
.download-button-popup[data-show] {
|
|
299
|
+
@apply visible pointer-events-auto;
|
|
300
|
+
}
|
|
291
301
|
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
302
|
+
.download-button-popup .download-option {
|
|
303
|
+
@apply block p-2 bg-white text-sm text-pgray-3 hover:bg-primary-100 hover:text-primary;
|
|
304
|
+
}
|
|
295
305
|
</style>
|
|
@@ -58,7 +58,7 @@ export default defineComponent({
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
const elIndex = Array.from(draggableEl.value.children).indexOf(
|
|
61
|
-
dragEl
|
|
61
|
+
dragEl,
|
|
62
62
|
);
|
|
63
63
|
|
|
64
64
|
if (elIndex === -1) {
|
|
@@ -148,4 +148,4 @@ export default defineComponent({
|
|
|
148
148
|
});
|
|
149
149
|
</script>
|
|
150
150
|
|
|
151
|
-
<style
|
|
151
|
+
<style></style>
|
|
@@ -178,7 +178,7 @@ export default defineComponent({
|
|
|
178
178
|
}
|
|
179
179
|
emit("update:showDropdown", visible.value);
|
|
180
180
|
},
|
|
181
|
-
{ immediate: true }
|
|
181
|
+
{ immediate: true },
|
|
182
182
|
);
|
|
183
183
|
watch(search, () => {
|
|
184
184
|
emit("update:search", search.value);
|
|
@@ -240,38 +240,46 @@ export default defineComponent({
|
|
|
240
240
|
});
|
|
241
241
|
</script>
|
|
242
242
|
|
|
243
|
-
<style
|
|
244
|
-
.
|
|
245
|
-
@apply inline-block relative
|
|
243
|
+
<style>
|
|
244
|
+
@reference '~ui/app/assets/css/main.css';
|
|
246
245
|
|
|
247
|
-
|
|
248
|
-
|
|
246
|
+
.dropdown {
|
|
247
|
+
@apply inline-block relative;
|
|
248
|
+
}
|
|
249
249
|
|
|
250
|
-
|
|
251
|
-
|
|
250
|
+
.dropdown.active .dropdown-toggle .toggle-icon {
|
|
251
|
+
@apply text-primary-600 rotate-180;
|
|
252
|
+
}
|
|
252
253
|
|
|
253
|
-
|
|
254
|
-
|
|
254
|
+
.dropdown-toggle {
|
|
255
|
+
@apply flex items-center p-1.75 border border-primary-500 rounded bg-white space-x-2 text-base text-pgray-2 whitespace-nowrap;
|
|
256
|
+
}
|
|
255
257
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
+
.dropdown-toggle .toggle-icon {
|
|
259
|
+
@apply text-xs leading-none text-pgray-2 transition-transform transform;
|
|
260
|
+
}
|
|
258
261
|
|
|
259
|
-
|
|
260
|
-
|
|
262
|
+
.dropdown-menu {
|
|
263
|
+
@apply z-50 flex flex-col max-h-48 border border-primary-500 rounded bg-white shadow-md overflow-hidden invisible pointer-events-none;
|
|
264
|
+
}
|
|
261
265
|
|
|
262
|
-
|
|
263
|
-
|
|
266
|
+
.dropdown-menu[data-show] {
|
|
267
|
+
@apply visible pointer-events-auto;
|
|
268
|
+
}
|
|
264
269
|
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
270
|
+
.dropdown-menu[data-show] .dropdown-list-wrapper .dropdown-list {
|
|
271
|
+
@apply relative;
|
|
272
|
+
}
|
|
268
273
|
|
|
269
|
-
|
|
270
|
-
|
|
274
|
+
.dropdown-menu .dropdown-search {
|
|
275
|
+
@apply grow-0 shrink-0 mb-1 p-1;
|
|
276
|
+
}
|
|
271
277
|
|
|
272
|
-
|
|
273
|
-
|
|
278
|
+
.dropdown-menu .dropdown-list-wrapper {
|
|
279
|
+
@apply grow;
|
|
280
|
+
}
|
|
274
281
|
|
|
275
|
-
|
|
276
|
-
|
|
282
|
+
.dropdown-menu .dropdown-list-wrapper .dropdown-list {
|
|
283
|
+
@apply absolute;
|
|
284
|
+
}
|
|
277
285
|
</style>
|
|
@@ -22,10 +22,14 @@ export default defineComponent({
|
|
|
22
22
|
});
|
|
23
23
|
</script>
|
|
24
24
|
|
|
25
|
-
<style
|
|
26
|
-
.
|
|
27
|
-
@apply block p-2 bg-white text-sm text-primary whitespace-nowrap s('hover:text-primary') s('hover:bg-primary-50') s('focus:text-primary') s('focus:bg-primary-50') s('active:text-primary') s('active:bg-primary-50')
|
|
25
|
+
<style>
|
|
26
|
+
@reference '~ui/app/assets/css/main.css';
|
|
28
27
|
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
.dropdown-item {
|
|
29
|
+
@apply block p-2 bg-white text-sm text-primary whitespace-nowrap hover:text-primary hover:bg-primary-50 focus:text-primary focus:bg-primary-50 active:text-primary active:bg-primary-50;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.dropdown-item.active {
|
|
33
|
+
@apply text-primary bg-primary-50;
|
|
34
|
+
}
|
|
31
35
|
</style>
|
|
@@ -169,13 +169,18 @@ export default defineComponent({
|
|
|
169
169
|
});
|
|
170
170
|
</script>
|
|
171
171
|
|
|
172
|
-
<style
|
|
173
|
-
.
|
|
174
|
-
@apply inline-flex
|
|
172
|
+
<style>
|
|
173
|
+
@reference '~ui/app/assets/css/main.css';
|
|
175
174
|
|
|
176
|
-
|
|
177
|
-
|
|
175
|
+
.element-with-title {
|
|
176
|
+
@apply inline-flex;
|
|
177
|
+
}
|
|
178
178
|
|
|
179
|
-
|
|
180
|
-
|
|
179
|
+
.element-with-title-tooltip {
|
|
180
|
+
@apply z-10 p-2 bg-mask/70 rounded text-xs text-white whitespace-pre shadow-default invisible pointer-events-none;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.element-with-title-tooltip[data-show] {
|
|
184
|
+
@apply visible;
|
|
185
|
+
}
|
|
181
186
|
</style>
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
<script lang="ts">
|
|
20
20
|
import { isEqual } from "lodash-es";
|
|
21
|
-
import { getUID } from "~ui/utils";
|
|
21
|
+
import { getUID } from "~ui/app/utils";
|
|
22
22
|
|
|
23
23
|
export default defineComponent({
|
|
24
24
|
name: "SLEyeCheckbox",
|
|
@@ -99,7 +99,7 @@ export default defineComponent({
|
|
|
99
99
|
} else {
|
|
100
100
|
emit(
|
|
101
101
|
"update:modelValue",
|
|
102
|
-
isChecked ? trueValue.value : falseValue.value
|
|
102
|
+
isChecked ? trueValue.value : falseValue.value,
|
|
103
103
|
);
|
|
104
104
|
}
|
|
105
105
|
}
|
|
@@ -118,45 +118,58 @@ export default defineComponent({
|
|
|
118
118
|
});
|
|
119
119
|
</script>
|
|
120
120
|
|
|
121
|
-
<style
|
|
122
|
-
.
|
|
123
|
-
@apply inline-block relative text-base align-top overflow-hidden
|
|
121
|
+
<style>
|
|
122
|
+
@reference '~ui/app/assets/css/main.css';
|
|
124
123
|
|
|
125
|
-
|
|
126
|
-
|
|
124
|
+
.eye-checkbox {
|
|
125
|
+
@apply inline-block relative text-base align-top overflow-hidden;
|
|
126
|
+
}
|
|
127
127
|
|
|
128
|
-
|
|
129
|
-
|
|
128
|
+
.eye-checkbox.checkbox-sm {
|
|
129
|
+
@apply text-sm;
|
|
130
|
+
}
|
|
130
131
|
|
|
131
|
-
|
|
132
|
-
|
|
132
|
+
.eye-checkbox.checkbox-sm label {
|
|
133
|
+
@apply text-sm;
|
|
134
|
+
}
|
|
133
135
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
+
.eye-checkbox input {
|
|
137
|
+
@apply absolute -top-10 -left-10;
|
|
138
|
+
}
|
|
136
139
|
|
|
137
|
-
|
|
138
|
-
|
|
140
|
+
.eye-checkbox label {
|
|
141
|
+
@apply relative inline-flex items-center text-base text-pgray-2 cursor-pointer;
|
|
142
|
+
}
|
|
139
143
|
|
|
140
|
-
|
|
141
|
-
|
|
144
|
+
.eye-checkbox label .icon {
|
|
145
|
+
@apply hidden text-primary;
|
|
146
|
+
}
|
|
142
147
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
148
|
+
.eye-checkbox label span {
|
|
149
|
+
@apply ml-2;
|
|
150
|
+
}
|
|
146
151
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
152
|
+
.eye-checkbox input:checked + label .icon-eye {
|
|
153
|
+
@apply inline-block;
|
|
154
|
+
}
|
|
150
155
|
|
|
151
|
-
|
|
152
|
-
|
|
156
|
+
.eye-checkbox input:not(:checked) + label .icon-eye-slash {
|
|
157
|
+
@apply inline-block;
|
|
158
|
+
}
|
|
153
159
|
|
|
154
|
-
|
|
155
|
-
|
|
160
|
+
.eye-checkbox input:not(:checked):disabled + label {
|
|
161
|
+
@apply text-pgray-4 cursor-default;
|
|
162
|
+
}
|
|
156
163
|
|
|
157
|
-
|
|
158
|
-
|
|
164
|
+
.eye-checkbox input:not(:checked):disabled + label .icon-eye-slash {
|
|
165
|
+
@apply inline-block text-pgray-4;
|
|
166
|
+
}
|
|
159
167
|
|
|
160
|
-
|
|
161
|
-
|
|
168
|
+
.eye-checkbox input:checked:disabled + label {
|
|
169
|
+
@apply text-pgray-3 cursor-default;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.eye-checkbox input:checked:disabled + label .icon-eye {
|
|
173
|
+
@apply inline-block text-pgray-3;
|
|
174
|
+
}
|
|
162
175
|
</style>
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
</template>
|
|
14
14
|
|
|
15
15
|
<script lang="ts">
|
|
16
|
-
import { getUID } from "~ui/utils";
|
|
16
|
+
import { getUID } from "~ui/app/utils";
|
|
17
17
|
|
|
18
18
|
export default defineComponent({
|
|
19
19
|
name: "SLFileInput",
|
|
@@ -78,24 +78,31 @@ export default defineComponent({
|
|
|
78
78
|
});
|
|
79
79
|
</script>
|
|
80
80
|
|
|
81
|
-
<style
|
|
82
|
-
.
|
|
83
|
-
|
|
81
|
+
<style>
|
|
82
|
+
@reference '~ui/app/assets/css/main.css';
|
|
83
|
+
|
|
84
|
+
.custom-file-input {
|
|
85
|
+
@apply inline-flex items-center space-x-3.5;
|
|
86
|
+
}
|
|
84
87
|
|
|
85
|
-
|
|
86
|
-
|
|
88
|
+
.custom-file-input .file-button {
|
|
89
|
+
@apply relative overflow-hidden;
|
|
90
|
+
}
|
|
87
91
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
92
|
+
.custom-file-input .file-button.uploaded label {
|
|
93
|
+
@apply bg-white border text-primary hover:text-primary-600 hover:bg-white;
|
|
94
|
+
}
|
|
91
95
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
96
|
+
.custom-file-input .file-button label {
|
|
97
|
+
@apply relative inline-block py-1.75 px-3.75 border border-transparent rounded bg-transparent text-base leading-[1.3125] space-x-2 cursor-pointer focus:outline-none;
|
|
98
|
+
@apply bg-primary border-primary text-white hover:bg-primary-600 hover:border-primary-600;
|
|
99
|
+
}
|
|
95
100
|
|
|
96
|
-
|
|
97
|
-
|
|
101
|
+
.custom-file-input .file-button input[type="file"] {
|
|
102
|
+
@apply absolute top-0 left-0;
|
|
103
|
+
}
|
|
98
104
|
|
|
99
|
-
|
|
100
|
-
|
|
105
|
+
.custom-file-input .filename {
|
|
106
|
+
@apply p-1.75 border border-primary-300 rounded bg-primary-50 text-base text-pgray-2;
|
|
107
|
+
}
|
|
101
108
|
</style>
|
|
@@ -42,7 +42,7 @@ import type { PropType } from "vue";
|
|
|
42
42
|
import { fromEvent, Subscription } from "rxjs";
|
|
43
43
|
import { createPopper } from "@popperjs/core";
|
|
44
44
|
import type { Instance as PopperInstance } from "@popperjs/core";
|
|
45
|
-
import { AGE_RANGE_NAME } from "~ui/utils/constants";
|
|
45
|
+
import { AGE_RANGE_NAME } from "~ui/app/utils/constants";
|
|
46
46
|
|
|
47
47
|
export default defineComponent({
|
|
48
48
|
name: "SLGenderAgeSelect",
|
|
@@ -92,7 +92,7 @@ export default defineComponent({
|
|
|
92
92
|
AGE_RANGE_NAME.map((name, i) => ({
|
|
93
93
|
label: name,
|
|
94
94
|
value: i + 1,
|
|
95
|
-
}))
|
|
95
|
+
})),
|
|
96
96
|
);
|
|
97
97
|
const genderProxy = computed({
|
|
98
98
|
get: () => {
|
|
@@ -234,50 +234,66 @@ export default defineComponent({
|
|
|
234
234
|
});
|
|
235
235
|
</script>
|
|
236
236
|
|
|
237
|
-
<style
|
|
238
|
-
.
|
|
239
|
-
@apply relative inline-flex
|
|
237
|
+
<style>
|
|
238
|
+
@reference '~ui/app/assets/css/main.css';
|
|
240
239
|
|
|
241
|
-
|
|
242
|
-
|
|
240
|
+
.gender-age-select {
|
|
241
|
+
@apply relative inline-flex;
|
|
242
|
+
}
|
|
243
243
|
|
|
244
|
-
|
|
245
|
-
|
|
244
|
+
.gender-age-select .toggle-button {
|
|
245
|
+
@apply inline-flex items-center justify-between w-full p-1.75 border border-primary-500 rounded space-x-4 text-sm text-pgray-2;
|
|
246
|
+
}
|
|
246
247
|
|
|
247
|
-
|
|
248
|
-
|
|
248
|
+
.gender-age-select .toggle-button .toggle-title {
|
|
249
|
+
@apply grow truncate;
|
|
250
|
+
}
|
|
249
251
|
|
|
250
|
-
.
|
|
251
|
-
@apply
|
|
252
|
+
.gender-age-select .toggle-button .icon {
|
|
253
|
+
@apply grow-0 shrink-0 text-xs leading-none;
|
|
254
|
+
}
|
|
252
255
|
|
|
253
|
-
|
|
254
|
-
|
|
256
|
+
.options-popup {
|
|
257
|
+
@apply z-60 absolute flex max-h-[196px] p-2.75 bg-white border border-primary-500 rounded shadow-default pointer-events-none invisible;
|
|
258
|
+
}
|
|
255
259
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
@apply flex-grow-0 flex-shrink-0
|
|
260
|
-
width 37%
|
|
260
|
+
.options-popup[data-show] {
|
|
261
|
+
@apply pointer-events-auto visible;
|
|
262
|
+
}
|
|
261
263
|
|
|
262
|
-
|
|
263
|
-
|
|
264
|
+
.options-popup .options-block {
|
|
265
|
+
@apply flex flex-col;
|
|
266
|
+
}
|
|
264
267
|
|
|
265
|
-
|
|
266
|
-
|
|
268
|
+
.options-popup .options-block-gender {
|
|
269
|
+
@apply grow-0 shrink-0 w-[37%];
|
|
270
|
+
}
|
|
267
271
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
@apply flex flex-col
|
|
272
|
+
.options-popup .options-block-age {
|
|
273
|
+
@apply grow;
|
|
274
|
+
}
|
|
272
275
|
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
@apply s('hover:bg-primary-100')
|
|
276
|
+
.options-popup .options-block-header {
|
|
277
|
+
@apply pb-1.75 border-b border-primary text-base text-primary;
|
|
278
|
+
}
|
|
277
279
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
+
.options-popup .options-block-body {
|
|
281
|
+
@apply overflow-hidden;
|
|
282
|
+
}
|
|
280
283
|
|
|
281
|
-
|
|
282
|
-
|
|
284
|
+
.options-popup .options-block-body .options-list {
|
|
285
|
+
@apply flex flex-col;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.options-popup .options-block-body .options-list .checkbox label {
|
|
289
|
+
@apply w-full py-1.5 px-2 text-sm hover:bg-primary-100;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.options-popup .options-block-body .options-list .checkbox label span {
|
|
293
|
+
@apply ml-1;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.options-popup .options-divide {
|
|
297
|
+
@apply grow-0 shrink-0 w-px ml-3 mr-2.75 bg-pgray-4;
|
|
298
|
+
}
|
|
283
299
|
</style>
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
|
|
34
34
|
<script lang="ts">
|
|
35
35
|
import type { PropType } from "vue";
|
|
36
|
-
import type IHourRange from "~ui/interface/IHourRange";
|
|
36
|
+
import type IHourRange from "~ui/app/interface/IHourRange";
|
|
37
37
|
|
|
38
38
|
export default defineComponent({
|
|
39
39
|
name: "SLHourRangeInput",
|
|
@@ -72,12 +72,12 @@ export default defineComponent({
|
|
|
72
72
|
const startHour = ref(
|
|
73
73
|
modelValue.value && modelValue.value.start !== null
|
|
74
74
|
? modelValue.value.start
|
|
75
|
-
: ""
|
|
75
|
+
: "",
|
|
76
76
|
);
|
|
77
77
|
const endHour = ref(
|
|
78
78
|
modelValue.value && modelValue.value.end !== null
|
|
79
79
|
? modelValue.value.end
|
|
80
|
-
: ""
|
|
80
|
+
: "",
|
|
81
81
|
);
|
|
82
82
|
const isStartHourInvalid = ref(false);
|
|
83
83
|
const isEndHourInvalid = ref(false);
|
|
@@ -166,46 +166,59 @@ export default defineComponent({
|
|
|
166
166
|
});
|
|
167
167
|
</script>
|
|
168
168
|
|
|
169
|
-
<style
|
|
170
|
-
.
|
|
171
|
-
&.inline
|
|
172
|
-
@apply flex
|
|
169
|
+
<style>
|
|
170
|
+
@reference '~ui/app/assets/css/main.css';
|
|
173
171
|
|
|
174
|
-
|
|
175
|
-
|
|
172
|
+
.hour-range-input.inline {
|
|
173
|
+
@apply flex;
|
|
174
|
+
}
|
|
176
175
|
|
|
177
|
-
|
|
178
|
-
|
|
176
|
+
.hour-range-input.inline > label {
|
|
177
|
+
@apply grow-0 shrink-0 mb-0 mr-2 py-2 border-t border-b border-transparent;
|
|
178
|
+
}
|
|
179
179
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
180
|
+
.hour-range-input.inline .form-control {
|
|
181
|
+
@apply grow;
|
|
182
|
+
}
|
|
183
183
|
|
|
184
|
+
.hour-range-input.disabled .input-group,
|
|
185
|
+
.hour-range-input.readonly .input-group {
|
|
186
|
+
@apply border-primary-500 bg-primary-100;
|
|
187
|
+
}
|
|
184
188
|
|
|
185
|
-
|
|
186
|
-
|
|
189
|
+
.hour-range-input > label {
|
|
190
|
+
@apply flex items-center mb-2 space-x-2 text-base leading-[1.3125] text-pgray-2;
|
|
191
|
+
}
|
|
187
192
|
|
|
188
|
-
|
|
189
|
-
|
|
193
|
+
.hour-range-input > label .icon {
|
|
194
|
+
@apply text-xs leading-none;
|
|
195
|
+
}
|
|
190
196
|
|
|
191
|
-
|
|
192
|
-
|
|
197
|
+
.hour-range-input .form-control {
|
|
198
|
+
@apply flex items-center space-x-2;
|
|
199
|
+
}
|
|
193
200
|
|
|
194
|
-
|
|
195
|
-
|
|
201
|
+
.hour-range-input .input-group {
|
|
202
|
+
@apply flex items-center flex-nowrap p-2 bg-white border border-primary-500 rounded text-base space-x-1;
|
|
203
|
+
}
|
|
196
204
|
|
|
197
|
-
|
|
198
|
-
|
|
205
|
+
.hour-range-input .input-group.invalid {
|
|
206
|
+
@apply border-danger;
|
|
207
|
+
}
|
|
199
208
|
|
|
200
|
-
|
|
201
|
-
|
|
209
|
+
.hour-range-input .input-group input[type="text"] {
|
|
210
|
+
@apply grow-0 shrink-0 w-4.75 border-0 bg-transparent text-base text-center text-pgray-2 outline-none;
|
|
211
|
+
}
|
|
202
212
|
|
|
203
|
-
|
|
204
|
-
|
|
213
|
+
.hour-range-input .input-group .minutes-label {
|
|
214
|
+
@apply grow-0 shrink-0;
|
|
215
|
+
}
|
|
205
216
|
|
|
206
|
-
|
|
207
|
-
|
|
217
|
+
.hour-range-input .input-group-splitter {
|
|
218
|
+
@apply w-4 h-px bg-primary;
|
|
219
|
+
}
|
|
208
220
|
|
|
209
|
-
|
|
210
|
-
|
|
221
|
+
.hour-range-input .invalid-feedback {
|
|
222
|
+
@apply mt-1 text-danger text-xs;
|
|
223
|
+
}
|
|
211
224
|
</style>
|