@globalbrain/sefirot 2.1.1 → 2.1.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.
|
@@ -17,15 +17,14 @@
|
|
|
17
17
|
<script setup lang="ts">
|
|
18
18
|
import { computed, PropType } from 'vue'
|
|
19
19
|
|
|
20
|
-
interface ButtonGroupItem {
|
|
20
|
+
export interface ButtonGroupItem {
|
|
21
21
|
label: string
|
|
22
22
|
value: string
|
|
23
|
-
mode
|
|
23
|
+
mode?: Mode
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
type Mode = 'neutral' | 'info' | 'success' | 'warning' | 'danger'
|
|
27
|
-
type Size = 'mini' | 'small' | 'medium' | 'large' | 'jumbo'
|
|
28
|
-
|
|
26
|
+
export type Mode = 'neutral' | 'info' | 'success' | 'warning' | 'danger'
|
|
27
|
+
export type Size = 'mini' | 'small' | 'medium' | 'large' | 'jumbo'
|
|
29
28
|
|
|
30
29
|
const props = defineProps({
|
|
31
30
|
items: { type: Array as PropType<ButtonGroupItem[]>, required: true },
|
|
@@ -122,30 +122,39 @@ function getValue(e: Event | FocusEvent | KeyboardEvent): string | null {
|
|
|
122
122
|
|
|
123
123
|
<style lang="postcss" scoped>
|
|
124
124
|
.SInputText.mini {
|
|
125
|
-
.
|
|
126
|
-
|
|
125
|
+
.box {
|
|
126
|
+
padding: 0 8px;
|
|
127
127
|
min-height: 32px;
|
|
128
|
-
|
|
129
|
-
font-size: 14px;
|
|
128
|
+
}
|
|
130
129
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
130
|
+
.value,
|
|
131
|
+
.input,
|
|
132
|
+
.display {
|
|
133
|
+
min-height: 30px;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.input,
|
|
137
|
+
.display {
|
|
138
|
+
padding: 3px 0;
|
|
139
|
+
letter-spacing: 0;
|
|
140
|
+
line-height: 24px;
|
|
141
|
+
font-size: 14px;
|
|
134
142
|
}
|
|
135
143
|
|
|
136
144
|
.icon {
|
|
137
|
-
|
|
138
|
-
|
|
145
|
+
width: 22px;
|
|
146
|
+
height: 30px;
|
|
139
147
|
}
|
|
140
148
|
|
|
141
149
|
.icon-svg {
|
|
142
|
-
width:
|
|
143
|
-
height:
|
|
150
|
+
width: 16px;
|
|
151
|
+
height: 16px;
|
|
144
152
|
}
|
|
145
153
|
}
|
|
146
154
|
|
|
147
155
|
.SInputText.small {
|
|
148
156
|
.box {
|
|
157
|
+
padding: 0 12px;
|
|
149
158
|
min-height: 40px;
|
|
150
159
|
}
|
|
151
160
|
|
|
@@ -155,10 +164,6 @@ function getValue(e: Event | FocusEvent | KeyboardEvent): string | null {
|
|
|
155
164
|
min-height: 38px;
|
|
156
165
|
}
|
|
157
166
|
|
|
158
|
-
.box {
|
|
159
|
-
padding: 0 12px;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
167
|
.input,
|
|
163
168
|
.display {
|
|
164
169
|
padding: 5px 0;
|
|
@@ -179,25 +184,33 @@ function getValue(e: Event | FocusEvent | KeyboardEvent): string | null {
|
|
|
179
184
|
}
|
|
180
185
|
|
|
181
186
|
.SInputText.medium {
|
|
182
|
-
.
|
|
183
|
-
|
|
187
|
+
.box {
|
|
188
|
+
padding: 0 12px;
|
|
184
189
|
min-height: 48px;
|
|
185
|
-
|
|
186
|
-
font-size: 16px;
|
|
190
|
+
}
|
|
187
191
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
192
|
+
.value,
|
|
193
|
+
.input,
|
|
194
|
+
.display {
|
|
195
|
+
min-height: 46px;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.input,
|
|
199
|
+
.display {
|
|
200
|
+
padding: 11px 0;
|
|
201
|
+
letter-spacing: 0;
|
|
202
|
+
line-height: 24px;
|
|
203
|
+
font-size: 16px;
|
|
191
204
|
}
|
|
192
205
|
|
|
193
206
|
.icon {
|
|
194
|
-
|
|
195
|
-
|
|
207
|
+
width: 28px;
|
|
208
|
+
height: 46px;
|
|
196
209
|
}
|
|
197
210
|
|
|
198
211
|
.icon-svg {
|
|
199
|
-
width:
|
|
200
|
-
height:
|
|
212
|
+
width: 18px;
|
|
213
|
+
height: 18px;
|
|
201
214
|
}
|
|
202
215
|
}
|
|
203
216
|
|
|
@@ -16,12 +16,12 @@ const emit = defineEmits<{
|
|
|
16
16
|
|
|
17
17
|
const el = ref<any>(null)
|
|
18
18
|
|
|
19
|
-
function onClick(e:
|
|
19
|
+
function onClick(e: MouseEvent) {
|
|
20
20
|
if (!props.closable) {
|
|
21
21
|
return
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
if (e.target === el.value) {
|
|
24
|
+
if (e.button === 0 && e.target === el.value) {
|
|
25
25
|
emit('close')
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -30,7 +30,7 @@ function onClick(e: any) {
|
|
|
30
30
|
<template>
|
|
31
31
|
<Teleport to="#sefirot-modals">
|
|
32
32
|
<transition name="fade">
|
|
33
|
-
<div v-if="open" class="SModal" ref="el" @
|
|
33
|
+
<div v-if="open" class="SModal" ref="el" @mousedown="onClick">
|
|
34
34
|
<slot />
|
|
35
35
|
</div>
|
|
36
36
|
</transition>
|
package/package.json
CHANGED
package/lib/types/Utils.ts
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export type SyntheticEvent<E extends Event, T extends Element> = E & { target: T }
|
|
2
|
-
export type SyntheticInputEvent<T extends Element = HTMLInputElement> = SyntheticEvent<InputEvent, T>
|
|
3
|
-
export type SyntheticMouseEvent<T extends Element = HTMLElement> = SyntheticEvent<MouseEvent, T>
|