@ilo-org/twig 0.16.2 → 0.17.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.
- package/.turbo/turbo-build:lib.log +67 -5
- package/CHANGELOG.md +40 -0
- package/README.md +2 -8
- package/apps/storybook/manager-head.html +27 -0
- package/apps/storybook/patterns/welcome.stories.mdx +15 -44
- package/apps/storybook/welcome.scss +131 -0
- package/copystyles.js +16 -0
- package/copytemplates.js +27 -0
- package/images/fao-logo.svg +195 -0
- package/images/logo_en_horizontal_blue.svg +893 -0
- package/images/twig.svg +6 -0
- package/images/unhcr-logo.svg +1 -0
- package/images/unicef-logo.png +0 -0
- package/images/wfp-logo.svg +1 -0
- package/images/who-logo.svg +1 -0
- package/package.json +42 -17
- package/rollup.config.js +31 -0
- package/src/patterns/components/accordion/accordion-item.twig +10 -4
- package/src/patterns/components/accordion/accordion.js +35 -2
- package/src/patterns/components/accordion/accordion.wingsuit.yml +24 -9
- package/src/patterns/components/breadcrumb/breadcrumb.twig +1 -1
- package/src/patterns/components/button/button.wingsuit.yml +8 -8
- package/src/patterns/components/callout/callout.wingsuit.yml +6 -6
- package/src/patterns/components/card/card.wingsuit.yml +10 -11
- package/src/patterns/components/card_detail/card_detail.wingsuit.yml +3 -3
- package/src/patterns/components/card_feature/card_feature.wingsuit.yml +3 -3
- package/src/patterns/components/card_multilink/card_multilink.wingsuit.yml +3 -3
- package/src/patterns/components/card_promo/card_promo.wingsuit.yml +3 -3
- package/src/patterns/components/cardgroup/cardgroup.wingsuit.yml +3 -3
- package/src/patterns/components/datepicker/datepicker.wingsuit.yml +1 -0
- package/src/patterns/components/fileupload/fileupload.wingsuit.yml +3 -3
- package/src/patterns/components/herocard/herocard.wingsuit.yml +2 -2
- package/src/patterns/components/icon/icon.wingsuit.yml +2 -2
- package/src/patterns/components/image/image.wingsuit.yml +3 -3
- package/src/patterns/components/list/list-item.twig +2 -2
- package/src/patterns/components/list/list.twig +34 -28
- package/src/patterns/components/list/list.wingsuit.yml +20 -9
- package/src/patterns/components/pagination/pagination.twig +2 -1
- package/src/patterns/components/pagination/pagination.wingsuit.yml +4 -2
- package/src/patterns/components/readmore/readmore.twig +1 -1
- package/src/patterns/components/readmore/readmore.wingsuit.yml +3 -3
- package/src/patterns/components/richtext/richtext.twig +1 -1
- package/src/patterns/components/table/table.twig +2 -2
- package/src/patterns/components/table/table.wingsuit.yml +6 -6
- package/src/patterns/components/tabs/tabs.twig +3 -6
- package/src/patterns/components/tags/tag.wingsuit.yml +3 -3
- package/src/patterns/components/tags/tags.wingsuit.yml +4 -4
- package/src/patterns/components/textarea/textarea.wingsuit.yml +2 -2
- package/src/patterns/components/tooltip/tooltip.twig +1 -1
- package/src/patterns/components/tooltip/tooltip.wingsuit.yml +2 -2
- package/apps/storybook/config/prefix.yml +0 -1
- package/images/add.svg +0 -1
- package/images/arrow.svg +0 -1
- package/images/arrowleft.svg +0 -1
- package/images/arrowright.svg +0 -1
- package/images/breadcrumbdivider.svg +0 -1
- package/images/breadcrumbdividerrtl.svg +0 -1
- package/images/burger.svg +0 -1
- package/images/checkmark.svg +0 -1
- package/images/close.svg +0 -1
- package/images/copyright.svg +0 -1
- package/images/doublearrow.svg +0 -1
- package/images/elipsis.svg +0 -1
- package/images/equilateraltriangle.svg +0 -1
- package/images/error.svg +0 -1
- package/images/facebook.svg +0 -1
- package/images/flickr.svg +0 -1
- package/images/footertriangle.svg +0 -1
- package/images/fullscreen.svg +0 -1
- package/images/global.svg +0 -1
- package/images/halfsquaretriangle.svg +0 -1
- package/images/home.svg +0 -1
- package/images/info.svg +0 -1
- package/images/instagram.svg +0 -1
- package/images/linkedin.svg +0 -1
- package/images/listarrow.svg +0 -1
- package/images/listarrowreverse.svg +0 -1
- package/images/minus.svg +0 -1
- package/images/muted.svg +0 -1
- package/images/paginationarrow.svg +0 -1
- package/images/pause.svg +0 -1
- package/images/play.svg +0 -1
- package/images/quote.svg +0 -1
- package/images/scalenerighttriangle.svg +0 -1
- package/images/scalenerighttrianglereverse.svg +0 -1
- package/images/search.svg +0 -1
- package/images/stemarrow.svg +0 -1
- package/images/success.svg +0 -1
- package/images/tiktok.svg +0 -1
- package/images/triangle.svg +0 -1
- package/images/triangledecoration.svg +0 -1
- package/images/trianglereverse.svg +0 -1
- package/images/twitter.svg +0 -1
- package/images/volume.svg +0 -1
- package/images/warning.svg +0 -1
- package/images/youtube.svg +0 -1
- package/outputtwigs.js +0 -57
package/images/youtube.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 12"><path fill="currentColor" d="M15.8 2.8C15.6 1.5 15 0.6 13.6 0.4C11.4 8.9407e-08 8 0 8 0C8 0 4.6 8.9407e-08 2.4 0.4C1 0.6 0.3 1.5 0.2 2.8C0 4.1 0 6 0 6C0 6 0 7.9 0.2 9.2C0.4 10.5 1 11.4 2.4 11.6C4.6 12 8 12 8 12C8 12 11.4 12 13.6 11.6C15 11.3 15.6 10.5 15.8 9.2C16 7.9 16 6 16 6C16 6 16 4.1 15.8 2.8ZM6 9V3L11 6L6 9Z"/></svg>
|
package/outputtwigs.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
// The build file for Twig package - this copies the twigs from where Storybook needs them to a more convenient folder for use in a CMS
|
|
2
|
-
const fs = require("fs");
|
|
3
|
-
const path = require("path");
|
|
4
|
-
const theme = require("@ilo-org/themes/tokens/theme/base.json");
|
|
5
|
-
let buffer = new Buffer.from(`prefix: ${theme.themeprefix.value}`);
|
|
6
|
-
const srcpath = `./src/patterns/components`;
|
|
7
|
-
|
|
8
|
-
const checkFolder = async (dir) => {
|
|
9
|
-
if (!fs.existsSync(dir)) {
|
|
10
|
-
fs.mkdirSync(dir);
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
const traverseDirectory = (directory) => {
|
|
15
|
-
let files = fs.readdirSync(directory).filter((file) => {
|
|
16
|
-
return file !== ".DS_Store";
|
|
17
|
-
});
|
|
18
|
-
for (const f in files) {
|
|
19
|
-
const file = files[f];
|
|
20
|
-
const absolute = path.join(directory, file);
|
|
21
|
-
const ext = path.extname(file).toLowerCase();
|
|
22
|
-
if (fs.statSync(absolute).isDirectory()) {
|
|
23
|
-
traverseDirectory(absolute);
|
|
24
|
-
} else {
|
|
25
|
-
if (ext === ".twig" || (ext === ".js" && file !== "index.js")) {
|
|
26
|
-
let filepath = directory
|
|
27
|
-
.replace(`src/`, `dist/`)
|
|
28
|
-
.replace("patterns/", "")
|
|
29
|
-
.replace(`/${file}`, "");
|
|
30
|
-
checkFolder(filepath);
|
|
31
|
-
fs.readFile(absolute, "utf8", function (err, filedata) {
|
|
32
|
-
let formatted = filedata.replace(/{{prefix}}/g, buffer);
|
|
33
|
-
fs.writeFile(
|
|
34
|
-
`${path
|
|
35
|
-
.dirname(absolute)
|
|
36
|
-
.replace(`src/`, `dist/`)
|
|
37
|
-
.replace("patterns/", "")}/${file}`,
|
|
38
|
-
formatted,
|
|
39
|
-
"utf8",
|
|
40
|
-
function (err) {
|
|
41
|
-
if (err) return console.log(".writeFile", err);
|
|
42
|
-
}
|
|
43
|
-
);
|
|
44
|
-
if (err) return console.log("readFile", err);
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
const processTwigs = async () => {
|
|
52
|
-
await checkFolder(`./dist/`);
|
|
53
|
-
await checkFolder(`./dist/components/`);
|
|
54
|
-
traverseDirectory(srcpath);
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
processTwigs();
|