@mptw/skylens-ui 1.4.109 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. package/AGENTS.md +59 -0
  2. package/CLAUDE.md +36 -0
  3. package/README.md +7 -7
  4. package/app/app.config.ts +14 -0
  5. package/app/app.vue +5 -0
  6. package/app/assets/css/layout.css +134 -0
  7. package/app/assets/css/main.css +189 -0
  8. package/{components → app/components}/SLAlertModal.vue +24 -16
  9. package/{components → app/components}/SLBreadcrumbs.vue +12 -8
  10. package/app/components/SLButton.vue +370 -0
  11. package/{components → app/components}/SLCalendarButton.vue +40 -34
  12. package/{components → app/components}/SLCalendarPopup.vue +79 -53
  13. package/{components → app/components}/SLCard.vue +57 -41
  14. package/{components → app/components}/SLChart.vue +6 -3
  15. package/{components → app/components}/SLCheckbox.vue +92 -49
  16. package/{components → app/components}/SLCircleButton.vue +25 -16
  17. package/{components → app/components}/SLCollapsableBlock.vue +44 -33
  18. package/{components → app/components}/SLCollapsableMulitPillSelect.vue +20 -15
  19. package/{components → app/components}/SLConfirmModal.vue +9 -6
  20. package/{components → app/components}/SLContextMenu.vue +88 -48
  21. package/{components → app/components}/SLDateInput.vue +109 -92
  22. package/{components → app/components}/SLDatePicker.vue +9 -7
  23. package/{components → app/components}/SLDistributor.vue +1 -1
  24. package/{components → app/components}/SLDownloadButton.vue +39 -29
  25. package/{components → app/components}/SLDraggable.vue +2 -2
  26. package/{components → app/components}/SLDropdown.vue +33 -25
  27. package/{components → app/components}/SLDropdownItem.vue +9 -5
  28. package/{components → app/components}/SLElementWithTitle.vue +12 -7
  29. package/{components → app/components}/SLEyeCheckbox.vue +44 -31
  30. package/{components → app/components}/SLFileInput.vue +23 -16
  31. package/{components → app/components}/SLGenderAgeSelect.vue +52 -36
  32. package/{components → app/components}/SLHourRangeInput.vue +45 -32
  33. package/{components → app/components}/SLIOSSwitch.vue +81 -60
  34. package/{components → app/components}/SLIcon.vue +4 -3
  35. package/{components → app/components}/SLIconButton.vue +31 -29
  36. package/{components → app/components}/SLInfoTip.vue +51 -40
  37. package/{components → app/components}/SLInsightSitePage.vue +12 -7
  38. package/{components → app/components}/SLLegend.vue +19 -12
  39. package/app/components/SLLinearProgressBar.vue +22 -0
  40. package/{components → app/components}/SLLink.vue +12 -8
  41. package/{components → app/components}/SLLoading.vue +34 -31
  42. package/{components → app/components}/SLMapChart.vue +5 -4
  43. package/{components → app/components}/SLModal.vue +90 -66
  44. package/{components → app/components}/SLMonthCalendarButton.vue +91 -45
  45. package/{components → app/components}/SLMonthPicker.vue +42 -37
  46. package/{components → app/components}/SLMultiEmailInput.vue +163 -113
  47. package/{components → app/components}/SLMultiSelect.vue +37 -26
  48. package/{components → app/components}/SLNoData.vue +16 -11
  49. package/app/components/SLNotification.vue +155 -0
  50. package/{components → app/components}/SLPageModal.vue +14 -9
  51. package/{components → app/components}/SLPagination.vue +45 -33
  52. package/{components → app/components}/SLPillCheckbox.vue +50 -42
  53. package/{components → app/components}/SLPillLabel.vue +43 -28
  54. package/{components → app/components}/SLPopupMenuButton.vue +26 -17
  55. package/{components → app/components}/SLProfileButton.vue +28 -20
  56. package/{components → app/components}/SLProjectShareItem.vue +30 -17
  57. package/{components → app/components}/SLRadioButton.vue +41 -33
  58. package/{components → app/components}/SLRadioButtonGroup.vue +28 -23
  59. package/app/components/SLRadioGroup.vue +221 -0
  60. package/{components → app/components}/SLRangeInput.vue +53 -38
  61. package/{components → app/components}/SLRegionsMapChart.vue +5 -4
  62. package/{components → app/components}/SLRightSider.vue +50 -40
  63. package/{components → app/components}/SLSearchInput.vue +24 -19
  64. package/{components → app/components}/SLSelect.vue +114 -87
  65. package/{components → app/components}/SLSelectAllToggle.vue +52 -37
  66. package/app/components/SLSidebarNav.vue +487 -0
  67. package/{components → app/components}/SLSidebarNavGroupItem.vue +13 -10
  68. package/{components → app/components}/SLSidebarNavGroupItemSection.vue +240 -179
  69. package/{components → app/components}/SLSidebarNavLinkItem.vue +131 -109
  70. package/{components → app/components}/SLSidebarNavSectionItem.vue +21 -18
  71. package/{components → app/components}/SLSitePage.vue +35 -24
  72. package/{components → app/components}/SLSkyInsightSitePage.vue +13 -8
  73. package/{components → app/components}/SLSortByDropdown.vue +35 -22
  74. package/{components → app/components}/SLSpinIcon.vue +6 -3
  75. package/{components → app/components}/SLStayRangeInput.vue +47 -36
  76. package/{components → app/components}/SLTab.vue +7 -2
  77. package/app/components/SLTable.vue +472 -0
  78. package/{components → app/components}/SLTableTooltip.vue +44 -30
  79. package/app/components/SLTabs.vue +528 -0
  80. package/{components → app/components}/SLTextInput.vue +162 -134
  81. package/{components → app/components}/SLTextarea.vue +40 -29
  82. package/{components → app/components}/SLToast.vue +19 -11
  83. package/{components → app/components}/SLToggleButton.vue +18 -11
  84. package/{components → app/components}/SLTwoLayerMultiSelect.vue +180 -85
  85. package/{components → app/components}/SLTwoLayerSelect.vue +47 -37
  86. package/{components → app/components}/SLTwoLayerSingleSelect.vue +52 -33
  87. package/{components → app/components}/SLWarnModal.vue +9 -7
  88. package/app/interface/commons.ts +7 -0
  89. package/{utils → app/utils}/index.ts +213 -146
  90. package/eslint.config.js +3 -0
  91. package/nuxt.config.ts +17 -14
  92. package/package.json +10 -9
  93. package/skills-lock.json +59 -0
  94. package/tsconfig.json +1 -6
  95. package/.eslintrc.cjs +0 -4
  96. package/app.config.ts +0 -5
  97. package/assets/css/layout.styl +0 -98
  98. package/assets/css/tailwind.css +0 -3
  99. package/components/SLButton.vue +0 -337
  100. package/components/SLLinearProgressBar.vue +0 -35
  101. package/components/SLNotification.vue +0 -151
  102. package/components/SLRadioGroup.vue +0 -209
  103. package/components/SLSidebarNav.vue +0 -427
  104. package/components/SLTable.vue +0 -455
  105. package/components/SLTabs.vue +0 -475
  106. package/interface/commons.ts +0 -7
  107. package/pages/index.vue +0 -15
  108. package/tailwind.config.js +0 -271
  109. /package/{assets → app/assets}/css/fonts/MEShPlus-font-icon.eot +0 -0
  110. /package/{assets → app/assets}/css/fonts/MEShPlus-font-icon.svg +0 -0
  111. /package/{assets → app/assets}/css/fonts/MEShPlus-font-icon.ttf +0 -0
  112. /package/{assets → app/assets}/css/fonts/MEShPlus-font-icon.woff +0 -0
  113. /package/{assets → app/assets}/css/icons.css +0 -0
  114. /package/{assets → app/assets}/images/commons/app-logo-white.png +0 -0
  115. /package/{assets → app/assets}/images/commons/app-logo.png +0 -0
  116. /package/{assets → app/assets}/images/commons/empty-box.png +0 -0
  117. /package/{interface → app/interface}/IDateRange.ts +0 -0
  118. /package/{interface → app/interface}/IHourRange.ts +0 -0
  119. /package/{interface → app/interface}/IInputOption.ts +0 -0
  120. /package/{interface → app/interface}/ILegendItem.ts +0 -0
  121. /package/{interface → app/interface}/IOrganization.ts +0 -0
  122. /package/{interface → app/interface}/IPopupMenuButton.ts +0 -0
  123. /package/{interface → app/interface}/IStayRange.ts +0 -0
  124. /package/{interface → app/interface}/ITableField.ts +0 -0
  125. /package/{interface → app/interface}/IWeb.ts +0 -0
  126. /package/{interface → app/interface}/NavConfigType.ts +0 -0
  127. /package/{models → app/models}/DateRange.ts +0 -0
  128. /package/{plugins → app/plugins}/v-calendar.ts +0 -0
  129. /package/{utils → app/utils}/constants.ts +0 -0
  130. /package/{utils → app/utils}/generateSheet.ts +0 -0
