diff --git a/.github/workflows/pr-preview-build.yml b/.github/workflows/pr-preview-build.yml index 3cf07fb..4d45e49 100644 --- a/.github/workflows/pr-preview-build.yml +++ b/.github/workflows/pr-preview-build.yml @@ -9,14 +9,9 @@ jobs: - name: Install trunk run: | - curl -sL https://github.com/trunk-rs/trunk/releases/download/v0.21.14/trunk-x86_64-unknown-linux-gnu.tar.gz -o trunk-x86_64-unknown-linux-gnu.tar.gz + curl -sL https://github.com/trunk-rs/trunk/releases/download/v0.22.0-beta.1/trunk-x86_64-unknown-linux-gnu.tar.gz -o trunk-x86_64-unknown-linux-gnu.tar.gz tar xzf trunk-x86_64-unknown-linux-gnu.tar.gz sudo install trunk /usr/bin/trunk - - uses: actions/setup-node@v4 - with: - node-version: "20" - - name: Install NPM dependencies - run: npm install - name: Set build timestamp run: echo "BUILD_TIMESTAMP=$(date --rfc-3339=seconds --utc)" >> $GITHUB_ENV diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index bb6d9b8..bcfb459 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -28,26 +28,12 @@ jobs: target key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - - uses: actions/cache@v4 - with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- - - name: Install trunk run: | - curl -sL https://github.com/thedodd/trunk/releases/download/v0.21.14/trunk-x86_64-unknown-linux-gnu.tar.gz -o trunk-x86_64-unknown-linux-gnu.tar.gz + curl -sL https://github.com/thedodd/trunk/releases/download/v0.22.0-beta.1/trunk-x86_64-unknown-linux-gnu.tar.gz -o trunk-x86_64-unknown-linux-gnu.tar.gz tar xzf trunk-x86_64-unknown-linux-gnu.tar.gz sudo install trunk /usr/bin/trunk - - uses: actions/setup-node@v4 - with: - node-version: '20' - - - name: Install dependencies - run: npm install - - name: Set build timestamp run: echo "BUILD_TIMESTAMP=$(date --rfc-3339=seconds --utc)" >> $GITHUB_ENV diff --git a/Cargo.lock b/Cargo.lock index 5e6ca86..766c19e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1278,9 +1278,9 @@ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" [[package]] name = "unicode-segmentation" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" +checksum = "a559e63b5d8004e12f9bce88af5c6d939c58de839b7532cfe9653846cedd2a9e" [[package]] name = "unicode-xid" diff --git a/Cargo.toml b/Cargo.toml index 19e1677..c9e6dfe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ browser-panic-hook = "0.2" chrono = { version = "0.4.30", default-features = false, features = ["wasmbind"] } gloo-utils = "0.2" log = "0.4" -patternfly-yew = { version = "0.7", features = ["tree", "icons-fab"] } +patternfly-yew = { version = "0.7.3", features = ["tree", "icons-fab"] } popper-rs = { version = "0.4", features = ["yew", "debug"] } serde_json = "1" strum = { version = "0.27", features = ["derive"] } diff --git a/Trunk.toml b/Trunk.toml new file mode 100644 index 0000000..8be0746 --- /dev/null +++ b/Trunk.toml @@ -0,0 +1,8 @@ +[[node_packages]] +name = "@patternfly/patternfly" +version = "6.4.0" + +[[node_packages]] +name = "@fortawesome/fontawesome-free" +version = "7.1.0" + diff --git a/assets/initializer.mjs b/assets/initializer.mjs index 6a4d730..453f89b 100644 --- a/assets/initializer.mjs +++ b/assets/initializer.mjs @@ -5,18 +5,18 @@ export default function initializer() { console.time("trunk-initializer"); document.body.insertAdjacentHTML("afterbegin", ` -
-
-
+
+
+
Loading
- -
-
-
- +
+
+
+
@@ -93,7 +93,7 @@ function setState(value, helperText) { } const status = document.getElementById("initializerStatus"); status.innerHTML = ` - + `; diff --git a/assets/style.scss b/assets/style.scss index 415c74b..892339e 100644 --- a/assets/style.scss +++ b/assets/style.scss @@ -1,8 +1,16 @@ // only required if you are using the icons-far or icons-fab feature // $fa-font-path: "webfonts"; -@import "../node_modules/@fortawesome/fontawesome-free/scss/fontawesome"; -@import "../node_modules/@fortawesome/fontawesome-free/scss/brands"; +@import "../target/node_modules/@fortawesome/fontawesome-free/7.1.0/scss/fontawesome"; +@import "../target/node_modules/@fortawesome/fontawesome-free/7.1.0/scss/brands"; // PatternFly styles -@import "../node_modules/@patternfly/patternfly/patternfly.scss"; -@import "../node_modules/@patternfly/patternfly/patternfly-addons.scss"; +@import "../target/node_modules/@patternfly/patternfly/6.4.0/patternfly.scss"; +@import "../target/node_modules/@patternfly/patternfly/6.4.0/patternfly-addons.scss"; + +@font-face { + font-family: "Font Awesome 7 Brands"; + font-style: normal; + font-weight: 400; + font-display: block; + src: url("./webfonts/fa-brands-400.woff2"); +} \ No newline at end of file diff --git a/index.html b/index.html index 70755a2..bcd8d3a 100644 --- a/index.html +++ b/index.html @@ -5,19 +5,19 @@ PatternFly Yew Quickstart - - - - + + + + - + - + diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 2a7e1a8..0000000 --- a/package-lock.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "patternfly-yew", - "version": "0.0.1", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "patternfly-yew", - "version": "0.0.1", - "dependencies": { - "@fortawesome/fontawesome-free": "^7.1.0", - "@patternfly/patternfly": "^6.4.0" - } - }, - "node_modules/@fortawesome/fontawesome-free": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-7.1.0.tgz", - "integrity": "sha512-+WxNld5ZCJHvPQCr/GnzCTVREyStrAJjisUPtUxG5ngDA8TMlPnKp6dddlTpai4+1GNmltAeuk1hJEkBohwZYA==", - "license": "(CC-BY-4.0 AND OFL-1.1 AND MIT)", - "engines": { - "node": ">=6" - } - }, - "node_modules/@patternfly/patternfly": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/@patternfly/patternfly/-/patternfly-6.4.0.tgz", - "integrity": "sha512-4drFhg74sEc/fftark5wZevODIog17qR4pwLCdB3j5iK3Uu5oMA2SdLhsEeEQggalfnFzve/Km87MdVR0ghhvQ==", - "license": "MIT" - } - }, - "dependencies": { - "@fortawesome/fontawesome-free": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-7.1.0.tgz", - "integrity": "sha512-+WxNld5ZCJHvPQCr/GnzCTVREyStrAJjisUPtUxG5ngDA8TMlPnKp6dddlTpai4+1GNmltAeuk1hJEkBohwZYA==" - }, - "@patternfly/patternfly": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/@patternfly/patternfly/-/patternfly-6.4.0.tgz", - "integrity": "sha512-4drFhg74sEc/fftark5wZevODIog17qR4pwLCdB3j5iK3Uu5oMA2SdLhsEeEQggalfnFzve/Km87MdVR0ghhvQ==" - } - } -} diff --git a/package.json b/package.json deleted file mode 100644 index cc7cac9..0000000 --- a/package.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "patternfly-yew", - "version": "0.0.1", - "private": true, - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "dependencies": { - "@fortawesome/fontawesome-free": "^7.1.0", - "@patternfly/patternfly": "^6.4.0" - }, - "//dependencies": { - "@fortawesome/fontawesome-free": "Only required if you are enabling the icons-fab or icons-far feature" - } -} diff --git a/src/app/mod.rs b/src/app/mod.rs index cbbaea4..60038c4 100644 --- a/src/app/mod.rs +++ b/src/app/mod.rs @@ -525,7 +525,7 @@ fn page(props: &PageProps) -> Html {
@@ -600,5 +600,5 @@ fn page(props: &PageProps) -> Html { ); - html! ({ for props.children.iter() }) + html! ({ for props.children.iter() }) } diff --git a/src/components/brand/brand.1.example b/src/components/brand/brand.1.example index e6646de..c8a449a 100644 --- a/src/components/brand/brand.1.example +++ b/src/components/brand/brand.1.example @@ -1,3 +1,3 @@ html!( - + ) \ No newline at end of file