patternfly-sass 3.23.2 → 3.31.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (369) hide show
  1. checksums.yaml +4 -4
  2. data/CODE_OF_CONDUCT.md +4 -0
  3. data/QUICKSTART.md +165 -0
  4. data/README.md +354 -112
  5. data/dist/fonts/FontAwesome.otf +0 -0
  6. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Bold-webfont.eot +0 -0
  7. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Bold-webfont.svg +0 -0
  8. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Bold-webfont.ttf +0 -0
  9. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Bold-webfont.woff +0 -0
  10. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Bold-webfont.woff2 +0 -0
  11. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-BoldItalic-webfont.eot +0 -0
  12. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-BoldItalic-webfont.svg +0 -0
  13. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-BoldItalic-webfont.ttf +0 -0
  14. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-BoldItalic-webfont.woff +0 -0
  15. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-BoldItalic-webfont.woff2 +0 -0
  16. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-ExtraBold-webfont.eot +0 -0
  17. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-ExtraBold-webfont.svg +0 -0
  18. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-ExtraBold-webfont.ttf +0 -0
  19. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-ExtraBold-webfont.woff +0 -0
  20. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-ExtraBold-webfont.woff2 +0 -0
  21. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-ExtraBoldItalic-webfont.eot +0 -0
  22. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-ExtraBoldItalic-webfont.svg +0 -0
  23. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-ExtraBoldItalic-webfont.ttf +0 -0
  24. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-ExtraBoldItalic-webfont.woff +0 -0
  25. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-ExtraBoldItalic-webfont.woff2 +0 -0
  26. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Italic-webfont.eot +0 -0
  27. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Italic-webfont.svg +0 -0
  28. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Italic-webfont.ttf +0 -0
  29. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Italic-webfont.woff +0 -0
  30. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Italic-webfont.woff2 +0 -0
  31. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Light-webfont.eot +0 -0
  32. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Light-webfont.svg +0 -0
  33. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Light-webfont.ttf +0 -0
  34. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Light-webfont.woff +0 -0
  35. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Light-webfont.woff2 +0 -0
  36. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-LightItalic-webfont.eot +0 -0
  37. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-LightItalic-webfont.svg +0 -0
  38. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-LightItalic-webfont.ttf +0 -0
  39. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-LightItalic-webfont.woff +0 -0
  40. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-LightItalic-webfont.woff2 +0 -0
  41. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Regular-webfont.eot +0 -0
  42. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Regular-webfont.svg +0 -0
  43. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Regular-webfont.ttf +0 -0
  44. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Regular-webfont.woff +0 -0
  45. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Regular-webfont.woff2 +0 -0
  46. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Semibold-webfont.eot +0 -0
  47. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Semibold-webfont.svg +0 -0
  48. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Semibold-webfont.ttf +0 -0
  49. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Semibold-webfont.woff +0 -0
  50. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-Semibold-webfont.woff2 +0 -0
  51. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-SemiboldItalic-webfont.eot +0 -0
  52. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-SemiboldItalic-webfont.svg +0 -0
  53. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-SemiboldItalic-webfont.ttf +0 -0
  54. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-SemiboldItalic-webfont.woff +0 -0
  55. data/{assets/fonts/patternfly → dist/fonts}/OpenSans-SemiboldItalic-webfont.woff2 +0 -0
  56. data/dist/fonts/PatternFlyIcons-webfont.eot +0 -0
  57. data/{assets/fonts/patternfly → dist/fonts}/PatternFlyIcons-webfont.svg +28 -0
  58. data/dist/fonts/PatternFlyIcons-webfont.ttf +0 -0
  59. data/dist/fonts/PatternFlyIcons-webfont.woff +0 -0
  60. data/dist/fonts/fontawesome-webfont.eot +0 -0
  61. data/dist/fonts/fontawesome-webfont.svg +2671 -0
  62. data/{assets/fonts/patternfly → dist/fonts}/fontawesome-webfont.ttf +0 -0
  63. data/dist/fonts/fontawesome-webfont.woff +0 -0
  64. data/dist/fonts/fontawesome-webfont.woff2 +0 -0
  65. data/{assets/fonts/patternfly → dist/fonts}/glyphicons-halflings-regular.eot +0 -0
  66. data/{assets/fonts/patternfly → dist/fonts}/glyphicons-halflings-regular.svg +0 -0
  67. data/{assets/fonts/patternfly → dist/fonts}/glyphicons-halflings-regular.ttf +0 -0
  68. data/{assets/fonts/patternfly → dist/fonts}/glyphicons-halflings-regular.woff +0 -0
  69. data/{assets/fonts/patternfly → dist/fonts}/glyphicons-halflings-regular.woff2 +0 -0
  70. data/{assets/images/patternfly → dist/img}/OpenShift-Logo-NoText.svg +0 -0
  71. data/{assets/images/patternfly → dist/img}/OpenShift-Logo-Text.svg +0 -0
  72. data/{assets/images/patternfly → dist/img}/OpenShift-logo.svg +0 -0
  73. data/{assets/images/patternfly → dist/img}/RH_Atomic-Logo-NoText.svg +0 -0
  74. data/{assets/images/patternfly → dist/img}/RH_Atomic-Logo-Text.svg +0 -0
  75. data/{assets/images/patternfly → dist/img}/RH_atomic.svg +0 -0
  76. data/{assets/images/patternfly → dist/img}/apple-touch-icon-precomposed-114.png +0 -0
  77. data/{assets/images/patternfly → dist/img}/apple-touch-icon-precomposed-144.png +0 -0
  78. data/{assets/images/patternfly → dist/img}/apple-touch-icon-precomposed-152.png +0 -0
  79. data/{assets/images/patternfly → dist/img}/apple-touch-icon-precomposed-180.png +0 -0
  80. data/{assets/images/patternfly → dist/img}/apple-touch-icon-precomposed-57.png +0 -0
  81. data/{assets/images/patternfly → dist/img}/apple-touch-icon-precomposed-72.png +0 -0
  82. data/{assets/images/patternfly → dist/img}/apple-touch-icon-precomposed-76.png +0 -0
  83. data/{assets/images/patternfly → dist/img}/bg-login.jpg +0 -0
  84. data/{assets/images/patternfly → dist/img}/bg-modal-about-pf.png +0 -0
  85. data/{assets/images/patternfly → dist/img}/bg-navbar-pf-alt.svg +0 -0
  86. data/{assets/images/patternfly → dist/img}/brand-alt.svg +0 -0
  87. data/{assets/images/patternfly → dist/img}/brand.svg +0 -0
  88. data/{assets/images/patternfly → dist/img}/favicon.ico +0 -0
  89. data/{assets/images/patternfly → dist/img}/kubernetes-Logo.svg +0 -0
  90. data/{assets/images/patternfly → dist/img}/kubernetes.svg +0 -0
  91. data/{assets/images/patternfly → dist/img}/logo-alt.svg +0 -0
  92. data/{assets/images/patternfly → dist/img}/logo.svg +0 -0
  93. data/{assets/images/patternfly → dist/img}/spinner-inverse-lg.gif +0 -0
  94. data/{assets/images/patternfly → dist/img}/spinner-inverse-sm.gif +0 -0
  95. data/{assets/images/patternfly → dist/img}/spinner-inverse-xs.gif +0 -0
  96. data/{assets/images/patternfly → dist/img}/spinner-inverse.gif +0 -0
  97. data/{assets/images/patternfly → dist/img}/spinner-lg.gif +0 -0
  98. data/{assets/images/patternfly → dist/img}/spinner-sm.gif +0 -0
  99. data/{assets/images/patternfly → dist/img}/spinner-xs.gif +0 -0
  100. data/{assets/images/patternfly → dist/img}/spinner.gif +0 -0
  101. data/dist/js/patternfly-functions-base.js +7 -0
  102. data/dist/js/patternfly-functions-charts.js +13 -0
  103. data/dist/js/patternfly-functions-colors.js +8 -0
  104. data/dist/js/patternfly-functions-count-chars.js +59 -0
  105. data/dist/js/patternfly-functions-data-tables.js +149 -0
  106. data/dist/js/patternfly-functions-fixed-heights.js +87 -0
  107. data/dist/js/patternfly-functions-list.js +79 -0
  108. data/dist/js/patternfly-functions-navigation.js +113 -0
  109. data/dist/js/patternfly-functions-popovers.js +37 -0
  110. data/dist/js/patternfly-functions-sidebar.js +31 -0
  111. data/dist/js/patternfly-functions-tree-grid.js +79 -0
  112. data/dist/js/patternfly-functions-vertical-nav.js +590 -0
  113. data/{assets/javascripts → dist/js}/patternfly-functions.js +133 -95
  114. data/dist/js/patternfly-functions.min.js +1 -0
  115. data/dist/js/patternfly-settings-base.js +16 -0
  116. data/dist/js/patternfly-settings-charts.js +423 -0
  117. data/dist/js/patternfly-settings-colors.js +88 -0
  118. data/{assets/javascripts → dist/js}/patternfly-settings.js +22 -13
  119. data/dist/js/patternfly-settings.min.js +1 -0
  120. data/{assets/javascripts → dist/js}/patternfly.dataTables.pfColVis.js +0 -0
  121. data/{assets/javascripts → dist/js}/patternfly.dataTables.pfEmpty.js +1 -1
  122. data/{assets/javascripts → dist/js}/patternfly.dataTables.pfEmpty.min.js +1 -1
  123. data/{assets/javascripts → dist/js}/patternfly.dataTables.pfFilter.js +0 -0
  124. data/dist/js/patternfly.dataTables.pfFilter.min.js +1 -0
  125. data/{assets/javascripts → dist/js}/patternfly.dataTables.pfPagination.js +1 -1
  126. data/dist/js/patternfly.dataTables.pfPagination.min.js +1 -0
  127. data/{assets/javascripts → dist/js}/patternfly.dataTables.pfResize.js +0 -0
  128. data/{assets/javascripts → dist/js}/patternfly.dataTables.pfResize.min.js +1 -1
  129. data/{assets/javascripts → dist/js}/patternfly.dataTables.pfSelect.js +0 -0
  130. data/{assets/javascripts → dist/js}/patternfly.dataTables.pfSelect.min.js +1 -1
  131. data/{assets/javascripts → dist/js}/patternfly.js +153 -106
  132. data/dist/js/patternfly.min.js +2 -0
  133. data/{assets/stylesheets → dist/sass}/_patternfly-compass.scss +1 -1
  134. data/{assets/stylesheets → dist/sass}/_patternfly-sprockets.scss +1 -1
  135. data/dist/sass/_patternfly.scss +145 -0
  136. data/{assets/stylesheets → dist/sass}/patternfly/_about-modal.scss +2 -2
  137. data/{assets/stylesheets → dist/sass}/patternfly/_alerts.scss +0 -0
  138. data/dist/sass/patternfly/_application-launcher.scss +213 -0
  139. data/{assets/stylesheets → dist/sass}/patternfly/_badges.scss +0 -0
  140. data/{assets/stylesheets → dist/sass}/patternfly/_blank-slate.scss +0 -0
  141. data/{assets/stylesheets → dist/sass}/patternfly/_bootstrap-combobox.scss +1 -1
  142. data/{assets/stylesheets → dist/sass}/patternfly/_bootstrap-datepicker.scss +13 -5
  143. data/dist/sass/patternfly/_bootstrap-mixin-overrides.scss +33 -0
  144. data/{assets/stylesheets → dist/sass}/patternfly/_bootstrap-select.scss +15 -7
  145. data/dist/sass/patternfly/_bootstrap-slider.scss +66 -0
  146. data/{assets/stylesheets → dist/sass}/patternfly/_bootstrap-switch.scss +1 -1
  147. data/{assets/stylesheets → dist/sass}/patternfly/_bootstrap-touchspin.scss +0 -0
  148. data/{assets/stylesheets → dist/sass}/patternfly/_bootstrap-treeview.scss +0 -0
  149. data/{assets/stylesheets → dist/sass}/patternfly/_breadcrumbs.scss +0 -0
  150. data/{assets/stylesheets → dist/sass}/patternfly/_buttons.scss +2 -2
  151. data/{assets/stylesheets → dist/sass}/patternfly/_card-view.scss +1 -1
  152. data/{assets/stylesheets → dist/sass}/patternfly/_cards.scss +2 -2
  153. data/{assets/stylesheets → dist/sass}/patternfly/_charts.scss +28 -0
  154. data/{assets/stylesheets → dist/sass}/patternfly/_close.scss +1 -0
  155. data/dist/sass/patternfly/_color-variables.scss +85 -0
  156. data/{assets/stylesheets → dist/sass}/patternfly/_datatables.scss +5 -5
  157. data/{assets/stylesheets → dist/sass}/patternfly/_dropdowns.scss +9 -4
  158. data/dist/sass/patternfly/_experimental-features.scss +48 -0
  159. data/dist/sass/patternfly/_fonts.scss +124 -0
  160. data/{assets/stylesheets → dist/sass}/patternfly/_footer.scss +0 -0
  161. data/{assets/stylesheets → dist/sass}/patternfly/_forms.scss +0 -0
  162. data/{assets/stylesheets → dist/sass}/patternfly/_icons.scss +91 -7
  163. data/{assets/stylesheets → dist/sass}/patternfly/_infotip.scss +0 -0
  164. data/{assets/stylesheets → dist/sass}/patternfly/_labels.scss +0 -0
  165. data/{assets/stylesheets → dist/sass}/patternfly/_layouts.scss +0 -0
  166. data/{assets/stylesheets → dist/sass}/patternfly/_links.scss +0 -0
  167. data/{assets/stylesheets → dist/sass}/patternfly/_list-group.scss +0 -0
  168. data/{assets/stylesheets → dist/sass}/patternfly/_list-pf.scss +6 -3
  169. data/{assets/stylesheets → dist/sass}/patternfly/_list-view-dnd.scss +0 -0
  170. data/{assets/stylesheets → dist/sass}/patternfly/_list-view.scss +12 -12
  171. data/{assets/stylesheets → dist/sass}/patternfly/_login.scss +3 -7
  172. data/dist/sass/patternfly/_mixins.scss +81 -0
  173. data/{assets/stylesheets → dist/sass}/patternfly/_modals.scss +0 -0
  174. data/{assets/stylesheets → dist/sass}/patternfly/_nav-vertical-alt.scss +1 -1
  175. data/{assets/stylesheets → dist/sass}/patternfly/_navbar-alt.scss +0 -0
  176. data/{assets/stylesheets → dist/sass}/patternfly/_navbar-vertical.scss +9 -2
  177. data/{assets/stylesheets → dist/sass}/patternfly/_navbar.scss +26 -2
  178. data/{assets/stylesheets → dist/sass}/patternfly/_notifications-drawer.scss +102 -15
  179. data/{assets/stylesheets → dist/sass}/patternfly/_pager.scss +1 -1
  180. data/{assets/stylesheets → dist/sass}/patternfly/_pagination.scss +2 -2
  181. data/{assets/stylesheets → dist/sass}/patternfly/_panels.scss +21 -0
  182. data/{assets/stylesheets → dist/sass}/patternfly/_popovers.scss +1 -1
  183. data/{assets/stylesheets → dist/sass}/patternfly/_progress-bars.scss +1 -1
  184. data/{assets/stylesheets → dist/sass}/patternfly/_search.scss +1 -1
  185. data/{assets/stylesheets → dist/sass}/patternfly/_sidebar.scss +0 -0
  186. data/dist/sass/patternfly/_skip-to-content.scss +12 -0
  187. data/{assets/stylesheets → dist/sass}/patternfly/_spinner.scss +16 -16
  188. data/{assets/stylesheets → dist/sass}/patternfly/_syntax-highlighting.scss +0 -0
  189. data/{assets/stylesheets → dist/sass}/patternfly/_table-view.scss +0 -0
  190. data/{assets/stylesheets → dist/sass}/patternfly/_tables.scss +0 -0
  191. data/{assets/stylesheets → dist/sass}/patternfly/_tabs.scss +1 -1
  192. data/{assets/stylesheets → dist/sass}/patternfly/_time-picker.scss +1 -3
  193. data/{assets/stylesheets → dist/sass}/patternfly/_toast.scss +7 -6
  194. data/{assets/stylesheets → dist/sass}/patternfly/_toolbar.scss +1 -1
  195. data/{assets/stylesheets → dist/sass}/patternfly/_tooltip.scss +0 -0
  196. data/{assets/stylesheets → dist/sass}/patternfly/_type.scss +0 -0
  197. data/{assets/stylesheets → dist/sass}/patternfly/_variables.scss +75 -9
  198. data/{assets/stylesheets → dist/sass}/patternfly/_vertical-nav.scss +41 -42
  199. data/{assets/stylesheets → dist/sass}/patternfly/_wizard.scss +175 -123
  200. data/dist/sass/patternfly/dependencies/bootstrap-combobox/combobox.scss +57 -0
  201. data/dist/sass/patternfly/dependencies/bootstrap-datepicker/datepicker.scss +235 -0
  202. data/dist/sass/patternfly/dependencies/bootstrap-datepicker/datepicker3.scss +251 -0
  203. data/dist/sass/patternfly/dependencies/bootstrap-select/bootstrap-select.scss +389 -0
  204. data/dist/sass/patternfly/dependencies/bootstrap-select/variables.scss +9 -0
  205. data/dist/sass/patternfly/dependencies/bootstrap-slider/_mixins.scss +25 -0
  206. data/dist/sass/patternfly/dependencies/bootstrap-slider/_rules.scss +246 -0
  207. data/dist/sass/patternfly/dependencies/bootstrap-slider/_variables.scss +28 -0
  208. data/dist/sass/patternfly/dependencies/bootstrap-slider/bootstrap-slider.scss +42 -0
  209. data/{assets/stylesheets/patternfly/lib → dist/sass/patternfly/dependencies/bootstrap-switch}/bootstrap-switch.scss +12 -10
  210. data/dist/sass/patternfly/dependencies/bootstrap-switch/build.scss +3 -0
  211. data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins.scss +40 -0
  212. data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/alerts.scss +14 -0
  213. data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/background-variant.scss +9 -0
  214. data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/border-radius.scss +18 -0
  215. data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/buttons.scss +68 -0
  216. data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/center-block.scss +7 -0
  217. data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/clearfix.scss +22 -0
  218. data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/forms.scss +85 -0
  219. data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/gradients.scss +59 -0
  220. data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/grid-framework.scss +98 -0
  221. data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/grid.scss +122 -0
  222. data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/hide-text.scss +21 -0
  223. data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/image.scss +33 -0
  224. data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/labels.scss +12 -0
  225. data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/list-group.scss +29 -0
  226. data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/nav-divider.scss +10 -0
  227. data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/nav-vertical-align.scss +9 -0
  228. data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/opacity.scss +8 -0
  229. data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/pagination.scss +23 -0
  230. data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/panels.scss +24 -0
  231. data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/progress-bar.scss +10 -0
  232. data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/reset-filter.scss +8 -0
  233. data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/reset-text.scss +18 -0
  234. data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/resize.scss +6 -0
  235. data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/responsive-visibility.scss +15 -0
  236. data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/size.scss +10 -0
  237. data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/tab-focus.scss +9 -0
  238. data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/table-row.scss +28 -0
  239. data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/text-emphasis.scss +9 -0
  240. data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/text-overflow.scss +8 -0
  241. data/dist/sass/patternfly/dependencies/bootstrap-switch/mixins/vendor-prefixes.scss +227 -0
  242. data/dist/sass/patternfly/dependencies/bootstrap-switch/variables.scss +862 -0
  243. data/{assets/stylesheets/patternfly/lib/bootstrap-touchspin.scss → dist/sass/patternfly/dependencies/bootstrap-touchspin/_jquery.bootstrap-touchspin.scss} +1 -1
  244. data/{assets/stylesheets/patternfly/lib/c3.scss → dist/sass/patternfly/dependencies/c3/_c3.scss} +7 -0
  245. data/dist/sass/patternfly/dependencies/eonasdan-bootstrap-datetimepicker/_bootstrap-datetimepicker.scss +344 -0
  246. data/dist/sass/patternfly/dependencies/eonasdan-bootstrap-datetimepicker/bootstrap-datetimepicker-build.scss +16 -0
  247. data/lib/patternfly-sass.rb +4 -4
  248. data/lib/patternfly-sass/engine.rb +2 -2
  249. data/lib/patternfly-sass/version.rb +1 -2
  250. data/patternfly-sass.gemspec +16 -17
  251. metadata +249 -498
  252. data/.gitignore +0 -41
  253. data/.rspec +0 -3
  254. data/.rubocop.yml +0 -56
  255. data/.travis.yml +0 -51
  256. data/Gemfile +0 -3
  257. data/Rakefile +0 -130
  258. data/assets/fonts/patternfly/PatternFlyIcons-webfont.eot +0 -0
  259. data/assets/fonts/patternfly/PatternFlyIcons-webfont.ttf +0 -0
  260. data/assets/fonts/patternfly/PatternFlyIcons-webfont.woff +0 -0
  261. data/assets/fonts/patternfly/fontawesome-webfont.eot +0 -0
  262. data/assets/fonts/patternfly/fontawesome-webfont.svg +0 -685
  263. data/assets/fonts/patternfly/fontawesome-webfont.woff +0 -0
  264. data/assets/fonts/patternfly/fontawesome-webfont.woff2 +0 -0
  265. data/assets/javascripts/patternfly-functions.min.js +0 -1
  266. data/assets/javascripts/patternfly-settings.min.js +0 -1
  267. data/assets/javascripts/patternfly.dataTables.pfFilter.min.js +0 -1
  268. data/assets/javascripts/patternfly.dataTables.pfPagination.min.js +0 -1
  269. data/assets/javascripts/patternfly.min.js +0 -2
  270. data/assets/stylesheets/_patternfly.scss +0 -108
  271. data/assets/stylesheets/patternfly/_color-variables.scss +0 -84
  272. data/assets/stylesheets/patternfly/_fonts.scss +0 -124
  273. data/assets/stylesheets/patternfly/_mixin_overrides.scss +0 -65
  274. data/assets/stylesheets/patternfly/_mixins.scss +0 -120
  275. data/assets/stylesheets/patternfly/lib/bootstrap-datepicker.scss +0 -678
  276. data/assets/stylesheets/patternfly/lib/bootstrap-datetimepicker.scss +0 -374
  277. data/assets/stylesheets/patternfly/lib/bootstrap-select.scss +0 -282
  278. data/assets/stylesheets/patternfly/lib/patternfly-bootstrap-combobox.scss +0 -44
  279. data/bower.json +0 -53
  280. data/package.json +0 -70
  281. data/spec/compare_spec.rb +0 -60
  282. data/spec/html/about-modal.html +0 -77
  283. data/spec/html/accordions.html +0 -336
  284. data/spec/html/alerts.html +0 -106
  285. data/spec/html/area-charts.html +0 -103
  286. data/spec/html/badges.html +0 -73
  287. data/spec/html/bar-charts.html +0 -350
  288. data/spec/html/basic.html +0 -796
  289. data/spec/html/blank-slate.html +0 -81
  290. data/spec/html/bootstrap-combobox.html +0 -344
  291. data/spec/html/bootstrap-datepicker.html +0 -148
  292. data/spec/html/bootstrap-select.html +0 -213
  293. data/spec/html/bootstrap-switch.html +0 -267
  294. data/spec/html/bootstrap-switch.js +0 -61
  295. data/spec/html/bootstrap-touchspin.html +0 -210
  296. data/spec/html/bootstrap-treeview-2.html +0 -296
  297. data/spec/html/bootstrap-treeview.html +0 -383
  298. data/spec/html/breadcrumbs.html +0 -52
  299. data/spec/html/buttons.html +0 -556
  300. data/spec/html/card-view-card-variations.html +0 -201
  301. data/spec/html/card-view-multi-select.html +0 -698
  302. data/spec/html/card-view-single-select.html +0 -432
  303. data/spec/html/cards.html +0 -899
  304. data/spec/html/code.html +0 -83
  305. data/spec/html/dashboard.html +0 -353
  306. data/spec/html/dist/css/patternfly-additions.css +0 -7202
  307. data/spec/html/dist/css/patternfly-additions.css.map +0 -1
  308. data/spec/html/dist/css/patternfly-additions.min.css +0 -5
  309. data/spec/html/dist/css/patternfly-additions.min.css.map +0 -1
  310. data/spec/html/dist/css/patternfly.css +0 -10355
  311. data/spec/html/dist/css/patternfly.css.map +0 -1
  312. data/spec/html/dist/css/patternfly.min.css +0 -8
  313. data/spec/html/dist/css/patternfly.min.css.map +0 -1
  314. data/spec/html/donut-charts.html +0 -235
  315. data/spec/html/dropdowns.html +0 -138
  316. data/spec/html/form.html +0 -281
  317. data/spec/html/forms.html +0 -875
  318. data/spec/html/horizontal-navigation.html +0 -765
  319. data/spec/html/icons.html +0 -447
  320. data/spec/html/img/dashboard-3.png +0 -0
  321. data/spec/html/index.html +0 -284
  322. data/spec/html/infotip.html +0 -89
  323. data/spec/html/labels.html +0 -108
  324. data/spec/html/line-charts.html +0 -178
  325. data/spec/html/list-group.html +0 -111
  326. data/spec/html/list-pf.html +0 -529
  327. data/spec/html/list-view-compound-expansion.html +0 -1720
  328. data/spec/html/list-view-rows.html +0 -597
  329. data/spec/html/list-view-simple-expansion.html +0 -1003
  330. data/spec/html/list-view.html +0 -614
  331. data/spec/html/login.html +0 -92
  332. data/spec/html/modals.html +0 -83
  333. data/spec/html/navbar.html +0 -4680
  334. data/spec/html/notification-drawer-horizontal-nav.html +0 -1503
  335. data/spec/html/notification-drawer-vertical-nav.html +0 -1631
  336. data/spec/html/pagination-card-view.html +0 -560
  337. data/spec/html/pagination-list-view.html +0 -1204
  338. data/spec/html/pagination-table-view.html +0 -813
  339. data/spec/html/pagination.html +0 -320
  340. data/spec/html/panels.html +0 -113
  341. data/spec/html/pie-charts.html +0 -180
  342. data/spec/html/popovers.html +0 -115
  343. data/spec/html/progress-bars.html +0 -335
  344. data/spec/html/search.html +0 -171
  345. data/spec/html/spinner.html +0 -77
  346. data/spec/html/tab.html +0 -842
  347. data/spec/html/table-view-columns.html +0 -495
  348. data/spec/html/table-view-navbar.html +0 -814
  349. data/spec/html/table-view.html +0 -688
  350. data/spec/html/tables.html +0 -540
  351. data/spec/html/tabs.html +0 -279
  352. data/spec/html/tests.css +0 -16
  353. data/spec/html/time-picker.html +0 -75
  354. data/spec/html/toast.html +0 -87
  355. data/spec/html/toolbar.html +0 -268
  356. data/spec/html/tooltip.html +0 -71
  357. data/spec/html/typography-2.css +0 -10
  358. data/spec/html/typography-2.html +0 -313
  359. data/spec/html/typography.html +0 -212
  360. data/spec/html/utilization-bar-charts.html +0 -69
  361. data/spec/html/vertical-navigation-primary-only.html +0 -844
  362. data/spec/html/vertical-navigation-with-badges.html +0 -1184
  363. data/spec/html/vertical-navigation-with-secondary.html +0 -911
  364. data/spec/html/vertical-navigation-with-tertiary-no-icons.html +0 -1085
  365. data/spec/html/vertical-navigation-with-tertiary-pins.html +0 -1085
  366. data/spec/html/wizard.html +0 -756
  367. data/spec/main.html +0 -16
  368. data/spec/spec_helper.rb +0 -9
  369. data/tasks/converter.rb +0 -353