@@ -1,151 +0,0 @@
1
- <template lang="pug">
2
- Transition(
3
- @before-enter='onBeforeEnter',
4
- @enter='onEnter',
5
- @after-enter='onAfterEnter',
6
- @enter-cancelled='onAfterEnter',
7
- @before-leave='onBeforeLeave',
8
- @leave='onLeave',
9
- @after-leave='onAfterLeave',
10
- @leave-cancelled='onAfterLeave',
11
- )
12
- .notification(v-if='isShow')
13
- .notification-wrapper {{ content }}
14
- </template>
15
-
16
- <script lang="ts">
17
- import gsap from 'gsap';
18
-
19
- export default defineComponent({
20
- name: 'SLNotification',
21
- props: {
22
- isShow: {
23
- type: Boolean,
24
- default: false,
25
- },
26
- content: {
27
- type: String,
28
- default: '',
29
- },
30
- },
31
- emits: ['update:isShow'],
32
- setup(props, { emit }) {
33
- const { isShow } = toRefs(props);
34
-
35
- let timeoutId: any = null;
36
-
37
- function onBeforeEnter(el: Element) {
38
- const wrapperEl = el.querySelector('.notification-wrapper');
39
-
40
- if (wrapperEl) {
41
- gsap.set(wrapperEl, {
42
- alpha: 0
43
- });
44
- }
45
- }
46
-
47
- function onEnter(el: Element, done: () => void) {
48
- const wrapperEl = el.querySelector('.notification-wrapper');
49
-
50
- if (wrapperEl) {
51
- gsap.to(wrapperEl, {
52
- alpha: 1,
53
- duration: 0.3,
54
- onComplete: () => {
55
- done();
56
- }
57
- })
58
- } else {
59
- done();
60
- }
61
- }
62
-
63
- function onAfterEnter(el: Element) {
64
- const wrapperEl = el.querySelector('.notification-wrapper');
65
-
66
- if (wrapperEl) {
67
- gsap.set(wrapperEl, {
68
- alpha: 1
69
- });
70
- }
71
- }
72
-
73
- function onBeforeLeave(el: Element) {
74
- const wrapperEl = el.querySelector('.notification-wrapper');
75
-
76
- if (wrapperEl) {
77
- gsap.set(wrapperEl, {
78
- alpha: 1
79
- });
80
- }
81
- }
82
-
83
- function onLeave(el: Element, done: () => void) {
84
- const wrapperEl = el.querySelector('.notification-wrapper');
85
-
86
- if (wrapperEl) {
87
- gsap.to(wrapperEl, {
88
- alpha: 0,
89
- duration: 0.3,
90
- onComplete: () => {
91
- done();
92
- }
93
- })
94
- } else {
95
- done();
96
- }
97
- }
98
-
99
- function onAfterLeave(el: Element) {
100
- const wrapperEl = el.querySelector('.notification-wrapper');
101
-
102
- if (wrapperEl) {
103
- gsap.set(wrapperEl, {
104
- alpha: 0
105
- });
106
- }
107
- }
108
-
109
- function delayHide() {
110
- if (timeoutId) {
111
- clearTimeout(timeoutId);
112
- }
113
- timeoutId = null;
114
-
115
- timeoutId = setTimeout(() => {
116
- emit('update:isShow', false);
117
- }, 2000);
118
- }
119
-
120
- watch(isShow, () => {
121
- if (isShow.value) {
122
- delayHide();
123
- }
124
- });
125
-
126
- onBeforeUnmount(() => {
127
- if (timeoutId) {
128
- clearTimeout(timeoutId);
129
- }
130
- timeoutId = null;
131
- })
132
-
133
- return {
134
- onBeforeEnter,
135
- onEnter,
136
- onAfterEnter,
137
- onBeforeLeave,
138
- onLeave,
139
- onAfterLeave,
140
- };
141
- },
142
- });
143
- </script>
144
-
145
- <style lang="stylus">
146
- .notification
147
- @apply s('z-[100]') fixed top-0 left-0 w-full h-full pointer-events-none
148
-
149
- &-wrapper
150
- @apply absolute s('top-1/2') s('left-1/2') p-4 s('bg-backdrop/80') rounded text-base text-white s('-translate-x-1/2') s('-translate-y-1/2') shadow-popup-sm
151
- </style>
@@ -1,209 +0,0 @@
1
- <template lang="pug">
2
- SLElementWithTitle(:title='disabled ? disabledHint : ""')
3
- .radio-group(:class='sizeClass')
4
- .radio(v-for="option, i in options")
5
- input(
6
- type="radio"
7
- :id="uids[i]"
8
- :checked="modelValue === option.value"
9
- :disabled="disabled"
10
- )
11
- SLElementWithTitle(:title='option.desc')
12
- label(@click="onClickedRadio(option.value)")
13
- span(v-if='option.label') {{ option.label }}
14
- SLIcon(v-if='option.icon' :icon='option.icon')
15
- </template>
16
-
17
- <script lang="ts">
18
- import type { PropType } from "vue";
19
- import { getUID } from "~ui/utils";
20
- import type IInputOption from "~ui/interface/IInputOption";
21
-
22
- export default defineComponent({
23
- name: "SLRadioGroup",
24
- props: {
25
- modelValue: {
26
- type: [Number, String, Boolean],
27
- default: null,
28
- },
29
- options: {
30
- type: Array as PropType<Array<IInputOption>>,
31
- default: () => [],
32
- },
33
- disabled: {
34
- type: Boolean,
35
- default: false,
36
- },
37
- disabledHint: {
38
- type: String,
39
- default: "",
40
- },
41
- size: {
42
- type: String,
43
- default: "",
44
- validator: (val: string) =>
45
- ["", "md", "sm", "xs", "xxs", "3xs"].includes(val),
46
- },
47
- color: {
48
- type: String,
49
- default: "",
50
- },
51
- colorInvert: {
52
- type: Boolean,
53
- default: false,
54
- },
55
- },
56
- emits: ["update:modelValue"],
57
- setup(props, { emit }) {
58
- const { size, color, colorInvert, options, disabled } = toRefs(props);
59
-
60
- const uids = ref<Array<string>>([]);
61
-
62
- const sizeClass = computed(() => {
63
- const classes = [];
64
- if (size.value !== "") {
65
- classes.push(`radio-group--${size.value}`);
66
- }
67
- if (color.value !== "") {
68
- classes.push(`radio-group--${color.value}`);
69
- }
70
- if (colorInvert.value) {
71
- classes.push("color-invert");
72
- }
73
- if (disabled.value) {
74
- classes.push("disabled");
75
- }
76
-
77
- return classes.join(" ");
78
- });
79
-
80
- function onChanged(e: Event, targetValue: any) {
81
- const { target } = e;
82
- if ((target as HTMLInputElement).checked) {
83
- emit("update:modelValue", targetValue);
84
- }
85
- }
86
-
87
- function onClickedRadio(targetValue: any) {
88
- if (disabled.value) return;
89
-
90
- emit("update:modelValue", targetValue);
91
- }
92
-
93
- onMounted(() => {
94
- uids.value = options.value.map(() => getUID());
95
- });
96
-
97
- return {
98
- uids,
99
- sizeClass,
100
- onChanged,
101
- onClickedRadio,
102
- };
103
- },
104
- });
105
- </script>
106
-
107
- <style lang="stylus">
108
- .radio-group
109
- @apply inline-flex s('p-0.5') bg-primary-100 border border-primary-200 rounded
110
-
111
- &.radio-group--sm
112
- .radio
113
- label
114
- @apply px-2 s('py-1.5')
115
-
116
- &.radio-group--xs
117
- .radio
118
- label
119
- @apply px-4 s('py-0.5') text-sm
120
-
121
- &.radio-group--xxs
122
- @apply s('p-0.75')
123
-
124
- .radio
125
- label
126
- @apply px-2 s('py-0.75') text-sm
127
-
128
- &.radio-group--3xs
129
- @apply s('p-0.75')
130
-
131
- .radio
132
- label
133
- @apply px-2 py-px text-sm
134
-
135
- &.radio-group--third-600
136
- @apply bg-third-600 border-third-500
137
-
138
- .radio
139
- label
140
- @apply bg-third-600 text-white
141
-
142
- input:checked + .element-with-title
143
- label
144
- @apply text-third
145
-
146
- &.radio-group--edit
147
- @apply bg-edit border-primary
148
-
149
- &.color-invert
150
- @apply bg-card-lightpr-bg border-primary-300
151
-
152
- .radio
153
- label
154
- @apply bg-card-lightpr-bg text-primary-600
155
-
156
- input:checked + .element-with-title
157
- label
158
- @apply bg-edit text-white
159
-
160
- .radio
161
- label
162
- @apply bg-edit text-white
163
-
164
- input:checked + .element-with-title
165
- label
166
- @apply text-primary
167
-
168
- &.radio-group--insight-title
169
- @apply bg-primary-100 border-primary-100
170
-
171
- &.color-invert
172
- @apply bg-card-lightpr-bg border-primary-300
173
-
174
- .radio
175
- label
176
- @apply bg-card-lightpr-bg text-primary-600
177
-
178
- input:checked + .element-with-title
179
- label
180
- @apply bg-edit text-white
181
-
182
- .radio
183
- label
184
- @apply bg-primary-100 text-primary
185
-
186
- input:checked + .element-with-title
187
- label
188
- @apply bg-insight-title text-white
189
-
190
- &.disabled
191
- @apply bg-pgray-6 border-pgray-6
192
-
193
- .radio
194
- @apply relative inline-flex
195
-
196
- input
197
- @apply absolute s('left-1/2') s('top-1/2') transform s('-translate-x-1/2') s('-translate-y-1/2')
198
-
199
- label
200
- @apply inline-flex justify-center items-center relative px-3 s('py-1.25') bg-primary-100 rounded text-base leading-normal text-primary-600 cursor-pointer transition
201
-
202
- input:checked + .element-with-title
203
- label
204
- @apply bg-white text-primary shadow
205
-
206
- input:disabled + .element-with-title
207
- label
208
- @apply bg-pgray-6 text-pgray-4 cursor-default
209
- </style>