@ilo-org/twig 0.16.3 → 0.17.1

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 (304) hide show
  1. package/README.md +2 -8
  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/accordion-item/accordion-item.twig +22 -0
  7. package/dist/components/breadcrumb/breadcrumb.behavior.js +1 -0
  8. package/dist/components/breadcrumb/breadcrumb.css +1 -0
  9. package/dist/components/breadcrumb/breadcrumb.twig +43 -0
  10. package/dist/components/breadcrumb/breadcrumb.wingsuit.yml +36 -0
  11. package/dist/components/button/button.css +1 -0
  12. package/dist/components/button/button.twig +23 -0
  13. package/dist/components/button/button.wingsuit.yml +114 -0
  14. package/dist/components/callout/callout.behavior.js +1 -0
  15. package/dist/components/callout/callout.css +1 -0
  16. package/dist/components/callout/callout.twig +41 -0
  17. package/dist/components/callout/callout.wingsuit.yml +72 -0
  18. package/dist/components/card/card.css +1 -0
  19. package/dist/components/card/card.twig +24 -0
  20. package/dist/components/card/card.wingsuit.yml +227 -0
  21. package/dist/components/card_data/card_data.twig +101 -0
  22. package/dist/components/card_data/card_data.wingsuit.yml +135 -0
  23. package/dist/components/card_detail/card_detail.twig +37 -0
  24. package/dist/components/card_detail/card_detail.wingsuit.yml +71 -0
  25. package/dist/components/card_factlist/card_factlist.twig +21 -0
  26. package/dist/components/card_factlist/card_factlist.wingsuit.yml +46 -0
  27. package/dist/components/card_feature/card_feature.twig +39 -0
  28. package/dist/components/card_feature/card_feature.wingsuit.yml +80 -0
  29. package/dist/components/card_multilink/card_multilink.twig +45 -0
  30. package/dist/components/card_multilink/card_multilink.wingsuit.yml +91 -0
  31. package/dist/components/card_promo/card_promo.twig +35 -0
  32. package/dist/components/card_promo/card_promo.wingsuit.yml +71 -0
  33. package/dist/components/card_stat/card_stat.twig +24 -0
  34. package/dist/components/card_stat/card_stat.wingsuit.yml +44 -0
  35. package/dist/components/card_text/card_text.twig +35 -0
  36. package/dist/components/card_text/card_text.wingsuit.yml +57 -0
  37. package/dist/components/cardgroup/cardgroup.css +1 -0
  38. package/dist/components/cardgroup/cardgroup.twig +46 -0
  39. package/dist/components/cardgroup/cardgroup.wingsuit.yml +158 -0
  40. package/dist/components/checkbox/checkbox.css +1 -0
  41. package/dist/components/checkbox/checkbox.twig +17 -0
  42. package/dist/components/checkbox/checkbox.wingsuit.yml +83 -0
  43. package/dist/components/container/container.css +1 -0
  44. package/dist/components/contextmenu/contextmenu.css +1 -0
  45. package/dist/components/contextmenu/contextmenu.twig +12 -0
  46. package/dist/components/contextmenu/contextmenu.wingsuit.yml +24 -0
  47. package/dist/components/credit/credit.css +1 -0
  48. package/dist/components/datacard/datacard.css +1 -0
  49. package/dist/components/datepicker/datepicker.css +1 -0
  50. package/dist/components/datepicker/datepicker.twig +20 -0
  51. package/dist/components/datepicker/datepicker.wingsuit.yml +72 -0
  52. package/dist/components/detailcard/detailcard.css +1 -0
  53. package/dist/components/dropdown/dropdown.css +1 -0
  54. package/dist/components/dropdown/dropdown.twig +22 -0
  55. package/dist/components/dropdown/dropdown.wingsuit.yml +100 -0
  56. package/dist/components/empty/empty.css +1 -0
  57. package/dist/components/factlistcard/factlistcard.css +1 -0
  58. package/dist/components/featurecard/featurecard.css +1 -0
  59. package/dist/components/fieldset/fieldset.css +1 -0
  60. package/dist/components/fieldset/fieldset.twig +70 -0
  61. package/dist/components/file-upload/file-upload.css +1 -0
  62. package/dist/components/fileupload/fileupload.behavior.js +1 -0
  63. package/dist/components/fileupload/fileupload.twig +20 -0
  64. package/dist/components/fileupload/fileupload.wingsuit.yml +94 -0
  65. package/dist/components/footer/footer.css +1 -0
  66. package/dist/components/footer/footer.twig +63 -0
  67. package/dist/components/footer/footer.wingsuit.yml +106 -0
  68. package/dist/components/form/form.css +1 -0
  69. package/dist/components/form/form.twig +19 -0
  70. package/dist/components/form/form.wingsuit.yml +205 -0
  71. package/dist/components/formcontrol/formcontrol.css +1 -0
  72. package/dist/components/formcontrol/formcontrol.twig +89 -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/input/input.twig +10 -0
  89. package/dist/components/link/link.css +1 -0
  90. package/dist/components/link/link.twig +8 -0
  91. package/dist/components/link/link.wingsuit.yml +36 -0
  92. package/dist/components/linklist/linklist.behavior.js +1 -0
  93. package/dist/components/linklist/linklist.css +1 -0
  94. package/dist/components/linklist/linklist.twig +26 -0
  95. package/dist/components/linklist/linklist.wingsuit.yml +55 -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.twig +6 -0
  100. package/dist/components/list-item/list-item.wingsuit.yml +19 -0
  101. package/dist/components/loading/loading.behavior.js +1 -0
  102. package/dist/components/loading/loading.css +1 -0
  103. package/dist/components/loading/loading.twig +8 -0
  104. package/dist/components/loading/loading.wingsuit.yml +39 -0
  105. package/dist/components/localnav/localnav.twig +86 -0
  106. package/dist/components/localnav/localnav.wingsuit.yml +88 -0
  107. package/dist/components/logo/logo.css +1 -0
  108. package/dist/components/logogrid/logogrid.css +1 -0
  109. package/dist/components/logogrid/logogrid.twig +17 -0
  110. package/dist/components/logogrid/logogrid.wingsuit.yml +45 -0
  111. package/dist/components/modal/modal.behavior.js +1 -0
  112. package/dist/components/modal/modal.css +1 -0
  113. package/dist/components/modal/modal.twig +20 -0
  114. package/dist/components/modal/modal.wingsuit.yml +61 -0
  115. package/dist/components/multilinkcard/multilinkcard.css +1 -0
  116. package/dist/components/navigation/navigation.behavior.js +1 -0
  117. package/dist/components/navigation/navigation.css +1 -0
  118. package/dist/components/navigation/navigation.twig +171 -0
  119. package/dist/components/navigation/navigation.wingsuit.yml +126 -0
  120. package/dist/components/notification/notification.behavior.js +1 -0
  121. package/dist/components/notification/notification.css +1 -0
  122. package/dist/components/notification/notification.twig +18 -0
  123. package/dist/components/notification/notification.wingsuit.yml +59 -0
  124. package/dist/components/numberpicker/numberpicker.twig +16 -0
  125. package/dist/components/numberpicker/numberpicker.wingsuit.yml +91 -0
  126. package/dist/components/pagination/pagination.css +1 -0
  127. package/dist/components/pagination/pagination.twig +49 -0
  128. package/dist/components/pagination/pagination.wingsuit.yml +75 -0
  129. package/dist/components/picture/picture.twig +21 -0
  130. package/dist/components/polyfill/polyfill.twig +10 -0
  131. package/dist/components/profile/profile.css +1 -0
  132. package/dist/components/profile/profile.twig +26 -0
  133. package/dist/components/profile/profile.wingsuit.yml +46 -0
  134. package/dist/components/promocard/promocard.css +1 -0
  135. package/dist/components/radio/radio.css +1 -0
  136. package/dist/components/radio/radio.twig +23 -0
  137. package/dist/components/radio/radio.wingsuit.yml +83 -0
  138. package/dist/components/readmore/readmore.behavior.js +1 -0
  139. package/dist/components/readmore/readmore.css +1 -0
  140. package/dist/components/readmore/readmore.twig +16 -0
  141. package/dist/components/readmore/readmore.wingsuit.yml +37 -0
  142. package/dist/components/richtext/richtext.css +1 -0
  143. package/dist/components/richtext/richtext.twig +6 -0
  144. package/dist/components/richtext/richtext.wingsuit.yml +13 -0
  145. package/dist/components/search/search.behavior.js +1 -0
  146. package/dist/components/search/search.twig +31 -0
  147. package/dist/components/search/search.wingsuit.yml +89 -0
  148. package/dist/components/searchfield/searchfield.css +1 -0
  149. package/dist/components/socialmedia/socialmedia.css +1 -0
  150. package/dist/components/socialmedia/socialmedia.twig +17 -0
  151. package/dist/components/socialmedia/socialmedia.wingsuit.yml +59 -0
  152. package/dist/components/statcard/statcard.css +1 -0
  153. package/dist/components/table/table.behavior.js +1 -0
  154. package/dist/components/table/table.css +1 -0
  155. package/dist/components/table/table.twig +39 -0
  156. package/dist/components/table/table.wingsuit.yml +112 -0
  157. package/dist/components/tableofcontents/tableofcontents.behavior.js +1 -0
  158. package/dist/components/tableofcontents/tableofcontents.css +1 -0
  159. package/dist/components/tableofcontents/tableofcontents.twig +47 -0
  160. package/dist/components/tableofcontents/tableofcontents.wingsuit.yml +44 -0
  161. package/dist/components/tabs/tabs.behavior.js +1 -0
  162. package/dist/components/tabs/tabs.css +1 -0
  163. package/dist/components/tabs/tabs.twig +26 -0
  164. package/dist/components/tabs/tabs.wingsuit.yml +169 -0
  165. package/dist/components/tag/tag.behavior.js +1 -0
  166. package/dist/components/tag/tag.css +1 -0
  167. package/dist/components/tag/tag.twig +30 -0
  168. package/dist/components/tag/tag.wingsuit.yml +43 -0
  169. package/dist/components/tags/tags.twig +15 -0
  170. package/dist/components/tags/tags.wingsuit.yml +45 -0
  171. package/dist/components/textarea/textarea.css +1 -0
  172. package/dist/components/textarea/textarea.twig +14 -0
  173. package/dist/components/textarea/textarea.wingsuit.yml +126 -0
  174. package/dist/components/textcard/textcard.css +1 -0
  175. package/dist/components/textinput/textinput.css +1 -0
  176. package/dist/components/textinput/textinput.twig +14 -0
  177. package/dist/components/textinput/textinput.wingsuit.yml +86 -0
  178. package/dist/components/toggle/toggle.css +1 -0
  179. package/dist/components/toggle/toggle.twig +36 -0
  180. package/dist/components/toggle/toggle.wingsuit.yml +94 -0
  181. package/dist/components/tooltip/tooltip.behavior.js +1 -0
  182. package/dist/components/tooltip/tooltip.css +1 -0
  183. package/dist/components/tooltip/tooltip.twig +14 -0
  184. package/dist/components/tooltip/tooltip.wingsuit.yml +53 -0
  185. package/dist/components/video/video.behavior.js +16 -0
  186. package/dist/components/video/video.css +1 -0
  187. package/dist/components/video/video.twig +18 -0
  188. package/dist/components/video/video.wingsuit.yml +82 -0
  189. package/dist/components/videoplayer/videoplayer.twig +8 -0
  190. package/dist/global/styles.css +2 -0
  191. package/package.json +46 -17
  192. package/src/patterns/components/accordion/accordion-item.twig +1 -1
  193. package/src/patterns/components/accordion/accordion.wingsuit.yml +2 -3
  194. package/src/patterns/components/breadcrumb/breadcrumb.twig +1 -1
  195. package/src/patterns/components/button/button.wingsuit.yml +8 -8
  196. package/src/patterns/components/callout/callout.wingsuit.yml +6 -6
  197. package/src/patterns/components/card/card.wingsuit.yml +10 -11
  198. package/src/patterns/components/card_detail/card_detail.wingsuit.yml +3 -3
  199. package/src/patterns/components/card_feature/card_feature.wingsuit.yml +3 -3
  200. package/src/patterns/components/card_multilink/card_multilink.wingsuit.yml +3 -3
  201. package/src/patterns/components/card_promo/card_promo.wingsuit.yml +3 -3
  202. package/src/patterns/components/cardgroup/cardgroup.wingsuit.yml +3 -3
  203. package/src/patterns/components/datepicker/datepicker.wingsuit.yml +1 -0
  204. package/src/patterns/components/fileupload/fileupload.wingsuit.yml +3 -3
  205. package/src/patterns/components/herocard/herocard.wingsuit.yml +2 -2
  206. package/src/patterns/components/icon/icon.wingsuit.yml +2 -2
  207. package/src/patterns/components/image/image.wingsuit.yml +3 -3
  208. package/src/patterns/components/list/list-item.twig +2 -2
  209. package/src/patterns/components/list/list.twig +34 -28
  210. package/src/patterns/components/list/list.wingsuit.yml +20 -9
  211. package/src/patterns/components/pagination/pagination.wingsuit.yml +4 -2
  212. package/src/patterns/components/readmore/readmore.twig +1 -1
  213. package/src/patterns/components/readmore/readmore.wingsuit.yml +3 -3
  214. package/src/patterns/components/richtext/richtext.twig +1 -1
  215. package/src/patterns/components/table/table.twig +2 -2
  216. package/src/patterns/components/table/table.wingsuit.yml +6 -6
  217. package/src/patterns/components/tags/tag.wingsuit.yml +3 -3
  218. package/src/patterns/components/tags/tags.wingsuit.yml +4 -4
  219. package/src/patterns/components/textarea/textarea.wingsuit.yml +2 -2
  220. package/src/patterns/components/tooltip/tooltip.twig +1 -1
  221. package/src/patterns/components/tooltip/tooltip.wingsuit.yml +2 -2
  222. package/.browserslistrc +0 -4
  223. package/.eslintrc.js +0 -25
  224. package/.stylelintignore +0 -9
  225. package/.stylelintrc +0 -19
  226. package/.turbo/turbo-build:lib.log +0 -9
  227. package/CHANGELOG.md +0 -1008
  228. package/apps/storybook/assets.js +0 -10
  229. package/apps/storybook/config/prefix.yml +0 -1
  230. package/apps/storybook/main.js +0 -27
  231. package/apps/storybook/manager-head.html +0 -65
  232. package/apps/storybook/manager.js +0 -7
  233. package/apps/storybook/patterns/colors.stories.mdx +0 -23
  234. package/apps/storybook/patterns/intro.stories.mdx +0 -184
  235. package/apps/storybook/patterns/typeset.stories.mdx +0 -32
  236. package/apps/storybook/patterns/welcome.stories.mdx +0 -62
  237. package/apps/storybook/preview-body.html +0 -4
  238. package/apps/storybook/preview-head.html +0 -5
  239. package/apps/storybook/preview.js +0 -36
  240. package/apps/storybook/styles.scss +0 -25
  241. package/apps/storybook/theme.js +0 -46
  242. package/babel.config.js +0 -16
  243. package/images/add.svg +0 -1
  244. package/images/arrow.svg +0 -1
  245. package/images/arrowleft.svg +0 -1
  246. package/images/arrowright.svg +0 -1
  247. package/images/breadcrumbdivider.svg +0 -1
  248. package/images/breadcrumbdividerrtl.svg +0 -1
  249. package/images/burger.svg +0 -1
  250. package/images/checkmark.svg +0 -1
  251. package/images/close.svg +0 -1
  252. package/images/copyright.svg +0 -1
  253. package/images/doublearrow.svg +0 -1
  254. package/images/elipsis.svg +0 -1
  255. package/images/equilateraltriangle.svg +0 -1
  256. package/images/error.svg +0 -1
  257. package/images/facebook.svg +0 -1
  258. package/images/favicon.ico +0 -0
  259. package/images/flickr.svg +0 -1
  260. package/images/footertriangle.svg +0 -1
  261. package/images/fullscreen.svg +0 -1
  262. package/images/global.svg +0 -1
  263. package/images/halfsquaretriangle.svg +0 -1
  264. package/images/hero.jpg +0 -0
  265. package/images/home.svg +0 -1
  266. package/images/ilo-dg.jpg +0 -0
  267. package/images/ilo-headquarters.jpg +0 -0
  268. package/images/info.svg +0 -1
  269. package/images/instagram.svg +0 -1
  270. package/images/large.jpg +0 -0
  271. package/images/linkedin.svg +0 -1
  272. package/images/listarrow.svg +0 -1
  273. package/images/listarrowreverse.svg +0 -1
  274. package/images/media-file-poster.jpg +0 -0
  275. package/images/medium.jpg +0 -0
  276. package/images/minus.svg +0 -1
  277. package/images/muted.svg +0 -1
  278. package/images/paginationarrow.svg +0 -1
  279. package/images/pause.svg +0 -1
  280. package/images/play.svg +0 -1
  281. package/images/publication.jpg +0 -0
  282. package/images/quote.svg +0 -1
  283. package/images/scalenerighttriangle.svg +0 -1
  284. package/images/scalenerighttrianglereverse.svg +0 -1
  285. package/images/search.svg +0 -1
  286. package/images/small.jpg +0 -0
  287. package/images/stemarrow.svg +0 -1
  288. package/images/success.svg +0 -1
  289. package/images/tiktok.svg +0 -1
  290. package/images/triangle.svg +0 -1
  291. package/images/triangledecoration.svg +0 -1
  292. package/images/trianglereverse.svg +0 -1
  293. package/images/twitter.svg +0 -1
  294. package/images/video-example.mp4 +0 -0
  295. package/images/volume.svg +0 -1
  296. package/images/warning.svg +0 -1
  297. package/images/youtube-video-poster.avif +0 -0
  298. package/images/youtube.svg +0 -1
  299. package/importprefix.js +0 -20
  300. package/importsvgs.js +0 -5
  301. package/jest.config.js +0 -18
  302. package/outputtwigs.js +0 -57
  303. package/postcss.config.js +0 -6
  304. package/wingsuit.config.js +0 -28
