generator-white-label 3.0.0 → 5.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 (334) hide show
  1. package/README.md +140 -81
  2. package/app/404.hbs +20 -0
  3. package/app/README.md +19 -0
  4. package/app/assets/data/view/toolkit/colors.json +17 -0
  5. package/app/assets/data/view/toolkit/components.json +39 -0
  6. package/app/assets/data/view/toolkit/elements.json +119 -0
  7. package/app/assets/data/view/toolkit/grids.json +17 -0
  8. package/app/assets/data/view/toolkit/icons.json +17 -0
  9. package/app/assets/data/view/toolkit/index.json +17 -0
  10. package/app/assets/data/view/toolkit/type.json +17 -0
  11. package/app/assets/font/opensans/stylesheet.css +20 -60
  12. package/app/assets/image/demo/fallback.avif +0 -0
  13. package/app/assets/image/demo/fallback.jpg +0 -0
  14. package/app/assets/image/demo/fallback.webp +0 -0
  15. package/app/assets/image/demo/large.avif +0 -0
  16. package/app/assets/image/demo/large.webp +0 -0
  17. package/app/assets/image/demo/small.avif +0 -0
  18. package/app/assets/image/demo/small.webp +0 -0
  19. package/app/assets/markup/element/a.hbs +29 -0
  20. package/app/assets/markup/element/button.hbs +30 -0
  21. package/app/assets/markup/element/div.hbs +11 -0
  22. package/app/assets/markup/element/head.hbs +78 -0
  23. package/app/assets/markup/element/iframe.hbs +20 -0
  24. package/app/assets/markup/element/img.hbs +30 -0
  25. package/app/assets/markup/element/input.hbs +43 -0
  26. package/app/assets/markup/element/label.hbs +14 -0
  27. package/app/assets/markup/element/legend.hbs +5 -0
  28. package/app/assets/markup/element/meta.hbs +11 -0
  29. package/app/assets/markup/element/nav.hbs +13 -0
  30. package/app/assets/markup/element/p.hbs +8 -0
  31. package/app/assets/markup/element/picture.hbs +58 -0
  32. package/app/assets/markup/element/script.hbs +3 -0
  33. package/app/assets/markup/element/select.hbs +35 -0
  34. package/app/assets/markup/element/span.hbs +8 -0
  35. package/app/assets/markup/element/svg.hbs +11 -0
  36. package/app/assets/markup/element/table.hbs +50 -0
  37. package/app/assets/markup/element/textarea.hbs +24 -0
  38. package/app/assets/markup/element/ul.hbs +13 -0
  39. package/app/assets/markup/modal/modal-example-1.handlebars +8 -0
  40. package/app/assets/markup/toolkit/accessibility-skip-to-element-1.handlebars +1 -0
  41. package/app/assets/markup/toolkit/accessibility-speaker-1.handlebars +1 -0
  42. package/app/assets/markup/toolkit/anchor-1.handlebars +1 -0
  43. package/app/assets/markup/toolkit/button-1.handlebars +1 -0
  44. package/app/assets/markup/toolkit/footer-1.handlebars +3 -0
  45. package/app/assets/markup/toolkit/header-1.handlebars +1 -0
  46. package/app/assets/markup/toolkit/heading-1.handlebars +1 -0
  47. package/app/assets/markup/toolkit/heading-2.handlebars +1 -0
  48. package/app/assets/markup/toolkit/heading-3.handlebars +1 -0
  49. package/app/assets/markup/toolkit/heading-4.handlebars +1 -0
  50. package/app/assets/markup/toolkit/image-1.handlebars +1 -0
  51. package/app/assets/markup/toolkit/input-checkbox-1.handlebars +1 -0
  52. package/app/assets/markup/toolkit/input-error-1.handlebars +8 -0
  53. package/app/assets/markup/toolkit/input-radio-1.handlebars +1 -0
  54. package/app/assets/markup/toolkit/input-text-1.handlebars +1 -0
  55. package/app/assets/markup/toolkit/label-1.handlebars +1 -0
  56. package/app/assets/markup/toolkit/legend-1.handlebars +1 -0
  57. package/app/assets/markup/toolkit/list-1.handlebars +1 -0
  58. package/app/assets/markup/toolkit/modal-1.handlebars +4 -0
  59. package/app/assets/markup/toolkit/nav-1.handlebars +1 -0
  60. package/app/assets/markup/toolkit/picture-1.handlebars +1 -0
  61. package/app/assets/markup/toolkit/select-1.handlebars +1 -0
  62. package/app/assets/markup/toolkit/table-1.handlebars +1 -0
  63. package/app/assets/markup/toolkit/text-1.handlebars +1 -0
  64. package/app/assets/markup/toolkit/textarea-1.handlebars +1 -0
  65. package/app/assets/markup/toolkit/youtube-player-1.handlebars +1 -0
  66. package/app/assets/script/api/facebook.ts +41 -0
  67. package/app/assets/script/api/youtube.ts +22 -0
  68. package/app/assets/script/index.ts +2 -0
  69. package/app/assets/script/mediator/global.ts +4 -0
  70. package/app/assets/script/model/singletons/countries.ts +5 -0
  71. package/app/assets/script/model/singletons/global.ts +5 -0
  72. package/app/assets/script/model/singletons/states.ts +5 -0
  73. package/app/assets/script/model/user.ts +4 -0
  74. package/app/assets/script/toolkit.ts +11 -0
  75. package/app/assets/script/types.d.ts +16 -0
  76. package/app/assets/script/utility/ajax.ts +15 -0
  77. package/app/assets/script/utility/form.ts +119 -0
  78. package/app/assets/script/utility/{regex.js → regex.ts} +15 -6
  79. package/app/assets/script/utility/share.ts +77 -0
  80. package/app/assets/script/utility/string.ts +148 -0
  81. package/app/assets/script/view/default.tsx +14 -0
  82. package/app/assets/script/view/toolkit/youtube-player-1.ts +31 -0
  83. package/app/assets/style/base/_toolkit.scss +31 -15
  84. package/app/assets/style/base/components/_modal-1.scss +80 -0
  85. package/app/assets/style/base/components/_sticky-1.scss +19 -0
  86. package/app/assets/style/base/components/_tabpanel-1.scss +115 -0
  87. package/app/assets/style/base/components/_tabpanel-2.scss +64 -0
  88. package/app/assets/style/base/components/_tabpanel-base-1.scss +13 -0
  89. package/app/assets/style/base/components/_youtube-player-1.scss +16 -0
  90. package/app/assets/style/base/elements/_anchors.scss +12 -0
  91. package/app/assets/style/base/elements/_buttons.scss +15 -0
  92. package/app/assets/style/base/elements/_fieldsets.scss +9 -0
  93. package/app/assets/style/base/elements/_images.scss +6 -2
  94. package/app/assets/style/base/elements/_inputs.scss +70 -0
  95. package/app/assets/style/base/elements/_labels.scss +8 -0
  96. package/app/assets/style/base/elements/_landmarks.scss +3 -0
  97. package/app/assets/style/base/elements/_legends.scss +11 -0
  98. package/app/assets/style/base/elements/_lists.scss +8 -1
  99. package/app/assets/style/base/elements/_tables.scss +32 -1
  100. package/app/assets/style/base/layouts/_staggered-1.scss +29 -0
  101. package/app/assets/style/base/type/_fonts.scss +39 -1
  102. package/app/assets/style/base/type/_headings.scss +29 -0
  103. package/app/assets/style/base/type/_text.scss +2 -0
  104. package/app/assets/style/base/utilities/_accessibility.scss +5 -2
  105. package/app/assets/style/base/utilities/_functions.scss +62 -9
  106. package/app/assets/style/global.scss +108 -10
  107. package/app/assets/style/print.scss +2 -3
  108. package/app/assets/style/toolkit.scss +387 -0
  109. package/app/index.hbs +21 -0
  110. package/app/package.json +1 -0
  111. package/app/toolkit/colors.hbs +102 -0
  112. package/app/toolkit/components.hbs +261 -0
  113. package/app/toolkit/elements.hbs +497 -0
  114. package/app/toolkit/grids.hbs +413 -0
  115. package/app/toolkit/icons.hbs +87 -0
  116. package/app/toolkit/index.hbs +144 -0
  117. package/app/toolkit/type.hbs +120 -0
  118. package/dist/app/assets/data/coutries.json +992 -0
  119. package/dist/app/assets/data/states.json +204 -0
  120. package/dist/app/assets/script/api/facebook.d.ts +8 -0
  121. package/dist/app/assets/script/api/facebook.js +42 -0
  122. package/dist/app/assets/script/api/facebook.js.map +1 -0
  123. package/dist/app/assets/script/api/youtube.d.ts +8 -0
  124. package/dist/app/assets/script/api/youtube.js +22 -0
  125. package/dist/app/assets/script/api/youtube.js.map +1 -0
  126. package/dist/app/assets/script/index.d.ts +2 -0
  127. package/dist/app/assets/script/index.js +2 -0
  128. package/dist/app/assets/script/index.js.map +1 -0
  129. package/dist/app/assets/script/mediator/global.d.ts +4 -0
  130. package/dist/app/assets/script/mediator/global.js +4 -0
  131. package/dist/app/assets/script/mediator/global.js.map +1 -0
  132. package/dist/app/assets/script/model/singletons/countries.d.ts +20 -0
  133. package/dist/app/assets/script/model/singletons/countries.js +5 -0
  134. package/dist/app/assets/script/model/singletons/countries.js.map +1 -0
  135. package/dist/app/assets/script/model/singletons/global.d.ts +20 -0
  136. package/dist/app/assets/script/model/singletons/global.js +5 -0
  137. package/dist/app/assets/script/model/singletons/global.js.map +1 -0
  138. package/dist/app/assets/script/model/singletons/states.d.ts +20 -0
  139. package/dist/app/assets/script/model/singletons/states.js +5 -0
  140. package/dist/app/assets/script/model/singletons/states.js.map +1 -0
  141. package/dist/app/assets/script/model/user.d.ts +4 -0
  142. package/dist/app/assets/script/model/user.js +6 -0
  143. package/dist/app/assets/script/model/user.js.map +1 -0
  144. package/dist/app/assets/script/toolkit.d.ts +1 -0
  145. package/dist/app/assets/script/toolkit.js +7 -0
  146. package/dist/app/assets/script/toolkit.js.map +1 -0
  147. package/dist/app/assets/script/utility/ajax.d.ts +8 -0
  148. package/dist/app/assets/script/utility/ajax.js +17 -0
  149. package/dist/app/assets/script/utility/ajax.js.map +1 -0
  150. package/dist/app/assets/script/utility/form.d.ts +64 -0
  151. package/dist/app/assets/script/utility/form.js +111 -0
  152. package/dist/app/assets/script/utility/form.js.map +1 -0
  153. package/dist/app/assets/script/utility/regex.d.ts +14 -0
  154. package/dist/app/assets/script/utility/regex.js +27 -0
  155. package/dist/app/assets/script/utility/regex.js.map +1 -0
  156. package/dist/app/assets/script/utility/share.d.ts +68 -0
  157. package/dist/app/assets/script/utility/share.js +81 -0
  158. package/dist/app/assets/script/utility/share.js.map +1 -0
  159. package/dist/app/assets/script/utility/string.d.ts +64 -0
  160. package/dist/app/assets/script/utility/string.js +135 -0
  161. package/dist/app/assets/script/utility/string.js.map +1 -0
  162. package/dist/app/assets/script/view/default.d.ts +11 -0
  163. package/dist/app/assets/script/view/default.js +15 -0
  164. package/dist/app/assets/script/view/default.js.map +1 -0
  165. package/dist/app/assets/script/view/toolkit/youtube-player-1.d.ts +23 -0
  166. package/dist/app/assets/script/view/toolkit/youtube-player-1.js +32 -0
  167. package/dist/app/assets/script/view/toolkit/youtube-player-1.js.map +1 -0
  168. package/dist/generators/app/index.d.ts +18 -0
  169. package/dist/generators/app/index.js +59 -0
  170. package/dist/generators/app/index.js.map +1 -0
  171. package/dist/scripts/build.d.ts +22 -0
  172. package/dist/scripts/build.js +158 -0
  173. package/dist/scripts/build.js.map +1 -0
  174. package/generators/app/index.js +2 -43
  175. package/generators/app/index.ts +61 -0
  176. package/package.json +78 -109
  177. package/scripts/build.ts +175 -0
  178. package/tsconfig.site.json +26 -0
  179. package/.babelrc +0 -7
  180. package/.editorconfig +0 -13
  181. package/.eslintrc +0 -64
  182. package/.htmllintrc +0 -6
  183. package/.npmignore +0 -12
  184. package/.sass-lint.yml +0 -16
  185. package/.travis.yml +0 -18
  186. package/app/assets/font/opensans/generator_config.txt +0 -5
  187. package/app/assets/font/opensans/opensans-bold-webfont.eot +0 -0
  188. package/app/assets/font/opensans/opensans-bold-webfont.svg +0 -1824
  189. package/app/assets/font/opensans/opensans-bold-webfont.ttf +0 -0
  190. package/app/assets/font/opensans/opensans-bold-webfont.woff +0 -0
  191. package/app/assets/font/opensans/opensans-bolditalic-webfont.eot +0 -0
  192. package/app/assets/font/opensans/opensans-bolditalic-webfont.svg +0 -1824
  193. package/app/assets/font/opensans/opensans-bolditalic-webfont.ttf +0 -0
  194. package/app/assets/font/opensans/opensans-bolditalic-webfont.woff +0 -0
  195. package/app/assets/font/opensans/opensans-extrabold-webfont.eot +0 -0
  196. package/app/assets/font/opensans/opensans-extrabold-webfont.svg +0 -1824
  197. package/app/assets/font/opensans/opensans-extrabold-webfont.ttf +0 -0
  198. package/app/assets/font/opensans/opensans-extrabold-webfont.woff +0 -0
  199. package/app/assets/font/opensans/opensans-extrabolditalic-webfont.eot +0 -0
  200. package/app/assets/font/opensans/opensans-extrabolditalic-webfont.svg +0 -1824
  201. package/app/assets/font/opensans/opensans-extrabolditalic-webfont.ttf +0 -0
  202. package/app/assets/font/opensans/opensans-extrabolditalic-webfont.woff +0 -0
  203. package/app/assets/font/opensans/opensans-italic-webfont.eot +0 -0
  204. package/app/assets/font/opensans/opensans-italic-webfont.svg +0 -1824
  205. package/app/assets/font/opensans/opensans-italic-webfont.ttf +0 -0
  206. package/app/assets/font/opensans/opensans-italic-webfont.woff +0 -0
  207. package/app/assets/font/opensans/opensans-light-webfont.eot +0 -0
  208. package/app/assets/font/opensans/opensans-light-webfont.svg +0 -1824
  209. package/app/assets/font/opensans/opensans-light-webfont.ttf +0 -0
  210. package/app/assets/font/opensans/opensans-light-webfont.woff +0 -0
  211. package/app/assets/font/opensans/opensans-lightitalic-webfont.eot +0 -0
  212. package/app/assets/font/opensans/opensans-lightitalic-webfont.svg +0 -1824
  213. package/app/assets/font/opensans/opensans-lightitalic-webfont.ttf +0 -0
  214. package/app/assets/font/opensans/opensans-lightitalic-webfont.woff +0 -0
  215. package/app/assets/font/opensans/opensans-regular-webfont.eot +0 -0
  216. package/app/assets/font/opensans/opensans-regular-webfont.svg +0 -1824
  217. package/app/assets/font/opensans/opensans-regular-webfont.ttf +0 -0
  218. package/app/assets/font/opensans/opensans-regular-webfont.woff +0 -0
  219. package/app/assets/font/opensans/opensans-semibold-webfont.eot +0 -0
  220. package/app/assets/font/opensans/opensans-semibold-webfont.svg +0 -1824
  221. package/app/assets/font/opensans/opensans-semibold-webfont.ttf +0 -0
  222. package/app/assets/font/opensans/opensans-semibold-webfont.woff +0 -0
  223. package/app/assets/font/opensans/opensans-semibolditalic-webfont.eot +0 -0
  224. package/app/assets/font/opensans/opensans-semibolditalic-webfont.svg +0 -1824
  225. package/app/assets/font/opensans/opensans-semibolditalic-webfont.ttf +0 -0
  226. package/app/assets/font/opensans/opensans-semibolditalic-webfont.woff +0 -0
  227. package/app/assets/font/opensans/specimen_files/grid_12-825-55-15.css +0 -129
  228. package/app/assets/font/opensans/specimen_files/specimen_stylesheet.css +0 -396
  229. package/app/assets/script/index.js +0 -11
  230. package/app/assets/script/mediator/global.js +0 -5
  231. package/app/assets/script/model/singletons/countries.js +0 -6
  232. package/app/assets/script/model/singletons/global.js +0 -6
  233. package/app/assets/script/model/singletons/states.js +0 -6
  234. package/app/assets/script/model/user.js +0 -5
  235. package/app/assets/script/utility/form.js +0 -86
  236. package/app/assets/script/utility/share.js +0 -52
  237. package/app/assets/script/utility/string.js +0 -70
  238. package/app/assets/script/view/default.js +0 -11
  239. package/app/assets/style/base/vendor/_foundation.scss +0 -2
  240. package/app/assets/test/spec/shareSpec.js +0 -137
  241. package/app/index.html +0 -43
  242. package/app/report/istanbul/base.css +0 -213
  243. package/app/report/istanbul/index.html +0 -93
  244. package/app/report/istanbul/prettify.css +0 -1
  245. package/app/report/istanbul/prettify.js +0 -1
  246. package/app/report/istanbul/sort-arrow-sprite.png +0 -0
  247. package/app/report/istanbul/sorter.js +0 -158
  248. package/app/report/istanbul/utility/form.js.html +0 -524
  249. package/app/report/istanbul/utility/index.html +0 -132
  250. package/app/report/istanbul/utility/regex.js.html +0 -203
  251. package/app/report/istanbul/utility/share.js.html +0 -401
  252. package/app/report/istanbul/utility/string.js.html +0 -446
  253. package/app/report/jsdoc/DragEvent.html +0 -303
  254. package/app/report/jsdoc/Event.html +0 -773
  255. package/app/report/jsdoc/EventPropagators.html +0 -336
  256. package/app/report/jsdoc/FocusEvent.html +0 -303
  257. package/app/report/jsdoc/ForEachBookKeeping.html +0 -425
  258. package/app/report/jsdoc/KeyboardEvent.html +0 -303
  259. package/app/report/jsdoc/MapBookKeeping.html +0 -457
  260. package/app/report/jsdoc/MouseEvent.html +0 -303
  261. package/app/report/jsdoc/ReactClass.html +0 -330
  262. package/app/report/jsdoc/ReactClassInterface.html +0 -311
  263. package/app/report/jsdoc/ReactDOMComponent.html +0 -349
  264. package/app/report/jsdoc/ReactDOMTextComponent.html +0 -348
  265. package/app/report/jsdoc/ReactMountReady.html +0 -340
  266. package/app/report/jsdoc/ReactMultiChild.html +0 -330
  267. package/app/report/jsdoc/ReactOwner.html +0 -351
  268. package/app/report/jsdoc/ReactReconcileTransaction.html +0 -342
  269. package/app/report/jsdoc/ReactServerRenderingTransaction.html +0 -376
  270. package/app/report/jsdoc/ReactServerUpdateQueue.html +0 -382
  271. package/app/report/jsdoc/TouchEvent.html +0 -303
  272. package/app/report/jsdoc/Transaction.html +0 -459
  273. package/app/report/jsdoc/UIEvent.html +0 -303
  274. package/app/report/jsdoc/WheelEvent.html +0 -303
  275. package/app/report/jsdoc/classes.list.html +0 -339
  276. package/app/report/jsdoc/fonts/glyphicons-halflings-regular.eot +0 -0
  277. package/app/report/jsdoc/fonts/glyphicons-halflings-regular.svg +0 -288
  278. package/app/report/jsdoc/fonts/glyphicons-halflings-regular.ttf +0 -0
  279. package/app/report/jsdoc/fonts/glyphicons-halflings-regular.woff +0 -0
  280. package/app/report/jsdoc/fonts/glyphicons-halflings-regular.woff2 +0 -0
  281. package/app/report/jsdoc/global.html +0 -1653
  282. package/app/report/jsdoc/img/glyphicons-halflings-white.png +0 -0
  283. package/app/report/jsdoc/img/glyphicons-halflings.png +0 -0
  284. package/app/report/jsdoc/index.html +0 -236
  285. package/app/report/jsdoc/interfaces.list.html +0 -339
  286. package/app/report/jsdoc/quicksearch.html +0 -31
  287. package/app/report/jsdoc/scripts/docstrap.lib.js +0 -11
  288. package/app/report/jsdoc/scripts/fulltext-search-ui.js +0 -89
  289. package/app/report/jsdoc/scripts/fulltext-search.js +0 -36
  290. package/app/report/jsdoc/scripts/lunr.min.js +0 -6
  291. package/app/report/jsdoc/scripts/prettify/Apache-License-2.0.txt +0 -202
  292. package/app/report/jsdoc/scripts/prettify/jquery.min.js +0 -6
  293. package/app/report/jsdoc/scripts/prettify/lang-css.js +0 -21
  294. package/app/report/jsdoc/scripts/prettify/prettify.js +0 -496
  295. package/app/report/jsdoc/scripts/sunlight.js +0 -1157
  296. package/app/report/jsdoc/scripts/toc.js +0 -203
  297. package/app/report/jsdoc/styles/darkstrap.css +0 -960
  298. package/app/report/jsdoc/styles/prettify-tomorrow.css +0 -132
  299. package/app/report/jsdoc/styles/site.cerulean.css +0 -7008
  300. package/app/report/jsdoc/styles/site.cosmo.css +0 -7061
  301. package/app/report/jsdoc/styles/site.cyborg.css +0 -7048
  302. package/app/report/jsdoc/styles/site.darkly.css +0 -7171
  303. package/app/report/jsdoc/styles/site.darkstrap.css +0 -5638
  304. package/app/report/jsdoc/styles/site.dibs-bootstrap.css +0 -5899
  305. package/app/report/jsdoc/styles/site.flatly.css +0 -7147
  306. package/app/report/jsdoc/styles/site.journal.css +0 -6973
  307. package/app/report/jsdoc/styles/site.lumen.css +0 -7298
  308. package/app/report/jsdoc/styles/site.paper.css +0 -7623
  309. package/app/report/jsdoc/styles/site.readable.css +0 -6997
  310. package/app/report/jsdoc/styles/site.sandstone.css +0 -7035
  311. package/app/report/jsdoc/styles/site.simplex.css +0 -7023
  312. package/app/report/jsdoc/styles/site.slate.css +0 -7343
  313. package/app/report/jsdoc/styles/site.spacelab.css +0 -7055
  314. package/app/report/jsdoc/styles/site.superhero.css +0 -7131
  315. package/app/report/jsdoc/styles/site.united.css +0 -6895
  316. package/app/report/jsdoc/styles/site.yeti.css +0 -7195
  317. package/app/report/jsdoc/styles/sunlight.dark.css +0 -345
  318. package/app/report/jsdoc/styles/sunlight.default.css +0 -344
  319. package/gulp/config.js +0 -207
  320. package/gulp/tasks/accessibility.js +0 -34
  321. package/gulp/tasks/build.js +0 -18
  322. package/gulp/tasks/clean.js +0 -18
  323. package/gulp/tasks/data.js +0 -22
  324. package/gulp/tasks/default.js +0 -9
  325. package/gulp/tasks/deploy.js +0 -222
  326. package/gulp/tasks/documentation.js +0 -28
  327. package/gulp/tasks/markup.js +0 -26
  328. package/gulp/tasks/script.js +0 -92
  329. package/gulp/tasks/style.js +0 -42
  330. package/gulp/tasks/unit.js +0 -38
  331. package/gulp/tasks/watch.js +0 -77
  332. package/gulpfile.js +0 -8
  333. package/jsdoc.json +0 -23
  334. package/karma.conf.js +0 -58