@@ -0,0 +1,113 @@
1
+ // Util: PatternFly Collapsible Left Hand Navigation
2
+ // Must have navbar-toggle in navbar-pf-alt for expand/collapse
3
+ (function ($) {
4
+
5
+ 'use strict';
6
+
7
+ $.fn.navigation = function () {
8
+
9
+ var navElement = $('.layout-pf-alt-fixed .nav-pf-vertical-alt'),
10
+ bodyContentElement = $('.container-pf-alt-nav-pf-vertical-alt'),
11
+ toggleNavBarButton = $('.navbar-toggle'),
12
+ explicitCollapse = false,
13
+ checkNavState = function () {
14
+ var width = $(window).width();
15
+
16
+ //Always remove the hidden & peek class
17
+ navElement.removeClass('hidden show-mobile-nav collapsed');
18
+
19
+ //Set the body class back to the default
20
+ bodyContentElement.removeClass('collapsed-nav hidden-nav');
21
+
22
+ // Check to see if the nav needs to collapse
23
+ if (width < $.pfBreakpoints.desktop || explicitCollapse) {
24
+ navElement.addClass('collapsed');
25
+ bodyContentElement.addClass('collapsed-nav');
26
+ }
27
+
28
+ // Check to see if we need to move down to the mobile state
29
+ if (width < $.pfBreakpoints.tablet) {
30
+ //Set the nav to being hidden
31
+ navElement.addClass('hidden');
32
+
33
+ //Make sure this is expanded
34
+ navElement.removeClass('collapsed');
35
+
36
+ //Set the body class to the correct state
37
+ bodyContentElement.removeClass('collapsed-nav');
38
+ bodyContentElement.addClass('hidden-nav');
39
+ }
40
+ },
41
+ collapseMenu = function () {
42
+ //Make sure this is expanded
43
+ navElement.addClass('collapsed');
44
+ //Set the body class to the correct state
45
+ bodyContentElement.addClass('collapsed-nav');
46
+
47
+ explicitCollapse = true;
48
+ },
49
+ enableTransitions = function () {
50
+ // enable transitions only when toggleNavBarButton is clicked or window is resized
51
+ $('html').addClass('transitions');
52
+ },
53
+ expandMenu = function () {
54
+ //Make sure this is expanded
55
+ navElement.removeClass('collapsed');
56
+ //Set the body class to the correct state
57
+ bodyContentElement.removeClass('collapsed-nav');
58
+
59
+ explicitCollapse = false;
60
+ },
61
+ bindMenuBehavior = function () {
62
+ toggleNavBarButton.on('click', function (e) {
63
+ var inMobileState = bodyContentElement.hasClass('hidden-nav');
64
+ enableTransitions();
65
+
66
+ if (inMobileState && navElement.hasClass('show-mobile-nav')) {
67
+ //In mobile state just need to hide the nav
68
+ navElement.removeClass('show-mobile-nav');
69
+ } else if (inMobileState) {
70
+ navElement.addClass('show-mobile-nav');
71
+ } else if (navElement.hasClass('collapsed')) {
72
+ expandMenu();
73
+ } else {
74
+ collapseMenu();
75
+ }
76
+ });
77
+ },
78
+ setTooltips = function () {
79
+ $('.nav-pf-vertical-alt [data-toggle="tooltip"]').tooltip({'container': 'body', 'delay': { 'show': '500', 'hide': '200' }});
80
+
81
+ $(".nav-pf-vertical-alt").on("show.bs.tooltip", function (e) {
82
+ return $(this).hasClass("collapsed");
83
+ });
84
+
85
+ },
86
+ init = function () {
87
+ //Set correct state on load
88
+ checkNavState();
89
+
90
+ // Bind Top level hamburger menu with menu behavior;
91
+ bindMenuBehavior();
92
+
93
+ //Set tooltips
94
+ setTooltips();
95
+ };
96
+
97
+ //Listen for the window resize event and collapse/hide as needed
98
+ $(window).on('resize', function () {
99
+ checkNavState();
100
+ enableTransitions();
101
+ });
102
+
103
+ init();
104
+
105
+ };
106
+
107
+ $(document).ready(function () {
108
+ if ($('.nav-pf-vertical-alt').length > 0) {
109
+ $.fn.navigation();
110
+ }
111
+ });
112
+
113
+ }(jQuery));
@@ -0,0 +1,37 @@
1
+ // Util: PatternFly Popovers
2
+ // Add data-close="true" to insert close X icon
3
+ (function ($) {
4
+ 'use strict';
5
+
6
+ $.fn.popovers = function () {
7
+ // Initialize
8
+ this.popover();
9
+
10
+ // Add close icons
11
+ this.filter('[data-close=true]').each(function (index, element) {
12
+ var $this = $(element),
13
+ title = $this.attr('data-original-title') + '<button type="button" class="close" aria-hidden="true"><span class="pficon pficon-close"></span></button>';
14
+
15
+ $this.attr('data-original-title', title);
16
+ });
17
+
18
+ // Bind Close Icon to Toggle Display
19
+ this.on('click', function (e) {
20
+ var $this = $(this),
21
+ $title = $this.next('.popover').find('.popover-title');
22
+
23
+ // Only if data-close is true add class "x" to title for right padding
24
+ $title.find('.close').parent('.popover-title').addClass('closable');
25
+
26
+ // Bind x icon to close popover
27
+ $title.find('.close').on('click', function () {
28
+ $this.popover('hide');
29
+ });
30
+
31
+ // Prevent href="#" page scroll to top
32
+ e.preventDefault();
33
+ });
34
+
35
+ return this;
36
+ };
37
+ }(jQuery));
@@ -0,0 +1,31 @@
1
+ // Util: PatternFly Sidebar
2
+ // Set height of sidebar-pf to height of document minus height of navbar-pf if not mobile
3
+ (function ($) {
4
+ 'use strict';
5
+ $.fn.sidebar = function () {
6
+ var documentHeight = 0,
7
+ navbarpfHeight = 0,
8
+ colHeight = 0;
9
+
10
+ if ($('.navbar-pf .navbar-toggle').is(':hidden')) {
11
+ documentHeight = $(document).height();
12
+ navbarpfHeight = $('.navbar-pf').outerHeight();
13
+ colHeight = documentHeight - navbarpfHeight;
14
+ }
15
+ $('.sidebar-pf').parent('.row').children('[class*="col-"]').css({"min-height" : colHeight});
16
+ };
17
+
18
+ $(document).ready(function () {
19
+ // Call sidebar() on ready if .sidebar-pf exists and .datatable does not exist
20
+ if ($('.sidebar-pf').length > 0 && $('.datatable').length === 0) {
21
+ $.fn.sidebar();
22
+ }
23
+ });
24
+
25
+ $(window).resize(function () {
26
+ // Call sidebar() on resize if .sidebar-pf exists
27
+ if ($('.sidebar-pf').length > 0) {
28
+ $.fn.sidebar();
29
+ }
30
+ });
31
+ }(jQuery));
@@ -0,0 +1,79 @@
1
+ // Util: PatternFly TreeGrid Tables
2
+ (function ($) {
3
+ 'use strict';
4
+
5
+ function getParent (rows, node) {
6
+ var parent = node.attr('data-parent');
7
+
8
+ if (typeof parent === "string") {
9
+ if (isNaN(parent)) {
10
+ parent = rows.closest(parent);
11
+ } else {
12
+ parent = $(rows[parseInt(parent, 10)]);
13
+ }
14
+ return parent;
15
+ }
16
+ return undefined;
17
+ }
18
+
19
+ function renderItem (item, parent) {
20
+ if (parent) {
21
+ parent.find('.treegrid-node > span.expand-icon')
22
+ .toggleClass('fa-angle-right', parent.hasClass('collapsed'))
23
+ .toggleClass('fa-angle-down', !parent.hasClass('collapsed'));
24
+ item.toggleClass('hidden', parent.hasClass('collapsed'));
25
+ if (parent.hasClass('collapsed')) {
26
+ item.addClass('collapsed');
27
+ }
28
+ }
29
+ }
30
+
31
+ function reStripe (tree) {
32
+ tree.find('tbody > tr').removeClass('odd');
33
+ tree.find('tbody > tr:not(.hidden):odd').addClass('odd');
34
+ }
35
+
36
+ $.fn.treegrid = function (options) {
37
+ var i, rows, _this;
38
+ rows = this.find('tbody > tr');
39
+ _this = this;
40
+ $.each(rows, function () {
41
+ var node, parent;
42
+ node = $(this);
43
+ parent = getParent(rows, node);
44
+ // Append expand icon dummies
45
+ node.children('.treegrid-node').prepend('<span class="icon expand-icon fa"/>');
46
+
47
+ // Set up an event listener for the node
48
+ node.children('.treegrid-node').on('click', function (e) {
49
+ var icon = node.find('span.expand-icon');
50
+
51
+ if (options && typeof options.callback === 'function') {
52
+ options.callback(e);
53
+ }
54
+
55
+ if (icon.hasClass('fa-angle-right')) {
56
+ node.removeClass('collapsed');
57
+ }
58
+ if (icon.hasClass('fa-angle-down')) {
59
+ node.addClass('collapsed');
60
+ }
61
+ $.each(rows.slice(rows.index(node) + 1), function () {
62
+ renderItem($(this), getParent(rows, $(this)));
63
+ });
64
+ reStripe(_this);
65
+ });
66
+
67
+ if (parent) {
68
+ // Calculate indentation depth
69
+ i = parent.find('.treegrid-node > span.indent').length + 1;
70
+ for (; i > 0; i -= 1) {
71
+ node.children('.treegrid-node').prepend('<span class="indent"/>');
72
+ }
73
+ // Render expand/collapse icons
74
+ renderItem(node, parent);
75
+ }
76
+ });
77
+ reStripe(_this);
78
+ };
79
+ }(jQuery));
@@ -0,0 +1,590 @@
1
+ // Util: PatternFly Vertical Navigation
2
+ // Must have navbar-toggle in navbar-pf-vertical for expand/collapse
3
+ (function ($) {
4
+ 'use strict';
5
+
6
+ $.fn.setupVerticalNavigation = function (handleItemSelections, ignoreDrawer) {
7
+
8
+ var navElement = $('.nav-pf-vertical'),
9
+ bodyContentElement = $('.container-pf-nav-pf-vertical'),
10
+ toggleNavBarButton = $('.navbar-toggle'),
11
+ handleResize = true,
12
+ explicitCollapse = false,
13
+ subDesktop = false,
14
+ hoverDelay = 500,
15
+ hideDelay = hoverDelay + 200,
16
+
17
+ inMobileState = function () {
18
+ return bodyContentElement.hasClass('hidden-nav');
19
+ },
20
+
21
+ forceResize = function (delay) {
22
+ setTimeout(function () {
23
+ $(window).trigger('resize');
24
+ }, delay);
25
+ },
26
+
27
+ showSecondaryMenu = function () {
28
+ if (inMobileState() || !subDesktop) {
29
+ navElement.addClass('secondary-visible-pf');
30
+ bodyContentElement.addClass('secondary-visible-pf');
31
+ }
32
+
33
+ // Dispatch a resize event when showing the secondary menu in non-subdesktop state to
34
+ // allow content to adjust to the secondary menu sizing
35
+ if (!subDesktop) {
36
+ forceResize(100);
37
+ }
38
+ },
39
+
40
+ hideSecondaryMenu = function () {
41
+ navElement.removeClass('secondary-visible-pf');
42
+ bodyContentElement.removeClass('secondary-visible-pf');
43
+
44
+ if (navElement.find('.secondary-nav-item-pf.is-hover').length <= 1) {
45
+ navElement.removeClass('hover-secondary-nav-pf');
46
+ }
47
+
48
+ navElement.find('.mobile-nav-item-pf').each(function (index, item) {
49
+ $(item).removeClass('mobile-nav-item-pf');
50
+ });
51
+
52
+ navElement.find('.is-hover').each(function (index, item) {
53
+ $(item).removeClass('is-hover');
54
+ });
55
+ },
56
+
57
+ hideTertiaryMenu = function () {
58
+ navElement.removeClass('tertiary-visible-pf');
59
+ bodyContentElement.removeClass('tertiary-visible-pf');
60
+
61
+ if (navElement.find('.tertiary-nav-item-pf.is-hover').length <= 1) {
62
+ navElement.removeClass('hover-tertiary-nav-pf');
63
+ }
64
+
65
+ navElement.find('.mobile-nav-item-pf').each(function (index, item) {
66
+ $(item).removeClass('mobile-nav-item-pf');
67
+ });
68
+
69
+ navElement.find('.is-hover').each(function (index, item) {
70
+ $(item).removeClass('is-hover');
71
+ });
72
+ },
73
+
74
+ setActiveItem = function (item) {
75
+ // remove all .active
76
+ $('.nav-pf-vertical .list-group-item.active').removeClass('active');
77
+
78
+ // add .active to item and its parents
79
+ item.addClass('active').parents('.list-group-item').addClass('active');
80
+ },
81
+
82
+ updateSecondaryMenuDisplayAfterSelection = function () {
83
+ if (inMobileState()) {
84
+ navElement.removeClass('show-mobile-nav');
85
+ hideSecondaryMenu();
86
+ navElement.find('.mobile-nav-item-pf').each(function (index, item) {
87
+ $(item).removeClass('mobile-nav-item-pf');
88
+ });
89
+ } else {
90
+ showSecondaryMenu();
91
+ }
92
+ },
93
+
94
+ updateSecondaryCollapsedState = function (setCollapsed, collapsedItem) {
95
+ if (setCollapsed) {
96
+ collapsedItem.addClass('collapsed');
97
+ navElement.addClass('collapsed-secondary-nav-pf');
98
+ bodyContentElement.addClass('collapsed-secondary-nav-pf');
99
+ } else {
100
+ if (collapsedItem) {
101
+ collapsedItem.removeClass('collapsed');
102
+ } else {
103
+ // Remove any collapsed secondary menus
104
+ navElement.find('[data-toggle="collapse-secondary-nav"]').each(function (index, element) {
105
+ var $e = $(element);
106
+ $e.removeClass('collapsed');
107
+ });
108
+ }
109
+ navElement.removeClass('collapsed-secondary-nav-pf');
110
+ bodyContentElement.removeClass('collapsed-secondary-nav-pf');
111
+ }
112
+ },
113
+
114
+ updateTertiaryCollapsedState = function (setCollapsed, collapsedItem) {
115
+ if (setCollapsed) {
116
+ collapsedItem.addClass('collapsed');
117
+ navElement.addClass('collapsed-tertiary-nav-pf');
118
+ bodyContentElement.addClass('collapsed-tertiary-nav-pf');
119
+ updateSecondaryCollapsedState(false);
120
+ } else {
121
+ if (collapsedItem) {
122
+ collapsedItem.removeClass('collapsed');
123
+ } else {
124
+ // Remove any collapsed tertiary menus
125
+ navElement.find('[data-toggle="collapse-tertiary-nav"]').each(function (index, element) {
126
+ var $e = $(element);
127
+ $e.removeClass('collapsed');
128
+ });
129
+ }
130
+ navElement.removeClass('collapsed-tertiary-nav-pf');
131
+ bodyContentElement.removeClass('collapsed-tertiary-nav-pf');
132
+ }
133
+ },
134
+
135
+ updateMobileMenu = function (selected, secondaryItem) {
136
+ $(document).find('.list-group-item.mobile-nav-item-pf').each(function (index, item) {
137
+ $(item).removeClass('mobile-nav-item-pf');
138
+ });
139
+ $(document).find('.list-group-item.mobile-secondary-item-pf').each(function (index, item) {
140
+ $(item).removeClass('mobile-secondary-item-pf');
141
+ });
142
+ if (selected) {
143
+ selected.addClass('mobile-nav-item-pf');
144
+ if (secondaryItem) {
145
+ secondaryItem.addClass('mobile-secondary-item-pf');
146
+ navElement.removeClass('show-mobile-secondary');
147
+ navElement.addClass('show-mobile-tertiary');
148
+ } else {
149
+ navElement.addClass('show-mobile-secondary');
150
+ navElement.removeClass('show-mobile-tertiary');
151
+ }
152
+ } else {
153
+ navElement.removeClass('show-mobile-secondary');
154
+ navElement.removeClass('show-mobile-tertiary');
155
+ }
156
+ },
157
+
158
+ enterMobileState = function () {
159
+ if (!navElement.hasClass('hidden')) {
160
+ //Set the nav to being hidden
161
+ navElement.addClass('hidden');
162
+ navElement.removeClass('collapsed');
163
+
164
+ //Set the body class to the correct state
165
+ bodyContentElement.removeClass('collapsed-nav');
166
+ bodyContentElement.addClass('hidden-nav');
167
+
168
+ // Reset the collapsed states
169
+ updateSecondaryCollapsedState(false);
170
+ updateTertiaryCollapsedState(false);
171
+
172
+ explicitCollapse = false;
173
+ }
174
+ },
175
+
176
+ exitMobileState = function () {
177
+ // Always remove the hidden & peek class
178
+ navElement.removeClass('hidden show-mobile-nav');
179
+
180
+ // Set the body class back to the default
181
+ bodyContentElement.removeClass('hidden-nav');
182
+ },
183
+
184
+ checkNavState = function () {
185
+ var width = $(window).width(), makeSecondaryVisible;
186
+ if (!handleResize) {
187
+ return;
188
+ }
189
+ // Check to see if we need to enter/exit the mobile state
190
+ if (width < $.pfBreakpoints.tablet && !explicitCollapse) {
191
+ enterMobileState();
192
+ } else if (navElement.hasClass('hidden')) {
193
+ exitMobileState();
194
+ }
195
+
196
+ // Check to see if we need to enter/exit the sub desktop state
197
+ if (width < $.pfBreakpoints.desktop) {
198
+ if (!subDesktop) {
199
+ // Collapse the navigation bars when entering sub desktop mode
200
+ navElement.addClass('collapsed');
201
+ bodyContentElement.addClass('collapsed-nav');
202
+ }
203
+ if (width >= $.pfBreakpoints.tablet) {
204
+ hideSecondaryMenu();
205
+ }
206
+ subDesktop = true;
207
+ } else {
208
+ makeSecondaryVisible = subDesktop && (navElement.find('.secondary-nav-item-pf.active').length > 0);
209
+ subDesktop = false;
210
+ if (makeSecondaryVisible) {
211
+
212
+ showSecondaryMenu();
213
+ }
214
+ }
215
+
216
+ if (explicitCollapse) {
217
+ navElement.addClass('collapsed');
218
+ bodyContentElement.addClass('collapsed-nav');
219
+ } else {
220
+ navElement.removeClass('collapsed');
221
+ bodyContentElement.removeClass('collapsed-nav');
222
+ }
223
+ },
224
+
225
+ collapseMenu = function () {
226
+ //Make sure this is expanded
227
+ navElement.addClass('collapsed');
228
+ //Set the body class to the correct state
229
+ bodyContentElement.addClass('collapsed-nav');
230
+
231
+ if (subDesktop) {
232
+ hideSecondaryMenu();
233
+ }
234
+
235
+ explicitCollapse = true;
236
+ },
237
+
238
+ enableTransitions = function () {
239
+ // enable transitions only when toggleNavBarButton is clicked or window is resized
240
+ $('html').addClass('transitions');
241
+ },
242
+
243
+ expandMenu = function () {
244
+ //Make sure this is expanded
245
+ navElement.removeClass('collapsed');
246
+ //Set the body class to the correct state
247
+ bodyContentElement.removeClass('collapsed-nav');
248
+
249
+ explicitCollapse = false;
250
+
251
+ // Dispatch a resize event when showing the expanding then menu to
252
+ // allow content to adjust to the menu sizing
253
+ if (!subDesktop) {
254
+ forceResize(100);
255
+ }
256
+ },
257
+
258
+ bindMenuBehavior = function () {
259
+ toggleNavBarButton.on('click', function (e) {
260
+ var $drawer;
261
+
262
+ enableTransitions();
263
+
264
+ if (inMobileState()) {
265
+ // Toggle the mobile nav
266
+ if (navElement.hasClass('show-mobile-nav')) {
267
+ navElement.removeClass('show-mobile-nav');
268
+ } else {
269
+ // Always start at the primary menu
270
+ updateMobileMenu();
271
+ navElement.addClass('show-mobile-nav');
272
+
273
+ // If the notification drawer is shown, hide it
274
+ if (!ignoreDrawer) {
275
+ $drawer = $('.drawer-pf');
276
+ if ($drawer.length) {
277
+ $('.drawer-pf-trigger').removeClass('open');
278
+ $drawer.addClass('hide');
279
+ }
280
+ }
281
+ }
282
+ } else if (navElement.hasClass('collapsed')) {
283
+ window.localStorage.setItem('patternfly-navigation-primary', 'expanded');
284
+ expandMenu();
285
+ } else {
286
+ window.localStorage.setItem('patternfly-navigation-primary', 'collapsed');
287
+ collapseMenu();
288
+ }
289
+ });
290
+ },
291
+
292
+ forceHideSecondaryMenu = function () {
293
+ navElement.addClass('force-hide-secondary-nav-pf');
294
+ setTimeout(function () {
295
+ navElement.removeClass('force-hide-secondary-nav-pf');
296
+ }, 500);
297
+ },
298
+
299
+ bindMenuItemsBehavior = function (handleSelection) {
300
+ $(document).find('.nav-pf-vertical .list-group-item').each(function (index, item) {
301
+ var onClickFn,
302
+ $item = $(item),
303
+ $nav = $item.closest('[class*="nav-pf-"]');
304
+
305
+ if ($nav.hasClass('nav-pf-vertical')) {
306
+ // Set main nav active item on click or show secondary nav if it has a secondary nav bar and we are in the mobile state
307
+ onClickFn = function (event) {
308
+ var $this = $(this), $secondaryItem, $tertiaryItem, $activeItem;
309
+
310
+ if (!$this.hasClass('secondary-nav-item-pf')) {
311
+ hideSecondaryMenu();
312
+ if (inMobileState()) {
313
+ updateMobileMenu();
314
+ navElement.removeClass('show-mobile-nav');
315
+ }
316
+ if (handleSelection) {
317
+ setActiveItem($this);
318
+ // Don't process the click on the item
319
+ event.stopImmediatePropagation();
320
+ }
321
+ } else if (inMobileState()) {
322
+ updateMobileMenu($this);
323
+ } else if (handleSelection) {
324
+ $activeItem = $secondaryItem = $item.find('.nav-pf-secondary-nav > .list-group > .list-group-item').eq(0);
325
+
326
+ if ($secondaryItem.hasClass('tertiary-nav-item-pf')) {
327
+ $activeItem = $secondaryItem.find('.nav-pf-tertiary-nav > .list-group > .list-group-item').eq(0);
328
+ }
329
+
330
+ setActiveItem($activeItem);
331
+ event.stopImmediatePropagation();
332
+ }
333
+ };
334
+
335
+ } else if ($nav.hasClass('nav-pf-secondary-nav')) {
336
+ // Set secondary nav active item on click or show tertiary nav if it has a tertiary nav bar and we are in the mobile state
337
+ onClickFn = function (event) {
338
+ var $this = $(this), $tertiaryItem, $primaryItem;
339
+ if (!$this.hasClass('tertiary-nav-item-pf')) {
340
+ if (inMobileState()) {
341
+ updateMobileMenu();
342
+ navElement.removeClass('show-mobile-nav');
343
+ }
344
+ updateSecondaryMenuDisplayAfterSelection();
345
+ if (handleSelection) {
346
+ setActiveItem($item);
347
+ hideSecondaryMenu();
348
+ event.stopImmediatePropagation();
349
+ }
350
+ } else if (inMobileState()) {
351
+ $primaryItem = $item.parents('.list-group-item');
352
+ updateMobileMenu($this, $primaryItem);
353
+ event.stopImmediatePropagation();
354
+ } else if (handleSelection) {
355
+ $tertiaryItem = $item.find('.nav-pf-tertiary-nav > .list-group > .list-group-item').eq(0);
356
+ setActiveItem($tertiaryItem);
357
+ event.stopImmediatePropagation();
358
+ }
359
+ };
360
+
361
+ } else if ($nav.hasClass('nav-pf-tertiary-nav')) {
362
+ // Set tertiary nav active item on click
363
+ onClickFn = function (event) {
364
+ if (inMobileState()) {
365
+ updateMobileMenu();
366
+ navElement.removeClass('show-mobile-nav');
367
+ }
368
+ updateSecondaryMenuDisplayAfterSelection();
369
+ if (handleSelection) {
370
+ setActiveItem($item);
371
+ hideTertiaryMenu();
372
+ hideSecondaryMenu();
373
+ event.stopImmediatePropagation();
374
+ }
375
+ };
376
+ }
377
+
378
+ // register event handler
379
+ $item.on('click.pf.secondarynav.data-api', onClickFn);
380
+ });
381
+
382
+ $(document).find('.secondary-nav-item-pf').each(function (index, secondaryItem) {
383
+ var $secondaryItem = $(secondaryItem);
384
+
385
+ // Collapse the secondary nav bar when the toggle is clicked
386
+ $secondaryItem.on('click.pf.secondarynav.data-api', '[data-toggle="collapse-secondary-nav"]', function (e) {
387
+ var $this = $(this);
388
+ if (inMobileState()) {
389
+ updateMobileMenu();
390
+ e.stopImmediatePropagation();
391
+ } else {
392
+ if ($this.hasClass('collapsed')) {
393
+ window.localStorage.setItem('patternfly-navigation-secondary', 'expanded');
394
+ window.localStorage.setItem('patternfly-navigation-tertiary', 'expanded');
395
+ updateSecondaryCollapsedState(false, $this);
396
+ forceHideSecondaryMenu();
397
+ } else {
398
+ window.localStorage.setItem('patternfly-navigation-secondary', 'collapsed');
399
+ updateSecondaryCollapsedState(true, $this);
400
+ }
401
+ }
402
+ navElement.removeClass('hover-secondary-nav-pf');
403
+ if (handleSelection) {
404
+ // Don't process the click on the parent item
405
+ e.stopImmediatePropagation();
406
+ }
407
+ });
408
+
409
+ $secondaryItem.find('.tertiary-nav-item-pf').each(function (index, primaryItem) {
410
+ var $primaryItem = $(primaryItem);
411
+ // Collapse the tertiary nav bar when the toggle is clicked
412
+ $primaryItem.on('click.pf.tertiarynav.data-api', '[data-toggle="collapse-tertiary-nav"]', function (e) {
413
+ var $this = $(this);
414
+ if (inMobileState()) {
415
+ updateMobileMenu($secondaryItem);
416
+ e.stopImmediatePropagation();
417
+ } else {
418
+ if ($this.hasClass('collapsed')) {
419
+ window.localStorage.setItem('patternfly-navigation-secondary', 'expanded');
420
+ window.localStorage.setItem('patternfly-navigation-tertiary', 'expanded');
421
+ updateTertiaryCollapsedState(false, $this);
422
+ forceHideSecondaryMenu();
423
+ } else {
424
+ window.localStorage.setItem('patternfly-navigation-tertiary', 'collapsed');
425
+ updateTertiaryCollapsedState(true, $this);
426
+ }
427
+ }
428
+ navElement.removeClass('hover-secondary-nav-pf');
429
+ navElement.removeClass('hover-tertiary-nav-pf');
430
+ if (handleSelection) {
431
+ // Don't process the click on the parent item
432
+ e.stopImmediatePropagation();
433
+ }
434
+ });
435
+ });
436
+ });
437
+
438
+ // Show secondary nav bar on hover of secondary nav items
439
+ $(document).on('mouseenter.pf.tertiarynav.data-api', '.secondary-nav-item-pf', function (e) {
440
+ var $this = $(this);
441
+ if (!inMobileState()) {
442
+ if ($this[0].navUnHoverTimeout !== undefined) {
443
+ clearTimeout($this[0].navUnHoverTimeout);
444
+ $this[0].navUnHoverTimeout = undefined;
445
+ } else if ($this[0].navHoverTimeout === undefined) {
446
+ $this[0].navHoverTimeout = setTimeout(function () {
447
+ navElement.addClass('hover-secondary-nav-pf');
448
+ $this.addClass('is-hover');
449
+ $this[0].navHoverTimeout = undefined;
450
+ }, hoverDelay);
451
+ }
452
+ }
453
+ });
454
+
455
+ $(document).on('mouseleave.pf.tertiarynav.data-api', '.secondary-nav-item-pf', function (e) {
456
+ var $this = $(this);
457
+ if ($this[0].navHoverTimeout !== undefined) {
458
+ clearTimeout($this[0].navHoverTimeout);
459
+ $this[0].navHoverTimeout = undefined;
460
+ } else if ($this[0].navUnHoverTimeout === undefined &&
461
+ navElement.find('.secondary-nav-item-pf.is-hover').length > 0) {
462
+ $this[0].navUnHoverTimeout = setTimeout(function () {
463
+ if (navElement.find('.secondary-nav-item-pf.is-hover').length <= 1) {
464
+ navElement.removeClass('hover-secondary-nav-pf');
465
+ }
466
+ $this.removeClass('is-hover');
467
+ $this[0].navUnHoverTimeout = undefined;
468
+ }, hideDelay);
469
+ }
470
+ });
471
+
472
+ // Show tertiary nav bar on hover of secondary nav items
473
+ $(document).on('mouseover.pf.tertiarynav.data-api', '.tertiary-nav-item-pf', function (e) {
474
+ var $this = $(this);
475
+ if (!inMobileState()) {
476
+ if ($this[0].navUnHoverTimeout !== undefined) {
477
+ clearTimeout($this[0].navUnHoverTimeout);
478
+ $this[0].navUnHoverTimeout = undefined;
479
+ } else if ($this[0].navHoverTimeout === undefined) {
480
+ $this[0].navHoverTimeout = setTimeout(function () {
481
+ navElement.addClass('hover-tertiary-nav-pf');
482
+ $this.addClass('is-hover');
483
+ $this[0].navHoverTimeout = undefined;
484
+ }, hoverDelay);
485
+ }
486
+ }
487
+ });
488
+ $(document).on('mouseout.pf.tertiarynav.data-api', '.tertiary-nav-item-pf', function (e) {
489
+ var $this = $(this);
490
+ if ($this[0].navHoverTimeout !== undefined) {
491
+ clearTimeout($this[0].navHoverTimeout);
492
+ $this[0].navHoverTimeout = undefined;
493
+ } else if ($this[0].navUnHoverTimeout === undefined) {
494
+ $this[0].navUnHoverTimeout = setTimeout(function () {
495
+ if (navElement.find('.tertiary-nav-item-pf.is-hover').length <= 1) {
496
+ navElement.removeClass('hover-tertiary-nav-pf');
497
+ }
498
+ $this.removeClass('is-hover');
499
+ $this[0].navUnHoverTimeout = undefined;
500
+ }, hideDelay);
501
+ }
502
+ });
503
+ },
504
+
505
+ loadFromLocalStorage = function () {
506
+ if (inMobileState()) {
507
+ return;
508
+ }
509
+
510
+ if (window.localStorage.getItem('patternfly-navigation-primary') === 'collapsed') {
511
+ collapseMenu();
512
+ }
513
+
514
+ if ($('.nav-pf-vertical.nav-pf-vertical-collapsible-menus').length > 0) {
515
+ if (window.localStorage.getItem('patternfly-navigation-secondary') === 'collapsed') {
516
+ updateSecondaryCollapsedState(true, $('.secondary-nav-item-pf.active [data-toggle=collapse-secondary-nav]'));
517
+ }
518
+
519
+ if (window.localStorage.getItem('patternfly-navigation-tertiary') === 'collapsed') {
520
+ updateTertiaryCollapsedState(true, $('.tertiary-nav-item-pf.active [data-toggle=collapse-tertiary-nav]'));
521
+ }
522
+ }
523
+ },
524
+
525
+ setTooltips = function () {
526
+ var tooltipOptions = {
527
+ container: 'body',
528
+ placement: 'bottom',
529
+ delay: { 'show': '500', 'hide': '200' },
530
+ template: '<div class="nav-pf-vertical-tooltip tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
531
+ };
532
+ $('.nav-pf-vertical [data-toggle="tooltip"]').tooltip(tooltipOptions);
533
+
534
+ $('.nav-pf-vertical').on("show.bs.tooltip", function (e) {
535
+ return $(this).hasClass("collapsed");
536
+ });
537
+ },
538
+
539
+ init = function (handleItemSelections) {
540
+ // Hide the nav menus during initialization
541
+ navElement.addClass('hide-nav-pf');
542
+ bodyContentElement.addClass('hide-nav-pf');
543
+
544
+ //Set correct state on load
545
+ checkNavState();
546
+
547
+ // Bind Top level hamburger menu with menu behavior;
548
+ bindMenuBehavior();
549
+
550
+ // Bind menu items
551
+ bindMenuItemsBehavior(handleItemSelections);
552
+
553
+ //Set tooltips
554
+ setTooltips();
555
+
556
+ loadFromLocalStorage();
557
+
558
+ // Show the nav menus
559
+ navElement.removeClass('hide-nav-pf');
560
+ bodyContentElement.removeClass('hide-nav-pf');
561
+ forceResize(250);
562
+ },
563
+
564
+ self = {
565
+ hideMenu: function () {
566
+ handleResize = false;
567
+ enterMobileState();
568
+ },
569
+ showMenu: function () {
570
+ handleResize = true;
571
+ exitMobileState();
572
+ },
573
+ isVisible: function () {
574
+ return handleResize;
575
+ }
576
+ };
577
+
578
+ if (!$.fn.setupVerticalNavigation.self) {
579
+ $.fn.setupVerticalNavigation.self = self;
580
+ //Listen for the window resize event and collapse/hide as needed
581
+ $(window).on('resize', function () {
582
+ checkNavState();
583
+ enableTransitions();
584
+ });
585
+
586
+ init(handleItemSelections);
587
+ }
588
+ return $.fn.setupVerticalNavigation.self;
589
+ };
590
+ }(jQuery));