@katlux/toolkit 0.1.0-beta.9 → 0.1.1-alpha.90
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/LICENSE +200 -21
- package/README.md +14 -5
- package/bin/add-ai-reference.mjs +85 -0
- package/dist/compiled/composables/usePresetComponent.mjs +43 -21
- package/dist/compiled/utils/PresetResolver.mjs +18 -12
- package/dist/module.cjs +120 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +121 -2
- package/dist/runtime/components/KBulkActions/KBulkActions.global.vue +2 -2
- package/dist/runtime/components/KBulkActions/KBulkActions.logic.d.ts +9 -0
- package/dist/runtime/components/KBulkActions/KBulkActions.logic.js +10 -3
- package/dist/runtime/components/KButton/KButton.global.d.vue.ts +9 -0
- package/dist/runtime/components/KButton/KButton.global.vue +2 -1
- package/dist/runtime/components/KButton/KButton.global.vue.d.ts +9 -0
- package/dist/runtime/components/KButton/KButton.logic.d.ts +7 -1
- package/dist/runtime/components/KButton/KButton.logic.js +5 -1
- 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 +86 -10
- package/dist/runtime/components/KCombobox/KCombobox.global.vue +19 -4
- package/dist/runtime/components/KCombobox/KCombobox.global.vue.d.ts +86 -10
- package/dist/runtime/components/KCombobox/KCombobox.logic.d.ts +47 -4
- package/dist/runtime/components/KCombobox/KCombobox.logic.js +84 -12
- package/dist/runtime/components/KCompositeInput/KCompositeInput.global.d.vue.ts +214 -0
- package/dist/runtime/components/KCompositeInput/KCompositeInput.global.vue +55 -0
- package/dist/runtime/components/KCompositeInput/KCompositeInput.global.vue.d.ts +214 -0
- package/dist/runtime/components/KCompositeInput/KCompositeInput.logic.d.ts +187 -0
- package/dist/runtime/components/KCompositeInput/KCompositeInput.logic.js +263 -0
- package/dist/runtime/components/KContextMenu/KContextMenu.global.d.vue.ts +53 -1
- package/dist/runtime/components/KContextMenu/KContextMenu.global.vue +20 -1
- package/dist/runtime/components/KContextMenu/KContextMenu.global.vue.d.ts +53 -1
- package/dist/runtime/components/KContextMenu/KContextMenu.logic.d.ts +53 -2
- package/dist/runtime/components/KContextMenu/KContextMenu.logic.js +167 -3
- package/dist/runtime/components/KDatatable/KDatatable.global.d.vue.ts +4 -0
- package/dist/runtime/components/KDatatable/KDatatable.global.vue +6 -2
- package/dist/runtime/components/KDatatable/KDatatable.global.vue.d.ts +4 -0
- package/dist/runtime/components/KDatatable/KDatatable.logic.d.ts +4 -0
- package/dist/runtime/components/KDatatable/KDatatable.logic.js +3 -1
- package/dist/runtime/components/KDatePicker/KDatePicker.global.d.vue.ts +104 -8
- package/dist/runtime/components/KDatePicker/KDatePicker.global.vue +28 -3
- package/dist/runtime/components/KDatePicker/KDatePicker.global.vue.d.ts +104 -8
- package/dist/runtime/components/KDatePicker/KDatePicker.logic.d.ts +48 -1
- package/dist/runtime/components/KDatePicker/KDatePicker.logic.js +118 -7
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.d.vue.ts +93 -8
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.vue +27 -3
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.global.vue.d.ts +93 -8
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.logic.d.ts +43 -1
- package/dist/runtime/components/KDateTimePicker/KDateTimePicker.logic.js +168 -7
- package/dist/runtime/components/KDropdown/KDropdown.global.d.vue.ts +36 -0
- package/dist/runtime/components/KDropdown/KDropdown.global.vue +15 -4
- package/dist/runtime/components/KDropdown/KDropdown.global.vue.d.ts +36 -0
- package/dist/runtime/components/KDropdown/KDropdown.logic.d.ts +58 -1
- package/dist/runtime/components/KDropdown/KDropdown.logic.js +152 -4
- package/dist/runtime/components/KGantt/KGantt.logic.d.ts +2 -2
- package/dist/runtime/components/KGrid/KGrid.global.d.vue.ts +8 -57
- package/dist/runtime/components/KGrid/KGrid.global.vue +9 -2
- package/dist/runtime/components/KGrid/KGrid.global.vue.d.ts +8 -57
- package/dist/runtime/components/KHourPicker/KHourPicker.global.d.vue.ts +50 -0
- package/dist/runtime/components/KHourPicker/KHourPicker.global.vue +28 -12
- package/dist/runtime/components/KHourPicker/KHourPicker.global.vue.d.ts +50 -0
- package/dist/runtime/components/KHourPicker/KHourPicker.logic.d.ts +31 -3
- package/dist/runtime/components/KHourPicker/KHourPicker.logic.js +38 -10
- package/dist/runtime/components/KHourSelect/KHourSelect.global.d.vue.ts +9 -0
- package/dist/runtime/components/KHourSelect/KHourSelect.global.vue +1 -0
- package/dist/runtime/components/KHourSelect/KHourSelect.global.vue.d.ts +9 -0
- package/dist/runtime/components/KHourSelect/KHourSelect.logic.d.ts +5 -0
- package/dist/runtime/components/KHourSelect/KHourSelect.logic.js +8 -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 +30 -0
- package/dist/runtime/components/KMaskTextbox/KMaskTextbox.global.vue +5 -2
- package/dist/runtime/components/KMaskTextbox/KMaskTextbox.global.vue.d.ts +30 -0
- package/dist/runtime/components/KMaskTextbox/KMaskTextbox.logic.d.ts +16 -0
- package/dist/runtime/components/KMaskTextbox/KMaskTextbox.logic.js +23 -5
- package/dist/runtime/components/KModal/KModal.global.d.vue.ts +14 -2
- package/dist/runtime/components/KModal/KModal.global.vue +6 -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/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/KRangeSlider/KRangeSlider.global.d.vue.ts +9 -0
- package/dist/runtime/components/KRangeSlider/KRangeSlider.global.vue +1 -0
- package/dist/runtime/components/KRangeSlider/KRangeSlider.global.vue.d.ts +9 -0
- package/dist/runtime/components/KRangeSlider/KRangeSlider.logic.d.ts +5 -0
- package/dist/runtime/components/KRangeSlider/KRangeSlider.logic.js +4 -0
- package/dist/runtime/components/KSearchTree/KSearchTree.logic.d.ts +7 -1
- package/dist/runtime/components/KSearchTree/KSearchTree.logic.js +6 -1
- package/dist/runtime/components/KSearchTreeDropdown/KSearchTreeDropdown.logic.d.ts +7 -1
- package/dist/runtime/components/KSearchTreeDropdown/KSearchTreeDropdown.logic.js +6 -1
- package/dist/runtime/components/KSlider/KSlider.global.d.vue.ts +9 -0
- package/dist/runtime/components/KSlider/KSlider.global.vue +1 -0
- package/dist/runtime/components/KSlider/KSlider.global.vue.d.ts +9 -0
- package/dist/runtime/components/KSlider/KSlider.logic.d.ts +5 -0
- package/dist/runtime/components/KSlider/KSlider.logic.js +4 -0
- package/dist/runtime/components/KTextarea/KTextarea.global.d.vue.ts +30 -0
- package/dist/runtime/components/KTextarea/KTextarea.global.vue +4 -1
- package/dist/runtime/components/KTextarea/KTextarea.global.vue.d.ts +30 -0
- package/dist/runtime/components/KTextarea/KTextarea.logic.d.ts +16 -0
- package/dist/runtime/components/KTextarea/KTextarea.logic.js +13 -0
- package/dist/runtime/components/KTextbox/KTextbox.global.d.vue.ts +44 -2
- package/dist/runtime/components/KTextbox/KTextbox.global.vue +8 -4
- package/dist/runtime/components/KTextbox/KTextbox.global.vue.d.ts +44 -2
- package/dist/runtime/components/KTextbox/KTextbox.logic.d.ts +26 -4
- package/dist/runtime/components/KTextbox/KTextbox.logic.js +25 -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/KTooltip/KTooltip.global.d.vue.ts +31 -1
- package/dist/runtime/components/KTooltip/KTooltip.global.vue +20 -1
- package/dist/runtime/components/KTooltip/KTooltip.global.vue.d.ts +31 -1
- package/dist/runtime/components/KTooltip/KTooltip.logic.d.ts +25 -2
- package/dist/runtime/components/KTooltip/KTooltip.logic.js +81 -3
- package/dist/runtime/components/KTreePicker/KTreePicker.global.d.vue.ts +74 -7
- package/dist/runtime/components/KTreePicker/KTreePicker.global.vue +16 -3
- package/dist/runtime/components/KTreePicker/KTreePicker.global.vue.d.ts +74 -7
- package/dist/runtime/components/KTreePicker/KTreePicker.logic.d.ts +38 -1
- package/dist/runtime/components/KTreePicker/KTreePicker.logic.js +36 -1
- package/dist/runtime/components/KTreeView/KTreeView.global.d.vue.ts +6 -6
- package/dist/runtime/components/KTreeView/KTreeView.global.vue.d.ts +6 -6
- package/dist/runtime/components/KTreeView/KTreeView.logic.d.ts +2 -7
- package/dist/runtime/components/MultiTabs/MultiTabs.global.d.vue.ts +23 -0
- package/dist/runtime/components/MultiTabs/MultiTabs.global.vue +27 -0
- package/dist/runtime/components/MultiTabs/MultiTabs.global.vue.d.ts +23 -0
- package/dist/runtime/components/MultiTabs/MultiTabs.logic.d.ts +25 -0
- package/dist/runtime/components/MultiTabs/MultiTabs.logic.js +52 -0
- package/dist/runtime/composables/usePresetComponent.d.ts +16 -0
- package/dist/runtime/composables/usePresetComponent.js +43 -21
- package/dist/runtime/presets/default/assets/scss/css-variables.css +96 -17
- package/dist/runtime/presets/default/assets/scss/css-variables.scss +320 -0
- package/dist/runtime/presets/default/assets/scss/docs.scss +52 -0
- package/dist/runtime/presets/default/assets/scss/index.css +191 -17
- package/dist/runtime/presets/default/assets/scss/index.scss +86 -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/assets/svg/arrow-down.svg +4 -0
- package/dist/runtime/presets/default/assets/svg/arrow-left.svg +4 -0
- package/dist/runtime/presets/default/assets/svg/arrow-right.svg +4 -0
- package/dist/runtime/presets/default/assets/svg/arrow-up.svg +4 -0
- package/dist/runtime/presets/default/assets/svg/bell.svg +4 -0
- package/dist/runtime/presets/default/assets/svg/camera.svg +4 -0
- package/dist/runtime/presets/default/assets/svg/clock.svg +4 -0
- package/dist/runtime/presets/default/assets/svg/copy.svg +4 -0
- package/dist/runtime/presets/default/assets/svg/divide.svg +5 -0
- package/dist/runtime/presets/default/assets/svg/download.svg +5 -0
- package/dist/runtime/presets/default/assets/svg/edit.svg +4 -0
- package/dist/runtime/presets/default/assets/svg/external-link.svg +5 -0
- package/dist/runtime/presets/default/assets/svg/eye-off.svg +4 -0
- package/dist/runtime/presets/default/assets/svg/eye.svg +4 -0
- package/dist/runtime/presets/default/assets/svg/hash.svg +6 -0
- package/dist/runtime/presets/default/assets/svg/heart.svg +3 -0
- package/dist/runtime/presets/default/assets/svg/home.svg +4 -0
- package/dist/runtime/presets/default/assets/svg/image.svg +5 -0
- package/dist/runtime/presets/default/assets/svg/info.svg +5 -0
- package/dist/runtime/presets/default/assets/svg/link.svg +4 -0
- package/dist/runtime/presets/default/assets/svg/lock.svg +4 -0
- package/dist/runtime/presets/default/assets/svg/logout.svg +5 -0
- package/dist/runtime/presets/default/assets/svg/mail.svg +4 -0
- package/dist/runtime/presets/default/assets/svg/map-pin.svg +4 -0
- package/dist/runtime/presets/default/assets/svg/menu.svg +5 -0
- package/dist/runtime/presets/default/assets/svg/message-square.svg +3 -0
- package/dist/runtime/presets/default/assets/svg/minus.svg +3 -0
- package/dist/runtime/presets/default/assets/svg/more-vertical.svg +5 -0
- package/dist/runtime/presets/default/assets/svg/multiply.svg +3 -0
- package/dist/runtime/presets/default/assets/svg/phone.svg +3 -0
- package/dist/runtime/presets/default/assets/svg/plus.svg +4 -0
- package/dist/runtime/presets/default/assets/svg/refresh.svg +5 -0
- package/dist/runtime/presets/default/assets/svg/settings.svg +4 -0
- package/dist/runtime/presets/default/assets/svg/share.svg +5 -0
- package/dist/runtime/presets/default/assets/svg/shopping-bag.svg +5 -0
- package/dist/runtime/presets/default/assets/svg/star.svg +3 -0
- package/dist/runtime/presets/default/assets/svg/trash.svg +4 -0
- package/dist/runtime/presets/default/assets/svg/type.svg +5 -0
- package/dist/runtime/presets/default/assets/svg/upload.svg +5 -0
- package/dist/runtime/presets/default/assets/svg/warning.svg +5 -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 +43 -23
- package/dist/runtime/presets/default/components/KButton/KButton.vue +176 -430
- package/dist/runtime/presets/default/components/KCalendar/KCalendar.vue +69 -53
- package/dist/runtime/presets/default/components/KCalendar/KCalendarMonth.vue +195 -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 +8 -0
- package/dist/runtime/presets/default/components/KCombobox/KCombobox.vue +129 -79
- package/dist/runtime/presets/default/components/KCombobox/KCombobox.vue.d.ts +8 -0
- package/dist/runtime/presets/default/components/KCombobox/KComboboxList.d.vue.ts +1 -0
- package/dist/runtime/presets/default/components/KCombobox/KComboboxList.vue +85 -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 +34 -0
- package/dist/runtime/presets/default/components/KCompositeInput/KCompositeInput.vue +234 -0
- package/dist/runtime/presets/default/components/KCompositeInput/KCompositeInput.vue.d.ts +34 -0
- package/dist/runtime/presets/default/components/KContextMenu/KContextMenu.d.vue.ts +20 -1
- package/dist/runtime/presets/default/components/KContextMenu/KContextMenu.vue +60 -3
- package/dist/runtime/presets/default/components/KContextMenu/KContextMenu.vue.d.ts +20 -1
- package/dist/runtime/presets/default/components/KDataIterator/KDataIterator.vue +40 -31
- package/dist/runtime/presets/default/components/KDatatable/KDatatable.d.vue.ts +2 -0
- package/dist/runtime/presets/default/components/KDatatable/KDatatable.vue +150 -93
- package/dist/runtime/presets/default/components/KDatatable/KDatatable.vue.d.ts +2 -0
- package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.d.vue.ts +8 -0
- package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.vue +60 -25
- package/dist/runtime/presets/default/components/KDatePicker/KDatePicker.vue.d.ts +8 -0
- package/dist/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.d.vue.ts +7 -0
- package/dist/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.vue +85 -52
- package/dist/runtime/presets/default/components/KDateTimePicker/KDateTimePicker.vue.d.ts +7 -0
- package/dist/runtime/presets/default/components/KDropdown/KDropdown.d.vue.ts +16 -0
- package/dist/runtime/presets/default/components/KDropdown/KDropdown.vue +109 -25
- package/dist/runtime/presets/default/components/KDropdown/KDropdown.vue.d.ts +16 -0
- package/dist/runtime/presets/default/components/KGantt/KGantt.d.vue.ts +2 -2
- package/dist/runtime/presets/default/components/KGantt/KGantt.vue +343 -247
- package/dist/runtime/presets/default/components/KGantt/KGantt.vue.d.ts +2 -2
- 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 +63 -60
- package/dist/runtime/presets/default/components/KHourPicker/KHourPicker.d.vue.ts +9 -2
- package/dist/runtime/presets/default/components/KHourPicker/KHourPicker.vue +50 -28
- package/dist/runtime/presets/default/components/KHourPicker/KHourPicker.vue.d.ts +9 -2
- package/dist/runtime/presets/default/components/KHourSelect/KHourSelect.d.vue.ts +1 -0
- package/dist/runtime/presets/default/components/KHourSelect/KHourSelect.vue +39 -28
- package/dist/runtime/presets/default/components/KHourSelect/KHourSelect.vue.d.ts +1 -0
- 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 +3 -0
- package/dist/runtime/presets/default/components/KMaskTextbox/KMaskTextbox.vue +119 -84
- package/dist/runtime/presets/default/components/KMaskTextbox/KMaskTextbox.vue.d.ts +3 -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 +100 -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 +46 -35
- package/dist/runtime/presets/default/components/KRadiobox/KRadiobox.vue.d.ts +2 -0
- package/dist/runtime/presets/default/components/KRangeSlider/KRangeSlider.d.vue.ts +1 -0
- package/dist/runtime/presets/default/components/KRangeSlider/KRangeSlider.vue +160 -125
- package/dist/runtime/presets/default/components/KRangeSlider/KRangeSlider.vue.d.ts +1 -0
- package/dist/runtime/presets/default/components/KSearchTree/KSearchTree.d.vue.ts +4 -1
- package/dist/runtime/presets/default/components/KSearchTree/KSearchTree.vue +9 -1
- package/dist/runtime/presets/default/components/KSearchTree/KSearchTree.vue.d.ts +4 -1
- package/dist/runtime/presets/default/components/KSearchTreeDropdown/KSearchTreeDropdown.d.vue.ts +4 -1
- package/dist/runtime/presets/default/components/KSearchTreeDropdown/KSearchTreeDropdown.vue +9 -1
- package/dist/runtime/presets/default/components/KSearchTreeDropdown/KSearchTreeDropdown.vue.d.ts +4 -1
- package/dist/runtime/presets/default/components/KSlider/KSlider.d.vue.ts +1 -0
- package/dist/runtime/presets/default/components/KSlider/KSlider.vue +125 -100
- package/dist/runtime/presets/default/components/KSlider/KSlider.vue.d.ts +1 -0
- package/dist/runtime/presets/default/components/KTabs/KTabItem.vue +41 -38
- package/dist/runtime/presets/default/components/KTabs/KTabs.vue +105 -8
- package/dist/runtime/presets/default/components/KTextarea/KTextarea.d.vue.ts +3 -0
- package/dist/runtime/presets/default/components/KTextarea/KTextarea.vue +48 -21
- package/dist/runtime/presets/default/components/KTextarea/KTextarea.vue.d.ts +3 -0
- package/dist/runtime/presets/default/components/KTextbox/KTextbox.d.vue.ts +5 -1
- package/dist/runtime/presets/default/components/KTextbox/KTextbox.vue +110 -37
- package/dist/runtime/presets/default/components/KTextbox/KTextbox.vue.d.ts +5 -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/KTooltip/KTooltip.d.vue.ts +14 -1
- package/dist/runtime/presets/default/components/KTooltip/KTooltip.vue +71 -3
- package/dist/runtime/presets/default/components/KTooltip/KTooltip.vue.d.ts +14 -1
- package/dist/runtime/presets/default/components/KTree/KTree.vue +103 -80
- package/dist/runtime/presets/default/components/KTreePicker/KTreePicker.d.vue.ts +7 -0
- package/dist/runtime/presets/default/components/KTreePicker/KTreePicker.vue +96 -55
- package/dist/runtime/presets/default/components/KTreePicker/KTreePicker.vue.d.ts +7 -0
- package/dist/runtime/presets/default/components/KTreeView/KTreeCell.vue +31 -30
- package/dist/runtime/presets/default/components/KTreeView/KTreeView.d.vue.ts +2 -2
- package/dist/runtime/presets/default/components/KTreeView/KTreeView.vue +34 -27
- package/dist/runtime/presets/default/components/KTreeView/KTreeView.vue.d.ts +2 -2
- package/dist/runtime/presets/default/components/MultiTabs/MultiTabs.d.vue.ts +9 -0
- package/dist/runtime/presets/default/components/MultiTabs/MultiTabs.vue +61 -0
- package/dist/runtime/presets/default/components/MultiTabs/MultiTabs.vue.d.ts +9 -0
- package/dist/runtime/utils/PresetResolver.d.ts +8 -9
- package/dist/runtime/utils/PresetResolver.js +18 -12
- package/package.json +11 -7
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
2
|
.k-datatable(:style="{ '--page-size': props.dataProvider?.pageSize?.value || 10 }")
|
|
3
|
-
KGrid(:flex-child="true")
|
|
3
|
+
KGrid(:flex-child="true" align="stretch" direction="column")
|
|
4
4
|
.datatable-container
|
|
5
5
|
KLoader(:loading="isLoading" overlay)
|
|
6
6
|
table
|
|
@@ -19,6 +19,10 @@
|
|
|
19
19
|
th(v-if="props.rowActions && props.rowActions.length>0")
|
|
20
20
|
|
|
21
21
|
tbody
|
|
22
|
+
tr.empty-row(v-if="!isLoading && (!props.dataProvider.pageData.value || props.dataProvider.pageData.value.length === 0)")
|
|
23
|
+
td.empty-state(:colspan="(visibleFields || props.dataProvider.fields || []).length + (props.bulkActions && props.bulkActions.length > 0 ? 1 : 0) + (props.rowActions && props.rowActions.length > 0 ? 1 : 0)")
|
|
24
|
+
span(v-if="props.dataProvider.filter.value?.active") {{ props.emptyFilterStateText || 'no result found for filter' }}
|
|
25
|
+
span(v-else) {{ props.emptyStateText || 'no result' }}
|
|
22
26
|
tr(v-for="(row, index) in props.dataProvider.pageData.value" :key="index")
|
|
23
27
|
td.check(v-if="props.bulkActions && props.bulkActions.length>0")
|
|
24
28
|
KCheckbox(:value="row" v-model="selectedRows")
|
|
@@ -31,108 +35,161 @@
|
|
|
31
35
|
component(v-if="getCellSlot(visibleField)" :is="getCellSlot(visibleField)" :row="row" :field="visibleField" :value="row[visibleField]")
|
|
32
36
|
span(v-else) {{ row[visibleField] }}
|
|
33
37
|
td.rowAction(v-if="props.rowActions && props.rowActions.length>0")
|
|
34
|
-
|
|
38
|
+
template(v-for="rowAction in props.rowActions" :key="rowAction.label")
|
|
39
|
+
KTooltip(
|
|
40
|
+
v-if="!rowAction.visible || rowAction.visible(row)"
|
|
41
|
+
:text="rowAction.label"
|
|
42
|
+
:disabled="!(rowAction.iconOnly || !!rowAction.icon)"
|
|
43
|
+
)
|
|
44
|
+
KButton(
|
|
45
|
+
size="small"
|
|
46
|
+
:type="rowAction.type || 'default'"
|
|
47
|
+
:iconOnly="rowAction.iconOnly || !!rowAction.icon"
|
|
48
|
+
@click="rowAction.action(row)"
|
|
49
|
+
)
|
|
50
|
+
template(#icon v-if="rowAction.icon")
|
|
51
|
+
KIcon(:iconname="rowAction.icon" :width="16" :height="16")
|
|
52
|
+
template(#default v-if="!rowAction.iconOnly && !rowAction.icon") {{rowAction.label}}
|
|
35
53
|
.footer
|
|
36
54
|
KBulkActions.bulk-actions(v-if="props.bulkActions && props.bulkActions.length>0" :bulkActions="props.bulkActions" :selectedRows="selectedRows" :selectAll="selectAll")
|
|
37
55
|
KPagination.pagination(:dataProvider="props.dataProvider")
|
|
38
56
|
</template>
|
|
39
57
|
|
|
40
|
-
<script setup>
|
|
41
|
-
import { computed } from
|
|
42
|
-
import { ADataProvider } from
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
58
|
+
<script setup lang="ts">
|
|
59
|
+
import { computed } from 'vue'
|
|
60
|
+
import { ADataProvider } from '@katlux/providers'
|
|
61
|
+
import type { IKDatatableAction } from '@katlux/providers'
|
|
62
|
+
|
|
63
|
+
const props = defineProps<{
|
|
64
|
+
dataProvider: ADataProvider
|
|
65
|
+
visibleFields: Array<string> | null
|
|
66
|
+
rowActions: Array<IKDatatableAction>
|
|
67
|
+
bulkActions: Array<IKDatatableAction>
|
|
68
|
+
selectedRows: any[]
|
|
69
|
+
selectAll: boolean
|
|
70
|
+
cellSlots?: Record<string, any>
|
|
71
|
+
headerSlots?: Record<string, any>
|
|
72
|
+
columnHeaders?: Record<string, string>
|
|
73
|
+
columnWidths?: Record<string, string>
|
|
74
|
+
emptyStateText?: string
|
|
75
|
+
emptyFilterStateText?: string
|
|
76
|
+
}>()
|
|
77
|
+
|
|
78
|
+
const emit = defineEmits<{
|
|
79
|
+
(e: 'update:selectedRows', value: any[]): void
|
|
80
|
+
(e: 'update:selectAll', value: boolean): void
|
|
81
|
+
}>()
|
|
82
|
+
|
|
83
|
+
// Bi-directional binding helpers
|
|
56
84
|
const selectedRows = computed({
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
})
|
|
85
|
+
get: () => props.selectedRows,
|
|
86
|
+
set: (val) => emit('update:selectedRows', val)
|
|
87
|
+
})
|
|
88
|
+
|
|
60
89
|
const selectAll = computed({
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
})
|
|
64
|
-
const getCellSlot = (fieldName) => {
|
|
65
|
-
const slotName = "cell-" + fieldName;
|
|
66
|
-
return props.cellSlots?.[slotName];
|
|
67
|
-
};
|
|
68
|
-
const getHeaderSlot = (fieldName) => {
|
|
69
|
-
const slotName = "header-" + fieldName;
|
|
70
|
-
return props.headerSlots?.[slotName] || props.cellSlots?.[slotName];
|
|
71
|
-
};
|
|
72
|
-
const getColumnStyle = (field) => {
|
|
73
|
-
const w = props.columnWidths?.[field];
|
|
74
|
-
if (!w) return void 0;
|
|
75
|
-
return { width: w, whiteSpace: "nowrap" };
|
|
76
|
-
};
|
|
77
|
-
const isLoading = computed(() => {
|
|
78
|
-
return props.dataProvider.loading.value || props.dataProvider.initialLoad?.value || false;
|
|
79
|
-
});
|
|
80
|
-
</script>
|
|
90
|
+
get: () => props.selectAll,
|
|
91
|
+
set: (val) => emit('update:selectAll', val)
|
|
92
|
+
})
|
|
81
93
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
width: 100%;
|
|
86
|
-
}
|
|
87
|
-
.k-datatable .datatable-container {
|
|
88
|
-
min-height: calc(var(--page-height) * (var(--page-size) + 1));
|
|
89
|
-
position: relative;
|
|
90
|
-
}
|
|
91
|
-
.k-datatable table {
|
|
92
|
-
width: 100%;
|
|
93
|
-
border-collapse: collapse;
|
|
94
|
-
border: 1px solid #cccccc;
|
|
95
|
-
}
|
|
96
|
-
.k-datatable table thead tr {
|
|
97
|
-
height: var(--page-height);
|
|
98
|
-
}
|
|
99
|
-
.k-datatable table thead tr th {
|
|
100
|
-
border-bottom: 1px solid #cccccc;
|
|
101
|
-
border-left: 1px solid #cccccc;
|
|
102
|
-
padding: 5px;
|
|
103
|
-
}
|
|
104
|
-
.k-datatable table thead tr th:first-child {
|
|
105
|
-
border-left: none;
|
|
106
|
-
}
|
|
107
|
-
.k-datatable table tbody tr {
|
|
108
|
-
height: 40px;
|
|
109
|
-
background-color: #faf8f8;
|
|
94
|
+
const getCellSlot = (fieldName: string) => {
|
|
95
|
+
const slotName = 'cell-' + fieldName
|
|
96
|
+
return props.cellSlots?.[slotName]
|
|
110
97
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
.
|
|
115
|
-
background-color: #f5e2e2;
|
|
116
|
-
}
|
|
117
|
-
.k-datatable table tbody tr td {
|
|
118
|
-
padding: 5px;
|
|
119
|
-
}
|
|
120
|
-
.k-datatable .check {
|
|
121
|
-
width: 30px;
|
|
122
|
-
}
|
|
123
|
-
.k-datatable .rowAction {
|
|
124
|
-
width: 30px;
|
|
125
|
-
}
|
|
126
|
-
.k-datatable .rowAction {
|
|
127
|
-
display: flex;
|
|
128
|
-
gap: 10px;
|
|
98
|
+
|
|
99
|
+
const getHeaderSlot = (fieldName: string) => {
|
|
100
|
+
const slotName = 'header-' + fieldName
|
|
101
|
+
return props.headerSlots?.[slotName] || props.cellSlots?.[slotName]
|
|
129
102
|
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
103
|
+
|
|
104
|
+
const getColumnStyle = (field: string) => {
|
|
105
|
+
const w = props.columnWidths?.[field]
|
|
106
|
+
if (!w) return undefined
|
|
107
|
+
return { width: w, whiteSpace: 'nowrap' as const }
|
|
134
108
|
}
|
|
135
|
-
|
|
136
|
-
|
|
109
|
+
|
|
110
|
+
const isLoading = computed(() => {
|
|
111
|
+
return props.dataProvider.loading.value || (props.dataProvider as any).initialLoad?.value || false
|
|
112
|
+
})
|
|
113
|
+
</script>
|
|
114
|
+
|
|
115
|
+
<style lang="scss" scoped>
|
|
116
|
+
.k-datatable {
|
|
117
|
+
--page-height: 40px;
|
|
118
|
+
width: 100%;
|
|
119
|
+
.datatable-container {
|
|
120
|
+
min-height: calc(var(--page-height) * (var(--page-size) + 1));
|
|
121
|
+
position: relative; // Ensure loader overlay is contained
|
|
122
|
+
}
|
|
123
|
+
table {
|
|
124
|
+
width: 100%;
|
|
125
|
+
border-collapse: collapse;
|
|
126
|
+
border: 1px solid var(--table-border-color);
|
|
127
|
+
thead {
|
|
128
|
+
tr {
|
|
129
|
+
background-color: var(--table-header-bg);
|
|
130
|
+
height: var(--page-height);
|
|
131
|
+
th {
|
|
132
|
+
color: var(--table-header-color);
|
|
133
|
+
border-bottom: 1px solid var(--table-border-color);
|
|
134
|
+
border-left: 1px solid var(--table-border-color);
|
|
135
|
+
padding: 5px;
|
|
136
|
+
&:first-child {
|
|
137
|
+
border-left: none;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
tbody {
|
|
143
|
+
tr {
|
|
144
|
+
height: 40px;
|
|
145
|
+
background-color: var(--table-row-bg);
|
|
146
|
+
color: var(--table-row-text-color);
|
|
147
|
+
&:nth-child(2n + 1) {
|
|
148
|
+
background-color: var(--table-row-alt-bg);
|
|
149
|
+
}
|
|
150
|
+
&:hover {
|
|
151
|
+
background-color: var(--table-row-hover-bg);
|
|
152
|
+
}
|
|
153
|
+
td {
|
|
154
|
+
padding: 5px;
|
|
155
|
+
border-bottom: 1px solid var(--table-border-color);
|
|
156
|
+
border-left: 1px solid var(--table-border-color);
|
|
157
|
+
&:first-child {
|
|
158
|
+
border-left: none;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
td.empty-state {
|
|
162
|
+
text-align: center;
|
|
163
|
+
padding: 20px;
|
|
164
|
+
color: var(--font-color-secondary);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
.check {
|
|
170
|
+
width: 30px;
|
|
171
|
+
}
|
|
172
|
+
.rowAction {
|
|
173
|
+
width: 1%;
|
|
174
|
+
white-space: nowrap;
|
|
175
|
+
|
|
176
|
+
& > * {
|
|
177
|
+
display: inline-block;
|
|
178
|
+
margin-right: 10px;
|
|
179
|
+
vertical-align: middle;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
& > *:last-child {
|
|
183
|
+
margin-right: 0;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
.footer {
|
|
187
|
+
display: flex;
|
|
188
|
+
justify-content: space-between;
|
|
189
|
+
align-items: center;
|
|
190
|
+
.pagination {
|
|
191
|
+
flex: 1;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
137
194
|
}
|
|
138
195
|
</style>
|
|
@@ -11,6 +11,8 @@ type __VLS_Props = {
|
|
|
11
11
|
headerSlots?: Record<string, any>;
|
|
12
12
|
columnHeaders?: Record<string, string>;
|
|
13
13
|
columnWidths?: Record<string, string>;
|
|
14
|
+
emptyStateText?: string;
|
|
15
|
+
emptyFilterStateText?: string;
|
|
14
16
|
};
|
|
15
17
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
16
18
|
"update:selectedRows": (value: any[]) => any;
|
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
import type { IMarkedDay, IDefinedDay } from '../../../../components/KCalendar/types.js';
|
|
2
2
|
type __VLS_Props = {
|
|
3
|
+
label?: string;
|
|
3
4
|
maskedModel: string;
|
|
4
5
|
calendarShow: boolean;
|
|
5
6
|
_date: any;
|
|
6
7
|
calendarDay: Date | string;
|
|
7
8
|
format: string;
|
|
9
|
+
showClear: boolean;
|
|
8
10
|
calendarDefinedDays: IDefinedDay[];
|
|
9
11
|
calendarMarkedDays: IMarkedDay[];
|
|
10
12
|
textboxClicked: () => void;
|
|
13
|
+
onClear?: () => void;
|
|
11
14
|
dateSelected: (date: Date) => void;
|
|
15
|
+
teleportTo?: string;
|
|
16
|
+
placeholder?: string;
|
|
17
|
+
validation?: 'success' | 'warning' | 'error' | null;
|
|
18
|
+
validationText?: string;
|
|
19
|
+
align?: 'left' | 'right';
|
|
12
20
|
};
|
|
13
21
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
14
22
|
"update:maskedModel": (value: string) => any;
|
|
@@ -1,33 +1,68 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
|
-
.KDatePicker
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
.KDatePicker(ref="activatorRef")
|
|
3
|
+
label.k-input-label(v-if="label") {{ label }}
|
|
4
|
+
KMaskTextbox(
|
|
5
|
+
v-model="maskedModel"
|
|
6
|
+
:key="maskedModel"
|
|
7
|
+
:mask="format"
|
|
8
|
+
:placeholder="placeholder || format"
|
|
9
|
+
@click.stop="textboxClicked"
|
|
10
|
+
:showClear="showClear"
|
|
11
|
+
@clear="onClear"
|
|
12
|
+
:validation="validation"
|
|
13
|
+
:validationText="validationText"
|
|
14
|
+
)
|
|
15
|
+
KDropdown(v-model:isOpen="calendarShow" :anchorEl="activatorRef" :teleportTo="teleportTo" :align="align")
|
|
5
16
|
KCalendar(view="month" :viewCount="1" :day="calendarDay" :selectedDay="_date" @dayClicked="dateSelected" :definedDays="calendarDefinedDays" :markedDays="calendarMarkedDays")
|
|
6
17
|
</template>
|
|
7
18
|
|
|
8
|
-
<script setup>
|
|
9
|
-
import { computed, watch } from
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
<script lang="ts" setup>
|
|
20
|
+
import { computed, watch, ref } from 'vue'
|
|
21
|
+
const activatorRef = ref<HTMLElement | null>(null)
|
|
22
|
+
import type {
|
|
23
|
+
IMarkedDay,
|
|
24
|
+
IDefinedDay,
|
|
25
|
+
} from '../../../../components/KCalendar/types'
|
|
26
|
+
|
|
27
|
+
const props = defineProps<{
|
|
28
|
+
label?: string
|
|
29
|
+
maskedModel: string
|
|
30
|
+
calendarShow: boolean
|
|
31
|
+
_date: any
|
|
32
|
+
calendarDay: Date | string
|
|
33
|
+
format: string
|
|
34
|
+
showClear: boolean
|
|
35
|
+
calendarDefinedDays: IDefinedDay[]
|
|
36
|
+
calendarMarkedDays: IMarkedDay[]
|
|
37
|
+
textboxClicked: () => void
|
|
38
|
+
onClear?: () => void
|
|
39
|
+
dateSelected: (date: Date) => void
|
|
40
|
+
teleportTo?: string
|
|
41
|
+
placeholder?: string
|
|
42
|
+
validation?: 'success' | 'warning' | 'error' | null
|
|
43
|
+
validationText?: string
|
|
44
|
+
align?: 'left' | 'right'
|
|
45
|
+
}>()
|
|
46
|
+
|
|
47
|
+
const emit = defineEmits<{
|
|
48
|
+
(e: 'update:maskedModel', value: string): void
|
|
49
|
+
(e: 'update:calendarShow', value: boolean): void
|
|
50
|
+
}>()
|
|
51
|
+
|
|
22
52
|
const maskedModel = computed({
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
})
|
|
53
|
+
get: () => props.maskedModel,
|
|
54
|
+
set: (value) => emit('update:maskedModel', value)
|
|
55
|
+
})
|
|
56
|
+
|
|
26
57
|
const calendarShow = computed({
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
})
|
|
58
|
+
get: () => props.calendarShow,
|
|
59
|
+
set: (value) => emit('update:calendarShow', value)
|
|
60
|
+
})
|
|
61
|
+
|
|
62
|
+
// Debug: watch prop changes
|
|
30
63
|
watch(() => props.maskedModel, (newVal) => {
|
|
31
|
-
|
|
32
|
-
});
|
|
64
|
+
})
|
|
33
65
|
</script>
|
|
66
|
+
|
|
67
|
+
<style lang="scss" scoped>
|
|
68
|
+
</style>
|
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
import type { IMarkedDay, IDefinedDay } from '../../../../components/KCalendar/types.js';
|
|
2
2
|
type __VLS_Props = {
|
|
3
|
+
label?: string;
|
|
3
4
|
maskedModel: string;
|
|
4
5
|
calendarShow: boolean;
|
|
5
6
|
_date: any;
|
|
6
7
|
calendarDay: Date | string;
|
|
7
8
|
format: string;
|
|
9
|
+
showClear: boolean;
|
|
8
10
|
calendarDefinedDays: IDefinedDay[];
|
|
9
11
|
calendarMarkedDays: IMarkedDay[];
|
|
10
12
|
textboxClicked: () => void;
|
|
13
|
+
onClear?: () => void;
|
|
11
14
|
dateSelected: (date: Date) => void;
|
|
15
|
+
teleportTo?: string;
|
|
16
|
+
placeholder?: string;
|
|
17
|
+
validation?: 'success' | 'warning' | 'error' | null;
|
|
18
|
+
validationText?: string;
|
|
19
|
+
align?: 'left' | 'right';
|
|
12
20
|
};
|
|
13
21
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
14
22
|
"update:maskedModel": (value: string) => any;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { IMarkedDay, IDefinedDay } from '../../../../components/KCalendar/types.js';
|
|
2
2
|
type __VLS_Props = {
|
|
3
|
+
label?: string;
|
|
3
4
|
maskedModel: string;
|
|
4
5
|
calendarShow: boolean;
|
|
5
6
|
_date: any;
|
|
@@ -10,9 +11,15 @@ type __VLS_Props = {
|
|
|
10
11
|
timeStep: number;
|
|
11
12
|
calendarDefinedDays: IDefinedDay[];
|
|
12
13
|
calendarMarkedDays: IMarkedDay[];
|
|
14
|
+
showClear: boolean;
|
|
13
15
|
textboxClicked: () => void;
|
|
16
|
+
onClear?: () => void;
|
|
14
17
|
dateSelected: (date: Date) => void;
|
|
15
18
|
timeSelected: (time: string) => void;
|
|
19
|
+
teleportTo?: string;
|
|
20
|
+
placeholder?: string;
|
|
21
|
+
validation?: 'success' | 'warning' | 'error' | null;
|
|
22
|
+
validationText?: string;
|
|
16
23
|
};
|
|
17
24
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
18
25
|
"update:maskedModel": (value: string) => any;
|
|
@@ -1,66 +1,99 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
|
-
.KDateTimePicker
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
.KDateTimePicker(ref="activatorRef" @click.stop="textboxClicked")
|
|
3
|
+
label.k-input-label(v-if="label") {{ label }}
|
|
4
|
+
KMaskTextbox(
|
|
5
|
+
v-model="maskedModel"
|
|
6
|
+
:key="maskedModel"
|
|
7
|
+
:mask="format"
|
|
8
|
+
:placeholder="placeholder || (format || 'MM-DD-YYYY HH:mm')"
|
|
9
|
+
@click.stop="textboxClicked"
|
|
10
|
+
:showClear="showClear"
|
|
11
|
+
@clear="onClear"
|
|
12
|
+
:validation="validation"
|
|
13
|
+
:validationText="validationText"
|
|
14
|
+
)
|
|
15
|
+
KDropdown(v-model:isOpen="calendarShow" :anchorEl="activatorRef" :teleportTo="teleportTo")
|
|
16
|
+
KGrid(direction="row" align="start" :noGap="false" wrap="nowrap").datetime-picker-grid
|
|
6
17
|
.calendar-section
|
|
7
18
|
KCalendar(view="month" :viewCount="1" :day="calendarDay" :selectedDay="_date" @dayClicked="dateSelected" :definedDays="calendarDefinedDays" :markedDays="calendarMarkedDays")
|
|
8
19
|
.time-section
|
|
9
20
|
KHourSelect(v-model="_time" :format="timeFormat" :step="timeStep" @update:modelValue="timeSelected")
|
|
10
21
|
</template>
|
|
11
22
|
|
|
12
|
-
<script setup>
|
|
13
|
-
import { computed } from
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
<script lang="ts" setup>
|
|
24
|
+
import { computed, watch, ref } from 'vue'
|
|
25
|
+
const activatorRef = ref<HTMLElement | null>(null)
|
|
26
|
+
import type {
|
|
27
|
+
IMarkedDay,
|
|
28
|
+
IDefinedDay,
|
|
29
|
+
} from '../../../../components/KCalendar/types'
|
|
30
|
+
|
|
31
|
+
const props = defineProps<{
|
|
32
|
+
label?: string
|
|
33
|
+
maskedModel: string
|
|
34
|
+
calendarShow: boolean
|
|
35
|
+
_date: any
|
|
36
|
+
_time: string
|
|
37
|
+
calendarDay: Date | string
|
|
38
|
+
format: string
|
|
39
|
+
timeFormat: string
|
|
40
|
+
timeStep: number
|
|
41
|
+
calendarDefinedDays: IDefinedDay[]
|
|
42
|
+
calendarMarkedDays: IMarkedDay[]
|
|
43
|
+
showClear: boolean
|
|
44
|
+
textboxClicked: () => void
|
|
45
|
+
onClear?: () => void
|
|
46
|
+
dateSelected: (date: Date) => void
|
|
47
|
+
timeSelected: (time: string) => void
|
|
48
|
+
teleportTo?: string
|
|
49
|
+
placeholder?: string
|
|
50
|
+
validation?: 'success' | 'warning' | 'error' | null
|
|
51
|
+
validationText?: string
|
|
52
|
+
}>()
|
|
53
|
+
|
|
54
|
+
const emit = defineEmits<{
|
|
55
|
+
(e: 'update:maskedModel', value: string): void
|
|
56
|
+
(e: 'update:calendarShow', value: boolean): void
|
|
57
|
+
}>()
|
|
58
|
+
|
|
30
59
|
const maskedModel = computed({
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
})
|
|
60
|
+
get: () => props.maskedModel,
|
|
61
|
+
set: (value) => emit('update:maskedModel', value)
|
|
62
|
+
})
|
|
63
|
+
|
|
34
64
|
const calendarShow = computed({
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
})
|
|
65
|
+
get: () => props.calendarShow,
|
|
66
|
+
set: (value) => emit('update:calendarShow', value)
|
|
67
|
+
})
|
|
68
|
+
|
|
38
69
|
const _time = computed({
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
})
|
|
70
|
+
get: () => props._time,
|
|
71
|
+
set: (value) => props.timeSelected(value)
|
|
72
|
+
})
|
|
42
73
|
</script>
|
|
43
74
|
|
|
44
|
-
<style scoped>
|
|
45
|
-
.KDateTimePicker
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
.
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
75
|
+
<style lang="scss" scoped>
|
|
76
|
+
.KDateTimePicker {
|
|
77
|
+
position: relative;
|
|
78
|
+
.datetime-picker-grid {
|
|
79
|
+
width: max-content;
|
|
80
|
+
padding: 8px;
|
|
81
|
+
background-color: var(--panel-bg-default);
|
|
82
|
+
color: var(--font-color-primary);
|
|
83
|
+
|
|
84
|
+
.calendar-section {
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.time-section {
|
|
88
|
+
min-width: 120px;
|
|
89
|
+
|
|
90
|
+
:deep(.KHourSelect) {
|
|
91
|
+
.time-list {
|
|
92
|
+
max-height: 310px;
|
|
93
|
+
overflow-y: auto;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
65
98
|
}
|
|
66
99
|
</style>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { IMarkedDay, IDefinedDay } from '../../../../components/KCalendar/types.js';
|
|
2
2
|
type __VLS_Props = {
|
|
3
|
+
label?: string;
|
|
3
4
|
maskedModel: string;
|
|
4
5
|
calendarShow: boolean;
|
|
5
6
|
_date: any;
|
|
@@ -10,9 +11,15 @@ type __VLS_Props = {
|
|
|
10
11
|
timeStep: number;
|
|
11
12
|
calendarDefinedDays: IDefinedDay[];
|
|
12
13
|
calendarMarkedDays: IMarkedDay[];
|
|
14
|
+
showClear: boolean;
|
|
13
15
|
textboxClicked: () => void;
|
|
16
|
+
onClear?: () => void;
|
|
14
17
|
dateSelected: (date: Date) => void;
|
|
15
18
|
timeSelected: (time: string) => void;
|
|
19
|
+
teleportTo?: string;
|
|
20
|
+
placeholder?: string;
|
|
21
|
+
validation?: 'success' | 'warning' | 'error' | null;
|
|
22
|
+
validationText?: string;
|
|
16
23
|
};
|
|
17
24
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
18
25
|
"update:maskedModel": (value: string) => any;
|
|
@@ -1,7 +1,23 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
2
|
open: boolean;
|
|
3
3
|
fullWidth: boolean;
|
|
4
|
+
anchorEl?: HTMLElement;
|
|
5
|
+
dropdownRect: {
|
|
6
|
+
top: number;
|
|
7
|
+
left: number;
|
|
8
|
+
right: number;
|
|
9
|
+
bottom: number;
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
maxHeight: number;
|
|
13
|
+
resolvedDirection: 'top' | 'bottom' | 'left' | 'right';
|
|
14
|
+
resolvedAlign: 'left' | 'right' | 'top' | 'bottom';
|
|
15
|
+
};
|
|
4
16
|
clickoutside: () => void;
|
|
17
|
+
teleportTarget: string | null;
|
|
18
|
+
isInModal: boolean;
|
|
19
|
+
align?: string;
|
|
20
|
+
direction?: string;
|
|
5
21
|
};
|
|
6
22
|
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>;
|
|
7
23
|
declare const _default: typeof __VLS_export;
|