@keenthemes/ktui 1.1.6 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -0
- package/dist/ktui.js +468 -1
- package/dist/ktui.min.js +1 -1
- package/dist/ktui.min.js.map +1 -1
- package/dist/styles.css +107 -5
- package/lib/cjs/components/accordion/accordion.d.ts +32 -0
- package/lib/cjs/components/accordion/accordion.d.ts.map +1 -0
- package/lib/cjs/components/accordion/index.d.ts +7 -0
- package/lib/cjs/components/accordion/index.d.ts.map +1 -0
- package/lib/cjs/components/accordion/types.d.ts +15 -0
- package/lib/cjs/components/accordion/types.d.ts.map +1 -0
- package/lib/cjs/components/collapse/collapse.d.ts +28 -0
- package/lib/cjs/components/collapse/collapse.d.ts.map +1 -0
- package/lib/cjs/components/collapse/index.d.ts +7 -0
- package/lib/cjs/components/collapse/index.d.ts.map +1 -0
- package/lib/cjs/components/collapse/types.d.ts +15 -0
- package/lib/cjs/components/collapse/types.d.ts.map +1 -0
- package/lib/cjs/components/component.d.ts +44 -0
- package/lib/cjs/components/component.d.ts.map +1 -0
- package/lib/cjs/components/constants.d.ts +6 -0
- package/lib/cjs/components/constants.d.ts.map +1 -0
- package/lib/cjs/components/datatable/datatable-checkbox.d.ts +16 -0
- package/lib/cjs/components/datatable/datatable-checkbox.d.ts.map +1 -0
- package/lib/cjs/components/datatable/datatable-sort.d.ts +16 -0
- package/lib/cjs/components/datatable/datatable-sort.d.ts.map +1 -0
- package/lib/cjs/components/datatable/datatable.d.ts +339 -0
- package/lib/cjs/components/datatable/datatable.d.ts.map +1 -0
- package/lib/cjs/components/datatable/index.d.ts +7 -0
- package/lib/cjs/components/datatable/index.d.ts.map +1 -0
- package/lib/cjs/components/datatable/types.d.ts +166 -0
- package/lib/cjs/components/datatable/types.d.ts.map +1 -0
- package/lib/cjs/components/dismiss/dismiss.d.ts +30 -0
- package/lib/cjs/components/dismiss/dismiss.d.ts.map +1 -0
- package/lib/cjs/components/dismiss/index.d.ts +7 -0
- package/lib/cjs/components/dismiss/index.d.ts.map +1 -0
- package/lib/cjs/components/dismiss/types.d.ts +15 -0
- package/lib/cjs/components/dismiss/types.d.ts.map +1 -0
- package/lib/cjs/components/drawer/drawer.d.ts +63 -0
- package/lib/cjs/components/drawer/drawer.d.ts.map +1 -0
- package/lib/cjs/components/drawer/index.d.ts +7 -0
- package/lib/cjs/components/drawer/index.d.ts.map +1 -0
- package/lib/cjs/components/drawer/types.d.ts +27 -0
- package/lib/cjs/components/drawer/types.d.ts.map +1 -0
- package/lib/cjs/components/dropdown/dropdown.d.ts +71 -0
- package/lib/cjs/components/dropdown/dropdown.d.ts.map +1 -0
- package/lib/cjs/components/dropdown/index.d.ts +7 -0
- package/lib/cjs/components/dropdown/index.d.ts.map +1 -0
- package/lib/cjs/components/dropdown/types.d.ts +27 -0
- package/lib/cjs/components/dropdown/types.d.ts.map +1 -0
- package/lib/cjs/components/image-input/image-input.d.ts +42 -0
- package/lib/cjs/components/image-input/image-input.d.ts.map +1 -0
- package/lib/cjs/components/image-input/index.d.ts +7 -0
- package/lib/cjs/components/image-input/index.d.ts.map +1 -0
- package/lib/cjs/components/image-input/types.d.ts +12 -0
- package/lib/cjs/components/image-input/types.d.ts.map +1 -0
- package/lib/cjs/components/modal/index.d.ts +7 -0
- package/lib/cjs/components/modal/index.d.ts.map +1 -0
- package/lib/cjs/components/modal/modal.d.ts +45 -0
- package/lib/cjs/components/modal/modal.d.ts.map +1 -0
- package/lib/cjs/components/modal/types.d.ts +21 -0
- package/lib/cjs/components/modal/types.d.ts.map +1 -0
- package/lib/cjs/components/rating/index.d.ts +7 -0
- package/lib/cjs/components/rating/index.d.ts.map +1 -0
- package/lib/cjs/components/rating/index.js +10 -0
- package/lib/cjs/components/rating/index.js.map +1 -0
- package/lib/cjs/components/rating/rating.d.ts +31 -0
- package/lib/cjs/components/rating/rating.d.ts.map +1 -0
- package/lib/cjs/components/rating/rating.js +239 -0
- package/lib/cjs/components/rating/rating.js.map +1 -0
- package/lib/cjs/components/rating/types.d.ts +25 -0
- package/lib/cjs/components/rating/types.d.ts.map +1 -0
- package/lib/cjs/components/rating/types.js +7 -0
- package/lib/cjs/components/rating/types.js.map +1 -0
- package/lib/cjs/components/reparent/index.d.ts +7 -0
- package/lib/cjs/components/reparent/index.d.ts.map +1 -0
- package/lib/cjs/components/reparent/reparent.d.ts +25 -0
- package/lib/cjs/components/reparent/reparent.d.ts.map +1 -0
- package/lib/cjs/components/reparent/types.d.ts +13 -0
- package/lib/cjs/components/reparent/types.d.ts.map +1 -0
- package/lib/cjs/components/repeater/index.d.ts +7 -0
- package/lib/cjs/components/repeater/index.d.ts.map +1 -0
- package/lib/cjs/components/repeater/index.js +10 -0
- package/lib/cjs/components/repeater/index.js.map +1 -0
- package/lib/cjs/components/repeater/repeater.d.ts +33 -0
- package/lib/cjs/components/repeater/repeater.d.ts.map +1 -0
- package/lib/cjs/components/repeater/repeater.js +173 -0
- package/lib/cjs/components/repeater/repeater.js.map +1 -0
- package/lib/cjs/components/repeater/types.d.ts +18 -0
- package/lib/cjs/components/repeater/types.d.ts.map +1 -0
- package/lib/cjs/components/repeater/types.js +7 -0
- package/lib/cjs/components/repeater/types.js.map +1 -0
- package/lib/cjs/components/scrollable/index.d.ts +7 -0
- package/lib/cjs/components/scrollable/index.d.ts.map +1 -0
- package/lib/cjs/components/scrollable/scrollable.d.ts +37 -0
- package/lib/cjs/components/scrollable/scrollable.d.ts.map +1 -0
- package/lib/cjs/components/scrollable/types.d.ts +15 -0
- package/lib/cjs/components/scrollable/types.d.ts.map +1 -0
- package/lib/cjs/components/scrollspy/index.d.ts +7 -0
- package/lib/cjs/components/scrollspy/index.d.ts.map +1 -0
- package/lib/cjs/components/scrollspy/scrollspy.d.ts +35 -0
- package/lib/cjs/components/scrollspy/scrollspy.d.ts.map +1 -0
- package/lib/cjs/components/scrollspy/types.d.ts +14 -0
- package/lib/cjs/components/scrollspy/types.d.ts.map +1 -0
- package/lib/cjs/components/scrollto/index.d.ts +7 -0
- package/lib/cjs/components/scrollto/index.d.ts.map +1 -0
- package/lib/cjs/components/scrollto/scrollto.d.ts +28 -0
- package/lib/cjs/components/scrollto/scrollto.d.ts.map +1 -0
- package/lib/cjs/components/scrollto/types.d.ts +14 -0
- package/lib/cjs/components/scrollto/types.d.ts.map +1 -0
- package/lib/cjs/components/select/combobox.d.ts +52 -0
- package/lib/cjs/components/select/combobox.d.ts.map +1 -0
- package/lib/cjs/components/select/config.d.ts +105 -0
- package/lib/cjs/components/select/config.d.ts.map +1 -0
- package/lib/cjs/components/select/dropdown.d.ts +101 -0
- package/lib/cjs/components/select/dropdown.d.ts.map +1 -0
- package/lib/cjs/components/select/index.d.ts +13 -0
- package/lib/cjs/components/select/index.d.ts.map +1 -0
- package/lib/cjs/components/select/option.d.ts +23 -0
- package/lib/cjs/components/select/option.d.ts.map +1 -0
- package/lib/cjs/components/select/remote.d.ts +91 -0
- package/lib/cjs/components/select/remote.d.ts.map +1 -0
- package/lib/cjs/components/select/search.d.ts +67 -0
- package/lib/cjs/components/select/search.d.ts.map +1 -0
- package/lib/cjs/components/select/select.d.ts +427 -0
- package/lib/cjs/components/select/select.d.ts.map +1 -0
- package/lib/cjs/components/select/select.js +3 -0
- package/lib/cjs/components/select/select.js.map +1 -1
- package/lib/cjs/components/select/tags.d.ts +32 -0
- package/lib/cjs/components/select/tags.d.ts.map +1 -0
- package/lib/cjs/components/select/templates.d.ts +79 -0
- package/lib/cjs/components/select/templates.d.ts.map +1 -0
- package/lib/cjs/components/select/types.d.ts +23 -0
- package/lib/cjs/components/select/types.d.ts.map +1 -0
- package/lib/cjs/components/select/utils.d.ts +130 -0
- package/lib/cjs/components/select/utils.d.ts.map +1 -0
- package/lib/cjs/components/stepper/index.d.ts +7 -0
- package/lib/cjs/components/stepper/index.d.ts.map +1 -0
- package/lib/cjs/components/stepper/stepper.d.ts +53 -0
- package/lib/cjs/components/stepper/stepper.d.ts.map +1 -0
- package/lib/cjs/components/stepper/types.d.ts +12 -0
- package/lib/cjs/components/stepper/types.d.ts.map +1 -0
- package/lib/cjs/components/sticky/index.d.ts +7 -0
- package/lib/cjs/components/sticky/index.d.ts.map +1 -0
- package/lib/cjs/components/sticky/sticky.d.ts +51 -0
- package/lib/cjs/components/sticky/sticky.d.ts.map +1 -0
- package/lib/cjs/components/sticky/types.d.ts +28 -0
- package/lib/cjs/components/sticky/types.d.ts.map +1 -0
- package/lib/cjs/components/tabs/index.d.ts +7 -0
- package/lib/cjs/components/tabs/index.d.ts.map +1 -0
- package/lib/cjs/components/tabs/tabs.d.ts +38 -0
- package/lib/cjs/components/tabs/tabs.d.ts.map +1 -0
- package/lib/cjs/components/tabs/types.d.ts +12 -0
- package/lib/cjs/components/tabs/types.d.ts.map +1 -0
- package/lib/cjs/components/theme-switch/index.d.ts +7 -0
- package/lib/cjs/components/theme-switch/index.d.ts.map +1 -0
- package/lib/cjs/components/theme-switch/theme-switch.d.ts +33 -0
- package/lib/cjs/components/theme-switch/theme-switch.d.ts.map +1 -0
- package/lib/cjs/components/theme-switch/types.d.ts +13 -0
- package/lib/cjs/components/theme-switch/types.d.ts.map +1 -0
- package/lib/cjs/components/toast/index.d.ts +7 -0
- package/lib/cjs/components/toast/index.d.ts.map +1 -0
- package/lib/cjs/components/toast/toast.d.ts +76 -0
- package/lib/cjs/components/toast/toast.d.ts.map +1 -0
- package/lib/cjs/components/toast/types.d.ts +146 -0
- package/lib/cjs/components/toast/types.d.ts.map +1 -0
- package/lib/cjs/components/toggle/index.d.ts +7 -0
- package/lib/cjs/components/toggle/index.d.ts.map +1 -0
- package/lib/cjs/components/toggle/toggle.d.ts +31 -0
- package/lib/cjs/components/toggle/toggle.d.ts.map +1 -0
- package/lib/cjs/components/toggle/types.d.ts +17 -0
- package/lib/cjs/components/toggle/types.d.ts.map +1 -0
- package/lib/cjs/components/toggle-password/index.d.ts +7 -0
- package/lib/cjs/components/toggle-password/index.d.ts.map +1 -0
- package/lib/cjs/components/toggle-password/toggle-password.d.ts +32 -0
- package/lib/cjs/components/toggle-password/toggle-password.d.ts.map +1 -0
- package/lib/cjs/components/toggle-password/types.d.ts +12 -0
- package/lib/cjs/components/toggle-password/types.d.ts.map +1 -0
- package/lib/cjs/components/tooltip/index.d.ts +7 -0
- package/lib/cjs/components/tooltip/index.d.ts.map +1 -0
- package/lib/cjs/components/tooltip/tooltip.d.ts +46 -0
- package/lib/cjs/components/tooltip/tooltip.d.ts.map +1 -0
- package/lib/cjs/components/tooltip/types.d.ts +26 -0
- package/lib/cjs/components/tooltip/types.d.ts.map +1 -0
- package/lib/cjs/helpers/data.d.ts +13 -0
- package/lib/cjs/helpers/data.d.ts.map +1 -0
- package/lib/cjs/helpers/dom.d.ts +42 -0
- package/lib/cjs/helpers/dom.d.ts.map +1 -0
- package/lib/cjs/helpers/event-handler.d.ts +14 -0
- package/lib/cjs/helpers/event-handler.d.ts.map +1 -0
- package/lib/cjs/helpers/utils.d.ts +25 -0
- package/lib/cjs/helpers/utils.d.ts.map +1 -0
- package/lib/cjs/index.d.ts +114 -0
- package/lib/cjs/index.d.ts.map +1 -0
- package/lib/cjs/index.js +9 -1
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/types.d.ts +17 -0
- package/lib/cjs/types.d.ts.map +1 -0
- package/lib/esm/components/accordion/accordion.d.ts +32 -0
- package/lib/esm/components/accordion/accordion.d.ts.map +1 -0
- package/lib/esm/components/accordion/index.d.ts +7 -0
- package/lib/esm/components/accordion/index.d.ts.map +1 -0
- package/lib/esm/components/accordion/types.d.ts +15 -0
- package/lib/esm/components/accordion/types.d.ts.map +1 -0
- package/lib/esm/components/collapse/collapse.d.ts +28 -0
- package/lib/esm/components/collapse/collapse.d.ts.map +1 -0
- package/lib/esm/components/collapse/index.d.ts +7 -0
- package/lib/esm/components/collapse/index.d.ts.map +1 -0
- package/lib/esm/components/collapse/types.d.ts +15 -0
- package/lib/esm/components/collapse/types.d.ts.map +1 -0
- package/lib/esm/components/component.d.ts +44 -0
- package/lib/esm/components/component.d.ts.map +1 -0
- package/lib/esm/components/constants.d.ts +6 -0
- package/lib/esm/components/constants.d.ts.map +1 -0
- package/lib/esm/components/datatable/datatable-checkbox.d.ts +16 -0
- package/lib/esm/components/datatable/datatable-checkbox.d.ts.map +1 -0
- package/lib/esm/components/datatable/datatable-sort.d.ts +16 -0
- package/lib/esm/components/datatable/datatable-sort.d.ts.map +1 -0
- package/lib/esm/components/datatable/datatable.d.ts +339 -0
- package/lib/esm/components/datatable/datatable.d.ts.map +1 -0
- package/lib/esm/components/datatable/index.d.ts +7 -0
- package/lib/esm/components/datatable/index.d.ts.map +1 -0
- package/lib/esm/components/datatable/types.d.ts +166 -0
- package/lib/esm/components/datatable/types.d.ts.map +1 -0
- package/lib/esm/components/dismiss/dismiss.d.ts +30 -0
- package/lib/esm/components/dismiss/dismiss.d.ts.map +1 -0
- package/lib/esm/components/dismiss/index.d.ts +7 -0
- package/lib/esm/components/dismiss/index.d.ts.map +1 -0
- package/lib/esm/components/dismiss/types.d.ts +15 -0
- package/lib/esm/components/dismiss/types.d.ts.map +1 -0
- package/lib/esm/components/drawer/drawer.d.ts +63 -0
- package/lib/esm/components/drawer/drawer.d.ts.map +1 -0
- package/lib/esm/components/drawer/index.d.ts +7 -0
- package/lib/esm/components/drawer/index.d.ts.map +1 -0
- package/lib/esm/components/drawer/types.d.ts +27 -0
- package/lib/esm/components/drawer/types.d.ts.map +1 -0
- package/lib/esm/components/dropdown/dropdown.d.ts +71 -0
- package/lib/esm/components/dropdown/dropdown.d.ts.map +1 -0
- package/lib/esm/components/dropdown/index.d.ts +7 -0
- package/lib/esm/components/dropdown/index.d.ts.map +1 -0
- package/lib/esm/components/dropdown/types.d.ts +27 -0
- package/lib/esm/components/dropdown/types.d.ts.map +1 -0
- package/lib/esm/components/image-input/image-input.d.ts +42 -0
- package/lib/esm/components/image-input/image-input.d.ts.map +1 -0
- package/lib/esm/components/image-input/index.d.ts +7 -0
- package/lib/esm/components/image-input/index.d.ts.map +1 -0
- package/lib/esm/components/image-input/types.d.ts +12 -0
- package/lib/esm/components/image-input/types.d.ts.map +1 -0
- package/lib/esm/components/modal/index.d.ts +7 -0
- package/lib/esm/components/modal/index.d.ts.map +1 -0
- package/lib/esm/components/modal/modal.d.ts +45 -0
- package/lib/esm/components/modal/modal.d.ts.map +1 -0
- package/lib/esm/components/modal/types.d.ts +21 -0
- package/lib/esm/components/modal/types.d.ts.map +1 -0
- package/lib/esm/components/rating/index.d.ts +7 -0
- package/lib/esm/components/rating/index.d.ts.map +1 -0
- package/lib/esm/components/rating/index.js +6 -0
- package/lib/esm/components/rating/index.js.map +1 -0
- package/lib/esm/components/rating/rating.d.ts +31 -0
- package/lib/esm/components/rating/rating.d.ts.map +1 -0
- package/lib/esm/components/rating/rating.js +236 -0
- package/lib/esm/components/rating/rating.js.map +1 -0
- package/lib/esm/components/rating/types.d.ts +25 -0
- package/lib/esm/components/rating/types.d.ts.map +1 -0
- package/lib/esm/components/rating/types.js +6 -0
- package/lib/esm/components/rating/types.js.map +1 -0
- package/lib/esm/components/reparent/index.d.ts +7 -0
- package/lib/esm/components/reparent/index.d.ts.map +1 -0
- package/lib/esm/components/reparent/reparent.d.ts +25 -0
- package/lib/esm/components/reparent/reparent.d.ts.map +1 -0
- package/lib/esm/components/reparent/types.d.ts +13 -0
- package/lib/esm/components/reparent/types.d.ts.map +1 -0
- package/lib/esm/components/repeater/index.d.ts +7 -0
- package/lib/esm/components/repeater/index.d.ts.map +1 -0
- package/lib/esm/components/repeater/index.js +6 -0
- package/lib/esm/components/repeater/index.js.map +1 -0
- package/lib/esm/components/repeater/repeater.d.ts +33 -0
- package/lib/esm/components/repeater/repeater.d.ts.map +1 -0
- package/lib/esm/components/repeater/repeater.js +170 -0
- package/lib/esm/components/repeater/repeater.js.map +1 -0
- package/lib/esm/components/repeater/types.d.ts +18 -0
- package/lib/esm/components/repeater/types.d.ts.map +1 -0
- package/lib/esm/components/repeater/types.js +6 -0
- package/lib/esm/components/repeater/types.js.map +1 -0
- package/lib/esm/components/scrollable/index.d.ts +7 -0
- package/lib/esm/components/scrollable/index.d.ts.map +1 -0
- package/lib/esm/components/scrollable/scrollable.d.ts +37 -0
- package/lib/esm/components/scrollable/scrollable.d.ts.map +1 -0
- package/lib/esm/components/scrollable/types.d.ts +15 -0
- package/lib/esm/components/scrollable/types.d.ts.map +1 -0
- package/lib/esm/components/scrollspy/index.d.ts +7 -0
- package/lib/esm/components/scrollspy/index.d.ts.map +1 -0
- package/lib/esm/components/scrollspy/scrollspy.d.ts +35 -0
- package/lib/esm/components/scrollspy/scrollspy.d.ts.map +1 -0
- package/lib/esm/components/scrollspy/types.d.ts +14 -0
- package/lib/esm/components/scrollspy/types.d.ts.map +1 -0
- package/lib/esm/components/scrollto/index.d.ts +7 -0
- package/lib/esm/components/scrollto/index.d.ts.map +1 -0
- package/lib/esm/components/scrollto/scrollto.d.ts +28 -0
- package/lib/esm/components/scrollto/scrollto.d.ts.map +1 -0
- package/lib/esm/components/scrollto/types.d.ts +14 -0
- package/lib/esm/components/scrollto/types.d.ts.map +1 -0
- package/lib/esm/components/select/combobox.d.ts +52 -0
- package/lib/esm/components/select/combobox.d.ts.map +1 -0
- package/lib/esm/components/select/config.d.ts +105 -0
- package/lib/esm/components/select/config.d.ts.map +1 -0
- package/lib/esm/components/select/dropdown.d.ts +101 -0
- package/lib/esm/components/select/dropdown.d.ts.map +1 -0
- package/lib/esm/components/select/index.d.ts +13 -0
- package/lib/esm/components/select/index.d.ts.map +1 -0
- package/lib/esm/components/select/option.d.ts +23 -0
- package/lib/esm/components/select/option.d.ts.map +1 -0
- package/lib/esm/components/select/remote.d.ts +91 -0
- package/lib/esm/components/select/remote.d.ts.map +1 -0
- package/lib/esm/components/select/search.d.ts +67 -0
- package/lib/esm/components/select/search.d.ts.map +1 -0
- package/lib/esm/components/select/select.d.ts +427 -0
- package/lib/esm/components/select/select.d.ts.map +1 -0
- package/lib/esm/components/select/select.js +3 -0
- package/lib/esm/components/select/select.js.map +1 -1
- package/lib/esm/components/select/tags.d.ts +32 -0
- package/lib/esm/components/select/tags.d.ts.map +1 -0
- package/lib/esm/components/select/templates.d.ts +79 -0
- package/lib/esm/components/select/templates.d.ts.map +1 -0
- package/lib/esm/components/select/types.d.ts +23 -0
- package/lib/esm/components/select/types.d.ts.map +1 -0
- package/lib/esm/components/select/utils.d.ts +130 -0
- package/lib/esm/components/select/utils.d.ts.map +1 -0
- package/lib/esm/components/stepper/index.d.ts +7 -0
- package/lib/esm/components/stepper/index.d.ts.map +1 -0
- package/lib/esm/components/stepper/stepper.d.ts +53 -0
- package/lib/esm/components/stepper/stepper.d.ts.map +1 -0
- package/lib/esm/components/stepper/types.d.ts +12 -0
- package/lib/esm/components/stepper/types.d.ts.map +1 -0
- package/lib/esm/components/sticky/index.d.ts +7 -0
- package/lib/esm/components/sticky/index.d.ts.map +1 -0
- package/lib/esm/components/sticky/sticky.d.ts +51 -0
- package/lib/esm/components/sticky/sticky.d.ts.map +1 -0
- package/lib/esm/components/sticky/types.d.ts +28 -0
- package/lib/esm/components/sticky/types.d.ts.map +1 -0
- package/lib/esm/components/tabs/index.d.ts +7 -0
- package/lib/esm/components/tabs/index.d.ts.map +1 -0
- package/lib/esm/components/tabs/tabs.d.ts +38 -0
- package/lib/esm/components/tabs/tabs.d.ts.map +1 -0
- package/lib/esm/components/tabs/types.d.ts +12 -0
- package/lib/esm/components/tabs/types.d.ts.map +1 -0
- package/lib/esm/components/theme-switch/index.d.ts +7 -0
- package/lib/esm/components/theme-switch/index.d.ts.map +1 -0
- package/lib/esm/components/theme-switch/theme-switch.d.ts +33 -0
- package/lib/esm/components/theme-switch/theme-switch.d.ts.map +1 -0
- package/lib/esm/components/theme-switch/types.d.ts +13 -0
- package/lib/esm/components/theme-switch/types.d.ts.map +1 -0
- package/lib/esm/components/toast/index.d.ts +7 -0
- package/lib/esm/components/toast/index.d.ts.map +1 -0
- package/lib/esm/components/toast/toast.d.ts +76 -0
- package/lib/esm/components/toast/toast.d.ts.map +1 -0
- package/lib/esm/components/toast/types.d.ts +146 -0
- package/lib/esm/components/toast/types.d.ts.map +1 -0
- package/lib/esm/components/toggle/index.d.ts +7 -0
- package/lib/esm/components/toggle/index.d.ts.map +1 -0
- package/lib/esm/components/toggle/toggle.d.ts +31 -0
- package/lib/esm/components/toggle/toggle.d.ts.map +1 -0
- package/lib/esm/components/toggle/types.d.ts +17 -0
- package/lib/esm/components/toggle/types.d.ts.map +1 -0
- package/lib/esm/components/toggle-password/index.d.ts +7 -0
- package/lib/esm/components/toggle-password/index.d.ts.map +1 -0
- package/lib/esm/components/toggle-password/toggle-password.d.ts +32 -0
- package/lib/esm/components/toggle-password/toggle-password.d.ts.map +1 -0
- package/lib/esm/components/toggle-password/types.d.ts +12 -0
- package/lib/esm/components/toggle-password/types.d.ts.map +1 -0
- package/lib/esm/components/tooltip/index.d.ts +7 -0
- package/lib/esm/components/tooltip/index.d.ts.map +1 -0
- package/lib/esm/components/tooltip/tooltip.d.ts +46 -0
- package/lib/esm/components/tooltip/tooltip.d.ts.map +1 -0
- package/lib/esm/components/tooltip/types.d.ts +26 -0
- package/lib/esm/components/tooltip/types.d.ts.map +1 -0
- package/lib/esm/helpers/data.d.ts +13 -0
- package/lib/esm/helpers/data.d.ts.map +1 -0
- package/lib/esm/helpers/dom.d.ts +42 -0
- package/lib/esm/helpers/dom.d.ts.map +1 -0
- package/lib/esm/helpers/event-handler.d.ts +14 -0
- package/lib/esm/helpers/event-handler.d.ts.map +1 -0
- package/lib/esm/helpers/utils.d.ts +25 -0
- package/lib/esm/helpers/utils.d.ts.map +1 -0
- package/lib/esm/index.d.ts +114 -0
- package/lib/esm/index.d.ts.map +1 -0
- package/lib/esm/index.js +6 -0
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/types.d.ts +17 -0
- package/lib/esm/types.d.ts.map +1 -0
- package/package.json +4 -3
- package/skills/ktui-components/SKILL.md +41 -0
- package/skills/ktui-theming/SKILL.md +50 -0
- package/src/components/input/input-group.css +15 -5
- package/src/components/rating/__tests__/rating.test.ts +234 -0
- package/src/components/rating/index.ts +11 -0
- package/src/components/rating/rating.css +11 -0
- package/src/components/rating/rating.ts +234 -0
- package/src/components/rating/types.ts +27 -0
- package/src/components/repeater/__tests__/repeater.test.ts +308 -0
- package/src/components/repeater/index.ts +7 -0
- package/src/components/repeater/repeater.ts +179 -0
- package/src/components/repeater/types.ts +19 -0
- package/src/components/select/select.ts +4 -0
- package/src/index.ts +108 -0
- package/styles.css +1 -0
- package/lib/cjs/components/datatable/__tests__/pagination-reset.test.js +0 -596
- package/lib/cjs/components/datatable/__tests__/pagination-reset.test.js.map +0 -1
- package/lib/cjs/components/datatable/__tests__/race-conditions.test.js +0 -548
- package/lib/cjs/components/datatable/__tests__/race-conditions.test.js.map +0 -1
- package/lib/cjs/components/datatable/__tests__/setup.js +0 -63
- package/lib/cjs/components/datatable/__tests__/setup.js.map +0 -1
- package/lib/esm/components/datatable/__tests__/pagination-reset.test.js +0 -594
- package/lib/esm/components/datatable/__tests__/pagination-reset.test.js.map +0 -1
- package/lib/esm/components/datatable/__tests__/race-conditions.test.js +0 -546
- package/lib/esm/components/datatable/__tests__/race-conditions.test.js.map +0 -1
- package/lib/esm/components/datatable/__tests__/setup.js +0 -58
- package/lib/esm/components/datatable/__tests__/setup.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,qBAAqB,UAUjC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* KTUI - Free & Open-Source Tailwind UI Components by Keenthemes
|
|
3
|
+
* Copyright 2025 by Keenthemes Inc
|
|
4
|
+
*/
|
|
5
|
+
import { KTDataTableConfigInterface } from './types';
|
|
6
|
+
export interface KTDataTableCheckboxAPI {
|
|
7
|
+
init(): void;
|
|
8
|
+
check(): void;
|
|
9
|
+
uncheck(): void;
|
|
10
|
+
toggle(): void;
|
|
11
|
+
isChecked(): boolean;
|
|
12
|
+
getChecked(): string[];
|
|
13
|
+
updateState(): void;
|
|
14
|
+
}
|
|
15
|
+
export declare function createCheckboxHandler(element: HTMLElement, config: KTDataTableConfigInterface, fireEvent: (eventName: string, eventData?: any) => void): KTDataTableCheckboxAPI;
|
|
16
|
+
//# sourceMappingURL=datatable-checkbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"datatable-checkbox.d.ts","sourceRoot":"","sources":["../../../../src/components/datatable/datatable-checkbox.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EACN,0BAA0B,EAE1B,MAAM,SAAS,CAAC;AAGjB,MAAM,WAAW,sBAAsB;IACtC,IAAI,IAAI,IAAI,CAAC;IACb,KAAK,IAAI,IAAI,CAAC;IACd,OAAO,IAAI,IAAI,CAAC;IAChB,MAAM,IAAI,IAAI,CAAC;IACf,SAAS,IAAI,OAAO,CAAC;IACrB,UAAU,IAAI,MAAM,EAAE,CAAC;IACvB,WAAW,IAAI,IAAI,CAAC;CACpB;AAGD,wBAAgB,qBAAqB,CACpC,OAAO,EAAE,WAAW,EACpB,MAAM,EAAE,0BAA0B,EAClC,SAAS,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,GAAG,KAAK,IAAI,GACrD,sBAAsB,CA8NxB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* KTUI - Free & Open-Source Tailwind UI Components by Keenthemes
|
|
3
|
+
* Copyright 2025 by Keenthemes Inc
|
|
4
|
+
*/
|
|
5
|
+
import { KTDataTableConfigInterface, KTDataTableSortOrderInterface, KTDataTableDataInterface } from './types';
|
|
6
|
+
export interface KTDataTableSortAPI<T = KTDataTableDataInterface> {
|
|
7
|
+
initSort(): void;
|
|
8
|
+
sortData(data: T[], sortField: keyof T | number, sortOrder: KTDataTableSortOrderInterface): T[];
|
|
9
|
+
toggleSortOrder(currentField: keyof T | number, currentOrder: KTDataTableSortOrderInterface, newField: keyof T | number): KTDataTableSortOrderInterface;
|
|
10
|
+
setSortIcon(sortField: keyof T, sortOrder: KTDataTableSortOrderInterface): void;
|
|
11
|
+
}
|
|
12
|
+
export declare function createSortHandler<T = KTDataTableDataInterface>(config: KTDataTableConfigInterface, theadElement: HTMLTableSectionElement, getState: () => {
|
|
13
|
+
sortField: keyof T | number;
|
|
14
|
+
sortOrder: KTDataTableSortOrderInterface;
|
|
15
|
+
}, setState: (field: keyof T | number, order: KTDataTableSortOrderInterface) => void, fireEvent: (eventName: string, eventData?: any) => void, dispatchEvent: (eventName: string, eventData?: any) => void, updateData: () => void): KTDataTableSortAPI<T>;
|
|
16
|
+
//# sourceMappingURL=datatable-sort.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"datatable-sort.d.ts","sourceRoot":"","sources":["../../../../src/components/datatable/datatable-sort.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EACN,0BAA0B,EAC1B,6BAA6B,EAC7B,wBAAwB,EACxB,MAAM,SAAS,CAAC;AAEjB,MAAM,WAAW,kBAAkB,CAAC,CAAC,GAAG,wBAAwB;IAC/D,QAAQ,IAAI,IAAI,CAAC;IACjB,QAAQ,CACP,IAAI,EAAE,CAAC,EAAE,EACT,SAAS,EAAE,MAAM,CAAC,GAAG,MAAM,EAC3B,SAAS,EAAE,6BAA6B,GACtC,CAAC,EAAE,CAAC;IACP,eAAe,CACd,YAAY,EAAE,MAAM,CAAC,GAAG,MAAM,EAC9B,YAAY,EAAE,6BAA6B,EAC3C,QAAQ,EAAE,MAAM,CAAC,GAAG,MAAM,GACxB,6BAA6B,CAAC;IACjC,WAAW,CACV,SAAS,EAAE,MAAM,CAAC,EAClB,SAAS,EAAE,6BAA6B,GACtC,IAAI,CAAC;CACR;AAED,wBAAgB,iBAAiB,CAAC,CAAC,GAAG,wBAAwB,EAC7D,MAAM,EAAE,0BAA0B,EAClC,YAAY,EAAE,uBAAuB,EACrC,QAAQ,EAAE,MAAM;IACf,SAAS,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC;IAC5B,SAAS,EAAE,6BAA6B,CAAC;CACzC,EACD,QAAQ,EAAE,CACT,KAAK,EAAE,MAAM,CAAC,GAAG,MAAM,EACvB,KAAK,EAAE,6BAA6B,KAChC,IAAI,EACT,SAAS,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,GAAG,KAAK,IAAI,EACvD,aAAa,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,GAAG,KAAK,IAAI,EAC3D,UAAU,EAAE,MAAM,IAAI,GACpB,kBAAkB,CAAC,CAAC,CAAC,CAgMvB"}
|
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* KTUI - Free & Open-Source Tailwind UI Components by Keenthemes
|
|
3
|
+
* Copyright 2025 by Keenthemes Inc
|
|
4
|
+
*/
|
|
5
|
+
import KTComponent from '../component';
|
|
6
|
+
import { KTDataTableDataInterface, KTDataTableInterface, KTDataTableConfigInterface as KTDataTableConfigInterface, KTDataTableStateInterface, KTDataTableColumnFilterInterface } from './types';
|
|
7
|
+
/**
|
|
8
|
+
* Custom DataTable plugin class with server-side API, pagination, and sorting
|
|
9
|
+
* @classdesc A custom KTComponent class that integrates server-side API, pagination, and sorting functionality into a table.
|
|
10
|
+
* It supports fetching data from a server-side API, pagination, and sorting of the fetched data.
|
|
11
|
+
* @class
|
|
12
|
+
* @extends {KTComponent}
|
|
13
|
+
* @param {HTMLElement} element The table element
|
|
14
|
+
* @param {KTDataTableConfigInterface} [config] Additional configuration options
|
|
15
|
+
*/
|
|
16
|
+
export declare class KTDataTable<T extends KTDataTableDataInterface> extends KTComponent implements KTDataTableInterface {
|
|
17
|
+
protected _name: string;
|
|
18
|
+
protected _config: KTDataTableConfigInterface;
|
|
19
|
+
protected _defaultConfig: KTDataTableConfigInterface;
|
|
20
|
+
private _tableElement;
|
|
21
|
+
private _tbodyElement;
|
|
22
|
+
private _theadElement;
|
|
23
|
+
private _originalTbodyClass;
|
|
24
|
+
private _originalTrClasses;
|
|
25
|
+
private _originalTheadClass;
|
|
26
|
+
private _originalTdClasses;
|
|
27
|
+
private _originalThClasses;
|
|
28
|
+
private _infoElement;
|
|
29
|
+
private _sizeElement;
|
|
30
|
+
private _paginationElement;
|
|
31
|
+
private _checkbox;
|
|
32
|
+
private _sortHandler;
|
|
33
|
+
private _data;
|
|
34
|
+
private _isFetching;
|
|
35
|
+
/**
|
|
36
|
+
* AbortController for cancelling previous fetch requests
|
|
37
|
+
* Used to prevent race conditions when multiple requests are triggered rapidly
|
|
38
|
+
*/
|
|
39
|
+
private _abortController;
|
|
40
|
+
/**
|
|
41
|
+
* Request ID counter for tracking request sequence
|
|
42
|
+
* Used to detect and ignore stale responses from older requests
|
|
43
|
+
*/
|
|
44
|
+
private _requestId;
|
|
45
|
+
constructor(element: HTMLElement, config?: KTDataTableConfigInterface);
|
|
46
|
+
/**
|
|
47
|
+
* Initialize default configuration for the datatable
|
|
48
|
+
* @param config User-provided configuration options
|
|
49
|
+
* @returns Default configuration merged with user-provided options
|
|
50
|
+
*/
|
|
51
|
+
private _initDefaultConfig;
|
|
52
|
+
/**
|
|
53
|
+
* Initialize table, tbody, thead, info, size, and pagination elements
|
|
54
|
+
* @returns {void}
|
|
55
|
+
*/
|
|
56
|
+
private _initElements;
|
|
57
|
+
/**
|
|
58
|
+
* Store original classes from table elements
|
|
59
|
+
* @returns {void}
|
|
60
|
+
*/
|
|
61
|
+
private _storeOriginalClasses;
|
|
62
|
+
/**
|
|
63
|
+
* Fetch data from the server or from the DOM if `apiEndpoint` is not defined.
|
|
64
|
+
* @returns {Promise<void>} Promise which is resolved after data has been fetched and checkbox plugin initialized.
|
|
65
|
+
*/
|
|
66
|
+
private _updateData;
|
|
67
|
+
/**
|
|
68
|
+
* Finalize data table after data has been fetched
|
|
69
|
+
* @returns {void}
|
|
70
|
+
*/
|
|
71
|
+
private _finalize;
|
|
72
|
+
/**
|
|
73
|
+
* Attach search event to the search input element
|
|
74
|
+
* @returns {void}
|
|
75
|
+
*/
|
|
76
|
+
private _attachSearchEvent;
|
|
77
|
+
/**
|
|
78
|
+
* Fetch data from the DOM
|
|
79
|
+
* Fetch data from the table element and save it to the `originalData` state property.
|
|
80
|
+
* This method is used when the data is not fetched from the server via an API endpoint.
|
|
81
|
+
*/
|
|
82
|
+
private _fetchDataFromLocal;
|
|
83
|
+
/**
|
|
84
|
+
* Checks if the table content has been invalidated by comparing the current checksum of the table body
|
|
85
|
+
* with the stored checksum in the state. If the checksums are different, the state is updated with the
|
|
86
|
+
* new checksum and `true` is returned. Otherwise, `false` is returned.
|
|
87
|
+
*
|
|
88
|
+
* @returns {boolean} `true` if the table content has been invalidated, `false` otherwise.
|
|
89
|
+
*/
|
|
90
|
+
private _localTableContentInvalidate;
|
|
91
|
+
private _tableConfigInvalidate;
|
|
92
|
+
/**
|
|
93
|
+
* Extract the table content and returns it as an object containing an array of original data and an array of original data attributes.
|
|
94
|
+
*
|
|
95
|
+
* @returns {{originalData: T[], originalDataAttributes: KTDataTableAttributeInterface[]}} - An object containing an array of original data and an array of original data attributes.
|
|
96
|
+
*/
|
|
97
|
+
private _localExtractTableContent;
|
|
98
|
+
/**
|
|
99
|
+
* Check if the table header is invalidated
|
|
100
|
+
* @returns {boolean} - Returns true if the table header is invalidated, false otherwise
|
|
101
|
+
*/
|
|
102
|
+
private _localTableHeaderInvalidate;
|
|
103
|
+
/**
|
|
104
|
+
* Returns the logical data column count (number of data columns), used for multi-row headers
|
|
105
|
+
* where querySelectorAll('th') would overcount. Prefers state.originalData, then first tbody row td count.
|
|
106
|
+
* @returns {number} Number of data columns, or 0 if unknown
|
|
107
|
+
*/
|
|
108
|
+
private _getLogicalColumnCount;
|
|
109
|
+
/**
|
|
110
|
+
* Fetch data from the server
|
|
111
|
+
*/
|
|
112
|
+
private _fetchDataFromServer;
|
|
113
|
+
/**
|
|
114
|
+
* Get the query params for a fetch request
|
|
115
|
+
* @returns The query params for the fetch request
|
|
116
|
+
*/
|
|
117
|
+
private _getQueryParamsForFetchRequest;
|
|
118
|
+
private _performFetchRequest;
|
|
119
|
+
/**
|
|
120
|
+
* Creates a complete URL from a relative path or a full URL.
|
|
121
|
+
*
|
|
122
|
+
* This method accepts a string that can be either a relative path or a full URL.
|
|
123
|
+
* If the string is a complete URL (i.e., it contains a valid protocol), a URL
|
|
124
|
+
* object based on that string is returned. Otherwise, it ensures the path starts
|
|
125
|
+
* with a "/" and combines it with the provided base URL (or the current window's origin)
|
|
126
|
+
* to form a complete URL.
|
|
127
|
+
*
|
|
128
|
+
* @param {string} pathOrUrl - The path or URL to process.
|
|
129
|
+
* @param {string | null} [baseUrl=window.location.origin] - The base URL for resolving the relative path.
|
|
130
|
+
* Defaults to the current window's origin.
|
|
131
|
+
* @returns {URL} The resulting URL object.
|
|
132
|
+
*/
|
|
133
|
+
private _createUrl;
|
|
134
|
+
/**
|
|
135
|
+
* Update the table and pagination controls with new data
|
|
136
|
+
* @returns {Promise<void>} A promise that resolves when the table and pagination controls are updated
|
|
137
|
+
*/
|
|
138
|
+
private _draw;
|
|
139
|
+
/**
|
|
140
|
+
* Update the HTML table with new data
|
|
141
|
+
* @returns {HTMLTableSectionElement} The new table body element
|
|
142
|
+
*/
|
|
143
|
+
private _updateTable;
|
|
144
|
+
/**
|
|
145
|
+
* Update the table content
|
|
146
|
+
* @param tbodyElement The table body element
|
|
147
|
+
* @returns {HTMLTableSectionElement} The updated table body element
|
|
148
|
+
*/
|
|
149
|
+
private _updateTableContent;
|
|
150
|
+
/**
|
|
151
|
+
* Show a notice on the table
|
|
152
|
+
* @param message The message to show. If empty, the message will be removed
|
|
153
|
+
* @returns {void}
|
|
154
|
+
*/
|
|
155
|
+
private _noticeOnTable;
|
|
156
|
+
private _updatePagination;
|
|
157
|
+
/**
|
|
158
|
+
* Removes all child elements from the given container element.
|
|
159
|
+
* @param container The container element to remove the child elements from.
|
|
160
|
+
*/
|
|
161
|
+
private _removeChildElements;
|
|
162
|
+
/**
|
|
163
|
+
* Creates a container element for the items per page selector.
|
|
164
|
+
* @param _sizeElement The element to create the page size controls in.
|
|
165
|
+
* @returns The container element.
|
|
166
|
+
*/
|
|
167
|
+
private _createPageSizeControls;
|
|
168
|
+
/**
|
|
169
|
+
* Reloads the data with the specified page size and optional page number.
|
|
170
|
+
* @param pageSize The new page size.
|
|
171
|
+
* @param page The new page number (optional, defaults to 1).
|
|
172
|
+
*/
|
|
173
|
+
private _reloadPageSize;
|
|
174
|
+
/**
|
|
175
|
+
* Creates the pagination controls for the component.
|
|
176
|
+
* @param _infoElement The element to set the info text in.
|
|
177
|
+
* @param _paginationElement The element to create the pagination controls in.
|
|
178
|
+
* @return {HTMLElement} The element containing the pagination controls.
|
|
179
|
+
*/
|
|
180
|
+
private _createPaginationControls;
|
|
181
|
+
/**
|
|
182
|
+
* Sets the info text for the pagination controls.
|
|
183
|
+
* @param _infoElement The element to set the info text in.
|
|
184
|
+
*/
|
|
185
|
+
private _setPaginationInfoText;
|
|
186
|
+
/**
|
|
187
|
+
* Creates the container element for the pagination controls.
|
|
188
|
+
* @param _paginationElement The element to create the pagination controls in.
|
|
189
|
+
* @return {HTMLElement} The container element.
|
|
190
|
+
*/
|
|
191
|
+
private _createPaginationContainer;
|
|
192
|
+
/**
|
|
193
|
+
* Creates the pagination buttons for the component.
|
|
194
|
+
* @param paginationContainer The container element for the pagination controls.
|
|
195
|
+
*/
|
|
196
|
+
private _createPaginationButtons;
|
|
197
|
+
private _calculatePageRange;
|
|
198
|
+
/**
|
|
199
|
+
* Method for handling pagination
|
|
200
|
+
* @param page - The page number to navigate to
|
|
201
|
+
*/
|
|
202
|
+
private _paginateData;
|
|
203
|
+
private _showSpinner;
|
|
204
|
+
private _hideSpinner;
|
|
205
|
+
private _createSpinner;
|
|
206
|
+
/**
|
|
207
|
+
* Saves the current state of the table to local storage.
|
|
208
|
+
* @returns {void}
|
|
209
|
+
*/
|
|
210
|
+
private _saveState;
|
|
211
|
+
/**
|
|
212
|
+
* Loads the saved state of the table from local storage, if it exists.
|
|
213
|
+
* @returns {Object} The saved state of the table, or null if no saved state exists.
|
|
214
|
+
*/
|
|
215
|
+
private _loadState;
|
|
216
|
+
private _deleteState;
|
|
217
|
+
/**
|
|
218
|
+
* Gets the namespace for the table's state.
|
|
219
|
+
* If a namespace is specified in the config, it is used.
|
|
220
|
+
* Otherwise, if the table element has an ID, it is used.
|
|
221
|
+
* Otherwise, if the component element has an ID, it is used.
|
|
222
|
+
* Finally, the component's UID is used.
|
|
223
|
+
* @returns {string} The namespace for the table's state.
|
|
224
|
+
*/
|
|
225
|
+
private _tableNamespace;
|
|
226
|
+
private _tableId;
|
|
227
|
+
/**
|
|
228
|
+
* Clean up all event listeners, handlers, and DOM nodes created by this instance.
|
|
229
|
+
* This method is called before re-rendering or when disposing the component.
|
|
230
|
+
*/
|
|
231
|
+
private _dispose;
|
|
232
|
+
private _debounce;
|
|
233
|
+
/**
|
|
234
|
+
* Gets the current state of the table.
|
|
235
|
+
* @returns {KTDataTableStateInterface} The current state of the table.
|
|
236
|
+
*/
|
|
237
|
+
getState(): KTDataTableStateInterface;
|
|
238
|
+
/**
|
|
239
|
+
* Sorts the data in the table by the specified field.
|
|
240
|
+
* @param field The field to sort by.
|
|
241
|
+
*/
|
|
242
|
+
sort(field: keyof T | number): void;
|
|
243
|
+
/**
|
|
244
|
+
* Navigates to the specified page in the data table.
|
|
245
|
+
* @param page The page number to navigate to.
|
|
246
|
+
*/
|
|
247
|
+
goPage(page: number): void;
|
|
248
|
+
/**
|
|
249
|
+
* Set the page size of the data table.
|
|
250
|
+
* @param pageSize The new page size.
|
|
251
|
+
*/
|
|
252
|
+
setPageSize(pageSize: number): void;
|
|
253
|
+
/**
|
|
254
|
+
* Reloads the data from the server and updates the table.
|
|
255
|
+
* Triggers the 'reload' event and the 'kt.datatable.reload' custom event.
|
|
256
|
+
*/
|
|
257
|
+
reload(): void;
|
|
258
|
+
redraw(page?: number): void;
|
|
259
|
+
/**
|
|
260
|
+
* Show the loading spinner of the data table.
|
|
261
|
+
*/
|
|
262
|
+
showSpinner(): void;
|
|
263
|
+
/**
|
|
264
|
+
* Hide the loading spinner of the data table.
|
|
265
|
+
*/
|
|
266
|
+
hideSpinner(): void;
|
|
267
|
+
/**
|
|
268
|
+
* Filter data using the specified filter object.
|
|
269
|
+
* Replaces the existing filter object for the column with the new one.
|
|
270
|
+
* @param filter Filter object containing the column name and its value.
|
|
271
|
+
* @returns The KTDataTable instance.
|
|
272
|
+
* @throws Error if the filter object is null or undefined.
|
|
273
|
+
*/
|
|
274
|
+
setFilter(filter: KTDataTableColumnFilterInterface): KTDataTable<T>;
|
|
275
|
+
dispose(): void;
|
|
276
|
+
search(query: string | object): void;
|
|
277
|
+
/**
|
|
278
|
+
* Static variables
|
|
279
|
+
*/
|
|
280
|
+
private static _instances;
|
|
281
|
+
/**
|
|
282
|
+
* Create KTDataTable instances for all elements with a data-kt-datatable="true" attribute.
|
|
283
|
+
* This function is now browser-guarded and must be called explicitly.
|
|
284
|
+
*/
|
|
285
|
+
static createInstances(): void;
|
|
286
|
+
/**
|
|
287
|
+
* Get the KTDataTable instance for a given element.
|
|
288
|
+
*
|
|
289
|
+
* @param element The element to retrieve the instance for
|
|
290
|
+
* @returns The KTDataTable instance or undefined if not found
|
|
291
|
+
*/
|
|
292
|
+
static getInstance(element: HTMLElement): KTDataTable<KTDataTableDataInterface> | undefined;
|
|
293
|
+
/**
|
|
294
|
+
* Initializes all KTDataTable instances on the page.
|
|
295
|
+
* This function is now browser-guarded and must be called explicitly.
|
|
296
|
+
*/
|
|
297
|
+
static init(): void;
|
|
298
|
+
/**
|
|
299
|
+
* Force reinitialization of datatables by clearing existing instances.
|
|
300
|
+
* Useful for Livewire wire:navigate where the DOM is replaced and new tables need to be initialized.
|
|
301
|
+
*/
|
|
302
|
+
static reinit(): void;
|
|
303
|
+
/**
|
|
304
|
+
* Check if all visible rows are checked (header checkbox state)
|
|
305
|
+
* @returns {boolean}
|
|
306
|
+
*/
|
|
307
|
+
isChecked(): boolean;
|
|
308
|
+
/**
|
|
309
|
+
* Toggle all visible row checkboxes (header checkbox)
|
|
310
|
+
* @returns {void}
|
|
311
|
+
*/
|
|
312
|
+
toggle(): void;
|
|
313
|
+
/**
|
|
314
|
+
* Check all visible row checkboxes
|
|
315
|
+
* @returns {void}
|
|
316
|
+
*/
|
|
317
|
+
check(): void;
|
|
318
|
+
/**
|
|
319
|
+
* Uncheck all visible row checkboxes
|
|
320
|
+
* @returns {void}
|
|
321
|
+
*/
|
|
322
|
+
uncheck(): void;
|
|
323
|
+
/**
|
|
324
|
+
* Get all checked row IDs (across all pages if preserveSelection is true)
|
|
325
|
+
* @returns {string[]}
|
|
326
|
+
*/
|
|
327
|
+
getChecked(): string[];
|
|
328
|
+
/**
|
|
329
|
+
* Reapply checked state to visible checkboxes (after redraw/pagination)
|
|
330
|
+
* @returns {void}
|
|
331
|
+
*/
|
|
332
|
+
update(): void;
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* NOTE: This module is now PURE. No side effects or DOM/global assignments occur on import.
|
|
336
|
+
* To auto-initialize all datatables on the page, call the exported `initAllDataTables()` function explicitly in the browser.
|
|
337
|
+
*/
|
|
338
|
+
export declare function initAllDataTables(): void;
|
|
339
|
+
//# sourceMappingURL=datatable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"datatable.d.ts","sourceRoot":"","sources":["../../../../src/components/datatable/datatable.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,WAAW,MAAM,cAAc,CAAC;AACvC,OAAO,EACN,wBAAwB,EACxB,oBAAoB,EACpB,0BAA0B,IAAI,0BAA0B,EAExD,yBAAyB,EACzB,gCAAgC,EAEhC,MAAM,SAAS,CAAC;AAUjB;;;;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AAE,MAAM,GAAG,IAAI;IASjC;;;OAGG;IACI,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAY1C;;;OAGG;IACI,MAAM,IAAI,IAAI;IAQd,MAAM,CAAC,IAAI,GAAE,MAAU,GAAG,IAAI;IAOrC;;OAEG;IACI,WAAW,IAAI,IAAI;IAO1B;;OAEG;IACI,WAAW,IAAI,IAAI;IAO1B;;;;;;OAMG;IACI,SAAS,CAAC,MAAM,EAAE,gCAAgC,GAAG,WAAW,CAAC,CAAC,CAAC;IAW1D,OAAO,IAAI,IAAI;IAIxB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAM3C;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,UAAU,CAGrB;IAEJ;;;OAGG;WACW,eAAe,IAAI,IAAI;IAqBrC;;;;;OAKG;WACW,WAAW,CACxB,OAAO,EAAE,WAAW,GAClB,WAAW,CAAC,wBAAwB,CAAC,GAAG,SAAS;IAWpD;;;OAGG;WACW,IAAI,IAAI,IAAI;IAK1B;;;OAGG;WACW,MAAM,IAAI,IAAI;IAsB5B;;;OAGG;IACI,SAAS,IAAI,OAAO;IAI3B;;;OAGG;IACI,MAAM,IAAI,IAAI;IAIrB;;;OAGG;IACI,KAAK,IAAI,IAAI;IAMpB;;;OAGG;IACI,OAAO,IAAI,IAAI;IAMtB;;;OAGG;IACI,UAAU,IAAI,MAAM,EAAE;IAI7B;;;OAGG;IACI,MAAM,IAAI,IAAI;CAKrB;AAED;;;GAGG;AAEH,wBAAgB,iBAAiB,IAAI,IAAI,CAMxC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* KTUI - Free & Open-Source Tailwind UI Components by Keenthemes
|
|
3
|
+
* Copyright 2025 by Keenthemes Inc
|
|
4
|
+
*/
|
|
5
|
+
export { KTDataTable } from './datatable';
|
|
6
|
+
export type { KTDataTableSortOrderInterface, KTDataTableDataInterface, KTDataTableStateInterface as KTDataTableState, KTDataTableInterface, KTDataTableResponseDataInterface, KTDataTableConfigInterface, KTDataTableColumnFilterTypeInterface, KTDataTableColumnFilterInterface, KTDataTableCheckConfigInterface, KTDataTableCheckInterface, KTDataTableCheckChangePayloadInterface, } from './types';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/datatable/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,YAAY,EACX,6BAA6B,EAC7B,wBAAwB,EACxB,yBAAyB,IAAI,gBAAgB,EAC7C,oBAAoB,EACpB,gCAAgC,EAChC,0BAA0B,EAC1B,oCAAoC,EACpC,gCAAgC,EAChC,+BAA+B,EAC/B,yBAAyB,EACzB,sCAAsC,GACtC,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* KTUI - Free & Open-Source Tailwind UI Components by Keenthemes
|
|
3
|
+
* Copyright 2025 by Keenthemes Inc
|
|
4
|
+
*/
|
|
5
|
+
export type KTDataTableSortOrderInterface = 'asc' | 'desc' | '';
|
|
6
|
+
export interface KTDataTableDataInterface {
|
|
7
|
+
[key: string]: string | number | boolean | object;
|
|
8
|
+
}
|
|
9
|
+
export interface KTDataTableAttributeInterface {
|
|
10
|
+
[index: number]: {
|
|
11
|
+
[key: string]: string;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export interface KTDataTableStateInterface {
|
|
15
|
+
page: number;
|
|
16
|
+
sortField: keyof KTDataTableDataInterface | number;
|
|
17
|
+
sortOrder: KTDataTableSortOrderInterface;
|
|
18
|
+
pageSize: number;
|
|
19
|
+
totalItems: number;
|
|
20
|
+
totalPages: number;
|
|
21
|
+
selectedRows: string[];
|
|
22
|
+
filters: KTDataTableColumnFilterInterface[];
|
|
23
|
+
search: string | object;
|
|
24
|
+
originalData: KTDataTableDataInterface[];
|
|
25
|
+
originalDataAttributes: KTDataTableAttributeInterface[];
|
|
26
|
+
_contentChecksum?: string;
|
|
27
|
+
_configChecksum?: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* The public methods of the DataTable component
|
|
31
|
+
*/
|
|
32
|
+
export interface KTDataTableInterface {
|
|
33
|
+
/**
|
|
34
|
+
* Sort the data by the given field. The sort order is ASC by default.
|
|
35
|
+
* @param field The field to sort the data by
|
|
36
|
+
*/
|
|
37
|
+
sort: (field: keyof KTDataTableDataInterface | number) => void;
|
|
38
|
+
/**
|
|
39
|
+
* Go to the given page.
|
|
40
|
+
* @param page The page number to go to
|
|
41
|
+
*/
|
|
42
|
+
goPage: (page: number) => void;
|
|
43
|
+
/**
|
|
44
|
+
* Reload the data from the API endpoint.
|
|
45
|
+
*/
|
|
46
|
+
reload: () => void;
|
|
47
|
+
/**
|
|
48
|
+
* Set the page size.
|
|
49
|
+
* @param size The new page size
|
|
50
|
+
*/
|
|
51
|
+
setPageSize: (pageSize: number) => void;
|
|
52
|
+
showSpinner(): void;
|
|
53
|
+
hideSpinner(): void;
|
|
54
|
+
}
|
|
55
|
+
export interface KTDataTableResponseDataInterface {
|
|
56
|
+
data: KTDataTableDataInterface[];
|
|
57
|
+
totalCount: number;
|
|
58
|
+
}
|
|
59
|
+
export interface KTDataTableConfigInterface {
|
|
60
|
+
requestMethod?: string;
|
|
61
|
+
requestHeaders?: {
|
|
62
|
+
[key: string]: string;
|
|
63
|
+
};
|
|
64
|
+
requestCredentials?: RequestCredentials;
|
|
65
|
+
apiEndpoint?: string;
|
|
66
|
+
mapResponse?: (data: KTDataTableResponseDataInterface) => KTDataTableResponseDataInterface;
|
|
67
|
+
mapRequest?: (query: URLSearchParams) => URLSearchParams;
|
|
68
|
+
pageSize?: number;
|
|
69
|
+
pageMore?: boolean;
|
|
70
|
+
pageMoreLimit?: number;
|
|
71
|
+
stateSave?: boolean;
|
|
72
|
+
stateNamespace?: string;
|
|
73
|
+
pageSizes?: number[];
|
|
74
|
+
columns?: {
|
|
75
|
+
[key: keyof KTDataTableDataInterface | string]: {
|
|
76
|
+
title?: string;
|
|
77
|
+
render?: (item: KTDataTableDataInterface[keyof KTDataTableDataInterface] | string, data: KTDataTableDataInterface, context: KTDataTableInterface) => string | HTMLElement | DocumentFragment;
|
|
78
|
+
checkbox?: boolean;
|
|
79
|
+
createdCell?: (cell: HTMLTableCellElement, cellData: KTDataTableDataInterface[keyof KTDataTableDataInterface] | string, rowData: KTDataTableDataInterface, row: HTMLTableRowElement) => void;
|
|
80
|
+
/**
|
|
81
|
+
* Sort comparison type for this column. When 'numeric', values are parsed
|
|
82
|
+
* (e.g. strip currency/commas) and compared as numbers.
|
|
83
|
+
*/
|
|
84
|
+
sortType?: 'string' | 'numeric';
|
|
85
|
+
/**
|
|
86
|
+
* Custom value used for sorting. When set, this is used instead of the raw
|
|
87
|
+
* cell value (and instead of sortType). Return a number or string to sort by.
|
|
88
|
+
* Use for custom formats (e.g. dates, combined fields, custom parsing).
|
|
89
|
+
*/
|
|
90
|
+
sortValue?: (cellValue: KTDataTableDataInterface[keyof KTDataTableDataInterface] | string, rowData: KTDataTableDataInterface) => number | string;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
infoEmpty?: string;
|
|
94
|
+
info?: string;
|
|
95
|
+
loading?: {
|
|
96
|
+
template: string;
|
|
97
|
+
content: string;
|
|
98
|
+
};
|
|
99
|
+
sort?: {
|
|
100
|
+
classes?: {
|
|
101
|
+
base?: string;
|
|
102
|
+
asc?: string;
|
|
103
|
+
desc?: string;
|
|
104
|
+
};
|
|
105
|
+
callback?: (data: KTDataTableDataInterface[], sortField: keyof KTDataTableDataInterface | number, sortOrder: KTDataTableSortOrderInterface) => KTDataTableDataInterface[];
|
|
106
|
+
};
|
|
107
|
+
search?: {
|
|
108
|
+
delay?: number;
|
|
109
|
+
callback?: (data: KTDataTableDataInterface[], search: string) => KTDataTableDataInterface[];
|
|
110
|
+
};
|
|
111
|
+
pagination?: {
|
|
112
|
+
number: {
|
|
113
|
+
class: string;
|
|
114
|
+
text: string;
|
|
115
|
+
};
|
|
116
|
+
previous: {
|
|
117
|
+
class: string;
|
|
118
|
+
text: string;
|
|
119
|
+
};
|
|
120
|
+
next: {
|
|
121
|
+
class: string;
|
|
122
|
+
text: string;
|
|
123
|
+
};
|
|
124
|
+
more: {
|
|
125
|
+
class: string;
|
|
126
|
+
text: string;
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
attributes?: {
|
|
130
|
+
table?: string;
|
|
131
|
+
info?: string;
|
|
132
|
+
size?: string;
|
|
133
|
+
pagination?: string;
|
|
134
|
+
spinner?: string;
|
|
135
|
+
check?: string;
|
|
136
|
+
checkbox?: string;
|
|
137
|
+
};
|
|
138
|
+
checkbox?: {
|
|
139
|
+
checkedClass?: string;
|
|
140
|
+
preserveSelection?: boolean;
|
|
141
|
+
};
|
|
142
|
+
_state?: KTDataTableStateInterface;
|
|
143
|
+
_data?: KTDataTableDataInterface[];
|
|
144
|
+
loadingClass?: string;
|
|
145
|
+
}
|
|
146
|
+
export type KTDataTableColumnFilterTypeInterface = 'text' | 'numeric' | 'dateRange';
|
|
147
|
+
export type KTDataTableColumnFilterInterface = {
|
|
148
|
+
column: keyof KTDataTableDataInterface;
|
|
149
|
+
type: KTDataTableColumnFilterTypeInterface;
|
|
150
|
+
value: string;
|
|
151
|
+
};
|
|
152
|
+
export interface KTDataTableCheckConfigInterface {
|
|
153
|
+
target: string;
|
|
154
|
+
checkedClass: string;
|
|
155
|
+
}
|
|
156
|
+
export interface KTDataTableCheckInterface {
|
|
157
|
+
toggle(): void;
|
|
158
|
+
check(): void;
|
|
159
|
+
uncheck(): void;
|
|
160
|
+
isChecked(): boolean;
|
|
161
|
+
getChecked(): string[];
|
|
162
|
+
}
|
|
163
|
+
export interface KTDataTableCheckChangePayloadInterface {
|
|
164
|
+
cancel?: boolean;
|
|
165
|
+
}
|
|
166
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/datatable/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,MAAM,MAAM,6BAA6B,GAAG,KAAK,GAAG,MAAM,GAAG,EAAE,CAAC;AAEhE,MAAM,WAAW,wBAAwB;IACxC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;CAClD;AAED,MAAM,WAAW,6BAA6B;IAC7C,CAAC,KAAK,EAAE,MAAM,GAAG;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CAC3C;AAED,MAAM,WAAW,yBAAyB;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,wBAAwB,GAAG,MAAM,CAAC;IACnD,SAAS,EAAE,6BAA6B,CAAC;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,OAAO,EAAE,gCAAgC,EAAE,CAAC;IAC5C,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,YAAY,EAAE,wBAAwB,EAAE,CAAC;IACzC,sBAAsB,EAAE,6BAA6B,EAAE,CAAC;IACxD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACpC;;;OAGG;IACH,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,wBAAwB,GAAG,MAAM,KAAK,IAAI,CAAC;IAE/D;;;OAGG;IACH,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAE/B;;OAEG;IACH,MAAM,EAAE,MAAM,IAA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sCAAsC;IACtD,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* KTUI - Free & Open-Source Tailwind UI Components by Keenthemes
|
|
3
|
+
* Copyright 2025 by Keenthemes Inc
|
|
4
|
+
*/
|
|
5
|
+
import KTComponent from '../component';
|
|
6
|
+
import { KTDismissInterface, KTDismissConfigInterface } from './types';
|
|
7
|
+
declare global {
|
|
8
|
+
interface Window {
|
|
9
|
+
KT_DISMISS_INITIALIZED: boolean;
|
|
10
|
+
KTDismiss: typeof KTDismiss;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export declare class KTDismiss extends KTComponent implements KTDismissInterface {
|
|
14
|
+
protected _name: string;
|
|
15
|
+
protected _defaultConfig: KTDismissConfigInterface;
|
|
16
|
+
protected _config: KTDismissConfigInterface;
|
|
17
|
+
protected _isAnimating: boolean;
|
|
18
|
+
protected _targetElement: HTMLElement | null;
|
|
19
|
+
constructor(element: HTMLElement, config?: KTDismissConfigInterface);
|
|
20
|
+
private _getTargetElement;
|
|
21
|
+
protected _handlers(): void;
|
|
22
|
+
protected _dismiss(): void;
|
|
23
|
+
getTargetElement(): HTMLElement;
|
|
24
|
+
dismiss(): void;
|
|
25
|
+
static getInstance(element: HTMLElement): KTDismiss;
|
|
26
|
+
static getOrCreateInstance(element: HTMLElement, config?: KTDismissConfigInterface): KTDismiss;
|
|
27
|
+
static createInstances(): void;
|
|
28
|
+
static init(): void;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=dismiss.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dismiss.d.ts","sourceRoot":"","sources":["../../../../src/components/dismiss/dismiss.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,WAAW,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAGvE,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,MAAM;QACf,sBAAsB,EAAE,OAAO,CAAC;QAChC,SAAS,EAAE,OAAO,SAAS,CAAC;KAC5B;CACD;AAED,qBAAa,SAAU,SAAQ,WAAY,YAAW,kBAAkB;IACvE,UAAmB,KAAK,EAAE,MAAM,CAAa;IAC7C,UAAmB,cAAc,EAAE,wBAAwB,CAKzD;IACF,UAAmB,OAAO,EAAE,wBAAwB,CAAuB;IAC3E,SAAS,CAAC,YAAY,EAAE,OAAO,CAAS;IACxC,SAAS,CAAC,cAAc,EAAE,WAAW,GAAG,IAAI,CAAQ;gBAExC,OAAO,EAAE,WAAW,EAAE,MAAM,CAAC,EAAE,wBAAwB;IAoBnE,OAAO,CAAC,iBAAiB;IAQzB,SAAS,CAAC,SAAS,IAAI,IAAI;IAc3B,SAAS,CAAC,QAAQ,IAAI,IAAI;IAmCnB,gBAAgB,IAAI,WAAW;IAI/B,OAAO,IAAI,IAAI;WAIR,WAAW,CAAC,OAAO,EAAE,WAAW,GAAG,SAAS;WAc5C,mBAAmB,CAChC,OAAO,EAAE,WAAW,EACpB,MAAM,CAAC,EAAE,wBAAwB,GAC/B,SAAS;WAIE,eAAe,IAAI,IAAI;WAQvB,IAAI,IAAI,IAAI;CAG1B"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* KTUI - Free & Open-Source Tailwind UI Components by Keenthemes
|
|
3
|
+
* Copyright 2025 by Keenthemes Inc
|
|
4
|
+
*/
|
|
5
|
+
export { KTDismiss } from './dismiss';
|
|
6
|
+
export type { KTDismissConfigInterface, KTDismissInterface } from './types';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/dismiss/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,YAAY,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* KTUI - Free & Open-Source Tailwind UI Components by Keenthemes
|
|
3
|
+
* Copyright 2025 by Keenthemes Inc
|
|
4
|
+
*/
|
|
5
|
+
export declare type KTDismissModeType = 'remove' | 'hide';
|
|
6
|
+
export interface KTDismissConfigInterface {
|
|
7
|
+
hiddenClass: string;
|
|
8
|
+
target: string;
|
|
9
|
+
interrupt: boolean;
|
|
10
|
+
mode?: KTDismissModeType;
|
|
11
|
+
}
|
|
12
|
+
export interface KTDismissInterface {
|
|
13
|
+
dismiss(): void;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/dismiss/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,OAAO,MAAM,iBAAiB,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE1D,MAAM,WAAW,wBAAwB;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,iBAAiB,CAAC;CACzB;AAED,MAAM,WAAW,kBAAkB;IAClC,OAAO,IAAI,IAAI,CAAC;CAChB"}
|