@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
@@ -122,9 +122,9 @@ import {
122
122
  isPreviousDateRange,
123
123
  previousDateRange,
124
124
  isValidDate,
125
- } from "~ui/utils";
126
- import type IDateRange from "~ui/interface/IDateRange";
127
- import { OnlineSourceType } from "~ui/interface/IWeb";
125
+ } from "~ui/app/utils";
126
+ import type IDateRange from "~ui/app/interface/IDateRange";
127
+ import { OnlineSourceType } from "~ui/app/interface/IWeb";
128
128
 
129
129
  const DateStringRegexp = /[0-9]{4}\/[0-9]{2}\/[0-9]{2}/;
130
130
 
@@ -774,76 +774,102 @@ export default defineComponent({
774
774
  });
775
775
  </script>
776
776
 
777
- <style lang="stylus">
778
- .calendar-popup
779
- @apply w-auto py-4 border border-primary-100 rounded-lg bg-white shadow-md overflow-hidden
777
+ <style>
778
+ @reference '~ui/app/assets/css/main.css';
780
779
 
781
- .popup-body
782
- @apply flex s('mb-2.5') divide-x divide-pgray-4
780
+ .calendar-popup {
781
+ @apply w-auto py-4 border border-primary-100 rounded-lg bg-white shadow-md overflow-hidden;
783
782
 
784
- .popup-footer
785
- @apply s('mx-3.75') border-t border-pgray-4 text-center
783
+ .popup-body {
784
+ @apply flex mb-2.5 divide-x divide-pgray-4;
785
+ }
786
786
 
787
- .compare
788
- @apply pt-4 text-base leading-normal text-pgray-2
787
+ .popup-footer {
788
+ @apply mx-3.75 border-t border-pgray-4 text-center;
789
789
 
790
- .range1
791
- @apply text-primary font-bold
790
+ .compare {
791
+ @apply pt-4 text-base leading-[1.3125] text-pgray-2;
792
792
 
793
- .range2
794
- @apply text-pgray-2 font-bold
793
+ .range1 {
794
+ @apply text-primary font-bold;
795
+ }
795
796
 
796
- .actions
797
- @apply pt-4 space-x-8
797
+ .range2 {
798
+ @apply text-pgray-2 font-bold;
799
+ }
800
+ }
798
801
 
799
- .quicks
800
- @apply relative
802
+ .actions {
803
+ @apply pt-4 space-x-8;
804
+ }
805
+ }
801
806
 
802
- .quick-button
803
- @apply relative block s('w-[7.4375rem]') s('pl-6.5') s('py-2') space-y-1 bg-white text-pgray-3 s('hover:bg-primary-100') s('hover:text-pgray-2')
807
+ .quicks {
808
+ @apply relative;
804
809
 
805
- &.selected
806
- @apply bg-primary-100 text-primary s('hover:text-primary')
810
+ .quick-button {
811
+ @apply relative block w-[7.4375rem] pl-6.5 py-2 space-y-1 bg-white text-pgray-3 hover:bg-primary-100 hover:text-pgray-2;
807
812
 
808
- &:before
809
- content ''
810
- @apply block absolute s('top-1/2') s('left-0') s('w-1.5') s('h-1.5') s('ml-3') rounded-full bg-primary transform s('-translate-y-1/2')
813
+ &.selected {
814
+ @apply bg-primary-100 text-primary hover:text-primary;
811
815
 
812
- &-title
813
- @apply text-base
816
+ &:before {
817
+ content: "";
818
+ @apply block absolute top-1/2 left-0 w-1.5 h-1.5 ml-3 rounded-full bg-primary transform -translate-y-1/2;
819
+ }
820
+ }
814
821
 
815
- &-notice
816
- @apply text-xs
822
+ .quick-button-title {
823
+ @apply text-base;
824
+ }
817
825
 
818
- .quicks-divide
819
- @apply h-px ml-1 my-1 bg-pgray-4
820
- width calc(100% - theme('spacing.1'))
826
+ .quick-button-notice {
827
+ @apply text-xs;
828
+ }
829
+ }
821
830
 
822
- .compare-switch
823
- @apply absolute bottom-0 left-0 s('ml-4.75')
831
+ .quicks-divide {
832
+ @apply h-px ml-1 my-1 bg-pgray-4;
833
+ width: calc(100% - theme("spacing.1"));
834
+ }
824
835
 
825
- .calendar
826
- @apply s('pl-[1.4375rem]') s('pr-6')
836
+ .compare-switch {
837
+ @apply absolute bottom-0 left-0 ml-4.75;
838
+ }
839
+ }
827
840
 
828
- .vc-header
829
- @apply pt-2
841
+ .calendar {
842
+ @apply pl-[1.4375rem] pr-6;
830
843
 
831
- &-compare
832
- .calendar-header
833
- @apply text-pgray-2
844
+ .vc-header {
845
+ @apply pt-2;
846
+ }
847
+ }
834
848
 
835
- &-header
836
- @apply s('pt-1.5') s('pb-1.75') s('space-y-0.5') border-b border-primary text-sm s('leading-4.75') text-primary
849
+ .calendar-compare {
850
+ .calendar-header {
851
+ @apply text-pgray-2;
852
+ }
853
+ }
837
854
 
838
- .date-range
839
- @apply flex justify-start items-center space-x-1 text-sm
855
+ .calendar-header {
856
+ @apply pt-1.5 pb-1.75 space-y-0.5 border-b border-primary text-sm leading-4.75 text-primary;
840
857
 
841
- .text-input
842
- @apply flex-grow-0 flex-shrink-0 s('w-[6.5rem]')
858
+ .date-range {
859
+ @apply flex justify-start items-center space-x-1 text-sm;
843
860
 
844
- &-body
845
- @apply space-y-2
861
+ .text-input {
862
+ @apply grow-0 shrink-0 w-[6.5rem];
863
+ }
864
+ }
865
+ }
846
866
 
847
- .data-date
848
- @apply text-xs text-pgray-2 text-right
867
+ .calendar-body {
868
+ @apply space-y-2;
869
+
870
+ .data-date {
871
+ @apply text-xs text-pgray-2 text-right;
872
+ }
873
+ }
874
+ }
849
875
  </style>
