@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,487 @@
|
|
|
1
|
+
<template lang="pug">
|
|
2
|
+
.sidebar(:class="{ closure: closuredProxy, dark, introing }")
|
|
3
|
+
.sidebar-modal(@click="onClickedToggle")
|
|
4
|
+
.sidebar-intro-modal
|
|
5
|
+
.sidebar-wrapper
|
|
6
|
+
.sidebar-logo
|
|
7
|
+
a.logo(href="javascript:;" @click="onClickedLogo")
|
|
8
|
+
img.color-big(src="~ui/app/assets/images/commons/app-logo-big.svg", @load='onLogoLoaded')
|
|
9
|
+
img.white-big(src="~ui/app/assets/images/commons/app-logo-big-white.svg", @load='onLogoLoaded')
|
|
10
|
+
img.color-small(src='~ui/app/assets/images/commons/app-logo-small.svg', @load='onLogoLoaded')
|
|
11
|
+
img.white-small(src='~ui/app/assets/images/commons/app-logo-small-white.svg', @load='onLogoLoaded')
|
|
12
|
+
nav.site-nav
|
|
13
|
+
.nav-wrapper.custom-scrollbar-y
|
|
14
|
+
template(v-for='item in config')
|
|
15
|
+
SLSidebarNavLinkItem(
|
|
16
|
+
v-if='item.navType === "link"'
|
|
17
|
+
:nav-collapsed='closured'
|
|
18
|
+
:item-config='item'
|
|
19
|
+
@click:item='onClickedItem'
|
|
20
|
+
)
|
|
21
|
+
SLSidebarNavSectionItem(
|
|
22
|
+
v-else-if='item.navType === "section"'
|
|
23
|
+
:nav-collapsed='closured'
|
|
24
|
+
:item-config='item'
|
|
25
|
+
@click:item='onClickedItem'
|
|
26
|
+
)
|
|
27
|
+
SLSidebarNavGroupItem(
|
|
28
|
+
v-else-if='item.navType === "group"'
|
|
29
|
+
:nav-collapsed='closured'
|
|
30
|
+
:nav-dark='dark'
|
|
31
|
+
:item-config='item'
|
|
32
|
+
@click:item='onClickedItem'
|
|
33
|
+
)
|
|
34
|
+
.sidebar-nav-divide-item(
|
|
35
|
+
v-else
|
|
36
|
+
)
|
|
37
|
+
.sidebar-mode-setting
|
|
38
|
+
.sidebar-mode-setting-title 選單模式
|
|
39
|
+
SLIOSSwitch(
|
|
40
|
+
:modelValue="dark"
|
|
41
|
+
trueLabel="深色"
|
|
42
|
+
minTrueLabel="深"
|
|
43
|
+
falseLabel="淺色"
|
|
44
|
+
minFalseLabel="淺"
|
|
45
|
+
:size="closuredProxy ? 'min' : 'xs'"
|
|
46
|
+
:color='switchColor'
|
|
47
|
+
@update:modelValue="onUpdatedMode"
|
|
48
|
+
)
|
|
49
|
+
a.sidebar-toggle(href="javascript:;", @click="onClickedToggle")
|
|
50
|
+
SLIcon(icon="chevron-left")
|
|
51
|
+
SLIcon(icon="chevron-right")
|
|
52
|
+
.sidebar-nav-intro(ref='introEl')
|
|
53
|
+
.sidebar-nav-intro-header {{ navLinkIntro ? navLinkIntro.title : '' }}
|
|
54
|
+
.sidebar-nav-intro-body {{ navLinkIntro ? navLinkIntro.content : '' }}
|
|
55
|
+
.sidebar-nav-intro-footer
|
|
56
|
+
SLButton(
|
|
57
|
+
title='我知道了',
|
|
58
|
+
color='primary'
|
|
59
|
+
size='sm'
|
|
60
|
+
@click='onClickedCloseIntro'
|
|
61
|
+
)
|
|
62
|
+
.sidebar-nav-intro-arrow
|
|
63
|
+
</template>
|
|
64
|
+
|
|
65
|
+
<script lang="ts">
|
|
66
|
+
import type { PropType } from "vue";
|
|
67
|
+
import { createPopper } from "@popperjs/core";
|
|
68
|
+
import type { Instance as PopperInstance } from "@popperjs/core";
|
|
69
|
+
import { NavType, type NavConfigType } from "~ui/app/interface/NavConfigType";
|
|
70
|
+
|
|
71
|
+
export default defineComponent({
|
|
72
|
+
name: "SLSidebarNav",
|
|
73
|
+
props: {
|
|
74
|
+
dark: {
|
|
75
|
+
type: Boolean,
|
|
76
|
+
default: false,
|
|
77
|
+
},
|
|
78
|
+
closured: {
|
|
79
|
+
type: Boolean,
|
|
80
|
+
default: false,
|
|
81
|
+
},
|
|
82
|
+
config: {
|
|
83
|
+
type: Array as PropType<NavConfigType>,
|
|
84
|
+
default: () => [],
|
|
85
|
+
},
|
|
86
|
+
navIntros: {
|
|
87
|
+
type: Array as PropType<
|
|
88
|
+
{
|
|
89
|
+
code: string;
|
|
90
|
+
title: string;
|
|
91
|
+
content: string;
|
|
92
|
+
targetCode: string;
|
|
93
|
+
}[]
|
|
94
|
+
>,
|
|
95
|
+
default: () => [],
|
|
96
|
+
},
|
|
97
|
+
switchColor: {
|
|
98
|
+
type: String,
|
|
99
|
+
default: "",
|
|
100
|
+
validator: (v: string) => ["", "primary-600", "primary"].includes(v),
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
emits: [
|
|
104
|
+
"click:logo",
|
|
105
|
+
"update:dark",
|
|
106
|
+
"update:closured",
|
|
107
|
+
"click:insight",
|
|
108
|
+
"close:intro",
|
|
109
|
+
"logo:loaded",
|
|
110
|
+
],
|
|
111
|
+
setup(props, { emit }) {
|
|
112
|
+
const { closured, navIntros } = toRefs(props);
|
|
113
|
+
|
|
114
|
+
const introEl = ref<HTMLElement | null>(null);
|
|
115
|
+
const introing = ref(false);
|
|
116
|
+
|
|
117
|
+
const closuredProxy = computed({
|
|
118
|
+
get: () => closured.value,
|
|
119
|
+
set: (newValue) => emit("update:closured", newValue),
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
let introPopperInstance: PopperInstance | null = null;
|
|
123
|
+
|
|
124
|
+
const navLinkIntro = computed(() => navIntros.value[0]);
|
|
125
|
+
|
|
126
|
+
function onClickedToggle() {
|
|
127
|
+
if (introing.value) return;
|
|
128
|
+
|
|
129
|
+
closuredProxy.value = !closuredProxy.value;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
function onClickedLogo() {
|
|
133
|
+
emit("click:logo");
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function onClickedItem(
|
|
137
|
+
eventName:
|
|
138
|
+
| "click:logo"
|
|
139
|
+
| "update:dark"
|
|
140
|
+
| "update:closured"
|
|
141
|
+
| "click:insight",
|
|
142
|
+
) {
|
|
143
|
+
emit(eventName);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
function onUpdatedMode(isDark: boolean) {
|
|
147
|
+
emit("update:dark", isDark);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
function createIntroPopper() {
|
|
151
|
+
destroyIntroPopper();
|
|
152
|
+
|
|
153
|
+
if (!navLinkIntro.value) return;
|
|
154
|
+
|
|
155
|
+
const navLinkIndexEl = document.getElementById(
|
|
156
|
+
`nav-link-${navLinkIntro.value.targetCode}`,
|
|
157
|
+
);
|
|
158
|
+
|
|
159
|
+
if (!introEl.value || !navLinkIndexEl) return;
|
|
160
|
+
|
|
161
|
+
introPopperInstance = createPopper(navLinkIndexEl, introEl.value, {
|
|
162
|
+
modifiers: [
|
|
163
|
+
{
|
|
164
|
+
name: "offset",
|
|
165
|
+
options: {
|
|
166
|
+
offset: [-6, 39],
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
],
|
|
170
|
+
placement: "right-start",
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
function destroyIntroPopper() {
|
|
175
|
+
if (introPopperInstance) {
|
|
176
|
+
introPopperInstance.destroy();
|
|
177
|
+
}
|
|
178
|
+
introPopperInstance = null;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
async function showLinkIntro() {
|
|
182
|
+
await nextTick();
|
|
183
|
+
|
|
184
|
+
if (!introEl.value || !introPopperInstance) return;
|
|
185
|
+
|
|
186
|
+
introEl.value.setAttribute("data-show", "");
|
|
187
|
+
introPopperInstance.setOptions((options) => ({
|
|
188
|
+
...options,
|
|
189
|
+
modifiers: [
|
|
190
|
+
...(options.modifiers || []),
|
|
191
|
+
{ name: "eventListeners", enabled: true },
|
|
192
|
+
],
|
|
193
|
+
}));
|
|
194
|
+
introPopperInstance.update();
|
|
195
|
+
introing.value = true;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
function hideLinkIntro() {
|
|
199
|
+
introing.value = false;
|
|
200
|
+
|
|
201
|
+
if (!introEl.value || !introPopperInstance) return;
|
|
202
|
+
|
|
203
|
+
introEl.value.removeAttribute("data-show");
|
|
204
|
+
introPopperInstance.setOptions((options) => ({
|
|
205
|
+
...options,
|
|
206
|
+
modifiers: [
|
|
207
|
+
...(options.modifiers || []),
|
|
208
|
+
{ name: "eventListeners", enabled: false },
|
|
209
|
+
],
|
|
210
|
+
}));
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
function displayLinkIntro() {
|
|
214
|
+
if (!navLinkIntro.value) return;
|
|
215
|
+
|
|
216
|
+
createIntroPopper();
|
|
217
|
+
showLinkIntro();
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
function onClickedCloseIntro() {
|
|
221
|
+
hideLinkIntro();
|
|
222
|
+
|
|
223
|
+
if (!navLinkIntro.value) return;
|
|
224
|
+
|
|
225
|
+
emit("close:intro", navLinkIntro.value.code);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
function onLogoLoaded() {
|
|
229
|
+
emit("logo:loaded");
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
return {
|
|
233
|
+
introEl,
|
|
234
|
+
introing,
|
|
235
|
+
closuredProxy,
|
|
236
|
+
navLinkIntro,
|
|
237
|
+
onClickedToggle,
|
|
238
|
+
onClickedLogo,
|
|
239
|
+
onClickedItem,
|
|
240
|
+
onUpdatedMode,
|
|
241
|
+
displayLinkIntro,
|
|
242
|
+
onClickedCloseIntro,
|
|
243
|
+
onLogoLoaded,
|
|
244
|
+
};
|
|
245
|
+
},
|
|
246
|
+
});
|
|
247
|
+
</script>
|
|
248
|
+
|
|
249
|
+
<style>
|
|
250
|
+
@reference '~ui/app/assets/css/main.css';
|
|
251
|
+
|
|
252
|
+
.sidebar {
|
|
253
|
+
@apply relative h-full;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.sidebar.dark .sidebar-wrapper {
|
|
257
|
+
@apply bg-primary-800;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.sidebar.dark.closure .sidebar-logo .logo img.color-small {
|
|
261
|
+
@apply lg:hidden;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.sidebar.dark.closure .sidebar-logo .logo img.white-big {
|
|
265
|
+
@apply lg:hidden;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.sidebar.dark.closure .sidebar-logo .logo img.white-small {
|
|
269
|
+
@apply lg:block;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.sidebar.dark.closure .sidebar-toggle {
|
|
273
|
+
@apply bg-primary-900;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.sidebar.dark.closure .sidebar-toggle:hover {
|
|
277
|
+
@apply bg-primary-600;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.sidebar.dark .sidebar-logo .logo img.color-big {
|
|
281
|
+
@apply hidden;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.sidebar.dark .sidebar-logo .logo img.white-big {
|
|
285
|
+
@apply block;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.sidebar.dark nav .nav-wrapper.custom-scrollbar-y::-webkit-scrollbar-thumb {
|
|
289
|
+
@apply bg-primary-600;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.sidebar.dark
|
|
293
|
+
nav
|
|
294
|
+
.nav-wrapper.custom-scrollbar-y::-webkit-scrollbar-thumb:hover {
|
|
295
|
+
@apply bg-primary-600;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.sidebar.dark .sidebar-mode-setting {
|
|
299
|
+
@apply text-white;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.sidebar.dark .sidebar-mode-setting .ios-switch label {
|
|
303
|
+
@apply bg-nav-color-switch-bg border-primary-600;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.sidebar.dark .sidebar-mode-setting .ios-switch label::before {
|
|
307
|
+
@apply border-primary-600 bg-primary-300;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.sidebar.dark .sidebar-toggle {
|
|
311
|
+
@apply bg-primary-900 text-white;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.sidebar.dark .sidebar-toggle:hover {
|
|
315
|
+
@apply bg-primary-600;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.sidebar.closure .sidebar-modal {
|
|
319
|
+
@apply hidden;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.sidebar.closure .sidebar-wrapper {
|
|
323
|
+
@apply -ml-[188px] lg:ml-0 lg:w-[84px];
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.sidebar.closure .sidebar-logo {
|
|
327
|
+
@apply lg:py-3 lg:px-0;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.sidebar.closure .sidebar-logo .logo img.color-big {
|
|
331
|
+
@apply lg:hidden;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.sidebar.closure .sidebar-logo .logo img.color-small {
|
|
335
|
+
@apply lg:block;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.sidebar.closure .sidebar-toggle {
|
|
339
|
+
@apply -mr-5 bg-primary-300 rounded-l-none rounded-r-xl text-white;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.sidebar.closure .sidebar-toggle:hover {
|
|
343
|
+
@apply bg-primary-400 text-white;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
.sidebar.closure .sidebar-toggle .icon-chevron-left {
|
|
347
|
+
@apply hidden;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.sidebar.closure .sidebar-toggle .icon-chevron-right {
|
|
351
|
+
@apply inline-block;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
.sidebar.closure nav.site-nav .nav-wrapper {
|
|
355
|
+
@apply lg:items-center;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
.sidebar.closure .sidebar-mode-setting {
|
|
359
|
+
@apply p-0 justify-center space-x-0;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
.sidebar.closure .sidebar-mode-setting-title {
|
|
363
|
+
@apply hidden;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
.sidebar.closure .sidebar-mode-setting .ios-switch {
|
|
367
|
+
@apply grow-0 shrink-0;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
.sidebar.introing .sidebar-intro-modal {
|
|
371
|
+
@apply block;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
.sidebar.introing .sidebar-wrapper {
|
|
375
|
+
@apply pointer-events-none;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
.sidebar-modal {
|
|
379
|
+
@apply fixed top-0 left-0 w-full h-full bg-white opacity-0 lg:hidden;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.sidebar-intro-modal {
|
|
383
|
+
@apply fixed top-0 left-0 w-full h-full bg-mask/80 hidden;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
.sidebar-wrapper {
|
|
387
|
+
@apply relative flex flex-col w-[188px] h-full bg-white rounded-r-lg shadow-default transition-all;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
.sidebar-logo {
|
|
391
|
+
@apply grow-0 shrink-0 relative flex justify-center py-4 pr-11 pl-6 transition-all;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
.sidebar-logo .logo {
|
|
395
|
+
@apply block;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
.sidebar-logo .logo img.white-big,
|
|
399
|
+
.sidebar-logo .logo img.white-small,
|
|
400
|
+
.sidebar-logo .logo img.color-small {
|
|
401
|
+
@apply hidden;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
.sidebar nav.site-nav {
|
|
405
|
+
@apply grow px-1 overflow-hidden;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
.sidebar nav.site-nav .nav-wrapper {
|
|
409
|
+
@apply flex flex-col h-full px-3;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
.sidebar nav.site-nav .nav-wrapper .sidebar-nav-divide-item {
|
|
413
|
+
@apply w-full h-px my-2 bg-primary-200;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
.sidebar .sidebar-mode-setting {
|
|
417
|
+
@apply grow-0 shrink-0 flex items-center justify-start my-4 pl-4 space-x-2 text-xs text-primary;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
.sidebar .sidebar-mode-setting-title {
|
|
421
|
+
@apply grow-0 shrink-0;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
.sidebar .sidebar-mode-setting .ios-switch {
|
|
425
|
+
@apply grow-0 shrink-0;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
.sidebar .sidebar-mode-setting .ios-switch label {
|
|
429
|
+
@apply border-primary-100 bg-primary-25;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
.sidebar .sidebar-mode-setting .ios-switch label::before {
|
|
433
|
+
@apply border-primary-100;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
.sidebar-toggle {
|
|
437
|
+
@apply absolute top-0 right-0 flex justify-center items-center w-5 h-10 mt-2.5 bg-primary-50 rounded-l-xl text-sm text-primary-500 leading-none transition-all;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
.sidebar-toggle:hover {
|
|
441
|
+
@apply bg-primary-300 text-white;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
.sidebar-toggle .icon-chevron-right {
|
|
445
|
+
@apply hidden;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
.sidebar-nav-intro {
|
|
449
|
+
@apply w-[288px] p-4 bg-white rounded-lg hidden;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
.sidebar-nav-intro[data-show] {
|
|
453
|
+
@apply block;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
.sidebar-nav-intro[data-popper-placement^="right"] > .sidebar-nav-intro-arrow {
|
|
457
|
+
@apply -left-3.75 top-4;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
.sidebar-nav-intro-header {
|
|
461
|
+
@apply mb-2 text-base font-bold text-primary;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
.sidebar-nav-intro-body {
|
|
465
|
+
@apply mb-4 text-base text-pgray-2 whitespace-pre-line;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
.sidebar-nav-intro-footer {
|
|
469
|
+
@apply text-right;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
.sidebar-nav-intro-arrow,
|
|
473
|
+
.sidebar-nav-intro-arrow::before {
|
|
474
|
+
@apply absolute w-[17px] h-[20px] bg-contain;
|
|
475
|
+
background: url("~ui/app/assets/images/commons/nav-intro-arrow.svg") top left
|
|
476
|
+
no-repeat;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
.sidebar-nav-intro-arrow {
|
|
480
|
+
@apply invisible;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
.sidebar-nav-intro-arrow::before {
|
|
484
|
+
content: "";
|
|
485
|
+
@apply visible;
|
|
486
|
+
}
|
|
487
|
+
</style>
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
</template>
|
|
12
12
|
|
|
13
13
|
<script lang="ts">
|
|
14
|
-
import type { NavItemGroup } from
|
|
14
|
+
import type { NavItemGroup } from "~ui/app/interface/NavConfigType";
|
|
15
15
|
|
|
16
16
|
export default defineComponent({
|
|
17
|
-
name:
|
|
17
|
+
name: "SLSidebarNavGroupItem",
|
|
18
18
|
props: {
|
|
19
19
|
navCollapsed: {
|
|
20
20
|
type: Boolean,
|
|
@@ -29,18 +29,21 @@ export default defineComponent({
|
|
|
29
29
|
required: true,
|
|
30
30
|
},
|
|
31
31
|
},
|
|
32
|
-
emits: [
|
|
32
|
+
emits: ["click:item"],
|
|
33
33
|
setup() {
|
|
34
34
|
return {};
|
|
35
35
|
},
|
|
36
36
|
});
|
|
37
37
|
</script>
|
|
38
38
|
|
|
39
|
-
<style
|
|
40
|
-
.
|
|
41
|
-
.sidebar-nav-group-item
|
|
42
|
-
@apply bg-primary-900
|
|
39
|
+
<style>
|
|
40
|
+
@reference '~ui/app/assets/css/main.css';
|
|
43
41
|
|
|
44
|
-
.sidebar-nav-group-item
|
|
45
|
-
@apply
|
|
46
|
-
|
|
42
|
+
.sidebar.dark .sidebar-nav-group-item {
|
|
43
|
+
@apply bg-primary-900;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.sidebar-nav-group-item {
|
|
47
|
+
@apply w-full mt-1 p-2 space-y-1 bg-primary-50 rounded-lg;
|
|
48
|
+
}
|
|
49
|
+
</style>
|