@@ -0,0 +1,148 @@
1
+ /** @module app/assets/script/utility/string */
2
+ const parser = new DOMParser();
3
+
4
+ const integerFormatter = new Intl.NumberFormat('en-US', {
5
+ maximumFractionDigits: 0
6
+ });
7
+ const currencyFormatter = new Intl.NumberFormat('en-US', {
8
+ currency: 'USD',
9
+ minimumFractionDigits: 2,
10
+ style: 'currency'
11
+ });
12
+
13
+ /**
14
+ * Format a numeric date component with at least two digits.
15
+ * @param number - Numeric value to inspect or format.
16
+ * @returns A string containing at least two digits.
17
+ */
18
+ function pad(number: number) {
19
+ return String(number).padStart(2, '0');
20
+ }
21
+
22
+ /**
23
+ * Format a valid date using local calendar components, or return null for invalid input.
24
+ * @param value - Value to find or format.
25
+ * @returns YYYY-MM-DD in local time, or null for invalid input.
26
+ */
27
+ function dateParts(value: string | number | Date) {
28
+ const date = new Date(value);
29
+ if (Number.isNaN(date.getTime())) {
30
+ return null;
31
+ }
32
+ return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}`;
33
+ }
34
+
35
+ 'use strict';
36
+
37
+ export default class {
38
+
39
+ //turn a string of html tags into a dom object
40
+ /**
41
+ * Parse trusted HTML and clone its first root node; reject empty markup.
42
+ * @param string - Trusted HTML containing at least one root node.
43
+ * @returns A clone of the first parsed root node.
44
+ * @throws When input does not satisfy the documented contract.
45
+ */
46
+ toElement(string: string) {
47
+ const element = parser.parseFromString(string, 'text/html').body.firstChild;
48
+ if (!element) throw new TypeError('HTML must contain a root node');
49
+ return element.cloneNode(true);
50
+ }
51
+
52
+ //qet data from url query string
53
+ /**
54
+ * Read and decode a query value, returning null when absent and an empty string when valueless.
55
+ * @param name - Resource, field, or parameter name.
56
+ * @param url - URL or optional adapter argument.
57
+ * @returns The decoded value, an empty string, or null when absent.
58
+ */
59
+ getQueryStringParamater(name: string, url: string) {
60
+ name = name.replace(/[[\]]/g, '\\$&');
61
+ let regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)');
62
+ let results = regex.exec(url);
63
+ if (!results) {
64
+ return null;
65
+ }
66
+ if (!results[2]) {
67
+ return '';
68
+ }
69
+ return decodeURIComponent(results[2].replace(/\+/g, ' '));
70
+ }
71
+
72
+ // 2014-11-10
73
+ /**
74
+ * Format a local calendar date as YYYY-MM-DD or return Invalid date.
75
+ * @param unformattedDate - Date input to format.
76
+ * @returns A local YYYY-MM-DD string or Invalid date.
77
+ */
78
+ formatDate(unformattedDate: string | number | Date) {
79
+ return dateParts(unformattedDate) || 'Invalid date';
80
+ }
81
+
82
+ //format the api accepts back
83
+ /**
84
+ * Format a calendar date using the legacy API noon timestamp convention.
85
+ * @param unformattedDate - Date input to format.
86
+ * @returns A YYYY-MM-DDT12:00 string or Invalid date.
87
+ */
88
+ formatDateAPI(unformattedDate: string) {
89
+ const formattedDate = dateParts(`${unformattedDate}T00:00:00`);
90
+ return formattedDate ? `${formattedDate}T12:00` : 'Invalid date';
91
+ }
92
+
93
+ /**
94
+ * Format a rounded number using en-US grouping.
95
+ * @param unformattedNumber - Numeric input to format.
96
+ * @returns The grouped and rounded number string.
97
+ */
98
+ formatNumber(unformattedNumber: number | string) {
99
+ return integerFormatter.format(Number(unformattedNumber));
100
+ }
101
+
102
+ /**
103
+ * Parse a base-ten integer using the existing parseInt behavior.
104
+ * @param formattedNumber - Integer text to parse.
105
+ * @returns The parsed integer, or NaN when no integer can be read.
106
+ */
107
+ unformatNumber(formattedNumber: string) {
108
+ return parseInt(formattedNumber, 10);
109
+ }
110
+
111
+ /**
112
+ * Format a numeric value as US dollars with two decimal places.
113
+ * @param unformattedCurrency - Numeric currency input.
114
+ * @returns The value formatted as US dollars.
115
+ */
116
+ formatCurrency(unformattedCurrency: number | string) {
117
+ return currencyFormatter.format(Number(unformattedCurrency));
118
+ }
119
+
120
+ /**
121
+ * Remove currency decoration and return two decimal places, falling back to 0.00 for invalid input.
122
+ * @param formattedCurrency - Decorated currency text or number.
123
+ * @returns An undecorated decimal string with two places.
124
+ */
125
+ unformatCurrency(formattedCurrency: number | string) {
126
+ const number = Number(String(formattedCurrency).replace(/[^0-9.-]/g, ''));
127
+ return Number.isFinite(number) ? number.toFixed(2) : '0.00';
128
+ }
129
+
130
+ /**
131
+ * Create a telephone link using only the supplied digits.
132
+ * @param unformattedPhoneNumber - Phone number containing optional formatting.
133
+ * @returns A tel link containing only digits.
134
+ */
135
+ formatPhoneLink(unformattedPhoneNumber: string) {
136
+ return 'tel:' + unformattedPhoneNumber.replace(/\D/g,'');
137
+ }
138
+
139
+ /**
140
+ * Create a mailto link from the supplied email address.
141
+ * @param unformattedEmailAddress - Email address to place in the link.
142
+ * @returns A mailto link.
143
+ */
144
+ formatEmailLink(unformattedEmailAddress: string) {
145
+ return 'mailto:' + unformattedEmailAddress;
146
+ }
147
+
148
+ };
@@ -0,0 +1,14 @@
1
+ /** @module app/assets/script/view/default */
2
+ import React from 'react';
3
+
4
+
5
+ 'use strict';
6
+ export default class HelloMessage extends React.Component<{name: string}> {
7
+ /**
8
+ * Render the greeting from the component name prop.
9
+ * @returns The greeting React element.
10
+ */
11
+ render() {
12
+ return <div>Hello {this.props.name}</div>;
13
+ }
14
+ };
@@ -0,0 +1,31 @@
1
+ /** @module app/assets/script/view/toolkit/youtube-player-1 */
2
+ import View from 'white-label-view';
3
+
4
+ 'use strict';
5
+ export default class extends View {
6
+ /**
7
+ * Create an instance with its own state and listener references.
8
+ */
9
+ constructor() {
10
+ super();
11
+ this.parentElement = document.querySelector('body') || undefined;
12
+ }
13
+ /**
14
+ * Extension hook for initializing a concrete YouTube player implementation.
15
+ * @returns No value.
16
+ */
17
+ initialize() {
18
+ }
19
+ /**
20
+ * Lifecycle hook for attaching listeners owned by a subclass.
21
+ * @returns No value.
22
+ */
23
+ addListeners() {
24
+ }
25
+ /**
26
+ * Legacy misspelled extension hook retained for compatibility with existing sample subclasses.
27
+ * @returns No value.
28
+ */
29
+ removeListners() {
30
+ }
31
+ };
@@ -1,23 +1,39 @@
1
1
  // ## colors
2
- @import 'colors/colors';
2
+ @forward 'colors/colors';
3
3
 
4
4
  // ## fonts
5
- @import 'type/fonts';
6
- @import 'type/text';
7
- @import 'type/headings';
5
+ @forward 'type/fonts';
6
+ @forward 'type/text';
7
+ @forward 'type/headings';
8
8
 
9
9
 
10
10
  // ## utilities
11
- @import 'utilities/accessibility';
12
- @import 'utilities/scroll';
13
- @import 'utilities/type';
11
+ @forward 'utilities/accessibility';
12
+ @forward 'utilities/scroll';
13
+ @forward 'utilities/type';
14
14
 
15
15
  // ## elements
16
- @import 'elements/anchors';
17
- @import 'elements/buttons';
18
- @import 'elements/inputs';
19
- @import 'elements/labels';
20
- @import 'elements/lists';
21
- @import 'elements/pictures';
22
- @import 'elements/images';
23
- @import 'elements/tables';
16
+ @forward 'elements/anchors';
17
+ @forward 'elements/buttons';
18
+ @forward 'elements/fieldsets';
19
+ @forward 'elements/inputs';
20
+ @forward 'elements/labels';
21
+ @forward 'elements/landmarks';
22
+ @forward 'elements/legends';
23
+ @forward 'elements/lists';
24
+ @forward 'elements/pictures';
25
+ @forward 'elements/images';
26
+ @forward 'elements/tables';
27
+
28
+ // ## components
29
+
30
+ @forward 'components/modal-1';
31
+ @forward 'components/sticky-1';
32
+ @forward 'components/tabpanel-base-1';
33
+ @forward 'components/tabpanel-1';
34
+ @forward 'components/tabpanel-2';
35
+ @forward 'components/youtube-player-1';
36
+
37
+ // ## layouts
38
+
39
+ @forward 'layouts/staggered-1';
@@ -0,0 +1,80 @@
1
+ @use "../colors/colors";
2
+ @use '../utilities/functions' as *;
3
+ @use '../type/text' as *;
4
+ @use '../utilities/accessibility' as *;
5
+
6
+ // ## modals
7
+
8
+ %modal-1 {
9
+
10
+ @extend %text-1;
11
+
12
+ bottom: 0;
13
+ left: 0;
14
+ position: absolute;
15
+ right: 0;
16
+ top: 0;
17
+ z-index: 2;
18
+
19
+ @media screen {
20
+ height: 100vh;
21
+ }
22
+
23
+ > .modal-1-content {
24
+
25
+ background-color: colors.$white-1;
26
+ height: 100%;
27
+ margin: 0 auto;
28
+ position: absolute;
29
+ width: 100%;
30
+ z-index: 3;
31
+
32
+ @include breakpoint(medium up) {
33
+ background-color: transparent;
34
+ height: auto;
35
+ }
36
+
37
+ > * {
38
+ background-color: colors.$white-1;
39
+ }
40
+
41
+ }
42
+
43
+ > button {
44
+
45
+ @extend %accessibility-hidden-text-1;
46
+
47
+ background-color: colors.$grey-1;
48
+ display: block;
49
+ height: 100%;
50
+ left: 0;
51
+ opacity: .9;
52
+ position: fixed;
53
+ top: 0;
54
+ width: 100%;
55
+
56
+ }
57
+
58
+ }
59
+
60
+ //added to body class to control page content
61
+ %modal-1-open {
62
+
63
+ @include breakpoint(small only) {
64
+
65
+ .wrapper {
66
+ display: none;
67
+ }
68
+
69
+ .modal-1 {
70
+ top: 0;
71
+ }
72
+
73
+ }
74
+
75
+ @include breakpoint(medium up) {
76
+ overflow: hidden;
77
+ }
78
+
79
+
80
+ }
@@ -0,0 +1,19 @@
1
+ // ## sticky elements
2
+
3
+ %sticky-1 {
4
+
5
+ &.sticky-1-fixed {
6
+
7
+ > * {
8
+ position: fixed;
9
+ top: 0;
10
+ z-index: 1;
11
+ }
12
+
13
+ }
14
+
15
+ > .sticky-1-wrapper {
16
+ width: 100%;
17
+ }
18
+
19
+ }
@@ -0,0 +1,115 @@
1
+ @use "../colors/colors";
2
+ @use '../utilities/functions' as *;
3
+ @use 'tabpanel-base-1' as *;
4
+ @use '../type/text' as *;
5
+
6
+ // ## tabpanel-1
7
+
8
+ %tabpanel-1 {
9
+
10
+ @extend %tabpanel-base-1;
11
+ @extend %text-1;
12
+
13
+ margin: 0;
14
+
15
+ > [role='tablist'] {
16
+
17
+ @include clearfix;
18
+
19
+ margin: 0;
20
+ padding: 0;
21
+
22
+ > [role='tab'] {
23
+
24
+ @extend %text-1;
25
+
26
+ background-color: colors.$white-1;
27
+ border-bottom: rem-calc(1) solid colors.$white-1;
28
+ border-left: rem-calc(1) solid colors.$black-1;
29
+ border-right: rem-calc(1) solid colors.$black-1;
30
+ border-top: rem-calc(1) solid colors.$black-1;
31
+ color: colors.$black-1;
32
+ display: block;
33
+ float: left;
34
+ list-style: none;
35
+ margin: 0 rem-calc(1) 0 0;
36
+ padding: rem-calc(13.5);
37
+ text-decoration: none;
38
+
39
+ &[aria-selected='false'] {
40
+ background-color: colors.$black-1;
41
+ border-bottom-color: colors.$black-1;
42
+ color: colors.$white-1;
43
+ }
44
+
45
+ }
46
+
47
+ }
48
+
49
+ > [role='tabpanel'] {
50
+ border: rem-calc(1) solid colors.$black-1;
51
+ margin-top: rem-calc(-1);
52
+ padding: rem-calc(10);
53
+ }
54
+
55
+ }
56
+
57
+ // ### tabpanel-2
58
+
59
+ %tabpanel-2 {
60
+
61
+ @extend %tabpanel-base-1;
62
+ @extend %text-1;
63
+
64
+ margin: 0;
65
+
66
+ [role='tablist'] {
67
+
68
+ @include clearfix;
69
+
70
+ border: rem-calc(1) solid colors.$black-1;
71
+ margin: 0;
72
+ padding: 0;
73
+
74
+ > [role='tab'] {
75
+
76
+ @extend %text-1;
77
+
78
+ background-color: colors.$grey-5;
79
+ border-bottom: rem-calc(1) solid colors.$black-1;
80
+ color: colors.$black-1;
81
+ display: block;
82
+ list-style: none;
83
+ margin: 0 rem-calc(1) 0 0;
84
+ padding: rem-calc(13.5);
85
+ text-decoration: none;
86
+ width: 100%;
87
+
88
+ &[aria-selected='false'] {
89
+ background-color: colors.$black-1;
90
+ border: 0;
91
+ color: colors.$white-1;
92
+ }
93
+
94
+ }
95
+
96
+ > [role='tabpanel'] {
97
+
98
+ max-height: 0;
99
+ overflow: hidden;
100
+ transition: max-height .3s ease;
101
+
102
+ &[aria-hidden='false'] {
103
+ max-height: rem-calc(1000);
104
+ }
105
+
106
+ > * {
107
+ margin-left: rem-calc(10);
108
+ margin-right: rem-calc(10);
109
+ }
110
+
111
+ }
112
+
113
+ }
114
+
115
+ }
@@ -0,0 +1,64 @@
1
+ @use "../colors/colors";
2
+ @use '../utilities/functions' as *;
3
+ @use 'tabpanel-base-1' as *;
4
+ @use '../type/text' as *;
5
+
6
+ // ## tabpanel-2
7
+
8
+ %tabpanel-2 {
9
+
10
+ @extend %tabpanel-base-1;
11
+ @extend %text-1;
12
+
13
+ margin: 0;
14
+
15
+ [role='tablist'] {
16
+
17
+ @include clearfix;
18
+
19
+ border: rem-calc(1) solid colors.$black-1;
20
+ margin: 0;
21
+ padding: 0;
22
+
23
+ > [role='tab'] {
24
+
25
+ @extend %text-1;
26
+
27
+ background-color: colors.$grey-5;
28
+ border-bottom: rem-calc(1) solid colors.$black-1;
29
+ color: colors.$black-1;
30
+ display: block;
31
+ list-style: none;
32
+ margin: 0 rem-calc(1) 0 0;
33
+ padding: rem-calc(13.5);
34
+ text-decoration: none;
35
+ width: 100%;
36
+
37
+ &[aria-selected='false'] {
38
+ background-color: colors.$black-1;
39
+ border: 0;
40
+ color: colors.$white-1;
41
+ }
42
+
43
+ }
44
+
45
+ > [role='tabpanel'] {
46
+
47
+ max-height: 0;
48
+ overflow: hidden;
49
+ transition: max-height .3s ease;
50
+
51
+ &[aria-hidden='false'] {
52
+ max-height: rem-calc(1000);
53
+ }
54
+
55
+ > * {
56
+ margin-left: rem-calc(10);
57
+ margin-right: rem-calc(10);
58
+ }
59
+
60
+ }
61
+
62
+ }
63
+
64
+ }
@@ -0,0 +1,13 @@
1
+ // ## tabpanel-base-1
2
+
3
+ %tabpanel-base-1 {
4
+
5
+ > [role='tablist'] [role='tab'] {
6
+ cursor: pointer;
7
+ }
8
+
9
+ > [role='tabpanel'][aria-hidden='true'] {
10
+ display: none;
11
+ }
12
+
13
+ }
@@ -0,0 +1,16 @@
1
+ @use '../utilities/functions' as *;
2
+
3
+ // ### youtube-video-1
4
+
5
+ %youtube-player-1 {
6
+
7
+ // Keep embedded videos responsive without depending on framework Sass mixins.
8
+ @include responsive-embed;
9
+
10
+ margin: 0;
11
+
12
+ &.widescreen {
13
+ padding-bottom: $responsive-embed-margin-bottom;
14
+ }
15
+
16
+ }
@@ -1,3 +1,5 @@
1
+ @use '../type/text' as *;
2
+
1
3
  %anchor-base-1 {
2
4
 
3
5
  @extend %text-1;
@@ -13,3 +15,13 @@
13
15
  }
14
16
 
15
17
  }
18
+
19
+ %anchor-1 {
20
+
21
+ @extend %anchor-base-1;
22
+
23
+ cursor: pointer;
24
+ margin: 0;
25
+ text-decoration: underline;
26
+
27
+ }
@@ -1,3 +1,7 @@
1
+ @use "../colors/colors";
2
+ @use '../utilities/functions' as *;
3
+ @use '../type/text' as *;
4
+
1
5
  %button-base-1 {
2
6
 
3
7
  @extend %text-1;
@@ -8,3 +12,14 @@
8
12
  padding: 0;
9
13
 
10
14
  }
15
+
16
+ %button-1 {
17
+
18
+ @extend %button-base-1;
19
+
20
+ background-color: colors.$black-1;
21
+ border: rem-calc(1) solid colors.$black-1;
22
+ color: colors.$white-1;
23
+ padding: 0 rem-calc(13.5);
24
+
25
+ }
@@ -0,0 +1,9 @@
1
+ @use '../type/text' as *;
2
+
3
+ %fieldset-1 {
4
+
5
+ @extend %text-1;
6
+
7
+ margin: 0;
8
+
9
+ }
@@ -1,4 +1,8 @@
1
- %image-base-1 {
1
+ %image-1 {
2
+ border: 0;
2
3
  margin: 0;
3
- padding: 0;
4
+ }
5
+
6
+ %picture-1 {
7
+ @extend %image-1;
4
8
  }