@@ -62,62 +62,78 @@ export default defineComponent({
62
62
  });
63
63
  </script>
64
64
 
65
- <style lang="stylus">
66
- .tabs
67
- .tabs
68
- .card
69
- @apply border-0 rounded-none shadow-none
65
+ <style>
66
+ @reference '~ui/app/assets/css/main.css';
70
67
 
71
- .card
72
- @apply rounded-lg border-primary-300 shadow-md
68
+ .tabs .tabs .card {
69
+ @apply border-0 rounded-none shadow-none;
70
+ }
73
71
 
74
- .card
75
- @apply border-0 rounded-none shadow-none
72
+ .tabs .card {
73
+ @apply rounded-lg border-primary-300 shadow-md;
74
+ }
76
75
 
77
- .card
78
- @apply p-4 border border-primary-600 rounded bg-white shadow
76
+ .tabs .card .card {
77
+ @apply border-0 rounded-none shadow-none;
78
+ }
79
79
 
80
- .card-prepend
81
- @apply mb-4
80
+ .card {
81
+ @apply p-4 border border-primary-600 rounded bg-white shadow-default;
82
+ }
82
83
 
83
- .card-header
84
- @apply flex justify-between mb-4
84
+ .card .card-prepend {
85
+ @apply mb-4;
86
+ }
85
87
 
86
- .card-title
87
- @apply inline-flex flex-col
88
+ .card .card-header {
89
+ @apply flex justify-between mb-4;
90
+ }
88
91
 
