@katlux/toolkit 0.1.0-beta.3 → 0.1.0-beta.33
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/dist/compiled/composables/useDebounce.mjs +11 -0
- package/dist/compiled/composables/useFilterLogic.mjs +170 -0
- package/dist/compiled/composables/usePresetComponent.mjs +36 -0
- package/dist/compiled/composables/useRemainingTime.mjs +17 -0
- package/dist/compiled/composables/useSortLogic.mjs +55 -0
- package/dist/compiled/composables/useTemplate.mjs +70 -0
- package/dist/compiled/utils/PresetResolver.mjs +100 -0
- package/dist/module.cjs +82 -0
- package/dist/module.d.cts +5 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +52 -0
- package/dist/runtime/components/KButton/KButton.global.d.vue.ts +1 -1
- package/dist/runtime/components/KButton/KButton.global.vue.d.ts +1 -1
- package/dist/runtime/components/KButton/KButton.logic.d.ts +1 -1
- package/dist/runtime/components/KDatatable/KDataIterator.global.d.vue.ts +1 -1
- package/dist/runtime/components/KDatatable/KDataIterator.global.vue.d.ts +1 -1
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.d.vue.ts +2 -2
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.vue.d.ts +2 -2
- package/dist/runtime/components/KGrid/KGrid.global.d.vue.ts +7 -56
- package/dist/runtime/components/KGrid/KGrid.global.vue +9 -2
- package/dist/runtime/components/KGrid/KGrid.global.vue.d.ts +7 -56
- package/dist/runtime/components/KIcon/KIcon.logic.d.ts +1 -1
- package/dist/runtime/components/KIcon/KIcon.logic.js +2 -2
- package/dist/runtime/components/KLoader/KLoader.global.d.vue.ts +3 -3
- package/dist/runtime/components/KLoader/KLoader.global.vue.d.ts +3 -3
- package/dist/runtime/components/KLoader/KLoader.logic.d.ts +8 -1
- package/dist/runtime/components/KLoader/KLoader.logic.js +1 -0
- package/dist/runtime/components/KPanel/KPanel.global.d.vue.ts +3 -28
- package/dist/runtime/components/KPanel/KPanel.global.vue +6 -3
- package/dist/runtime/components/KPanel/KPanel.global.vue.d.ts +3 -28
- package/dist/runtime/presets/default/assets/scss/css-variables.scss +216 -0
- package/dist/runtime/presets/default/assets/scss/docs.scss +52 -0
- package/dist/runtime/presets/default/assets/scss/index.css +8 -0
- package/dist/runtime/presets/default/assets/scss/index.scss +12 -0
- package/dist/runtime/presets/default/assets/scss/mixins.scss +94 -0
- package/dist/runtime/presets/default/assets/scss/reset.scss +16 -0
- package/dist/runtime/presets/default/components/KAccordion/KAccordion.vue +5 -2
- package/dist/runtime/presets/default/components/KAccordion/KAccordionItem.vue +40 -37
- package/dist/runtime/presets/default/components/KBulkActions/KBulkActions.vue +29 -22
- package/dist/runtime/presets/default/components/KButton/KButton.vue +147 -428
- package/dist/runtime/presets/default/components/KCalendar/KCalendar.vue +57 -53
- package/dist/runtime/presets/default/components/KCalendar/KCalendarMonth.vue +189 -161
- package/dist/runtime/presets/default/components/KCheckbox/KCheckbox.vue +46 -36
- package/dist/runtime/presets/default/components/KCombobox/KCombobox.vue +77 -66
- package/dist/runtime/presets/default/components/KCombobox/KComboboxList.vue +71 -58
- package/dist/runtime/presets/default/components/KDataIterator/KDataIterator.vue +40 -31
- package/dist/runtime/presets/default/components/KDatatable/KDatatable.vue +108 -91
- package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.vue +38 -22
- package/dist/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.vue +66 -48
- package/dist/runtime/presets/default/components/KDropdown/KDropdown.vue +27 -22
- package/dist/runtime/presets/default/components/KGantt/KGantt.vue +336 -240
- package/dist/runtime/presets/default/components/KGantt/KGanttRuler.vue +40 -35
- package/dist/runtime/presets/default/components/KGantt/KGanttTimeline.vue +170 -140
- package/dist/runtime/presets/default/components/KGrid/KGrid.vue +62 -60
- package/dist/runtime/presets/default/components/KHourPicker/KHourPicker.vue +23 -19
- package/dist/runtime/presets/default/components/KHourSelect/KHourSelect.vue +34 -28
- package/dist/runtime/presets/default/components/KIcon/KIcon.d.vue.ts +1 -1
- package/dist/runtime/presets/default/components/KIcon/KIcon.vue +31 -22
- package/dist/runtime/presets/default/components/KIcon/KIcon.vue.d.ts +1 -1
- package/dist/runtime/presets/default/components/KLoader/KLoader.vue +53 -47
- package/dist/runtime/presets/default/components/KMaskTextbox/KMaskTextbox.vue +108 -84
- package/dist/runtime/presets/default/components/KModal/KModal.vue +30 -27
- package/dist/runtime/presets/default/components/KPagination/KPagination.vue +42 -40
- package/dist/runtime/presets/default/components/KPanel/KPanel.vue +39 -31
- package/dist/runtime/presets/default/components/KRadiobox/KRadiobox.vue +30 -29
- package/dist/runtime/presets/default/components/KRangeSlider/KRangeSlider.vue +158 -125
- package/dist/runtime/presets/default/components/KSlider/KSlider.vue +123 -100
- package/dist/runtime/presets/default/components/KTabs/KTabItem.vue +40 -37
- package/dist/runtime/presets/default/components/KTabs/KTabs.vue +9 -6
- package/dist/runtime/presets/default/components/KTextarea/KTextarea.vue +23 -20
- package/dist/runtime/presets/default/components/KTextbox/KTextbox.vue +42 -33
- package/dist/runtime/presets/default/components/KTree/KTree.vue +102 -80
- package/dist/runtime/presets/default/components/KTreePicker/KTreePicker.vue +54 -34
- package/dist/runtime/presets/default/components/KTreeView/KTreeCell.vue +31 -30
- package/dist/runtime/presets/default/components/KTreeView/KTreeView.vue +34 -27
- package/package.json +7 -6
|
@@ -30,159 +30,189 @@
|
|
|
30
30
|
)
|
|
31
31
|
</template>
|
|
32
32
|
|
|
33
|
-
<script setup>
|
|
34
|
-
import { computed, ref } from
|
|
35
|
-
import { getSnapMs, getGanttMarkers } from
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
33
|
+
<script lang="ts" setup>
|
|
34
|
+
import { computed, ref } from 'vue'
|
|
35
|
+
import { getSnapMs, type IGanttTask, getGanttMarkers } from '#toolkit/components/KGantt/KGantt.logic'
|
|
36
|
+
|
|
37
|
+
const props = defineProps<{
|
|
38
|
+
row?: any
|
|
39
|
+
tasks: IGanttTask[]
|
|
40
|
+
titleField: string
|
|
41
|
+
getTaskStyle: (task: any) => any
|
|
42
|
+
startMs: number
|
|
43
|
+
endMs: number
|
|
44
|
+
editable?: boolean
|
|
45
|
+
snapTo?: string
|
|
46
|
+
resourceTypeField?: string
|
|
47
|
+
resolvedMapping?: any
|
|
48
|
+
// Global drag state provided from KGantt parent
|
|
49
|
+
activeDrag?: {
|
|
50
|
+
taskId: string | number
|
|
51
|
+
currentStartMs: number
|
|
52
|
+
currentEndMs: number
|
|
53
|
+
sourceRowId: string | number
|
|
54
|
+
} | null
|
|
55
|
+
mode?: 'date' | 'numeric'
|
|
56
|
+
}>()
|
|
57
|
+
|
|
58
|
+
const emit = defineEmits<{
|
|
59
|
+
(e: 'task-dragstart', payload: { event: MouseEvent; task: IGanttTask; rowId: any; mode: string; wrapperEl: HTMLElement | null }): void
|
|
60
|
+
(e: 'cell-mouseenter', rowId: any): void
|
|
61
|
+
}>()
|
|
62
|
+
|
|
63
|
+
const wrapperRef = ref<HTMLElement | null>(null)
|
|
64
|
+
|
|
52
65
|
const onCellMouseEnter = () => {
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
66
|
+
emit('cell-mouseenter', props.row?.id)
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const isDraggingThisTask = (taskId: string | number): boolean => {
|
|
70
|
+
return props.activeDrag?.taskId === taskId
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// Shows live-updated position during drag
|
|
58
74
|
const displayTasks = computed(() => {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
})
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
if (!props.activeDrag || !props.resolvedMapping) return props.tasks
|
|
76
|
+
const drag = props.activeDrag
|
|
77
|
+
return props.tasks.map(t => {
|
|
78
|
+
if (t.id === drag.taskId) {
|
|
79
|
+
return {
|
|
80
|
+
...t,
|
|
81
|
+
[props.resolvedMapping.startDate]: drag.currentStartMs,
|
|
82
|
+
[props.resolvedMapping.endDate]: drag.currentEndMs
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return t
|
|
86
|
+
})
|
|
87
|
+
})
|
|
88
|
+
|
|
89
|
+
const getTaskAppearance = (task: any) => {
|
|
90
|
+
const field = props.resolvedMapping?.appearanceField || 'appearance'
|
|
91
|
+
return task[field] || 'filled'
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// Use parent getTaskStyle but pass live task data
|
|
95
|
+
const getBarStyle = (task: any) => props.getTaskStyle(task)
|
|
96
|
+
|
|
97
|
+
const gridMarkers = computed(() => getGanttMarkers(props.startMs, props.endMs, props.mode))
|
|
78
98
|
</script>
|
|
79
99
|
|
|
80
|
-
<style scoped>
|
|
100
|
+
<style lang="scss" scoped>
|
|
81
101
|
.gantt-cell {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
102
|
+
width: 100%;
|
|
103
|
+
height: 100%;
|
|
104
|
+
min-height: 36px;
|
|
105
|
+
display: flex;
|
|
106
|
+
align-items: center;
|
|
107
|
+
padding: 4px 0;
|
|
88
108
|
}
|
|
89
109
|
|
|
90
110
|
.gantt-bar-wrapper {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
111
|
+
position: relative;
|
|
112
|
+
width: 100%;
|
|
113
|
+
height: 28px;
|
|
114
|
+
border-radius: 4px;
|
|
115
|
+
background-color: var(--surface-ground, #f1f5f9);
|
|
96
116
|
}
|
|
97
117
|
|
|
98
118
|
.gantt-grid-line {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
119
|
+
position: absolute;
|
|
120
|
+
top: 0;
|
|
121
|
+
bottom: 0;
|
|
122
|
+
width: 1px;
|
|
123
|
+
background: var(--border-color, #e2e8f0);
|
|
124
|
+
z-index: 0;
|
|
105
125
|
}
|
|
106
126
|
|
|
107
127
|
.gantt-bar {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
128
|
+
position: absolute;
|
|
129
|
+
top: 3px;
|
|
130
|
+
bottom: 3px;
|
|
131
|
+
border-radius: 4px;
|
|
132
|
+
display: flex;
|
|
133
|
+
align-items: center;
|
|
134
|
+
padding: 0px;
|
|
135
|
+
white-space: nowrap;
|
|
136
|
+
overflow: hidden;
|
|
137
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
|
|
138
|
+
z-index: 1;
|
|
139
|
+
cursor: grab;
|
|
140
|
+
user-select: none;
|
|
141
|
+
transition: filter 0.2s;
|
|
142
|
+
|
|
143
|
+
&--filled {
|
|
144
|
+
background-color: var(--task-color);
|
|
145
|
+
.gantt-title { color: #fff; }
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
&--bordered {
|
|
149
|
+
background-color: #fff;
|
|
150
|
+
border: 1px solid var(--task-color);
|
|
151
|
+
.gantt-title { color: #000; }
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
&--dashed {
|
|
155
|
+
background-color: #fff;
|
|
156
|
+
border: 1px dashed var(--task-color);
|
|
157
|
+
.gantt-title { color: #000; }
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
&--shaded {
|
|
161
|
+
background: repeating-linear-gradient(
|
|
162
|
+
45deg,
|
|
163
|
+
color-mix(in srgb, var(--task-color), transparent 80%),
|
|
164
|
+
color-mix(in srgb, var(--task-color), transparent 80%) 8px,
|
|
165
|
+
#fff 8px,
|
|
166
|
+
#fff 16px
|
|
167
|
+
);
|
|
168
|
+
border: 1px solid var(--task-color);
|
|
169
|
+
.gantt-title {
|
|
170
|
+
color: #000;
|
|
171
|
+
background: rgba(255, 255, 255, 0.6);
|
|
172
|
+
border-radius: 2px;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
&.is-dragging {
|
|
177
|
+
opacity: 0.8;
|
|
178
|
+
z-index: 50;
|
|
179
|
+
cursor: grabbing;
|
|
180
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
&:hover {
|
|
184
|
+
filter: brightness(1.1);
|
|
185
|
+
z-index: 2;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.gantt-resize-handle {
|
|
189
|
+
position: absolute;
|
|
190
|
+
top: 0;
|
|
191
|
+
bottom: 0;
|
|
192
|
+
width: 8px;
|
|
193
|
+
cursor: ew-resize;
|
|
194
|
+
z-index: 3;
|
|
195
|
+
|
|
196
|
+
&:hover {
|
|
197
|
+
background: rgba(255, 255, 255, 0.3);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
&.left {
|
|
201
|
+
left: 0;
|
|
202
|
+
}
|
|
203
|
+
&.right {
|
|
204
|
+
right: 0;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.gantt-title {
|
|
209
|
+
font-size: 0.72rem;
|
|
210
|
+
font-weight: 600;
|
|
211
|
+
overflow: hidden;
|
|
212
|
+
text-overflow: ellipsis;
|
|
213
|
+
user-select: none;
|
|
214
|
+
pointer-events: none;
|
|
215
|
+
padding: 0px 8px;
|
|
216
|
+
}
|
|
187
217
|
}
|
|
188
218
|
</style>
|
|
@@ -3,68 +3,70 @@
|
|
|
3
3
|
slot
|
|
4
4
|
</template>
|
|
5
5
|
|
|
6
|
-
<script setup>
|
|
7
|
-
const props = defineProps
|
|
8
|
-
|
|
9
|
-
})
|
|
6
|
+
<script lang="ts" setup>
|
|
7
|
+
const props = defineProps<{
|
|
8
|
+
classes: string
|
|
9
|
+
}>()
|
|
10
10
|
</script>
|
|
11
11
|
|
|
12
|
-
<style scoped>
|
|
12
|
+
<style lang="scss" scoped>
|
|
13
13
|
.KGrid {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
14
|
+
display: flex;
|
|
15
|
+
gap: var(--grid-gap);
|
|
16
|
+
box-sizing: border-box;
|
|
17
|
+
|
|
18
|
+
&.direction-row {
|
|
19
|
+
flex-direction: row;
|
|
20
|
+
}
|
|
21
|
+
&.direction-column {
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
}
|
|
24
|
+
&.wrap {
|
|
25
|
+
flex-wrap: wrap;
|
|
26
|
+
}
|
|
27
|
+
&.nowrap {
|
|
28
|
+
flex-wrap: nowrap;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&.flex-child > * {
|
|
32
|
+
flex-grow: 1;
|
|
33
|
+
width: auto;
|
|
34
|
+
}
|
|
35
|
+
&.flex-align-start {
|
|
36
|
+
align-items: flex-start;
|
|
37
|
+
}
|
|
38
|
+
&.flex-align-center {
|
|
39
|
+
align-items: center;
|
|
40
|
+
}
|
|
41
|
+
&.flex-align-end {
|
|
42
|
+
align-items: flex-end;
|
|
43
|
+
}
|
|
44
|
+
&.flex-align-baseline {
|
|
45
|
+
align-items: baseline;
|
|
46
|
+
}
|
|
47
|
+
&.flex-align-stretch {
|
|
48
|
+
align-items: stretch;
|
|
49
|
+
}
|
|
50
|
+
&.justify-start {
|
|
51
|
+
justify-content: flex-start;
|
|
52
|
+
}
|
|
53
|
+
&.justify-center {
|
|
54
|
+
justify-content: center;
|
|
55
|
+
}
|
|
56
|
+
&.justify-end {
|
|
57
|
+
justify-content: flex-end;
|
|
58
|
+
}
|
|
59
|
+
&.justify-between {
|
|
60
|
+
justify-content: space-between;
|
|
61
|
+
}
|
|
62
|
+
&.justify-around {
|
|
63
|
+
justify-content: space-around;
|
|
64
|
+
}
|
|
65
|
+
&.justify-evenly {
|
|
66
|
+
justify-content: space-evenly;
|
|
67
|
+
}
|
|
68
|
+
&.no-gap {
|
|
69
|
+
gap: 0;
|
|
70
|
+
}
|
|
69
71
|
}
|
|
70
72
|
</style>
|
|
@@ -25,27 +25,31 @@
|
|
|
25
25
|
)
|
|
26
26
|
</template>
|
|
27
27
|
|
|
28
|
-
<script setup>
|
|
29
|
-
import KHourSelect from
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
28
|
+
<script lang="ts" setup>
|
|
29
|
+
import KHourSelect from '../../../../components/KHourSelect/KHourSelect.global.vue'
|
|
30
|
+
|
|
31
|
+
defineProps<{
|
|
32
|
+
modelValue: string
|
|
33
|
+
isOpen: boolean
|
|
34
|
+
step: number
|
|
35
|
+
format: string
|
|
36
|
+
startHour: string
|
|
37
|
+
endHour?: string
|
|
38
|
+
placeholder: string
|
|
39
|
+
disabled: boolean
|
|
40
|
+
toggleDropdown: () => void
|
|
41
|
+
closeDropdown: () => void
|
|
42
|
+
onTimeSelect: (time: string) => void
|
|
43
|
+
}>()
|
|
44
|
+
|
|
45
|
+
defineEmits<{
|
|
46
|
+
(e: 'update:isOpen', value: boolean): void
|
|
47
|
+
}>()
|
|
44
48
|
</script>
|
|
45
49
|
|
|
46
|
-
<style scoped>
|
|
50
|
+
<style lang="scss" scoped>
|
|
47
51
|
.KHourPicker {
|
|
48
|
-
|
|
49
|
-
|
|
52
|
+
position: relative;
|
|
53
|
+
width: 100%;
|
|
50
54
|
}
|
|
51
55
|
</style>
|
|
@@ -9,35 +9,41 @@
|
|
|
9
9
|
) {{ time }}
|
|
10
10
|
</template>
|
|
11
11
|
|
|
12
|
-
<script setup>
|
|
13
|
-
const props = defineProps
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
})
|
|
12
|
+
<script lang="ts" setup>
|
|
13
|
+
const props = defineProps<{
|
|
14
|
+
timeSlots: string[]
|
|
15
|
+
selectedTime: string
|
|
16
|
+
selectTime: (time: string) => void
|
|
17
|
+
}>()
|
|
18
18
|
</script>
|
|
19
19
|
|
|
20
|
-
<style scoped>
|
|
21
|
-
.KHourSelect
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
20
|
+
<style lang="scss" scoped>
|
|
21
|
+
.KHourSelect {
|
|
22
|
+
.time-list {
|
|
23
|
+
max-height: 200px;
|
|
24
|
+
overflow-y: auto;
|
|
25
|
+
border: 1px solid var(--border-color, #ccc);
|
|
26
|
+
border-radius: 4px;
|
|
27
|
+
|
|
28
|
+
.time-item {
|
|
29
|
+
padding: 8px 12px;
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
transition: background-color 0.2s;
|
|
32
|
+
|
|
33
|
+
&:hover {
|
|
34
|
+
background-color: var(--hover-bg, #f0f0f0);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&.selected {
|
|
38
|
+
background-color: var(--primary-color, #007bff);
|
|
39
|
+
color: var(--primary-text, white);
|
|
40
|
+
font-weight: 500;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&:not(:last-child) {
|
|
44
|
+
border-bottom: 1px solid var(--border-light, #e0e0e0);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
42
48
|
}
|
|
43
49
|
</style>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
2
|
widthPx?: string;
|
|
3
3
|
heightPx?: string;
|
|
4
|
-
iconComponent:
|
|
4
|
+
iconComponent: string;
|
|
5
5
|
rotate: number | string;
|
|
6
6
|
};
|
|
7
7
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -1,30 +1,39 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
|
-
span.KIcon(
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
)
|
|
2
|
+
span.KIcon(
|
|
3
|
+
v-if="iconComponent"
|
|
4
|
+
:style="iconStyle"
|
|
5
|
+
v-html="iconComponent"
|
|
6
|
+
)
|
|
8
7
|
</template>
|
|
9
8
|
|
|
10
|
-
<script setup>
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
<script lang="ts" setup>
|
|
10
|
+
import { computed } from 'vue'
|
|
11
|
+
|
|
12
|
+
const props = defineProps<{
|
|
13
|
+
widthPx?: string
|
|
14
|
+
heightPx?: string
|
|
15
|
+
iconComponent: string
|
|
16
|
+
rotate: number | string
|
|
17
|
+
}>()
|
|
18
|
+
|
|
19
|
+
const iconStyle = computed(() => ({
|
|
20
|
+
width: props.widthPx,
|
|
21
|
+
height: props.heightPx,
|
|
22
|
+
transform: props.rotate ? `rotate(${props.rotate}deg)` : undefined
|
|
23
|
+
}))
|
|
17
24
|
</script>
|
|
18
25
|
|
|
19
|
-
<style scoped>
|
|
26
|
+
<style lang="scss" scoped>
|
|
20
27
|
.KIcon {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
display: inline-flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
justify-content: center;
|
|
31
|
+
line-height: 0;
|
|
32
|
+
vertical-align: middle;
|
|
33
|
+
|
|
34
|
+
:deep(svg) {
|
|
35
|
+
width: 100%;
|
|
36
|
+
height: 100%;
|
|
37
|
+
}
|
|
29
38
|
}
|
|
30
39
|
</style>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
2
|
widthPx?: string;
|
|
3
3
|
heightPx?: string;
|
|
4
|
-
iconComponent:
|
|
4
|
+
iconComponent: string;
|
|
5
5
|
rotate: number | string;
|
|
6
6
|
};
|
|
7
7
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|