@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.
Files changed (111) 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 +11 -2
  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/app/components/SLAlertModal.vue +24 -16
  9. package/app/components/SLBreadcrumbs.vue +12 -8
  10. package/app/components/SLButton.vue +196 -163
  11. package/app/components/SLCalendarButton.vue +40 -34
  12. package/app/components/SLCalendarPopup.vue +79 -53
  13. package/app/components/SLCard.vue +57 -41
  14. package/app/components/SLChart.vue +6 -3
  15. package/app/components/SLCheckbox.vue +92 -49
  16. package/app/components/SLCircleButton.vue +25 -16
  17. package/app/components/SLCollapsableBlock.vue +44 -33
  18. package/app/components/SLCollapsableMulitPillSelect.vue +20 -15
  19. package/app/components/SLConfirmModal.vue +9 -6
  20. package/app/components/SLContextMenu.vue +88 -48
  21. package/app/components/SLDateInput.vue +109 -92
  22. package/app/components/SLDatePicker.vue +9 -7
  23. package/app/components/SLDistributor.vue +1 -1
  24. package/app/components/SLDownloadButton.vue +39 -29
  25. package/app/components/SLDraggable.vue +2 -2
  26. package/app/components/SLDropdown.vue +33 -25
  27. package/app/components/SLDropdownItem.vue +9 -5
  28. package/app/components/SLElementWithTitle.vue +12 -7
  29. package/app/components/SLEyeCheckbox.vue +44 -31
  30. package/app/components/SLFileInput.vue +23 -16
  31. package/app/components/SLGenderAgeSelect.vue +52 -36
  32. package/app/components/SLHourRangeInput.vue +45 -32
  33. package/app/components/SLIOSSwitch.vue +81 -60
  34. package/app/components/SLIcon.vue +4 -3
  35. package/app/components/SLIconButton.vue +31 -29
  36. package/app/components/SLInfoTip.vue +51 -40
  37. package/app/components/SLInsightSitePage.vue +12 -7
  38. package/app/components/SLLegend.vue +19 -12
  39. package/app/components/SLLinearProgressBar.vue +7 -20
  40. package/app/components/SLLink.vue +12 -8
  41. package/app/components/SLLoading.vue +34 -31
  42. package/app/components/SLMapChart.vue +5 -4
  43. package/app/components/SLModal.vue +90 -66
  44. package/app/components/SLMonthCalendarButton.vue +91 -45
  45. package/app/components/SLMonthPicker.vue +42 -37
  46. package/app/components/SLMultiEmailInput.vue +163 -113
  47. package/app/components/SLMultiSelect.vue +37 -26
  48. package/app/components/SLNoData.vue +16 -11
  49. package/app/components/SLNotification.vue +133 -129
  50. package/app/components/SLPageModal.vue +14 -9
  51. package/app/components/SLPagination.vue +45 -33
  52. package/app/components/SLPillCheckbox.vue +50 -42
  53. package/app/components/SLPillLabel.vue +43 -28
  54. package/app/components/SLPopupMenuButton.vue +26 -17
  55. package/app/components/SLProfileButton.vue +28 -20
  56. package/app/components/SLProjectShareItem.vue +30 -17
  57. package/app/components/SLRadioButton.vue +41 -33
  58. package/app/components/SLRadioButtonGroup.vue +28 -23
  59. package/app/components/SLRadioGroup.vue +90 -78
  60. package/app/components/SLRangeInput.vue +53 -38
  61. package/app/components/SLRegionsMapChart.vue +5 -4
  62. package/app/components/SLRightSider.vue +50 -40
  63. package/app/components/SLSearchInput.vue +24 -19
  64. package/app/components/SLSelect.vue +114 -87
  65. package/app/components/SLSelectAllToggle.vue +52 -37
  66. package/app/components/SLSidebarNav.vue +253 -193
  67. package/app/components/SLSidebarNavGroupItem.vue +13 -10
  68. package/app/components/SLSidebarNavGroupItemSection.vue +240 -179
  69. package/app/components/SLSidebarNavLinkItem.vue +131 -109
  70. package/app/components/SLSidebarNavSectionItem.vue +21 -18
  71. package/app/components/SLSitePage.vue +35 -24
  72. package/app/components/SLSkyInsightSitePage.vue +13 -8
  73. package/app/components/SLSortByDropdown.vue +35 -22
  74. package/app/components/SLSpinIcon.vue +6 -3
  75. package/app/components/SLStayRangeInput.vue +47 -36
  76. package/app/components/SLTab.vue +7 -2
  77. package/app/components/SLTable.vue +330 -313
  78. package/app/components/SLTableTooltip.vue +44 -30
  79. package/app/components/SLTabs.vue +333 -280
  80. package/app/components/SLTextInput.vue +162 -134
  81. package/app/components/SLTextarea.vue +40 -29
  82. package/app/components/SLToast.vue +19 -11
  83. package/app/components/SLToggleButton.vue +18 -11
  84. package/app/components/SLTwoLayerMultiSelect.vue +180 -85
  85. package/app/components/SLTwoLayerSelect.vue +47 -37
  86. package/app/components/SLTwoLayerSingleSelect.vue +52 -33
  87. package/app/components/SLWarnModal.vue +9 -7
  88. package/app/interface/commons.ts +7 -0
  89. package/app/utils/index.ts +213 -146
  90. package/eslint.config.js +3 -0
  91. package/nuxt.config.ts +17 -14
  92. package/package.json +9 -8
  93. package/skills-lock.json +59 -0
  94. package/tsconfig.json +1 -6
  95. package/.eslintrc.cjs +0 -4
  96. package/app/assets/css/layout.styl +0 -98
  97. package/app/assets/css/tailwind.css +0 -3
  98. package/app/pages/index.vue +0 -15
  99. package/interface/commons.ts +0 -7
  100. package/tailwind.config.js +0 -271
  101. /package/{interface → app/interface}/IDateRange.ts +0 -0
  102. /package/{interface → app/interface}/IHourRange.ts +0 -0
  103. /package/{interface → app/interface}/IInputOption.ts +0 -0
  104. /package/{interface → app/interface}/ILegendItem.ts +0 -0
  105. /package/{interface → app/interface}/IOrganization.ts +0 -0
  106. /package/{interface → app/interface}/IPopupMenuButton.ts +0 -0
  107. /package/{interface → app/interface}/IStayRange.ts +0 -0
  108. /package/{interface → app/interface}/ITableField.ts +0 -0
  109. /package/{interface → app/interface}/IWeb.ts +0 -0
  110. /package/{interface → app/interface}/NavConfigType.ts +0 -0
  111. /package/{models → app/models}/DateRange.ts +0 -0
