@mptw/skylens-ui 1.5.21 → 1.5.22

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.
package/app/app.vue CHANGED
@@ -1,7 +1,11 @@
1
1
  <template lang="pug">
2
2
  div
3
- SLCollapsableBlock(blockTitle='三方比對組')
4
- .p-2 abc
3
+ SLPopupMenuButton(:buttons='buttons')
5
4
  </template>
6
5
 
7
- <script setup lang="ts"></script>
6
+ <script setup lang="ts">
7
+ const buttons = [
8
+ { name: "複製", event: "copy" },
9
+ { name: "下載 Excel", event: "download" },
10
+ ];
11
+ </script>
@@ -4,7 +4,7 @@ a.popup-menu-button(
4
4
  @click='onClickedToggle'
5
5
  ref='toggleEl'
6
6
  )
7
- SLIcon(icon='three-dot-v')
7
+ SLIcon(icon='three-dot')
8
8
  ClientOnly
9
9
  Teleport(to="body")
10
10
  .buttons-popup(ref='popupEl')
@@ -15,9 +15,8 @@ a.popup-menu-button(
15
15
  href='javascript:;'
16
16
  @click='onClickedMenuButton(button.event)'
17
17
  )
18
- SLIcon(:icon='button.icon')
18
+ SLIcon(v-if='button.icon', :icon='button.icon')
19
19
  span {{ button.name }}
20
- .menu-button-splitter(v-if='(i + 1) < buttons.length')
21
20
  </template>
22
21
 
23
22
  <script lang="ts">
@@ -133,31 +132,20 @@ export default defineComponent({
133
132
  });
134
133
  </script>
135
134
 
136
- <style>
135
+ <style scoped>
137
136
  @reference '~uiApp/assets/css/main.css';
138
137
 
139
138
  .popup-menu-button {
140
- @apply inline-block relative;
139
+ @apply inline-flex relative p-1.75 border border-primary-600 rounded-sm text-base text-primary-600;
141
140
  }
142
141
 
143
142
  .buttons-popup {
144
- @apply z-60 flex-col items-stretch border border-primary-300 rounded bg-white shadow-md hidden;
145
-
146
- .menu-button-splitter {
147
- @apply h-px mx-auto my-1 bg-primary-100;
148
- width: calc(100% - var(--spacing) * 4);
149
- }
143
+ @apply hidden;
144
+ @apply z-60 flex-col items-stretch border border-primary-300 rounded bg-white divide-y divide-primary-100 shadow-md overflow-hidden;
150
145
 
151
146
  .menu-button {
152
- @apply inline-flex flex-row flex-nowrap items-center justify-center px-2 py-1 space-x-2 text-base text-primary whitespace-nowrap;
153
-
154
- &:first-child {
155
- @apply pt-2;
156
- }
157
-
158
- &:last-child {
159
- @apply pb-2;
160
- }
147
+ @apply inline-flex flex-row flex-nowrap gap-2 items-center justify-center px-3 py-2 bg-white text-base text-primary truncate;
148
+ @apply hover:bg-primary-50;
161
149
  }
162
150
 
163
151
  &[data-show] {
@@ -1,5 +1,5 @@
1
1
  export default interface IPopupMenuButton {
2
- name: string;
3
- icon: string;
4
- event: string;
5
- }
2
+ name: string;
3
+ icon?: string;
4
+ event: string;
5
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mptw/skylens-ui",
3
3
  "type": "module",
4
- "version": "1.5.21",
4
+ "version": "1.5.22",
5
5
  "main": "./nuxt.config.ts",
6
6
  "scripts": {
7
7
  "dev": "nuxi dev .playground",