@madie/madie-design-system 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (316) hide show
  1. package/.babelrc +10 -0
  2. package/.editorconfig +22 -0
  3. package/.eslintignore +5 -0
  4. package/.eslintrc.js +31 -0
  5. package/.storybook/.babelrc +4 -0
  6. package/.storybook/main.js +89 -0
  7. package/.storybook/preview-head.html +9 -0
  8. package/.storybook/preview.js +5 -0
  9. package/README.md +5 -0
  10. package/components/Accordion/Accordion.stories.js +20 -0
  11. package/components/Accordion/index.jsx +93 -0
  12. package/components/Alert/Alert.stories.js +61 -0
  13. package/components/Alert/index.js +46 -0
  14. package/components/Breadcrumb/Breadcrumb.md +28 -0
  15. package/components/Breadcrumb/Breadcrumb.stories.js +76 -0
  16. package/components/Breadcrumb/index.js +83 -0
  17. package/components/Button/Button.stories.js +121 -0
  18. package/components/Button/index.js +90 -0
  19. package/components/CalloutBox/CalloutBox.stories.js +94 -0
  20. package/components/CalloutBox/index.js +109 -0
  21. package/components/Card/Card.stories.js +163 -0
  22. package/components/Card/index.js +137 -0
  23. package/components/Dropdown/Dropdown.stories.js +94 -0
  24. package/components/Dropdown/index.js +85 -0
  25. package/components/Error/Collapsible.jsx +88 -0
  26. package/components/Error/ErrorUI.jsx +31 -0
  27. package/components/Error/error.js +26 -0
  28. package/components/FlashNotification/FlashNotificationUI.jsx +91 -0
  29. package/components/FlashNotification/index.js +30 -0
  30. package/components/Footer/Footer.stories.js +20 -0
  31. package/components/Footer/FooterUI.jsx +269 -0
  32. package/components/Footer/LegacyFooterUI.jsx +194 -0
  33. package/components/Footer/SocialLinks.jsx +60 -0
  34. package/components/Footer/Subscribe.jsx +34 -0
  35. package/components/Footer/footer.js +30 -0
  36. package/components/Header/Header.md +111 -0
  37. package/components/Header/Header.stories.js +32 -0
  38. package/components/Header/HeaderAccountMenu.jsx +169 -0
  39. package/components/Header/HeaderCancel.jsx +16 -0
  40. package/components/Header/HeaderContainer.jsx +63 -0
  41. package/components/Header/HeaderLogo.jsx +42 -0
  42. package/components/Header/HeaderMenuButton.js +50 -0
  43. package/components/Header/HeaderMenuItem.jsx +232 -0
  44. package/components/Header/HeaderMenuLink.js +50 -0
  45. package/components/Header/HeaderMenuSignOutButton.js +62 -0
  46. package/components/Header/HeaderMobileButton.js +37 -0
  47. package/components/Header/HeaderUI.jsx +167 -0
  48. package/components/Header/HelpIcon.jsx +32 -0
  49. package/components/Header/ImpersonatorBanner.jsx +57 -0
  50. package/components/Header/NavigationButtonIcon.jsx +27 -0
  51. package/components/Header/default-content.json +280 -0
  52. package/components/Header/header.js +40 -0
  53. package/components/Header/hooks.js +52 -0
  54. package/components/Header/utag-helpers.js +9 -0
  55. package/components/Infotip/Infotip.jsx +75 -0
  56. package/components/Infotip/Infotip.stories.js +50 -0
  57. package/components/Infotip/InfotipIcon.jsx +41 -0
  58. package/components/Infotip/index.js +3 -0
  59. package/components/Link/Link.stories.js +81 -0
  60. package/components/Link/index.js +61 -0
  61. package/components/Modal/LegacyModal.jsx +72 -0
  62. package/components/Modal/Modal.jsx +140 -0
  63. package/components/Modal/Modal.stories.js +159 -0
  64. package/components/Modal/index.jsx +22 -0
  65. package/components/NotificationBanner/NotificationBanner.stories.js +23 -0
  66. package/components/NotificationBanner/index.js +265 -0
  67. package/components/SanitizedContent/index.jsx +200 -0
  68. package/components/Search/Search.stories.js +21 -0
  69. package/components/Search/index.js +85 -0
  70. package/components/SessionDialog/sessionDialog.js +26 -0
  71. package/components/SessionDialogUI.jsx +261 -0
  72. package/components/SideNav/AnimationGroup/AnimationGroup.jsx +27 -0
  73. package/components/SideNav/Chart/ScoreChart.jsx +268 -0
  74. package/components/SideNav/Chart/__tests__/ScoreChart.test.js +22 -0
  75. package/components/SideNav/Chart/__tests__/__snapshots__/ScoreChart.test.js.snap +173 -0
  76. package/components/SideNav/Chart/index.js +3 -0
  77. package/components/SideNav/Content/LevelOneContent.jsx +208 -0
  78. package/components/SideNav/Content/LevelTwoContent.jsx +216 -0
  79. package/components/SideNav/Content/index.js +4 -0
  80. package/components/SideNav/Details/IndividualDetails.jsx +18 -0
  81. package/components/SideNav/Details/PracticeDetails.jsx +45 -0
  82. package/components/SideNav/Details/index.js +4 -0
  83. package/components/SideNav/Links/CmsSwitchLink.jsx +41 -0
  84. package/components/SideNav/Links/NavItemInline.jsx +54 -0
  85. package/components/SideNav/Links/NavLinkContainer.jsx +38 -0
  86. package/components/SideNav/Links/NavLinkDrawer.jsx +249 -0
  87. package/components/SideNav/Links/NavLinkInline.jsx +107 -0
  88. package/components/SideNav/Links/NavLinkToggle.jsx +34 -0
  89. package/components/SideNav/Links/index.js +13 -0
  90. package/components/SideNav/SideNav.md +50 -0
  91. package/components/SideNav/SideNav.stories.js +379 -0
  92. package/components/SideNav/UI/SideNavUI.jsx +333 -0
  93. package/components/SideNav/UI/default-content.json +99 -0
  94. package/components/SideNav/UI/index.js +3 -0
  95. package/components/SideNav/helpers.js +49 -0
  96. package/components/SideNav/index.js +53 -0
  97. package/components/Spinner/index.js +9 -0
  98. package/components/Tabs/Tab.js +26 -0
  99. package/components/Tabs/TabPanel.js +34 -0
  100. package/components/Tabs/Tabs.stories.js +120 -0
  101. package/components/Tabs/index.js +95 -0
  102. package/components/TextInput/TextInput.stories.js +118 -0
  103. package/components/TextInput/index.js +137 -0
  104. package/components/Tooltip/Tooltip.jsx +88 -0
  105. package/components/Tooltip/Tooltip.stories.js +80 -0
  106. package/components/Tooltip/index.js +3 -0
  107. package/components/Tooltip/position.js +68 -0
  108. package/components/UnwrappedSpinner/index.js +8 -0
  109. package/components/hooks/useGetConfig.js +74 -0
  110. package/components/index.js +126 -0
  111. package/dist/browser.js +3 -0
  112. package/dist/browser.js.LICENSE.txt +54 -0
  113. package/dist/browser.js.map +1 -0
  114. package/dist/index.js +3 -0
  115. package/dist/index.js.LICENSE.txt +54 -0
  116. package/dist/index.js.map +1 -0
  117. package/dist/react/index.js +3 -0
  118. package/dist/react/index.js.LICENSE.txt +71 -0
  119. package/dist/react/index.js.map +1 -0
  120. package/fonts/FontAwesome.otf +0 -0
  121. package/fonts/OFL.txt +92 -0
  122. package/fonts/Rubik-Black.ttf +0 -0
  123. package/fonts/Rubik-BlackItalic.ttf +0 -0
  124. package/fonts/Rubik-Bold.ttf +0 -0
  125. package/fonts/Rubik-BoldItalic.ttf +0 -0
  126. package/fonts/Rubik-Italic.ttf +0 -0
  127. package/fonts/Rubik-Light.ttf +0 -0
  128. package/fonts/Rubik-LightItalic.ttf +0 -0
  129. package/fonts/Rubik-Medium.ttf +0 -0
  130. package/fonts/Rubik-MediumItalic.ttf +0 -0
  131. package/fonts/Rubik-Regular.ttf +0 -0
  132. package/fonts/fontawesome-webfont.eot +0 -0
  133. package/fonts/fontawesome-webfont.svg +2671 -0
  134. package/fonts/fontawesome-webfont.ttf +0 -0
  135. package/fonts/fontawesome-webfont.woff +0 -0
  136. package/fonts/fontawesome-webfont.woff2 +0 -0
  137. package/images/favicon/android-chrome-192x192.png +0 -0
  138. package/images/favicon/android-chrome-256x256.png +0 -0
  139. package/images/favicon/apple-touch-icon.png +0 -0
  140. package/images/favicon/browserconfig.xml +9 -0
  141. package/images/favicon/favicon-16x16.png +0 -0
  142. package/images/favicon/favicon-32x32.png +0 -0
  143. package/images/favicon/favicon.ico +0 -0
  144. package/images/favicon/manifest.json +18 -0
  145. package/images/favicon/mstile-150x150.png +0 -0
  146. package/images/favicon/safari-pinned-tab.svg +32 -0
  147. package/images/hhs-logo-black.svg +10 -0
  148. package/images/hhs-logo-white.svg +10 -0
  149. package/images/icons/close-x.svg +6 -0
  150. package/images/icons/help-headset.svg +21 -0
  151. package/images/icons/svg/arrow-down.svg +1 -0
  152. package/images/icons/svg/arrow-download.svg +1 -0
  153. package/images/icons/svg/arrow-right.svg +1 -0
  154. package/images/icons/svg/calendar.svg +1 -0
  155. package/images/icons/svg/close.svg +1 -0
  156. package/images/icons/svg/download.svg +1 -0
  157. package/images/icons/svg/external.svg +1 -0
  158. package/images/icons/svg/file-upload.svg +1 -0
  159. package/images/icons/svg/print.svg +1 -0
  160. package/images/icons/svg/search.svg +7 -0
  161. package/images/icons/svg/tooltip-question.svg +6 -0
  162. package/images/icons/svg/trash.svg +1 -0
  163. package/images/icons/svg/upload.svg +1 -0
  164. package/images/qpp_logo_reversed.png +0 -0
  165. package/images/qpp_logo_rgb_color.png +0 -0
  166. package/index.js +31 -0
  167. package/jest/mediaFileTransformer.js +9 -0
  168. package/jest.config.js +188 -0
  169. package/lib/Chevron.jsx +32 -0
  170. package/lib/SvgComponents.jsx +539 -0
  171. package/lib/svg-definitions.svg +125 -0
  172. package/package.json +125 -0
  173. package/session/index.js +5 -0
  174. package/session/logout.js +65 -0
  175. package/session/refresh.js +49 -0
  176. package/session/ttl.js +37 -0
  177. package/styles/_global.scss +106 -0
  178. package/styles/_main.scss +15 -0
  179. package/styles/_paths.scss +1 -0
  180. package/styles/_qpp-style.scss +31 -0
  181. package/styles/components/_accordion.scss +289 -0
  182. package/styles/components/_alerts.scss +54 -0
  183. package/styles/components/_autocomplete.scss +47 -0
  184. package/styles/components/_breadcrumbs.scss +64 -0
  185. package/styles/components/_buttons.scss +580 -0
  186. package/styles/components/_error-page.scss +56 -0
  187. package/styles/components/_flash-notification.scss +98 -0
  188. package/styles/components/_fonts.scss +42 -0
  189. package/styles/components/_forms.scss +277 -0
  190. package/styles/components/_grid.scss +37 -0
  191. package/styles/components/_info-modal.scss +139 -0
  192. package/styles/components/_links.scss +12 -0
  193. package/styles/components/_modals.scss +18 -0
  194. package/styles/components/_notification-banner.scss +165 -0
  195. package/styles/components/_panels.scss +61 -0
  196. package/styles/components/_pie-chart.scss +13 -0
  197. package/styles/components/_score-chart.scss +164 -0
  198. package/styles/components/_spinner.scss +7 -0
  199. package/styles/components/_tables.scss +111 -0
  200. package/styles/components/_tabs.scss +69 -0
  201. package/styles/components/_text.scss +150 -0
  202. package/styles/components/_toggles.scss +3 -0
  203. package/styles/components/_tooltip.scss +23 -0
  204. package/styles/components/_variables.scss +157 -0
  205. package/styles/components/_wells.scss +92 -0
  206. package/styles/qppds/README.md +0 -0
  207. package/styles/qppds/base/_backgrounds.scss +7 -0
  208. package/styles/qppds/base/_fonts.scss +26 -0
  209. package/styles/qppds/base/_icon.scss +23 -0
  210. package/styles/qppds/base/_layout.scss +5 -0
  211. package/styles/qppds/base/_typography.scss +85 -0
  212. package/styles/qppds/base/index.scss +8 -0
  213. package/styles/qppds/components/_alert.scss +95 -0
  214. package/styles/qppds/components/_breadcrumbs.scss +70 -0
  215. package/styles/qppds/components/_button.scss +292 -0
  216. package/styles/qppds/components/_card.scss +175 -0
  217. package/styles/qppds/components/_dropdown.scss +55 -0
  218. package/styles/qppds/components/_footer.scss +597 -0
  219. package/styles/qppds/components/_header.scss +892 -0
  220. package/styles/qppds/components/_link.scss +52 -0
  221. package/styles/qppds/components/_modal.scss +118 -0
  222. package/styles/qppds/components/_page-header.scss +67 -0
  223. package/styles/qppds/components/_pagination.scss +227 -0
  224. package/styles/qppds/components/_search.scss +112 -0
  225. package/styles/qppds/components/_sidebar.scss +9 -0
  226. package/styles/qppds/components/_table.scss +139 -0
  227. package/styles/qppds/components/_tabs.scss +197 -0
  228. package/styles/qppds/components/_text-input.scss +60 -0
  229. package/styles/qppds/components/index.scss +16 -0
  230. package/styles/qppds/components/sidebar/_animations.scss +38 -0
  231. package/styles/qppds/components/sidebar/_cms.scss +61 -0
  232. package/styles/qppds/components/sidebar/_details.scss +58 -0
  233. package/styles/qppds/components/sidebar/_links.scss +444 -0
  234. package/styles/qppds/components/sidebar/_sidebar-animation.scss +125 -0
  235. package/styles/qppds/components/sidebar/_sidebar-tooltip.scss +33 -0
  236. package/styles/qppds/components/sidebar/_sidebar.scss +146 -0
  237. package/styles/qppds/components/sidebar/project-specific/_wi.scss +42 -0
  238. package/styles/qppds/index.scss +4 -0
  239. package/styles/qppds/settings/_functions.scss +4 -0
  240. package/styles/qppds/settings/_index.scss +3 -0
  241. package/styles/qppds/settings/mixins/_borders.scss +6 -0
  242. package/styles/qppds/settings/mixins/_focus.scss +28 -0
  243. package/styles/qppds/settings/mixins/_icons.scss +33 -0
  244. package/styles/qppds/settings/mixins/_index.scss +8 -0
  245. package/styles/qppds/settings/mixins/_layout.scss +74 -0
  246. package/styles/qppds/settings/mixins/_lists.scss +12 -0
  247. package/styles/qppds/settings/mixins/_table.scss +91 -0
  248. package/styles/qppds/settings/mixins/_type.scss +65 -0
  249. package/styles/qppds/settings/mixins/_visually-hidden.scss +30 -0
  250. package/styles/qppds/settings/variables/_color.scss +86 -0
  251. package/styles/qppds/settings/variables/_index.scss +3 -0
  252. package/styles/qppds/settings/variables/_layout.scss +67 -0
  253. package/styles/qppds/settings/variables/_type.scss +132 -0
  254. package/styles/qppds/utilities/_background-color.scss +134 -0
  255. package/styles/qppds/utilities/_color.scss +32 -0
  256. package/styles/qppds/utilities/_display-visibility.scss +83 -0
  257. package/styles/qppds/utilities/_flexbox.scss +240 -0
  258. package/styles/qppds/utilities/_font-family.scss +9 -0
  259. package/styles/qppds/utilities/_font-size.scss +8 -0
  260. package/styles/qppds/utilities/_font-weight.scss +8 -0
  261. package/styles/qppds/utilities/_height.scss +38 -0
  262. package/styles/qppds/utilities/_margin.scss +136 -0
  263. package/styles/qppds/utilities/_padding.scss +76 -0
  264. package/styles/qppds/utilities/_position.scss +24 -0
  265. package/styles/qppds/utilities/_text-align.scss +40 -0
  266. package/styles/qppds/utilities/_text-transform.scss +7 -0
  267. package/styles/qppds/utilities/_truncate.scss +8 -0
  268. package/styles/qppds/utilities/_width.scss +79 -0
  269. package/styles/qppds/utilities/index.scss +15 -0
  270. package/styles/qppds.scss +2 -0
  271. package/styles/third-party/_legacy-bootstrap.scss +19 -0
  272. package/styles/third-party/legacy-bootstrap/_buttons.scss +126 -0
  273. package/styles/third-party/legacy-bootstrap/_dropdowns.scss +211 -0
  274. package/styles/third-party/legacy-bootstrap/_forms.scss +510 -0
  275. package/styles/third-party/legacy-bootstrap/_grid.scss +73 -0
  276. package/styles/third-party/legacy-bootstrap/_mixins.scss +27 -0
  277. package/styles/third-party/legacy-bootstrap/_navbar.scss +644 -0
  278. package/styles/third-party/legacy-bootstrap/_navs.scss +193 -0
  279. package/styles/third-party/legacy-bootstrap/_normalize.scss +385 -0
  280. package/styles/third-party/legacy-bootstrap/_scaffolding.scss +116 -0
  281. package/styles/third-party/legacy-bootstrap/_variables.scss +858 -0
  282. package/styles/third-party/legacy-bootstrap/mixins/_buttons.scss +70 -0
  283. package/styles/third-party/legacy-bootstrap/mixins/_clearfix.scss +22 -0
  284. package/styles/third-party/legacy-bootstrap/mixins/_forms.scss +108 -0
  285. package/styles/third-party/legacy-bootstrap/mixins/_grid-framework.scss +86 -0
  286. package/styles/third-party/legacy-bootstrap/mixins/_grid.scss +112 -0
  287. package/styles/third-party/legacy-bootstrap/mixins/_labels.scss +12 -0
  288. package/styles/third-party/legacy-bootstrap/mixins/_nav-divider.scss +10 -0
  289. package/styles/third-party/legacy-bootstrap/mixins/_nav-vertical-align.scss +9 -0
  290. package/styles/third-party/legacy-bootstrap/mixins/_opacity.scss +7 -0
  291. package/styles/third-party/legacy-bootstrap/mixins/_panels.scss +30 -0
  292. package/styles/third-party/legacy-bootstrap/mixins/_reset-filter.scss +7 -0
  293. package/styles/third-party/legacy-bootstrap/mixins/_reset-text.scss +18 -0
  294. package/styles/third-party/legacy-bootstrap/mixins/_resize.scss +6 -0
  295. package/styles/third-party/legacy-bootstrap/mixins/_responsive-visibility.scss +25 -0
  296. package/styles/third-party/legacy-bootstrap/mixins/_size.scss +10 -0
  297. package/styles/third-party/legacy-bootstrap/mixins/_tab-focus.scss +9 -0
  298. package/styles/third-party/legacy-bootstrap/mixins/_table-row.scss +28 -0
  299. package/styles/third-party/legacy-bootstrap/mixins/_text-emphasis.scss +12 -0
  300. package/styles/third-party/legacy-bootstrap/mixins/_text-overflow.scss +8 -0
  301. package/styles/third-party/legacy-bootstrap/mixins/_vendor-prefixes.scss +182 -0
  302. package/styles/utility/_mixins.scss +46 -0
  303. package/styles/utility/_utilities.scss +73 -0
  304. package/test/components/Accordion.test.js +12 -0
  305. package/test/components/ErrorUI.test.js +33 -0
  306. package/test/components/FooterUI.test.js +90 -0
  307. package/test/components/HeaderUI.test.js +45 -0
  308. package/test/components/Infotip.test.js +73 -0
  309. package/test/components/SessionDialogUI.test.js +339 -0
  310. package/test/components/SideNavUI.test.js +23 -0
  311. package/test/components/Tooltip.test.js +147 -0
  312. package/test/index.test.js +8 -0
  313. package/test/session/session.test.js +221 -0
  314. package/test-setup.js +9 -0
  315. package/webpack.config.js +147 -0
  316. package/webpack.config.react.js +86 -0
