@ilo-org/twig 0.17.0 → 0.18.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 (255) hide show
  1. package/dist/components/accordion/accordion-item.twig +22 -0
  2. package/dist/components/accordion/accordion.behavior.js +1 -0
  3. package/dist/components/accordion/accordion.css +1 -0
  4. package/dist/components/accordion/accordion.twig +16 -0
  5. package/dist/components/accordion/accordion.wingsuit.yml +77 -0
  6. package/dist/components/breadcrumb/breadcrumb.behavior.js +1 -0
  7. package/dist/components/breadcrumb/breadcrumb.css +1 -0
  8. package/dist/components/breadcrumb/breadcrumb.twig +43 -0
  9. package/dist/components/breadcrumb/breadcrumb.wingsuit.yml +36 -0
  10. package/dist/components/button/button.css +1 -0
  11. package/dist/components/button/button.twig +23 -0
  12. package/dist/components/button/button.wingsuit.yml +114 -0
  13. package/dist/components/callout/callout.behavior.js +1 -0
  14. package/dist/components/callout/callout.css +1 -0
  15. package/dist/components/callout/callout.twig +41 -0
  16. package/dist/components/callout/callout.wingsuit.yml +72 -0
  17. package/dist/components/card/card.css +1 -0
  18. package/dist/components/card/card.twig +24 -0
  19. package/dist/components/card/card.wingsuit.yml +227 -0
  20. package/dist/components/card_data/card_data.twig +101 -0
  21. package/dist/components/card_data/card_data.wingsuit.yml +135 -0
  22. package/dist/components/card_detail/card_detail.twig +37 -0
  23. package/dist/components/card_detail/card_detail.wingsuit.yml +71 -0
  24. package/dist/components/card_factlist/card_factlist.twig +21 -0
  25. package/dist/components/card_factlist/card_factlist.wingsuit.yml +46 -0
  26. package/dist/components/card_feature/card_feature.twig +39 -0
  27. package/dist/components/card_feature/card_feature.wingsuit.yml +80 -0
  28. package/dist/components/card_multilink/card_multilink.twig +45 -0
  29. package/dist/components/card_multilink/card_multilink.wingsuit.yml +91 -0
  30. package/dist/components/card_promo/card_promo.twig +35 -0
  31. package/dist/components/card_promo/card_promo.wingsuit.yml +71 -0
  32. package/dist/components/card_stat/card_stat.twig +24 -0
  33. package/dist/components/card_stat/card_stat.wingsuit.yml +44 -0
  34. package/dist/components/card_text/card_text.twig +35 -0
  35. package/dist/components/card_text/card_text.wingsuit.yml +57 -0
  36. package/dist/components/cardgroup/cardgroup.css +1 -0
  37. package/dist/components/cardgroup/cardgroup.twig +46 -0
  38. package/dist/components/cardgroup/cardgroup.wingsuit.yml +158 -0
  39. package/dist/components/checkbox/checkbox.css +1 -0
  40. package/dist/components/checkbox/checkbox.twig +17 -0
  41. package/dist/components/checkbox/checkbox.wingsuit.yml +84 -0
  42. package/dist/components/container/container.css +1 -0
  43. package/dist/components/contextmenu/contextmenu.css +1 -0
  44. package/dist/components/contextmenu/contextmenu.twig +12 -0
  45. package/dist/components/contextmenu/contextmenu.wingsuit.yml +24 -0
  46. package/dist/components/credit/credit.css +1 -0
  47. package/dist/components/datacard/datacard.css +1 -0
  48. package/dist/components/datepicker/datepicker.css +1 -0
  49. package/dist/components/datepicker/datepicker.twig +20 -0
  50. package/dist/components/datepicker/datepicker.wingsuit.yml +72 -0
  51. package/dist/components/detailcard/detailcard.css +1 -0
  52. package/dist/components/dropdown/dropdown.css +1 -0
  53. package/dist/components/dropdown/dropdown.twig +22 -0
  54. package/dist/components/dropdown/dropdown.wingsuit.yml +101 -0
  55. package/dist/components/empty/empty.css +1 -0
  56. package/dist/components/factlistcard/factlistcard.css +1 -0
  57. package/dist/components/featurecard/featurecard.css +1 -0
  58. package/dist/components/fieldset/fieldset.css +1 -0
  59. package/dist/components/file-upload/file-upload.css +1 -0
  60. package/dist/components/fileupload/fileupload.behavior.js +1 -0
  61. package/dist/components/fileupload/fileupload.twig +20 -0
  62. package/dist/components/fileupload/fileupload.wingsuit.yml +95 -0
  63. package/dist/components/footer/footer.css +1 -0
  64. package/dist/components/footer/footer.twig +63 -0
  65. package/dist/components/footer/footer.wingsuit.yml +106 -0
  66. package/dist/components/form/fieldset.twig +70 -0
  67. package/dist/components/form/form.css +1 -0
  68. package/dist/components/form/form.twig +19 -0
  69. package/dist/components/form/form.wingsuit.yml +205 -0
  70. package/dist/components/form/formcontrol.twig +89 -0
  71. package/dist/components/form/input.twig +10 -0
  72. package/dist/components/formcontrol/formcontrol.css +1 -0
  73. package/dist/components/heading/heading.css +1 -0
  74. package/dist/components/hero/hero.css +1 -0
  75. package/dist/components/hero/hero.twig +65 -0
  76. package/dist/components/hero/hero.wingsuit.yml +182 -0
  77. package/dist/components/herocard/herocard.css +1 -0
  78. package/dist/components/herocard/herocard.twig +30 -0
  79. package/dist/components/herocard/herocard.wingsuit.yml +71 -0
  80. package/dist/components/icon/icon.behavior.js +1 -0
  81. package/dist/components/icon/icon.css +1 -0
  82. package/dist/components/icon/icon.twig +4 -0
  83. package/dist/components/icon/icon.wingsuit.yml +29 -0
  84. package/dist/components/image/image.css +1 -0
  85. package/dist/components/image/image.twig +29 -0
  86. package/dist/components/image/image.wingsuit.yml +57 -0
  87. package/dist/components/input/input.css +1 -0
  88. package/dist/components/link/link.css +1 -0
  89. package/dist/components/link/link.twig +8 -0
  90. package/dist/components/link/link.wingsuit.yml +36 -0
  91. package/dist/components/linklist/linklist.behavior.js +1 -0
  92. package/dist/components/linklist/linklist.css +1 -0
  93. package/dist/components/linklist/linklist.twig +26 -0
  94. package/dist/components/linklist/linklist.wingsuit.yml +55 -0
  95. package/dist/components/list/list-item.twig +6 -0
  96. package/dist/components/list/list.css +1 -0
  97. package/dist/components/list/list.twig +35 -0
  98. package/dist/components/list/list.wingsuit.yml +60 -0
  99. package/dist/components/list-item/list-item.wingsuit.yml +19 -0
  100. package/dist/components/loading/loading.behavior.js +1 -0
  101. package/dist/components/loading/loading.css +1 -0
  102. package/dist/components/loading/loading.twig +8 -0
  103. package/dist/components/loading/loading.wingsuit.yml +39 -0
  104. package/dist/components/localnav/localnav.twig +86 -0
  105. package/dist/components/localnav/localnav.wingsuit.yml +88 -0
  106. package/dist/components/logo/logo.css +1 -0
  107. package/dist/components/logogrid/logogrid.css +1 -0
  108. package/dist/components/logogrid/logogrid.twig +17 -0
  109. package/dist/components/logogrid/logogrid.wingsuit.yml +45 -0
  110. package/dist/components/modal/modal.behavior.js +1 -0
  111. package/dist/components/modal/modal.css +1 -0
  112. package/dist/components/modal/modal.twig +20 -0
  113. package/dist/components/modal/modal.wingsuit.yml +61 -0
  114. package/dist/components/multilinkcard/multilinkcard.css +1 -0
  115. package/dist/components/navigation/navigation.behavior.js +1 -0
  116. package/dist/components/navigation/navigation.css +1 -0
  117. package/dist/components/navigation/navigation.twig +171 -0
  118. package/dist/components/navigation/navigation.wingsuit.yml +127 -0
  119. package/dist/components/notification/notification.behavior.js +1 -0
  120. package/dist/components/notification/notification.css +1 -0
  121. package/dist/components/notification/notification.twig +18 -0
  122. package/dist/components/notification/notification.wingsuit.yml +59 -0
  123. package/dist/components/numberpicker/numberpicker.twig +16 -0
  124. package/dist/components/numberpicker/numberpicker.wingsuit.yml +92 -0
  125. package/dist/components/pagination/pagination.css +1 -0
  126. package/dist/components/pagination/pagination.twig +49 -0
  127. package/dist/components/pagination/pagination.wingsuit.yml +75 -0
  128. package/dist/components/picture/picture.twig +21 -0
  129. package/dist/components/polyfill/polyfill.twig +10 -0
  130. package/dist/components/profile/profile.css +1 -0
  131. package/dist/components/profile/profile.twig +26 -0
  132. package/dist/components/profile/profile.wingsuit.yml +46 -0
  133. package/dist/components/promocard/promocard.css +1 -0
  134. package/dist/components/radio/radio.css +1 -0
  135. package/dist/components/radio/radio.twig +23 -0
  136. package/dist/components/radio/radio.wingsuit.yml +84 -0
  137. package/dist/components/readmore/readmore.behavior.js +1 -0
  138. package/dist/components/readmore/readmore.css +1 -0
  139. package/dist/components/readmore/readmore.twig +16 -0
  140. package/dist/components/readmore/readmore.wingsuit.yml +37 -0
  141. package/dist/components/richtext/richtext.css +1 -0
  142. package/dist/components/richtext/richtext.twig +6 -0
  143. package/dist/components/richtext/richtext.wingsuit.yml +13 -0
  144. package/dist/components/search/search.behavior.js +1 -0
  145. package/dist/components/search/search.twig +31 -0
  146. package/dist/components/search/search.wingsuit.yml +90 -0
  147. package/dist/components/searchfield/searchfield.css +1 -0
  148. package/dist/components/socialmedia/socialmedia.css +1 -0
  149. package/dist/components/socialmedia/socialmedia.twig +17 -0
  150. package/dist/components/socialmedia/socialmedia.wingsuit.yml +59 -0
  151. package/dist/components/statcard/statcard.css +1 -0
  152. package/dist/components/table/table.behavior.js +1 -0
  153. package/dist/components/table/table.css +1 -0
  154. package/dist/components/table/table.twig +39 -0
  155. package/dist/components/table/table.wingsuit.yml +112 -0
  156. package/dist/components/tableofcontents/tableofcontents.behavior.js +1 -0
  157. package/dist/components/tableofcontents/tableofcontents.css +1 -0
  158. package/dist/components/tableofcontents/tableofcontents.twig +47 -0
  159. package/dist/components/tableofcontents/tableofcontents.wingsuit.yml +44 -0
  160. package/dist/components/tabs/tabs.behavior.js +1 -0
  161. package/dist/components/tabs/tabs.css +1 -0
  162. package/dist/components/tabs/tabs.twig +26 -0
  163. package/dist/components/tabs/tabs.wingsuit.yml +169 -0
  164. package/dist/components/tag/tag.behavior.js +1 -0
  165. package/dist/components/tag/tag.css +1 -0
  166. package/dist/components/tag/tag.wingsuit.yml +44 -0
  167. package/dist/components/tags/tag.twig +30 -0
  168. package/dist/components/tags/tags.twig +15 -0
  169. package/dist/components/tags/tags.wingsuit.yml +45 -0
  170. package/dist/components/textarea/textarea.css +1 -0
  171. package/dist/components/textarea/textarea.twig +14 -0
  172. package/dist/components/textarea/textarea.wingsuit.yml +127 -0
  173. package/dist/components/textcard/textcard.css +1 -0
  174. package/dist/components/textinput/textinput.css +1 -0
  175. package/dist/components/textinput/textinput.twig +14 -0
  176. package/dist/components/textinput/textinput.wingsuit.yml +87 -0
  177. package/dist/components/toggle/toggle.css +1 -0
  178. package/dist/components/toggle/toggle.twig +36 -0
  179. package/dist/components/toggle/toggle.wingsuit.yml +95 -0
  180. package/dist/components/tooltip/tooltip.behavior.js +1 -0
  181. package/dist/components/tooltip/tooltip.css +1 -0
  182. package/dist/components/tooltip/tooltip.twig +14 -0
  183. package/dist/components/tooltip/tooltip.wingsuit.yml +53 -0
  184. package/dist/components/video/video.behavior.js +16 -0
  185. package/dist/components/video/video.css +1 -0
  186. package/dist/components/video/video.twig +18 -0
  187. package/dist/components/video/video.wingsuit.yml +82 -0
  188. package/dist/components/video/videoplayer.twig +8 -0
  189. package/dist/global/styles.css +2 -0
  190. package/package.json +13 -9
  191. package/src/patterns/components/checkbox/checkbox.wingsuit.yml +1 -0
  192. package/src/patterns/components/dropdown/dropdown.wingsuit.yml +2 -1
  193. package/src/patterns/components/fileupload/fileupload.wingsuit.yml +1 -0
  194. package/src/patterns/components/list/list-item.twig +1 -1
  195. package/src/patterns/components/list/list-item.wingsuit.yml +1 -1
  196. package/src/patterns/components/list/list.twig +2 -2
  197. package/src/patterns/components/list/list.wingsuit.yml +11 -11
  198. package/src/patterns/components/navigation/navigation.wingsuit.yml +1 -0
  199. package/src/patterns/components/numberpicker/numberpicker.wingsuit.yml +1 -0
  200. package/src/patterns/components/radio/radio.wingsuit.yml +1 -0
  201. package/src/patterns/components/search/search.wingsuit.yml +1 -0
  202. package/src/patterns/components/tags/tag.twig +4 -4
  203. package/src/patterns/components/tags/tag.wingsuit.yml +4 -3
  204. package/src/patterns/components/tags/tags.twig +1 -1
  205. package/src/patterns/components/tags/tags.wingsuit.yml +3 -3
  206. package/src/patterns/components/textarea/textarea.wingsuit.yml +1 -0
  207. package/src/patterns/components/textinput/textinput.wingsuit.yml +1 -0
  208. package/src/patterns/components/toggle/toggle.wingsuit.yml +1 -0
  209. package/.browserslistrc +0 -4
  210. package/.eslintrc.js +0 -25
  211. package/.stylelintignore +0 -9
  212. package/.stylelintrc +0 -19
  213. package/.turbo/turbo-build:lib.log +0 -71
  214. package/CHANGELOG.md +0 -1036
  215. package/apps/storybook/assets.js +0 -10
  216. package/apps/storybook/main.js +0 -27
  217. package/apps/storybook/manager-head.html +0 -92
  218. package/apps/storybook/manager.js +0 -7
  219. package/apps/storybook/patterns/colors.stories.mdx +0 -23
  220. package/apps/storybook/patterns/intro.stories.mdx +0 -184
  221. package/apps/storybook/patterns/typeset.stories.mdx +0 -32
  222. package/apps/storybook/patterns/welcome.stories.mdx +0 -33
  223. package/apps/storybook/preview-body.html +0 -4
  224. package/apps/storybook/preview-head.html +0 -5
  225. package/apps/storybook/preview.js +0 -36
  226. package/apps/storybook/styles.scss +0 -25
  227. package/apps/storybook/theme.js +0 -46
  228. package/apps/storybook/welcome.scss +0 -131
  229. package/babel.config.js +0 -16
  230. package/copystyles.js +0 -16
  231. package/copytemplates.js +0 -27
  232. package/images/fao-logo.svg +0 -195
  233. package/images/favicon.ico +0 -0
  234. package/images/hero.jpg +0 -0
  235. package/images/ilo-dg.jpg +0 -0
  236. package/images/ilo-headquarters.jpg +0 -0
  237. package/images/large.jpg +0 -0
  238. package/images/logo_en_horizontal_blue.svg +0 -893
  239. package/images/media-file-poster.jpg +0 -0
  240. package/images/medium.jpg +0 -0
  241. package/images/publication.jpg +0 -0
  242. package/images/small.jpg +0 -0
  243. package/images/twig.svg +0 -6
  244. package/images/unhcr-logo.svg +0 -1
  245. package/images/unicef-logo.png +0 -0
  246. package/images/video-example.mp4 +0 -0
  247. package/images/wfp-logo.svg +0 -1
  248. package/images/who-logo.svg +0 -1
  249. package/images/youtube-video-poster.avif +0 -0
  250. package/importprefix.js +0 -20
  251. package/importsvgs.js +0 -5
  252. package/jest.config.js +0 -18
  253. package/postcss.config.js +0 -6
  254. package/rollup.config.js +0 -31
  255. package/wingsuit.config.js +0 -28
