@progress/kendo-angular-buttons 7.0.0-next.202111120840 → 7.0.2-dev.202201201235

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.
Files changed (283) hide show
  1. package/LICENSE.md +1 -1
  2. package/NOTICE.txt +119 -79
  3. package/README.md +1 -1
  4. package/dist/cdn/js/kendo-angular-buttons.js +20 -0
  5. package/dist/cdn/main.js +5 -0
  6. package/dist/es/button/button.directive.js +769 -0
  7. package/{esm2015 → dist/es}/button/button.module.js +13 -13
  8. package/dist/es/button/button.service.js +24 -0
  9. package/{esm2015 → dist/es}/button/selection-settings.js +0 -1
  10. package/dist/es/buttongroup/buttongroup.component.js +353 -0
  11. package/dist/es/buttongroup/buttongroup.module.js +30 -0
  12. package/{esm2015 → dist/es}/buttons.module.js +12 -12
  13. package/{esm2015 → dist/es}/chip/chip-content-click-event-args.interface.js +0 -1
  14. package/{esm2015 → dist/es}/chip/chip-list-remove-event-args.interface.js +0 -1
  15. package/dist/es/chip/chip-list.component.js +214 -0
  16. package/{esm2015 → dist/es}/chip/chip-remove-event-args.interface.js +0 -1
  17. package/dist/es/chip/chip.component.js +449 -0
  18. package/dist/es/chip/chip.module.js +55 -0
  19. package/{esm2015 → dist/es}/chip/models/selection.js +0 -1
  20. package/dist/es/common/models/fillmode.js +4 -0
  21. package/dist/es/common/models/rounded.js +4 -0
  22. package/{esm2015 → dist/es}/common/models/shape.js +0 -1
  23. package/{esm2015 → dist/es}/common/models/size.js +0 -1
  24. package/dist/es/common/models/styling-classes.js +4 -0
  25. package/{esm2015 → dist/es}/common/models/theme-color.js +0 -1
  26. package/{esm2015/button-look.js → dist/es/common/models.js} +0 -1
  27. package/{esm2015 → dist/es}/direction.js +0 -1
  28. package/dist/es/dropdownbutton/dropdownbutton.component.js +704 -0
  29. package/dist/es/dropdownbutton/dropdownbutton.module.js +32 -0
  30. package/dist/es/floatingactionbutton/animations/animations.js +33 -0
  31. package/dist/es/floatingactionbutton/dial-item.component.js +143 -0
  32. package/dist/es/floatingactionbutton/dial-list.component.js +76 -0
  33. package/dist/es/floatingactionbutton/floatingactionbutton.component.js +903 -0
  34. package/dist/es/floatingactionbutton/floatingactionbutton.module.js +65 -0
  35. package/{esm2015 → dist/es}/floatingactionbutton/models/align.js +0 -1
  36. package/{esm2015 → dist/es}/floatingactionbutton/models/item-animation.interface.js +0 -1
  37. package/{esm2015 → dist/es}/floatingactionbutton/models/item-click.event.js +0 -1
  38. package/{esm2015 → dist/es}/floatingactionbutton/models/item.interface.js +0 -1
  39. package/{esm2015 → dist/es}/floatingactionbutton/models/offset.js +0 -1
  40. package/{esm2015 → dist/es}/floatingactionbutton/models/position-mode.js +0 -1
  41. package/dist/es/floatingactionbutton/templates/dial-item-template.directive.js +26 -0
  42. package/dist/es/floatingactionbutton/templates/fab-template.directive.js +26 -0
  43. package/dist/es/floatingactionbutton/utils.js +38 -0
  44. package/dist/es/focusable/focus.service.js +43 -0
  45. package/dist/es/focusable/focusable.directive.js +68 -0
  46. package/dist/es/index.js +22 -0
  47. package/dist/es/listbutton/button-item-template.directive.js +68 -0
  48. package/dist/es/listbutton/list-button.js +243 -0
  49. package/{esm2015 → dist/es}/listbutton/list-item-model.js +0 -1
  50. package/dist/es/listbutton/list.component.js +85 -0
  51. package/dist/es/listbutton/list.module.js +33 -0
  52. package/{esm2015 → dist/es}/listbutton/popup-settings.js +0 -1
  53. package/dist/es/listbutton/template-context.directive.js +40 -0
  54. package/{esm2015 → dist/es}/main.js +1 -5
  55. package/{esm2015 → dist/es}/navigation/key-events.js +0 -0
  56. package/{esm2015 → dist/es}/navigation/navigation-action.js +0 -0
  57. package/dist/es/navigation/navigation-config.js +9 -0
  58. package/dist/es/navigation/navigation.service.js +114 -0
  59. package/dist/es/package-metadata.js +15 -0
  60. package/dist/es/preventable-event.js +29 -0
  61. package/dist/es/splitbutton/localization/custom-messages.component.js +44 -0
  62. package/dist/es/splitbutton/localization/localized-messages.directive.js +35 -0
  63. package/dist/es/splitbutton/localization/messages.js +22 -0
  64. package/dist/es/splitbutton/splitbutton.component.js +830 -0
  65. package/dist/es/splitbutton/splitbutton.module.js +34 -0
  66. package/dist/es/util.js +97 -0
  67. package/{button → dist/es2015/button}/button.directive.d.ts +101 -46
  68. package/dist/es2015/button/button.directive.js +671 -0
  69. package/{button → dist/es2015/button}/button.module.d.ts +0 -5
  70. package/dist/es2015/button/button.module.js +47 -0
  71. package/{button → dist/es2015/button}/button.service.d.ts +1 -7
  72. package/dist/es2015/button/button.service.js +26 -0
  73. package/{button → dist/es2015/button}/selection-settings.d.ts +0 -0
  74. package/dist/es2015/button/selection-settings.js +4 -0
  75. package/{buttongroup → dist/es2015/buttongroup}/buttongroup.component.d.ts +9 -28
  76. package/{esm2015 → dist/es2015}/buttongroup/buttongroup.component.js +116 -121
  77. package/dist/es2015/buttongroup/buttongroup.module.d.ts +14 -0
  78. package/dist/es2015/buttongroup/buttongroup.module.js +27 -0
  79. package/{buttons.module.d.ts → dist/es2015/buttons.module.d.ts} +0 -10
  80. package/dist/es2015/buttons.module.js +51 -0
  81. package/{chip → dist/es2015/chip}/chip-content-click-event-args.interface.d.ts +0 -0
  82. package/dist/es2015/chip/chip-content-click-event-args.interface.js +4 -0
  83. package/{chip → dist/es2015/chip}/chip-list-remove-event-args.interface.d.ts +0 -0
  84. package/dist/es2015/chip/chip-list-remove-event-args.interface.js +4 -0
  85. package/{chip → dist/es2015/chip}/chip-list.component.d.ts +21 -8
  86. package/dist/es2015/chip/chip-list.component.js +197 -0
  87. package/{chip → dist/es2015/chip}/chip-remove-event-args.interface.d.ts +0 -0
  88. package/dist/es2015/chip/chip-remove-event-args.interface.js +4 -0
  89. package/{chip → dist/es2015/chip}/chip.component.d.ts +72 -38
  90. package/dist/es2015/chip/chip.component.js +431 -0
  91. package/{chip → dist/es2015/chip}/chip.module.d.ts +0 -7
  92. package/{esm2015 → dist/es2015}/chip/chip.module.js +11 -16
  93. package/{chip → dist/es2015/chip}/models/selection.d.ts +0 -0
  94. package/dist/es2015/chip/models/selection.js +4 -0
  95. package/{util.d.ts → dist/es2015/common/models/fillmode.d.ts} +4 -8
  96. package/dist/es2015/common/models/fillmode.js +4 -0
  97. package/dist/es2015/common/models/rounded.d.ts +12 -0
  98. package/dist/es2015/common/models/rounded.js +4 -0
  99. package/dist/es2015/common/models/shape.d.ts +9 -0
  100. package/dist/es2015/common/models/shape.js +4 -0
  101. package/dist/es2015/common/models/size.d.ts +17 -0
  102. package/dist/es2015/common/models/size.js +4 -0
  103. package/{esm2015/kendo-angular-buttons.js → dist/es2015/common/models/styling-classes.d.ts} +5 -2
  104. package/dist/es2015/common/models/styling-classes.js +4 -0
  105. package/{common → dist/es2015/common}/models/theme-color.d.ts +15 -4
  106. package/dist/es2015/common/models/theme-color.js +4 -0
  107. package/{common/models/size.d.ts → dist/es2015/common/models.d.ts} +6 -10
  108. package/dist/es2015/common/models.js +4 -0
  109. package/{direction.d.ts → dist/es2015/direction.d.ts} +0 -0
  110. package/dist/es2015/direction.js +4 -0
  111. package/{dropdownbutton → dist/es2015/dropdownbutton}/dropdownbutton.component.d.ts +74 -29
  112. package/{esm2015 → dist/es2015}/dropdownbutton/dropdownbutton.component.js +257 -179
  113. package/dist/es2015/dropdownbutton/dropdownbutton.module.d.ts +14 -0
  114. package/dist/es2015/dropdownbutton/dropdownbutton.module.js +29 -0
  115. package/{floatingactionbutton → dist/es2015/floatingactionbutton}/animations/animations.d.ts +0 -0
  116. package/{esm2015 → dist/es2015}/floatingactionbutton/animations/animations.js +0 -0
  117. package/{floatingactionbutton → dist/es2015/floatingactionbutton}/dial-item.component.d.ts +5 -8
  118. package/dist/es2015/floatingactionbutton/dial-item.component.js +133 -0
  119. package/{floatingactionbutton → dist/es2015/floatingactionbutton}/dial-list.component.d.ts +2 -5
  120. package/dist/es2015/floatingactionbutton/dial-list.component.js +81 -0
  121. package/{floatingactionbutton → dist/es2015/floatingactionbutton}/floatingactionbutton.component.d.ts +47 -49
  122. package/{esm2015 → dist/es2015}/floatingactionbutton/floatingactionbutton.component.js +212 -192
  123. package/{floatingactionbutton → dist/es2015/floatingactionbutton}/floatingactionbutton.module.d.ts +0 -13
  124. package/{esm2015 → dist/es2015}/floatingactionbutton/floatingactionbutton.module.js +11 -19
  125. package/{floatingactionbutton → dist/es2015/floatingactionbutton}/models/align.d.ts +0 -0
  126. package/dist/es2015/floatingactionbutton/models/align.js +4 -0
  127. package/{floatingactionbutton → dist/es2015/floatingactionbutton}/models/item-animation.interface.d.ts +0 -0
  128. package/dist/es2015/floatingactionbutton/models/item-animation.interface.js +4 -0
  129. package/{floatingactionbutton → dist/es2015/floatingactionbutton}/models/item-click.event.d.ts +0 -0
  130. package/dist/es2015/floatingactionbutton/models/item-click.event.js +4 -0
  131. package/{floatingactionbutton → dist/es2015/floatingactionbutton}/models/item.interface.d.ts +0 -0
  132. package/dist/es2015/floatingactionbutton/models/item.interface.js +4 -0
  133. package/{floatingactionbutton → dist/es2015/floatingactionbutton}/models/offset.d.ts +0 -0
  134. package/dist/es2015/floatingactionbutton/models/offset.js +4 -0
  135. package/{floatingactionbutton → dist/es2015/floatingactionbutton}/models/position-mode.d.ts +0 -0
  136. package/dist/es2015/floatingactionbutton/models/position-mode.js +4 -0
  137. package/{floatingactionbutton → dist/es2015/floatingactionbutton}/templates/dial-item-template.directive.d.ts +0 -3
  138. package/dist/es2015/floatingactionbutton/templates/dial-item-template.directive.js +25 -0
  139. package/{floatingactionbutton → dist/es2015/floatingactionbutton}/templates/fab-template.directive.d.ts +0 -3
  140. package/dist/es2015/floatingactionbutton/templates/fab-template.directive.js +25 -0
  141. package/{floatingactionbutton → dist/es2015/floatingactionbutton}/utils.d.ts +0 -0
  142. package/{esm2015 → dist/es2015}/floatingactionbutton/utils.js +0 -0
  143. package/{focusable → dist/es2015/focusable}/focus.service.d.ts +1 -5
  144. package/{esm2015 → dist/es2015}/focusable/focus.service.js +10 -8
  145. package/{focusable → dist/es2015/focusable}/focusable.directive.d.ts +0 -3
  146. package/{esm2015 → dist/es2015}/focusable/focusable.directive.js +20 -19
  147. package/dist/es2015/index.d.ts +22 -0
  148. package/dist/es2015/index.js +22 -0
  149. package/dist/es2015/index.metadata.json +1 -0
  150. package/{listbutton → dist/es2015/listbutton}/button-item-template.directive.d.ts +0 -3
  151. package/{esm2015 → dist/es2015}/listbutton/button-item-template.directive.js +12 -13
  152. package/{listbutton → dist/es2015/listbutton}/list-button.d.ts +2 -6
  153. package/{esm2015 → dist/es2015}/listbutton/list-button.js +6 -16
  154. package/{listbutton → dist/es2015/listbutton}/list-item-model.d.ts +0 -0
  155. package/dist/es2015/listbutton/list-item-model.js +4 -0
  156. package/{listbutton → dist/es2015/listbutton}/list.component.d.ts +3 -3
  157. package/dist/es2015/listbutton/list.component.js +113 -0
  158. package/dist/es2015/listbutton/list.module.d.ts +9 -0
  159. package/dist/es2015/listbutton/list.module.js +30 -0
  160. package/{listbutton → dist/es2015/listbutton}/popup-settings.d.ts +0 -0
  161. package/dist/es2015/listbutton/popup-settings.js +4 -0
  162. package/{listbutton → dist/es2015/listbutton}/template-context.directive.d.ts +1 -4
  163. package/dist/es2015/listbutton/template-context.directive.js +35 -0
  164. package/{main.d.ts → dist/es2015/main.d.ts} +5 -9
  165. package/dist/es2015/main.js +22 -0
  166. package/{navigation → dist/es2015/navigation}/key-events.d.ts +0 -0
  167. package/dist/es2015/navigation/key-events.js +13 -0
  168. package/{navigation → dist/es2015/navigation}/navigation-action.d.ts +0 -0
  169. package/dist/es2015/navigation/navigation-action.js +19 -0
  170. package/{navigation → dist/es2015/navigation}/navigation-config.d.ts +0 -0
  171. package/{esm2015 → dist/es2015}/navigation/navigation-config.js +0 -0
  172. package/{navigation → dist/es2015/navigation}/navigation.service.d.ts +0 -3
  173. package/{esm2015 → dist/es2015}/navigation/navigation.service.js +9 -11
  174. package/{package-metadata.d.ts → dist/es2015/package-metadata.d.ts} +0 -0
  175. package/{esm2015 → dist/es2015}/package-metadata.js +1 -1
  176. package/{preventable-event.d.ts → dist/es2015/preventable-event.d.ts} +0 -0
  177. package/{esm2015 → dist/es2015}/preventable-event.js +0 -0
  178. package/dist/es2015/splitbutton/localization/custom-messages.component.d.ts +15 -0
  179. package/dist/es2015/splitbutton/localization/custom-messages.component.js +36 -0
  180. package/dist/es2015/splitbutton/localization/localized-messages.directive.d.ts +13 -0
  181. package/dist/es2015/splitbutton/localization/localized-messages.directive.js +31 -0
  182. package/dist/es2015/splitbutton/localization/messages.d.ts +32 -0
  183. package/dist/es2015/splitbutton/localization/messages.js +16 -0
  184. package/{splitbutton → dist/es2015/splitbutton}/splitbutton.component.d.ts +74 -34
  185. package/{esm2015 → dist/es2015}/splitbutton/splitbutton.component.js +288 -203
  186. package/dist/es2015/splitbutton/splitbutton.module.d.ts +14 -0
  187. package/dist/es2015/splitbutton/splitbutton.module.js +31 -0
  188. package/dist/es2015/util.d.ts +41 -0
  189. package/dist/es2015/util.js +95 -0
  190. package/{fesm2015/kendo-angular-buttons.js → dist/fesm2015/index.js} +2394 -1838
  191. package/dist/fesm5/index.js +5561 -0
  192. package/dist/npm/button/button.directive.js +771 -0
  193. package/dist/npm/button/button.module.js +52 -0
  194. package/dist/npm/button/button.service.js +26 -0
  195. package/dist/npm/button/selection-settings.js +6 -0
  196. package/dist/npm/buttongroup/buttongroup.component.js +355 -0
  197. package/dist/npm/buttongroup/buttongroup.module.js +32 -0
  198. package/dist/npm/buttons.module.js +56 -0
  199. package/dist/npm/chip/chip-content-click-event-args.interface.js +6 -0
  200. package/dist/npm/chip/chip-list-remove-event-args.interface.js +6 -0
  201. package/dist/npm/chip/chip-list.component.js +216 -0
  202. package/dist/npm/chip/chip-remove-event-args.interface.js +6 -0
  203. package/dist/npm/chip/chip.component.js +451 -0
  204. package/dist/npm/chip/chip.module.js +57 -0
  205. package/dist/npm/chip/models/selection.js +6 -0
  206. package/dist/npm/common/models/fillmode.js +6 -0
  207. package/dist/npm/common/models/rounded.js +6 -0
  208. package/dist/npm/common/models/shape.js +6 -0
  209. package/dist/npm/common/models/size.js +6 -0
  210. package/dist/npm/common/models/styling-classes.js +6 -0
  211. package/dist/npm/common/models/theme-color.js +6 -0
  212. package/dist/npm/common/models.js +6 -0
  213. package/dist/npm/direction.js +6 -0
  214. package/dist/npm/dropdownbutton/dropdownbutton.component.js +706 -0
  215. package/dist/npm/dropdownbutton/dropdownbutton.module.js +34 -0
  216. package/dist/npm/floatingactionbutton/animations/animations.js +37 -0
  217. package/dist/npm/floatingactionbutton/dial-item.component.js +145 -0
  218. package/dist/npm/floatingactionbutton/dial-list.component.js +78 -0
  219. package/dist/npm/floatingactionbutton/floatingactionbutton.component.js +905 -0
  220. package/dist/npm/floatingactionbutton/floatingactionbutton.module.js +67 -0
  221. package/dist/npm/floatingactionbutton/models/align.js +6 -0
  222. package/dist/npm/floatingactionbutton/models/item-animation.interface.js +6 -0
  223. package/dist/npm/floatingactionbutton/models/item-click.event.js +6 -0
  224. package/dist/npm/floatingactionbutton/models/item.interface.js +6 -0
  225. package/dist/npm/floatingactionbutton/models/offset.js +6 -0
  226. package/dist/npm/floatingactionbutton/models/position-mode.js +6 -0
  227. package/dist/npm/floatingactionbutton/templates/dial-item-template.directive.js +28 -0
  228. package/dist/npm/floatingactionbutton/templates/fab-template.directive.js +28 -0
  229. package/dist/npm/floatingactionbutton/utils.js +42 -0
  230. package/dist/npm/focusable/focus.service.js +45 -0
  231. package/dist/npm/focusable/focusable.directive.js +70 -0
  232. package/dist/npm/index.js +39 -0
  233. package/dist/npm/listbutton/button-item-template.directive.js +70 -0
  234. package/dist/npm/listbutton/list-button.js +245 -0
  235. package/dist/npm/listbutton/list-item-model.js +6 -0
  236. package/dist/npm/listbutton/list.component.js +87 -0
  237. package/dist/npm/listbutton/list.module.js +35 -0
  238. package/dist/npm/listbutton/popup-settings.js +6 -0
  239. package/dist/npm/listbutton/template-context.directive.js +42 -0
  240. package/dist/npm/main.js +45 -0
  241. package/dist/npm/navigation/key-events.js +15 -0
  242. package/dist/npm/navigation/navigation-action.js +21 -0
  243. package/dist/npm/navigation/navigation-config.js +11 -0
  244. package/dist/npm/navigation/navigation.service.js +116 -0
  245. package/dist/npm/package-metadata.js +17 -0
  246. package/dist/npm/preventable-event.js +31 -0
  247. package/dist/npm/splitbutton/localization/custom-messages.component.js +46 -0
  248. package/dist/npm/splitbutton/localization/localized-messages.directive.js +37 -0
  249. package/dist/npm/splitbutton/localization/messages.js +24 -0
  250. package/dist/npm/splitbutton/splitbutton.component.js +832 -0
  251. package/dist/npm/splitbutton/splitbutton.module.js +36 -0
  252. package/dist/npm/util.js +100 -0
  253. package/dist/systemjs/kendo-angular-buttons.js +5 -0
  254. package/package.json +110 -35
  255. package/schematics/ngAdd/index.js +2 -5
  256. package/schematics/ngAdd/index.js.map +1 -1
  257. package/bundles/kendo-angular-buttons.umd.js +0 -5
  258. package/button-look.d.ts +0 -21
  259. package/buttongroup/buttongroup.module.d.ts +0 -21
  260. package/chip/models/chip-look.d.ts +0 -18
  261. package/chip/models/type.d.ts +0 -21
  262. package/common/models/shape.d.ts +0 -16
  263. package/dropdownbutton/dropdownbutton.module.d.ts +0 -23
  264. package/esm2015/button/button.directive.js +0 -488
  265. package/esm2015/button/button.service.js +0 -28
  266. package/esm2015/buttongroup/buttongroup.module.js +0 -30
  267. package/esm2015/chip/chip-list.component.js +0 -145
  268. package/esm2015/chip/chip.component.js +0 -335
  269. package/esm2015/chip/models/chip-look.js +0 -5
  270. package/esm2015/chip/models/type.js +0 -5
  271. package/esm2015/dropdownbutton/dropdownbutton.module.js +0 -32
  272. package/esm2015/floatingactionbutton/dial-item.component.js +0 -126
  273. package/esm2015/floatingactionbutton/dial-list.component.js +0 -89
  274. package/esm2015/floatingactionbutton/templates/dial-item-template.directive.js +0 -27
  275. package/esm2015/floatingactionbutton/templates/fab-template.directive.js +0 -27
  276. package/esm2015/listbutton/list.component.js +0 -120
  277. package/esm2015/listbutton/list.module.js +0 -39
  278. package/esm2015/listbutton/template-context.directive.js +0 -33
  279. package/esm2015/splitbutton/splitbutton.module.js +0 -32
  280. package/esm2015/util.js +0 -39
  281. package/kendo-angular-buttons.d.ts +0 -9
  282. package/listbutton/list.module.d.ts +0 -18
  283. package/splitbutton/splitbutton.module.d.ts +0 -23
