@krometra/ui-kit 0.4.0 → 0.4.1
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/README.md +6 -1
- package/dist/ui-kit.css +1 -1
- package/dist/ui-kit.js +9 -6
- package/dist/ui-kit.umd.cjs +1 -1
- package/package.json +1 -1
- package/src/components/KGantt.vue +10 -6
package/package.json
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* tone — 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'neutral'
|
|
12
12
|
* muted — завершённая или неактуальная задача, полоса приглушена
|
|
13
13
|
* segments — несколько отрезков в одной строке (работа с перерывами)
|
|
14
|
+
* dayWidth — минимальная ширина дня в px; свободное место колонки дней делят поровну
|
|
14
15
|
*
|
|
15
16
|
* <KGantt :items="tasks" :groups="people" from="2026-10-19" to="2026-11-06"
|
|
16
17
|
* @item-click="open">
|
|
@@ -102,13 +103,16 @@ const rows = computed(() => {
|
|
|
102
103
|
const gridStyle = computed(() => ({
|
|
103
104
|
'--k-gantt-day-w': `${props.dayWidth}px`,
|
|
104
105
|
'--k-gantt-label-w': props.labelWidth,
|
|
105
|
-
gridTemplateColumns: `var(--k-gantt-label-w) repeat(${days.value.length}, var(--k-gantt-day-w))`,
|
|
106
|
+
gridTemplateColumns: `var(--k-gantt-label-w) repeat(${days.value.length}, minmax(var(--k-gantt-day-w), 1fr))`,
|
|
106
107
|
}))
|
|
107
108
|
|
|
108
|
-
const barStyle = (bar) =>
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
})
|
|
109
|
+
const barStyle = (bar) => {
|
|
110
|
+
const n = days.value.length
|
|
111
|
+
return {
|
|
112
|
+
left: `calc(${(bar.first / n) * 100}% + 3px)`,
|
|
113
|
+
width: `calc(${((bar.last - bar.first + 1) / n) * 100}% - 6px)`,
|
|
114
|
+
}
|
|
115
|
+
}
|
|
112
116
|
|
|
113
117
|
const dayLines = computed(() => {
|
|
114
118
|
const marks = []
|
|
@@ -218,7 +222,7 @@ function open(item) {
|
|
|
218
222
|
overflow: hidden;
|
|
219
223
|
}
|
|
220
224
|
.k-gantt__scroll { overflow: auto; max-height: inherit; }
|
|
221
|
-
.k-gantt__grid { display: grid; grid-auto-rows: minmax(2.25rem, auto); position: relative; width: max-content;
|
|
225
|
+
.k-gantt__grid { display: grid; grid-auto-rows: minmax(2.25rem, auto); position: relative; min-width: max-content; }
|
|
222
226
|
|
|
223
227
|
.k-gantt__corner,
|
|
224
228
|
.k-gantt__day {
|