@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
@@ -113,10 +113,10 @@ export default defineComponent({
113
113
  },
114
114
  query: {
115
115
  type: String,
116
- default: '',
117
- }
116
+ default: "",
117
+ },
118
118
  },
119
- emits: ["update:modelValue", "update:selecting", 'update:query'],
119
+ emits: ["update:modelValue", "update:selecting", "update:query"],
120
120
  setup(props, { emit }) {
121
121
  const { size, modelValue, options, placement, query } = toRefs(props);
122
122
 
@@ -131,9 +131,11 @@ export default defineComponent({
131
131
  let clickSubscriber: any = null;
132
132
 
133
133
  const queryProxy = computed({
134
- get() { return query.value || selfQuery.value },
134
+ get() {
135
+ return query.value || selfQuery.value;
136
+ },
135
137
  set(newValue: string) {
136
- emit('update:query', newValue);
138
+ emit("update:query", newValue);
137
139
  selfQuery.value = newValue;
138
140
  },
139
141
  });
@@ -185,7 +187,7 @@ export default defineComponent({
185
187
  const secondOptions = computed(() => {
186
188
  const found = filteredOptions.value.find(
187
189
  (option) =>
188
- selectedFirstOption.value && option.key === selectedFirstOption.value
190
+ selectedFirstOption.value && option.key === selectedFirstOption.value,
189
191
  );
190
192
  return found?.subOptions || [];
191
193
  });
@@ -341,105 +343,198 @@ export default defineComponent({
341
343
  });
342
344
  </script>
343
345
 
344
- <style lang="stylus">
345
- .two-layer-multi-select
346
- @apply relative w-full
347
-
348
- &.two-layer-multi-select-sm
349
- .toggle-button
350
- @apply text-sm
351
-
352
- &.bordered
353
- .select-menu-popup
354
- @apply border-primary-600
355
-
356
- .toggle-button
357
- @apply relative flex items-center w-full s('p-1.75') s('space-x-1.75') border border-primary-600 rounded text-base text-pgray-4
358
-
359
- &.selected
360
- @apply text-pgray-2
361
-
362
- .button-title
363
- @apply flex-grow
346
+ <style>
347
+ @reference '~ui/app/assets/css/main.css';
364
348
 
365
- .icon
366
- @apply flex-grow-0 flex-shrink-0 inline-flex text-xs text-pgray-2 leading-none
349
+ .two-layer-multi-select {
350
+ @apply relative w-full;
351
+ }
367
352
 
368
- .select-menu-popup
369
- @apply z-10 flex flex-col s("h-67.75") s('min-w-[552px]') w-full s("pt-2.75") s("px-2.75") bg-white border border-primary-100 rounded shadow invisible pointer-events-none
353
+ .two-layer-multi-select.two-layer-multi-select-sm .toggle-button {
354
+ @apply text-sm;
355
+ }
370
356
 
371
- &[data-show]
372
- @apply visible pointer-events-auto
357
+ .two-layer-multi-select.bordered .select-menu-popup {
358
+ @apply border-primary-600;
359
+ }
373
360
 
374
- .select-header
375
- @apply flex-grow-0 flex-shrink-0 mb-3
361
+ .two-layer-multi-select .toggle-button {
362
+ @apply relative flex items-center w-full p-1.75 space-x-1.75 border border-primary-600 rounded text-base text-pgray-4;
363
+ }
376
364
 
377
- .search-input
378
- .button-group
379
- @apply s('py-0.75')
365
+ .two-layer-multi-select .toggle-button.selected {
366
+ @apply text-pgray-2;
367
+ }
380
368
 
381
- .text-input
382
- .input-group
383
- .input
384
- @apply s('py-1.25')
369
+ .two-layer-multi-select .toggle-button .button-title {
370
+ @apply grow;
371
+ }
385
372
 
386
- input
387
- @apply text-sm
373
+ .two-layer-multi-select .toggle-button .icon {
374
+ @apply grow-0 shrink-0 inline-flex text-xs text-pgray-2 leading-none;
375
+ }
388
376
 
389
- .select-body
390
- @apply flex-grow flex overflow-hidden
377
+ .two-layer-multi-select .select-menu-popup {
378
+ @apply z-10 flex flex-col h-67.75 min-w-[552px] w-full pt-2.75 px-2.75 bg-white border border-primary-100 rounded shadow-default invisible pointer-events-none;
379
+ }
391
380
 
392
- .menu
393
- @apply flex-grow flex flex-col text-base leading-normal overflow-hidden
394
- flex 1
381
+ .two-layer-multi-select .select-menu-popup[data-show] {
382
+ @apply visible pointer-events-auto;
383
+ }
395
384
 
396
- &:hover
397
- flex 1.5
385
+ .two-layer-multi-select .select-menu-popup .select-header {
386
+ @apply grow-0 shrink-0 mb-3;
387
+ }
398
388
 
399
- &-2
400
- .menu-body
401
- .list
402
- .item
403
- .checkbox
404
- @apply flex-grow
405
-
406
- &-header
407
- @apply flex-grow-0 flex-shrink-0 w-full pb-2 text-primary border-b border-primary
389
+ .two-layer-multi-select
390
+ .select-menu-popup
391
+ .select-header
392
+ .search-input
393
+ .button-group {
394
+ @apply py-0.75;
395
+ }
408
396
 
409
- &-body
410
- @apply relative flex-grow
397
+ .two-layer-multi-select
398
+ .select-menu-popup
399
+ .select-header
400
+ .text-input
401
+ .input-group
402
+ .input {
403
+ @apply py-1.25;
404
+ }
411
405
 
412
- .list
413
- .item
414
- @apply relative flex items-center justify-start flex-nowrap s('py-1.5') px-2 s('space-x-2.5') text-sm text-pgray-3
415
- @apply s('hover:bg-primary-100')
406
+ .two-layer-multi-select
407
+ .select-menu-popup
408
+ .select-header
409
+ .text-input
410
+ .input-group
411
+ .input
412
+ input {
413
+ @apply text-sm;
414
+ }
415
+
416
+ .two-layer-multi-select .select-menu-popup .select-body {
417
+ @apply grow flex overflow-hidden;
418
+ }
419
+
420
+ .two-layer-multi-select .select-menu-popup .select-body .menu {
421
+ @apply grow flex flex-col text-base leading-[1.3125] overflow-hidden;
422
+ flex: 1;
423
+ }
424
+
425
+ .two-layer-multi-select .select-menu-popup .select-body .menu:hover {
426
+ flex: 1.5;
427
+ }
416
428
 
417
- &.checked
418
- @apply text-primary
429
+ .two-layer-multi-select
430
+ .select-menu-popup
431
+ .select-body
432
+ .menu-2
433
+ .menu-body
434
+ .list
435
+ .item
436
+ .checkbox {
437
+ @apply grow;
438
+ }
439
+
440
+ .two-layer-multi-select .select-menu-popup .select-body .menu-header {
441
+ @apply grow-0 shrink-0 w-full pb-2 text-primary border-b border-primary;
442
+ }
443
+
444
+ .two-layer-multi-select .select-menu-popup .select-body .menu-body {
445
+ @apply relative grow;
446
+ }
447
+
448
+ .two-layer-multi-select .select-menu-popup .select-body .menu-body .list .item {
449
+ @apply relative flex items-center justify-start flex-nowrap py-1.5 px-2 space-x-2.5 text-sm text-pgray-3 hover:bg-primary-100;
450
+ }
419
451
 
420
- .checkbox
421
- input:checked + label
422
- span
423
- @apply text-primary
452
+ .two-layer-multi-select
453
+ .select-menu-popup
454
+ .select-body
455
+ .menu-body
456
+ .list
457
+ .item.checked {
458
+ @apply text-primary;
459
+ }
424
460
 
425
- &.selected
426
- @apply bg-primary-100
461
+ .two-layer-multi-select
462
+ .select-menu-popup
463
+ .select-body
464
+ .menu-body
465
+ .list
466
+ .item.checked
467
+ .checkbox
468
+ input:checked
469
+ + label
470
+ span {
471
+ @apply text-primary;
472
+ }
427
473
 
428
- .checkbox
429
- @apply flex-grow-0 flex-shrink-0 inline-flex
474
+ .two-layer-multi-select
475
+ .select-menu-popup
476
+ .select-body
477
+ .menu-body
478
+ .list
479
+ .item.selected {
480
+ @apply bg-primary-100;
481
+ }
430
482
 
431
- label
432
- @apply flex-grow flex-nowrap flex items-center
483
+ .two-layer-multi-select
484
+ .select-menu-popup
485
+ .select-body
486
+ .menu-body
487
+ .list
488
+ .item
489
+ .checkbox {
490
+ @apply grow-0 shrink-0 inline-flex;
491
+ }
433
492
 
434
- .icon
435
- @apply flex-grow-0 flex-shrink-0
493
+ .two-layer-multi-select
494
+ .select-menu-popup
495
+ .select-body
496
+ .menu-body
497
+ .list
498
+ .item
499
+ .checkbox
500
+ label {
501
+ @apply grow flex-nowrap flex items-center;
502
+ }
436
503
 
437
- span
438
- @apply flex-grow block truncate
504
+ .two-layer-multi-select
505
+ .select-menu-popup
506
+ .select-body
507
+ .menu-body
508
+ .list
509
+ .item
510
+ .checkbox
511
+ label
512
+ .icon {
513
+ @apply grow-0 shrink-0;
514
+ }
439
515
 
440
- &-name
441
- @apply flex-grow block truncate
516
+ .two-layer-multi-select
517
+ .select-menu-popup
518
+ .select-body
519
+ .menu-body
520
+ .list
521
+ .item
522
+ .checkbox
523
+ label
524
+ span {
525
+ @apply grow block truncate;
526
+ }
442
527
 
443
- &-divider
444
- @apply flex-grow-0 flex-shrink-0 w-px h-auto mb-3 s("mr-2.75") ml-3 bg-pgray-4
528
+ .two-layer-multi-select
529
+ .select-menu-popup
530
+ .select-body
531
+ .menu-body
532
+ .list
533
+ .item-name {
534
+ @apply grow block truncate;
535
+ }
536
+
537
+ .two-layer-multi-select .select-menu-popup .select-body-divider {
538
+ @apply grow-0 shrink-0 w-px h-auto mb-3 mr-2.75 ml-3 bg-pgray-4;
539
+ }
445
540
  </style>
@@ -138,10 +138,10 @@ export default defineComponent({
138
138
 
139
139
  const { firstLayer, secondLayer } = modelValue.value;
140
140
  const firstLayerIndex = firstLayers.value.findIndex(
141
- (l) => l.key === firstLayer
141
+ (l) => l.key === firstLayer,
142
142
  );
143
143
  const secondLayerKey = secondLayers.value.findIndex(
144
- (l) => l.key === secondLayer
144
+ (l) => l.key === secondLayer,
145
145
  );
146
146
  const firstLayerItems = leftMenuEl.value?.querySelectorAll(".item");
147
147
  const secondLayerItems = rightMenuEl.value?.querySelectorAll(".item");
@@ -214,52 +214,62 @@ export default defineComponent({
214
214
  });
215
215
  </script>
216
216
 
217
- <style lang="stylus">
218
- .tw-layer-select
219
- @apply flex flex-col s("h-67.75") s("pt-2.75") s("px-2.75") bg-white border border-primary-100 rounded shadow
220
- width 552px
217
+ <style>
218
+ @reference '~ui/app/assets/css/main.css';
221
219
 
222
- .select-header
223
- @apply flex-grow-0 flex-shrink-0 mb-3
220
+ .tw-layer-select {
221
+ @apply flex flex-col w-138 h-67.75 pt-2.75 px-2.75 bg-white border border-primary-100 rounded shadow-default;
222
+ }
224
223
 
225
- .search-input
226
- .button-group
227
- @apply s('py-0.75')
224
+ .tw-layer-select .select-header {
225
+ @apply grow-0 shrink-0 mb-3;
226
+ }
228
227
 
229
- .text-input
230
- .input-group
231
- .input
232
- @apply s('py-1.25')
228
+ .tw-layer-select .select-header .search-input .button-group {
229
+ @apply py-0.75;
230
+ }
233
231
 
234
- input
235
- @apply text-sm
232
+ .tw-layer-select .select-header .text-input .input-group .input {
233
+ @apply py-1.25;
234
+ }
236
235
 
237
- .select-body
238
- @apply flex-grow flex overflow-hidden
236
+ .tw-layer-select .select-header .text-input .input-group .input input {
237
+ @apply text-sm;
238
+ }
239
239
 
240
- .menu
241
- @apply flex-grow flex flex-col text-base leading-normal overflow-hidden
242
- flex 1
240
+ .tw-layer-select .select-body {
241
+ @apply grow flex overflow-hidden;
242
+ }
243
243
 
244
- &:hover
245
- flex 1.5
244
+ .tw-layer-select .select-body .menu {
245
+ @apply grow flex flex-col text-base leading-[1.3125] overflow-hidden;
246
+ }
246
247
 
247
- &-header
248
- @apply flex-grow-0 flex-shrink-0 w-full pb-2 text-primary border-b border-primary
248
+ .tw-layer-select .select-body .menu:hover {
249
+ @apply grow-[1.5];
250
+ }
249
251
 
250
- &-body
251
- @apply relative flex-grow
252
+ .tw-layer-select .select-body .menu-header {
253
+ @apply grow-0 shrink-0 w-full pb-2 text-primary border-b border-primary;
254
+ }
252
255
 
253
- .list
254
- .item
255
- @apply relative block s('py-1.5') px-2 s("hover:bg-primary-50") text-sm text-pgray-3 truncate
256
+ .tw-layer-select .select-body .menu-body {
257
+ @apply relative grow;
258
+ }
259
+
260
+ .tw-layer-select .select-body .menu-body .list .item {
261
+ @apply relative block py-1.5 px-2 hover:bg-primary-50 text-sm text-pgray-3 truncate;
262
+ }
256
263
 
257
- &.selected
258
- @apply bg-primary-100 text-primary
264
+ .tw-layer-select .select-body .menu-body .list .item.selected {
265
+ @apply bg-primary-100 text-primary;
266
+ }
259
267
 
260
- .highlight-dot
261
- @apply absolute top-0 left-0 s('w-1.5') s('h-1.5') mt-2 ml-1 bg-red rounded-full
268
+ .tw-layer-select .select-body .menu-body .list .item .highlight-dot {
269
+ @apply absolute top-0 left-0 w-1.5 h-1.5 mt-2 ml-1 bg-red rounded-full;
270
+ }
262
271
 
263
- &-divider
264
- @apply flex-grow-0 flex-shrink-0 w-px h-auto mb-3 s("mr-2.75") ml-3 bg-pgray-4
272
+ .tw-layer-select .select-body-divider {
273
+ @apply grow-0 shrink-0 w-px h-auto mb-3 mr-2.75 ml-3 bg-pgray-4;
274
+ }
265
275
  </style>
@@ -30,7 +30,7 @@ import type { PropType } from "vue";
30
30
  import { fromEvent } from "rxjs";
31
31
  import { createPopper } from "@popperjs/core";
32
32
  import type { Placement } from "@popperjs/core";
33
- import { SLTwoLayerSelect } from '#components';
33
+ import { SLTwoLayerSelect } from "#components";
34
34
 
35
35
  type SLTwoLayerSelectType = InstanceType<typeof SLTwoLayerSelect>;
36
36
 
@@ -82,10 +82,10 @@ export default defineComponent({
82
82
  },
83
83
  query: {
84
84
  type: String,
85
- default: '',
86
- }
85
+ default: "",
86
+ },
87
87
  },
88
- emits: ["update:modelValue", "update:selecting", 'update:query'],
88
+ emits: ["update:modelValue", "update:selecting", "update:query"],
89
89
  setup(props, { emit }) {
90
90
  const { size, options, placement, query } = toRefs(props);
91
91
 
@@ -100,9 +100,11 @@ export default defineComponent({
100
100
  let clickSubscriber: any = null;
101
101
 
102
102
  const queryProxy = computed({
103
- get() { return selfQuery.value },
103
+ get() {
104
+ return selfQuery.value;
105
+ },
104
106
  set(newValue: string) {
105
- emit('update:query', newValue);
107
+ emit("update:query", newValue);
106
108
  selfQuery.value = newValue;
107
109
  },
108
110
  });
@@ -130,12 +132,12 @@ export default defineComponent({
130
132
  .filter((option) => option.subOptions.length > 0);
131
133
  });
132
134
  const firstOptions = computed(() => {
133
- return filteredOptions.value
135
+ return filteredOptions.value;
134
136
  });
135
137
  const secondOptions = computed(() => {
136
138
  const found = filteredOptions.value.find(
137
139
  (option) =>
138
- selectedFirstOption.value && option.key === selectedFirstOption.value
140
+ selectedFirstOption.value && option.key === selectedFirstOption.value,
139
141
  );
140
142
  return found?.subOptions || [];
141
143
  });
@@ -148,10 +150,12 @@ export default defineComponent({
148
150
  selectedFirstOption.value = key;
149
151
  }
150
152
 
151
- function onInputedSecondOption(newValue: {
152
- firstLayer: string;
153
- secondLayer: string;
154
- } | null) {
153
+ function onInputedSecondOption(
154
+ newValue: {
155
+ firstLayer: string;
156
+ secondLayer: string;
157
+ } | null,
158
+ ) {
155
159
  emit("update:modelValue", newValue);
156
160
  }
157
161
 
@@ -208,7 +212,10 @@ export default defineComponent({
208
212
  body.classList.remove("popup");
209
213
  }
210
214
 
211
- if (!popupComp.value?.$el || popupComp.value?.$el.getAttribute("data-show") === null)
215
+ if (
216
+ !popupComp.value?.$el ||
217
+ popupComp.value?.$el.getAttribute("data-show") === null
218
+ )
212
219
  return;
213
220
 
214
221
  isSelecting.value = false;
@@ -226,7 +233,10 @@ export default defineComponent({
226
233
  }
227
234
 
228
235
  function onClickedToggle() {
229
- if (!popupComp.value?.$el || popupComp.value?.$el.getAttribute("data-show") !== null) {
236
+ if (
237
+ !popupComp.value?.$el ||
238
+ popupComp.value?.$el.getAttribute("data-show") !== null
239
+ ) {
230
240
  hide();
231
241
  return;
232
242
  }
@@ -235,7 +245,7 @@ export default defineComponent({
235
245
  }
236
246
 
237
247
  function onSearch(search: string) {
238
- console.log("search", search === '');
248
+ console.log("search", search === "");
239
249
  queryProxy.value = search;
240
250
  }
241
251
 
@@ -286,29 +296,38 @@ export default defineComponent({
286
296
  });
287
297
  </script>
288
298
 
289
- <style lang="stylus">
290
- .two-layer-single-select
291
- @apply relative w-full
299
+ <style>
300
+ @reference '~ui/app/assets/css/main.css';
301
+
302
+ .two-layer-single-select {
303
+ @apply relative w-full;
304
+ }
292
305
 
293
- &.two-layer-single-select-sm
294
- .toggle-button
295
- @apply text-sm
306
+ .two-layer-single-select.two-layer-single-select-sm .toggle-button {
307
+ @apply text-sm;
308
+ }
296
309
 
297
- .toggle-button
298
- @apply relative flex items-center w-full s('p-1.75') s('space-x-1.75') border border-primary-600 rounded text-base text-pgray-4
310
+ .two-layer-single-select .toggle-button {
311
+ @apply relative flex items-center w-full p-1.75 space-x-1.75 border border-primary-600 rounded text-base text-pgray-4;
312
+ }
299
313
 
300
- &.selected
301
- @apply text-pgray-2
314
+ .two-layer-single-select .toggle-button.selected {
315
+ @apply text-pgray-2;
316
+ }
302
317
 
303
- .button-title
304
- @apply flex-grow
318
+ .two-layer-single-select .toggle-button .button-title {
319
+ @apply grow;
320
+ }
305
321
 
306
- .icon
307
- @apply flex-grow-0 flex-shrink-0 inline-flex text-xs text-pgray-2 leading-none
322
+ .two-layer-single-select .toggle-button .icon {
323
+ @apply grow-0 shrink-0 inline-flex text-xs text-pgray-2 leading-none;
324
+ }
308
325
 
309
- .tw-layer-select
310
- @apply z-10 invisible pointer-events-none
326
+ .two-layer-single-select .tw-layer-select {
327
+ @apply z-10 invisible pointer-events-none;
328
+ }
311
329
 
312
- &[data-show]
313
- @apply visible pointer-events-auto
330
+ .two-layer-single-select .tw-layer-select[data-show] {
331
+ @apply visible pointer-events-auto;
332
+ }
314
333
  </style>
@@ -64,12 +64,14 @@ export default defineComponent({
64
64
  });
65
65
  </script>
66
66
 
67
- <style lang="stylus">
68
- .warn-modal
69
- .modal-body
70
- &-content
71
- @apply flex flex-col items-center space-y-6 text-base text-pgray-2
67
+ <style>
68
+ @reference '~ui/app/assets/css/main.css';
72
69
 
73
- .icon
74
- @apply text-16xl
70
+ .warn-modal .modal-body-content {
71
+ @apply flex flex-col items-center space-y-6 text-base text-pgray-2;
72
+ }
73
+
74
+ .warn-modal .modal-body-content .icon {
75
+ @apply text-16xl;
76
+ }
75
77
  </style>
@@ -0,0 +1,7 @@
1
+ export enum ScreenSize {
2
+ md = "md",
3
+ lg = "lg",
4
+ xl = "xl",
5
+ "1.5xl" = "1.5xl",
6
+ "2xl" = "2xl",
7
+ }