webcake-ui-kit 1.1.28 → 1.1.29
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/alert/Alert.vue +3 -2
- package/src/components/alert/alert.css +29 -3
- package/src/components/dropdown/Dropdown.vue +14 -2
- package/src/components/dropdown/DropdownMenuItems.vue +7 -3
- package/src/components/dropdown/dropdown-menu-items.css +4 -11
- package/src/components/input/input.css +2 -2
- package/src/components/menu/Menu.vue +7 -2
- package/src/components/select/Select.vue +5 -1
- package/src/components/select/select.css +13 -7
- package/src/components/select-option/SelectOption.vue +6 -0
- package/src/components/select-option/select_option.css +20 -0
- package/src/components/table/Table.vue +424 -91
- package/src/components/table/table.css +162 -5
- package/src/components/tooltip/Tooltip.vue +6 -3
- package/src/floating/click-outside-mixin.js +21 -1
- package/src/styles/color_general.css +20 -12
- package/src/styles/raw_colors.css +4 -4
- package/src/styles/shadow.css +3 -0
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
width: 100%;
|
|
3
3
|
font-family: var(--font-family-body);
|
|
4
4
|
color: var(--primary-fg);
|
|
5
|
+
border: 1px solid var(--border-primary);
|
|
6
|
+
border-radius: var(--rounded-2xl);
|
|
7
|
+
overflow: hidden;
|
|
5
8
|
}
|
|
6
9
|
|
|
7
10
|
.ui-table__table {
|
|
@@ -10,6 +13,11 @@
|
|
|
10
13
|
border-spacing: 0;
|
|
11
14
|
}
|
|
12
15
|
|
|
16
|
+
/* drag col is always 36px — the header cell is empty so it has no content to size it */
|
|
17
|
+
.ui-table__col--drag {
|
|
18
|
+
width: 1%;
|
|
19
|
+
}
|
|
20
|
+
|
|
13
21
|
.ui-table__col--selection {
|
|
14
22
|
width: 1%;
|
|
15
23
|
}
|
|
@@ -40,17 +48,139 @@
|
|
|
40
48
|
text-overflow: ellipsis;
|
|
41
49
|
}
|
|
42
50
|
|
|
51
|
+
.ui-table__cell--drag {
|
|
52
|
+
width: 1%;
|
|
53
|
+
white-space: nowrap;
|
|
54
|
+
text-align: center;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.ui-table__td.ui-table__cell--drag {
|
|
58
|
+
cursor: grab;
|
|
59
|
+
color: var(--muted-fg);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.ui-table__td.ui-table__cell--drag:active {
|
|
63
|
+
cursor: grabbing;
|
|
64
|
+
}
|
|
65
|
+
|
|
43
66
|
.ui-table__cell--selection {
|
|
44
67
|
width: 1%;
|
|
45
68
|
white-space: nowrap;
|
|
46
69
|
text-align: center;
|
|
47
70
|
}
|
|
48
71
|
|
|
72
|
+
.ui-table__cell--fixed-left,
|
|
73
|
+
.ui-table__cell--fixed-right {
|
|
74
|
+
position: sticky;
|
|
75
|
+
z-index: 1;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@keyframes ui-table-sticky-shadow {
|
|
79
|
+
to {
|
|
80
|
+
opacity: 1;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@keyframes ui-table-sticky-shadow-right {
|
|
85
|
+
to {
|
|
86
|
+
opacity: 0;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.ui-table__cell--fixed-left-last::after {
|
|
91
|
+
content: '';
|
|
92
|
+
position: absolute;
|
|
93
|
+
top: 0;
|
|
94
|
+
right: -6px;
|
|
95
|
+
bottom: 0;
|
|
96
|
+
width: 6px;
|
|
97
|
+
box-shadow: inset var(--shadow-fixed-column-left);
|
|
98
|
+
pointer-events: none;
|
|
99
|
+
opacity: 0;
|
|
100
|
+
animation: ui-table-sticky-shadow linear both;
|
|
101
|
+
animation-timeline: scroll(nearest x);
|
|
102
|
+
animation-range: 0px 1px;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.ui-table__cell--fixed-right-first::after {
|
|
106
|
+
content: '';
|
|
107
|
+
position: absolute;
|
|
108
|
+
top: 0;
|
|
109
|
+
left: -6px;
|
|
110
|
+
bottom: 0;
|
|
111
|
+
width: 6px;
|
|
112
|
+
box-shadow: inset var(--shadow-fixed-column-right);
|
|
113
|
+
pointer-events: none;
|
|
114
|
+
animation: ui-table-sticky-shadow-right linear both;
|
|
115
|
+
animation-timeline: scroll(nearest x);
|
|
116
|
+
animation-range: calc(100% - 2px) 100%;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/* Sticky cells need an opaque background so content doesn't bleed through. */
|
|
120
|
+
.ui-table__th.ui-table__cell--fixed-left,
|
|
121
|
+
.ui-table__th.ui-table__cell--fixed-right {
|
|
122
|
+
background: var(--secondary-bg);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.ui-table__td.ui-table__cell--fixed-left,
|
|
126
|
+
.ui-table__td.ui-table__cell--fixed-right {
|
|
127
|
+
background: var(--primary-bg);
|
|
128
|
+
transition: background-color 0.12s ease;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.ui-table__row--body:hover .ui-table__td.ui-table__cell--fixed-left,
|
|
132
|
+
.ui-table__row--body:hover .ui-table__td.ui-table__cell--fixed-right {
|
|
133
|
+
background: var(--accent-bg);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.ui-table__row--selected .ui-table__td.ui-table__cell--fixed-left,
|
|
137
|
+
.ui-table__row--selected .ui-table__td.ui-table__cell--fixed-right {
|
|
138
|
+
background: var(--secondary-bg);
|
|
139
|
+
}
|
|
140
|
+
|
|
49
141
|
/* ---------- Header ---------- */
|
|
50
142
|
.ui-table__th {
|
|
51
143
|
background: var(--secondary-bg);
|
|
52
144
|
font-weight: var(--paragraph-medium-font-weight);
|
|
53
145
|
white-space: nowrap;
|
|
146
|
+
padding: 0;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.ui-table__th-inner-wrap {
|
|
150
|
+
padding: var(--spacing-xs);
|
|
151
|
+
position: relative;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.ui-table__resize-handle {
|
|
155
|
+
position: absolute;
|
|
156
|
+
top: 50%;
|
|
157
|
+
right: -4px;
|
|
158
|
+
width: 8px;
|
|
159
|
+
height: 50%;
|
|
160
|
+
transform: translateY(-50%);
|
|
161
|
+
cursor: col-resize;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.ui-table__resize-handle--left {
|
|
165
|
+
right: auto;
|
|
166
|
+
left: -4px;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.ui-table__resize-handle::before {
|
|
170
|
+
content: '';
|
|
171
|
+
position: absolute;
|
|
172
|
+
top: 0;
|
|
173
|
+
bottom: 0;
|
|
174
|
+
left: 50%;
|
|
175
|
+
width: 1px;
|
|
176
|
+
transform: translateX(-50%);
|
|
177
|
+
background: var(--border-focus);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.ui-table__resize-handle:hover::before,
|
|
181
|
+
.ui-table__resize-handle.resizing::before {
|
|
182
|
+
width: 2px;
|
|
183
|
+
background: var(--border-focus);
|
|
54
184
|
}
|
|
55
185
|
|
|
56
186
|
.ui-table__th-inner {
|
|
@@ -65,7 +195,8 @@
|
|
|
65
195
|
user-select: none;
|
|
66
196
|
}
|
|
67
197
|
|
|
68
|
-
.ui-table__th--sortable:hover
|
|
198
|
+
.ui-table__th--sortable:hover,
|
|
199
|
+
.ui-table__th:has(:is(.ui-table__resize-handle, .ui-table__resize-handle--left)):hover {
|
|
69
200
|
background: var(--accent-2);
|
|
70
201
|
}
|
|
71
202
|
|
|
@@ -103,6 +234,18 @@
|
|
|
103
234
|
transition: background-color 0.12s ease;
|
|
104
235
|
}
|
|
105
236
|
|
|
237
|
+
.ui-table__row--dragging .ui-table__td {
|
|
238
|
+
opacity: 0.35;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.ui-table__row--drag-over .ui-table__td {
|
|
242
|
+
border-top: 2px solid var(--border-focus);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.ui-table__row--drag-preview .ui-table__td {
|
|
246
|
+
background: var(--accent-bg);
|
|
247
|
+
}
|
|
248
|
+
|
|
106
249
|
.ui-table__row--body:hover .ui-table__td {
|
|
107
250
|
background: var(--accent-bg);
|
|
108
251
|
}
|
|
@@ -173,20 +316,34 @@
|
|
|
173
316
|
|
|
174
317
|
.ui-table__body::-webkit-scrollbar {
|
|
175
318
|
width: 10px;
|
|
319
|
+
height: 10px;
|
|
176
320
|
}
|
|
177
321
|
|
|
178
|
-
.ui-table__body::-webkit-scrollbar-track {
|
|
322
|
+
.ui-table__body::-webkit-scrollbar-track:vertical {
|
|
179
323
|
border-left: 1px solid var(--border-primary);
|
|
180
324
|
}
|
|
181
325
|
|
|
326
|
+
.ui-table__body::-webkit-scrollbar-track:horizontal {
|
|
327
|
+
border-top: 1px solid var(--border-primary);
|
|
328
|
+
}
|
|
329
|
+
|
|
182
330
|
.ui-table__body::-webkit-scrollbar-thumb {
|
|
183
331
|
background: var(--border-primary);
|
|
184
332
|
border-radius: 3px;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
.ui-table__body::-webkit-scrollbar-thumb:vertical {
|
|
185
336
|
border-left: 2px solid transparent;
|
|
186
337
|
border-right: 1px solid transparent;
|
|
187
338
|
background-clip: content-box;
|
|
188
339
|
}
|
|
189
340
|
|
|
341
|
+
.ui-table__body::-webkit-scrollbar-thumb:horizontal {
|
|
342
|
+
border-top: 2px solid transparent;
|
|
343
|
+
border-bottom: 1px solid transparent;
|
|
344
|
+
background-clip: content-box;
|
|
345
|
+
}
|
|
346
|
+
|
|
190
347
|
.ui-table--scroll-y .ui-table__head {
|
|
191
348
|
overflow: hidden;
|
|
192
349
|
}
|
|
@@ -196,11 +353,11 @@
|
|
|
196
353
|
border: none;
|
|
197
354
|
background: var(--secondary-bg);
|
|
198
355
|
border-bottom: 1px solid var(--border-primary);
|
|
199
|
-
box-sizing: border-box;
|
|
200
356
|
}
|
|
201
357
|
|
|
202
|
-
.ui-table--scroll-y .ui-table__cell--selection
|
|
203
|
-
|
|
358
|
+
.ui-table--scroll-y .ui-table__cell--selection,
|
|
359
|
+
.ui-table--scroll-y .ui-table__cell--drag {
|
|
360
|
+
width: 36px;
|
|
204
361
|
}
|
|
205
362
|
|
|
206
363
|
/* ---------- Virtual scroll spacers ---------- */
|
|
@@ -17,9 +17,10 @@
|
|
|
17
17
|
'ui-tooltip__content',
|
|
18
18
|
`ui-tooltip__content--${color}`,
|
|
19
19
|
`ui-tooltip__content--${side}`,
|
|
20
|
-
hasMaxWidth && 'ui-tooltip__content--wrap'
|
|
20
|
+
hasMaxWidth && 'ui-tooltip__content--wrap',
|
|
21
|
+
overlayClassName
|
|
21
22
|
]"
|
|
22
|
-
:style="tooltipStyle"
|
|
23
|
+
:style="overlayStyle ? [tooltipStyle, overlayStyle] : tooltipStyle"
|
|
23
24
|
role="tooltip"
|
|
24
25
|
>
|
|
25
26
|
<span class="ui-tooltip__text">
|
|
@@ -52,7 +53,9 @@ export default {
|
|
|
52
53
|
default: 'default',
|
|
53
54
|
validator: v => ['default', 'brand', 'destructive'].includes(v)
|
|
54
55
|
},
|
|
55
|
-
arrow: { type: Boolean, default: true }
|
|
56
|
+
arrow: { type: Boolean, default: true },
|
|
57
|
+
overlayClassName: { type: [String, Array, Object], default: null },
|
|
58
|
+
overlayStyle: { type: [Object, Array], default: null }
|
|
56
59
|
},
|
|
57
60
|
emits: [],
|
|
58
61
|
data() {
|
|
@@ -12,6 +12,24 @@ export default {
|
|
|
12
12
|
this._coTriggerEl = trigger
|
|
13
13
|
this._coFloatEl = floating
|
|
14
14
|
},
|
|
15
|
+
// Returns true if `target` is inside a portal-hosted floating panel whose
|
|
16
|
+
// trigger element lives inside `myFloat`. This covers the case where a nested
|
|
17
|
+
// component (e.g. WkSelect inside a WkDropdown overlay) portals its own menu
|
|
18
|
+
// to #wk-portal-root — the nested panel is a sibling in the DOM, not a
|
|
19
|
+
// descendant of myFloat, so a plain `contains()` check misses it.
|
|
20
|
+
_coIsInsideDescendantPortal(target, myFloat) {
|
|
21
|
+
if (!myFloat || typeof document === 'undefined') return false
|
|
22
|
+
const portalRoot = document.querySelector('[data-wk-portal-root]')
|
|
23
|
+
if (!portalRoot || !portalRoot.contains(target)) return false
|
|
24
|
+
const floatingEls = portalRoot.querySelectorAll('[id^="wk-menu-"]')
|
|
25
|
+
for (let i = 0; i < floatingEls.length; i++) {
|
|
26
|
+
const fp = floatingEls[i]
|
|
27
|
+
if (!fp.contains(target)) continue
|
|
28
|
+
const trig = fp._wkTrigger
|
|
29
|
+
if (trig && myFloat.contains(trig)) return true
|
|
30
|
+
}
|
|
31
|
+
return false
|
|
32
|
+
},
|
|
15
33
|
_coAttach() {
|
|
16
34
|
if (typeof document === 'undefined' || this.coAttached) return
|
|
17
35
|
this._coHandler = e => {
|
|
@@ -23,7 +41,9 @@ export default {
|
|
|
23
41
|
trigger && (path.indexOf(trigger) !== -1 || (trigger.contains && trigger.contains(target)))
|
|
24
42
|
const insideFloat =
|
|
25
43
|
floating && (path.indexOf(floating) !== -1 || (floating.contains && floating.contains(target)))
|
|
26
|
-
if (!insideTrigger && !insideFloat
|
|
44
|
+
if (!insideTrigger && !insideFloat && !this._coIsInsideDescendantPortal(target, floating)) {
|
|
45
|
+
this._coOnOutside(e)
|
|
46
|
+
}
|
|
27
47
|
}
|
|
28
48
|
document.addEventListener('pointerdown', this._coHandler, true)
|
|
29
49
|
this.coAttached = true
|
|
@@ -18,6 +18,9 @@
|
|
|
18
18
|
--primary-brand-fg: var(--color-brand-shades-600);
|
|
19
19
|
--inverse-fg: var(--color-white-alpha-100);
|
|
20
20
|
--destructive: var(--color-red-600);
|
|
21
|
+
--positive: var(--color-emerald-600);
|
|
22
|
+
--warning: var(--color-amber-600);
|
|
23
|
+
--infor: var(--color-blue-600);
|
|
21
24
|
--destructive-inverse-fg: var(--color-white-alpha-100);
|
|
22
25
|
--border-primary: var(--color-brand-neutrals-200);
|
|
23
26
|
--border-secondary: var(--color-brand-neutrals-100);
|
|
@@ -28,19 +31,20 @@
|
|
|
28
31
|
--primary-hover: var(--color-brand-neutrals-50);
|
|
29
32
|
--secondary-hover: var(--color-brand-neutrals-50);
|
|
30
33
|
--primary-brand-hover: var(--color-brand-shades-500);
|
|
34
|
+
--destructive-text: var(--color-red-600);
|
|
31
35
|
--destructive-hover: var(--color-red-500);
|
|
32
36
|
--destructive-subtle: var(--color-red-50);
|
|
33
37
|
--destructive-border: var(--color-red-500);
|
|
34
38
|
--destructive-border-subtle: var(--color-red-200);
|
|
35
|
-
--
|
|
36
|
-
--
|
|
37
|
-
--
|
|
38
|
-
--warning-
|
|
39
|
-
--warning-
|
|
39
|
+
--positive-subtle: var(--color-emerald-50);
|
|
40
|
+
--positive-border: var(--color-emerald-500);
|
|
41
|
+
--positive-border-subtle: var(--color-emerald-200);
|
|
42
|
+
--warning-subtle: var(--color-amber-50);
|
|
43
|
+
--warning-border: var(--color-amber-500);
|
|
44
|
+
--warning-border-subtle: var(--color-amber-200);
|
|
40
45
|
--infor-subtle: var(--color-blue-50);
|
|
41
46
|
--infor-border: var(--color-blue-500);
|
|
42
47
|
--infor-border-subtle: var(--color-blue-200);
|
|
43
|
-
--infor-text: var(--color-blue-800);
|
|
44
48
|
--ghost: var(--color-white-alpha-001);
|
|
45
49
|
--ghost-foreground: var(--color-brand-neutrals-700);
|
|
46
50
|
--ghost-hover: var(--color-black-alpha-5);
|
|
@@ -133,6 +137,9 @@
|
|
|
133
137
|
--primary-brand-fg: var(--color-brand-shades-500);
|
|
134
138
|
--inverse-fg: var(--color-white-alpha-100);
|
|
135
139
|
--destructive: #9e4042;
|
|
140
|
+
--positive: var(--color-emerald-400);
|
|
141
|
+
--warning: var(--color-amber-400);
|
|
142
|
+
--infor: var(--color-blue-400);
|
|
136
143
|
--destructive-inverse-fg: var(--color-white-alpha-100);
|
|
137
144
|
--border-primary: var(--color-brand-neutrals-700);
|
|
138
145
|
--border-secondary: var(--color-brand-neutrals-800);
|
|
@@ -143,19 +150,20 @@
|
|
|
143
150
|
--primary-hover: var(--color-brand-neutrals-950);
|
|
144
151
|
--secondary-hover: var(--color-brand-neutrals-900);
|
|
145
152
|
--primary-brand-hover: var(--color-brand-shades-500);
|
|
153
|
+
--destructive-text: var(--color-red-400);
|
|
146
154
|
--destructive-hover: var(--color-red-500);
|
|
147
155
|
--destructive-subtle: var(--color-red-950);
|
|
148
156
|
--destructive-border: var(--color-red-500);
|
|
149
157
|
--destructive-border-subtle: var(--color-red-800);
|
|
150
|
-
--
|
|
151
|
-
--
|
|
152
|
-
--
|
|
153
|
-
--warning-
|
|
154
|
-
--warning-
|
|
158
|
+
--positive-subtle: var(--color-emerald-950);
|
|
159
|
+
--positive-border: var(--color-emerald-500);
|
|
160
|
+
--positive-border-subtle: var(--color-emerald-800);
|
|
161
|
+
--warning-subtle: var(--color-amber-950);
|
|
162
|
+
--warning-border: var(--color-amber-500);
|
|
163
|
+
--warning-border-subtle: var(--color-amber-800);
|
|
155
164
|
--infor-subtle: var(--color-blue-950);
|
|
156
165
|
--infor-border: var(--color-blue-500);
|
|
157
166
|
--infor-border-subtle: var(--color-blue-800);
|
|
158
|
-
--infor-text: var(--color-blue-300);
|
|
159
167
|
--ghost: var(--color-white-alpha-001);
|
|
160
168
|
--ghost-foreground: var(--color-brand-neutrals-200);
|
|
161
169
|
--ghost-hover: var(--color-black-alpha-10);
|
|
@@ -133,10 +133,10 @@
|
|
|
133
133
|
--color-lime-950: #1a2e05;
|
|
134
134
|
|
|
135
135
|
/* ========================= Emerald ========================= */
|
|
136
|
-
--color-emerald-50: #
|
|
137
|
-
--color-emerald-100: #
|
|
138
|
-
--color-emerald-200: #
|
|
139
|
-
--color-emerald-300: #
|
|
136
|
+
--color-emerald-50: #f2fcf8;
|
|
137
|
+
--color-emerald-100: #d5f6e5;
|
|
138
|
+
--color-emerald-200: #afebcf;
|
|
139
|
+
--color-emerald-300: #76dfb5;
|
|
140
140
|
--color-emerald-400: #34d399;
|
|
141
141
|
--color-emerald-500: #10b981;
|
|
142
142
|
--color-emerald-600: #059669;
|
package/src/styles/shadow.css
CHANGED
|
@@ -8,6 +8,9 @@
|
|
|
8
8
|
--shadow-lg: 0px 10px 15px -3px var(--color-black-alpha-10), 0px 4px 6px -4px var(--color-black-alpha-10);
|
|
9
9
|
--shadow-xl: 0px 20px 25px -5px var(--color-black-alpha-10), 0px 8px 10px -6px var(--color-black-alpha-10);
|
|
10
10
|
--shadow-2xl: 0px 25px 50px -12px var(--color-black-alpha-10);
|
|
11
|
+
--shadow-sonner: 0px 4px 12px 0px var(--color-black-alpha-10);
|
|
12
|
+
--shadow-fixed-column-left: 6px 0 6px -4px var(--color-black-alpha-10);
|
|
13
|
+
--shadow-fixed-column-right: -6px 0 6px -4px var(--color-black-alpha-10);
|
|
11
14
|
|
|
12
15
|
--shadow-focus-ring: 0 0 0 3px var(--focus-ring);
|
|
13
16
|
--shadow-focus-ring-error: 0 0 0 3px var(--focus-ring-error);
|