@@ -0,0 +1,70 @@
1
+ {# fieldset.twig #}
2
+
3
+ {% set baseClass = prefix ~ "--fieldset" %}
4
+ {% set wrapClass = baseClass ~ "--wrap__" ~ wrap %}
5
+ {% set directionClass = baseClass ~ "--direction__" ~ direction %}
6
+ {% set helperClass = baseClass ~ "--helper" %}
7
+ {% set errorClass = baseClass ~ "__error" %}
8
+ {% set disabledClass = baseClass ~ "__disabled" %}
9
+
10
+ {% set fieldsetClasses = [fieldsetClass, baseClass, wrapClass, directionClass, class] %}
11
+ {% if disabled %}
12
+ {% set fieldsetClasses = fieldsetClasses|merge([disabledClass]) %}
13
+ {% endif %}
14
+
15
+ {% set helperClasses = [helperClass] %}
16
+ {% if hasError %}
17
+ {% set helperClasses = helperClasses|merge([errorClass]) %}
18
+ {% endif %}
19
+
20
+ {% set showHelper = helper or hasError %}
21
+ {% set helperMessage = hasError ? errorMessage : helper %}
22
+
23
+ <fieldset class="{{ fieldsetClasses|join(' ') }}" {% if style %} style="{{ style }}" {% endif %}>
24
+ {% if legend or helper %}
25
+ <div class="{{ baseClass ~ '--legend-wrapper' }}">
26
+ {% if legend %}
27
+ <legend class="{{ baseClass ~ '--legend' }}">
28
+ {{ legend }}
29
+ {% if tooltip %}
30
+ {% include '@components/tooltip/tooltip.twig' with {
31
+ "icon": true,
32
+ "label": tooltip,
33
+ "theme": "dark",
34
+ "prefix": prefix,
35
+ "tooltipId": tooltip
36
+ } only %}
37
+ {% endif %}
38
+ </legend>
39
+ {% endif %}
40
+ {% if showHelper %}
41
+ <span class="{{ helperClasses|join(' ') }}">{{ helperMessage }}</span>
42
+ {% endif %}
43
+ </div>
44
+ {% endif %}
45
+ <div class="{{ baseClass ~ '--elements' }}">
46
+ {% for field in fields %}
47
+ {% if field.type == "textinput" %}
48
+ {% include "@components/textinput/textinput.twig" with field|merge({ "prefix": prefix }) only %}
49
+ {% elseif field.type == "checkbox" %}
50
+ {% include "@components/checkbox/checkbox.twig" with field|merge({ "prefix": prefix }) only %}
51
+ {% elseif field.type == "datepicker" %}
52
+ {% include "@components/datepicker/datepicker.twig" with field|merge({ "prefix": prefix }) only %}
53
+ {% elseif field.type == "dropdown" %}
54
+ {% include "@components/dropdown/dropdown.twig" with field|merge({ "prefix": prefix }) only %}
55
+ {% elseif field.type == "fileupload" %}
56
+ {% include "@components/fileupload/fileupload.twig" with field|merge({ "prefix": prefix }) only %}
57
+ {% elseif field.type == "numberpicker" %}
58
+ {% include "@components/numberpicker/numberpicker.twig" with field|merge({ "prefix": prefix }) only %}
59
+ {% elseif field.type == "radio" %}
60
+ {% include "@components/radio/radio.twig" with field|merge({ "prefix": prefix }) only %}
61
+ {% elseif field.type == "search" %}
62
+ {% include "@components/search/search.twig" with field|merge({ "prefix": prefix }) only %}
63
+ {% elseif field.type == "textarea" %}
64
+ {% include "@components/textarea/textarea.twig" with field|merge({ "prefix": prefix }) only %}
65
+ {% elseif field.type == "toggle" %}
66
+ {% include "@components/toggle/toggle.twig" with field|merge({ "prefix": prefix }) only %}
67
+ {% endif %}
68
+ {% endfor %}
69
+ </div>
70
+ </fieldset>
@@ -0,0 +1 @@
1
+ @charset "UTF-8";.ilo--file-upload--input{order:3;background-color:#fff;border:1.5px solid #b8c4cc;color:#230050;content:attr(data-label);display:inline-block;font-family:Overpass,Noto Sans,Noto Sans CJK JP,Yu Gothic,Hiragino Sans,TakaoPGothic,PingFang SC,Microsoft YaHei,微软雅黑,sans-serif;font-weight:700;border-bottom-left-radius:2px;border-bottom-right-radius:2px;border-top-left-radius:2px;border-top-right-radius:2px;padding:7px 18px;font-size:16px;letter-spacing:-.02em;line-height:21.6px}.ilo--file-upload--input input{visibility:hidden;color:transparent;width:0}.ilo--form__theme__dark .ilo--file-upload--input{color:#230050}.ilo--file-upload--input:hover{background-color:#ebf5fd;border:1.5px solid #1e2dbe;cursor:pointer;color:#1e2dbe;outline:0}.ilo--file-upload--input:focus{background-color:#fff;border:1.5px solid #1e2dbe;color:#230050;outline:0}.ilo--file-upload--input:focus-visible{outline:0}.ilo--file-upload--input:active{background-color:#1e2dbe;border:2px solid #1e2dbe;color:#ebf5fd}.ilo--file-upload--input:disabled{opacity:.45;pointer-events:none}.error .ilo--file-upload--input,.ilo--file-upload--input.error,.ilo--file-upload--input:invalid{background-color:#fff;border-bottom:.1071811361rem solid #b8c4cc;border-left:.1607717042rem solid #c8303c;border-right:.1071811361rem solid #b8c4cc;border-top:.1071811361rem solid #b8c4cc}.ilo--file-upload--list{order:4;display:flex;flex-flow:column;padding-top:.4287245445rem;gap:.4287245445rem}.ilo--file-upload--list-item{display:block;background-color:#edf0f2;border-bottom:.1071811361rem solid #edf0f2;border-left:.1607717042rem solid #230050;border-right:.1071811361rem solid #edf0f2;border-top:.1071811361rem solid #edf0f2;box-sizing:border-box;font-family:Overpass,Noto Sans,Noto Sans CJK JP,Yu Gothic,Hiragino Sans,TakaoPGothic,PingFang SC,Microsoft YaHei,微软雅黑,sans-serif;font-weight:500;font-size:16px;letter-spacing:-.02em;line-height:21.6px;height:2.5723472669rem;outline:0;padding:.6430868167rem .6430868167rem .857449089rem}
@@ -0,0 +1 @@
1
+ !function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";function e(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function t(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,e(o.key),o)}}function n(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var o="change",i=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.element=t,this.prefix=this.element.dataset.prefix,this.init()},r=[{key:"init",value:function(){return this.cacheDomReferences().setupHandlers().enable(),this}},{key:"cacheDomReferences",value:function(){return this.container=this.element.parentElement.parentElement,this.formControl=this.container.parentElement,this}},{key:"setupHandlers",value:function(){return this.onChange=this.onChange.bind(this),this}},{key:"enable",value:function(){var e=this;return this.element.addEventListener(o,(function(t){return e.onChange(t)})),this}},{key:"formatBytes",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(!+e)return"0 Bytes";var n=t<0?0:t,r=Math.floor(Math.log(e)/Math.log(1024));return"".concat(parseFloat((e/Math.pow(1024,r)).toFixed(n))," ").concat(["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][r])}},{key:"onChange",value:function(){var e=this,t="".concat(this.prefix,"--file-upload--list"),r=this.formControl.querySelector(".".concat(t));r&&r.remove(),(r=document.createElement("ul")).classList.add(t),this.formControl.appendChild(r);var o="";return n(this.element.files).forEach((function(t){var n=e.formatBytes(t.size);o+=e.template(t.name,n)})),r.innerHTML=o,this}},{key:"template",value:function(e,t){return'<li class="ilo--file-upload--list-item">'.concat(e," (").concat(t,")</li>")}}],r&&t(e.prototype,r),i&&t(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r,i}();Drupal.behaviors.fileupload={attach:function(){Array.prototype.forEach.call(document.querySelectorAll('[data-loadcomponent="FileUpload"]'),(function(e){new i(e)}))}}}));
@@ -0,0 +1,20 @@
1
+ {# fileupload.twig #}
2
+
3
+ {% extends "@components/form/formcontrol.twig" %}
4
+
5
+ {% set baseClass = prefix ~ '--file-upload' %}
6
+ {% set fileUploadClasses = [baseClass] %}
7
+ {% set inputClass = baseClass ~ '--input' %}
8
+
9
+ {% if error %}
10
+ {% set fileUploadClasses = fileUploadClasses|merge(['error']) %}
11
+ {% endif %}
12
+
13
+ {% block formfield %}
14
+ <div class="{{ fileUploadClasses|join(' ') }}">
15
+ <label class="{{ inputClass }}">
16
+ {{ placeholder }}
17
+ <input id="{{ id|default(name) }}" name="{{ name }}" {% if disabled %} disabled {% endif %} {% if multiple %} multiple {% endif %} placeholder="{{ placeholder }}" {% if required %} required {% endif %} type="file" data-label="{{ placeholder }}" aria-describedby="{{ ariaDescribedBy }}" {% if accept %} accept="{{ accept }}" {% endif %} data-loadcomponent="FileUpload" data-prefix="ilo"/>
18
+ </label>
19
+ </div>
20
+ {% endblock %}
@@ -0,0 +1,94 @@
1
+ fileupload:
2
+ namespace: Components/Forms
3
+ use: "@components/fileupload/fileupload.twig"
4
+ label: File Upload
5
+ description: The FileUpload component allows users to select and upload files
6
+ from their device to a web application. It displays a list of the
7
+ files to upload once they've been selected.
8
+ visibility: storybook
9
+ fields:
10
+ label:
11
+ type: text
12
+ label: Label
13
+ description: The label for the form element.
14
+ preview: Upload your files here
15
+ tooltip:
16
+ type: string
17
+ description: The tooltip for the form element.
18
+ helper:
19
+ type: text
20
+ label: Helper Text
21
+ description: The helper text for the form element.
22
+ preview: Max docs size 10MB
23
+ id:
24
+ type: text
25
+ label: ID
26
+ description: The ID of the text input.
27
+ name:
28
+ type: text
29
+ label: Name
30
+ description: The name of the text input.
31
+ placeholder:
32
+ type: text
33
+ label: Placeholder
34
+ description: The placeholder of the text input.
35
+ preview: Select files
36
+ class:
37
+ type: text
38
+ label: Class
39
+ description: The class of the text input.
40
+ preview: textinput
41
+ default: ""
42
+ accept:
43
+ type: text
44
+ label: Accept
45
+ description: The accept attribute of the text input.
46
+ preview: ".pdf,.doc, .docx, .jpg, .png"
47
+ settings:
48
+ labelPlacement:
49
+ type: select
50
+ label: Label Placement
51
+ description: The placement of the label for the form element.
52
+ preview: "top"
53
+ default: "top"
54
+ options:
55
+ start: start
56
+ end: end
57
+ top: top
58
+ bottom: bottom
59
+ labelSize:
60
+ type: select
61
+ label: Label Size
62
+ description: The size of the label for the form element.
63
+ preview: "medium"
64
+ default: "medium"
65
+ options:
66
+ small: small
67
+ medium: medium
68
+ large: large
69
+ multiple:
70
+ type: boolean
71
+ label: Multiple
72
+ description: If the user can select multiple files.
73
+ preview: "false"
74
+ options:
75
+ "true": "true"
76
+ "false": "false"
77
+ disabled:
78
+ type: boolean
79
+ label: Disabled
80
+ description: The disabled state of the text input.
81
+ preview: false
82
+ default: false
83
+ required:
84
+ type: boolean
85
+ label: Required
86
+ description: The required state of the text input.
87
+ preview: false
88
+ default: false
89
+ error:
90
+ type: boolean
91
+ label: Error
92
+ description: Adds an error state to the form control.
93
+ preview: false
94
+ default: false
@@ -0,0 +1 @@
1
+ @charset "UTF-8";.ilo--footer{border-bottom:.1607717042rem solid #b8c4cc;background-color:#230050;position:relative;width:100%;overflow:hidden}.ilo--footer--main{padding:2.1436227224rem 1.7148981779rem 2.5723472669rem;position:relative}.ilo--footer--main:before{background-size:contain;background-repeat:no-repeat;content:"";height:100%;min-width:409.5px;position:absolute;width:28.8%;z-index:0;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 409.5 236'%3E%3Cpath fill='%231E2DBE' d='M409.5 236c-1.7-.6-3.5-1.1-5.1-2-5.3-2.9-10.5-5.9-15.7-9-4.8-2.8-9.5-5.8-14.3-8.7-4.3-2.6-8.5-5.1-12.9-7.5-4.9-2.7-10-5.2-14.9-8-3.8-2.2-7.4-4.8-11.2-7.1-5.7-3.3-11.6-6.4-17.3-9.7-3.9-2.2-7.6-4.6-11.5-6.9-4-2.3-8.1-4.4-12-6.7-3.8-2.2-7.5-4.5-11.3-6.7-2.4-1.4-4.9-2.5-7.3-3.9-2.8-1.6-5.5-3.3-8.2-4.9-3.8-2.3-7.5-4.6-11.4-6.8-3.9-2.3-7.9-4.5-11.9-6.8-6.1-3.5-12.2-6.8-18.2-10.4-4.8-2.8-9.4-5.8-14.2-8.5-4.8-2.8-9.8-5.3-14.6-8.1-3.6-2.1-7.2-4.3-10.8-6.4-5.9-3.5-11.8-6.9-17.7-10.3-4.8-2.8-9.6-5.7-14.4-8.5-3.8-2.2-7.8-4.4-11.6-6.6-3-1.7-5.9-3.6-8.9-5.4-3-1.8-6.2-3.4-9.2-5.1-3.9-2.2-7.8-4.4-11.6-6.6-4.1-2.4-8.1-4.8-12.2-7.2-5.8-3.4-11.5-6.9-17.3-10.2-4.9-2.8-9.9-5.4-14.7-8.2-3.7-2.1-7.3-4.5-11-6.6-4.9-2.9-9.8-5.6-14.7-8.4-4.7-2.7-9.4-5.6-14.2-8.3-5-2.9-10-5.7-15-8.6C10.3 5.6 6.6 3.3 2.8 1 2 .5 1 .3 0 0h409.5v236z'/%3E%3C/svg%3E");bottom:0;right:0;transform:scaleY(-1)}.ilo--footer--main:after{content:"";border-bottom:.3215434084rem solid #fa3c4b;width:200vw;position:absolute;bottom:0;left:-100vw}.ilo--footer--main>*{position:relative;z-index:1}.ilo--footer--logo{height:2.5723472669rem;width:auto}.ilo--footer--secondary{background-color:#edf0f2;padding:1.7148981779rem .857449089rem 0;min-height:3.0010718114rem}.ilo--footer--secondary [class*=container]{padding:0}.ilo--footer--headline{color:#fff;font-weight:700;font-size:16px;line-height:23.36px;line-height:1.1575562701rem;margin-bottom:.0895963823rem;margin-top:1.0718113612rem}.ilo--footer--headline,.ilo--footer--subhead{font-family:Overpass,Noto Sans,Noto Sans CJK JP,Yu Gothic,Hiragino Sans,TakaoPGothic,PingFang SC,Microsoft YaHei,微软雅黑,sans-serif;letter-spacing:normal}.ilo--footer--subhead{color:#bedcfa;font-weight:500;margin-top:.2143622722rem;font-size:11.94px;line-height:16.24px;line-height:.9946409432rem;margin-bottom:2.5723472669rem}.ilo--footer .address{margin-bottom:1.0718113612rem}.ilo--footer .address--line{color:#fff;font-size:11.94px;letter-spacing:normal;line-height:16.24px;margin-bottom:.12089916rem}.ilo--footer .connect{margin:2.5723472669rem 0 2.1436227224rem}.ilo--footer .social--links{margin-bottom:2.1436227224rem}.ilo--footer .legal,.ilo--footer .secondarylinks{color:#6d6d6d;display:inline;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--footer .secondarylinks--list,.ilo--footer .secondarylinks--list--item{display:inline;list-style:none}.ilo--footer .secondarylinks--list--item:before{content:"|";margin:.2143622722rem}.ilo--footer .secondarylinks--list--item a{color:#6d6d6d}.ilo--footer .secondarylinks--list--item a,.ilo--footer .secondarylinks--list--item a:visited{transition-property:color,border-color;transition-duration:.15s;transition-timing-function:ease-out}.ilo--footer .secondarylinks--list--item a:visited{color:#960a55}.ilo--footer .secondarylinks--list--item a:hover{color:#1e2dbe;transition-property:color,border-color;transition-duration:.15s;transition-timing-function:ease-out}.ilo--footer .secondarylinks--list--item a:active,.ilo--footer .secondarylinks--list--item a:focus{color:#230050;outline:0;transition-property:color,border-color;transition-duration:.15s;transition-timing-function:ease-out}.ilo--footer .anchorlink{display:flex;flex-flow:row nowrap;color:#230050;font-family:Overpass,Noto Sans,Noto Sans CJK JP,Yu Gothic,Hiragino Sans,TakaoPGothic,PingFang SC,Microsoft YaHei,微软雅黑,sans-serif;font-size:16px;letter-spacing:-.02em;line-height:21.6px;position:relative;text-decoration:none;width:max-content;justify-content:center;border-bottom:.1071811361rem solid #edf0f2;margin:.6430868167rem auto 0;padding:.857449089rem}.ilo--footer .anchorlink:after{background-repeat:no-repeat;content:"";height:1.2861736334rem;position:relative;margin-left:.4287245445rem;bottom:.1607717042rem;transform:rotateX(180deg);transform-origin:center;width:1.2861736334rem;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23230050' d='M12 16.78l-8-8 1.455-1.56L12 13.767l6.546-6.545L20 8.779l-8 8z'/%3E%3C/svg%3E")}.ilo--footer .anchorlink:hover{background:#ebf5fd;border-bottom:.1071811361rem solid #1e2dbe;color:#1e2dbe;cursor:pointer;transition-property:color,background-color,border-color;transition-duration:.15s;transition-timing-function:ease-out}.ilo--footer .anchorlink:hover:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%231E2DBE' d='M12 16.78l-8-8 1.455-1.56L12 13.767l6.546-6.545L20 8.779l-8 8z'/%3E%3C/svg%3E")}@media screen and (min-width:610px){.ilo--footer--main{display:grid;grid-template-columns:minmax(0,50%) minmax(0,50%);gap:0 3.4297963558rem;grid-template-areas:"a b" "a c" "a d" "a e";align-content:start;align-items:start;padding:2.1436227224rem 1.0718113612rem 5.1446945338rem}.ilo--footer .site--info{grid-area:a}.ilo--footer .address{grid-area:b}.ilo--footer .connect{grid-area:d;margin-bottom:0}.ilo--footer .links{grid-area:c}.ilo--footer .subscribe{grid-area:e}.ilo--footer--secondary{padding-top:.857449089rem;padding-bottom:.857449089rem;position:relative;z-index:1}.ilo--footer .anchorlink{bottom:0}}@media screen and (min-width:1024px){.ilo--footer:after{background-size:contain;background-repeat:no-repeat;content:"";height:100%;min-width:409.5px;position:absolute;width:28.8%;z-index:0;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 409.5 236'%3E%3Cpath fill='%231E2DBE' d='M409.5 236c-1.7-.6-3.5-1.1-5.1-2-5.3-2.9-10.5-5.9-15.7-9-4.8-2.8-9.5-5.8-14.3-8.7-4.3-2.6-8.5-5.1-12.9-7.5-4.9-2.7-10-5.2-14.9-8-3.8-2.2-7.4-4.8-11.2-7.1-5.7-3.3-11.6-6.4-17.3-9.7-3.9-2.2-7.6-4.6-11.5-6.9-4-2.3-8.1-4.4-12-6.7-3.8-2.2-7.5-4.5-11.3-6.7-2.4-1.4-4.9-2.5-7.3-3.9-2.8-1.6-5.5-3.3-8.2-4.9-3.8-2.3-7.5-4.6-11.4-6.8-3.9-2.3-7.9-4.5-11.9-6.8-6.1-3.5-12.2-6.8-18.2-10.4-4.8-2.8-9.4-5.8-14.2-8.5-4.8-2.8-9.8-5.3-14.6-8.1-3.6-2.1-7.2-4.3-10.8-6.4-5.9-3.5-11.8-6.9-17.7-10.3-4.8-2.8-9.6-5.7-14.4-8.5-3.8-2.2-7.8-4.4-11.6-6.6-3-1.7-5.9-3.6-8.9-5.4-3-1.8-6.2-3.4-9.2-5.1-3.9-2.2-7.8-4.4-11.6-6.6-4.1-2.4-8.1-4.8-12.2-7.2-5.8-3.4-11.5-6.9-17.3-10.2-4.9-2.8-9.9-5.4-14.7-8.2-3.7-2.1-7.3-4.5-11-6.6-4.9-2.9-9.8-5.6-14.7-8.4-4.7-2.7-9.4-5.6-14.2-8.3-5-2.9-10-5.7-15-8.6C10.3 5.6 6.6 3.3 2.8 1 2 .5 1 .3 0 0h409.5v236z'/%3E%3C/svg%3E");background-position:100% 0;bottom:auto;top:0;right:0;transform:scaleY(1)}.ilo--footer--main{display:grid;grid-template-columns:.25fr .33fr .09fr .33fr;grid-template-rows:auto auto;gap:0 3.4297963558rem;grid-template-areas:"a b . d" "a c . e";padding-top:2.1436227224rem;padding-bottom:5.1446945338rem}.ilo--footer--main:before{content:none}.ilo--footer .connect{grid-area:d;margin:0}.ilo--footer .subscribe{height:100%;display:flex;align-items:flex-start;justify-content:flex-start;flex-flow:column;top:8px}.ilo--footer .ilo--button{align-self:start;justify-self:start}.ilo--footer .address{margin-bottom:1.0718113612rem}.ilo--footer--secondary{padding-top:.857449089rem;padding-bottom:.857449089rem;position:relative}.ilo--footer--secondary [class*=container]{display:flex;flex-flow:row;justify-content:space-between;align-items:center}.ilo--footer--secondary--details{display:flex;flex-flow:row;justify-content:flex-start;align-items:center}.ilo--footer--secondary .secondarylinks--list--item:before{margin:.4287245445rem}.ilo--footer .anchorlink{margin:0;border:none;padding:.2143622722rem}.ilo--footer .anchorlink:hover{margin-bottom:-.1071811361rem}}.ilo--footer[dir=rtl] .ilo--footer--main:before{background-size:contain;background-repeat:no-repeat;content:"";height:100%;min-width:409.5px;position:absolute;width:28.8%;z-index:0;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 409.5 236'%3E%3Cpath fill='%231E2DBE' d='M409.5 236c-1.7-.6-3.5-1.1-5.1-2-5.3-2.9-10.5-5.9-15.7-9-4.8-2.8-9.5-5.8-14.3-8.7-4.3-2.6-8.5-5.1-12.9-7.5-4.9-2.7-10-5.2-14.9-8-3.8-2.2-7.4-4.8-11.2-7.1-5.7-3.3-11.6-6.4-17.3-9.7-3.9-2.2-7.6-4.6-11.5-6.9-4-2.3-8.1-4.4-12-6.7-3.8-2.2-7.5-4.5-11.3-6.7-2.4-1.4-4.9-2.5-7.3-3.9-2.8-1.6-5.5-3.3-8.2-4.9-3.8-2.3-7.5-4.6-11.4-6.8-3.9-2.3-7.9-4.5-11.9-6.8-6.1-3.5-12.2-6.8-18.2-10.4-4.8-2.8-9.4-5.8-14.2-8.5-4.8-2.8-9.8-5.3-14.6-8.1-3.6-2.1-7.2-4.3-10.8-6.4-5.9-3.5-11.8-6.9-17.7-10.3-4.8-2.8-9.6-5.7-14.4-8.5-3.8-2.2-7.8-4.4-11.6-6.6-3-1.7-5.9-3.6-8.9-5.4-3-1.8-6.2-3.4-9.2-5.1-3.9-2.2-7.8-4.4-11.6-6.6-4.1-2.4-8.1-4.8-12.2-7.2-5.8-3.4-11.5-6.9-17.3-10.2-4.9-2.8-9.9-5.4-14.7-8.2-3.7-2.1-7.3-4.5-11-6.6-4.9-2.9-9.8-5.6-14.7-8.4-4.7-2.7-9.4-5.6-14.2-8.3-5-2.9-10-5.7-15-8.6C10.3 5.6 6.6 3.3 2.8 1 2 .5 1 .3 0 0h409.5v236z'/%3E%3C/svg%3E");bottom:0;left:0;transform:scaleY(-1) scaleX(-1)}.ilo--footer[dir=rtl] .ilo--footer .secondarylinks--list--item:before{content:none}.ilo--footer[dir=rtl] .ilo--footer .secondarylinks--list--item:after{content:"|";margin:.2143622722rem}@media screen and (min-width:610px){.ilo--footer[dir=rtl] .ilo--footer--main{grid-template-areas:"b a" "c a" "d a" "e a"}}@media screen and (min-width:1024px){.ilo--footer[dir=rtl] .ilo--footer:after{background-size:contain;background-repeat:no-repeat;content:"";height:100%;min-width:409.5px;position:absolute;width:28.8%;z-index:0;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 409.5 236'%3E%3Cpath fill='%231E2DBE' d='M409.5 236c-1.7-.6-3.5-1.1-5.1-2-5.3-2.9-10.5-5.9-15.7-9-4.8-2.8-9.5-5.8-14.3-8.7-4.3-2.6-8.5-5.1-12.9-7.5-4.9-2.7-10-5.2-14.9-8-3.8-2.2-7.4-4.8-11.2-7.1-5.7-3.3-11.6-6.4-17.3-9.7-3.9-2.2-7.6-4.6-11.5-6.9-4-2.3-8.1-4.4-12-6.7-3.8-2.2-7.5-4.5-11.3-6.7-2.4-1.4-4.9-2.5-7.3-3.9-2.8-1.6-5.5-3.3-8.2-4.9-3.8-2.3-7.5-4.6-11.4-6.8-3.9-2.3-7.9-4.5-11.9-6.8-6.1-3.5-12.2-6.8-18.2-10.4-4.8-2.8-9.4-5.8-14.2-8.5-4.8-2.8-9.8-5.3-14.6-8.1-3.6-2.1-7.2-4.3-10.8-6.4-5.9-3.5-11.8-6.9-17.7-10.3-4.8-2.8-9.6-5.7-14.4-8.5-3.8-2.2-7.8-4.4-11.6-6.6-3-1.7-5.9-3.6-8.9-5.4-3-1.8-6.2-3.4-9.2-5.1-3.9-2.2-7.8-4.4-11.6-6.6-4.1-2.4-8.1-4.8-12.2-7.2-5.8-3.4-11.5-6.9-17.3-10.2-4.9-2.8-9.9-5.4-14.7-8.2-3.7-2.1-7.3-4.5-11-6.6-4.9-2.9-9.8-5.6-14.7-8.4-4.7-2.7-9.4-5.6-14.2-8.3-5-2.9-10-5.7-15-8.6C10.3 5.6 6.6 3.3 2.8 1 2 .5 1 .3 0 0h409.5v236z'/%3E%3C/svg%3E");top:0;left:0;transform:scaleY(1) scaleX(-1)}.ilo--footer[dir=rtl] .ilo--footer--main{grid-template-columns:.33fr .09fr .33fr .25fr;grid-template-areas:"d . b a" "e . c a"}.ilo--footer[dir=rtl] .ilo--footer--main:before{content:none}.ilo--footer[dir=rtl] .ilo--footer .connect{grid-template-columns:60%,minmax(0,40%)}.ilo--footer[dir=rtl] .ilo--footer .ilo--button{justify-self:end}}
@@ -0,0 +1,63 @@
1
+ {# footer.twig #}
2
+ <footer class="ilo--footer">
3
+ <div class="ilo--footer--main ilo--container">
4
+ <div class="site--info">
5
+ <img class="ilo--footer--logo" src="{{logo.url}}" alt="{{logo.alt}}"/>
6
+ <h3 class="ilo--footer--headline">{{tagline}}</h3>
7
+ <h4 class="ilo--footer--subhead">{{subtagline}}</h4>
8
+ </div>
9
+ {% if address %}
10
+ <div class="address">
11
+ {% for line in address %}
12
+ <p class="address--line">{{line}}</p>
13
+ {% endfor %}
14
+ </div>
15
+ {% endif %}
16
+ {% if linkgroup %}
17
+ <nav class="links">
18
+ {% include '@components/linklist/linklist.twig' with {linkgroup: linkgroup, theme: 'dark'} %}
19
+ </nav>
20
+ {% endif %}
21
+ {% if socialmedia %}
22
+ <div class="connect">
23
+ <div class="social--links">
24
+ {% include '@components/socialmedia/socialmedia.twig' with {
25
+ theme: "dark",
26
+ headline: socialmedia.headline,
27
+ icons: socialmedia.icons,
28
+ } %}
29
+ </div>
30
+ </div>
31
+ {% endif %}
32
+ {% if subscribe %}
33
+ <div class="subscribe">
34
+ {% include '@components/button/button.twig' with {label: subscribe.label, url: subscribe.url, type: 'primary', size: 'large', target: '_blank'} %}
35
+ </div>
36
+ {% endif %}
37
+ </div>
38
+ <div class="ilo--footer--secondary">
39
+ <div class="ilo--container">
40
+ <div class="ilo--footer--secondary--details">
41
+ {% if legal %}
42
+ <div class="legal">
43
+ {{legal}}
44
+ </div>
45
+ {% endif %}
46
+ {% if secondarylinks %}
47
+ <nav class="secondarylinks">
48
+ <ul class="secondarylinks--list">
49
+ {% for link in secondarylinks %}
50
+ <li class="secondarylinks--list--item">
51
+ <a href="{{link.url}}" class="secondarylinks--list--link">{{link.label}}</a>
52
+ </li>
53
+ {% endfor %}
54
+ </ul>
55
+ </nav>
56
+ </div>
57
+ {% endif %}
58
+ {% if anchorlink %}
59
+ <a href="{{anchorlink.href}}" class="anchorlink">{{anchorlink.label}}</a>
60
+ {% endif %}
61
+ </div>
62
+ </div>
63
+ </footer>
@@ -0,0 +1,106 @@
1
+ footer:
2
+ namespace: Components/Navigation
3
+ use: "@components/footer/footer.twig"
4
+ label: Footer
5
+ description: A component for displaying a page's footer
6
+ fields:
7
+ logo:
8
+ type: object
9
+ label: action
10
+ description: A URL and alt text for the site logo
11
+ preview:
12
+ alt: "My alt text"
13
+ url: "https://www.ilo.org/wcmsp5/ilo/global/images/templates/ilo-logo.svg"
14
+ required: true
15
+ tagline:
16
+ type: string
17
+ label: tagline
18
+ description: the tagline for the site
19
+ preview: "Advancing social justice, promoting decent work"
20
+ subtagline:
21
+ type: string
22
+ label: subtagline
23
+ description: a sub-tagline for the site
24
+ preview: "ILO is a specialized agency of the United Nations"
25
+ address:
26
+ type: object
27
+ label: address
28
+ description: "any number of strings in an address"
29
+ preview:
30
+ - "International Labour Organization"
31
+ - "4 route des Morillons"
32
+ - "CH-1211 Genève 22"
33
+ - "Switzerland"
34
+ linkgroup:
35
+ type: object
36
+ label: links
37
+ description: "up to six links"
38
+ preview:
39
+ - links:
40
+ - label: "Contact us"
41
+ url: "https://www.ilo.org"
42
+ - label: "Contact us"
43
+ url: "https://www.ilo.org"
44
+ - label: "Contact us"
45
+ url: "https://www.ilo.org"
46
+ socialmedia:
47
+ type: object
48
+ label: social
49
+ description: "Links to social media"
50
+ preview:
51
+ headline: "Stay informed"
52
+ icons:
53
+ - icon: "twitter"
54
+ label: "Twitter"
55
+ url: "https://twitter.com/#!/ilo"
56
+ - icon: "facebook"
57
+ label: "Facebook"
58
+ url: "https://www.facebook.com/ilo.org"
59
+ - icon: "linkedin"
60
+ label: "LinkedIn"
61
+ url: "https://www.linkedin.com/company/international-labour-organization-ilo"
62
+ - icon: "instagram"
63
+ label: "Instagram"
64
+ url: "https://www.instagram.com/ilo.org/"
65
+ - icon: "tiktok"
66
+ label: "TikTok"
67
+ url: "https://www.tiktok.com/@ilo"
68
+ - icon: "flickr"
69
+ label: "Flickr"
70
+ url: "https://www.flickr.com/photos/ilopictures/albums"
71
+ - icon: "youtube"
72
+ label: "YouTube"
73
+ url: "https://www.youtube.com/channel/UCrlcu5KChYyHwXlIeD7oLUg"
74
+ subscribe:
75
+ type: object
76
+ label: subscribe
77
+ description: "a link to a subscribe form"
78
+ preview:
79
+ label: "Subscribe for updates"
80
+ url: "https://www.ilo.org"
81
+ legal:
82
+ type: string
83
+ label: legal
84
+ description: "a string with legal information"
85
+ preview: "© 1996-2022 International Labour Organization (ILO)"
86
+ secondarylinks:
87
+ type: object
88
+ label: secondarylinks
89
+ description: "up to six links"
90
+ preview:
91
+ - label: "Rights and permissions"
92
+ url: "http://www.cnn.com"
93
+ - label: "Privacy policy"
94
+ url: "http://www.bing.com"
95
+ - label: "Fraud alert"
96
+ url: "http://www.yahoo.com"
97
+ - label: "Disclaimer"
98
+ url: "http://www.askjeeves.com"
99
+ anchorlink:
100
+ type: object
101
+ label: anchorlink
102
+ description: "an anchor href and label for navigating to another section on the page"
103
+ preview:
104
+ label: "Back to top"
105
+ href: "#anchor"
106
+ visibility: storybook
@@ -0,0 +1 @@
1
+ .ilo--form{box-sizing:border-box;display:flex;justify-content:flex-start;align-items:flex-start;flex-direction:column;appearance:none;gap:1.7148981779rem}.ilo--form,.ilo--form__theme__light,.ilo--form__theme__light label,.ilo--form__theme__light p{color:#2d2d2d}.ilo--form__theme__dark,.ilo--form__theme__dark label,.ilo--form__theme__dark p{color:#edf0f2}.ilo--form__theme__dark legend{color:#ffcd2d}.ilo--form__disabled{opacity:.5;pointer-events:none}
@@ -0,0 +1,19 @@
1
+ {# form.twig #}
2
+
3
+ {% set baseClass = prefix ~ "--form" %}
4
+
5
+ {% set formControlClass = [baseClass, class] %}
6
+
7
+ <form class="{{ formControlClass|join(' ') }}" data-loadcomponent="Form" {%- for key, value in attributes|default({} ) -%} {{- ' ' ~ key ~ '="' ~ value|e('html_attr') ~ '"' -}} {%- endfor -%}>
8
+ {% if headline %}
9
+ <h2>{{ headline }}</h2>
10
+ {% endif %}
11
+ {% for fieldset in fieldsets %}
12
+ {% include "@components/form/fieldset.twig" with fieldset|merge({ "prefix": prefix }) only %}
13
+ {% endfor %}
14
+ {% if submit %}
15
+ {% include "@components/button/button.twig" with submit|merge({
16
+ "prefix": prefix, "kind": "submit" }) only
17
+ %}
18
+ {% endif %}
19
+ </form>
@@ -0,0 +1,205 @@
1
+ form:
2
+ namespace: Components/Forms
3
+ use: "@components/form/form.twig"
4
+ label: Form
5
+ description: The Form component provides users with a complete interface that combines all of the form elements in the design system together with a some configuration options for laying them out together.
6
+ visibility: storybook
7
+ fields:
8
+ headline:
9
+ type: string
10
+ label: Headline
11
+ description: The title of the form
12
+ required: false
13
+ preview: Request to attend the International Labour Conference
14
+ class:
15
+ type: string
16
+ label: Form class
17
+ description: The CSS class of the form
18
+ required: false
19
+ preview: my--form--class
20
+ attributes:
21
+ type: object
22
+ label: Attributes
23
+ description: A list of html attributes that you can attach to the form element
24
+ required: false
25
+ preview:
26
+ id: my--form--id
27
+ name: my--form--name
28
+ action: https://www.ilo.org
29
+ method: post
30
+ submit:
31
+ type: object
32
+ label: Submit button
33
+ description: Options to pass to the submit button if your form has one
34
+ preview:
35
+ label: Submit your info
36
+ type: primary
37
+ size: large
38
+ kind: submit
39
+ fieldsets:
40
+ type: object
41
+ label: Fieldsets
42
+ description: A group of form fields used to group related fields together. Each fieldset can have a legend and a list of form fields with a `type` property.
43
+ required: true
44
+ preview:
45
+ - legend: Personal information
46
+ wrap: wrap
47
+ direction: row
48
+ style: "width: 100%"
49
+ class: my--fieldset--class
50
+ tooltip: "Your data will be stored securely"
51
+ fields:
52
+ - type: textinput
53
+ name: first-name
54
+ label: First name
55
+ placeholder: Juan
56
+ labelPlacement: top
57
+ labelSize: small
58
+ style: "flex: 1 0 49%"
59
+ class: my--formfield--class
60
+ - type: textinput
61
+ name: last-name
62
+ label: Last name
63
+ placeholder: Martinez
64
+ labelPlacement: top
65
+ labelSize: small
66
+ style: "flex: 1 0 49%"
67
+ class: my--formfield--class
68
+ - legend: What world of work topics interest you?
69
+ direction: row
70
+ fields:
71
+ - type: checkbox
72
+ name: preference-1
73
+ label: Social Justice
74
+ labelPlacement: end
75
+ labelSize: small
76
+ class: my--formfield--class
77
+ value: 1
78
+ - type: checkbox
79
+ name: preference-2
80
+ label: Decent work
81
+ labelPlacement: end
82
+ labelSize: small
83
+ class: my--formfield--class
84
+ value: 2
85
+ - type: checkbox
86
+ name: preference-3
87
+ label: Ending child labour
88
+ labelPlacement: end
89
+ labelSize: small
90
+ class: my--formfield--class
91
+ value: 3
92
+ - legend: Which committee will you be attending?
93
+ direction: row
94
+ fields:
95
+ - type: radio
96
+ name: priority-1
97
+ label: Credentials committee
98
+ labelPlacement: end
99
+ labelSize: small
100
+ class: my--formfield--class
101
+ value: 1
102
+ - type: radio
103
+ name: priority-1
104
+ label: General Affairs Committee
105
+ labelPlacement: end
106
+ labelSize: small
107
+ class: my--formfield--class
108
+ value: 2
109
+ - type: radio
110
+ name: priority-1
111
+ label: Finance Committee
112
+ labelPlacement: end
113
+ labelSize: small
114
+ class: my--formfield--class
115
+ value: 3
116
+ - legend: Tell us more about you
117
+ direction: row
118
+ wrap: wrap
119
+ style: "width: 100%"
120
+ fields:
121
+ - type: dropdown
122
+ name: country
123
+ label: What country are you from?
124
+ labelPlacement: top
125
+ labelSize: small
126
+ class: my--formfield--class
127
+ style: "flex: 1 0 250px"
128
+ options:
129
+ - label: Switzerland
130
+ value: CH
131
+ - label: Côte d'Ivoire
132
+ value: CI
133
+ - label: Thailand
134
+ value: TH
135
+ - label: United States
136
+ value: US
137
+ - label: Zimbabwe
138
+ value: ZW
139
+ - label: Afghanistan
140
+ value: AF
141
+ - label: Åland Islands
142
+ value: AX
143
+ - type: dropdown
144
+ name: country
145
+ label: Who will you be representing?
146
+ labelPlacement: top
147
+ labelSize: small
148
+ class: my--formfield--class
149
+ style: "flex: 1 0 250px"
150
+ options:
151
+ - label: Workers
152
+ value: 1
153
+ - label: Employers
154
+ value: 2
155
+ - label: Governments
156
+ value: 3
157
+ - label: Other
158
+ value: 4
159
+ - type: numberpicker
160
+ name: arrival-date
161
+ label: How many people are in your delegation?
162
+ labelPlacement: top
163
+ labelSize: small
164
+ class: my--formfield--class
165
+ style: "flex: 1 0 250px"
166
+ - legend: When will you be coming to the ILC?
167
+ direction: row
168
+ style: "width: 100%"
169
+ fields:
170
+ - type: datepicker
171
+ name: arrival-date
172
+ label: Arrival date
173
+ labelPlacement: top
174
+ labelSize: small
175
+ class: my--formfield--class
176
+ style: "flex: 1 1 49%"
177
+ - type: datepicker
178
+ name: departure-date
179
+ label: Departure date
180
+ labelPlacement: top
181
+ labelSize: small
182
+ class: my--formfield--class
183
+ style: "flex: 1 1 49%"
184
+ - legend: Submit a copy of your passport
185
+ direction: row
186
+ style: "width: 100%"
187
+ fields:
188
+ - type: fileupload
189
+ name: arrival-date
190
+ label: PDF or JPG files up to 10MB
191
+ accept: ".pdf,.jpg"
192
+ placeholder: Select file
193
+ labelPlacement: end
194
+ labelSize: small
195
+ class: my--formfield--class
196
+ - direction: row
197
+ style: "width: 100%"
198
+ fields:
199
+ - type: textarea
200
+ name: comments
201
+ label: Do you have any questions or comments?
202
+ labelPlacement: top
203
+ labelSize: medium
204
+ class: my--formfield--class
205
+ style: "flex: 1 1 100%"
@@ -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}