webcake-ui-kit 1.2.17 → 1.2.19
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/package.json +1 -1
- package/src/components/dropdown/Dropdown.vue +4 -2
- package/src/components/input-number/input-number.css +1 -0
- package/src/components/menu/Menu.vue +6 -1
- package/src/components/select/Select.vue +8 -2
- package/src/components/table/TableWrapper.vue +3 -2
- package/src/components/table/body/TableBody.vue +9 -4
- package/src/components/textarea/Textarea.vue +2 -2
- package/src/components/toggle/toggle.css +4 -4
- package/src/icons/Popup.vue +32 -0
- package/src/icons/index.js +1 -0
- package/src/styles/.omc/state/agent-replay-645326b7-372b-463d-ab45-0adaafe31a51.jsonl +2 -0
- package/src/styles/.omc/state/subagent-tracking.json +7 -0
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
<span
|
|
19
19
|
:ref="triggerRef"
|
|
20
20
|
class="ui-dropdown__anchor"
|
|
21
|
-
@click.stop="triggerHasClick && handleClick()"
|
|
21
|
+
@click.stop="triggerHasClick && handleClick($event)"
|
|
22
22
|
@mouseenter.stop="triggerHasHover && handleMouseEnter()"
|
|
23
23
|
@mouseleave.stop="triggerHasHover && handleMouseLeave()"
|
|
24
24
|
>
|
|
@@ -136,8 +136,10 @@ export default {
|
|
|
136
136
|
this.$emit('change', v)
|
|
137
137
|
this.$emit('update:modelValue', v)
|
|
138
138
|
},
|
|
139
|
-
handleClick() {
|
|
139
|
+
handleClick(e) {
|
|
140
140
|
if (this.disabled) return
|
|
141
|
+
// Don't close when clicking a focusable element inside the trigger (e.g. input, textarea)
|
|
142
|
+
if (this.isOpen && e && e.target && e.target.closest('input, textarea, select, [contenteditable]')) return
|
|
141
143
|
this.onMenuChange(!this.isOpen)
|
|
142
144
|
},
|
|
143
145
|
handleMouseEnter() {
|
|
@@ -198,7 +198,12 @@ export default {
|
|
|
198
198
|
this._kmSetFloatEl(float)
|
|
199
199
|
this._pmAttach(this._triggerEl, float)
|
|
200
200
|
this._coAttach()
|
|
201
|
-
if (this.autoFocus)
|
|
201
|
+
if (this.autoFocus) {
|
|
202
|
+
// Don't steal focus when the trigger itself already holds it (e.g. an input inside the anchor)
|
|
203
|
+
const active = typeof document !== 'undefined' && document.activeElement
|
|
204
|
+
const triggerHasFocus = active && this._triggerEl && this._triggerEl.contains(active)
|
|
205
|
+
if (!triggerHasFocus) this._fmFocus(float)
|
|
206
|
+
}
|
|
202
207
|
})
|
|
203
208
|
},
|
|
204
209
|
handleClose() {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<Menu
|
|
3
3
|
:open="isOpen"
|
|
4
4
|
:disabled="disabled || loading"
|
|
5
|
-
placement="
|
|
5
|
+
:placement="placement"
|
|
6
6
|
:offset="4"
|
|
7
7
|
:anchor-width="dropdownMatchSelectWidth"
|
|
8
8
|
:close-on-select="false"
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
@close="onMenuClose"
|
|
11
11
|
:overlay-class-name="overlayClassName"
|
|
12
12
|
:overlay-style="overlayStyle"
|
|
13
|
+
:width="overlayWidth"
|
|
13
14
|
>
|
|
14
15
|
<template #trigger="{ toggle, isOpen: open, attrs, triggerRef }">
|
|
15
16
|
<div
|
|
@@ -218,7 +219,12 @@ export default {
|
|
|
218
219
|
},
|
|
219
220
|
overlayClassName: { type: [String, Array, Object], default: null },
|
|
220
221
|
overlayStyle: { type: [Object, Array], default: null },
|
|
221
|
-
dropdownMatchSelectWidth: { type: Boolean, default: true }
|
|
222
|
+
dropdownMatchSelectWidth: { type: Boolean, default: true },
|
|
223
|
+
overlayWidth: { type: [String, Number], default: null },
|
|
224
|
+
placement: {
|
|
225
|
+
type: String,
|
|
226
|
+
default: 'bottom-start'
|
|
227
|
+
}
|
|
222
228
|
},
|
|
223
229
|
|
|
224
230
|
emits: ['change', 'update:modelValue'],
|
|
@@ -124,7 +124,7 @@ export default {
|
|
|
124
124
|
style = { overflow: 'auto hidden' }
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
if (this.minHeight
|
|
127
|
+
if (this.minHeight) {
|
|
128
128
|
style.minHeight = `${this.toCssSize(this.minHeight)}`
|
|
129
129
|
}
|
|
130
130
|
return style
|
|
@@ -158,8 +158,9 @@ export default {
|
|
|
158
158
|
|
|
159
159
|
var style = {
|
|
160
160
|
overflowY: 'auto',
|
|
161
|
+
overflowX: 'hidden',
|
|
161
162
|
maxHeight: `calc(${this.toCssSize(this.scroll.y)} - ${deduct})`,
|
|
162
|
-
minHeight: this.minHeight
|
|
163
|
+
minHeight: this.minHeight ? `calc(${this.toCssSize(this.minHeight)} - ${deduct})` : undefined
|
|
163
164
|
}
|
|
164
165
|
if (this.hasScrollX) {
|
|
165
166
|
style.overflowX = 'auto'
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
<template v-if="isEmpty">
|
|
10
10
|
<tr class="ui-table__row">
|
|
11
|
-
<td colspan="100">
|
|
11
|
+
<td colspan="100" :style="{ borderBottom: 'none' }">
|
|
12
12
|
<div class="ui-table__row-empty ui-table__empty" :style="emptyStyle">
|
|
13
13
|
<slot name="empty">
|
|
14
14
|
<div class="wrapper-img">
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
import Sortable from 'sortablejs'
|
|
42
42
|
import TableRow from './TableRow.vue'
|
|
43
43
|
import MeasureCell from './MeasureCell.vue'
|
|
44
|
+
import { toCssSize } from '../../../utils/common'
|
|
44
45
|
|
|
45
46
|
export default {
|
|
46
47
|
name: 'TableBody',
|
|
@@ -73,10 +74,14 @@ export default {
|
|
|
73
74
|
emptyText() {
|
|
74
75
|
return this.tableContext.data.emptyText || 'Không có dữ liệu'
|
|
75
76
|
},
|
|
77
|
+
|
|
78
|
+
minHeight: function () {
|
|
79
|
+
return this.tableContext.layout.height
|
|
80
|
+
},
|
|
81
|
+
|
|
76
82
|
emptyStyle() {
|
|
77
|
-
const {
|
|
78
|
-
|
|
79
|
-
return { minHeight: `calc(${height}px - ${rowHeight}px)` }
|
|
83
|
+
const { rowHeight } = this.tableContext.layout
|
|
84
|
+
return { minHeight: `calc(${toCssSize(this.minHeight)} - ${toCssSize(rowHeight)})` }
|
|
80
85
|
}
|
|
81
86
|
},
|
|
82
87
|
beforeUnmount: function () {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
@focus="onFocus"
|
|
26
26
|
@blur="onBlur"
|
|
27
27
|
></textarea>
|
|
28
|
-
<span v-if="
|
|
28
|
+
<span v-if="showCount" class="ui-textarea__counter"
|
|
29
29
|
>{{ charCount }}<template v-if="maxLength !== undefined"> / {{ maxLength }}</template></span
|
|
30
30
|
>
|
|
31
31
|
</span>
|
|
@@ -68,7 +68,7 @@ export default {
|
|
|
68
68
|
return String(this.currentValue).length
|
|
69
69
|
},
|
|
70
70
|
showCounter() {
|
|
71
|
-
return this.showCount
|
|
71
|
+
return this.showCount || this.maxLength !== undefined
|
|
72
72
|
}
|
|
73
73
|
},
|
|
74
74
|
watch: {
|
|
@@ -184,22 +184,22 @@
|
|
|
184
184
|
padding: var(--spacing-3xs);
|
|
185
185
|
}
|
|
186
186
|
.ui-toggle--icon-only.ui-toggle--xs {
|
|
187
|
-
|
|
187
|
+
width: 28px;
|
|
188
188
|
height: 28px;
|
|
189
189
|
padding: var(--spacing-6) var(--spacing-6) var(--spacing-6) var(--spacing-xs);
|
|
190
190
|
}
|
|
191
191
|
.ui-toggle--icon-only.ui-toggle--sm {
|
|
192
|
-
|
|
192
|
+
width: 32px;
|
|
193
193
|
height: 32px;
|
|
194
194
|
padding: var(--spacing-6);
|
|
195
195
|
}
|
|
196
196
|
.ui-toggle--icon-only.ui-toggle--md {
|
|
197
|
-
|
|
197
|
+
width: 36px;
|
|
198
198
|
height: 36px;
|
|
199
199
|
padding: var(--spacing-xs);
|
|
200
200
|
}
|
|
201
201
|
.ui-toggle--icon-only.ui-toggle--lg {
|
|
202
|
-
|
|
202
|
+
width: 40px;
|
|
203
203
|
height: 40px;
|
|
204
204
|
padding: var(--spacing-10);
|
|
205
205
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<BaseIcon v-bind="$attrs" v-on="listeners">
|
|
3
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
|
|
4
|
+
<path
|
|
5
|
+
d="M11.625 2.125C12.1082 2.125 12.5 2.51675 12.5 3C12.5 3.48325 12.1082 3.875 11.625 3.875H5C4.37868 3.875 3.875 4.37868 3.875 5V19C3.875 19.6213 4.37868 20.125 5 20.125H19C19.6213 20.125 20.125 19.6213 20.125 19V11.875C20.125 11.3918 20.5168 11 21 11C21.4832 11 21.875 11.3918 21.875 11.875V19C21.875 20.5878 20.5878 21.875 19 21.875H5C3.41218 21.875 2.125 20.5878 2.125 19V5C2.125 3.41218 3.41218 2.125 5 2.125H11.625Z"
|
|
6
|
+
fill="currentColor"
|
|
7
|
+
/>
|
|
8
|
+
<path
|
|
9
|
+
fill-rule="evenodd"
|
|
10
|
+
clip-rule="evenodd"
|
|
11
|
+
d="M17.875 2.125C20.0151 2.125 21.75 3.8599 21.75 6C21.75 8.1401 20.0151 9.875 17.875 9.875C15.7349 9.875 14 8.1401 14 6C14 3.8599 15.7349 2.125 17.875 2.125ZM17.875 3.875C16.7014 3.875 15.75 4.8264 15.75 6C15.75 6.45107 15.8912 6.86887 16.1309 7.21289C16.1531 7.24478 16.1773 7.27508 16.2012 7.30566C16.3675 7.51859 16.573 7.6982 16.8076 7.83496C16.8234 7.84415 16.8385 7.85449 16.8545 7.86328C17.1575 8.02958 17.505 8.125 17.875 8.125C19.0486 8.125 20 7.1736 20 6C20 4.8264 19.0486 3.875 17.875 3.875Z"
|
|
12
|
+
fill="currentColor"
|
|
13
|
+
/>
|
|
14
|
+
</svg>
|
|
15
|
+
</BaseIcon>
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<script>
|
|
19
|
+
import BaseIcon from './BaseIcon.vue'
|
|
20
|
+
|
|
21
|
+
export default {
|
|
22
|
+
name: 'Popup',
|
|
23
|
+
components: { BaseIcon },
|
|
24
|
+
inheritAttrs: false,
|
|
25
|
+
emits: [],
|
|
26
|
+
computed: {
|
|
27
|
+
listeners() {
|
|
28
|
+
return this.$listeners || {}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
</script>
|
package/src/icons/index.js
CHANGED
|
@@ -1774,5 +1774,6 @@ export { default as WkiSkewWidth } from './SkewWidth.vue'
|
|
|
1774
1774
|
export { default as WkiStrokeLine } from './StrokeLine.vue'
|
|
1775
1775
|
export { default as WkiTopline } from './Topline.vue'
|
|
1776
1776
|
export { default as WkiLettersSpacing } from './LettersSpacing.vue'
|
|
1777
|
+
export { default as WkiPopup } from './Popup.vue'
|
|
1777
1778
|
|
|
1778
1779
|
// --- AUTO-GENERATED LUCIDE EXPORTS END ---
|