89
- &-container
90
- @apply inline-flex items-center mb-2 text-lg text-primary
92
+ .card .card-header .card-title {
93
+ @apply inline-flex flex-col;
94
+ }
91
95
 
92
- .title-icon
93
- @apply ml-2
96
+ .card .card-header .card-title-container {
97
+ @apply inline-flex items-center mb-2 text-lg text-primary;
98
+ }
94
99
 
95
- &-border
96
- @apply s('h-0.5') rounded-full bg-highlight-500
100
+ .card .card-header .card-title-container .title-icon {
101
+ @apply ml-2;
102
+ }
97
103
 
98
- .card-desc
99
- @apply text-base text-pgray-2
104
+ .card .card-header .card-title-border {
105
+ @apply h-0.5 rounded-full bg-highlight-500;
106
+ }
100
107
 
101
- .date-range
102
- @apply ml-2 text-sm text-pgray-3
108
+ .card .card-header .card-desc {
109
+ @apply text-base text-pgray-2;
110
+ }
103
111
 
104
- .inline-info
105
- @apply mt-2 text-sm text-pgray-3
112
+ .card .card-header .card-desc .date-range {
113
+ @apply ml-2 text-sm text-pgray-3;
114
+ }
106
115
 
107
- .card-body
108
- @apply relative
116
+ .card .card-header .inline-info {
117
+ @apply mt-2 text-sm text-pgray-3;
118
+ }
119
+
120
+ .card .card-body {
121
+ @apply relative;
122
+ }
109
123
 
110
- .card-footer
111
- @apply mt-4 pb-2 border-b s('border-primary-300/30')
124
+ .card .card-footer {
125
+ @apply mt-4 pb-2 border-b border-primary-300/30;
126
+ }
112
127
 
113
- .card
114
- @apply border-primary-300 rounded-lg shadow-md
128
+ .card {
129
+ @apply border-primary-300 rounded-lg shadow-md;
130
+ }
115
131
 
116
- .card-header
117
- .card-title
118
- &-container
119
- @apply mb-0 text-base text-pgray-2
132
+ .card .card-header .card-title-container {
133
+ @apply mb-0 text-base text-pgray-2;
134
+ }
120
135
 
121
- &-border
122
- @apply hidden
136
+ .card .card-header .card-title-border {
137
+ @apply hidden;
138
+ }
123
139
  </style>
@@ -187,7 +187,10 @@ export default defineComponent({
187
187
  });
188
188
  </script>
189
189
 
190
- <style lang="stylus">
191
- .chart
192
- @apply flex w-full h-52 min-h-52 overflow-hidden
190
+ <style>
191
+ @reference '~ui/app/assets/css/main.css';
192
+
193
+ .chart {
194
+ @apply flex w-full h-52 min-h-52 overflow-hidden;
195
+ }
193
196
  </style>
@@ -16,8 +16,8 @@
16
16
 
17
17
  <script lang="ts">
18
18
  import { isEqual } from "lodash-es";
19
- import type IInputOption from "~ui/interface/IInputOption";
20
- import { getUID } from "~ui/utils";
19
+ import type IInputOption from "~ui/app/interface/IInputOption";
20
+ import { getUID } from "~ui/app/utils";
21
21
 