@@ -63,15 +63,18 @@ NuxtLink.sidebar-nav-link-item(
63
63
  </template>
64
64
 
65
65
  <script lang="ts">
66
- import { NuxtLink } from '#components';
67
- import { createPopper } from '@popperjs/core';
68
- import type { Instance as PopperInstance } from '@popperjs/core';
69
- import { NavItemStatus, type NavItemLink } from '~/interface/NavConfigType';
66
+ import { NuxtLink } from "#components";
67
+ import { createPopper } from "@popperjs/core";
68
+ import type { Instance as PopperInstance } from "@popperjs/core";
69
+ import {
70
+ NavItemStatus,
71
+ type NavItemLink,
72
+ } from "~ui/app/interface/NavConfigType";
70
73
 
71
74
  type NuxtLinkType = InstanceType<typeof NuxtLink>;
72
75
 
73
76
  export default defineComponent({
74
- name: 'SLSidebarNavLinkItem',
77
+ name: "SLSidebarNavLinkItem",
75
78
  props: {
76
79
  navCollapsed: {
77
80
  type: Boolean,
@@ -82,7 +85,7 @@ export default defineComponent({
82
85
  required: true,
83
86
  },
84
87
  },
85
- emits: ['click:item'],
88
+ emits: ["click:item"],
86
89
  setup(props, { emit }) {
87
90
  const route = useRoute();
88
91
 
@@ -111,17 +114,17 @@ export default defineComponent({
111
114
  if (
112
115
  !linkComp.value ||
113
116
  !popupEl.value ||
114
- popupEl.value.hasAttribute('data-show') ||
117
+ popupEl.value.hasAttribute("data-show") ||
115
118
  !popperInstance
116
119
  )
117
120
  return;
118
121
 
119
- popupEl.value.setAttribute('data-show', '');
122
+ popupEl.value.setAttribute("data-show", "");
120
123
  popperInstance.setOptions((options) => ({
121
124
  ...options,
122
125
  modifiers: [
123
126
  ...(options.modifiers || []),
124
- { name: 'eventListeners', enabled: true },
127
+ { name: "eventListeners", enabled: true },
125
128
  ],
126
129
  }));
127
130
  popperInstance.update();
@@ -136,7 +139,7 @@ export default defineComponent({
136
139
 
137
140
  function onIconMouseEnter() {
138
141
  clearDisappearTimeout();
139
-
142
+
140
143
  if (!navCollapsed.value) return;
141
144
 
142
145
  showPopup();
@@ -145,12 +148,12 @@ export default defineComponent({
145
148
  function hidePopup() {
146
149
  if (!popupEl.value || !popperInstance) return;
147
150
 
148
- popupEl.value.removeAttribute('data-show');
151
+ popupEl.value.removeAttribute("data-show");
149
152
  popperInstance.setOptions((options) => ({
150
153
  ...options,
151
154
  modifiers: [
152
155
  ...(options.modifiers || []),
153
- { name: 'eventListeners', enabled: false },
156
+ { name: "eventListeners", enabled: false },
154
157
  ],
155
158
  }));
156
159
  }
@@ -174,23 +177,23 @@ export default defineComponent({
174
177
  return;
175
178
  }
176
179
 
177
- emit('click:item', itemConfig.value.emit);
180
+ emit("click:item", itemConfig.value.emit);
178
181
  }
179
182
 
180
183
  function setupPopper() {
181
184
  nextTick(() => {
182
185
  if (!linkComp.value || !popupEl.value) return;
183
186
  popperInstance = createPopper(linkComp.value.$el, popupEl.value, {
184
- placement: 'right',
185
- strategy: 'fixed',
187
+ placement: "right",
188
+ strategy: "fixed",
186
189
  modifiers: [
187
190
  {
188
- name: 'offset',
191
+ name: "offset",
189
192
  options: {
190
193
  offset: [0, 12],
191
194
  },
192
195
  },
193
- { name: 'eventListeners', enabled: false },
196
+ { name: "eventListeners", enabled: false },
194
197
  ],
195
198
  });
196
199
  });
@@ -211,7 +214,7 @@ export default defineComponent({
211
214
  clearDisappearTimeout();
212
215
  destroyPopper();
213
216
  });
214
-
217
+
215
218
  return {
216
219
  linkComp,
217
220
  popupEl,
@@ -222,104 +225,123 @@ export default defineComponent({
222
225
  onClickedItem,
223
226
  };
224
227
  },
225
- })
228
+ });
226
229
  </script>
227
230
 
228
- <style lang="stylus">
229
- .sidebar.closure
230
- .sidebar-nav-link-item
231
- @apply s('lg:p-2') s('lg:text-lg')
232
-
233
- &-left
234
- @apply s('lg:inline-flex')
235
-
236
- .item-status
237
- @apply s('lg:inline-flex')
238
-
239
- &-right
240
- @apply s('lg:hidden')
241
-
242
- .sidebar.dark
243
- .sidebar-nav-link-item
244
- @apply bg-primary-800 text-white
245
- @apply s('hover:bg-primary') s('active:bg-primary-600')
246
-
247
- &.router-link-exact-active, &.router-link-active
248
- @apply bg-primary-600
249
- @apply s('hover:bg-primary-600') s('active:bg-primary-600')
250
-
251
- &.sidebar-nav-link-item--home.router-link-active
252
- @apply bg-primary-800 text-white
253
- @apply s('hover:bg-primary') s('active:bg-primary-600')
231
+ <style>
232
+ @reference '~ui/app/assets/css/main.css';
254
233
 
255
- &.sidebar-nav-link-item--home.router-link-exact-active.router-link-active
256
- @apply bg-primary-600
257
- @apply s('hover:bg-primary-600') s('active:bg-primary-600')
234
+ .sidebar.closure .sidebar-nav-link-item {
235
+ @apply lg:p-2 lg:text-lg;
236
+ }
258
237
 
259
- .sidebar-nav-link-item
260
- @apply flex items-center justify-start py-2 pr-3 pl-2 bg-white rounded-lg text-base text-primary
261
- @apply s('hover:bg-primary-200') s('hover:font-bold') s('active:bg-primary-600') s('active:text-white') s('active:font-bold')
262
-
263
- &.router-link-exact-active, &.router-link-active
264
- @apply bg-primary-600 text-white font-bold
265
- @apply s('hover:bg-primary-600') s('hover:text-white') s('active:font-bold')
238
+ .sidebar.closure .sidebar-nav-link-item-left {
239
+ @apply lg:inline-flex;
240
+ }
266
241
 
267
- &.sidebar-nav-link-item--home.router-link-active
268
- @apply bg-white text-primary font-normal
269
- @apply s('hover:bg-primary-200') s('hover:font-bold') s('active:bg-primary-600') s('active:text-white') s('active:font-bold')
242
+ .sidebar.closure .sidebar-nav-link-item-left .item-status {
243
+ @apply lg:inline-flex;
244
+ }
270
245
 
271
- &.sidebar-nav-link-item--home.router-link-exact-active.router-link-active
272
- @apply bg-primary-600 text-white font-bold
273
- @apply s('hover:bg-primary-600') s('hover:text-white') s('hover:font-bold')
274
-
275
- &-left
276
- @apply relative flex-grow-0 flex-shrink-0
277
-
278
- .item-pre-icon
279
- @apply inline-flex
246
+ .sidebar.closure .sidebar-nav-link-item-right {
247
+ @apply lg:hidden;
248
+ }
280
249
 
281
- .item-status
282
- @apply absolute s('-top-2.5') s('-left-2.5') text-base hidden
250
+ .sidebar.dark .sidebar-nav-link-item {
251
+ @apply bg-primary-800 text-white hover:bg-primary active:bg-primary-600;
252
+ }
283
253
 
284
- &.status--new
285
- &:before
286
- content ''
287
- @apply block absolute s('top-1/2') s('left-1/2') w-2 h-2 s('-translate-x-1/2') s('-translate-y-1/2') bg-white
254
+ .sidebar.dark .sidebar-nav-link-item.router-link-exact-active,
255
+ .sidebar.dark .sidebar-nav-link-item.router-link-active {
256
+ @apply bg-primary-600 hover:bg-primary-600 active:bg-primary-600;
257
+ }
288
258
 
289
- .icon
290
- @apply relative text-highlight-500
291
-
292
- &-right
293
- @apply flex-grow flex items-center flex-nowrap s('space-x-1.5')
294
-
295
- .item-title
296
- @apply flex-grow inline-flex items-center h-6 pl-1 whitespace-nowrap
297
-
298
- .item-post-icon
299
- @apply flex-grow-0 flex-shrink-0 relative inline-flex
300
-
301
- &.status--new
302
- &:before
303
- content ''
304
- @apply block absolute s('top-1/2') s('left-1/2') w-2 h-2 s('-translate-x-1/2') s('-translate-y-1/2') bg-white
305
-
306
- .icon
307
- @apply relative text-highlight-500
308
-
309
- .sidebar-nav-link-item + .sidebar-nav-link-item
310
- @apply mt-1
311
-
312
- .sidebar-nav-link-item-popup
313
- @apply rounded-lg overflow-hidden shadow-md hidden
314
-
315
- &[data-show]
316
- @apply block
317
-
318
- &-link
319
- @apply flex items-center p-2 space-x-4 bg-white text-sm text-primary whitespace-nowrap
320
- @apply s('hover:bg-primary-200') s('hover:font-bold') s('active:bg-primary-600') s('active:text-white') s('active:font-bold')
259
+ .sidebar.dark
260
+ .sidebar-nav-link-item.sidebar-nav-link-item--home.router-link-active {
261
+ @apply bg-primary-800 text-white hover:bg-primary active:bg-primary-600;
262
+ }
321
263
 
322
- &.router-link-exact-active
323
- @apply bg-primary-600 text-white font-bold
324
- @apply s('hover:bg-primary-600') s('hover:text-white') s('hover:font-bold')
325
- </style>
264
+ .sidebar.dark
265
+ .sidebar-nav-link-item.sidebar-nav-link-item--home.router-link-exact-active.router-link-active {
266
+ @apply bg-primary-600 hover:bg-primary-600 active:bg-primary-600;
267
+ }
268
+
269
+ .sidebar-nav-link-item {
270
+ @apply flex items-center justify-start py-2 pr-3 pl-2 bg-white rounded-lg text-base text-primary hover:bg-primary-200 hover:font-bold active:bg-primary-600 active:text-white active:font-bold;
271
+ }
272
+
273
+ .sidebar-nav-link-item.router-link-exact-active,
274
+ .sidebar-nav-link-item.router-link-active {
275
+ @apply bg-primary-600 text-white font-bold hover:bg-primary-600 hover:text-white active:font-bold;
276
+ }
277
+
278
+ .sidebar-nav-link-item.sidebar-nav-link-item--home.router-link-active {
279
+ @apply bg-white text-primary font-normal hover:bg-primary-200 hover:font-bold active:bg-primary-600 active:text-white active:font-bold;
280
+ }
281
+
282
+ .sidebar-nav-link-item.sidebar-nav-link-item--home.router-link-exact-active.router-link-active {
283
+ @apply bg-primary-600 text-white font-bold hover:bg-primary-600 hover:text-white hover:font-bold;
284
+ }
285
+
286
+ .sidebar-nav-link-item-left {
287
+ @apply relative grow-0 shrink-0;
288
+ }
289
+
290
+ .sidebar-nav-link-item-left .item-pre-icon {
291
+ @apply inline-flex;
292
+ }
293
+
294
+ .sidebar-nav-link-item-left .item-status {
295
+ @apply absolute -top-2.5 -left-2.5 text-base hidden;
296
+ }
297
+
298
+ .sidebar-nav-link-item-left .item-status.status--new::before {
299
+ content: "";
300
+ @apply block absolute top-1/2 left-1/2 w-2 h-2 -translate-x-1/2 -translate-y-1/2 bg-white;
301
+ }
302
+
303
+ .sidebar-nav-link-item-left .item-status.status--new .icon {
304
+ @apply relative text-highlight-500;
305
+ }
306
+
307
+ .sidebar-nav-link-item-right {
308
+ @apply grow flex items-center flex-nowrap space-x-1.5;
309
+ }
310
+
311
+ .sidebar-nav-link-item-right .item-title {
312
+ @apply grow inline-flex items-center h-6 pl-1 whitespace-nowrap;
313
+ }
314
+
315
+ .sidebar-nav-link-item-right .item-post-icon {
316
+ @apply grow-0 shrink-0 relative inline-flex;
317
+ }
318
+
319
+ .sidebar-nav-link-item-right .item-post-icon.status--new::before {
320
+ content: "";
321
+ @apply block absolute top-1/2 left-1/2 w-2 h-2 -translate-x-1/2 -translate-y-1/2 bg-white;
322
+ }
323
+
324
+ .sidebar-nav-link-item-right .item-post-icon.status--new .icon {
325
+ @apply relative text-highlight-500;
326
+ }
327
+
328
+ .sidebar-nav-link-item + .sidebar-nav-link-item {
329
+ @apply mt-1;
330
+ }
331
+
332
+ .sidebar-nav-link-item-popup {
333
+ @apply rounded-lg overflow-hidden shadow-md hidden;
334
+ }
335
+
336
+ .sidebar-nav-link-item-popup[data-show] {
337
+ @apply block;
338
+ }
339
+
340
+ .sidebar-nav-link-item-popup-link {
341
+ @apply flex items-center p-2 space-x-4 bg-white text-sm text-primary whitespace-nowrap hover:bg-primary-200 hover:font-bold active:bg-primary-600 active:text-white active:font-bold;
342
+ }
343
+
344
+ .sidebar-nav-link-item-popup-link.router-link-exact-active {
345
+ @apply bg-primary-600 text-white font-bold hover:bg-primary-600 hover:text-white hover:font-bold;
346
+ }
347
+ </style>
@@ -12,10 +12,10 @@
12
12
  </template>
13
13
 
14
14
  <script lang="ts">
15
- import type { NavItemSection } from '~/interface/NavConfigType';
15
+ import type { NavItemSection } from "~ui/app/interface/NavConfigType";
16
16
 
17
17
  export default defineComponent({
18
- name: 'SLSidebarNavSectionItem',
18
+ name: "SLSidebarNavSectionItem",
19
19
  props: {
20
20
  navCollapsed: {
21
21
  type: Boolean,
@@ -26,34 +26,37 @@ export default defineComponent({
26
26
  required: true,
27
27
  },
28
28
  },
29
- emits: ['click:item'],
29
+ emits: ["click:item"],
30
30
  setup(props, { emit }) {
31
31
  const { itemConfig } = toRefs(props);
32
32
 
33
33
  function onClickedItem(emitEvent?: string) {
34
- emit('click:item', emitEvent);
34
+ emit("click:item", emitEvent);
35
35
  }
36
36
 
37
37
  return {
38
38
  onClickedItem,
39
39
  };
40
40
  },
41
- })
41
+ });
42
42
  </script>
43
43
 
44
- <style lang="stylus">
45
- .sidebar.closure
46
- .sidebar-nav-section-item
47
- @apply s('lg:items-center')
44
+ <style>
45
+ @reference '~ui/app/assets/css/main.css';
48
46
 
49
- .sidebar.dark
50
- .sidebar-nav-section-item
51
- &-header
52
- @apply text-secondary-200
47
+ .sidebar.closure .sidebar-nav-section-item {
48
+ @apply lg:items-center;
49
+ }
53
50
 
54
- .sidebar-nav-section-item
55
- @apply flex flex-col space-y-1
51
+ .sidebar.dark .sidebar-nav-section-item-header {
52
+ @apply text-secondary-200;
53
+ }
54
+
55
+ .sidebar-nav-section-item {
56
+ @apply flex flex-col space-y-1;
57
+ }
56
58
 
57
- &-header
58
- @apply text-xs text-pgray-3
59
- </style>
59
+ .sidebar-nav-section-item-header {
60
+ @apply text-xs text-pgray-3;
61
+ }
62
+ </style>
@@ -52,13 +52,17 @@ export default defineComponent({
52
52
  headerMutationObserver = new MutationObserver(() => {
53
53
  const breadcrumbs = pageHeaderEl.value.querySelector("#breadcrumbs");
54
54
  const pageDataSources = pageHeaderEl.value.querySelector(
55
- "#site-page-datasources"
55
+ "#site-page-datasources",
56
56
  );
57
57
  const headerLeftBottom = pageHeaderEl.value.querySelector(
58
- "#site-page-header-left-bottom"
59
- )
58
+ "#site-page-header-left-bottom",
59
+ );
60
60
 
61
- if (breadcrumbs?.children.length || pageDataSources?.children.length || headerLeftBottom?.children.length) {
61
+ if (
62
+ breadcrumbs?.children.length ||
63
+ pageDataSources?.children.length ||
64
+ headerLeftBottom?.children.length
65
+ ) {
62
66
  isHeaderEmpty.value = false;
63
67
  } else {
64
68
  isHeaderEmpty.value = true;
@@ -106,31 +110,38 @@ export default defineComponent({
106
110
  });
107
111
  </script>
108
112
 
109
- <style lang="stylus">
110
- .site-page
111
- @apply flex flex-col w-full min-h-full s('pt-1.5')
112
- @apply s('lg:pt-2')
113
+ <style>
114
+ @reference '~ui/app/assets/css/main.css';
113
115
 
114
- &-header
115
- @apply flex justify-between mb-4
116
+ .site-page {
117
+ @apply flex flex-col w-full min-h-full pt-1.5 lg:pt-2;
118
+ }
116
119
 
117
- &.empty
118
- @apply mb-0
120
+ .site-page-header {
121
+ @apply flex justify-between mb-4;
122
+ }
119
123
 
120
- .site-page-header-left
121
- #site-page-header-left-bottom
122
- @apply mt-0
124
+ .site-page-header.empty {
125
+ @apply mb-0;
126
+ }
127
+
128
+ .site-page-header.empty .site-page-header-left #site-page-header-left-bottom {
129
+ @apply mt-0;
130
+ }
123
131
 
124
- &-left
125
- &-top
126
- @apply flex items-center justify-start
132
+ .site-page-header-left-top {
133
+ @apply flex items-center justify-start;
134
+ }
127
135
 
128
- #site-page-header-left-bottom
129
- @apply flex mt-2
136
+ .site-page-header-left #site-page-header-left-bottom {
137
+ @apply flex mt-2;
138
+ }
130
139
 
131
- &-notice
132
- @apply mb-4 pl-2 pr-20 py-3 s('bg-[#FBFCFF]') rounded-lg text-sm text-pgray-2
140
+ .site-page-notice {
141
+ @apply mb-4 pl-2 pr-20 py-3 bg-[#FBFCFF] rounded-lg text-sm text-pgray-2;
142
+ }
133
143
 
134
- &-content
135
- @apply flex flex-col flex-grow w-full px-4 pt-4 pb-8 rounded-lg bg-white
144
+ .site-page-content {
145
+ @apply flex flex-col grow w-full px-4 pt-4 pb-8 rounded-lg bg-white;
146
+ }
136
147
  </style>
@@ -8,20 +8,25 @@
8
8
 
9
9
  <script>
10
10
  export default {
11
- name: 'SkyInsightSitePage',
11
+ name: "SkyInsightSitePage",
12
12
  props: {},
13
13
  computed: {},
14
14
  methods: {},
15
15
  };
16
16
  </script>
17
17
 
18
- <style lang="stylus">
19
- .sky-insight-site-page
20
- @apply flex-grow flex flex-col
18
+ <style>
19
+ @reference '~ui/app/assets/css/main.css';
20
+
21
+ .sky-insight-site-page {
22
+ @apply grow flex flex-col;
23
+ }
21
24
 
22
- &-header
23
- @apply s('-mx-4')
25
+ .sky-insight-site-page-header {
26
+ @apply -mx-4;
27
+ }
24
28
 
25
- &-content
26
- @apply flex flex-col flex-grow w-full p-4 rounded bg-primary-50
29
+ .sky-insight-site-page-content {
30
+ @apply flex flex-col grow w-full p-4 rounded bg-primary-50;
31
+ }
27
32
  </style>
@@ -21,7 +21,7 @@ import type { PropType } from "vue";
21
21
  import { createPopper } from "@popperjs/core";
22
22
  import type { Instance as PopperInstance } from "@popperjs/core";
23
23
  import { fromEvent, Subscription } from "rxjs";
24
- import type IInputOption from "~ui/interface/IInputOption";
24
+ import type IInputOption from "~ui/app/interface/IInputOption";
25
25
 
26
26
  export default defineComponent({
27
27
  name: "SLSortByDropdown",
@@ -49,7 +49,7 @@ export default defineComponent({
49
49
  let clickSubscriber: Subscription | null = null;
50
50
 
51
51
  const selectedOption = computed(() =>
52
- (options.value || []).find((o) => o.value === modelValue.value)
52
+ (options.value || []).find((o) => o.value === modelValue.value),
53
53
  );
54
54
 
55
55
  function onToggle() {
@@ -161,29 +161,42 @@ export default defineComponent({
161
161
  });
162
162
  </script>
163
163
 
164
- <style lang="stylus" scoped>
165
- .sort-by-dropdown
166
- @apply inline-flex
164
+ <style scoped>
165
+ @reference '~ui/app/assets/css/main.css';
167
166
 
168
- &.single
169
- .sort-by-dropdown-toggle
170
- @apply bg-white cursor-default
171
- .icon
172
- @apply hidden
167
+ .sort-by-dropdown {
168
+ @apply inline-flex;
169
+ }
173
170
 
174
- &-toggle
175
- @apply inline-flex items-center px-1 s('py-0.5') space-x-2 bg-primary-50 rounded text-sm text-primary
176
- .icon
177
- @apply text-xs
171
+ .sort-by-dropdown.single .sort-by-dropdown-toggle {
172
+ @apply bg-white cursor-default;
173
+ }
178
174
 
179
- &-menu
180
- @apply s('z-[2]') flex-col s('min-w-[84px]') bg-white border border-primary-600 rounded overflow-hidden hidden
175
+ .sort-by-dropdown.single .sort-by-dropdown-toggle .icon {
176
+ @apply hidden;
177
+ }
181
178
 
182
- &[data-show]
183
- @apply inline-flex
179
+ .sort-by-dropdown-toggle {
180
+ @apply inline-flex items-center px-1 py-0.5 space-x-2 bg-primary-50 rounded text-sm text-primary;
181
+ }
184
182
 
185
- .sort-by-dropdown-item
186
- @apply inline-flex p-2 bg-white text-sm text-pgray-3
187
- &.active
188
- @apply bg-primary-100 text-primary
183
+ .sort-by-dropdown-toggle .icon {
184
+ @apply text-xs;
185
+ }
186
+
187
+ .sort-by-dropdown-menu {
188
+ @apply z-2 flex-col min-w-21 bg-white border border-primary-600 rounded overflow-hidden hidden;
189
+ }
190
+
191
+ .sort-by-dropdown-menu[data-show] {
192
+ @apply inline-flex;
193
+ }
194
+
195
+ .sort-by-dropdown-menu .sort-by-dropdown-item {
196
+ @apply inline-flex p-2 bg-white text-sm text-pgray-3;
197
+ }
198
+
199
+ .sort-by-dropdown-menu .sort-by-dropdown-item.active {
200
+ @apply bg-primary-100 text-primary;
201
+ }
189
202
  </style>
@@ -18,7 +18,10 @@ export default defineComponent({
18
18
  });
19
19
  </script>
20
20
 
21
- <style lang="stylus">
22
- i.spin-icon
23
- @apply animate-spin
21
+ <style>
22
+ @reference '~ui/app/assets/css/main.css';
23
+
24
+ i.spin-icon {
25
+ @apply animate-spin;
26
+ }
24
27
  </style>