@@ -0,0 +1,769 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2021 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import * as tslib_1 from "tslib";
6
+ import { Directive, ElementRef, EventEmitter, HostBinding, HostListener, Input, Renderer2 as Renderer, Output, Optional, NgZone } from '@angular/core';
7
+ import { KendoButtonService } from './button.service';
8
+ import { isDocumentAvailable, isChanged, hasObservers, Keys } from '@progress/kendo-angular-common';
9
+ import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
10
+ import { validatePackage } from '@progress/kendo-licensing';
11
+ import { packageMetadata } from '../package-metadata';
12
+ import { getStylingClasses, getThemeColorClasses } from '../util';
13
+ var SPAN_TAG_NAME = 'SPAN';
14
+ /**
15
+ * Represents the Kendo UI Button component for Angular.
16
+ */
17
+ var ButtonDirective = /** @class */ (function () {
18
+ function ButtonDirective(element, renderer, service, localization, ngZone) {
19
+ var _this = this;
20
+ this.service = service;
21
+ this.ngZone = ngZone;
22
+ /**
23
+ * Provides visual styling that indicates if the Button is active.
24
+ * By default, `toggleable` is set to `false`.
25
+ */
26
+ this.toggleable = false;
27
+ /**
28
+ * @hidden
29
+ */
30
+ this.role = 'button';
31
+ /**
32
+ * Fires each time the selected state of a toggleable button is changed.
33
+ *
34
+ * The event argument is the new selected state (boolean).
35
+ */
36
+ this.selectedChange = new EventEmitter();
37
+ /**
38
+ * Fires each time the user clicks the button.
39
+ */
40
+ this.click = new EventEmitter();
41
+ this.isDisabled = false;
42
+ this.isIcon = false;
43
+ this.isIconClass = false;
44
+ this._size = 'medium';
45
+ this._rounded = 'medium';
46
+ this._shape = 'rectangle';
47
+ this._fillMode = 'solid';
48
+ this._themeColor = 'base';
49
+ this._focused = false;
50
+ this.domEvents = [];
51
+ validatePackage(packageMetadata);
52
+ this.direction = localization.rtl ? 'rtl' : 'ltr';
53
+ this.localizationChangeSubscription = localization.changes.subscribe(function (_a) {
54
+ var rtl = _a.rtl;
55
+ return (_this.direction = rtl ? 'rtl' : 'ltr');
56
+ });
57
+ this.element = element.nativeElement;
58
+ this.renderer = renderer;
59
+ }
60
+ Object.defineProperty(ButtonDirective.prototype, "togglable", {
61
+ /**
62
+ * Backwards-compatible alias
63
+ *
64
+ * @hidden
65
+ */
66
+ get: function () {
67
+ return this.toggleable;
68
+ },
69
+ /**
70
+ * @hidden
71
+ */
72
+ set: function (value) {
73
+ this.toggleable = value;
74
+ },
75
+ enumerable: true,
76
+ configurable: true
77
+ });
78
+ Object.defineProperty(ButtonDirective.prototype, "selected", {
79
+ /**
80
+ * Sets the selected state of the Button.
81
+ */
82
+ get: function () {
83
+ return this._selected || false;
84
+ },
85
+ set: function (value) {
86
+ this._selected = value;
87
+ },
88
+ enumerable: true,
89
+ configurable: true
90
+ });
91
+ Object.defineProperty(ButtonDirective.prototype, "tabIndex", {
92
+ get: function () {
93
+ return this.element.tabIndex;
94
+ },
95
+ /**
96
+ * @hidden
97
+ */
98
+ set: function (index) {
99
+ this.element.tabIndex = index;
100
+ },
101
+ enumerable: true,
102
+ configurable: true
103
+ });
104
+ Object.defineProperty(ButtonDirective.prototype, "icon", {
105
+ /**
106
+ * Defines the name for an existing icon in a Kendo UI theme.
107
+ * The icon is rendered inside the Button by a `span.k-icon` element.
108
+ */
109
+ set: function (icon) {
110
+ var _this = this;
111
+ if (icon) {
112
+ this.iconSetter(icon, function () {
113
+ _this.isIcon = true;
114
+ var classes = 'k-button-icon k-icon k-i-' + icon;
115
+ _this.addIcon(classes);
116
+ });
117
+ }
118
+ else {
119
+ this.isIcon = false;
120
+ this.updateIconNode();
121
+ }
122
+ },
123
+ enumerable: true,
124
+ configurable: true
125
+ });
126
+ Object.defineProperty(ButtonDirective.prototype, "iconClass", {
127
+ /**
128
+ * Defines a CSS class—or multiple classes separated by spaces—
129
+ * which are applied to a `span` element inside the Button. Allows the usage of custom icons.
130
+ */
131
+ set: function (iconClassName) {
132
+ var _this = this;
133
+ if (iconClassName) {
134
+ this.iconSetter(iconClassName, function () {
135
+ _this.isIconClass = true;
136
+ var classes = 'k-button-icon k-icon ' + iconClassName;
137
+ _this.addIcon(classes);
138
+ });
139
+ }
140
+ else {
141
+ this.isIconClass = false;
142
+ this.updateIconNode();
143
+ }
144
+ },
145
+ enumerable: true,
146
+ configurable: true
147
+ });
148
+ Object.defineProperty(ButtonDirective.prototype, "imageUrl", {
149
+ /**
150
+ * Defines a URL which is used for an `img` element inside the Button.
151
+ * The URL can be relative or absolute. If relative, it is evaluated with relation to the web page URL.
152
+ */
153
+ set: function (imageUrl) {
154
+ if (imageUrl) {
155
+ this.iconSetter(imageUrl, this.addImgIcon.bind(this));
156
+ }
157
+ else {
158
+ this.removeImageNode();
159
+ }
160
+ },
161
+ enumerable: true,
162
+ configurable: true
163
+ });
164
+ Object.defineProperty(ButtonDirective.prototype, "disabled", {
165
+ get: function () {
166
+ return this.isDisabled;
167
+ },
168
+ /**
169
+ * If set to `true`, it disables the Button.
170
+ */
171
+ set: function (disabled) {
172
+ this.isDisabled = disabled;
173
+ this.renderer.setProperty(this.element, 'disabled', disabled);
174
+ },
175
+ enumerable: true,
176
+ configurable: true
177
+ });
178
+ Object.defineProperty(ButtonDirective.prototype, "size", {
179
+ get: function () {
180
+ return this._size;
181
+ },
182
+ /**
183
+ * The size property specifies the padding of the Button
184
+ * ([see example]({% slug appearance_button %}#toc-size)).
185
+ *
186
+ * The possible values are:
187
+ * * `'small'`
188
+ * * `'medium'` (default)
189
+ * * `'large'`
190
+ * * `null`
191
+ */
192
+ set: function (size) {
193
+ this.handleClasses(size, 'size');
194
+ this._size = size;
195
+ },
196
+ enumerable: true,
197
+ configurable: true
198
+ });
199
+ Object.defineProperty(ButtonDirective.prototype, "rounded", {
200
+ get: function () {
201
+ return this._rounded;
202
+ },
203
+ /**
204
+ * The rounded property specifies the border radius of the Button
205
+ * ([see example]({% slug appearance_button %}#toc-rounded)).
206
+ *
207
+ * The possible values are:
208
+ * * `'small'`
209
+ * * `'medium'` (default)
210
+ * * `'large'`
211
+ * * `'full'`
212
+ * * `null`
213
+ */
214
+ set: function (rounded) {
215
+ this.handleClasses(rounded, 'rounded');
216
+ this._rounded = rounded;
217
+ },
218
+ enumerable: true,
219
+ configurable: true
220
+ });
221
+ Object.defineProperty(ButtonDirective.prototype, "fillMode", {
222
+ get: function () {
223
+ return this._fillMode;
224
+ },
225
+ /**
226
+ * The fillMode property specifies the background and border styles of the Button
227
+ * ([see example]({% slug appearance_button %}#toc-fillMode)).
228
+ *
229
+ * The possible values are:
230
+ * * `'flat'`
231
+ * * `'solid'` (default)
232
+ * * `'outline'`
233
+ * * `'clear'`
234
+ * * `'link'`
235
+ * * `null`
236
+ */
237
+ set: function (fillMode) {
238
+ this.handleClasses(fillMode, 'fillMode');
239
+ this._fillMode = fillMode;
240
+ },
241
+ enumerable: true,
242
+ configurable: true
243
+ });
244
+ Object.defineProperty(ButtonDirective.prototype, "themeColor", {
245
+ get: function () {
246
+ return this._themeColor;
247
+ },
248
+ /**
249
+ * The Button allows you to specify predefined theme colors.
250
+ * The theme color will be applied as a background and border color while also amending the text color accordingly
251
+ * ([see example]({% slug appearance_button %}#toc-themeColor)).
252
+ *
253
+ * The possible values are:
254
+ * * `'base'` (default)
255
+ * * `'primary'`
256
+ * * `'secondary'`
257
+ * * `'tertiary'`
258
+ * * `'info'`
259
+ * * `'success'`
260
+ * * `'warning'`
261
+ * * `'error'`
262
+ * * `'dark'`
263
+ * * `'light`'
264
+ * * `'inverse'`
265
+ */
266
+ set: function (themeColor) {
267
+ this.handleThemeColor(themeColor);
268
+ this._themeColor = themeColor;
269
+ },
270
+ enumerable: true,
271
+ configurable: true
272
+ });
273
+ Object.defineProperty(ButtonDirective.prototype, "shape", {
274
+ get: function () {
275
+ return this._shape;
276
+ },
277
+ /**
278
+ * The shape property specifies if the Button will form a rectangle or square.
279
+ * ([see example]({% slug appearance_button %}#toc-shape)).
280
+ *
281
+ * The possible values are:
282
+ * * `'square'`
283
+ * * `'rectangle'` (default)
284
+ */
285
+ set: function (shape) {
286
+ this.handleClasses(shape, 'shape');
287
+ this._shape = shape;
288
+ },
289
+ enumerable: true,
290
+ configurable: true
291
+ });
292
+ Object.defineProperty(ButtonDirective.prototype, "isFocused", {
293
+ get: function () {
294
+ return this._focused;
295
+ },
296
+ set: function (isFocused) {
297
+ this.toggleClass('k-focus', isFocused);
298
+ this._focused = isFocused;
299
+ },
300
+ enumerable: true,
301
+ configurable: true
302
+ });
303
+ Object.defineProperty(ButtonDirective.prototype, "classButton", {
304
+ get: function () {
305
+ return true;
306
+ },
307
+ enumerable: true,
308
+ configurable: true
309
+ });
310
+ Object.defineProperty(ButtonDirective.prototype, "isToggleable", {
311
+ get: function () {
312
+ return this.toggleable;
313
+ },
314
+ enumerable: true,
315
+ configurable: true
316
+ });
317
+ Object.defineProperty(ButtonDirective.prototype, "roleSetter", {
318
+ get: function () {
319
+ return this.role;
320
+ },
321
+ enumerable: true,
322
+ configurable: true
323
+ });
324
+ Object.defineProperty(ButtonDirective.prototype, "classDisabled", {
325
+ get: function () {
326
+ return this.isDisabled;
327
+ },
328
+ enumerable: true,
329
+ configurable: true
330
+ });
331
+ Object.defineProperty(ButtonDirective.prototype, "classActive", {
332
+ get: function () {
333
+ return this.selected;
334
+ },
335
+ enumerable: true,
336
+ configurable: true
337
+ });
338
+ Object.defineProperty(ButtonDirective.prototype, "getDirection", {
339
+ get: function () {
340
+ return this.direction;
341
+ },
342
+ enumerable: true,
343
+ configurable: true
344
+ });
345
+ /**
346
+ * @hidden
347
+ */
348
+ ButtonDirective.prototype.onFocus = function () {
349
+ this.isFocused = true;
350
+ };
351
+ /**
352
+ * @hidden
353
+ */
354
+ ButtonDirective.prototype.onBlur = function () {
355
+ this.isFocused = false;
356
+ };
357
+ Object.defineProperty(ButtonDirective.prototype, "primary", {
358
+ /**
359
+ * @hidden
360
+ */
361
+ set: function (value) {
362
+ this.themeColor = value ? 'primary' : 'base';
363
+ },
364
+ enumerable: true,
365
+ configurable: true
366
+ });
367
+ Object.defineProperty(ButtonDirective.prototype, "look", {
368
+ /**
369
+ * @hidden
370
+ */
371
+ set: function (value) {
372
+ switch (value) {
373
+ case 'default':
374
+ this.fillMode = 'solid';
375
+ break;
376
+ default:
377
+ this.fillMode = value;
378
+ break;
379
+ }
380
+ },
381
+ enumerable: true,
382
+ configurable: true
383
+ });
384
+ ButtonDirective.prototype.ngOnInit = function () {
385
+ var _this = this;
386
+ var isSpan = this.element.tagName === SPAN_TAG_NAME;
387
+ this.addTextSpan();
388
+ if (!this.element.hasAttribute('role') && this.togglable) {
389
+ this.toggleAriaPressed(this.toggleable);
390
+ }
391
+ if (this.role) {
392
+ this.setAttribute('role', this.role);
393
+ }
394
+ this.ngZone.runOutsideAngular(function () {
395
+ _this.domEvents.push(_this.renderer.listen(_this.element, 'click', _this._onButtonClick.bind(_this)));
396
+ _this.domEvents.push(_this.renderer.listen(_this.element, 'keydown', function (event) {
397
+ var isSpaceOrEnter = event.keyCode === Keys.Space || event.keyCode === Keys.Enter;
398
+ if (isSpan && isSpaceOrEnter) {
399
+ _this.click.emit(event);
400
+ _this._onButtonClick();
401
+ }
402
+ }));
403
+ });
404
+ };
405
+ ButtonDirective.prototype.ngOnChanges = function (change) {
406
+ if (isChanged('togglable', change) || isChanged('toggleable', change)) {
407
+ this.toggleAriaPressed(this.toggleable);
408
+ }
409
+ };
410
+ ButtonDirective.prototype.ngAfterViewInit = function () {
411
+ var _this = this;
412
+ var stylingOptions = ['size', 'rounded', 'shape', 'fillMode'];
413
+ stylingOptions.forEach(function (input) {
414
+ _this.handleClasses(_this[input], input);
415
+ });
416
+ };
417
+ ButtonDirective.prototype.ngAfterViewChecked = function () {
418
+ this.setIconTextClasses();
419
+ };
420
+ ButtonDirective.prototype.ngOnDestroy = function () {
421
+ this.imageNode = null;
422
+ this.iconNode = null;
423
+ this.iconSpanNode = null;
424
+ this.renderer = null;
425
+ this.localizationChangeSubscription.unsubscribe();
426
+ clearTimeout(this.deferTimeout);
427
+ this.domEvents.forEach(function (unbindHandler) { return unbindHandler(); });
428
+ };
429
+ /**
430
+ * Focuses the Button component.
431
+ */
432
+ ButtonDirective.prototype.focus = function () {
433
+ if (isDocumentAvailable()) {
434
+ this.element.focus();
435
+ this.isFocused = true;
436
+ }
437
+ };
438
+ /**
439
+ * Blurs the Button component.
440
+ */
441
+ ButtonDirective.prototype.blur = function () {
442
+ if (isDocumentAvailable()) {
443
+ this.element.blur();
444
+ this.isFocused = false;
445
+ }
446
+ };
447
+ /**
448
+ * @hidden
449
+ */
450
+ ButtonDirective.prototype.setAttribute = function (attribute, value) {
451
+ this.renderer.setAttribute(this.element, attribute, value);
452
+ };
453
+ /**
454
+ * @hidden
455
+ */
456
+ ButtonDirective.prototype.removeAttribute = function (attribute) {
457
+ this.renderer.removeAttribute(this.element, attribute);
458
+ };
459
+ /**
460
+ * @hidden
461
+ *
462
+ * Internal setter that triggers selectedChange
463
+ */
464
+ ButtonDirective.prototype.setSelected = function (value) {
465
+ var _this = this;
466
+ var changed = this.selected !== value;
467
+ this.selected = value;
468
+ this.setAttribute('aria-pressed', this.selected.toString());
469
+ this.toggleClass('k-selected', this.selected);
470
+ if (changed && hasObservers(this.selectedChange)) {
471
+ this.ngZone.run(function () {
472
+ _this.selectedChange.emit(value);
473
+ });
474
+ }
475
+ };
476
+ ButtonDirective.prototype.toggleAriaPressed = function (shouldSet) {
477
+ if (!isDocumentAvailable()) {
478
+ return;
479
+ }
480
+ if (shouldSet) {
481
+ this.setAttribute('aria-pressed', this.selected.toString());
482
+ }
483
+ else {
484
+ this.removeAttribute('aria-pressed');
485
+ }
486
+ };
487
+ ButtonDirective.prototype.hasText = function () {
488
+ return isDocumentAvailable() && this.element.textContent.trim().length > 0;
489
+ };
490
+ ButtonDirective.prototype.addImgIcon = function (imageUrl) {
491
+ var renderer = this.renderer;
492
+ this.iconSpanNode = renderer.createElement('span');
493
+ renderer.setProperty(this.iconSpanNode, 'className', 'k-button-icon k-icon');
494
+ if (this.imageNode) {
495
+ renderer.setProperty(this.imageNode, 'src', imageUrl);
496
+ }
497
+ else if (isDocumentAvailable()) {
498
+ this.imageNode = renderer.createElement('img');
499
+ renderer.setProperty(this.imageNode, 'src', imageUrl);
500
+ renderer.setProperty(this.imageNode, 'className', 'k-image');
501
+ renderer.setAttribute(this.imageNode, 'role', 'presentation');
502
+ }
503
+ this.iconSpanNode.appendChild(this.imageNode);
504
+ this.prependChild(this.iconSpanNode);
505
+ };
506
+ ButtonDirective.prototype.addIcon = function (classNames) {
507
+ var renderer = this.renderer;
508
+ if (this.iconNode) {
509
+ renderer.setProperty(this.iconNode, 'className', classNames);
510
+ }
511
+ else if (isDocumentAvailable()) {
512
+ this.iconNode = renderer.createElement('span');
513
+ renderer.setProperty(this.iconNode, 'className', classNames);
514
+ renderer.setAttribute(this.iconNode, 'role', 'presentation');
515
+ this.prependChild(this.iconNode);
516
+ }
517
+ };
518
+ ButtonDirective.prototype.addTextSpan = function () {
519
+ var _this = this;
520
+ if (isDocumentAvailable() && this.hasText()) {
521
+ var span_1 = this.renderer.createElement('span');
522
+ this.renderer.addClass(span_1, 'k-button-text');
523
+ var buttonContentNodes = Array.from(this.element.childNodes);
524
+ buttonContentNodes.forEach(function (node) { return _this.renderer.appendChild(span_1, node); });
525
+ this.renderer.appendChild(this.element, span_1);
526
+ }
527
+ };
528
+ ButtonDirective.prototype.prependChild = function (node) {
529
+ var _this = this;
530
+ this.defer(function () {
531
+ if (_this.renderer && node !== _this.element.firstChild) {
532
+ _this.renderer.insertBefore(_this.element, node, _this.element.firstChild);
533
+ }
534
+ });
535
+ };
536
+ ButtonDirective.prototype.defer = function (callback) {
537
+ var _this = this;
538
+ this.ngZone.runOutsideAngular(function () {
539
+ _this.deferTimeout = setTimeout(callback, 0);
540
+ });
541
+ };
542
+ ButtonDirective.prototype.iconSetter = function (icon, insertIcon) {
543
+ if (icon) {
544
+ insertIcon(icon);
545
+ }
546
+ this.setIconTextClasses();
547
+ };
548
+ ButtonDirective.prototype.removeImageNode = function () {
549
+ if (this.imageNode && this.renderer.parentNode(this.imageNode)) {
550
+ this.renderer.removeChild(this.element, this.imageNode);
551
+ this.renderer.removeChild(this.element, this.iconSpanNode);
552
+ this.imageNode = null;
553
+ this.iconSpanNode = null;
554
+ }
555
+ };
556
+ ButtonDirective.prototype.removeIconNode = function () {
557
+ if (this.iconNode && this.renderer.parentNode(this.iconNode)) {
558
+ this.renderer.removeChild(this.element, this.iconNode);
559
+ this.iconNode = null;
560
+ }
561
+ if (this.iconSpanNode) {
562
+ this.renderer.removeChild(this.element, this.iconSpanNode);
563
+ this.iconSpanNode = null;
564
+ }
565
+ };
566
+ ButtonDirective.prototype.updateIconNode = function () {
567
+ if (!this.isIcon && !this.isIconClass) {
568
+ this.removeIconNode();
569
+ }
570
+ };
571
+ ButtonDirective.prototype.setIconTextClasses = function () {
572
+ var hasIcon = this.isIcon || this.isIconClass || this.imageNode;
573
+ this.toggleClass('k-icon-button', hasIcon && !this.hasText());
574
+ };
575
+ ButtonDirective.prototype.toggleClass = function (className, add) {
576
+ if (add) {
577
+ this.renderer.addClass(this.element, className);
578
+ }
579
+ else {
580
+ this.renderer.removeClass(this.element, className);
581
+ }
582
+ };
583
+ ButtonDirective.prototype._onButtonClick = function () {
584
+ var _this = this;
585
+ if (!this.disabled && this.service) {
586
+ this.ngZone.run(function () {
587
+ _this.service.click(_this);
588
+ });
589
+ }
590
+ if (this.togglable && !this.service) {
591
+ this.setSelected(!this.selected);
592
+ }
593
+ };
594
+ ButtonDirective.prototype.handleClasses = function (value, input) {
595
+ var elem = this.element;
596
+ var classes = getStylingClasses('button', input, this[input], value);
597
+ if (input === 'fillMode') {
598
+ this.handleThemeColor(this.themeColor, this[input], value);
599
+ }
600
+ if (classes.toRemove) {
601
+ this.renderer.removeClass(elem, classes.toRemove);
602
+ }
603
+ if (classes.toAdd) {
604
+ this.renderer.addClass(elem, classes.toAdd);
605
+ }
606
+ };
607
+ ButtonDirective.prototype.handleThemeColor = function (value, prevFillMode, fillMode) {
608
+ var elem = this.element;
609
+ var removeFillMode = prevFillMode ? prevFillMode : this.fillMode;
610
+ var addFillMode = fillMode ? fillMode : this.fillMode;
611
+ var themeColorClass = getThemeColorClasses('button', removeFillMode, addFillMode, this.themeColor, value);
612
+ this.renderer.removeClass(elem, themeColorClass.toRemove);
613
+ if (addFillMode !== null && fillMode !== null) {
614
+ if (themeColorClass.toAdd) {
615
+ this.renderer.addClass(elem, themeColorClass.toAdd);
616
+ }
617
+ }
618
+ };
619
+ tslib_1.__decorate([
620
+ Input(),
621
+ tslib_1.__metadata("design:type", Boolean)
622
+ ], ButtonDirective.prototype, "toggleable", void 0);
623
+ tslib_1.__decorate([
624
+ Input(),
625
+ tslib_1.__metadata("design:type", Boolean),
626
+ tslib_1.__metadata("design:paramtypes", [Boolean])
627
+ ], ButtonDirective.prototype, "togglable", null);
628
+ tslib_1.__decorate([
629
+ Input(),
630
+ tslib_1.__metadata("design:type", Boolean),
631
+ tslib_1.__metadata("design:paramtypes", [Boolean])
632
+ ], ButtonDirective.prototype, "selected", null);
633
+ tslib_1.__decorate([
634
+ Input(),
635
+ tslib_1.__metadata("design:type", Number),
636
+ tslib_1.__metadata("design:paramtypes", [Number])
637
+ ], ButtonDirective.prototype, "tabIndex", null);
638
+ tslib_1.__decorate([
639
+ Input(),
640
+ tslib_1.__metadata("design:type", String),
641
+ tslib_1.__metadata("design:paramtypes", [String])
642
+ ], ButtonDirective.prototype, "icon", null);
643
+ tslib_1.__decorate([
644
+ Input(),
645
+ tslib_1.__metadata("design:type", String),
646
+ tslib_1.__metadata("design:paramtypes", [String])
647
+ ], ButtonDirective.prototype, "iconClass", null);
648
+ tslib_1.__decorate([
649
+ Input(),
650
+ tslib_1.__metadata("design:type", String),
651
+ tslib_1.__metadata("design:paramtypes", [String])
652
+ ], ButtonDirective.prototype, "imageUrl", null);
653
+ tslib_1.__decorate([
654
+ Input(),
655
+ tslib_1.__metadata("design:type", Boolean),
656
+ tslib_1.__metadata("design:paramtypes", [Boolean])
657
+ ], ButtonDirective.prototype, "disabled", null);
658
+ tslib_1.__decorate([
659
+ Input(),
660
+ tslib_1.__metadata("design:type", String),
661
+ tslib_1.__metadata("design:paramtypes", [String])
662
+ ], ButtonDirective.prototype, "size", null);
663
+ tslib_1.__decorate([
664
+ Input(),
665
+ tslib_1.__metadata("design:type", String),
666
+ tslib_1.__metadata("design:paramtypes", [String])
667
+ ], ButtonDirective.prototype, "rounded", null);
668
+ tslib_1.__decorate([
669
+ Input(),
670
+ tslib_1.__metadata("design:type", String),
671
+ tslib_1.__metadata("design:paramtypes", [String])
672
+ ], ButtonDirective.prototype, "fillMode", null);
673
+ tslib_1.__decorate([
674
+ Input(),
675
+ tslib_1.__metadata("design:type", String),
676
+ tslib_1.__metadata("design:paramtypes", [String])
677
+ ], ButtonDirective.prototype, "themeColor", null);
678
+ tslib_1.__decorate([
679
+ Input(),
680
+ tslib_1.__metadata("design:type", String),
681
+ tslib_1.__metadata("design:paramtypes", [String])
682
+ ], ButtonDirective.prototype, "shape", null);
683
+ tslib_1.__decorate([
684
+ Input(),
685
+ tslib_1.__metadata("design:type", String)
686
+ ], ButtonDirective.prototype, "role", void 0);
687
+ tslib_1.__decorate([
688
+ Output(),
689
+ tslib_1.__metadata("design:type", EventEmitter)
690
+ ], ButtonDirective.prototype, "selectedChange", void 0);
691
+ tslib_1.__decorate([
692
+ Output(),
693
+ tslib_1.__metadata("design:type", EventEmitter)
694
+ ], ButtonDirective.prototype, "click", void 0);
695
+ tslib_1.__decorate([
696
+ HostBinding('class.k-button'),
697
+ tslib_1.__metadata("design:type", Boolean),
698
+ tslib_1.__metadata("design:paramtypes", [])
699
+ ], ButtonDirective.prototype, "classButton", null);
700
+ tslib_1.__decorate([
701
+ HostBinding('class.k-toggle-button'),
702
+ tslib_1.__metadata("design:type", Boolean),
703
+ tslib_1.__metadata("design:paramtypes", [])
704
+ ], ButtonDirective.prototype, "isToggleable", null);
705
+ tslib_1.__decorate([
706
+ HostBinding('attr.role'),
707
+ tslib_1.__metadata("design:type", String),
708
+ tslib_1.__metadata("design:paramtypes", [])
709
+ ], ButtonDirective.prototype, "roleSetter", null);
710
+ tslib_1.__decorate([
711
+ HostBinding('attr.aria-disabled'),
712
+ HostBinding('class.k-disabled'),
713
+ tslib_1.__metadata("design:type", Boolean),
714
+ tslib_1.__metadata("design:paramtypes", [])
715
+ ], ButtonDirective.prototype, "classDisabled", null);
716
+ tslib_1.__decorate([
717
+ HostBinding('class.k-selected'),
718
+ tslib_1.__metadata("design:type", Boolean),
719
+ tslib_1.__metadata("design:paramtypes", [])
720
+ ], ButtonDirective.prototype, "classActive", null);
721
+ tslib_1.__decorate([
722
+ HostBinding('attr.dir'),
723
+ tslib_1.__metadata("design:type", String),
724
+ tslib_1.__metadata("design:paramtypes", [])
725
+ ], ButtonDirective.prototype, "getDirection", null);
726
+ tslib_1.__decorate([
727
+ HostListener('focus'),
728
+ tslib_1.__metadata("design:type", Function),
729
+ tslib_1.__metadata("design:paramtypes", []),
730
+ tslib_1.__metadata("design:returntype", void 0)
731
+ ], ButtonDirective.prototype, "onFocus", null);
732
+ tslib_1.__decorate([
733
+ HostListener('blur'),
734
+ tslib_1.__metadata("design:type", Function),
735
+ tslib_1.__metadata("design:paramtypes", []),
736
+ tslib_1.__metadata("design:returntype", void 0)
737
+ ], ButtonDirective.prototype, "onBlur", null);
738
+ tslib_1.__decorate([
739
+ Input(),
740
+ tslib_1.__metadata("design:type", Boolean),
741
+ tslib_1.__metadata("design:paramtypes", [Boolean])
742
+ ], ButtonDirective.prototype, "primary", null);
743
+ tslib_1.__decorate([
744
+ Input(),
745
+ tslib_1.__metadata("design:type", String),
746
+ tslib_1.__metadata("design:paramtypes", [String])
747
+ ], ButtonDirective.prototype, "look", null);
748
+ ButtonDirective = tslib_1.__decorate([
749
+ Directive({
750
+ exportAs: 'kendoButton',
751
+ providers: [
752
+ LocalizationService,
753
+ {
754
+ provide: L10N_PREFIX,
755
+ useValue: 'kendo.button'
756
+ }
757
+ ],
758
+ selector: 'button[kendoButton], span[kendoButton]',
759
+ }),
760
+ tslib_1.__param(2, Optional()),
761
+ tslib_1.__metadata("design:paramtypes", [ElementRef,
762
+ Renderer,
763
+ KendoButtonService,
764
+ LocalizationService,
765
+ NgZone])
766
+ ], ButtonDirective);
767
+ return ButtonDirective;
768
+ }());
769
+ export { ButtonDirective };