@globalbrain/sefirot 4.27.0 → 4.28.0

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.
@@ -7,7 +7,7 @@ import SDropdown from './SDropdown.vue'
7
7
 
8
8
  export type { Mode, Size, Tooltip, Type }
9
9
 
10
- const props = defineProps<{
10
+ const props = withDefaults(defineProps<{
11
11
  tag?: Component | string
12
12
  size?: Size
13
13
  type?: Type
@@ -23,8 +23,11 @@ const props = defineProps<{
23
23
  loading?: boolean
24
24
  disabled?: boolean
25
25
  tooltip?: string | Tooltip
26
+ dropdownAlign?: 'left' | 'right'
26
27
  options: DropdownSection[]
27
- }>()
28
+ }>(), {
29
+ dropdownAlign: 'left'
30
+ })
28
31
 
29
32
  const container = ref<any>(null)
30
33
 
@@ -40,7 +43,7 @@ async function onOpen() {
40
43
  </script>
41
44
 
42
45
  <template>
43
- <div class="SActionMenu" :class="[block]" ref="container">
46
+ <div class="SActionMenu" :class="[{ block }, dropdownAlign]" ref="container">
44
47
  <div class="button">
45
48
  <SButton
46
49
  :tag
@@ -75,7 +78,6 @@ async function onOpen() {
75
78
 
76
79
  .dropdown {
77
80
  position: absolute;
78
- left: 0;
79
81
  z-index: var(--z-index-dropdown);
80
82
 
81
83
  &.top { bottom: calc(100% + 8px); }
@@ -85,4 +87,7 @@ async function onOpen() {
85
87
  .SActionMenu.block {
86
88
  display: block;
87
89
  }
90
+
91
+ .SActionMenu.left .dropdown { left: 0; }
92
+ .SActionMenu.right .dropdown { right: 0; }
88
93
  </style>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@globalbrain/sefirot",
3
3
  "type": "module",
4
- "version": "4.27.0",
4
+ "version": "4.28.0",
5
5
  "packageManager": "pnpm@9.15.4",
6
6
  "description": "Vue Components for Global Brain Design System.",
7
7
  "author": "Kia Ishii <ka.ishii@globalbrains.com>",