22
22
  export default defineComponent({
23
23
  name: "SLCheckbox",
@@ -77,10 +77,18 @@ export default defineComponent({
77
77
  default: null,
78
78
  },
79
79
  },
80
- emits: ["update:modelValue", 'update:lastCheckValue'],
80
+ emits: ["update:modelValue", "update:lastCheckValue"],
81
81
  setup(props, { emit }) {
82
- const { size, disabled, modelValue, trueValue, falseValue, value, options, lastCheckValue } =
83
- toRefs(props);
82
+ const {
83
+ size,
84
+ disabled,
85
+ modelValue,
86
+ trueValue,
87
+ falseValue,
88
+ value,
89
+ options,
90
+ lastCheckValue,
91
+ } = toRefs(props);
84
92
  const uid = ref<string | undefined>(undefined);
85
93
 
86
94
  const checkboxClass = computed(() => {
@@ -109,21 +117,40 @@ export default defineComponent({
109
117
  if (Array.isArray(modelValue.value)) {
110
118
  const valueSet: Set<any> = new Set(modelValue.value);
111
119
 
112
- const lastCheckIndex = lastCheckValue.value === null || lastCheckValue.value === undefined || !options.value ? -1 : options.value.findIndex((o) => isEqual(o.value, lastCheckValue.value));
113
- const currentCheckIndex = options.value?.findIndex((o) => isEqual(o.value, value.value)) || -1;
114
-
115
- if (!options.value || lastCheckIndex === -1 || lastCheckIndex === currentCheckIndex || !e.shiftKey) {
120
+ const lastCheckIndex =
121
+ lastCheckValue.value === null ||
122
+ lastCheckValue.value === undefined ||
123
+ !options.value
124
+ ? -1
125
+ : options.value.findIndex((o) =>
126
+ isEqual(o.value, lastCheckValue.value),
127
+ );
128
+ const currentCheckIndex =
129
+ options.value?.findIndex((o) => isEqual(o.value, value.value)) || -1;
130
+
131
+ if (
132
+ !options.value ||
133
+ lastCheckIndex === -1 ||
134
+ lastCheckIndex === currentCheckIndex ||
135
+ !e.shiftKey
136
+ ) {
116
137
  if (isChecked.value) {
117
138
  valueSet.delete(value.value);
118
139
  emit("update:lastCheckValue", null);
119
140
  } else {
120
141
  valueSet.add(value.value);
121
- emit('update:lastCheckValue', value.value);
142
+ emit("update:lastCheckValue", value.value);
122
143
  }
123
144
  } else {
124
145
  emit("update:lastCheckValue", null);
125
- const start = lastCheckIndex < currentCheckIndex ? lastCheckIndex : currentCheckIndex;
126
- const end = lastCheckIndex < currentCheckIndex ? currentCheckIndex : lastCheckIndex;
146
+ const start =
147
+ lastCheckIndex < currentCheckIndex
148
+ ? lastCheckIndex
149
+ : currentCheckIndex;
150
+ const end =
151
+ lastCheckIndex < currentCheckIndex
152
+ ? currentCheckIndex
153
+ : lastCheckIndex;
127
154
  options.value.slice(start, end + 1).forEach((o) => {
128
155
  if (o.disabled) return;
129
156
  valueSet.add(o.value);
@@ -135,7 +162,7 @@ export default defineComponent({
135
162
 
136
163
  emit(
137
164
  "update:modelValue",
138
- isChecked.value ? falseValue.value : trueValue.value
165
+ isChecked.value ? falseValue.value : trueValue.value,
139
166
  );
140
167
  }
141
168
 
@@ -153,55 +180,71 @@ export default defineComponent({
153
180
  });
154
181
  </script>
155
182
 
156
- <style lang="stylus">
157
- .checkbox
158
- @apply inline-flex relative text-base align-top overflow-hidden
183
+ <style>
184
+ @reference '~ui/app/assets/css/main.css';
185
+
186
+ .checkbox {
187
+ @apply inline-flex relative text-base align-top overflow-hidden;
188
+ }
159
189
 
160
- &.inactive
161
- label
162
- @apply pointer-events-none
190
+ .checkbox.inactive label {
191
+ @apply pointer-events-none;
192
+ }
163
193
 
164
- &.checkbox-sm
165
- @apply text-sm
194
+ .checkbox.checkbox-sm {
195
+ @apply text-sm;
196
+ }
166
197
 
167
- label
168
- @apply text-sm
198
+ .checkbox.checkbox-sm label {
199
+ @apply text-sm;
200
+ }
169
201
 
170
- input
171
- @apply absolute s("-top-10") s("-left-10")
202
+ .checkbox input {
203
+ @apply absolute -top-10 -left-10;
204
+ }
172
205
 
173
- label
174
- @apply relative text-base text-pgray-3 cursor-pointer
206
+ .checkbox label {
207
+ @apply relative text-base text-pgray-3 cursor-pointer;
208
+ }
175
209
 
176
- .icon
177
- @apply hidden
210
+ .checkbox label .icon {
211
+ @apply hidden;
212
+ }
178
213
 
179
- span
180
- @apply ml-2
214
+ .checkbox label span {
215
+ @apply ml-2;
216
+ }
181
217
 
182
- input:not(:checked) + label:not(.is-check-some)
183
- .icon-square
184
- @apply inline-block
218
+ .checkbox input:not(:checked) + label:not(.is-check-some) .icon-square {
219
+ @apply inline-block;
220
+ }
185
221
 
186
- input:not(:checked) + label.is-check-some
187
- @apply text-primary
222
+ .checkbox input:not(:checked) + label.is-check-some {
223
+ @apply text-primary;
224
+ }
188
225
 
189
- .icon-square
190
- @apply hidden
226
+ .checkbox input:not(:checked) + label.is-check-some .icon-square {
227
+ @apply hidden;
228
+ }
191
229
 
192
- .icon-minus-square
193
- @apply inline-block
230
+ .checkbox input:not(:checked) + label.is-check-some .icon-minus-square {
231
+ @apply inline-block;
232
+ }
194
233
 
195
- input:checked + label, &.is-check-some
196
- @apply text-primary
234
+ .checkbox input:checked + label,
235
+ .checkbox.is-check-some {
236
+ @apply text-primary;
237
+ }
197
238
 
198
- input:checked + label
199
- .icon-check-square
200
- @apply inline-block
239
+ .checkbox input:checked + label .icon-check-square {
240
+ @apply inline-block;
241
+ }
201
242
 
202
- input:not(:checked):disabled + label
203
- @apply text-pgray-4 cursor-default pointer-events-none
243
+ .checkbox input:not(:checked):disabled + label {
244
+ @apply text-pgray-4 cursor-default pointer-events-none;
245
+ }
204
246
 
205
- input:checked:disabled + label
206
- @apply text-pgray-3 cursor-default pointer-events-none
247
+ .checkbox input:checked:disabled + label {
248
+ @apply text-pgray-3 cursor-default pointer-events-none;
249
+ }
207
250
  </style>
@@ -51,7 +51,7 @@ export default defineComponent({
51
51
  btnClass.push(`circle-button-${color.value}`);
52
52
  }
53
53
  if (shadow.value) {
54
- btnClass.push("shadow");
54
+ btnClass.push("shadow-default");
55
55
  }
56
56
  if (active.value) {
57
57
  btnClass.push("active");
@@ -71,25 +71,34 @@ export default defineComponent({
71
71
  });
72
72
  </script>
73
73
 
74
- <style lang="stylus">
75
- .circle-button
76
- @apply inline-flex items-center justify-center relative w-10 h-10 rounded-full bg-white text-xl s('leading-5.75') text-white
74
+ <style>
75
+ @reference '~ui/app/assets/css/main.css';
77
76
 
78
- &&-lg
79
- @apply s('w-13.5') s('h-13.5') s('text-2.67xl')
77
+ .circle-button {
78
+ @apply inline-flex items-center justify-center relative w-10 h-10 rounded-full bg-white text-xl leading-5.75 text-white;
79
+ }
80
80
 
81
- .badge
82
- @apply s('top-1.75') right-3 w-1 h-1
81
+ .circle-button-lg {
82
+ @apply w-13.5 h-13.5 text-2p67xl;
83
+ }
83
84
 
84
- &&-highlight-400
85
- @apply bg-highlight-400
85
+ .circle-button-lg .badge {
86
+ @apply top-1.75 right-3 w-1 h-1;
87
+ }
86
88
 
87
- &.shadow
88
- @apply shadow-md
89
+ .circle-button-highlight-400 {
90
+ @apply bg-highlight-400;
91
+ }
89
92
 
90
- &.active
91
- @apply border border-highlight text-highlight
93
+ .circle-button-highlight-400.shadow {
94
+ @apply shadow-md;
95
+ }
92
96
 
93
- .badge
94
- @apply absolute s('top-1.5') right-2 block s('w-0.75') s('h-0.75') rounded-full bg-highlight
97
+ .circle-button-highlight-400.active {
98
+ @apply border border-highlight text-highlight;
99
+ }
100
+
101
+ .circle-button .badge {
102
+ @apply absolute top-1.5 right-2 block w-0.75 h-0.75 rounded-full bg-highlight;
103
+ }
95
104
  </style>
@@ -24,7 +24,7 @@ export default defineComponent({
24
24
  props: {
25
25
  blockTitleIcon: {
26
26
  type: String,
27
- default: '',
27
+ default: "",
28
28
  },
29
29
  blockTitle: {
30
30
  type: String,
@@ -95,38 +95,49 @@ export default defineComponent({
95
95
  });
96
96
  </script>
97
97
 
98
- <style lang="stylus">
99
- .sl-collapsable-block
100
- @apply s('p-3.75') border border-secondary-400 rounded-lg
101
-
102
- &.collapsed
103
- .sl-collapsable-block-header
104
- .toggle-collapse-button
105
- .icon
106
- @apply rotate-0
107
-
108
- .sl-collapsable-block-body
109
- @apply pt-0
110
-
111
- &-header
112
- .collapse-block-title-icon
113
- @apply text-sm text-primary
114
-
115
- .collapse-block-title
116
- @apply text-base text-pgray-1 font-bold
98
+ <style>
99
+ @reference '~ui/app/assets/css/main.css';
117
100
 
118
- .toggle-collapse-button
119
- @apply inline-flex items-center space-x-2
101
+ .sl-collapsable-block {
102
+ @apply p-3.75 border border-secondary-400 rounded-lg;
103
+ }
120
104
 
121
- .button-title
122
- @apply text-sm text-primary
123
-
124
- .icon
125
- @apply text-xs leading-none text-primary-600 rotate-180 transition-transform
126
-
127
- &-body
128
- @apply relative pt-4 overflow-hidden transition-all
129
-
130
- .collapsable-block-wrapper
131
- @apply absolute top-4 left-0 w-full
105
+ .sl-collapsable-block.collapsed
106
+ .sl-collapsable-block-header
107
+ .toggle-collapse-button
108
+ .icon {
109
+ @apply rotate-0;
110
+ }
111
+
112
+ .sl-collapsable-block.collapsed .sl-collapsable-block-body {
113
+ @apply pt-0;
114
+ }
115
+
116
+ .sl-collapsable-block-header .collapse-block-title-icon {
117
+ @apply text-sm text-primary;
118
+ }
119
+
120
+ .sl-collapsable-block-header .collapse-block-title {
121
+ @apply text-base text-pgray-1 font-bold;
122
+ }
123
+
124
+ .sl-collapsable-block-header .toggle-collapse-button {
125
+ @apply inline-flex items-center space-x-2;
126
+ }
127
+
128
+ .sl-collapsable-block-header .toggle-collapse-button .button-title {
129
+ @apply text-sm text-primary;
130
+ }
131
+
132
+ .sl-collapsable-block-header .toggle-collapse-button .icon {
133
+ @apply text-xs leading-none text-primary-600 rotate-180 transition-transform;
134
+ }
135
+
136
+ .sl-collapsable-block-body {
137
+ @apply relative pt-4 overflow-hidden transition-all;
138
+ }
139
+
140
+ .sl-collapsable-block-body .collapsable-block-wrapper {
141
+ @apply absolute top-4 left-0 w-full;
142
+ }
132
143
  </style>