kdutify 0.16.9-rc.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/LICENSE +21 -0
- package/README.md +70 -0
- package/dist/kdutify.css +12850 -0
- package/dist/kdutify.css.map +1 -0
- package/dist/kdutify.js +16285 -0
- package/dist/kdutify.js.map +1 -0
- package/dist/kdutify.min.css +7 -0
- package/dist/kdutify.min.css.map +1 -0
- package/dist/kdutify.min.js +6 -0
- package/es5/components/KAlert/KAlert.js +80 -0
- package/es5/components/KAlert/index.js +7 -0
- package/es5/components/KApp/KApp.js +67 -0
- package/es5/components/KApp/index.js +7 -0
- package/es5/components/KAvatar/KAvatar.js +31 -0
- package/es5/components/KAvatar/index.js +7 -0
- package/es5/components/KBadge/KBadge.js +59 -0
- package/es5/components/KBadge/index.js +7 -0
- package/es5/components/KBottomNav/KBottomNav.js +50 -0
- package/es5/components/KBottomNav/index.js +7 -0
- package/es5/components/KBottomSheet/KBottomSheet.js +36 -0
- package/es5/components/KBottomSheet/index.js +7 -0
- package/es5/components/KBreadcrumbs/KBreadcrumbs.js +36 -0
- package/es5/components/KBreadcrumbs/KBreadcrumbsItem.js +38 -0
- package/es5/components/KBreadcrumbs/index.js +11 -0
- package/es5/components/KBtn/KBtn.js +153 -0
- package/es5/components/KBtn/index.js +7 -0
- package/es5/components/KBtnToggle/KBtnToggle.js +92 -0
- package/es5/components/KBtnToggle/index.js +7 -0
- package/es5/components/KCard/KCard.js +63 -0
- package/es5/components/KCard/KCardMedia.js +41 -0
- package/es5/components/KCard/KCardTitle.js +21 -0
- package/es5/components/KCard/index.js +19 -0
- package/es5/components/KCarousel/KCarousel.js +178 -0
- package/es5/components/KCarousel/KCarouselItem.js +63 -0
- package/es5/components/KCarousel/index.js +11 -0
- package/es5/components/KCheckbox/KCheckbox.js +89 -0
- package/es5/components/KCheckbox/index.js +7 -0
- package/es5/components/KChip/KChip.js +81 -0
- package/es5/components/KChip/index.js +7 -0
- package/es5/components/KDataTable/KDataTable.js +347 -0
- package/es5/components/KDataTable/KEditDialog.js +108 -0
- package/es5/components/KDataTable/index.js +14 -0
- package/es5/components/KDataTable/mixins/body.js +103 -0
- package/es5/components/KDataTable/mixins/foot.js +118 -0
- package/es5/components/KDataTable/mixins/head.js +123 -0
- package/es5/components/KDataTable/mixins/progress.js +16 -0
- package/es5/components/KDatePicker/KDatePicker.js +416 -0
- package/es5/components/KDatePicker/index.js +7 -0
- package/es5/components/KDatePicker/mixins/date-header.js +68 -0
- package/es5/components/KDatePicker/mixins/date-table.js +101 -0
- package/es5/components/KDatePicker/mixins/date-title.js +64 -0
- package/es5/components/KDatePicker/mixins/date-years.js +53 -0
- package/es5/components/KDatePicker/mixins/month-table.js +91 -0
- package/es5/components/KDialog/KDialog.js +181 -0
- package/es5/components/KDialog/index.js +7 -0
- package/es5/components/KDivider/KDivider.js +29 -0
- package/es5/components/KDivider/index.js +7 -0
- package/es5/components/KExpansionPanel/KExpansionPanel.js +60 -0
- package/es5/components/KExpansionPanel/KExpansionPanelContent.js +114 -0
- package/es5/components/KExpansionPanel/index.js +9 -0
- package/es5/components/KFooter/KFooter.js +61 -0
- package/es5/components/KFooter/index.js +7 -0
- package/es5/components/KForm/KForm.js +203 -0
- package/es5/components/KForm/index.js +7 -0
- package/es5/components/KGrid/KContainer.js +5 -0
- package/es5/components/KGrid/KContent.js +33 -0
- package/es5/components/KGrid/KFlex.js +5 -0
- package/es5/components/KGrid/KLayout.js +5 -0
- package/es5/components/KGrid/grid.js +43 -0
- package/es5/components/KGrid/index.js +20 -0
- package/es5/components/KIcon/KIcon.js +93 -0
- package/es5/components/KIcon/index.js +7 -0
- package/es5/components/KList/KList.js +82 -0
- package/es5/components/KList/KListGroup.js +100 -0
- package/es5/components/KList/KListTile.js +65 -0
- package/es5/components/KList/KListTileAction.js +15 -0
- package/es5/components/KList/index.js +27 -0
- package/es5/components/KMenu/KMenu.js +178 -0
- package/es5/components/KMenu/index.js +7 -0
- package/es5/components/KMenu/mixins/menu-activator.js +59 -0
- package/es5/components/KMenu/mixins/menu-generators.js +88 -0
- package/es5/components/KMenu/mixins/menu-keyable.js +64 -0
- package/es5/components/KMenu/mixins/menu-position.js +64 -0
- package/es5/components/KNavigationDrawer/KNavigationDrawer.js +238 -0
- package/es5/components/KNavigationDrawer/index.js +7 -0
- package/es5/components/KPagination/KPagination.js +167 -0
- package/es5/components/KPagination/index.js +7 -0
- package/es5/components/KParallax/KParallax.js +98 -0
- package/es5/components/KParallax/index.js +7 -0
- package/es5/components/KProgressCircular/KProgressCircular.js +145 -0
- package/es5/components/KProgressCircular/index.js +7 -0
- package/es5/components/KProgressLinear/KProgressLinear.js +146 -0
- package/es5/components/KProgressLinear/index.js +7 -0
- package/es5/components/KRadioGroup/KRadio.js +148 -0
- package/es5/components/KRadioGroup/KRadioGroup.js +139 -0
- package/es5/components/KRadioGroup/index.js +11 -0
- package/es5/components/KSelect/KSelect.js +635 -0
- package/es5/components/KSelect/index.js +7 -0
- package/es5/components/KSelect/mixins/select-autocomplete.js +125 -0
- package/es5/components/KSelect/mixins/select-generators.js +298 -0
- package/es5/components/KSlider/KSlider.js +306 -0
- package/es5/components/KSlider/index.js +7 -0
- package/es5/components/KSnackbar/KSnackbar.js +106 -0
- package/es5/components/KSnackbar/index.js +7 -0
- package/es5/components/KSpeedDial/KSpeedDial.js +89 -0
- package/es5/components/KSpeedDial/index.js +7 -0
- package/es5/components/KStepper/KStepper.js +112 -0
- package/es5/components/KStepper/KStepperContent.js +134 -0
- package/es5/components/KStepper/KStepperStep.js +105 -0
- package/es5/components/KStepper/index.js +17 -0
- package/es5/components/KSubheader/KSubheader.js +29 -0
- package/es5/components/KSubheader/index.js +7 -0
- package/es5/components/KSwitch/KSwitch.js +55 -0
- package/es5/components/KSwitch/index.js +7 -0
- package/es5/components/KSystemBar/KSystemBar.js +54 -0
- package/es5/components/KSystemBar/index.js +7 -0
- package/es5/components/KTabs/KTabs.js +272 -0
- package/es5/components/KTabs/KTabsBar.js +205 -0
- package/es5/components/KTabs/KTabsContent.js +86 -0
- package/es5/components/KTabs/KTabsItem.js +103 -0
- package/es5/components/KTabs/KTabsItems.js +40 -0
- package/es5/components/KTabs/KTabsSlider.js +14 -0
- package/es5/components/KTabs/index.js +17 -0
- package/es5/components/KTextField/KTextField.js +275 -0
- package/es5/components/KTextField/index.js +7 -0
- package/es5/components/KTimePicker/KTimePicker.js +302 -0
- package/es5/components/KTimePicker/index.js +7 -0
- package/es5/components/KTimePicker/mixins/time-body.js +207 -0
- package/es5/components/KTimePicker/mixins/time-title.js +55 -0
- package/es5/components/KToolbar/KToolbar.js +193 -0
- package/es5/components/KToolbar/KToolbarSideIcon.js +29 -0
- package/es5/components/KToolbar/index.js +17 -0
- package/es5/components/KTooltip/KTooltip.js +156 -0
- package/es5/components/KTooltip/index.js +7 -0
- package/es5/components/Kdutify/index.js +50 -0
- package/es5/components/index.js +45 -0
- package/es5/components/transitions/expand-transition.js +36 -0
- package/es5/components/transitions/index.js +47 -0
- package/es5/components/transitions/row-expand-transition.js +38 -0
- package/es5/directives/click-outside.js +100 -0
- package/es5/directives/index.js +15 -0
- package/es5/directives/resize.js +30 -0
- package/es5/directives/ripple.js +144 -0
- package/es5/directives/scroll.js +32 -0
- package/es5/directives/touch.js +102 -0
- package/es5/index.js +30 -0
- package/es5/mixins/applicationable.js +9 -0
- package/es5/mixins/bootable.js +31 -0
- package/es5/mixins/button-group.js +82 -0
- package/es5/mixins/colorable.js +24 -0
- package/es5/mixins/contextualable.js +10 -0
- package/es5/mixins/delayable.js +57 -0
- package/es5/mixins/dependent.js +121 -0
- package/es5/mixins/detachable.js +41 -0
- package/es5/mixins/filterable.js +8 -0
- package/es5/mixins/input.js +219 -0
- package/es5/mixins/loadable.js +31 -0
- package/es5/mixins/maskable.js +181 -0
- package/es5/mixins/menuable.js +293 -0
- package/es5/mixins/overlayable.js +202 -0
- package/es5/mixins/picker.js +36 -0
- package/es5/mixins/positionable.js +10 -0
- package/es5/mixins/rippleable.js +21 -0
- package/es5/mixins/routable.js +66 -0
- package/es5/mixins/selectable.js +79 -0
- package/es5/mixins/stackable.js +70 -0
- package/es5/mixins/tab-focusable.js +7 -0
- package/es5/mixins/themeable.js +15 -0
- package/es5/mixins/toggleable.js +31 -0
- package/es5/mixins/transitionable.js +7 -0
- package/es5/mixins/translatable.js +62 -0
- package/es5/mixins/validatable.js +138 -0
- package/es5/util/breakpoint.js +128 -0
- package/es5/util/helpers.js +139 -0
- package/es5/util/load.js +15 -0
- package/es5/util/mask.js +159 -0
- package/es5/util/testing.js +160 -0
- package/es5/util/to-have-been-warned.js +117 -0
- package/es5/util/touchSupport.js +14 -0
- package/index.d.ts +8 -0
- package/package.json +134 -0
- package/src/components/KAlert/KAlert.js +77 -0
- package/src/components/KAlert/index.js +7 -0
- package/src/components/KApp/KApp.js +64 -0
- package/src/components/KApp/index.js +7 -0
- package/src/components/KAvatar/KAvatar.js +27 -0
- package/src/components/KAvatar/index.js +7 -0
- package/src/components/KBadge/KBadge.js +62 -0
- package/src/components/KBadge/index.js +7 -0
- package/src/components/KBottomNav/KBottomNav.js +50 -0
- package/src/components/KBottomNav/index.js +7 -0
- package/src/components/KBottomSheet/KBottomSheet.js +41 -0
- package/src/components/KBottomSheet/index.js +7 -0
- package/src/components/KBreadcrumbs/KBreadcrumbs.js +35 -0
- package/src/components/KBreadcrumbs/KBreadcrumbsItem.js +38 -0
- package/src/components/KBreadcrumbs/index.js +11 -0
- package/src/components/KBtn/KBtn.js +163 -0
- package/src/components/KBtn/index.js +7 -0
- package/src/components/KBtnToggle/KBtnToggle.js +92 -0
- package/src/components/KBtnToggle/index.js +7 -0
- package/src/components/KCard/KCard.js +61 -0
- package/src/components/KCard/KCardMedia.js +41 -0
- package/src/components/KCard/KCardTitle.js +17 -0
- package/src/components/KCard/index.js +19 -0
- package/src/components/KCarousel/KCarousel.js +174 -0
- package/src/components/KCarousel/KCarouselItem.js +65 -0
- package/src/components/KCarousel/index.js +11 -0
- package/src/components/KCheckbox/KCheckbox.js +92 -0
- package/src/components/KCheckbox/index.js +7 -0
- package/src/components/KChip/KChip.js +83 -0
- package/src/components/KChip/index.js +7 -0
- package/src/components/KDataTable/KDataTable.js +346 -0
- package/src/components/KDataTable/KEditDialog.js +110 -0
- package/src/components/KDataTable/index.js +16 -0
- package/src/components/KDataTable/mixins/body.js +98 -0
- package/src/components/KDataTable/mixins/foot.js +128 -0
- package/src/components/KDataTable/mixins/head.js +119 -0
- package/src/components/KDataTable/mixins/progress.js +16 -0
- package/src/components/KDatePicker/KDatePicker.js +382 -0
- package/src/components/KDatePicker/index.js +7 -0
- package/src/components/KDatePicker/mixins/date-header.js +74 -0
- package/src/components/KDatePicker/mixins/date-table.js +95 -0
- package/src/components/KDatePicker/mixins/date-title.js +76 -0
- package/src/components/KDatePicker/mixins/date-years.js +42 -0
- package/src/components/KDatePicker/mixins/month-table.js +82 -0
- package/src/components/KDialog/KDialog.js +184 -0
- package/src/components/KDialog/index.js +7 -0
- package/src/components/KDivider/KDivider.js +25 -0
- package/src/components/KDivider/index.js +7 -0
- package/src/components/KExpansionPanel/KExpansionPanel.js +55 -0
- package/src/components/KExpansionPanel/KExpansionPanelContent.js +112 -0
- package/src/components/KExpansionPanel/index.js +9 -0
- package/src/components/KFooter/KFooter.js +67 -0
- package/src/components/KFooter/index.js +7 -0
- package/src/components/KForm/KForm.js +117 -0
- package/src/components/KForm/index.js +7 -0
- package/src/components/KGrid/KContainer.js +5 -0
- package/src/components/KGrid/KContent.js +29 -0
- package/src/components/KGrid/KFlex.js +5 -0
- package/src/components/KGrid/KLayout.js +5 -0
- package/src/components/KGrid/grid.js +40 -0
- package/src/components/KGrid/index.js +27 -0
- package/src/components/KIcon/KIcon.js +87 -0
- package/src/components/KIcon/index.js +7 -0
- package/src/components/KList/KList.js +75 -0
- package/src/components/KList/KListGroup.js +95 -0
- package/src/components/KList/KListTile.js +62 -0
- package/src/components/KList/KListTileAction.js +12 -0
- package/src/components/KList/index.js +27 -0
- package/src/components/KMenu/KMenu.js +207 -0
- package/src/components/KMenu/index.js +7 -0
- package/src/components/KMenu/mixins/menu-activator.js +51 -0
- package/src/components/KMenu/mixins/menu-generators.js +84 -0
- package/src/components/KMenu/mixins/menu-keyable.js +68 -0
- package/src/components/KMenu/mixins/menu-position.js +72 -0
- package/src/components/KNavigationDrawer/KNavigationDrawer.js +267 -0
- package/src/components/KNavigationDrawer/index.js +7 -0
- package/src/components/KPagination/KPagination.js +168 -0
- package/src/components/KPagination/index.js +7 -0
- package/src/components/KParallax/KParallax.js +99 -0
- package/src/components/KParallax/index.js +7 -0
- package/src/components/KProgressCircular/KProgressCircular.js +160 -0
- package/src/components/KProgressCircular/index.js +7 -0
- package/src/components/KProgressLinear/KProgressLinear.js +157 -0
- package/src/components/KProgressLinear/index.js +7 -0
- package/src/components/KRadioGroup/KRadio.js +153 -0
- package/src/components/KRadioGroup/KRadioGroup.js +118 -0
- package/src/components/KRadioGroup/index.js +11 -0
- package/src/components/KSelect/KSelect.js +641 -0
- package/src/components/KSelect/index.js +7 -0
- package/src/components/KSelect/mixins/select-autocomplete.js +125 -0
- package/src/components/KSelect/mixins/select-generators.js +300 -0
- package/src/components/KSlider/KSlider.js +311 -0
- package/src/components/KSlider/index.js +7 -0
- package/src/components/KSnackbar/KSnackbar.js +97 -0
- package/src/components/KSnackbar/index.js +7 -0
- package/src/components/KSpeedDial/KSpeedDial.js +80 -0
- package/src/components/KSpeedDial/index.js +7 -0
- package/src/components/KStepper/KStepper.js +95 -0
- package/src/components/KStepper/KStepperContent.js +138 -0
- package/src/components/KStepper/KStepperStep.js +100 -0
- package/src/components/KStepper/index.js +17 -0
- package/src/components/KSubheader/KSubheader.js +25 -0
- package/src/components/KSubheader/index.js +7 -0
- package/src/components/KSwitch/KSwitch.js +58 -0
- package/src/components/KSwitch/index.js +7 -0
- package/src/components/KSystemBar/KSystemBar.js +54 -0
- package/src/components/KSystemBar/index.js +7 -0
- package/src/components/KTabs/KTabs.js +240 -0
- package/src/components/KTabs/KTabsBar.js +202 -0
- package/src/components/KTabs/KTabsContent.js +90 -0
- package/src/components/KTabs/KTabsItem.js +99 -0
- package/src/components/KTabs/KTabsItems.js +40 -0
- package/src/components/KTabs/KTabsSlider.js +14 -0
- package/src/components/KTabs/index.js +17 -0
- package/src/components/KTextField/KTextField.js +246 -0
- package/src/components/KTextField/index.js +7 -0
- package/src/components/KTimePicker/KTimePicker.js +282 -0
- package/src/components/KTimePicker/index.js +7 -0
- package/src/components/KTimePicker/mixins/time-body.js +208 -0
- package/src/components/KTimePicker/mixins/time-title.js +51 -0
- package/src/components/KToolbar/KToolbar.js +206 -0
- package/src/components/KToolbar/KToolbarSideIcon.js +26 -0
- package/src/components/KToolbar/index.js +19 -0
- package/src/components/KTooltip/KTooltip.js +161 -0
- package/src/components/KTooltip/index.js +7 -0
- package/src/components/Kdutify/index.js +48 -0
- package/src/components/index.js +45 -0
- package/src/components/transitions/expand-transition.js +34 -0
- package/src/components/transitions/index.js +50 -0
- package/src/components/transitions/row-expand-transition.js +38 -0
- package/src/directives/click-outside.js +72 -0
- package/src/directives/index.js +21 -0
- package/src/directives/resize.js +30 -0
- package/src/directives/ripple.js +120 -0
- package/src/directives/scroll.js +31 -0
- package/src/directives/touch.js +90 -0
- package/src/index.js +30 -0
- package/src/mixins/applicationable.js +9 -0
- package/src/mixins/bootable.js +31 -0
- package/src/mixins/button-group.js +77 -0
- package/src/mixins/colorable.js +20 -0
- package/src/mixins/contextualable.js +10 -0
- package/src/mixins/delayable.js +54 -0
- package/src/mixins/dependent.js +55 -0
- package/src/mixins/detachable.js +44 -0
- package/src/mixins/filterable.js +8 -0
- package/src/mixins/input.js +220 -0
- package/src/mixins/loadable.js +33 -0
- package/src/mixins/maskable.js +117 -0
- package/src/mixins/menuable.js +299 -0
- package/src/mixins/overlayable.js +180 -0
- package/src/mixins/picker.js +35 -0
- package/src/mixins/positionable.js +10 -0
- package/src/mixins/rippleable.js +21 -0
- package/src/mixins/routable.js +66 -0
- package/src/mixins/selectable.js +84 -0
- package/src/mixins/stackable.js +44 -0
- package/src/mixins/tab-focusable.js +7 -0
- package/src/mixins/themeable.js +15 -0
- package/src/mixins/toggleable.js +28 -0
- package/src/mixins/transitionable.js +7 -0
- package/src/mixins/translatable.js +67 -0
- package/src/mixins/validatable.js +124 -0
- package/src/stylus/app.styl +6 -0
- package/src/stylus/bootstrap.styl +1 -0
- package/src/stylus/components/_alerts.styl +44 -0
- package/src/stylus/components/_app.styl +21 -0
- package/src/stylus/components/_avatars.styl +22 -0
- package/src/stylus/components/_badges.styl +49 -0
- package/src/stylus/components/_bottom-navs.styl +86 -0
- package/src/stylus/components/_bottom-sheets.styl +18 -0
- package/src/stylus/components/_breadcrumbs.styl +46 -0
- package/src/stylus/components/_button-toggle.styl +55 -0
- package/src/stylus/components/_buttons.styl +339 -0
- package/src/stylus/components/_cards.styl +85 -0
- package/src/stylus/components/_carousel.styl +76 -0
- package/src/stylus/components/_chips.styl +102 -0
- package/src/stylus/components/_content.styl +6 -0
- package/src/stylus/components/_data-table.styl +113 -0
- package/src/stylus/components/_date-picker.styl +214 -0
- package/src/stylus/components/_dialogs.styl +63 -0
- package/src/stylus/components/_dividers.styl +19 -0
- package/src/stylus/components/_expansion-panel.styl +85 -0
- package/src/stylus/components/_footer.styl +40 -0
- package/src/stylus/components/_grid.styl +171 -0
- package/src/stylus/components/_icons.styl +32 -0
- package/src/stylus/components/_input-groups.styl +310 -0
- package/src/stylus/components/_lists.styl +263 -0
- package/src/stylus/components/_menus.styl +87 -0
- package/src/stylus/components/_navigation-drawer.styl +150 -0
- package/src/stylus/components/_overlay.styl +42 -0
- package/src/stylus/components/_pagination.styl +95 -0
- package/src/stylus/components/_parallax.styl +35 -0
- package/src/stylus/components/_pickers.styl +66 -0
- package/src/stylus/components/_progress-circular.styl +58 -0
- package/src/stylus/components/_progress-linear.styl +104 -0
- package/src/stylus/components/_radio-group.styl +23 -0
- package/src/stylus/components/_ripples.styl +31 -0
- package/src/stylus/components/_select.styl +153 -0
- package/src/stylus/components/_selection-controls.styl +122 -0
- package/src/stylus/components/_sliders.styl +234 -0
- package/src/stylus/components/_small-dialog.styl +37 -0
- package/src/stylus/components/_snackbars.styl +110 -0
- package/src/stylus/components/_speed-dial.styl +78 -0
- package/src/stylus/components/_steppers.styl +216 -0
- package/src/stylus/components/_subheaders.styl +18 -0
- package/src/stylus/components/_switch.styl +89 -0
- package/src/stylus/components/_system-bars.styl +49 -0
- package/src/stylus/components/_tables.styl +103 -0
- package/src/stylus/components/_tabs.styl +159 -0
- package/src/stylus/components/_text-fields.styl +243 -0
- package/src/stylus/components/_time-picker.styl +199 -0
- package/src/stylus/components/_toolbar.styl +148 -0
- package/src/stylus/components/_tooltips.styl +25 -0
- package/src/stylus/elements/_blockquote.styl +5 -0
- package/src/stylus/elements/_code.styl +20 -0
- package/src/stylus/elements/_global.styl +31 -0
- package/src/stylus/elements/_headings.styl +17 -0
- package/src/stylus/elements/_lists.styl +2 -0
- package/src/stylus/elements/_typography.styl +54 -0
- package/src/stylus/generic/_bootstrap.styl +49 -0
- package/src/stylus/generic/_reset.styl +332 -0
- package/src/stylus/generic/_transitions.styl +116 -0
- package/src/stylus/main.styl +2 -0
- package/src/stylus/settings/_colors.styl +339 -0
- package/src/stylus/settings/_elevations.styl +111 -0
- package/src/stylus/settings/_theme.styl +201 -0
- package/src/stylus/settings/_variables.styl +396 -0
- package/src/stylus/theme.styl +24 -0
- package/src/stylus/tools/_animations.styl +9 -0
- package/src/stylus/tools/_colors.styl +17 -0
- package/src/stylus/tools/_elevations.styl +7 -0
- package/src/stylus/trumps/_display.styl +14 -0
- package/src/stylus/trumps/_helpers.styl +5 -0
- package/src/stylus/trumps/_spacing.styl +37 -0
- package/src/stylus/trumps/_text.styl +13 -0
- package/src/util/breakpoint.js +134 -0
- package/src/util/helpers.d.ts +21 -0
- package/src/util/helpers.js +125 -0
- package/src/util/load.js +13 -0
- package/src/util/mask.js +138 -0
- package/src/util/testing.js +154 -0
- package/src/util/to-have-been-warned.js +68 -0
- package/src/util/touchSupport.js +12 -0
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Select autocomplete
|
|
3
|
+
*
|
|
4
|
+
* @mixin
|
|
5
|
+
*
|
|
6
|
+
* Handles logic when using the "autocomplete" prop
|
|
7
|
+
*/
|
|
8
|
+
export default {
|
|
9
|
+
props: {
|
|
10
|
+
filter: {
|
|
11
|
+
type: Function,
|
|
12
|
+
default: (item, queryText, itemText) => {
|
|
13
|
+
const hasValue = val => [undefined, null].includes(val)
|
|
14
|
+
|
|
15
|
+
const text = hasValue(itemText) ? '' : itemText
|
|
16
|
+
const query = hasValue(queryText) ? '' : queryText
|
|
17
|
+
|
|
18
|
+
return text.toString()
|
|
19
|
+
.toLowerCase()
|
|
20
|
+
.indexOf(query.toString().toLowerCase()) > -1
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
methods: {
|
|
26
|
+
genFiltered (text) {
|
|
27
|
+
if (!this.isAutocomplete ||
|
|
28
|
+
!this.searchValue ||
|
|
29
|
+
this.filteredItems.length < 1
|
|
30
|
+
) return text
|
|
31
|
+
|
|
32
|
+
text = (text || '').toString()
|
|
33
|
+
|
|
34
|
+
const { start, middle, end } = this.getMaskedCharacters(text)
|
|
35
|
+
|
|
36
|
+
return `${start}${this.genHighlight(middle)}${end}`
|
|
37
|
+
},
|
|
38
|
+
genHighlight (text) {
|
|
39
|
+
if (this.isNotFiltering) return text
|
|
40
|
+
|
|
41
|
+
return `<span class="list__tile__mask">${text}</span>`
|
|
42
|
+
},
|
|
43
|
+
getMaskedCharacters (text) {
|
|
44
|
+
const searchValue = (this.searchValue || '').toString().toLowerCase()
|
|
45
|
+
const index = text.toLowerCase().indexOf(searchValue)
|
|
46
|
+
|
|
47
|
+
if (index < 0) return { start: '', middle: text, end: '' }
|
|
48
|
+
|
|
49
|
+
const start = text.slice(0, index)
|
|
50
|
+
const middle = text.slice(index, index + searchValue.length)
|
|
51
|
+
const end = text.slice(index + searchValue.length)
|
|
52
|
+
return { start, middle, end }
|
|
53
|
+
},
|
|
54
|
+
filterSearch () {
|
|
55
|
+
if (!this.isAutocomplete) return this.computedItems
|
|
56
|
+
|
|
57
|
+
return this.computedItems.filter(i => this.filter(
|
|
58
|
+
i, this.searchValue, this.getText(i))
|
|
59
|
+
)
|
|
60
|
+
},
|
|
61
|
+
onKeyDown (e) {
|
|
62
|
+
// If enter, space, up, or down is pressed, open menu
|
|
63
|
+
if (!this.menuIsActive && [13, 32, 38, 40].includes(e.keyCode)) {
|
|
64
|
+
e.preventDefault()
|
|
65
|
+
return this.showMenuItems()
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// If escape or tab with no search, blur
|
|
69
|
+
if (e.keyCode === 27 || e.keyCode === 9 && !this.searchValue) {
|
|
70
|
+
return this.blur()
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// Tab shouldn't switch inputs
|
|
74
|
+
if (e.keyCode === 9) {
|
|
75
|
+
this.tags ? e.preventDefault() : this.blur()
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if (!this.isAutocomplete ||
|
|
79
|
+
![32].includes(e.keyCode) // space
|
|
80
|
+
) this.$refs.menu.changeListIndex(e)
|
|
81
|
+
|
|
82
|
+
// Up or down
|
|
83
|
+
if ([38, 40].includes(e.keyCode)) this.selectedIndex = -1
|
|
84
|
+
|
|
85
|
+
if (this.isAutocomplete &&
|
|
86
|
+
!this.hideSelections &&
|
|
87
|
+
!this.searchValue
|
|
88
|
+
) this.changeSelectedIndex(e.keyCode)
|
|
89
|
+
|
|
90
|
+
if (!this.tags || !this.searchValue) return
|
|
91
|
+
|
|
92
|
+
// Tab, enter
|
|
93
|
+
if ([9, 13].includes(e.keyCode)) {
|
|
94
|
+
const newItem = this.filteredItems.length && this.$refs.menu.listIndex >= 0
|
|
95
|
+
? this.filteredItems[this.$refs.menu.listIndex]
|
|
96
|
+
: this.searchValue
|
|
97
|
+
this.addTag(newItem)
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// Left arrow
|
|
101
|
+
if (e.keyCode === 37 && this.$refs.input.selectionStart === 0 && this.selectedItems.length) {
|
|
102
|
+
this.addTag(this.searchValue)
|
|
103
|
+
this.$nextTick(() => {
|
|
104
|
+
this.selectedIndex = Math.max(this.selectedItems.length - 2, 0)
|
|
105
|
+
})
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// Right arrow
|
|
109
|
+
if (e.keyCode === 39 && this.$refs.input.selectionEnd === this.searchValue.length) {
|
|
110
|
+
this.$refs.menu.listIndex = -1
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
addTag (content) {
|
|
114
|
+
if (this.selectedItems.includes(content)) {
|
|
115
|
+
this.$delete(this.selectedItems, this.selectedItems.indexOf(content))
|
|
116
|
+
} else {
|
|
117
|
+
this.selectedItems.push(content)
|
|
118
|
+
}
|
|
119
|
+
this.$nextTick(() => {
|
|
120
|
+
this.searchValue = null
|
|
121
|
+
this.$emit('change', this.selectedItems)
|
|
122
|
+
})
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
import { getObjectValueByPath } from '../../../util/helpers'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Select generators
|
|
5
|
+
*
|
|
6
|
+
* @mixin
|
|
7
|
+
*
|
|
8
|
+
* Used for creating the DOM elements for KSelect
|
|
9
|
+
*/
|
|
10
|
+
export default {
|
|
11
|
+
methods: {
|
|
12
|
+
genMenu () {
|
|
13
|
+
const offsetY = this.isAutocomplete || this.offset || this.isDropdown
|
|
14
|
+
let nudgeTop = 0
|
|
15
|
+
|
|
16
|
+
if (this.auto) nudgeTop = -18
|
|
17
|
+
else if (this.solo) nudgeTop = 0
|
|
18
|
+
else if (this.isDropdown) nudgeTop = 26
|
|
19
|
+
else if (offsetY) nudgeTop = 24
|
|
20
|
+
|
|
21
|
+
const data = {
|
|
22
|
+
ref: 'menu',
|
|
23
|
+
props: {
|
|
24
|
+
activator: this.$el,
|
|
25
|
+
auto: this.auto,
|
|
26
|
+
closeOnClick: false,
|
|
27
|
+
closeOnContentClick: !this.isMultiple,
|
|
28
|
+
contentClass: this.computedContentClass,
|
|
29
|
+
disabled: this.disabled,
|
|
30
|
+
maxHeight: this.maxHeight,
|
|
31
|
+
nudgeTop,
|
|
32
|
+
offsetY,
|
|
33
|
+
offsetOverflow: this.isAutocomplete,
|
|
34
|
+
openOnClick: false,
|
|
35
|
+
value: this.menuIsActive &&
|
|
36
|
+
(!this.tags || this.filteredItems.length > 0) &&
|
|
37
|
+
(!this.combobox || this.filteredItems.length > 0),
|
|
38
|
+
zIndex: this.menuZIndex
|
|
39
|
+
},
|
|
40
|
+
on: {
|
|
41
|
+
input: val => {
|
|
42
|
+
if (!val) {
|
|
43
|
+
this.menuIsActive = false
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (this.isAutocomplete) data.props.transition = ''
|
|
50
|
+
|
|
51
|
+
this.minWidth && (data.props.minWidth = this.minWidth)
|
|
52
|
+
|
|
53
|
+
return this.$createElement('k-menu', data, [this.genList()])
|
|
54
|
+
},
|
|
55
|
+
genSelectionsAndSearch () {
|
|
56
|
+
return this.$createElement('div', {
|
|
57
|
+
'class': 'input-group__selections',
|
|
58
|
+
style: { 'overflow': 'hidden' },
|
|
59
|
+
ref: 'activator'
|
|
60
|
+
}, [
|
|
61
|
+
...this.genSelections(),
|
|
62
|
+
this.genSearch()
|
|
63
|
+
])
|
|
64
|
+
},
|
|
65
|
+
genSelections () {
|
|
66
|
+
if (this.hideSelections) return []
|
|
67
|
+
|
|
68
|
+
const children = []
|
|
69
|
+
const chips = this.chips
|
|
70
|
+
const slots = this.$scopedSlots.selection
|
|
71
|
+
const length = this.selectedItems.length
|
|
72
|
+
this.selectedItems.forEach((item, i) => {
|
|
73
|
+
if (slots) {
|
|
74
|
+
children.push(this.genSlotSelection(item, i))
|
|
75
|
+
} else if (chips) {
|
|
76
|
+
children.push(this.genChipSelection(item, i))
|
|
77
|
+
} else if (this.segmented) {
|
|
78
|
+
children.push(this.genSegmentedBtn(item, i))
|
|
79
|
+
} else {
|
|
80
|
+
children.push(this.genCommaSelection(item, i < length - 1, i))
|
|
81
|
+
}
|
|
82
|
+
})
|
|
83
|
+
|
|
84
|
+
return children
|
|
85
|
+
},
|
|
86
|
+
genSearch () {
|
|
87
|
+
const data = {
|
|
88
|
+
staticClass: 'input-group--select__autocomplete',
|
|
89
|
+
'class': {
|
|
90
|
+
'input-group--select__autocomplete--index': this.selectedIndex > -1
|
|
91
|
+
},
|
|
92
|
+
style: {
|
|
93
|
+
flex: this.shouldBreak ? '1 0 100%' : null
|
|
94
|
+
},
|
|
95
|
+
attrs: {
|
|
96
|
+
...this.$attrs,
|
|
97
|
+
disabled: this.disabled || !this.isAutocomplete,
|
|
98
|
+
readonly: this.readonly,
|
|
99
|
+
tabindex: this.disabled || !this.isAutocomplete ? -1 : this.tabindex
|
|
100
|
+
},
|
|
101
|
+
domProps: {
|
|
102
|
+
value: this.maskText(this.lazySearch || '')
|
|
103
|
+
},
|
|
104
|
+
directives: [{
|
|
105
|
+
name: 'show',
|
|
106
|
+
value: (this.isAutocomplete) ||
|
|
107
|
+
(this.placeholder && !this.selectedItems.length)
|
|
108
|
+
}],
|
|
109
|
+
ref: 'input',
|
|
110
|
+
key: 'input'
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
if (this.isAutocomplete) {
|
|
114
|
+
data.attrs.role = 'combobox'
|
|
115
|
+
data.domProps.autocomplete = this.browserAutocomplete
|
|
116
|
+
|
|
117
|
+
data.on = {
|
|
118
|
+
...this.genListeners(),
|
|
119
|
+
input: e => {
|
|
120
|
+
this.searchValue = this.unmaskText(e.target.value)
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
if (this.combobox) {
|
|
125
|
+
// When using the combobox
|
|
126
|
+
// update inputValue and
|
|
127
|
+
// set the menu status
|
|
128
|
+
data.on.blur = () => {
|
|
129
|
+
this.inputValue = this.lazySearch
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
data.directives = data.directives.concat(this.genDirectives())
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
if (this.placeholder) data.domProps.placeholder = this.placeholder
|
|
137
|
+
|
|
138
|
+
return this.$createElement('input', data)
|
|
139
|
+
},
|
|
140
|
+
genSegmentedBtn (item) {
|
|
141
|
+
if (!item.text || !item.callback) {
|
|
142
|
+
console.warn('[Kdutify] Warn: When using the k-select component with \'segmented\' prop without a selection slot, items must contain both a text and callback property')
|
|
143
|
+
return null
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
return this.$createElement('k-btn', {
|
|
147
|
+
props: {
|
|
148
|
+
flat: true
|
|
149
|
+
},
|
|
150
|
+
on: {
|
|
151
|
+
click (e) {
|
|
152
|
+
e.stopPropagation()
|
|
153
|
+
item.callback(e)
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}, [item.text])
|
|
157
|
+
},
|
|
158
|
+
genSlotSelection (item, index) {
|
|
159
|
+
return this.$scopedSlots.selection({
|
|
160
|
+
parent: this,
|
|
161
|
+
item,
|
|
162
|
+
index,
|
|
163
|
+
selected: index === this.selectedIndex,
|
|
164
|
+
disabled: this.disabled || this.readonly
|
|
165
|
+
})
|
|
166
|
+
},
|
|
167
|
+
genChipSelection (item, index) {
|
|
168
|
+
const isDisabled = this.disabled || this.readonly
|
|
169
|
+
const click = e => {
|
|
170
|
+
if (isDisabled) return
|
|
171
|
+
|
|
172
|
+
e.stopPropagation()
|
|
173
|
+
this.focus()
|
|
174
|
+
this.selectedIndex = index
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
return this.$createElement('k-chip', {
|
|
178
|
+
staticClass: 'chip--select-multi',
|
|
179
|
+
attrs: { tabindex: '-1' },
|
|
180
|
+
props: {
|
|
181
|
+
close: !isDisabled,
|
|
182
|
+
dark: this.dark,
|
|
183
|
+
disabled: isDisabled,
|
|
184
|
+
selected: index === this.selectedIndex
|
|
185
|
+
},
|
|
186
|
+
on: {
|
|
187
|
+
click: click,
|
|
188
|
+
focus: click,
|
|
189
|
+
input: () => this.selectItem(item)
|
|
190
|
+
},
|
|
191
|
+
key: this.getValue(item)
|
|
192
|
+
}, this.getText(item))
|
|
193
|
+
},
|
|
194
|
+
genCommaSelection (item, comma, index) {
|
|
195
|
+
return this.$createElement('div', {
|
|
196
|
+
staticClass: 'input-group__selections__comma',
|
|
197
|
+
'class': {
|
|
198
|
+
'input-group__selections__comma--active': index === this.selectedIndex
|
|
199
|
+
},
|
|
200
|
+
key: JSON.stringify(this.getValue(item)) // Item may be an object
|
|
201
|
+
}, `${this.getText(item)}${comma ? ', ' : ''}`)
|
|
202
|
+
},
|
|
203
|
+
genList () {
|
|
204
|
+
const children = this.filteredItems.map(o => {
|
|
205
|
+
if (o.header) return this.genHeader(o)
|
|
206
|
+
if (o.divider) return this.genDivider(o)
|
|
207
|
+
else return this.genTile(o)
|
|
208
|
+
})
|
|
209
|
+
|
|
210
|
+
if (!children.length) {
|
|
211
|
+
const noData = this.$slots['no-data']
|
|
212
|
+
if (noData) {
|
|
213
|
+
children.push(noData)
|
|
214
|
+
} else {
|
|
215
|
+
children.push(this.genTile(this.noDataText, true))
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
return this.$createElement('k-card', [
|
|
220
|
+
this.$createElement('k-list', {
|
|
221
|
+
ref: 'list'
|
|
222
|
+
}, children)
|
|
223
|
+
])
|
|
224
|
+
},
|
|
225
|
+
genHeader (item) {
|
|
226
|
+
return this.$createElement('k-subheader', {
|
|
227
|
+
props: item
|
|
228
|
+
}, item.header)
|
|
229
|
+
},
|
|
230
|
+
genDivider (item) {
|
|
231
|
+
return this.$createElement('k-divider', {
|
|
232
|
+
props: item
|
|
233
|
+
})
|
|
234
|
+
},
|
|
235
|
+
genTile (item, disabled) {
|
|
236
|
+
const active = this.selectedItems.indexOf(item) !== -1
|
|
237
|
+
|
|
238
|
+
if (typeof disabled === 'undefined') {
|
|
239
|
+
disabled = getObjectValueByPath(item, this.itemDisabled)
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
const data = {
|
|
243
|
+
on: {
|
|
244
|
+
click: e => {
|
|
245
|
+
if (disabled) return
|
|
246
|
+
|
|
247
|
+
this.selectItem(item)
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
props: {
|
|
251
|
+
avatar: item === Object(item) && this.itemAvatar in item,
|
|
252
|
+
ripple: true,
|
|
253
|
+
value: active
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
if (disabled) {
|
|
258
|
+
data.props.disabled = disabled
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
if (this.$scopedSlots.item) {
|
|
262
|
+
return this.$createElement('k-list-tile', data,
|
|
263
|
+
[this.$scopedSlots.item({ parent: this, item })]
|
|
264
|
+
)
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
return this.$createElement('k-list-tile', data,
|
|
268
|
+
[this.genAction(item, active), this.genContent(item)]
|
|
269
|
+
)
|
|
270
|
+
},
|
|
271
|
+
genAction (item, active) {
|
|
272
|
+
if (!this.isMultiple) return null
|
|
273
|
+
|
|
274
|
+
const data = {
|
|
275
|
+
staticClass: 'list__tile__action--select-multi',
|
|
276
|
+
on: {
|
|
277
|
+
click: e => {
|
|
278
|
+
e.stopPropagation()
|
|
279
|
+
this.selectItem(item)
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
return this.$createElement('k-list-tile-action', data, [
|
|
285
|
+
this.$createElement('k-checkbox', { props: { inputValue: active } })
|
|
286
|
+
])
|
|
287
|
+
},
|
|
288
|
+
genContent (item) {
|
|
289
|
+
const text = this.getText(item)
|
|
290
|
+
|
|
291
|
+
return this.$createElement('k-list-tile-content',
|
|
292
|
+
[this.$createElement('k-list-tile-title', {
|
|
293
|
+
domProps: {
|
|
294
|
+
innerHTML: this.genFiltered(text)
|
|
295
|
+
}
|
|
296
|
+
})]
|
|
297
|
+
)
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
}
|