@katlux/toolkit 0.1.0-beta.6 → 0.1.0-beta.66
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/usePresetComponent.mjs +21 -16
- package/dist/module.cjs +52 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +52 -0
- package/dist/runtime/components/KBulkActions/KBulkActions.logic.d.ts +9 -2
- package/dist/runtime/components/KCalendar/KCalendar.global.d.vue.ts +11 -12
- package/dist/runtime/components/KCalendar/KCalendar.global.vue.d.ts +11 -12
- package/dist/runtime/components/KCalendar/KCalendar.logic.d.ts +1 -0
- package/dist/runtime/components/KCalendar/KCalendar.logic.js +25 -10
- package/dist/runtime/components/KCheckbox/KCheckbox.global.d.vue.ts +30 -0
- package/dist/runtime/components/KCheckbox/KCheckbox.global.vue +4 -1
- package/dist/runtime/components/KCheckbox/KCheckbox.global.vue.d.ts +30 -0
- package/dist/runtime/components/KCheckbox/KCheckbox.logic.d.ts +17 -0
- package/dist/runtime/components/KCheckbox/KCheckbox.logic.js +16 -1
- package/dist/runtime/components/KCombobox/KCombobox.global.d.vue.ts +75 -8
- package/dist/runtime/components/KCombobox/KCombobox.global.vue +18 -4
- package/dist/runtime/components/KCombobox/KCombobox.global.vue.d.ts +75 -8
- package/dist/runtime/components/KCombobox/KCombobox.logic.d.ts +46 -8
- package/dist/runtime/components/KCombobox/KCombobox.logic.js +77 -9
- package/dist/runtime/components/KCompositeInput/KCompositeInput.global.d.vue.ts +169 -0
- package/dist/runtime/components/KCompositeInput/KCompositeInput.global.vue +46 -0
- package/dist/runtime/components/KCompositeInput/KCompositeInput.global.vue.d.ts +169 -0
- package/dist/runtime/components/KCompositeInput/KCompositeInput.logic.d.ts +127 -0
- package/dist/runtime/components/KCompositeInput/KCompositeInput.logic.js +160 -0
- package/dist/runtime/components/KDatatable/KDataIterator.global.vue +1 -1
- package/dist/runtime/components/KDatatable/KDataIterator.logic.d.ts +2 -2
- package/dist/runtime/components/KDatatable/KDatatable.global.vue +1 -1
- package/dist/runtime/components/KDatatable/KDatatable.logic.d.ts +2 -2
- package/dist/runtime/components/KDatePicker/KDatePicker.global.d.vue.ts +95 -8
- package/dist/runtime/components/KDatePicker/KDatePicker.global.vue +27 -3
- package/dist/runtime/components/KDatePicker/KDatePicker.global.vue.d.ts +95 -8
- package/dist/runtime/components/KDatePicker/KDatePicker.logic.d.ts +43 -1
- package/dist/runtime/components/KDatePicker/KDatePicker.logic.js +106 -7
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.d.vue.ts +84 -8
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.vue +26 -3
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.vue.d.ts +84 -8
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.logic.d.ts +38 -1
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.logic.js +161 -7
- package/dist/runtime/components/KDropdown/KDropdown.global.d.vue.ts +27 -0
- package/dist/runtime/components/KDropdown/KDropdown.global.vue +14 -4
- package/dist/runtime/components/KDropdown/KDropdown.global.vue.d.ts +27 -0
- package/dist/runtime/components/KDropdown/KDropdown.logic.d.ts +36 -1
- package/dist/runtime/components/KDropdown/KDropdown.logic.js +92 -4
- 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/KHourPicker/KHourPicker.global.d.vue.ts +41 -0
- package/dist/runtime/components/KHourPicker/KHourPicker.global.vue +27 -12
- package/dist/runtime/components/KHourPicker/KHourPicker.global.vue.d.ts +41 -0
- package/dist/runtime/components/KHourPicker/KHourPicker.logic.d.ts +26 -3
- package/dist/runtime/components/KHourPicker/KHourPicker.logic.js +34 -10
- package/dist/runtime/components/KHourSelect/KHourSelect.logic.js +4 -1
- package/dist/runtime/components/KIcon/KIcon.global.d.vue.ts +1 -1
- package/dist/runtime/components/KIcon/KIcon.global.vue.d.ts +1 -1
- package/dist/runtime/components/KIcon/KIcon.logic.d.ts +1 -1
- package/dist/runtime/components/KIcon/KIcon.logic.js +13 -8
- package/dist/runtime/components/KMaskTextbox/KMaskTextbox.global.d.vue.ts +21 -0
- package/dist/runtime/components/KMaskTextbox/KMaskTextbox.global.vue +4 -2
- package/dist/runtime/components/KMaskTextbox/KMaskTextbox.global.vue.d.ts +21 -0
- package/dist/runtime/components/KMaskTextbox/KMaskTextbox.logic.d.ts +11 -0
- package/dist/runtime/components/KMaskTextbox/KMaskTextbox.logic.js +9 -0
- package/dist/runtime/components/KModal/KModal.global.d.vue.ts +14 -2
- package/dist/runtime/components/KModal/KModal.global.vue +5 -1
- package/dist/runtime/components/KModal/KModal.global.vue.d.ts +14 -2
- package/dist/runtime/components/KModal/KModal.logic.d.ts +10 -2
- package/dist/runtime/components/KModal/KModal.logic.js +12 -3
- package/dist/runtime/components/KPagination/KPagination.global.vue +1 -1
- package/dist/runtime/components/KPanel/KPanel.global.d.vue.ts +5 -28
- package/dist/runtime/components/KPanel/KPanel.global.vue +12 -4
- package/dist/runtime/components/KPanel/KPanel.global.vue.d.ts +5 -28
- package/dist/runtime/components/KPanel/KPanel.logic.d.ts +10 -0
- package/dist/runtime/components/KPanel/KPanel.logic.js +8 -0
- package/dist/runtime/components/KRadiobox/KRadiobox.global.d.vue.ts +21 -0
- package/dist/runtime/components/KRadiobox/KRadiobox.global.vue +3 -1
- package/dist/runtime/components/KRadiobox/KRadiobox.global.vue.d.ts +21 -0
- package/dist/runtime/components/KRadiobox/KRadiobox.logic.d.ts +11 -0
- package/dist/runtime/components/KRadiobox/KRadiobox.logic.js +9 -0
- package/dist/runtime/components/KTextarea/KTextarea.global.d.vue.ts +21 -0
- package/dist/runtime/components/KTextarea/KTextarea.global.vue +3 -1
- package/dist/runtime/components/KTextarea/KTextarea.global.vue.d.ts +21 -0
- package/dist/runtime/components/KTextarea/KTextarea.logic.d.ts +11 -0
- package/dist/runtime/components/KTextarea/KTextarea.logic.js +9 -0
- package/dist/runtime/components/KTextbox/KTextbox.global.d.vue.ts +35 -2
- package/dist/runtime/components/KTextbox/KTextbox.global.vue +7 -4
- package/dist/runtime/components/KTextbox/KTextbox.global.vue.d.ts +35 -2
- package/dist/runtime/components/KTextbox/KTextbox.logic.d.ts +21 -4
- package/dist/runtime/components/KTextbox/KTextbox.logic.js +21 -5
- package/dist/runtime/components/KToast/KToast.global.d.vue.ts +57 -0
- package/dist/runtime/components/KToast/KToast.global.vue +32 -0
- package/dist/runtime/components/KToast/KToast.global.vue.d.ts +57 -0
- package/dist/runtime/components/KToast/KToast.logic.d.ts +34 -0
- package/dist/runtime/components/KToast/KToast.logic.js +47 -0
- package/dist/runtime/components/KTree/KTree.logic.d.ts +1 -1
- package/dist/runtime/components/KTreePicker/KTreePicker.global.d.vue.ts +63 -5
- package/dist/runtime/components/KTreePicker/KTreePicker.global.vue +15 -3
- package/dist/runtime/components/KTreePicker/KTreePicker.global.vue.d.ts +63 -5
- package/dist/runtime/components/KTreePicker/KTreePicker.logic.d.ts +37 -5
- package/dist/runtime/components/KTreePicker/KTreePicker.logic.js +32 -1
- package/dist/runtime/components/KTreeView/KTreeView.global.d.vue.ts +5 -5
- package/dist/runtime/components/KTreeView/KTreeView.global.vue.d.ts +5 -5
- package/dist/runtime/components/KTreeView/KTreeView.logic.d.ts +1 -1
- package/dist/runtime/composables/usePresetComponent.d.ts +16 -0
- package/dist/runtime/composables/usePresetComponent.js +21 -16
- package/dist/runtime/presets/default/assets/scss/css-variables.css +64 -13
- package/dist/runtime/presets/default/assets/scss/css-variables.scss +286 -0
- package/dist/runtime/presets/default/assets/scss/docs.scss +52 -0
- package/dist/runtime/presets/default/assets/scss/index.css +99 -13
- package/dist/runtime/presets/default/assets/scss/index.scss +42 -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.d.vue.ts +3 -0
- package/dist/runtime/presets/default/components/KCheckbox/KCheckbox.vue +59 -42
- package/dist/runtime/presets/default/components/KCheckbox/KCheckbox.vue.d.ts +3 -0
- package/dist/runtime/presets/default/components/KCombobox/KCombobox.d.vue.ts +7 -0
- package/dist/runtime/presets/default/components/KCombobox/KCombobox.vue +108 -79
- package/dist/runtime/presets/default/components/KCombobox/KCombobox.vue.d.ts +7 -0
- package/dist/runtime/presets/default/components/KCombobox/KComboboxList.d.vue.ts +1 -0
- package/dist/runtime/presets/default/components/KCombobox/KComboboxList.vue +79 -61
- package/dist/runtime/presets/default/components/KCombobox/KComboboxList.vue.d.ts +1 -0
- package/dist/runtime/presets/default/components/KCompositeInput/KCompositeInput.d.vue.ts +29 -0
- package/dist/runtime/presets/default/components/KCompositeInput/KCompositeInput.vue +202 -0
- package/dist/runtime/presets/default/components/KCompositeInput/KCompositeInput.vue.d.ts +29 -0
- package/dist/runtime/presets/default/components/KDataIterator/KDataIterator.vue +40 -31
- package/dist/runtime/presets/default/components/KDatatable/KDatatable.vue +110 -92
- package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.d.vue.ts +7 -0
- package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.vue +58 -25
- package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.vue.d.ts +7 -0
- package/dist/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.d.vue.ts +6 -0
- package/dist/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.vue +81 -52
- package/dist/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.vue.d.ts +6 -0
- package/dist/runtime/presets/default/components/KDropdown/KDropdown.d.vue.ts +10 -0
- package/dist/runtime/presets/default/components/KDropdown/KDropdown.vue +57 -25
- package/dist/runtime/presets/default/components/KDropdown/KDropdown.vue.d.ts +10 -0
- package/dist/runtime/presets/default/components/KGantt/KGantt.vue +337 -241
- 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.d.vue.ts +8 -2
- package/dist/runtime/presets/default/components/KHourPicker/KHourPicker.vue +48 -28
- package/dist/runtime/presets/default/components/KHourPicker/KHourPicker.vue.d.ts +8 -2
- 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 +65 -48
- package/dist/runtime/presets/default/components/KMaskTextbox/KMaskTextbox.d.vue.ts +2 -0
- package/dist/runtime/presets/default/components/KMaskTextbox/KMaskTextbox.vue +117 -84
- package/dist/runtime/presets/default/components/KMaskTextbox/KMaskTextbox.vue.d.ts +2 -0
- package/dist/runtime/presets/default/components/KModal/KModal.d.vue.ts +2 -0
- package/dist/runtime/presets/default/components/KModal/KModal.vue +85 -35
- package/dist/runtime/presets/default/components/KModal/KModal.vue.d.ts +2 -0
- package/dist/runtime/presets/default/components/KPagination/KPagination.vue +42 -40
- package/dist/runtime/presets/default/components/KPanel/KPanel.d.vue.ts +3 -0
- package/dist/runtime/presets/default/components/KPanel/KPanel.vue +97 -34
- package/dist/runtime/presets/default/components/KPanel/KPanel.vue.d.ts +3 -0
- package/dist/runtime/presets/default/components/KRadiobox/KRadiobox.d.vue.ts +2 -0
- package/dist/runtime/presets/default/components/KRadiobox/KRadiobox.vue +40 -35
- package/dist/runtime/presets/default/components/KRadiobox/KRadiobox.vue.d.ts +2 -0
- 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.d.vue.ts +2 -0
- package/dist/runtime/presets/default/components/KTextarea/KTextarea.vue +40 -21
- package/dist/runtime/presets/default/components/KTextarea/KTextarea.vue.d.ts +2 -0
- package/dist/runtime/presets/default/components/KTextbox/KTextbox.d.vue.ts +4 -1
- package/dist/runtime/presets/default/components/KTextbox/KTextbox.vue +76 -37
- package/dist/runtime/presets/default/components/KTextbox/KTextbox.vue.d.ts +4 -1
- package/dist/runtime/presets/default/components/KToast/KToast.d.vue.ts +17 -0
- package/dist/runtime/presets/default/components/KToast/KToast.vue +118 -0
- package/dist/runtime/presets/default/components/KToast/KToast.vue.d.ts +17 -0
- package/dist/runtime/presets/default/components/KTree/KTree.vue +103 -80
- package/dist/runtime/presets/default/components/KTreePicker/KTreePicker.d.vue.ts +6 -0
- package/dist/runtime/presets/default/components/KTreePicker/KTreePicker.vue +88 -55
- package/dist/runtime/presets/default/components/KTreePicker/KTreePicker.vue.d.ts +6 -0
- 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 +5 -5
|
@@ -14,108 +14,131 @@
|
|
|
14
14
|
)
|
|
15
15
|
</template>
|
|
16
16
|
|
|
17
|
-
<script setup>
|
|
18
|
-
import { computed } from
|
|
19
|
-
const props = defineProps({
|
|
20
|
-
rangeMin: { type: Number, required: true },
|
|
21
|
-
rangeMax: { type: Number, required: true },
|
|
22
|
-
rangeStep: { type: Number, required: true },
|
|
23
|
-
isDisabled: { type: Boolean, required: true },
|
|
24
|
-
currentValue: { type: Number, required: true },
|
|
25
|
-
valuePercent: { type: Number, required: true }
|
|
26
|
-
});
|
|
27
|
-
const emit = defineEmits(["update:value"]);
|
|
28
|
-
const updateValue = (event) => {
|
|
29
|
-
const value = parseFloat(event.target.value);
|
|
30
|
-
emit("update:value", value);
|
|
31
|
-
};
|
|
32
|
-
const handleTrackClick = (event) => {
|
|
33
|
-
if (props.isDisabled) return;
|
|
34
|
-
const target = event.currentTarget;
|
|
35
|
-
const rect = target.getBoundingClientRect();
|
|
36
|
-
const clickX = event.clientX - rect.left;
|
|
37
|
-
const percentage = clickX / rect.width;
|
|
38
|
-
const rawValue = props.rangeMin + percentage * (props.rangeMax - props.rangeMin);
|
|
39
|
-
const steppedValue = Math.round(rawValue / props.rangeStep) * props.rangeStep;
|
|
40
|
-
const value = Math.max(props.rangeMin, Math.min(props.rangeMax, steppedValue));
|
|
41
|
-
emit("update:value", value);
|
|
42
|
-
};
|
|
43
|
-
</script>
|
|
17
|
+
<script lang="ts" setup>
|
|
18
|
+
import { computed } from 'vue'
|
|
44
19
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
height: 6px;
|
|
63
|
-
background-color: var(--neutral-200);
|
|
64
|
-
border-radius: 3px;
|
|
65
|
-
}
|
|
66
|
-
.KSlider .slider-fill {
|
|
67
|
-
position: absolute;
|
|
68
|
-
height: 6px;
|
|
69
|
-
background-color: var(--primary-500);
|
|
70
|
-
border-radius: 3px;
|
|
71
|
-
z-index: 1;
|
|
72
|
-
}
|
|
73
|
-
.KSlider .slider-input {
|
|
74
|
-
position: absolute;
|
|
75
|
-
width: 100%;
|
|
76
|
-
height: 1px;
|
|
77
|
-
background: transparent;
|
|
78
|
-
pointer-events: none;
|
|
79
|
-
-webkit-appearance: none;
|
|
80
|
-
appearance: none;
|
|
81
|
-
}
|
|
82
|
-
.KSlider .slider-input::-webkit-slider-thumb {
|
|
83
|
-
-webkit-appearance: none;
|
|
84
|
-
appearance: none;
|
|
85
|
-
width: 18px;
|
|
86
|
-
height: 18px;
|
|
87
|
-
background-color: var(--primary-500);
|
|
88
|
-
border: 2px solid white;
|
|
89
|
-
border-radius: 50%;
|
|
90
|
-
cursor: pointer;
|
|
91
|
-
pointer-events: auto;
|
|
92
|
-
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
|
93
|
-
transition: transform 0.15s ease;
|
|
94
|
-
}
|
|
95
|
-
.KSlider .slider-input::-webkit-slider-thumb:hover {
|
|
96
|
-
transform: scale(1.15);
|
|
97
|
-
}
|
|
98
|
-
.KSlider .slider-input::-moz-range-thumb {
|
|
99
|
-
width: 18px;
|
|
100
|
-
height: 18px;
|
|
101
|
-
background-color: var(--primary-500);
|
|
102
|
-
border: 2px solid white;
|
|
103
|
-
border-radius: 50%;
|
|
104
|
-
cursor: pointer;
|
|
105
|
-
pointer-events: auto;
|
|
106
|
-
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
|
107
|
-
transition: transform 0.15s ease;
|
|
108
|
-
}
|
|
109
|
-
.KSlider .slider-input::-moz-range-thumb:hover {
|
|
110
|
-
transform: scale(1.15);
|
|
111
|
-
}
|
|
112
|
-
.KSlider .slider-input:disabled {
|
|
113
|
-
cursor: not-allowed;
|
|
20
|
+
// Default template for KSlider
|
|
21
|
+
const props = defineProps<{
|
|
22
|
+
rangeMin: number
|
|
23
|
+
rangeMax: number
|
|
24
|
+
rangeStep: number
|
|
25
|
+
isDisabled: boolean
|
|
26
|
+
currentValue: number
|
|
27
|
+
valuePercent: number
|
|
28
|
+
}>()
|
|
29
|
+
|
|
30
|
+
const emit = defineEmits<{
|
|
31
|
+
(e: 'update:value', value: number): void
|
|
32
|
+
}>()
|
|
33
|
+
|
|
34
|
+
const updateValue = (event: Event) => {
|
|
35
|
+
const value = parseFloat((event.target as HTMLInputElement).value)
|
|
36
|
+
emit('update:value', value)
|
|
114
37
|
}
|
|
115
|
-
|
|
116
|
-
|
|
38
|
+
|
|
39
|
+
const handleTrackClick = (event: MouseEvent) => {
|
|
40
|
+
if (props.isDisabled) return
|
|
41
|
+
|
|
42
|
+
const target = event.currentTarget as HTMLElement
|
|
43
|
+
const rect = target.getBoundingClientRect()
|
|
44
|
+
const clickX = event.clientX - rect.left
|
|
45
|
+
const percentage = clickX / rect.width
|
|
46
|
+
const rawValue = props.rangeMin + (percentage * (props.rangeMax - props.rangeMin))
|
|
47
|
+
|
|
48
|
+
// Round to step
|
|
49
|
+
const steppedValue = Math.round(rawValue / props.rangeStep) * props.rangeStep
|
|
50
|
+
const value = Math.max(props.rangeMin, Math.min(props.rangeMax, steppedValue))
|
|
51
|
+
|
|
52
|
+
emit('update:value', value)
|
|
117
53
|
}
|
|
118
|
-
|
|
119
|
-
|
|
54
|
+
</script>
|
|
55
|
+
|
|
56
|
+
<style lang="scss" scoped>
|
|
57
|
+
.KSlider {
|
|
58
|
+
position: relative;
|
|
59
|
+
padding: 20px 0;
|
|
60
|
+
|
|
61
|
+
&.disabled {
|
|
62
|
+
opacity: 0.5;
|
|
63
|
+
cursor: not-allowed;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.slider-container {
|
|
67
|
+
position: relative;
|
|
68
|
+
height: 6px;
|
|
69
|
+
cursor: pointer;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.slider-track {
|
|
73
|
+
position: absolute;
|
|
74
|
+
width: 100%;
|
|
75
|
+
height: 6px;
|
|
76
|
+
background-color: var(--neutral-200);
|
|
77
|
+
border-radius: 3px;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.slider-fill {
|
|
81
|
+
position: absolute;
|
|
82
|
+
height: 6px;
|
|
83
|
+
background-color: var(--primary-500);
|
|
84
|
+
border-radius: 3px;
|
|
85
|
+
z-index: 1;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.slider-input {
|
|
89
|
+
position: absolute;
|
|
90
|
+
width: 100%;
|
|
91
|
+
height: 1px;
|
|
92
|
+
background: transparent;
|
|
93
|
+
pointer-events: none;
|
|
94
|
+
-webkit-appearance: none;
|
|
95
|
+
appearance: none;
|
|
96
|
+
|
|
97
|
+
&::-webkit-slider-thumb {
|
|
98
|
+
-webkit-appearance: none;
|
|
99
|
+
appearance: none;
|
|
100
|
+
width: 18px;
|
|
101
|
+
height: 18px;
|
|
102
|
+
background-color: var(--primary-500);
|
|
103
|
+
border: 2px solid white;
|
|
104
|
+
border-radius: 50%;
|
|
105
|
+
cursor: pointer;
|
|
106
|
+
pointer-events: auto;
|
|
107
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
|
108
|
+
transition: transform 0.15s ease;
|
|
109
|
+
|
|
110
|
+
&:hover {
|
|
111
|
+
transform: scale(1.15);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
&::-moz-range-thumb {
|
|
116
|
+
width: 18px;
|
|
117
|
+
height: 18px;
|
|
118
|
+
background-color: var(--primary-500);
|
|
119
|
+
border: 2px solid white;
|
|
120
|
+
border-radius: 50%;
|
|
121
|
+
cursor: pointer;
|
|
122
|
+
pointer-events: auto;
|
|
123
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
|
124
|
+
transition: transform 0.15s ease;
|
|
125
|
+
|
|
126
|
+
&:hover {
|
|
127
|
+
transform: scale(1.15);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
&:disabled {
|
|
132
|
+
cursor: not-allowed;
|
|
133
|
+
|
|
134
|
+
&::-webkit-slider-thumb {
|
|
135
|
+
cursor: not-allowed;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
&::-moz-range-thumb {
|
|
139
|
+
cursor: not-allowed;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
120
143
|
}
|
|
121
144
|
</style>
|
|
@@ -3,44 +3,47 @@
|
|
|
3
3
|
slot
|
|
4
4
|
</template>
|
|
5
5
|
|
|
6
|
-
<script setup>
|
|
7
|
-
const props = defineProps
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
})
|
|
6
|
+
<script lang="ts" setup>
|
|
7
|
+
const props = defineProps<{
|
|
8
|
+
title: string
|
|
9
|
+
isOpen: boolean
|
|
10
|
+
toggleTab: () => void
|
|
11
|
+
}>()
|
|
12
12
|
</script>
|
|
13
13
|
|
|
14
|
-
<style scoped>
|
|
15
|
-
.KTab-
|
|
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
|
-
|
|
14
|
+
<style lang="scss" scoped>
|
|
15
|
+
.KTab-item {
|
|
16
|
+
&__header {
|
|
17
|
+
padding: var(--component-gap);
|
|
18
|
+
background-color: var(--background-color-medium);
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
border-radius: var(--box-border-radius);
|
|
21
|
+
|
|
22
|
+
.isOpen & {
|
|
23
|
+
border-bottom-left-radius: 0;
|
|
24
|
+
border-bottom-right-radius: 0;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
&__title {
|
|
28
|
+
flex-grow: 1;
|
|
29
|
+
}
|
|
30
|
+
&__chevron {
|
|
31
|
+
transform: rotate(90deg);
|
|
32
|
+
transition: transform 0.3s ease-in-out;
|
|
33
|
+
&.open {
|
|
34
|
+
transform: rotate(270deg);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
&__content {
|
|
38
|
+
display: none;
|
|
39
|
+
padding-top: var(--box-padding);
|
|
40
|
+
padding-bottom: var(--box-padding);
|
|
41
|
+
&.open {
|
|
42
|
+
border-bottom: var(--box-border);
|
|
43
|
+
}
|
|
44
|
+
.isOpen & {
|
|
45
|
+
display: block;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
45
48
|
}
|
|
46
49
|
</style>
|
|
@@ -7,10 +7,13 @@
|
|
|
7
7
|
slot
|
|
8
8
|
</template>
|
|
9
9
|
|
|
10
|
-
<script setup>
|
|
11
|
-
const props = defineProps
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
})
|
|
10
|
+
<script lang="ts" setup>
|
|
11
|
+
const props = defineProps<{
|
|
12
|
+
items: any[]
|
|
13
|
+
toggleItem: (index: number) => void
|
|
14
|
+
isOpen: (index: number) => boolean
|
|
15
|
+
}>()
|
|
16
16
|
</script>
|
|
17
|
+
|
|
18
|
+
<style lang="scss" scoped>
|
|
19
|
+
</style>
|
|
@@ -1,29 +1,48 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
|
-
|
|
2
|
+
.KTextarea-wrapper(:class="$attrs.class" :style="$attrs.style")
|
|
3
|
+
textarea.KTextarea(v-bind="textareaAttrs" v-model="text" :placeholder="placeholder" :rows="rows" :class="validation ? `is-${validation}` : ''")
|
|
4
|
+
span.validation-text(v-if="validation && ['success', 'warning', 'error'].includes(validation) && validationText" :class="`is-${validation}`") {{ validationText }}
|
|
3
5
|
</template>
|
|
4
6
|
|
|
5
|
-
<script setup>
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
})
|
|
7
|
+
<script lang="ts" setup>
|
|
8
|
+
import { useAttrs, computed } from 'vue'
|
|
9
|
+
|
|
10
|
+
defineOptions({
|
|
11
|
+
inheritAttrs: false
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
// Default template for KTextarea
|
|
15
|
+
const text = defineModel<string>('text')
|
|
16
|
+
|
|
17
|
+
const props = defineProps<{
|
|
18
|
+
placeholder: string
|
|
19
|
+
rows: number
|
|
20
|
+
validation?: 'success' | 'warning' | 'error' | null
|
|
21
|
+
validationText?: string
|
|
22
|
+
}>()
|
|
23
|
+
|
|
24
|
+
const attrs = useAttrs()
|
|
25
|
+
const textareaAttrs = computed(() => {
|
|
26
|
+
const { class: _, style: __, ...rest } = attrs
|
|
27
|
+
return rest
|
|
28
|
+
})
|
|
11
29
|
</script>
|
|
12
30
|
|
|
13
|
-
<style scoped>
|
|
31
|
+
<style lang="scss" scoped>
|
|
14
32
|
.KTextarea {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
33
|
+
border: var(--input-border);
|
|
34
|
+
border-radius: var(--input-border-radius);
|
|
35
|
+
background-color: var(--neutral-50);
|
|
36
|
+
padding: var(--component-gap);
|
|
37
|
+
font-family: inherit;
|
|
38
|
+
font-size: 14px;
|
|
39
|
+
resize: vertical;
|
|
40
|
+
outline: none;
|
|
41
|
+
width: 100%;
|
|
42
|
+
box-sizing: border-box;
|
|
43
|
+
|
|
44
|
+
&:focus {
|
|
45
|
+
border-color: var(--input-focus-border-color);
|
|
46
|
+
}
|
|
28
47
|
}
|
|
29
48
|
</style>
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
2
|
text: string;
|
|
3
|
-
|
|
3
|
+
showClear: boolean;
|
|
4
4
|
clear: () => void;
|
|
5
5
|
placeholder: string;
|
|
6
|
+
type: string;
|
|
7
|
+
validation?: 'success' | 'warning' | 'error' | null;
|
|
8
|
+
validationText?: string;
|
|
6
9
|
};
|
|
7
10
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
8
11
|
"update:text": (value: string) => any;
|
|
@@ -1,46 +1,85 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
.KTextbox-wrapper(:class="$attrs.class" :style="$attrs.style")
|
|
3
|
+
KGrid(align="center" noGap wrap="nowrap" :class="validation ? `is-${validation}` : ''").KTextbox
|
|
4
|
+
input(v-bind="inputAttrs" :type="props.type" v-model="text" :placeholder="placeholder")
|
|
5
|
+
KIcon(v-if="showClear" @click.stop="clear" @mousedown.stop iconname="close" width="10" height="10").closeIcon
|
|
6
|
+
span.validation-text(v-if="validation && ['success', 'warning', 'error'].includes(validation) && validationText" :class="`is-${validation}`") {{ validationText }}
|
|
5
7
|
</template>
|
|
6
8
|
|
|
7
|
-
<script setup>
|
|
8
|
-
import { computed } from
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const
|
|
9
|
+
<script lang="ts" setup>
|
|
10
|
+
import { computed, useAttrs } from 'vue'
|
|
11
|
+
|
|
12
|
+
defineOptions({
|
|
13
|
+
inheritAttrs: false
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
// Default template for KTextbox
|
|
17
|
+
const props = defineProps<{
|
|
18
|
+
text: string
|
|
19
|
+
showClear: boolean
|
|
20
|
+
clear: () => void
|
|
21
|
+
placeholder: string
|
|
22
|
+
type: string
|
|
23
|
+
validation?: 'success' | 'warning' | 'error' | null
|
|
24
|
+
validationText?: string
|
|
25
|
+
}>()
|
|
26
|
+
|
|
27
|
+
const emit = defineEmits<{
|
|
28
|
+
(e: 'update:text', value: string): void
|
|
29
|
+
}>()
|
|
30
|
+
|
|
16
31
|
const text = computed({
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
})
|
|
32
|
+
get: () => props.text,
|
|
33
|
+
set: (value) => emit('update:text', value)
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
const attrs = useAttrs()
|
|
37
|
+
const inputAttrs = computed(() => {
|
|
38
|
+
const { class: _, style: __, ...rest } = attrs
|
|
39
|
+
return rest
|
|
40
|
+
})
|
|
20
41
|
</script>
|
|
21
42
|
|
|
22
|
-
<style scoped>
|
|
43
|
+
<style lang="scss" scoped>
|
|
23
44
|
.KTextbox {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
+
border: var(--input-border);
|
|
46
|
+
border-radius: var(--input-border-radius);
|
|
47
|
+
overflow: hidden;
|
|
48
|
+
background-color: var(--neutral-50);
|
|
49
|
+
height: 40px;
|
|
50
|
+
|
|
51
|
+
input {
|
|
52
|
+
background-color: var(--neutral-50);
|
|
53
|
+
box-sizing: border-box;
|
|
54
|
+
flex-grow: 1;
|
|
55
|
+
min-width: 0;
|
|
56
|
+
padding: var(--component-gap);
|
|
57
|
+
border: none;
|
|
58
|
+
outline: none;
|
|
59
|
+
|
|
60
|
+
/* Hide arrows in Chrome, Safari, Edge, Opera */
|
|
61
|
+
&::-webkit-outer-spin-button,
|
|
62
|
+
&::-webkit-inner-spin-button {
|
|
63
|
+
-webkit-appearance: none;
|
|
64
|
+
margin: 0;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/* Hide arrows in Firefox */
|
|
68
|
+
&[type=number] {
|
|
69
|
+
-moz-appearance: textfield;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.closeIcon {
|
|
74
|
+
padding-right: var(--component-gap);
|
|
75
|
+
color: var(--icon-color-medium);
|
|
76
|
+
cursor: pointer;
|
|
77
|
+
flex-shrink: 0;
|
|
78
|
+
min-width: 10px;
|
|
79
|
+
|
|
80
|
+
&:hover {
|
|
81
|
+
color: var(--icon-color-dark);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
45
84
|
}
|
|
46
85
|
</style>
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
2
|
text: string;
|
|
3
|
-
|
|
3
|
+
showClear: boolean;
|
|
4
4
|
clear: () => void;
|
|
5
5
|
placeholder: string;
|
|
6
|
+
type: string;
|
|
7
|
+
validation?: 'success' | 'warning' | 'error' | null;
|
|
8
|
+
validationText?: string;
|
|
6
9
|
};
|
|
7
10
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
8
11
|
"update:text": (value: string) => any;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { KToastType } from '../../../../components/KToast/KToast.logic.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
modelValue: boolean;
|
|
4
|
+
text?: string;
|
|
5
|
+
timeout?: number;
|
|
6
|
+
teleport?: boolean;
|
|
7
|
+
type?: KToastType;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
|
+
close: (...args: any[]) => void;
|
|
11
|
+
"update:modelValue": (...args: any[]) => void;
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
13
|
+
onClose?: ((...args: any[]) => any) | undefined;
|
|
14
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
15
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
export default _default;
|