@@ -0,0 +1,10 @@
1
+ {# text-input.twig #}
2
+ {% extends "@components/form/formcontrol.twig" %}
3
+
4
+ {% set baseClass = 'ilo' ~ "--text-input" %}
5
+ {% set inputClass = [baseClass] %}
6
+ {% if error %}
7
+ {% set inputClass = inputClass|merge([baseClass ~ "__error"]) %}
8
+ {% endif %}
9
+
10
+ <input id="{{ id ? id : name }}" name="{{ name }}" {% if disabled %} disabled {% endif %} placeholder="{{ placeholder }}" {% if required %} required {% endif %} type="{{ type }}" class="{{ inputClass|join(' ') }}" {% if pattern %} pattern="{{ pattern }}" {% endif %} {% if ariaDescribedBy %} aria-describedby="{{ ariaDescribedBy }}" {% endif %}/>
@@ -0,0 +1 @@
1
+ @charset "UTF-8";.ilo--form-control{grid-area:a;display:inline-grid;grid-template-rows:auto;grid-template-columns:auto;gap:.4287245445rem}.ilo--form-control__label-placement__start .ilo--form-control--label{grid-area:1/1/2/2}.ilo--form-control__label-placement__start :nth-child(2){grid-area:1/2/2/3}.ilo--form-control__label-placement__start .ilo--form-control--helper{grid-area:2/2/3/3}.ilo--form-control__label-placement__start [class*=file-upload--list]{grid-area:3/1/4/3}.ilo--form-control__label-placement__end .ilo--form-control--label{grid-area:1/2/2/3}.ilo--form-control__label-placement__end :nth-child(2){grid-area:1/1/2/2}.ilo--form-control__label-placement__end .ilo--form-control--helper{grid-area:2/1/3/3}.ilo--form-control__label-placement__end [class*=file-upload--list]{grid-area:3/1/4/4}.ilo--form-control__label-placement__top .ilo--form-control--label{grid-area:1/1/2/2}.ilo--form-control__label-placement__top :nth-child(2){grid-area:2/1/3/2}.ilo--form-control__label-placement__top .ilo--form-control--helper{grid-area:3/1/4/2}.ilo--form-control__label-placement__top [class*=file-upload--list]{grid-area:4/1/5/2}.ilo--form-control__label-placement__bottom .ilo--form-control--label{grid-area:3/1/4/2}.ilo--form-control__label-placement__bottom :nth-child(2){grid-area:2/1/3/2}.ilo--form-control__label-placement__bottom .ilo--form-control--helper{grid-area:1/1/2/2}.ilo--form-control__label-placement__bottom [class*=file-upload--list]{grid-area:4/1/5/2}.ilo--form-control__disabled .ilo--form-control--helper,.ilo--form-control__disabled .ilo--form-control--label{opacity:.5;pointer-events:none}.ilo--form-control__error .ilo--form-control--helper{color:#c8303c}.ilo--form-control--label{color:#2d2d2d;grid-area:g;display:flex;flex-flow:row nowrap;align-items:center;justify-content:flex-start}.ilo--form-control--label__size__small{font-family:Noto Sans,Noto Sans CJK JP,Yu Gothic,Hiragino Sans,TakaoPGothic,PingFang SC,Microsoft YaHei,微软雅黑,sans-serif;font-size:.8001071811rem;letter-spacing:-.0010718114rem;line-height:1.0803858521rem;font-weight:400}.ilo--form-control--label__size__medium{font-size:.857449089rem;line-height:1.1575562701rem}.ilo--form-control--label__size__large,.ilo--form-control--label__size__medium{font-family:Overpass,Noto Sans,Noto Sans CJK JP,Yu Gothic,Hiragino Sans,TakaoPGothic,PingFang SC,Microsoft YaHei,微软雅黑,sans-serif;letter-spacing:-.0010718114rem;font-weight:700}.ilo--form-control--label__size__large{font-size:1rem;line-height:1.3001071811rem}.ilo--form-control--label label{font-family:inherit;font-size:inherit;letter-spacing:inherit;line-height:inherit;font-weight:inherit}.ilo--form-control--label div[class*=tooltip]{margin-left:.4287245445rem}[dir=rtl] .ilo--form-control--label div[class*=tooltip]{margin-right:.4287245445rem}.ilo--form-control--helper{grid-area:h;color:#6d6d6d;font-family:Noto Sans,Noto Sans CJK JP,Yu Gothic,Hiragino Sans,TakaoPGothic,PingFang SC,Microsoft YaHei,微软雅黑,sans-serif;font-size:11.94px;letter-spacing:normal;line-height:16.24px}.ilo--form-control .ilo--tooltip--wrapper{bottom:.1071811361rem}
@@ -0,0 +1 @@
1
+ @charset "UTF-8";.ilo--h1,.ilo--h2,.ilo--h3,.ilo--h4,.ilo--h5,.ilo--h6{color:inherit;font-family:Overpass,Noto Sans,Noto Sans CJK JP,Yu Gothic,Hiragino Sans,TakaoPGothic,PingFang SC,Microsoft YaHei,微软雅黑,sans-serif;font-weight:700}.ilo--h1--default,.ilo--h2--default,.ilo--h3--default,.ilo--h4--default,.ilo--h5--default,.ilo--h6--default{color:#2d2d2d}.ilo--h1--actionable,.ilo--h2--actionable,.ilo--h3--actionable,.ilo--h4--actionable,.ilo--h5--actionable,.ilo--h6--actionable{color:#960a55}.ilo--h1--light,.ilo--h2--light,.ilo--h3--light,.ilo--h4--light,.ilo--h5--light,.ilo--h6--light{color:#fff}.ilo--h1{font-size:45.56px;letter-spacing:-.035em;line-height:52.39px}@media screen and (min-width:610px){.ilo--h1{font-size:56.95px;letter-spacing:-.035em;line-height:65.49px}}.ilo--h2{font-size:36.45px;letter-spacing:-.035em;line-height:43.74px}@media screen and (min-width:610px){.ilo--h2{font-size:45.56px;letter-spacing:-.035em;line-height:52.39px}}.ilo--h3{font-size:29.16px;letter-spacing:-.035em;line-height:36.45px}@media screen and (min-width:610px){.ilo--h3{font-size:36.45px;letter-spacing:-.035em;line-height:43.74px}}.ilo--h4{font-size:23.32px;letter-spacing:-.035em;line-height:29.15px}@media screen and (min-width:610px){.ilo--h4{font-size:29.16px;letter-spacing:-.035em;line-height:36.45px}}.ilo--h5{font-size:18.66px;letter-spacing:-.035em;line-height:24.26px}@media screen and (min-width:610px){.ilo--h5{font-size:23.32px;letter-spacing:-.035em;line-height:29.15px}}.ilo--h6{font-size:18.66px;letter-spacing:-.035em;line-height:24.26px}@media screen and (min-width:610px){.ilo--h6{font-size:18.66px;letter-spacing:-.035em;line-height:24.26px}}
@@ -0,0 +1 @@
1
+ .hero{--added-offset:0px;--base-offset:calc(((100vw - 1300px) / 2));--breadcrumb-padding:max(var(--base-offset),0.857449089rem);--card-padding-start:71px;--corner-cut-height:40px;width:100%;display:grid;position:relative;grid-template-columns:1fr;overflow:hidden;grid-template-rows:minmax(1rem,1fr) 27px 40px auto;--card-width:625px;--corner-cut-height:64px;--breadcrumbs-height:48px;--image-gap:240px;--row-1-lg:var(--breadcrumbs-height);--row-2-lg:calc(var(--image-gap) - var(--breadcrumbs-height));--row-3-lg:auto;--row-4-lg:27px;--row-5-lg:72px;--col-1-lg:0;--col-2-lg:var(--card-width);--col-3-lg:30px;--col-4-lg:1fr;grid-template-rows:var(--row-1-lg) var(--row-2-lg) var(--row-3-lg) var(--row-4-lg);grid-template-columns:var(--col-1-lg) var(--col-2-lg) var(--col-3-lg) var(--col-4-lg)}.hero--image{display:grid;grid-template-rows:minmax(216px,1fr) 27px 40px auto}.hero__gap__transparent{background:0 0}.hero__gap__white{background-color:#fff}.hero__gap__light{background-color:#ebf5fd}.hero__gap__dark{background-color:#230050}.hero--background{display:grid;background-color:#ebf5fd;position:relative;grid-area:1/1/4/2}.hero--background img{position:absolute;object-fit:cover;width:100%;height:100%}.hero--card{grid-area:3/1/5/2}.hero--caption{grid-area:2/1/3/2}.hero--caption--wrapper{background:#2d2d2d;height:27px;width:30px;display:flex;justify-content:center;align-items:center}.hero--caption--wrapper:after{content:"";position:absolute;top:0;width:0;height:0;border-top:27px solid transparent;left:100%;border-right:none;border-left:23px solid #2d2d2d}.hero__poster-size__small{--image-gap:112px}.hero__poster-size__medium{--image-gap:176px}.hero__poster-size__large{--image-gap:240px}.hero__poster-size__xlarge{--image-gap:527px}.hero__card-size__small{--card-width:625px}.hero__card-size__medium{--card-width:721px}.hero__card-size__large{--card-width:856px}.hero__card-size__xlarge{--card-width:920px}.hero__card-size__xxlarge{--card-width:998px}.hero__card-justify__offset,.hero__card-justify__start{--card-padding-start:max(16px,min(var(--base-offset) + var(--added-offset),71px));--col-1-lg:calc(var(--base-offset) - 71px + var(--added-offset))}.hero__card-justify__offset{--added-offset:109px}.hero__card-justify__center{--col-1-lg:calc((100% - var(--card-width)) / 2);--col-4-lg:calc(((100% - var(--card-width)) / 2) - 30px)}.hero__card-align__center{--row-4-lg:45px;--row-5-lg:27px}.hero__card-align__bottom{--row-3-lg:0;--row-4-lg:var(--corner-cut-height);--row-5-lg:auto}.hero__card-background__transparent .hero--card-offset{background-color:transparent!important}.hero__card-theme__dark .hero--card-offset{background-color:#230050;position:relative;box-shadow:.3px 0 0 0 #230050}.hero__card-theme__dark[class*=semi-transparent] .hero--card-offset{background:rgba(35,0,80,.6);box-shadow:.3px 0 0 0 rgba(35,0,80,.6)}.hero__card-theme__light .hero--card-offset{background:#fff;box-shadow:.3px 0 0 0 #fff}.hero__card-theme__light[class*=semi-transparent] .hero--card-offset{background:hsla(0,0%,100%,.6);box-shadow:.3px 0 0 0 hsla(0,0%,100%,.6)}.hero--breadcrumbs{grid-area:1/1/2/5;z-index:1;display:flex;flex-flow:row nowrap}.hero--breadcrumbs--wrapper{width:100%}.hero--background{grid-area:1/1/5/5}.hero__card-align__center .hero--background{grid-area:1/1/6/5}.hero__card-align__bottom .hero--background{grid-area:1/1/5/5}.hero--card-offset{grid-area:3/1/6/2;z-index:0;position:relative}.hero__card-justify__center .hero--card-offset,.hero__card-justify__offset .hero--card-offset{background:0 0!important}.hero__card-align__center .hero--card-offset{grid-area:3/1/4/2}.hero__card-align__bottom .hero--card-offset{grid-area:4/1/6/2}.hero--card{grid-area:3/2/6/3}.hero__card-align__center .hero--card{grid-area:3/2/4/3}.hero__card-align__bottom .hero--card{grid-area:4/2/6/3}.hero--caption{grid-area:4/3/5/4;position:relative}.hero__card-align__center .hero--caption{grid-area:5/1/6/3}.hero__card-align__bottom .hero--caption{grid-area:4/1/5/2}.hero__card-align__bottom .hero--caption--wrapper,.hero__card-align__center .hero--caption--wrapper{position:absolute;left:0;bottom:0}.hero__card-align__bottom.hero__card-justify__start .hero--caption{grid-area:1/1/3/3}.hero__card-align__bottom.hero__card-justify__offset .hero--caption{grid-area:1/2/3/3}.hero__card-align__bottom.hero__card-justify__offset .hero--caption .hero--caption--wrapper,.hero__card-align__bottom.hero__card-justify__start .hero--caption .hero--caption--wrapper{background:#2d2d2d;height:27px;width:30px;display:flex;justify-content:center;align-items:center;position:absolute;left:0;right:auto;bottom:0}.hero__card-align__bottom.hero__card-justify__offset .hero--caption .hero--caption--wrapper:after,.hero__card-align__bottom.hero__card-justify__start .hero--caption .hero--caption--wrapper:after{content:"";position:absolute;top:0;width:0;height:0;border-top:27px solid transparent;left:100%;border-right:none;border-left:23px solid #2d2d2d}.hero--caption--wrapper{left:2px}[dir=rtl] .hero--caption--wrapper{background:#2d2d2d;height:27px;width:30px;display:flex;justify-content:center;align-items:center;right:0;position:absolute}[dir=rtl] .hero--caption--wrapper:after{content:"";position:absolute;top:0;width:0;height:0;border-top:27px solid transparent;left:auto;right:100%;border-left:none;border-right:23px solid #2d2d2d}[dir=rtl] .hero__card-align__bottom.hero__card-justify__offset .hero--caption--wrapper,[dir=rtl] .hero__card-align__bottom.hero__card-justify__start .hero--caption--wrapper{background:#2d2d2d;height:27px;width:30px;display:flex;justify-content:center;align-items:center;position:absolute;left:auto;right:0;bottom:0}[dir=rtl] .hero__card-align__bottom.hero__card-justify__offset .hero--caption--wrapper:after,[dir=rtl] .hero__card-align__bottom.hero__card-justify__start .hero--caption--wrapper:after{content:"";position:absolute;top:0;width:0;height:0;border-top:27px solid transparent;left:auto;right:100%;border-left:none;border-right:23px solid #2d2d2d}
@@ -0,0 +1,65 @@
1
+ {# hero.twig #}
2
+
3
+ {% set theme = theme|default(herocard.theme) %}
4
+ {% set background = background|default(herocard.background) %}
5
+
6
+ <div class="hero {% if gap %} hero__gap__{{ gap }} {% endif %} hero__card-justify__{{ justify }} hero__poster-size__{{ postersize }} hero__card-size__{{ cardsize }} hero__card-align__{{ align }} hero__card-theme__{{ theme }} hero__card-background__{{ background }}">
7
+ <figure class="hero--background">
8
+ {% block hero_image %}
9
+ {% if image %}
10
+ <picture class="hero--image">
11
+ {% for img in image.url|reverse %}
12
+ {% if loop.last == false %}
13
+ {% if img.breakpoint matches '/^\\d+$/' %}
14
+ <source srcset="{{img.src}}" media="(min-width: {{img.breakpoint}}px)">
15
+ {% else %}
16
+ <source srcset="{{img.src}}" media="{{img.breakpoint}}">
17
+ {% endif %}
18
+ {% endif %}
19
+ {% endfor %}
20
+ <img class="ilo--card--image" src="{{image.url|reverse|last.src}}" alt="{{image.alt}}" {% if image.loading %} loading="{{ image.loading }}" {% endif %}>
21
+ </picture>
22
+ {% endif %}
23
+ {% endblock %}
24
+ </figure>
25
+ {% if breadcrumb %}
26
+ <div class="hero--breadcrumbs">
27
+ <div class="hero--breadcrumbs--wrapper">
28
+ {% include "@components/breadcrumb/breadcrumb.twig" with {
29
+ home: breadcrumb.home,
30
+ links: breadcrumb.links,
31
+ prefix: prefix,
32
+ } only %}
33
+ </div>
34
+ </div>
35
+ {% endif %}
36
+ <div class="hero--card-offset"></div>
37
+ <div class="hero--card">
38
+ {% include "@components/herocard/herocard.twig" with {
39
+ url: herocard.url,
40
+ eyebrow: herocard.eyebrow,
41
+ cornercut: herocard.cornercut,
42
+ datecopy: herocard.datecopy,
43
+ intro: herocard.intro,
44
+ prefix: prefix,
45
+ socialmedia: herocard.socialmedia,
46
+ theme: theme,
47
+ background: background,
48
+ title: herocard.title,
49
+ } only %}
50
+ </div>
51
+ <div class="hero--caption">
52
+ {% if not caption %}
53
+ {% else %}
54
+ <div class="hero--caption--wrapper">
55
+ {% include '@components/tooltip/tooltip.twig' with {
56
+ prefix: prefix,
57
+ label: caption.label,
58
+ icon: "true",
59
+ theme: "dark",
60
+ icontheme: "dark"
61
+ } only %}
62
+ </div>
63
+ {% endif %}
64
+ </div>
65
+ </div>
@@ -0,0 +1,182 @@
1
+ hero:
2
+ use: "@components/hero/hero.twig"
3
+ namespace: Components/Content
4
+ label: Hero
5
+ description: The Hero is an attention-grabbing section of a web page designed to engage users and create a memorable first impression.
6
+ fields:
7
+ image:
8
+ label: Image
9
+ type: object
10
+ description: The image to display in the hero. The image will be cropped to fit the hero's aspect ratio.
11
+ preview:
12
+ alt: Lorem ipsum
13
+ loading: lazy
14
+ url:
15
+ - breakpoint: 0
16
+ src: "/images/hero.jpg"
17
+ - breakpoint: 768
18
+ src: "/images/hero.jpg"
19
+ breadcrumb:
20
+ label: Bread crumbs
21
+ description: The breadcrumb navigation to display in the hero.
22
+ type: object
23
+ preview:
24
+ home:
25
+ label: "Home"
26
+ url: "/"
27
+ links:
28
+ - label: "Link One"
29
+ url: "/linkone"
30
+ - label: "Link Two"
31
+ url: "/linktwo"
32
+ - label: "Link Three"
33
+ url: "/linkthree"
34
+ - label: "Link Four"
35
+ url: "/linkfour"
36
+ - label: "Link Five"
37
+ url: "/linkfive"
38
+ - label: "Link Six"
39
+ url: "/linksix"
40
+ herocard:
41
+ label: Hero Card
42
+ type: object
43
+ description: The hero card to display in the hero. See docs on the Hero Card component for more information about the fields.
44
+ preview:
45
+ title: "Child labour"
46
+ theme: "dark"
47
+ background: "solid"
48
+ cornercut: "true"
49
+ eyebrow: ILO Topics
50
+ socialmedia:
51
+ icons:
52
+ - label: "Facebook"
53
+ url: "https://www.facebook.com/ilo.org"
54
+ icon: "facebook"
55
+ - label: "Twitter"
56
+ url: "https://www.twitter.com/ilo.org"
57
+ icon: "twitter"
58
+ - label: "Linkedin"
59
+ url: "https://www.linkedin.com/company/international-labour-organization-ilo"
60
+ icon: "linkedin"
61
+ caption:
62
+ label: Caption
63
+ type: object
64
+ description: The credit and caption information about the image. Appears as a tooltip.
65
+ preview:
66
+ label: A metalurgy worker at a manufacturing plant in Viet Nam. © ILO/Minh Quang
67
+ settings:
68
+ gap:
69
+ label: Gap
70
+ description: The color of the gap between the bottom of the hero image and the bottom of the card if there is one. In practice, this is the background color of the entire Hero component which will usually only be visible in that space.
71
+ type: select
72
+ options:
73
+ transparent: transparent
74
+ white: white
75
+ light: light
76
+ dark: dark
77
+ justify:
78
+ label: Justify
79
+ description: Sets the horizontal alignment of the hero card. `start` is on the left in LTR layouts and on the right in RTL layouts.
80
+ type: select
81
+ options:
82
+ start: start
83
+ offset: offset
84
+ center: center
85
+ preview: "start"
86
+ align:
87
+ label: Align
88
+ description: Sets the vertical alignment of the hero card.
89
+ type: select
90
+ options:
91
+ baseline: baseline
92
+ center: center
93
+ bottom: bottom
94
+ preview: "baseline"
95
+ postersize:
96
+ label: Poster Size
97
+ description: Sets the size of the image poster.
98
+ type: select
99
+ options:
100
+ small: small
101
+ medium: medium
102
+ large: large
103
+ xlarge: xlarge
104
+ preview: large
105
+ cardsize:
106
+ label: Card Size
107
+ description: Sets the width of the hero card.
108
+ type: select
109
+ options:
110
+ small: small
111
+ medium: medium
112
+ large: large
113
+ xlarge: xlarge
114
+ xxlarge: xxlarge
115
+ preview: small
116
+ background:
117
+ type: select
118
+ label: Background
119
+ description: Should the background be solid, semi-transparent or transparent
120
+ options:
121
+ solid: solid
122
+ semi-transparent: semi-transparent
123
+ transparent: transparent
124
+ preview: "solid"
125
+ theme:
126
+ type: select
127
+ label: Theme
128
+ description: The theme of the hero card.
129
+ options:
130
+ light: light
131
+ dark: dark
132
+ preview: "dark"
133
+ variants:
134
+ default:
135
+ label: Default
136
+ homepage:
137
+ label: Homepage
138
+ description: The hero variant for the homepage.
139
+ settings:
140
+ align: "center"
141
+ justify: "start"
142
+ postersize: "large"
143
+ cardsize: "medium"
144
+ fields:
145
+ breadcrumb: null
146
+ herocard:
147
+ title: "ILO welcomes G7 call to make a just transition to a green economy happen"
148
+ url: "https://www.ilo.org"
149
+ theme: "dark"
150
+ background: "semi-transparent"
151
+ cornercut: false
152
+ eyebrow: UN General Assembly
153
+ article:
154
+ label: Article
155
+ settings:
156
+ align: "bottom"
157
+ justify: "center"
158
+ postersize: "xlarge"
159
+ cardsize: "large"
160
+ fields:
161
+ breadcrumb: null
162
+ herocard:
163
+ title: "When a woman becomes a boss in a man's world"
164
+ datecopy: "11 February 2021"
165
+ theme: "light"
166
+ background: "solid"
167
+ cornercut: "true"
168
+ eyebrow: Women in management
169
+ socialmedia:
170
+ icons:
171
+ - label: "Facebook"
172
+ url: "https://www.facebook.com/ilo.org"
173
+ icon: "facebook"
174
+ - label: "Twitter"
175
+ url: "https://www.twitter.com/ilo.org"
176
+ icon: "twitter"
177
+ - label: "Linkedin"
178
+ url: "https://www.linkedin.com/company/international-labour-organization-ilo"
179
+ icon: "linkedin"
180
+ caption:
181
+ label: A metalurgy worker at a manufacturing plant in Viet Nam. © ILO/Minh Quang
182
+ visibility: storybook
@@ -0,0 +1 @@
1
+ @charset "UTF-8";.ilo--hero-card{height:100%;position:relative;padding:40px 16px}@media screen and (min-width:1024px){.ilo--hero-card{padding-block:56px;padding-inline-end:71px;padding-inline-start:var(--card-padding-start)}}.ilo--hero-card--title-link{color:inherit;text-decoration:none}.ilo--hero-card--title-link:hover{text-decoration:underline}.ilo--hero-card__theme__light{color:#2d2d2d;background:#fff}@media screen and (min-width:1024px){.ilo--hero-card__theme__light.ilo--hero-card__background__semi-transparent{background:hsla(0,0%,100%,.6)}}.ilo--hero-card__theme__dark{background:#230050;color:#fff}@media screen and (min-width:1024px){.ilo--hero-card__theme__dark.ilo--hero-card__background__semi-transparent{background:rgba(35,0,80,.6)}}@media screen and (min-width:1024px){.ilo--hero-card__theme__dark.ilo--hero-card__background__transparent,.ilo--hero-card__theme__light.ilo--hero-card__background__transparent{color:#fff;background:0 0}.ilo--hero-card__theme__dark.ilo--hero-card__background__transparent *,.ilo--hero-card__theme__light.ilo--hero-card__background__transparent *{filter:drop-shadow(1px 1px 12px rgb(45,45,45))}}.ilo--hero-card__cornercut,[dir=rtl] .ilo--hero-card__cornercut{clip-path:polygon(0 0,calc(100% - 72px) 0,100% 40px,100% 100%,0 100%)}[dir=rtl] .ilo--hero-card__cornercut{clip-path:polygon(72px 0,100% 0,100% 100%,0 100%,0 40px)}@media screen and (min-width:1024px){.ilo--hero-card__cornercut,[dir=rtl] .ilo--hero-card__cornercut{clip-path:polygon(0 0,calc(100% - 116px) 0,100% 64px,100% 100%,0 100%)}[dir=rtl] .ilo--hero-card__cornercut{clip-path:polygon(116px 0,100% 0,100% 100%,0 100%,0 64px)}}.ilo--hero-card--datecopy{font-size:16px;letter-spacing:normal;line-height:23.36px;margin-bottom:1.5005359057rem;color:#6d6d6d}.ilo--hero-card__theme__dark .ilo--hero-card--datecopy{color:#fff}.ilo--hero-card__theme__light .ilo--hero-card--datecopy{color:#6d6d6d}.ilo--hero-card__background__semi-transparent .ilo--hero-card--datecopy,.ilo--hero-card__background__transparent .ilo--hero-card--datecopy{color:#fff}.ilo--hero-card--eyebrow{font-size:16px;letter-spacing:normal;line-height:23.36px;margin-bottom:.857449089rem;color:#960a55}.ilo--hero-card__theme__dark .ilo--hero-card--eyebrow{color:#fff}.ilo--hero-card__theme__light .ilo--hero-card--eyebrow{color:#960a55}.ilo--hero-card__background__transparent .ilo--hero-card--eyebrow{color:#fff}.ilo--hero-card--intro{font-size:16px;letter-spacing:normal;line-height:23.36px;margin-bottom:1.5005359057rem}@media screen and (min-width:1024px){.ilo--hero-card--intro{font-size:18.66px;letter-spacing:normal;line-height:27.24px}}.ilo--hero-card--title{font-size:36.45px;letter-spacing:-.035em;line-height:43.74px;margin-bottom:1.1117935901rem;font-family:Overpass,Noto Sans,Noto Sans CJK JP,Yu Gothic,Hiragino Sans,TakaoPGothic,PingFang SC,Microsoft YaHei,微软雅黑,sans-serif;font-weight:700}@media screen and (min-width:1024px){.ilo--hero-card--title{font-size:45.56px;letter-spacing:-.035em;line-height:52.39px}}
@@ -0,0 +1,30 @@
1
+ {#
2
+ HEROCARD COMPONENT
3
+ #}
4
+ <div class="ilo--hero-card ilo--hero-card__theme__{{ theme }} ilo--hero-card__background__{{ background }} {% if cornercut == "true" %} ilo--hero-card__cornercut {% endif %}">
5
+ {% if eyebrow %}
6
+ <p class="{{ prefix }}--hero-card--eyebrow">{{ eyebrow }}</p>
7
+ {% endif %}
8
+ {% if title %}
9
+ {% if url %}
10
+ <a href={{ url }} class="{{ prefix }}--hero-card--title-link">
11
+ <h1 class="{{ prefix }}--hero-card--title">{{ title }}</h1>
12
+ </a>
13
+ {% else %}
14
+ <h1 class="{{ prefix }}--hero-card--title">{{ title }}</h2>
15
+ {% endif %}
16
+ {% endif %}
17
+ {% if intro %}
18
+ <p class="{{ prefix }}--hero-card--intro">{{ intro }}</p>
19
+ {% endif %}
20
+ {% if datecopy %}
21
+ <p class="{{ prefix }}--hero-card--datecopy">{{ datecopy }}</p>
22
+ {% endif %}
23
+ {% if socialmedia %}
24
+ {% include "@components/socialmedia/socialmedia.twig" with {
25
+ theme: theme,
26
+ align: "start",
27
+ icons: socialmedia.icons
28
+ } %}
29
+ {% endif %}
30
+ </div>
@@ -0,0 +1,71 @@
1
+ herocard:
2
+ namespace: Components/Content
3
+ use: "@components/herocard/herocard.twig"
4
+ label: Hero Card
5
+ description: The Hero Card includes the title, intro, date, and social links for the hero
6
+ id: herocard
7
+ settings:
8
+ theme:
9
+ type: select
10
+ label: Theme
11
+ description: The theme of the hero card.
12
+ options:
13
+ light: light
14
+ dark: dark
15
+ preview: "dark"
16
+ background:
17
+ type: select
18
+ label: Background
19
+ description: Should the background be solid, semi-transparent or transparent
20
+ options:
21
+ solid: solid
22
+ semi-transparent: semi-transparent
23
+ transparent: transparent
24
+ preview: "solid"
25
+ cornercut:
26
+ type: select
27
+ label: Cornercut
28
+ description: Whether the card show have its right or left corner cut
29
+ options:
30
+ "true": "true"
31
+ "false": "false"
32
+ preview: "true"
33
+ fields:
34
+ url:
35
+ type: string
36
+ label: URL
37
+ description: Optional URL for the hero card. If provided, the title will be a link.
38
+ preview: null
39
+ datecopy:
40
+ type: string
41
+ label: Date copy
42
+ description: Date byline copy
43
+ preview: "11 February 2021"
44
+ eyebrow:
45
+ type: string
46
+ label: Eyebrow
47
+ description: Copy for the eyebrow of the card
48
+ preview: "Gender equality"
49
+ intro:
50
+ type: string
51
+ label: Intro
52
+ description: Intro text for the hero
53
+ preview: "Over the last three decades, global supply chains have been a key entry point for women to enter the formal workforce."
54
+ socialmedia:
55
+ type: object
56
+ label: Social media links
57
+ description: The social links to include in the hero
58
+ preview:
59
+ icons:
60
+ - label: "Facebook"
61
+ url: "https://www.facebook.com/"
62
+ icon: "facebook"
63
+ - label: "Linkedin"
64
+ url: "https://www.linkedin.com/"
65
+ icon: "linkedin"
66
+ title:
67
+ type: string
68
+ label: Title
69
+ description: This is the title for the hero card
70
+ preview: "How to achieve gender equality in global garment supply chains"
71
+ visibility: storybook