@@ -0,0 +1,211 @@
1
+ //
2
+ // Dropdown menus
3
+ // --------------------------------------------------
4
+
5
+ // Dropdown arrow/caret
6
+ .caret {
7
+ display: inline-block;
8
+ width: 0;
9
+ height: 0;
10
+ margin-left: 2px;
11
+ vertical-align: middle;
12
+ border-top: $caret-width-base dashed;
13
+ border-top: $caret-width-base solid \9; // IE8
14
+ border-right: $caret-width-base solid transparent;
15
+ border-left: $caret-width-base solid transparent;
16
+ }
17
+
18
+ // The dropdown wrapper (div)
19
+ .dropup,
20
+ .dropdown {
21
+ position: relative;
22
+ }
23
+
24
+ // Prevent the focus on the dropdown toggle when closing dropdowns
25
+ .dropdown-toggle:focus {
26
+ outline: 0;
27
+ }
28
+
29
+ // The dropdown menu (ul)
30
+ .dropdown-menu {
31
+ position: absolute;
32
+ top: 100%;
33
+ left: 0;
34
+ z-index: $zindex-dropdown;
35
+ display: none; // none by default, but block on "open" of the menu
36
+ float: left;
37
+ min-width: 160px;
38
+ padding: 5px 0;
39
+ margin: 2px 0 0; // override default ul
40
+ font-size: $font-size-base;
41
+ text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)
42
+ list-style: none;
43
+ background-color: $dropdown-bg;
44
+ background-clip: padding-box;
45
+ border: 1px solid $dropdown-fallback-border; // IE8 fallback
46
+ border: 1px solid $dropdown-border;
47
+ border-radius: $border-radius-base;
48
+ @include box-shadow(0 6px 12px rgba(0, 0, 0, 0.175));
49
+
50
+ // Aligns the dropdown menu to right
51
+ //
52
+ // Deprecated as of 3.1.0 in favor of `.dropdown-menu-[dir]`
53
+ &.pull-right {
54
+ right: 0;
55
+ left: auto;
56
+ }
57
+
58
+ // Dividers (basically an hr) within the dropdown
59
+ .divider {
60
+ @include nav-divider($dropdown-divider-bg);
61
+ }
62
+
63
+ // Links within the dropdown menu
64
+ > li > a {
65
+ display: block;
66
+ padding: 3px 20px;
67
+ clear: both;
68
+ font-weight: 400;
69
+ line-height: $line-height-base;
70
+ color: $dropdown-link-color;
71
+ white-space: nowrap; // prevent links from randomly breaking onto new lines
72
+
73
+ &:hover,
74
+ &:focus {
75
+ color: $dropdown-link-hover-color;
76
+ text-decoration: none;
77
+ background-color: $dropdown-link-hover-bg;
78
+ }
79
+ }
80
+ }
81
+
82
+ // Active state
83
+ .dropdown-menu > .active > a {
84
+ &,
85
+ &:hover,
86
+ &:focus {
87
+ color: $dropdown-link-active-color;
88
+ text-decoration: none;
89
+ background-color: $dropdown-link-active-bg;
90
+ outline: 0;
91
+ }
92
+ }
93
+
94
+ // Disabled state
95
+ //
96
+ // Gray out text and ensure the hover/focus state remains gray
97
+ .dropdown-menu > .disabled > a {
98
+ &,
99
+ &:hover,
100
+ &:focus {
101
+ color: $dropdown-link-disabled-color;
102
+ }
103
+
104
+ // Nuke hover/focus effects
105
+ &:hover,
106
+ &:focus {
107
+ text-decoration: none;
108
+ cursor: $cursor-disabled;
109
+ background-color: transparent;
110
+ background-image: none; // Remove CSS gradient
111
+ @include reset-filter;
112
+ }
113
+ }
114
+
115
+ // Open state for the dropdown
116
+ .open {
117
+ // Show the menu
118
+ > .dropdown-menu {
119
+ display: block;
120
+ }
121
+
122
+ // Remove the outline when :focus is triggered
123
+ > a {
124
+ outline: 0;
125
+ }
126
+ }
127
+
128
+ // Menu positioning
129
+ //
130
+ // Add extra class to `.dropdown-menu` to flip the alignment of the dropdown
131
+ // menu with the parent.
132
+ .dropdown-menu-right {
133
+ right: 0;
134
+ left: auto; // Reset the default from `.dropdown-menu`
135
+ }
136
+ // With v3, we enabled auto-flipping if you have a dropdown within a right
137
+ // aligned nav component. To enable the undoing of that, we provide an override
138
+ // to restore the default dropdown menu alignment.
139
+ //
140
+ // This is only for left-aligning a dropdown menu within a `.navbar-right` or
141
+ // `.pull-right` nav component.
142
+ .dropdown-menu-left {
143
+ right: auto;
144
+ left: 0;
145
+ }
146
+
147
+ // Dropdown section headers
148
+ .dropdown-header {
149
+ display: block;
150
+ padding: 3px 20px;
151
+ font-size: $font-size-small;
152
+ line-height: $line-height-base;
153
+ color: $dropdown-header-color;
154
+ }
155
+
156
+ // Backdrop to catch body clicks on mobile, etc.
157
+ .dropdown-backdrop {
158
+ position: fixed;
159
+ top: 0;
160
+ right: 0;
161
+ bottom: 0;
162
+ left: 0;
163
+ z-index: ($zindex-dropdown - 10);
164
+ }
165
+
166
+ // Right aligned dropdowns
167
+ .pull-right > .dropdown-menu {
168
+ right: 0;
169
+ left: auto;
170
+ }
171
+
172
+ // Allow for dropdowns to go bottom up (aka, dropup-menu)
173
+ //
174
+ // Just add .dropup after the standard .dropdown class and you're set, bro.
175
+ // TODO: abstract this so that the navbar fixed styles are not placed here?
176
+ .dropup,
177
+ .navbar-fixed-bottom .dropdown {
178
+ // Reverse the caret
179
+ .caret {
180
+ content: '';
181
+ border-top: 0;
182
+ border-bottom: $caret-width-base dashed;
183
+ border-bottom: $caret-width-base solid \9; // IE8
184
+ }
185
+
186
+ // Different positioning for bottom up menu
187
+ .dropdown-menu {
188
+ top: auto;
189
+ bottom: 100%;
190
+ margin-bottom: 2px;
191
+ }
192
+ }
193
+
194
+ // Component alignment
195
+ //
196
+ // Reiterate per navbar.less and the modified component alignment there.
197
+ @media (min-width: $grid-float-breakpoint) {
198
+ .navbar-right {
199
+ .dropdown-menu {
200
+ right: 0;
201
+ left: auto;
202
+ }
203
+
204
+ // Necessary for overrides of the default right aligned menu.
205
+ // Will remove come v4 in all likelihood.
206
+ .dropdown-menu-left {
207
+ left: 0;
208
+ right: auto;
209
+ }
210
+ }
211
+ }
@@ -0,0 +1,510 @@
1
+ //
2
+ // Forms
3
+ // --------------------------------------------------
4
+
5
+ // Normalize non-controls
6
+ //
7
+ // Restyle and baseline non-control form elements.
8
+ fieldset {
9
+ // Chrome and Firefox set a `min-width: min-content;` on fieldsets,
10
+ // so we reset that to ensure it behaves more like a standard block element.
11
+ // See https://github.com/twbs/bootstrap/issues/12359.
12
+ min-width: 0;
13
+ padding: 0;
14
+ margin: 0;
15
+ border: 0;
16
+ }
17
+
18
+ legend {
19
+ display: block;
20
+ width: 100%;
21
+ padding: 0;
22
+ margin-bottom: $line-height-computed;
23
+ font-size: ($font-size-base * 1.5);
24
+ line-height: inherit;
25
+ color: $legend-color;
26
+ border: 0;
27
+ border-bottom: 1px solid $legend-border-color;
28
+ }
29
+
30
+ label {
31
+ display: inline-block;
32
+ max-width: 100%; // Force IE8 to wrap long content (see https://github.com/twbs/bootstrap/issues/13141)
33
+ margin-bottom: 5px;
34
+ font-weight: 700;
35
+ }
36
+
37
+ // Normalize form controls
38
+ //
39
+ // While most of our form styles require extra classes, some basic normalization
40
+ // is required to ensure optimum display with or without those classes to better
41
+ // address browser inconsistencies.
42
+ input[type='search'] {
43
+ // Override content-box in Normalize (* isn't specific enough)
44
+ @include box-sizing(border-box);
45
+
46
+ // Search inputs in iOS
47
+ //
48
+ // This overrides the extra rounded corners on search inputs in iOS so that our
49
+ // `.form-control` class can properly style them. Note that this cannot simply
50
+ // be added to `.form-control` as it's not specific enough. For details, see
51
+ // https://github.com/twbs/bootstrap/issues/11586.
52
+ -webkit-appearance: none;
53
+ appearance: none;
54
+ }
55
+
56
+ // Position radios and checkboxes better
57
+ input[type='radio'],
58
+ input[type='checkbox'] {
59
+ margin: 4px 0 0;
60
+ margin-top: 1px \9; // IE8-9
61
+ line-height: normal;
62
+
63
+ // Apply same disabled cursor tweak as for inputs
64
+ // Some special care is needed because <label>s don't inherit their parent's `cursor`.
65
+ //
66
+ // Note: Neither radios nor checkboxes can be readonly.
67
+ &[disabled],
68
+ &.disabled,
69
+ fieldset[disabled] & {
70
+ cursor: $cursor-disabled;
71
+ }
72
+ }
73
+
74
+ input[type='file'] {
75
+ display: block;
76
+ }
77
+
78
+ // Make range inputs behave like textual form controls
79
+ input[type='range'] {
80
+ display: block;
81
+ width: 100%;
82
+ }
83
+
84
+ // Make multiple select elements height not fixed
85
+ select[multiple],
86
+ select[size] {
87
+ height: auto;
88
+ }
89
+
90
+ // Focus for file, radio, and checkbox
91
+ input[type='file']:focus,
92
+ input[type='radio']:focus,
93
+ input[type='checkbox']:focus {
94
+ @include tab-focus;
95
+ }
96
+
97
+ // Adjust output element
98
+ output {
99
+ display: block;
100
+ padding-top: ($padding-base-vertical + 1);
101
+ font-size: $font-size-base;
102
+ line-height: $line-height-base;
103
+ color: $input-color;
104
+ }
105
+
106
+ // Common form controls
107
+ //
108
+ // Shared size and type resets for form controls. Apply `.form-control` to any
109
+ // of the following form controls:
110
+ //
111
+ // select
112
+ // textarea
113
+ // input[type="text"]
114
+ // input[type="password"]
115
+ // input[type="datetime"]
116
+ // input[type="datetime-local"]
117
+ // input[type="date"]
118
+ // input[type="month"]
119
+ // input[type="time"]
120
+ // input[type="week"]
121
+ // input[type="number"]
122
+ // input[type="email"]
123
+ // input[type="url"]
124
+ // input[type="search"]
125
+ // input[type="tel"]
126
+ // input[type="color"]
127
+ .form-control {
128
+ display: block;
129
+ width: 100%;
130
+ height: $input-height-base; // Make inputs at least the height of their button counterpart (base line-height + padding + border)
131
+ padding: $padding-base-vertical $padding-base-horizontal;
132
+ font-size: $font-size-base;
133
+ line-height: $line-height-base;
134
+ color: $input-color;
135
+ background-color: $input-bg;
136
+ background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
137
+ border: 1px solid $input-border;
138
+ border-radius: $input-border-radius; // Note: This has no effect on <select>s in some browsers, due to the limited stylability of <select>s in CSS.
139
+ @include box-shadow(inset 0 1px 1px rgba(0, 0, 0, 0.075));
140
+ @include transition(
141
+ border-color ease-in-out 0.15s,
142
+ box-shadow ease-in-out 0.15s
143
+ );
144
+
145
+ // Customize the `:focus` state to imitate native WebKit styles.
146
+ @include form-control-focus;
147
+
148
+ // Placeholder
149
+ @include placeholder;
150
+
151
+ // Unstyle the caret on `<select>`s in IE10+.
152
+ &::-ms-expand {
153
+ background-color: transparent;
154
+ border: 0;
155
+ }
156
+
157
+ // Disabled and read-only inputs
158
+ //
159
+ // HTML5 says that controls under a fieldset > legend:first-child won't be
160
+ // disabled if the fieldset is disabled. Due to implementation difficulty, we
161
+ // don't honor that edge case; we style them as disabled anyway.
162
+ &[disabled],
163
+ &[readonly],
164
+ fieldset[disabled] & {
165
+ background-color: $input-bg-disabled;
166
+ opacity: 1; // iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655
167
+ }
168
+
169
+ &[disabled],
170
+ fieldset[disabled] & {
171
+ cursor: $cursor-disabled;
172
+ }
173
+
174
+ // [converter] extracted textarea& to textarea.form-control
175
+ }
176
+
177
+ // Reset height for `textarea`s
178
+ textarea.form-control {
179
+ height: auto;
180
+ }
181
+
182
+ // Special styles for iOS temporal inputs
183
+ //
184
+ // In Mobile Safari, setting `display: block` on temporal inputs causes the
185
+ // text within the input to become vertically misaligned. As a workaround, we
186
+ // set a pixel line-height that matches the given height of the input, but only
187
+ // for Safari. See https://bugs.webkit.org/show_bug.cgi?id=139848
188
+ //
189
+ // Note that as of 9.3, iOS doesn't support `week`.
190
+ @media screen and (-webkit-min-device-pixel-ratio: 0) {
191
+ input[type='date'],
192
+ input[type='time'],
193
+ input[type='datetime-local'],
194
+ input[type='month'] {
195
+ &.form-control {
196
+ line-height: $input-height-base;
197
+ }
198
+ }
199
+ }
200
+
201
+ // Form groups
202
+ //
203
+ // Designed to help with the organization and spacing of vertical forms. For
204
+ // horizontal forms, use the predefined grid classes.
205
+ .form-group {
206
+ margin-bottom: $form-group-margin-bottom;
207
+ }
208
+
209
+ // Checkboxes and radios
210
+ //
211
+ // Indent the labels to position radios/checkboxes as hanging controls.
212
+ .radio,
213
+ .checkbox {
214
+ position: relative;
215
+ display: block;
216
+ margin-top: 10px;
217
+ margin-bottom: 10px;
218
+
219
+ // These are used on elements with <label> descendants
220
+ &.disabled,
221
+ fieldset[disabled] & {
222
+ label {
223
+ cursor: $cursor-disabled;
224
+ }
225
+ }
226
+
227
+ label {
228
+ min-height: $line-height-computed; // Ensure the input doesn't jump when there is no text
229
+ padding-left: 20px;
230
+ margin-bottom: 0;
231
+ font-weight: 400;
232
+ cursor: pointer;
233
+ }
234
+ }
235
+
236
+ .radio input[type='radio'],
237
+ .radio-inline input[type='radio'],
238
+ .checkbox input[type='checkbox'],
239
+ .checkbox-inline input[type='checkbox'] {
240
+ position: absolute;
241
+ margin-top: 4px \9;
242
+ margin-left: -20px;
243
+ }
244
+
245
+ .radio + .radio,
246
+ .checkbox + .checkbox {
247
+ margin-top: -5px; // Move up sibling radios or checkboxes for tighter spacing
248
+ }
249
+
250
+ // Radios and checkboxes on same line
251
+ .radio-inline,
252
+ .checkbox-inline {
253
+ position: relative;
254
+ display: inline-block;
255
+ padding-left: 20px;
256
+ margin-bottom: 0;
257
+ font-weight: 400;
258
+ vertical-align: middle;
259
+ cursor: pointer;
260
+
261
+ // These are used directly on <label>s
262
+ &.disabled,
263
+ fieldset[disabled] & {
264
+ cursor: $cursor-disabled;
265
+ }
266
+ }
267
+
268
+ .radio-inline + .radio-inline,
269
+ .checkbox-inline + .checkbox-inline {
270
+ margin-top: 0;
271
+ margin-left: 10px; // space out consecutive inline controls
272
+ }
273
+
274
+ // Static form control text
275
+ //
276
+ // Apply class to a `p` element to make any string of text align with labels in
277
+ // a horizontal form layout.
278
+ .form-control-static {
279
+ min-height: ($line-height-computed + $font-size-base);
280
+ // Size it appropriately next to real form controls
281
+ padding-top: ($padding-base-vertical + 1);
282
+ padding-bottom: ($padding-base-vertical + 1);
283
+ // Remove default margin from `p`
284
+ margin-bottom: 0;
285
+
286
+ &.input-lg,
287
+ &.input-sm {
288
+ padding-right: 0;
289
+ padding-left: 0;
290
+ }
291
+ }
292
+
293
+ // Form control sizing
294
+ //
295
+ // Build on `.form-control` with modifier classes to decrease or increase the
296
+ // height and font-size of form controls.
297
+ //
298
+ // The `.form-group-* form-control` variations are sadly duplicated to avoid the
299
+ // issue documented in https://github.com/twbs/bootstrap/issues/15074.
300
+ @include input-size(
301
+ '.input-sm',
302
+ $input-height-small,
303
+ $padding-small-vert,
304
+ $padding-small-horizontal,
305
+ $font-size-small,
306
+ $line-height-small,
307
+ $input-border-radius-small
308
+ );
309
+
310
+ .form-group-sm {
311
+ .form-control {
312
+ height: $input-height-small;
313
+ padding: $padding-small-vert $padding-small-horizontal;
314
+ font-size: $font-size-small;
315
+ line-height: $line-height-small;
316
+ border-radius: $input-border-radius-small;
317
+ }
318
+
319
+ select.form-control {
320
+ height: $input-height-small;
321
+ line-height: $input-height-small;
322
+ }
323
+
324
+ textarea.form-control,
325
+ select[multiple].form-control {
326
+ height: auto;
327
+ }
328
+
329
+ .form-control-static {
330
+ height: $input-height-small;
331
+ min-height: ($line-height-computed + $font-size-small);
332
+ padding: ($padding-small-vert + 1) $padding-small-horizontal;
333
+ font-size: $font-size-small;
334
+ line-height: $line-height-small;
335
+ }
336
+ }
337
+
338
+ @include input-size(
339
+ '.input-lg',
340
+ $input-height-large,
341
+ $padding-large-vert,
342
+ $padding-large-horizontal,
343
+ $font-size-large,
344
+ $line-height-large,
345
+ $input-border-radius-large
346
+ );
347
+
348
+ .form-group-lg {
349
+ .form-control {
350
+ height: $input-height-large;
351
+ padding: $padding-large-vert $padding-large-horizontal;
352
+ font-size: $font-size-large;
353
+ line-height: $line-height-large;
354
+ border-radius: $input-border-radius-large;
355
+ }
356
+
357
+ select.form-control {
358
+ height: $input-height-large;
359
+ line-height: $input-height-large;
360
+ }
361
+
362
+ textarea.form-control,
363
+ select[multiple].form-control {
364
+ height: auto;
365
+ }
366
+
367
+ .form-control-static {
368
+ height: $input-height-large;
369
+ min-height: ($line-height-computed + $font-size-large);
370
+ padding: ($padding-large-vert + 1) $padding-large-horizontal;
371
+ font-size: $font-size-large;
372
+ line-height: $line-height-large;
373
+ }
374
+ }
375
+ // Form control feedback states
376
+ //
377
+ // Apply contextual and semantic states to individual form controls.
378
+ .has-feedback {
379
+ // Enable absolute positioning
380
+ position: relative;
381
+
382
+ // Ensure icons don't overlap text
383
+ .form-control {
384
+ padding-right: ($input-height-base * 1.25);
385
+ }
386
+ }
387
+ // Feedback icon (requires .glyphicon classes)
388
+ .form-control-feedback {
389
+ position: absolute;
390
+ top: 0;
391
+ right: 0;
392
+ z-index: 2; // Ensure icon is above input groups
393
+ display: block;
394
+ width: $input-height-base;
395
+ height: $input-height-base;
396
+ line-height: $input-height-base;
397
+ text-align: center;
398
+ pointer-events: none;
399
+ }
400
+
401
+ .input-lg + .form-control-feedback,
402
+ .input-group-lg + .form-control-feedback,
403
+ .form-group-lg .form-control + .form-control-feedback {
404
+ width: $input-height-large;
405
+ height: $input-height-large;
406
+ line-height: $input-height-large;
407
+ }
408
+
409
+ .input-sm + .form-control-feedback,
410
+ .input-group-sm + .form-control-feedback,
411
+ .form-group-sm .form-control + .form-control-feedback {
412
+ width: $input-height-small;
413
+ height: $input-height-small;
414
+ line-height: $input-height-small;
415
+ }
416
+
417
+ // Feedback states
418
+ .has-success {
419
+ @include form-control-validation(
420
+ $state-success-text,
421
+ $state-success-text,
422
+ $state-success-bg
423
+ );
424
+ }
425
+
426
+ .has-warning {
427
+ @include form-control-validation(
428
+ $state-warning-text,
429
+ $state-warning-text,
430
+ $state-warning-bg
431
+ );
432
+ }
433
+
434
+ .has-error {
435
+ @include form-control-validation(
436
+ $state-danger-text,
437
+ $state-danger-text,
438
+ $state-danger-bg
439
+ );
440
+ }
441
+
442
+ // Reposition feedback icon if input has visible label above
443
+ .has-feedback label {
444
+ & ~ .form-control-feedback {
445
+ top: ($line-height-computed + 5); // Height of the `label` and its margin
446
+ }
447
+
448
+ &.sr-only ~ .form-control-feedback {
449
+ top: 0;
450
+ }
451
+ }
452
+
453
+ // Help text
454
+ //
455
+ // Apply to any element you wish to create light text for placement immediately
456
+ // below a form control. Use for general help, formatting, or instructional text.
457
+ .help-block {
458
+ display: block; // account for any element using help-block
459
+ margin-top: 5px;
460
+ margin-bottom: 10px;
461
+ color: lighten($text-color, 25%); // lighten the text some for contrast
462
+ }
463
+
464
+ // Horizontal forms
465
+ //
466
+ // Horizontal forms are built on grid classes and allow you to create forms with
467
+ // labels on the left and inputs on the right.
468
+ .form-horizontal {
469
+ // Consistent vertical alignment of radios and checkboxes
470
+ //
471
+ // Labels also get some reset styles, but that is scoped to a media query below.
472
+ .radio,
473
+ .checkbox,
474
+ .radio-inline,
475
+ .checkbox-inline {
476
+ padding-top: ($padding-base-vertical + 1); // Default padding plus a border
477
+ margin-top: 0;
478
+ margin-bottom: 0;
479
+ }
480
+ // Account for padding we're adding to ensure the alignment and of help text
481
+ // and other content below items
482
+ .radio,
483
+ .checkbox {
484
+ min-height: ($line-height-computed + ($padding-base-vertical + 1));
485
+ }
486
+
487
+ // Make form groups behave like rows
488
+ .form-group {
489
+ @include make-row;
490
+ }
491
+
492
+ // Reset spacing and right align labels, but scope to media queries so that
493
+ // labels on narrow viewports stack the same as a default form example.
494
+ @media (min-width: $screen-sm-min) {
495
+ .control-label {
496
+ padding-top: ($padding-base-vertical + 1);
497
+ // Default padding plus a border
498
+ margin-bottom: 0;
499
+ text-align: right;
500
+ }
501
+ }
502
+
503
+ // Validation states
504
+ //
505
+ // Reposition the icon because it's now within a grid column and columns have
506
+ // `position: relative;` on them. Also accounts for the grid gutter padding.
507
+ .has-feedback .form-control-feedback {
508
+ right: floor(($grid-gutter-width / 2));
509
+ }
510
+ }