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,92 @@
|
|
|
1
|
+
require('../../../src/stylus/components/_button-toggle.styl');
|
|
2
|
+
|
|
3
|
+
import ButtonGroup from '../../mixins/button-group';
|
|
4
|
+
import Themeable from '../../mixins/themeable';
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
name: 'k-btn-toggle',
|
|
8
|
+
|
|
9
|
+
model: {
|
|
10
|
+
prop: 'inputValue',
|
|
11
|
+
event: 'change'
|
|
12
|
+
},
|
|
13
|
+
|
|
14
|
+
mixins: [ButtonGroup, Themeable],
|
|
15
|
+
|
|
16
|
+
props: {
|
|
17
|
+
inputValue: {
|
|
18
|
+
required: false
|
|
19
|
+
},
|
|
20
|
+
items: {
|
|
21
|
+
type: Array,
|
|
22
|
+
default: function _default() {
|
|
23
|
+
return [];
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
mandatory: Boolean,
|
|
27
|
+
multiple: Boolean
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
computed: {
|
|
31
|
+
classes: function classes() {
|
|
32
|
+
return {
|
|
33
|
+
'btn-toggle': true,
|
|
34
|
+
'btn-toggle--selected': this.hasValue,
|
|
35
|
+
'theme--light': this.light,
|
|
36
|
+
'theme--dark': this.dark
|
|
37
|
+
};
|
|
38
|
+
},
|
|
39
|
+
hasValue: function hasValue() {
|
|
40
|
+
return this.multiple && this.inputValue.length || !this.multiple && this.inputValue !== null && typeof this.inputValue !== 'undefined';
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
watch: {
|
|
45
|
+
inputValue: {
|
|
46
|
+
handler: function handler() {
|
|
47
|
+
this.update();
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
deep: true
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
|
|
54
|
+
methods: {
|
|
55
|
+
isSelected: function isSelected(i) {
|
|
56
|
+
var item = this.getValue(i);
|
|
57
|
+
if (!this.multiple) {
|
|
58
|
+
return this.inputValue === item;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return this.inputValue.includes(item);
|
|
62
|
+
},
|
|
63
|
+
updateValue: function updateValue(i) {
|
|
64
|
+
var item = this.getValue(i);
|
|
65
|
+
if (!this.multiple) {
|
|
66
|
+
if (this.mandatory && this.inputValue === item) return;
|
|
67
|
+
return this.$emit('change', this.inputValue === item ? null : item);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
var items = this.inputValue.slice();
|
|
71
|
+
|
|
72
|
+
var index = items.indexOf(item);
|
|
73
|
+
if (index > -1) {
|
|
74
|
+
if (this.mandatory && items.length === 1) return;
|
|
75
|
+
items.length >= 1 && items.splice(index, 1);
|
|
76
|
+
} else {
|
|
77
|
+
items.push(item);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
this.$emit('change', items);
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
|
|
84
|
+
mounted: function mounted() {
|
|
85
|
+
if (this.items.length > 0) {
|
|
86
|
+
console.warn('The \'items\' props has been deprecated. k-btn-toggle now has a default slot where you can place buttons.');
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
render: function render(h) {
|
|
90
|
+
return h('div', { class: this.classes }, this.$slots.default);
|
|
91
|
+
}
|
|
92
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
require('../../../src/stylus/components/_cards.styl');
|
|
2
|
+
|
|
3
|
+
import Colorable from '../../mixins/colorable';
|
|
4
|
+
import Routable from '../../mixins/routable';
|
|
5
|
+
import Themeable from '../../mixins/themeable';
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
name: 'k-card',
|
|
9
|
+
|
|
10
|
+
mixins: [Colorable, Routable, Themeable],
|
|
11
|
+
|
|
12
|
+
props: {
|
|
13
|
+
flat: Boolean,
|
|
14
|
+
height: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: 'auto'
|
|
17
|
+
},
|
|
18
|
+
hover: Boolean,
|
|
19
|
+
img: String,
|
|
20
|
+
raised: Boolean,
|
|
21
|
+
tag: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: 'div'
|
|
24
|
+
},
|
|
25
|
+
tile: Boolean
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
computed: {
|
|
29
|
+
classes: function classes() {
|
|
30
|
+
return this.addBackgroundColorClassChecks({
|
|
31
|
+
'card': true,
|
|
32
|
+
'card--flat': this.flat,
|
|
33
|
+
'card--horizontal': this.horizontal,
|
|
34
|
+
'card--hover': this.hover,
|
|
35
|
+
'card--raised': this.raised,
|
|
36
|
+
'card--tile': this.tile,
|
|
37
|
+
'theme--light': this.light,
|
|
38
|
+
'theme--dark': this.dark
|
|
39
|
+
});
|
|
40
|
+
},
|
|
41
|
+
styles: function styles() {
|
|
42
|
+
var style = {
|
|
43
|
+
height: isNaN(this.height) ? this.height : this.height + 'px'
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
if (this.img) {
|
|
47
|
+
style.background = 'url(' + this.img + ') center center / cover no-repeat';
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return style;
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
|
|
54
|
+
render: function render(h) {
|
|
55
|
+
var _generateRouteLink = this.generateRouteLink(),
|
|
56
|
+
tag = _generateRouteLink.tag,
|
|
57
|
+
data = _generateRouteLink.data;
|
|
58
|
+
|
|
59
|
+
data.style = this.styles;
|
|
60
|
+
|
|
61
|
+
return h(tag, data, this.$slots.default);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
name: 'k-card-media',
|
|
3
|
+
|
|
4
|
+
props: {
|
|
5
|
+
contain: Boolean,
|
|
6
|
+
height: {
|
|
7
|
+
type: [Number, String],
|
|
8
|
+
default: 'auto'
|
|
9
|
+
},
|
|
10
|
+
src: {
|
|
11
|
+
type: String
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
render: function render(h) {
|
|
16
|
+
var data = {
|
|
17
|
+
'class': 'card__media',
|
|
18
|
+
style: {
|
|
19
|
+
height: !isNaN(this.height) ? this.height + 'px' : this.height
|
|
20
|
+
},
|
|
21
|
+
on: this.$listeners
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
var children = [];
|
|
25
|
+
|
|
26
|
+
if (this.src) {
|
|
27
|
+
children.push(h('div', {
|
|
28
|
+
'class': 'card__media__background',
|
|
29
|
+
style: {
|
|
30
|
+
background: 'url(' + this.src + ') center center / ' + (this.contain ? 'contain' : 'cover') + ' no-repeat'
|
|
31
|
+
}
|
|
32
|
+
}));
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
children.push(h('div', {
|
|
36
|
+
'class': 'card__media__content'
|
|
37
|
+
}, this.$slots.default));
|
|
38
|
+
|
|
39
|
+
return h('div', data, children);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
name: 'k-card-title',
|
|
3
|
+
|
|
4
|
+
functional: true,
|
|
5
|
+
|
|
6
|
+
props: {
|
|
7
|
+
primaryTitle: Boolean
|
|
8
|
+
},
|
|
9
|
+
|
|
10
|
+
render: function render(h, _ref) {
|
|
11
|
+
var data = _ref.data,
|
|
12
|
+
props = _ref.props,
|
|
13
|
+
children = _ref.children;
|
|
14
|
+
|
|
15
|
+
data.staticClass = ('card__title ' + (data.staticClass || '')).trim();
|
|
16
|
+
|
|
17
|
+
if (props.primaryTitle) data.staticClass += ' card__title--primary';
|
|
18
|
+
|
|
19
|
+
return h('div', data, children);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { createSimpleFunctional } from '../../util/helpers';
|
|
2
|
+
import KCard from './KCard';
|
|
3
|
+
import KCardMedia from './KCardMedia';
|
|
4
|
+
import KCardTitle from './KCardTitle';
|
|
5
|
+
|
|
6
|
+
export { KCard, KCardMedia, KCardTitle };
|
|
7
|
+
|
|
8
|
+
KCard.install = function install(Kdu) {
|
|
9
|
+
var KCardActions = createSimpleFunctional('card__actions');
|
|
10
|
+
var KCardText = createSimpleFunctional('card__text');
|
|
11
|
+
|
|
12
|
+
Kdu.component(KCard.name, KCard);
|
|
13
|
+
Kdu.component(KCardMedia.name, KCardMedia);
|
|
14
|
+
Kdu.component(KCardTitle.name, KCardTitle);
|
|
15
|
+
Kdu.component('k-card-actions', KCardActions);
|
|
16
|
+
Kdu.component('k-card-text', KCardText);
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export default KCard;
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
require('../../../src/stylus/components/_carousel.styl');
|
|
2
|
+
|
|
3
|
+
import KBtn from '../KBtn';
|
|
4
|
+
import KIcon from '../KIcon';
|
|
5
|
+
|
|
6
|
+
import Bootable from '../../mixins/bootable';
|
|
7
|
+
import Themeable from '../../mixins/themeable';
|
|
8
|
+
|
|
9
|
+
import Touch from '../../directives/touch';
|
|
10
|
+
|
|
11
|
+
export default {
|
|
12
|
+
name: 'k-carousel',
|
|
13
|
+
|
|
14
|
+
mixins: [Bootable, Themeable],
|
|
15
|
+
|
|
16
|
+
directives: { Touch: Touch },
|
|
17
|
+
|
|
18
|
+
data: function data() {
|
|
19
|
+
return {
|
|
20
|
+
inputValue: null,
|
|
21
|
+
items: [],
|
|
22
|
+
slideTimeout: null,
|
|
23
|
+
reverse: false
|
|
24
|
+
};
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
props: {
|
|
29
|
+
cycle: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: true
|
|
32
|
+
},
|
|
33
|
+
hideControls: Boolean,
|
|
34
|
+
icon: {
|
|
35
|
+
type: String,
|
|
36
|
+
default: 'fiber_manual_record'
|
|
37
|
+
},
|
|
38
|
+
interval: {
|
|
39
|
+
type: [Number, String],
|
|
40
|
+
default: 6000,
|
|
41
|
+
validator: function validator(value) {
|
|
42
|
+
return value > 0;
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
leftControlIcon: {
|
|
46
|
+
type: [Boolean, String],
|
|
47
|
+
default: 'chevron_left'
|
|
48
|
+
},
|
|
49
|
+
rightControlIcon: {
|
|
50
|
+
type: [Boolean, String],
|
|
51
|
+
default: 'chevron_right'
|
|
52
|
+
},
|
|
53
|
+
value: Number
|
|
54
|
+
},
|
|
55
|
+
|
|
56
|
+
watch: {
|
|
57
|
+
inputValue: function inputValue() {
|
|
58
|
+
var _this = this;
|
|
59
|
+
|
|
60
|
+
// Evaluate items when inputValue changes to account for
|
|
61
|
+
// dynamic changing of children
|
|
62
|
+
this.items = this.$children.filter(function (i) {
|
|
63
|
+
return i.$el.classList && i.$el.classList.contains('carousel__item');
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
this.items.forEach(function (i) {
|
|
67
|
+
return i.open(_this.items[_this.inputValue]._uid, _this.reverse);
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
this.$emit('input', this.inputValue);
|
|
71
|
+
this.restartTimeout();
|
|
72
|
+
},
|
|
73
|
+
value: function value(val) {
|
|
74
|
+
this.inputValue = val;
|
|
75
|
+
},
|
|
76
|
+
interval: function interval() {
|
|
77
|
+
this.restartTimeout();
|
|
78
|
+
},
|
|
79
|
+
cycle: function cycle(val) {
|
|
80
|
+
if (val) {
|
|
81
|
+
this.restartTimeout();
|
|
82
|
+
} else {
|
|
83
|
+
clearTimeout(this.slideTimeout);
|
|
84
|
+
this.slideTimeout = null;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
|
|
89
|
+
mounted: function mounted() {
|
|
90
|
+
this.init();
|
|
91
|
+
},
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
methods: {
|
|
95
|
+
genControls: function genControls() {
|
|
96
|
+
return this.$createElement('div', {
|
|
97
|
+
staticClass: 'carousel__controls'
|
|
98
|
+
}, this.genItems());
|
|
99
|
+
},
|
|
100
|
+
genIcon: function genIcon(direction, icon, fn) {
|
|
101
|
+
if (!icon) return null;
|
|
102
|
+
|
|
103
|
+
return this.$createElement('div', {
|
|
104
|
+
staticClass: 'carousel__' + direction
|
|
105
|
+
}, [this.$createElement(KBtn, {
|
|
106
|
+
props: {
|
|
107
|
+
icon: true,
|
|
108
|
+
dark: this.dark || !this.light,
|
|
109
|
+
light: this.light
|
|
110
|
+
},
|
|
111
|
+
on: { click: fn }
|
|
112
|
+
}, [this.$createElement(KIcon, icon)])]);
|
|
113
|
+
},
|
|
114
|
+
genItems: function genItems() {
|
|
115
|
+
var _this2 = this;
|
|
116
|
+
|
|
117
|
+
return this.items.map(function (item, index) {
|
|
118
|
+
return _this2.$createElement(KBtn, {
|
|
119
|
+
class: {
|
|
120
|
+
'carousel__controls__item': true,
|
|
121
|
+
'carousel__controls__item--active': index === _this2.inputValue
|
|
122
|
+
},
|
|
123
|
+
props: {
|
|
124
|
+
icon: true,
|
|
125
|
+
dark: _this2.dark || !_this2.light,
|
|
126
|
+
light: _this2.light
|
|
127
|
+
},
|
|
128
|
+
key: index,
|
|
129
|
+
on: { click: _this2.select.bind(_this2, index) }
|
|
130
|
+
}, [_this2.$createElement(KIcon, _this2.icon)]);
|
|
131
|
+
});
|
|
132
|
+
},
|
|
133
|
+
restartTimeout: function restartTimeout() {
|
|
134
|
+
this.slideTimeout && clearTimeout(this.slideTimeout);
|
|
135
|
+
this.slideTimeout = null;
|
|
136
|
+
|
|
137
|
+
var raf = requestAnimationFrame || setTimeout;
|
|
138
|
+
raf(this.startTimeout);
|
|
139
|
+
},
|
|
140
|
+
init: function init() {
|
|
141
|
+
this.inputValue = this.value || 0;
|
|
142
|
+
},
|
|
143
|
+
next: function next() {
|
|
144
|
+
this.reverse = false;
|
|
145
|
+
this.inputValue = (this.inputValue + 1) % this.items.length;
|
|
146
|
+
},
|
|
147
|
+
prev: function prev() {
|
|
148
|
+
this.reverse = true;
|
|
149
|
+
this.inputValue = (this.inputValue + this.items.length - 1) % this.items.length;
|
|
150
|
+
},
|
|
151
|
+
select: function select(index) {
|
|
152
|
+
this.reverse = index < this.inputValue;
|
|
153
|
+
this.inputValue = index;
|
|
154
|
+
},
|
|
155
|
+
startTimeout: function startTimeout() {
|
|
156
|
+
var _this3 = this;
|
|
157
|
+
|
|
158
|
+
if (!this.cycle) return;
|
|
159
|
+
|
|
160
|
+
this.slideTimeout = setTimeout(function () {
|
|
161
|
+
return _this3.next();
|
|
162
|
+
}, this.interval > 0 ? this.interval : 6000);
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
|
|
166
|
+
render: function render(h) {
|
|
167
|
+
return h('div', {
|
|
168
|
+
staticClass: 'carousel',
|
|
169
|
+
directives: [{
|
|
170
|
+
name: 'touch',
|
|
171
|
+
value: {
|
|
172
|
+
left: this.next,
|
|
173
|
+
right: this.prev
|
|
174
|
+
}
|
|
175
|
+
}]
|
|
176
|
+
}, [this.genIcon('left', this.leftControlIcon, this.prev), this.genIcon('right', this.rightControlIcon, this.next), this.hideControls ? null : this.genControls(), this.$slots.default]);
|
|
177
|
+
}
|
|
178
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
name: 'k-carousel-item',
|
|
3
|
+
|
|
4
|
+
data: function data() {
|
|
5
|
+
return {
|
|
6
|
+
active: false,
|
|
7
|
+
reverse: false
|
|
8
|
+
};
|
|
9
|
+
},
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
props: {
|
|
13
|
+
src: {
|
|
14
|
+
type: String,
|
|
15
|
+
required: true
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
transition: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: 'tab-transition'
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
reverseTransition: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: 'tab-reverse-transition'
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
computed: {
|
|
30
|
+
computedTransition: function computedTransition() {
|
|
31
|
+
return this.reverse ? this.reverseTransition : this.transition;
|
|
32
|
+
},
|
|
33
|
+
styles: function styles() {
|
|
34
|
+
return {
|
|
35
|
+
backgroundImage: 'url(' + this.src + ')'
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
methods: {
|
|
41
|
+
open: function open(id, reverse) {
|
|
42
|
+
this.active = this._uid === id;
|
|
43
|
+
this.reverse = reverse;
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
|
|
47
|
+
render: function render(h) {
|
|
48
|
+
var item = h('div', {
|
|
49
|
+
class: {
|
|
50
|
+
'carousel__item': true,
|
|
51
|
+
'reverse': this.reverse
|
|
52
|
+
},
|
|
53
|
+
style: this.styles,
|
|
54
|
+
on: this.$listeners,
|
|
55
|
+
directives: [{
|
|
56
|
+
name: 'show',
|
|
57
|
+
value: this.active
|
|
58
|
+
}]
|
|
59
|
+
}, [this.$slots.default]);
|
|
60
|
+
|
|
61
|
+
return h('transition', { props: { name: this.computedTransition } }, [item]);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import KCarousel from './KCarousel';
|
|
2
|
+
import KCarouselItem from './KCarouselItem';
|
|
3
|
+
|
|
4
|
+
export { KCarousel, KCarouselItem };
|
|
5
|
+
|
|
6
|
+
KCarousel.install = function install(Kdu) {
|
|
7
|
+
Kdu.component(KCarousel.name, KCarousel);
|
|
8
|
+
Kdu.component(KCarouselItem.name, KCarouselItem);
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export default KCarousel;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
require('../../../src/stylus/components/_input-groups.styl');
|
|
2
|
+
require('../../../src/stylus/components/_selection-controls.styl');
|
|
3
|
+
|
|
4
|
+
import KIcon from '../KIcon';
|
|
5
|
+
import { KFadeTransition } from '../transitions';
|
|
6
|
+
import Rippleable from '../../mixins/rippleable';
|
|
7
|
+
import Selectable from '../../mixins/selectable';
|
|
8
|
+
|
|
9
|
+
export default {
|
|
10
|
+
name: 'k-checkbox',
|
|
11
|
+
|
|
12
|
+
components: {
|
|
13
|
+
KFadeTransition: KFadeTransition,
|
|
14
|
+
KIcon: KIcon
|
|
15
|
+
},
|
|
16
|
+
|
|
17
|
+
mixins: [Rippleable, Selectable],
|
|
18
|
+
|
|
19
|
+
data: function data() {
|
|
20
|
+
return {
|
|
21
|
+
inputIndeterminate: this.indeterminate
|
|
22
|
+
};
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
props: {
|
|
27
|
+
indeterminate: Boolean
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
computed: {
|
|
31
|
+
classes: function classes() {
|
|
32
|
+
var classes = {
|
|
33
|
+
'checkbox': true,
|
|
34
|
+
'input-group--selection-controls': true,
|
|
35
|
+
'input-group--active': this.isActive
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
if (this.hasError) {
|
|
39
|
+
classes['error--text'] = true;
|
|
40
|
+
} else {
|
|
41
|
+
return this.addTextColorClassChecks(classes);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return classes;
|
|
45
|
+
},
|
|
46
|
+
icon: function icon() {
|
|
47
|
+
if (this.inputIndeterminate) {
|
|
48
|
+
return 'indeterminate_check_box';
|
|
49
|
+
} else if (this.isActive) {
|
|
50
|
+
return 'check_box';
|
|
51
|
+
} else {
|
|
52
|
+
return 'check_box_outline_blank';
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
|
|
57
|
+
methods: {
|
|
58
|
+
groupFocus: function groupFocus(e) {
|
|
59
|
+
this.isFocused = true;
|
|
60
|
+
this.$emit('focus', e);
|
|
61
|
+
},
|
|
62
|
+
groupBlur: function groupBlur(e) {
|
|
63
|
+
this.isFocused = false;
|
|
64
|
+
this.tabFocused = false;
|
|
65
|
+
this.$emit('blur', this.inputValue);
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
|
|
69
|
+
render: function render(h) {
|
|
70
|
+
var transition = h('k-fade-transition', [h('k-icon', {
|
|
71
|
+
staticClass: 'icon--selection-control',
|
|
72
|
+
'class': {
|
|
73
|
+
'icon--checkbox': this.icon === 'check_box'
|
|
74
|
+
},
|
|
75
|
+
key: this.icon
|
|
76
|
+
}, this.icon)]);
|
|
77
|
+
|
|
78
|
+
var data = {
|
|
79
|
+
attrs: {
|
|
80
|
+
tabindex: this.disabled ? -1 : this.internalTabIndex || this.tabindex,
|
|
81
|
+
role: 'checkbox',
|
|
82
|
+
'aria-checked': this.inputIndeterminate && 'mixed' || this.isActive && 'true' || 'false',
|
|
83
|
+
'aria-label': this.label
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
return this.genInputGroup([transition, this.genRipple()], data);
|
|
88
|
+
}
|
|
89
|
+
};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
require('../../../src/stylus/components/_chips.styl');
|
|
2
|
+
|
|
3
|
+
import KIcon from '../KIcon';
|
|
4
|
+
import Colorable from '../../mixins/colorable';
|
|
5
|
+
import Themeable from '../../mixins/themeable';
|
|
6
|
+
import Toggleable from '../../mixins/toggleable';
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
name: 'k-chip',
|
|
10
|
+
|
|
11
|
+
components: {
|
|
12
|
+
KIcon: KIcon
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
mixins: [Colorable, Themeable, Toggleable],
|
|
16
|
+
|
|
17
|
+
props: {
|
|
18
|
+
close: Boolean,
|
|
19
|
+
disabled: Boolean,
|
|
20
|
+
label: Boolean,
|
|
21
|
+
outline: Boolean,
|
|
22
|
+
// Used for selects/tagging
|
|
23
|
+
selected: Boolean,
|
|
24
|
+
small: Boolean,
|
|
25
|
+
textColor: String,
|
|
26
|
+
value: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: true
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
computed: {
|
|
33
|
+
classes: function classes() {
|
|
34
|
+
var classes = this.addBackgroundColorClassChecks({
|
|
35
|
+
'chip': true,
|
|
36
|
+
'chip--disabled': this.disabled,
|
|
37
|
+
'chip--selected': this.selected,
|
|
38
|
+
'chip--label': this.label,
|
|
39
|
+
'chip--outline': this.outline,
|
|
40
|
+
'chip--small': this.small,
|
|
41
|
+
'chip--removable': this.close,
|
|
42
|
+
'theme--light': this.light,
|
|
43
|
+
'theme--dark': this.dark
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
return this.textColor || this.outline ? this.addTextColorClassChecks(classes, this.textColor ? 'textColor' : 'color') : classes;
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
render: function render(h) {
|
|
51
|
+
var _this = this;
|
|
52
|
+
|
|
53
|
+
var children = [this.$slots.default];
|
|
54
|
+
var data = {
|
|
55
|
+
'class': this.classes,
|
|
56
|
+
attrs: { tabindex: this.disabled ? -1 : 0 },
|
|
57
|
+
directives: [{
|
|
58
|
+
name: 'show',
|
|
59
|
+
value: this.isActive
|
|
60
|
+
}],
|
|
61
|
+
on: this.$listeners
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
if (this.close) {
|
|
65
|
+
var _data = {
|
|
66
|
+
staticClass: 'chip__close',
|
|
67
|
+
on: {
|
|
68
|
+
click: function click(e) {
|
|
69
|
+
e.stopPropagation();
|
|
70
|
+
|
|
71
|
+
_this.$emit('input', false);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
children.push(h('div', _data, [h(KIcon, { props: { right: true } }, 'cancel')]));
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
return h('span', data, children);
|
|
80
|
+
}
|
|
81
|
+
};
|