@mptw/skylens-ui 1.5.0 → 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 (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
@@ -41,7 +41,7 @@
41
41
 
42
42
  <script lang="ts">
43
43
  import { debounce } from "lodash-es";
44
- import { getUID } from "~ui/utils";
44
+ import { getUID } from "~ui/app/utils";
45
45
 
46
46
  export default defineComponent({
47
47
  name: "SLTextInput",
@@ -146,7 +146,7 @@ export default defineComponent({
146
146
 
147
147
  const debounceUpdateModelValue = debounce(
148
148
  lazyUpdateModelValue,
149
- Number.isInteger(lazy.value) ? (lazy.value as number) : 500
149
+ Number.isInteger(lazy.value) ? (lazy.value as number) : 500,
150
150
  );
151
151
 
152
152
  function onFocused() {
@@ -225,136 +225,164 @@ export default defineComponent({
225
225
  });
226
226
  </script>
227
227
 
228
- <style lang="stylus">
229
- .text-input
230
- &.inline
231
- @apply flex
232
-
233
- & > label
234
- @apply flex-grow-0 flex-shrink-0 mb-0 mr-2 py-2 border-t border-b border-transparent
235
-
236
- .form-control
237
- @apply flex-grow
238
-
239
- &.is-float
240
- & > label
241
- @apply hidden
242
-
243
- .input-group
244
- &.is-fill
245
- .input
246
- @apply bg-white border-primary-300
247
-
248
- &.is-focus
249
- .input
250
- @apply bg-white border-primary
251
-
252
- .input
253
- @apply relative bg-primary-50 border-primary-50
254
-
255
- .float-label
256
- @apply inline-block
257
-
258
- .is-invalid
259
- .input-group
260
- .input, .input.is-focus
261
- @apply border-danger-light
262
-
263
- &.is-fixed-float
264
- & > label
265
- @apply hidden
266
-
267
- .input-group
268
- .input
269
- @apply relative bg-white border-primary
270
-
271
- .float-label
272
- @apply inline-block s('ml-1.5') s('-mt-2.25') py-0 s('px-0.5') bg-white text-primary text-xs transition-input-focus
273
-
274
- .is-invalid
275
- .input-group
276
- .input, .input.is-focus
277
- @apply border-danger-light
278
-
279
- &.disabled, &.readonly
280
- .input-group
281
- &.is-focus
282
- .input
283
- @apply border-primary-600
284
-
285
- .input
286
- @apply border-primary-600 bg-primary-100
287
-
288
- & > label
289
- @apply w-full mb-2 text-base leading-normal text-pgray-2
290
-
291
- .required
292
- @apply text-danger
293
-
294
- .is-invalid
295
- .input-group, .input-group.is-focus
296
- .input
297
- @apply border-danger-light
298
-
299
- &.input-sm, &.input-xs
300
- .icon
301
- @apply hidden
302
-
303
- .icon
304
- @apply inline-block
305
-
306
- .invalid-feedback
307
- @apply block
308
-
309
-
310
- .input-group
311
- @apply flex flex-nowrap text-base leading-normal
312
-
313
- &.is-focus
314
- .input
315
- @apply border-primary
316
-
317
- &.is-fill, &.is-focus
318
- .input
319
- .float-label
320
- @apply s('ml-1.5') s('-mt-2.25') py-0 s('px-0.5') bg-white text-primary text-xs transition-input-focus
321
-
322
- &-prepend
323
- @apply flex-grow-0 flex-shrink-0
324
-
325
- .input
326
- @apply flex-grow flex items-center s('p-1.75') bg-white rounded border border-primary-600
327
-
328
- &.input-sm
329
- @apply s('py-0.75')
330
-
331
- input
332
- @apply text-base
333
-
334
- &.input-xs
335
- @apply py-px s('px-0.75')
336
-
337
- input
338
- @apply text-base
339
-
340
- &:not(:first-child)
341
- @apply rounded-l-none border-l-0
342
-
343
- &:not(:last-child)
344
- @apply rounded-r-none border-r-0
345
-
346
- input
347
- @apply flex-grow w-full bg-transparent text-pgray-2 placeholder-pgray-4 s('focus:outline-none')
348
-
349
- .icon
350
- @apply flex-grow-0 flex-shrink-0 hidden text-danger-light
351
-
352
- .float-label
353
- @apply hidden absolute top-0 left-0 s('p-1.75') border-t border-b border-transparent text-pgray-3 cursor-text
354
-
355
- &-append
356
- @apply flex-grow-0 flex-shrink-0
357
-
358
- .invalid-feedback
359
- @apply hidden text-danger text-xs
228
+ <style>
229
+ @reference '~ui/app/assets/css/main.css';
230
+
231
+ .text-input.inline {
232
+ @apply flex;
233
+ }
234
+
235
+ .text-input.inline > label {
236
+ @apply grow-0 shrink-0 mb-0 mr-2 py-2 border-t border-b border-transparent;
237
+ }
238
+
239
+ .text-input.inline .form-control {
240
+ @apply grow;
241
+ }
242
+
243
+ .text-input.is-float > label {
244
+ @apply hidden;
245
+ }
246
+
247
+ .text-input.is-float .input-group.is-fill .input {
248
+ @apply bg-white border-primary-300;
249
+ }
250
+
251
+ .text-input.is-float .input-group.is-focus .input {
252
+ @apply bg-white border-primary;
253
+ }
254
+
255
+ .text-input.is-float .input-group .input {
256
+ @apply relative bg-primary-50 border-primary-50;
257
+ }
258
+
259
+ .text-input.is-float .input-group .input .float-label {
260
+ @apply inline-block;
261
+ }
262
+
263
+ .text-input.is-float .is-invalid .input-group .input,
264
+ .text-input.is-float .is-invalid .input-group .input.is-focus {
265
+ @apply border-danger-light;
266
+ }
267
+
268
+ .text-input.is-fixed-float > label {
269
+ @apply hidden;
270
+ }
271
+
272
+ .text-input.is-fixed-float .input-group .input {
273
+ @apply relative bg-white border-primary;
274
+ }
275
+
276
+ .text-input.is-fixed-float .input-group .input .float-label {
277
+ @apply inline-block ml-1.5 -mt-2.25 py-0 px-0.5 bg-white text-primary text-xs transition-(--transition-input-focus);
278
+ }
279
+
280
+ .text-input.is-fixed-float .is-invalid .input-group .input,
281
+ .text-input.is-fixed-float .is-invalid .input-group .input.is-focus {
282
+ @apply border-danger-light;
283
+ }
284
+
285
+ .text-input.disabled .input-group.is-focus .input,
286
+ .text-input.readonly .input-group.is-focus .input {
287
+ @apply border-primary-600;
288
+ }
289
+
290
+ .text-input.disabled .input-group .input,
291
+ .text-input.readonly .input-group .input {
292
+ @apply border-primary-600 bg-primary-100;
293
+ }
294
+
295
+ .text-input > label {
296
+ @apply w-full mb-2 text-base leading-[1.3125] text-pgray-2;
297
+ }
298
+
299
+ .text-input > label .required {
300
+ @apply text-danger;
301
+ }
302
+
303
+ .text-input .is-invalid .input-group .input,
304
+ .text-input .is-invalid .input-group.is-focus .input {
305
+ @apply border-danger-light;
306
+ }
307
+
308
+ .text-input .is-invalid .input-group .input.input-sm .icon,
309
+ .text-input .is-invalid .input-group .input.input-xs .icon,
310
+ .text-input .is-invalid .input-group.is-focus .input.input-sm .icon,
311
+ .text-input .is-invalid .input-group.is-focus .input.input-xs .icon {
312
+ @apply hidden;
313
+ }
314
+
315
+ .text-input .is-invalid .input-group .input .icon,
316
+ .text-input .is-invalid .input-group.is-focus .input .icon {
317
+ @apply inline-block;
318
+ }
319
+
320
+ .text-input .is-invalid .invalid-feedback {
321
+ @apply block;
322
+ }
323
+
324
+ .text-input .input-group {
325
+ @apply flex flex-nowrap text-base leading-[1.3125];
326
+ }
327
+
328
+ .text-input .input-group.is-focus .input {
329
+ @apply border-primary;
330
+ }
331
+
332
+ .text-input .input-group.is-fill .input .float-label,
333
+ .text-input .input-group.is-focus .input .float-label {
334
+ @apply ml-1.5 -mt-2.25 py-0 px-0.5 bg-white text-primary text-xs transition-(--transition-input-focus);
335
+ }
336
+
337
+ .text-input .input-group-prepend {
338
+ @apply grow-0 shrink-0;
339
+ }
340
+
341
+ .text-input .input-group .input {
342
+ @apply grow flex items-center p-1.75 bg-white rounded border border-primary-600;
343
+ }
344
+
345
+ .text-input .input-group .input.input-sm {
346
+ @apply py-0.75;
347
+ }
348
+
349
+ .text-input .input-group .input.input-sm input {
350
+ @apply text-base;
351
+ }
352
+
353
+ .text-input .input-group .input.input-xs {
354
+ @apply py-px px-0.75;
355
+ }
356
+
357
+ .text-input .input-group .input.input-xs input {
358
+ @apply text-base;
359
+ }
360
+
361
+ .text-input .input-group .input:not(:first-child) {
362
+ @apply rounded-l-none border-l-0;
363
+ }
364
+
365
+ .text-input .input-group .input:not(:last-child) {
366
+ @apply rounded-r-none border-r-0;
367
+ }
368
+
369
+ .text-input .input-group .input input {
370
+ @apply grow w-full bg-transparent text-pgray-2 placeholder-pgray-4 focus:outline-none;
371
+ }
372
+
373
+ .text-input .input-group .input .icon {
374
+ @apply grow-0 shrink-0 hidden text-danger-light;
375
+ }
376
+
377
+ .text-input .input-group .input .float-label {
378
+ @apply hidden absolute top-0 left-0 p-1.75 border-t border-b border-transparent text-pgray-3 cursor-text;
379
+ }
380
+
381
+ .text-input .input-group-append {
382
+ @apply grow-0 shrink-0;
383
+ }
384
+
385
+ .text-input .invalid-feedback {
386
+ @apply hidden text-danger text-xs;
387
+ }
360
388
  </style>
@@ -21,7 +21,7 @@
21
21
  </template>
22
22
 
23
23
  <script lang="ts">
24
- import { getUID } from "~ui/utils";
24
+ import { getUID } from "~ui/app/utils";
25
25
 
26
26
  export default defineComponent({
27
27
  name: "SLTextArea",
@@ -92,43 +92,54 @@ export default defineComponent({
92
92
  });
93
93
  </script>
94
94
 
95
- <style lang="stylus">
96
- .textarea
97
- &.inline
98
- @apply flex
95
+ <style>
96
+ @reference '~ui/app/assets/css/main.css';
99
97
 
100
- label
101
- @apply flex-grow-0 flex-shrink-0 mb-0 mr-2 py-2 border-t border-b border-transparent
98
+ .textarea.inline {
99
+ @apply flex;
100
+ }
102
101
 
103
- .form-control
104
- @apply flex-grow
102
+ .textarea.inline label {
103
+ @apply grow-0 shrink-0 mb-0 mr-2 py-2 border-t border-b border-transparent;
104
+ }
105
105
 
106
- &.disabled
107
- textarea
108
- @apply border-primary-600 bg-primary-100
106
+ .textarea.inline .form-control {
107
+ @apply grow;
108
+ }
109
109
 
110
- label
111
- @apply mb-2 text-base leading-normal text-pgray-2
110
+ .textarea.disabled textarea {
111
+ @apply border-primary-600 bg-primary-100;
112
+ }
112
113
 
113
- .is-invalid
114
- textarea
115
- @apply border-danger-light
114
+ .textarea label {
115
+ @apply mb-2 text-base leading-[1.3125] text-pgray-2;
116
+ }
116
117
 
117
- .invalid-feedback
118
- @apply block
118
+ .textarea .is-invalid textarea {
119
+ @apply border-danger-light;
120
+ }
121
+
122
+ .textarea .is-invalid .invalid-feedback {
123
+ @apply block;
124
+ }
119
125
 
120
- .form-control
121
- @apply relative
126
+ .textarea .form-control {
127
+ @apply relative;
128
+ }
122
129
 
123
- textarea
124
- @apply block w-full p-2 border border-primary-600 rounded bg-white text-base text-pgray-2 resize-none s('focus:border-primary') s('focus:outline-none')
130
+ .textarea textarea {
131
+ @apply block w-full p-2 border border-primary-600 rounded bg-white text-base text-pgray-2 resize-none focus:border-primary focus:outline-none;
132
+ }
125
133
 
126
- textarea:focus + .textarea-placeholder
127
- @apply invisible
134
+ .textarea textarea:focus + .textarea-placeholder {
135
+ @apply invisible;
136
+ }
128
137
 
129
- .form-control-notice
130
- @apply inline-block ml-1 text-pgray-3 text-xs
138
+ .textarea .form-control-notice {
139
+ @apply inline-block ml-1 text-pgray-3 text-xs;
140
+ }
131
141
 
132
- .invalid-feedback
133
- @apply hidden text-danger text-xs
142
+ .textarea .invalid-feedback {
143
+ @apply hidden text-danger text-xs;
144
+ }
134
145
  </style>
@@ -54,19 +54,27 @@ export default defineComponent({
54
54
  });
55
55
  </script>
56
56
 
57
- <style lang="stylus" scoped>
58
- .toast
59
- @apply s('z-[100]') fixed top-0 left-0 w-full h-full pointer-events-none
57
+ <style scoped>
58
+ @reference '~ui/app/assets/css/main.css';
60
59
 
61
- &-wrapper
62
- @apply absolute s('top-1/2') s('left-1/2') py-4 px-6 s('bg-mask/80') rounded text-base text-white s('-translate-x-1/2') s('-translate-y-1/2')
60
+ .toast {
61
+ @apply z-100 fixed top-0 left-0 w-full h-full pointer-events-none;
62
+ }
63
63
 
64
- .toast-fade-enter-active
65
- @apply transition-opacity duration-300 ease-linear
64
+ .toast-wrapper {
65
+ @apply absolute top-1/2 left-1/2 py-4 px-6 bg-mask/80 rounded text-base text-white -translate-x-1/2 -translate-y-1/2;
66
+ }
66
67
 
67
- .toast-fade-leave-active
68
- @apply transition-opacity duration-200 ease-linear
68
+ .toast-fade-enter-active {
69
+ @apply transition-opacity duration-300 ease-linear;
70
+ }
69
71
 
70
- .toast-fade-enter-from, .toast-fade-leave-to
71
- @apply opacity-0
72
+ .toast-fade-leave-active {
73
+ @apply transition-opacity duration-200 ease-linear;
74
+ }
75
+
76
+ .toast-fade-enter-from,
77
+ .toast-fade-leave-to {
78
+ @apply opacity-0;
79
+ }
72
80
  </style>
@@ -60,19 +60,26 @@ export default defineComponent({
60
60
  });
61
61
  </script>
62
62
 
63
- <style lang="stylus">
64
- .sl-toggle-button
65
- @apply inline-flex items-center justify-center s('p-1.5') space-x-2 bg-primary-100 rounded text-base text-primary-600
63
+ <style>
64
+ @reference '~ui/app/assets/css/main.css';
66
65
 
67
- &.sl-toggle-button-sm
68
- @apply s('h-[29px]') px-1 py-0 text-sm
66
+ .sl-toggle-button {
67
+ @apply inline-flex items-center justify-center p-1.5 space-x-2 bg-primary-100 rounded text-base text-primary-600;
68
+ }
69
69
 
70
- .icon
71
- @apply text-lg leading-none
70
+ .sl-toggle-button.sl-toggle-button-sm {
71
+ @apply h-7.25 px-1 py-0 text-sm;
72
+ }
72
73
 
73
- &.active
74
- @apply bg-primary-600 text-white
74
+ .sl-toggle-button.sl-toggle-button-sm .icon {
75
+ @apply text-lg leading-none;
76
+ }
75
77
 
76
- &.disabled
77
- @apply bg-pgray-5 text-white cursor-default
78
+ .sl-toggle-button.active {
79
+ @apply bg-primary-600 text-white;
80
+ }
81
+
82
+ .sl-toggle-button.disabled {
83
+ @apply bg-pgray-5 text-white cursor-default;
84
+ }
78
85
  </style>