@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
@@ -1,475 +0,0 @@
1
- <template lang="pug">
2
- .tabs(:class='tabsClass')
3
- .tabs-nav(
4
- v-show="!tabItemsOversize"
5
- :class="{ show: !tabItemsOversize }"
6
- )
7
- .tabs-nav-left(ref='tabsNavLeftEl')
8
- SLDistributor(
9
- tag='ul',
10
- :header='true',
11
- :changeTabTo='changeTabTo',
12
- ref='navComp'
13
- )
14
- slot
15
- .tabs-nav-right(v-if='(type === 1 || type === 5) && $slots["tabs-nav-right"]')
16
- slot(name='tabs-nav-right')
17
- .tabs-content
18
- SLDistributor
19
- .tabs-content-header(v-show="tabItemsOversize")
20
- .tabs-content-header-left
21
- SLDropdown.tabs-dropdown(
22
- :title='currentTab',
23
- v-model:showDropdown='showDropdown',
24
- :class='{ active: showDropdown }',
25
- )
26
- SLDropdownItem(
27
- v-for='(tabTitle, i) in tabTitles',
28
- :title='tabTitle',
29
- :class='{ active: i === activeTabIndex }',
30
- @click='onClickedTab(i)',
31
- :key='`${tabTitle}-${i}`'
32
- )
33
- .tabs-content-header-right(v-if='$slots["tabs-nav-right"]')
34
- slot(name='tabs-nav-right')
35
- .tabs-content-body(ref='tabsContentBody')
36
- slot
37
- </template>
38
-
39
- <script lang="ts">
40
- import { fromEvent, interval, Subscription } from "rxjs";
41
- import { debounce, startWith } from "rxjs/operators";
42
- import { SLDistributor } from "#components";
43
-
44
- type SLDistributorType = InstanceType<typeof SLDistributor>;
45
-
46
- export default defineComponent({
47
- name: "SLTabs",
48
- components: {},
49
- props: {
50
- size: {
51
- type: String,
52
- default: "",
53
- validator: (value: string) => ["", "xs", "sm"].includes(value),
54
- },
55
- navMode: {
56
- type: String,
57
- default: "",
58
- },
59
- type: {
60
- type: Number,
61
- default: 1,
62
- validator: (value: number) => [1, 2, 3, 4, 5, 6].includes(value),
63
- },
64
- activeTab: {
65
- type: Number,
66
- default: 0,
67
- },
68
- },
69
- emits: ["update:activeTab"],
70
- setup(props, { emit }) {
71
- const { activeTab, size, type, navMode } = toRefs(props);
72
-
73
- const tabsContentBody = shallowRef<HTMLElement | null>(null);
74
- const tabsNavLeftEl = shallowRef<HTMLElement | null>(null);
75
- const navComp = shallowRef<SLDistributorType | null>(null);
76
- const tabTitles = ref<Array<string>>([]);
77
- const showDropdown = ref(false);
78
- const tabItemsOversizeProxy = ref(false);
79
-
80
- let observer: MutationObserver | null = null;
81
- let resizeSubscriber: Subscription | null = null;
82
-
83
- const activeTabIndex = computed(() => activeTab.value || 0);
84
- const tabsClass = computed(() => {
85
- const classes: Array<string> = [`tabs-type-${type.value}`];
86
-
87
- if (size.value !== "") {
88
- classes.push(`tabs-${size.value}`);
89
- }
90
-
91
- return classes.join(" ");
92
- });
93
- const currentTab = computed(() => {
94
- return tabTitles.value[activeTabIndex.value];
95
- });
96
- const tabItemsOversize = computed({
97
- get: () => {
98
- return (
99
- type.value !== 4 &&
100
- (tabItemsOversizeProxy.value || navMode.value === "dropdown")
101
- );
102
- },
103
- set: (newValue: boolean) => {
104
- tabItemsOversizeProxy.value = newValue;
105
- },
106
- });
107
-
108
- provide("activeTab", readonly(activeTabIndex));
109
- provide("initialTab", readonly(activeTab));
110
-
111
- function caculateTabs() {
112
- nextTick(() => {
113
- const tabLinks =
114
- navComp.value?.$el.querySelectorAll(".tab-nav-item-link");
115
- const tabLinkTitles = [];
116
- if (tabLinks) {
117
- for (let i = 0; i < tabLinks.length; i += 1) {
118
- tabLinkTitles.push((tabLinks[i] as HTMLElement).innerText);
119
- }
120
- }
121
- tabTitles.value = tabLinkTitles;
122
-
123
- const tabsNavLeftRect = tabsNavLeftEl.value?.getBoundingClientRect();
124
- const navRect = navComp.value?.$el?.getBoundingClientRect();
125
-
126
- if (tabsNavLeftRect && navRect) {
127
- tabItemsOversizeProxy.value = navRect.width > tabsNavLeftRect.width;
128
- }
129
- });
130
- }
131
-
132
- function changeTabTo(newTab: number) {
133
- emit("update:activeTab", newTab);
134
- }
135
-
136
- function onClickedTab(i: number) {
137
- changeTabTo(i);
138
- }
139
-
140
- onMounted(() => {
141
- resizeSubscriber = fromEvent(window, "resize")
142
- .pipe(debounce(() => interval(500)))
143
- .pipe(startWith(0))
144
- .subscribe(() => {
145
- caculateTabs();
146
- });
147
-
148
- if (navComp.value) {
149
- observer = new MutationObserver(caculateTabs);
150
- observer.observe(navComp.value.$el, {
151
- characterData: true,
152
- attributes: false,
153
- childList: true,
154
- subtree: true,
155
- });
156
- }
157
- });
158
-
159
- onBeforeUnmount(() => {
160
- if (resizeSubscriber) {
161
- resizeSubscriber.unsubscribe();
162
- }
163
- if (observer) {
164
- observer.disconnect();
165
- }
166
- resizeSubscriber = null;
167
- observer = null;
168
- });
169
-
170
- return {
171
- tabsContentBody,
172
- tabsNavLeftEl,
173
- navComp,
174
- activeTabIndex,
175
- tabTitles,
176
- showDropdown,
177
- tabItemsOversize,
178
- tabsClass,
179
- currentTab,
180
- changeTabTo,
181
- onClickedTab,
182
- };
183
- },
184
- });
185
- </script>
186
-
187
- <style lang="stylus">
188
- .tabs
189
- &.tabs-sm
190
- &.tabs-type-1
191
- & > .tabs-nav
192
- ul
193
- .tab-nav-item
194
- &-link
195
- @apply text-sm
196
-
197
- &.tabs-xs
198
- &.tabs-type-1
199
- & > .tabs-nav
200
- ul
201
- .tab-nav-item
202
- &.active
203
- &:before
204
- @apply hidden
205
-
206
- &-link
207
- @apply s("py-0.75") text-base
208
-
209
- &.tabs-type-1
210
- & > .tabs-nav
211
- @apply flex items-start justify-between h-0 space-x-8 overflow-hidden
212
- @apply s('lg:space-x-30')
213
-
214
- &.show
215
- @apply h-auto s("-mb-1.5")
216
-
217
- .tabs-nav-left
218
- @apply flex-grow overflow-hidden
219
-
220
- .tabs-nav-right
221
- @apply flex-grow-0 flex-shrink-0
222
-
223
- ul
224
- @apply inline-flex items-start s("-space-x-px")
225
-
226
- .tab-nav-item
227
- @apply relative rounded-t bg-white
228
-
229
- &:first-child
230
- .tab-nav-item-link
231
- &:after
232
- content ""
233
- @apply absolute bottom-0 left-0 w-px h-3 s("-mb-3") s("-ml-px") bg-primary-600
234
-
235
- &.active
236
- @apply s("pb-1.75")
237
-
238
- &:before
239
- content ""
240
- @apply block absolute s("top-0.5") s("right-0.75") s("left-0.75") h-1 bg-highlight-400
241
-
242
- .tab-nav-item-link
243
- @apply text-primary cursor-default
244
-
245
- &-link
246
- @apply relative block s("py-1.75") s("px-3.75") border-t border-r border-l border-primary-600 rounded-t text-lg text-primary-600
247
-
248
- &-title
249
- @apply truncate
250
-
251
- .tab-pane
252
- @apply space-y-8
253
-
254
- & > .tabs-content
255
- @apply p-4 border border-primary-600 rounded-lg bg-white overflow-hidden
256
-
257
- .tabs-content-header
258
- @apply flex items-start justify-between mb-4
259
-
260
- &.tabs-type-2
261
- & > .tabs-nav
262
- @apply mb-0
263
-
264
- ul
265
- @apply flex px-8 pb-5 space-x-8
266
- @apply s('lg:px-6') s('lg:space-x-14')
267
-
268
- .tab-nav-item
269
- @apply relative flex-grow s('py-6') rounded bg-primary-100 text-lg text-primary-600 text-center
270
- @apply s('lg:py-5.5')
271
-
272
- &:before
273
- content ""
274
- @apply absolute s('top-0.5') s('left-0.5') block rounded bg-white
275
- width calc(100% - theme('spacing.1'))
276
- height calc(100% - theme('spacing.1'))
277
-
278
- &:after
279
- content ""
280
- @apply absolute left-0 bottom-0 s('-ml-4') s('-mb-5') block w-full h-3 rounded-t bg-primary-300 opacity-0
281
- width calc(100% + theme('spacing.4') * 2)
282
-
283
- &.active
284
- @apply text-primary font-bold
285
-
286
- &:after
287
- @apply opacity-100
288
-
289
- &:nth-child(odd)
290
- @apply bg-transparent s('bg-gradient-to-r') s('from-insight-web-title-start') s('to-insight-web-title-end')
291
-
292
- &:after
293
- @apply bg-transparent s('bg-gradient-to-r') s('from-insight-web-title-start') s('to-insight-web-title-end')
294
-
295
- &:nth-child(even)
296
- @apply bg-transparent s('bg-gradient-to-r') s('from-insight-poi-title-start') s('to-insight-poi-title-end')
297
-
298
- &:after
299
- @apply bg-transparent s('bg-gradient-to-r') s('from-insight-poi-title-start') s('to-insight-poi-title-end')
300
-
301
- .tab-nav-item-link
302
- @apply cursor-default
303
-
304
- &-link
305
- @apply relative
306
-
307
- &.tabs-type-3
308
- & > .tabs-nav
309
- @apply flex items-start justify-between h-0 space-x-8 overflow-hidden
310
- @apply s('lg:space-x-30')
311
-
312
- &.show
313
- @apply h-auto mb-1
314
-
315
- .tabs-nav-left
316
- @apply flex-grow overflow-hidden
317
-
318
- .tabs-nav-right
319
- @apply flex-grow-0 flex-shrink-0
320
-
321
- ul
322
- @apply inline-flex items-start space-x-2
323
-
324
- .tab-nav-item
325
- @apply relative rounded-t bg-primary-100
326
-
327
- &.active
328
- @apply bg-primary
329
-
330
- .tab-nav-item-link
331
- @apply text-white cursor-default
332
-
333
- &-link
334
- @apply relative block py-2 px-8 rounded-t text-base text-primary
335
-
336
- &-title
337
- @apply truncate
338
-
339
- .tab-pane
340
- @apply space-y-8
341
-
342
- & > .tabs-content
343
- @apply p-6 rounded-tr-lg rounded-b-lg bg-white shadow overflow-hidden
344
-
345
- .tabs-content-header
346
- @apply flex items-start justify-between
347
-
348
- .tabs-dropdown
349
- @apply mb-4
350
-
351
- &.tabs-type-4
352
- @apply flex
353
-
354
- & > .tabs-nav
355
- @apply flex-grow-0 flex-shrink-0
356
-
357
- .tabs-nav-left
358
- ul
359
- @apply flex flex-col s('space-y-0.5')
360
-
361
- .tab-nav-item
362
- @apply flex justify-between s('w-[184px]') py-3 pl-3 pr-5 bg-primary-50 rounded-l-lg text-xs
363
-
364
- &.active
365
- @apply bg-primary-600 text-white font-bold shadow-md
366
-
367
- &-link
368
- @apply block w-full
369
-
370
- .tabs-content
371
- @apply flex-grow s('-ml-2') p-4 bg-white border border-primary-600 rounded-lg shadow-md
372
-
373
- & > div
374
- @apply flex min-h-full
375
-
376
- .tabs-content-body
377
- @apply w-full
378
-
379
- &.tabs-type-5
380
- & > .tabs-nav
381
- @apply flex items-start justify-between h-0 mb-4 space-x-8 overflow-hidden
382
- @apply s('lg:space-x-30')
383
-
384
- &.show
385
- @apply h-auto
386
-
387
- .tabs-nav-left
388
- &:before
389
- content ""
390
- @apply absolute right-0 bottom-0 left-0 h-px s('rounded-[1px]') bg-primary-300
391
-
392
- .tabs-nav-left
393
- @apply relative flex-grow overflow-hidden
394
-
395
- .tabs-nav-right
396
- @apply flex-grow-0 flex-shrink-0
397
-
398
- ul
399
- @apply inline-flex items-start
400
-
401
- .tab-nav-item
402
- @apply relative
403
-
404
- &.active
405
- &:after
406
- content ""
407
- @apply block absolute right-0 bottom-0 left-0 h-1 s('rounded-[1px]') bg-primary
408
-
409
- .tab-nav-item-link
410
- @apply cursor-default
411
-
412
- &.disabled
413
- .tab-nav-item-link
414
- @apply text-pgray-4 cursor-default
415
-
416
- &-link
417
- @apply relative block px-4 pb-2 text-lg text-pgray-2
418
-
419
- &-title
420
- @apply truncate
421
-
422
- .tab-pane
423
- @apply space-y-8
424
-
425
- &.tabs-type-6
426
- & > .tabs-nav
427
- @apply flex items-start justify-between h-0 mb-6 space-x-8 overflow-hidden
428
- @apply s('lg:space-x-30')
429
-
430
- &.show
431
- @apply h-auto
432
-
433
- .tabs-nav-left
434
- &:before
435
- content ""
436
- @apply absolute right-0 bottom-0 left-0 h-1 bg-pgray-5
437
-
438
- .tabs-nav-left
439
- @apply relative flex-grow-0 flex-shrink-0
440
-
441
- .tabs-nav-right
442
- @apply flex-grow-0 flex-shrink-0
443
-
444
- ul
445
- @apply inline-flex items-start
446
-
447
- .tab-nav-item
448
- @apply relative
449
-
450
- &.active
451
- &:after
452
- content ""
453
- @apply block absolute right-0 bottom-0 left-0 h-1 bg-blue-1
454
-
455
- .tab-nav-item-link
456
- @apply text-blue-1 cursor-default
457
-
458
- &.disabled
459
- .tab-nav-item-link
460
- @apply text-pgray-4 cursor-default
461
-
462
- &-link
463
- @apply relative block pt-1 px-6 pb-2 text-base text-secondary-500
464
-
465
- &-title
466
- @apply truncate
467
-
468
- .tab-pane
469
- @apply space-y-8
470
-
471
- & > .tabs-content
472
- .tabs
473
- & > .tabs-content
474
- @apply shadow-md
475
- </style>
@@ -1,7 +0,0 @@
1
- export enum ScreenSize {
2
- md = 'md',
3
- lg = 'lg',
4
- xl = 'xl',
5
- '1.5xl' = '1.5xl',
6
- '2xl' = '2xl',
7
- }
package/pages/index.vue DELETED
@@ -1,15 +0,0 @@
1
- <template lang="pug">
2
- .main
3
- </template>
4
-
5
- <script lang="ts">
6
- export default defineComponent({
7
- name: 'IndexPage',
8
- setup() {
9
- return {};
10
- },
11
- });
12
- </script>
13
-
14
- <style lang="stylus" scoped>
15
- </style>