diff --git a/.firebaserc b/.firebaserc deleted file mode 100644 index 9bfa952..0000000 --- a/.firebaserc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "projects": { - "default": "yew-material" - } -} diff --git a/.github/workflows/deploy_website.yml b/.github/workflows/deploy_website.yml deleted file mode 100644 index f85becf..0000000 --- a/.github/workflows/deploy_website.yml +++ /dev/null @@ -1,64 +0,0 @@ -name: Deploy website -on: - push: - branches: [ master ] - -jobs: - deploy_website: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Install rust stable - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - target: wasm32-unknown-unknown - override: true - - - uses: actions/cache@v2 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - target - key: cargo-${{ runner.os }}-deploy-${{ hashFiles('**/Cargo.toml') }} - restore-keys: | - cargo-${{ runner.os }}- - - - name: Install trunk - run: | - TRUNK_VERSION=$(curl -s https://api.github.com/repos/thedodd/trunk/releases/latest | grep -oP '(?<="tag_name": ")[^"]*') && \ - wget -qO- https://github.com/thedodd/trunk/releases/download/${TRUNK_VERSION}/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf- && \ - mv trunk ~/.cargo/bin/ && \ - WASM_BINDGEN_VERSION=$(curl -s https://api.github.com/repos/rustwasm/wasm-bindgen/releases/latest | grep -oP '(?<="tag_name": ")[^"]*') && \ - wget -qO- "https://github.com/rustwasm/wasm-bindgen/releases/download/${WASM_BINDGEN_VERSION}/wasm-bindgen-${WASM_BINDGEN_VERSION}-x86_64-unknown-linux-musl.tar.gz" | tar -xzf- && \ - mv wasm-bindgen-${WASM_BINDGEN_VERSION}-x86_64-unknown-linux-musl/wasm-bindgen ~/.cargo/bin/ - - - name: Build website - run: | - cd website - trunk build --release - - - name: Install rust (nightly) - uses: actions-rs/toolchain@v1 - with: - toolchain: nightly - target: wasm32-unknown-unknown - override: true - - - name: Build docs - uses: actions-rs/cargo@v1 - with: - command: doc - toolchain: nightly - args: --no-deps --target wasm32-unknown-unknown --all-features -p material-yew --release - - - name: Copy docs to correct location - run: cp -r target/wasm32-unknown-unknown/doc/ website/dist/docs/ - - - name: Deploy to Firebase Hosting - uses: FirebaseExtended/action-hosting-deploy@v0.3-alpha - with: - repoToken: "${{ secrets.GITHUB_TOKEN }}" - firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_YEW_MATERIAL }}" - channelId: live diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index a04f031..0000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: Lint & Fmt -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: nightly - profile: minimal - components: rustfmt - - - uses: actions/cache@v2 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - target - key: cargo-${{ runner.os }}-lint-${{ hashFiles('**/Cargo.toml') }} - restore-keys: | - cargo-${{ runner.os }}- - - - name: Run cargo fmt - uses: actions-rs/cargo@v1 - with: - command: fmt - toolchain: nightly - args: --all -- --check - - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - components: clippy - - - name: Run clippy - uses: actions-rs/cargo@v1 - with: - command: clippy - toolchain: stable - args: --all-features -- -D warnings diff --git a/.gitignore b/.gitignore index 048a7e5..0cccd58 100644 --- a/.gitignore +++ b/.gitignore @@ -1,16 +1,6 @@ -# Generated by Cargo -# will have compiled files and executables -**/target/ - -# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries -# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html -Cargo.lock - -# These are backup files generated by rustfmt -**/*.rs.bk - -# Node stuff +target node_modules +dist -# Trunk stuff -**/dist/ +# no need to include @material/web bundled in the repo +md-web \ No newline at end of file diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..f221d96 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "build/material-web"] + path = build/material-web + url = https://github.com/material-components/material-web diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/material-yew.iml b/.idea/material-yew.iml new file mode 100644 index 0000000..d845e44 --- /dev/null +++ b/.idea/material-yew.iml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..49e4602 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..46a47c7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..46a9721 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,1290 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "anymap2" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d301b3b94cb4b2f23d7917810addbbaff90738e0ca2be692bd027e70d7e0330c" + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "backtrace" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "builder" +version = "0.1.0" +dependencies = [ + "color-eyre", + "convert_case", + "eyre", + "proc-macro2", + "pulldown-cmark", + "quote", + "serde", + "serde_json", + "syn 2.0.38", +] + +[[package]] +name = "bumpalo" +version = "3.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" + +[[package]] +name = "bytes" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" + +[[package]] +name = "cc" +version = "1.0.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "libc", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "color-eyre" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a667583cca8c4f8436db8de46ea8233c42a7d9ae424a82d338f2e4675229204" +dependencies = [ + "backtrace", + "color-spantrace", + "eyre", + "indenter", + "once_cell", + "owo-colors", + "tracing-error", +] + +[[package]] +name = "color-spantrace" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ba75b3d9449ecdccb27ecbc479fdc0b87fa2dd43d2f8298f9bf0e59aacc8dce" +dependencies = [ + "once_cell", + "owo-colors", + "tracing-core", + "tracing-error", +] + +[[package]] +name = "console_error_panic_hook" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" +dependencies = [ + "cfg-if", + "wasm-bindgen", +] + +[[package]] +name = "convert_case" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "eyre" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c2b6b5a29c02cdc822728b7d7b8ae1bab3e3b05d44522770ddd49722eeac7eb" +dependencies = [ + "indenter", + "once_cell", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "form_urlencoded" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" + +[[package]] +name = "futures-io" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" + +[[package]] +name = "futures-macro" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.38", +] + +[[package]] +name = "futures-sink" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" + +[[package]] +name = "futures-task" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" + +[[package]] +name = "futures-util" +version = "0.3.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "getopts" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14dbbfd5c71d70241ecf9e6f13737f7b5ce823821063188d7e46c41d371eebd5" +dependencies = [ + "unicode-width", +] + +[[package]] +name = "gimli" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" + +[[package]] +name = "gloo" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28999cda5ef6916ffd33fb4a7b87e1de633c47c0dc6d97905fee1cdaa142b94d" +dependencies = [ + "gloo-console 0.2.3", + "gloo-dialogs 0.1.1", + "gloo-events 0.1.2", + "gloo-file 0.2.3", + "gloo-history 0.1.5", + "gloo-net 0.3.1", + "gloo-render 0.1.1", + "gloo-storage 0.2.2", + "gloo-timers 0.2.6", + "gloo-utils 0.1.7", + "gloo-worker 0.2.1", +] + +[[package]] +name = "gloo" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd35526c28cc55c1db77aed6296de58677dbab863b118483a27845631d870249" +dependencies = [ + "gloo-console 0.3.0", + "gloo-dialogs 0.2.0", + "gloo-events 0.2.0", + "gloo-file 0.3.0", + "gloo-history 0.2.0", + "gloo-net 0.4.0", + "gloo-render 0.2.0", + "gloo-storage 0.3.0", + "gloo-timers 0.3.0", + "gloo-utils 0.2.0", + "gloo-worker 0.4.0", +] + +[[package]] +name = "gloo-console" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82b7ce3c05debe147233596904981848862b068862e9ec3e34be446077190d3f" +dependencies = [ + "gloo-utils 0.1.7", + "js-sys", + "serde", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "gloo-console" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a17868f56b4a24f677b17c8cb69958385102fa879418052d60b50bc1727e261" +dependencies = [ + "gloo-utils 0.2.0", + "js-sys", + "serde", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "gloo-dialogs" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67062364ac72d27f08445a46cab428188e2e224ec9e37efdba48ae8c289002e6" +dependencies = [ + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "gloo-dialogs" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf4748e10122b01435750ff530095b1217cf6546173459448b83913ebe7815df" +dependencies = [ + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "gloo-events" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68b107f8abed8105e4182de63845afcc7b69c098b7852a813ea7462a320992fc" +dependencies = [ + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "gloo-events" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27c26fb45f7c385ba980f5fa87ac677e363949e065a083722697ef1b2cc91e41" +dependencies = [ + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "gloo-file" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8d5564e570a38b43d78bdc063374a0c3098c4f0d64005b12f9bbe87e869b6d7" +dependencies = [ + "gloo-events 0.1.2", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "gloo-file" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97563d71863fb2824b2e974e754a81d19c4a7ec47b09ced8a0e6656b6d54bd1f" +dependencies = [ + "gloo-events 0.2.0", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "gloo-history" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85725d90bf0ed47063b3930ef28e863658a7905989e9929a8708aab74a1d5e7f" +dependencies = [ + "gloo-events 0.1.2", + "gloo-utils 0.1.7", + "serde", + "serde-wasm-bindgen", + "serde_urlencoded", + "thiserror", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "gloo-history" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91be9f3dd048f35a59c8de3d716ef6d568360078c73ed35a7700776ed53153c8" +dependencies = [ + "gloo-events 0.2.0", + "gloo-utils 0.2.0", + "serde", + "serde-wasm-bindgen", + "serde_urlencoded", + "thiserror", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "gloo-net" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a66b4e3c7d9ed8d315fd6b97c8b1f74a7c6ecbbc2320e65ae7ed38b7068cc620" +dependencies = [ + "futures-channel", + "futures-core", + "futures-sink", + "gloo-utils 0.1.7", + "http", + "js-sys", + "pin-project", + "serde", + "serde_json", + "thiserror", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "gloo-net" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ac9e8288ae2c632fa9f8657ac70bfe38a1530f345282d7ba66a1f70b72b7dc4" +dependencies = [ + "futures-channel", + "futures-core", + "futures-sink", + "gloo-utils 0.2.0", + "http", + "js-sys", + "pin-project", + "serde", + "serde_json", + "thiserror", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "gloo-render" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fd9306aef67cfd4449823aadcd14e3958e0800aa2183955a309112a84ec7764" +dependencies = [ + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "gloo-render" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56008b6744713a8e8d98ac3dcb7d06543d5662358c9c805b4ce2167ad4649833" +dependencies = [ + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "gloo-storage" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d6ab60bf5dbfd6f0ed1f7843da31b41010515c745735c970e821945ca91e480" +dependencies = [ + "gloo-utils 0.1.7", + "js-sys", + "serde", + "serde_json", + "thiserror", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "gloo-storage" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbc8031e8c92758af912f9bc08fbbadd3c6f3cfcbf6b64cdf3d6a81f0139277a" +dependencies = [ + "gloo-utils 0.2.0", + "js-sys", + "serde", + "serde_json", + "thiserror", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "gloo-timers" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "gloo-timers" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbb143cf96099802033e0d4f4963b19fd2e0b728bcf076cd9cf7f6634f092994" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "gloo-utils" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "037fcb07216cb3a30f7292bd0176b050b7b9a052ba830ef7d5d65f6dc64ba58e" +dependencies = [ + "js-sys", + "serde", + "serde_json", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "gloo-utils" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b5555354113b18c547c1d3a98fbf7fb32a9ff4f6fa112ce823a21641a0ba3aa" +dependencies = [ + "js-sys", + "serde", + "serde_json", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "gloo-worker" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13471584da78061a28306d1359dd0178d8d6fc1c7c80e5e35d27260346e0516a" +dependencies = [ + "anymap2", + "bincode", + "gloo-console 0.2.3", + "gloo-utils 0.1.7", + "js-sys", + "serde", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "gloo-worker" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76495d3dd87de51da268fa3a593da118ab43eb7f8809e17eb38d3319b424e400" +dependencies = [ + "bincode", + "futures", + "gloo-utils 0.2.0", + "gloo-worker-macros", + "js-sys", + "pinned", + "serde", + "thiserror", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "gloo-worker-macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "956caa58d4857bc9941749d55e4bd3000032d8212762586fa5705632967140e7" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.38", +] + +[[package]] +name = "hashbrown" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dfda62a12f55daeae5015f81b0baea145391cb4520f86c248fc615d72640d12" + +[[package]] +name = "hermit-abi" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" + +[[package]] +name = "http" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "implicit-clone" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af3d77000817fd9e7db159e8d52ed9b5941a2cdbfbdc8ca646e59887ae2b2dd1" +dependencies = [ + "indexmap", +] + +[[package]] +name = "indenter" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" + +[[package]] +name = "indexmap" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8adf3ddd720272c6ea8bf59463c04e0f93d0bbf7c5439b691bca2987e0270897" +dependencies = [ + "equivalent", + "hashbrown", +] + +[[package]] +name = "itoa" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" + +[[package]] +name = "js-sys" +version = "0.3.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "libc" +version = "0.2.149" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" + +[[package]] +name = "log" +version = "0.4.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" + +[[package]] +name = "material-yew" +version = "0.1.0" +dependencies = [ + "indexmap", + "js-sys", + "wasm-bindgen", + "web-sys", + "yew", +] + +[[package]] +name = "memchr" +version = "2.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" + +[[package]] +name = "miniz_oxide" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +dependencies = [ + "adler", +] + +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "object" +version = "0.32.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" + +[[package]] +name = "owo-colors" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" + +[[package]] +name = "percent-encoding" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" + +[[package]] +name = "pin-project" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.38", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pinned" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a829027bd95e54cfe13e3e258a1ae7b645960553fb82b75ff852c29688ee595b" +dependencies = [ + "futures", + "rustversion", + "thiserror", +] + +[[package]] +name = "prettyplease" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" +dependencies = [ + "proc-macro2", + "syn 2.0.38", +] + +[[package]] +name = "proc-macro-crate" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn 1.0.109", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro2" +version = "1.0.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b1106fec09662ec6dd98ccac0f81cef56984d0b49f75c92d8cbad76e20c005c" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "prokio" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03b55e106e5791fa5a13abd13c85d6127312e8e09098059ca2bc9b03ca4cf488" +dependencies = [ + "futures", + "gloo 0.8.1", + "num_cpus", + "once_cell", + "pin-project", + "pinned", + "tokio", + "tokio-stream", + "wasm-bindgen-futures", +] + +[[package]] +name = "pulldown-cmark" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a1a2f1f0a7ecff9c31abbe177637be0e97a0aef46cf8738ece09327985d998" +dependencies = [ + "bitflags", + "getopts", + "memchr", + "serde", + "unicase", +] + +[[package]] +name = "quote" +version = "1.0.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + +[[package]] +name = "rustversion" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" + +[[package]] +name = "ryu" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" + +[[package]] +name = "serde" +version = "1.0.188" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde-wasm-bindgen" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3b143e2833c57ab9ad3ea280d21fd34e285a42837aeb0ee301f4f41890fa00e" +dependencies = [ + "js-sys", + "serde", + "wasm-bindgen", +] + +[[package]] +name = "serde_derive" +version = "1.0.188" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.38", +] + +[[package]] +name = "serde_json" +version = "1.0.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "thiserror" +version = "1.0.49" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1177e8c6d7ede7afde3585fd2513e611227efd6481bd78d2e82ba1ce16557ed4" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.49" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10712f02019e9288794769fba95cd6847df9874d49d871d062172f9dd41bc4cc" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.38", +] + +[[package]] +name = "thread_local" +version = "1.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" +dependencies = [ + "cfg-if", + "once_cell", +] + +[[package]] +name = "tokio" +version = "1.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" +dependencies = [ + "backtrace", + "pin-project-lite", +] + +[[package]] +name = "tokio-stream" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "toml_datetime" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" + +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap", + "toml_datetime", + "winnow", +] + +[[package]] +name = "tracing" +version = "0.1.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +dependencies = [ + "cfg-if", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.38", +] + +[[package]] +name = "tracing-core" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-error" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d686ec1c0f384b1277f097b2f279a2ecc11afe8c133c1aabf036a27cb4cd206e" +dependencies = [ + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77" +dependencies = [ + "sharded-slab", + "thread_local", + "tracing-core", +] + +[[package]] +name = "unicase" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" +dependencies = [ + "version_check", +] + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "unicode-segmentation" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" + +[[package]] +name = "unicode-width" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" + +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "wasm-bindgen" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.38", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.38", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" + +[[package]] +name = "web-sys" +version = "0.3.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "winnow" +version = "0.5.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "037711d82167854aff2018dfd193aa0fef5370f456732f0d5a0c59b0f1b4b907" +dependencies = [ + "memchr", +] + +[[package]] +name = "yew" +version = "0.21.0" +source = "git+https://github.com/hamza1311/yew?branch=js-value-properties#2875be249e9c542baa99f2f4e8faae7fb240f848" +dependencies = [ + "console_error_panic_hook", + "futures", + "gloo 0.10.0", + "implicit-clone", + "indexmap", + "js-sys", + "prokio", + "rustversion", + "serde", + "slab", + "thiserror", + "tokio", + "tracing", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "yew-macro", +] + +[[package]] +name = "yew-macro" +version = "0.21.0" +source = "git+https://github.com/hamza1311/yew?branch=js-value-properties#2875be249e9c542baa99f2f4e8faae7fb240f848" +dependencies = [ + "once_cell", + "prettyplease", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.38", +] diff --git a/Cargo.toml b/Cargo.toml index f93f2b0..292f2ec 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,23 @@ +[package] +name = "material-yew" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +indexmap = "2.0.2" +js-sys = "0.3.64" +wasm-bindgen = "0.2.87" +yew = { git = "https://github.com/hamza1311/yew", branch = "js-value-properties", features = ["csr"] } + +[dependencies.web-sys] +version = "0.3.64" +features = [ + "HtmlFormElement" +] + [workspace] members = [ - "material-yew", - "website", - "screenshots" + "build" ] diff --git a/README.md b/README.md index fb6fd33..b1f1139 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,15 @@ # Material Yew -*Material Yew* is a components library for [Yew framework](https://yew.rs/) which is a wrapper around [Material Web Components](https://github.com/material-components/material-components-web-components) exposing Yew components. All modern browsers are supported. There is no support for polyfills required by Internet Explorer 11. +*Material Yew* is a components library for [Yew framework](https://yew.rs/) which is a wrapper around [Material Web Components](https://github.com/material-components/material-web) exposing Yew components. All modern browsers are supported. ### Example ```rust -use material_yew::MatButton; +use material_yew::Button; use yew::html; html! { - + `}renderIndicator(){return Q``}renderRipple(){return this.shouldRenderRipple?Q``:""}createAdapter(){return Object.assign(Object.assign({},It(this.mdcRoot)),{setAttr:(t,e)=>this.mdcRoot.setAttribute(t,e),activateIndicator:async t=>{await this.tabIndicator.updateComplete,this.tabIndicator.activate(t)},deactivateIndicator:async()=>{await this.tabIndicator.updateComplete,this.tabIndicator.deactivate()},notifyInteracted:()=>this.dispatchEvent(new CustomEvent(Wi.strings.INTERACTED_EVENT,{detail:{tabId:this.id},bubbles:!0,composed:!0,cancelable:!0})),getOffsetLeft:()=>this.offsetLeft,getOffsetWidth:()=>this.mdcRoot.offsetWidth,getContentOffsetLeft:()=>this._contentElement.offsetLeft,getContentOffsetWidth:()=>this._contentElement.offsetWidth,focus:()=>{this.initFocus?this.initFocus=!1:this.mdcRoot.focus()}})}activate(t){t||(this.initFocus=!0),this.mdcFoundation?(this.mdcFoundation.activate(t),this.setActive(this.mdcFoundation.isActive())):this.updateComplete.then((()=>{this.mdcFoundation.activate(t),this.setActive(this.mdcFoundation.isActive())}))}deactivate(){this.mdcFoundation.deactivate(),this.setActive(this.mdcFoundation.isActive())}setActive(t){const e=this.active;e!==t&&(this._active=t,this.requestUpdate("active",e))}computeDimensions(){return this.mdcFoundation.computeDimensions()}computeIndicatorClientRect(){return this.tabIndicator.computeContentClientRect()}focus(){this.mdcRoot.focus(),this.handleFocus()}handleClick(){this.handleFocus(),this.mdcFoundation.handleClick()}handleFocus(){this.handleRippleFocus()}handleBlur(){this.handleRippleBlur()}handleRippleMouseDown(t){const e=()=>{window.removeEventListener("mouseup",e),this.handleRippleDeactivate()};window.addEventListener("mouseup",e),this.rippleHandlers.startPress(t)}handleRippleTouchStart(t){this.rippleHandlers.startPress(t)}handleRippleDeactivate(){this.rippleHandlers.endPress()}handleRippleMouseEnter(){this.rippleHandlers.startHover()}handleRippleMouseLeave(){this.rippleHandlers.endHover()}handleRippleFocus(){this.rippleHandlers.startFocus()}handleRippleBlur(){this.rippleHandlers.endFocus()}get isRippleActive(){var t;return(null===(t=this.rippleElement)||void 0===t?void 0:t.isActive)||!1}}Yi.shadowRootOptions={mode:"open",delegatesFocus:!0},r([m(".mdc-tab")],Yi.prototype,"mdcRoot",void 0),r([m("mwc-tab-indicator")],Yi.prototype,"tabIndicator",void 0),r([l()],Yi.prototype,"label",void 0),r([l()],Yi.prototype,"icon",void 0),r([l({type:Boolean})],Yi.prototype,"hasImageIcon",void 0),r([l({type:Boolean})],Yi.prototype,"isFadingIndicator",void 0),r([l({type:Boolean})],Yi.prototype,"minWidth",void 0),r([l({type:Boolean})],Yi.prototype,"isMinWidthIndicator",void 0),r([l({type:Boolean,reflect:!0,attribute:"active"})],Yi.prototype,"active",null),r([l()],Yi.prototype,"indicatorIcon",void 0),r([l({type:Boolean})],Yi.prototype,"stacked",void 0),r([ce((async function(t){await this.updateComplete,this.mdcFoundation.setFocusOnActivate(t)})),l({type:Boolean})],Yi.prototype,"focusOnActivate",void 0),r([m(".mdc-tab__content")],Yi.prototype,"_contentElement",void 0),r([c()],Yi.prototype,"shouldRenderRipple",void 0),r([c()],Yi.prototype,"useStateLayerCustomProperties",void 0),r([u("mwc-ripple")],Yi.prototype,"ripple",void 0),r([h({passive:!0})],Yi.prototype,"handleRippleTouchStart",null);var qi=function(t){this.adapter=t};const Ki=T`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform;transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}[dir=rtl] .mdc-floating-label,.mdc-floating-label[dir=rtl]{right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right}.mdc-floating-label--float-above{cursor:auto}.mdc-floating-label--required::after{margin-left:1px;margin-right:0px;content:"*"}[dir=rtl] .mdc-floating-label--required::after,.mdc-floating-label--required[dir=rtl]::after{margin-left:0;margin-right:1px}.mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-standard 250ms 1}@keyframes mdc-floating-label-shake-float-above-standard{0%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-106%) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{border-bottom-width:1px}.mdc-line-ripple::before{z-index:1}.mdc-line-ripple::after{transform:scaleX(0);border-bottom-width:2px;opacity:0;z-index:2}.mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline,.mdc-notched-outline[dir=rtl]{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;border-top:1px solid;border-bottom:1px solid;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}[dir=rtl] .mdc-notched-outline__leading,.mdc-notched-outline__leading[dir=rtl]{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid;flex-grow:1}[dir=rtl] .mdc-notched-outline__trailing,.mdc-notched-outline__trailing[dir=rtl]{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 12px * 2)}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(100% / 0.75)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch,.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl]{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-text-field--filled{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity}.mdc-text-field--filled .mdc-text-field__ripple::before,.mdc-text-field--filled .mdc-text-field__ripple::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-text-field--filled .mdc-text-field__ripple::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-text-field--filled .mdc-text-field__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-text-field--filled.mdc-ripple-upgraded--unbounded .mdc-text-field__ripple::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-text-field--filled.mdc-ripple-upgraded--foreground-activation .mdc-text-field__ripple::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-text-field--filled.mdc-ripple-upgraded--foreground-deactivation .mdc-text-field__ripple::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-text-field--filled .mdc-text-field__ripple::before,.mdc-text-field--filled .mdc-text-field__ripple::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-text-field--filled.mdc-ripple-upgraded .mdc-text-field__ripple::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-text-field__ripple{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.mdc-text-field{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:0;border-bottom-left-radius:0;display:inline-flex;align-items:baseline;padding:0 16px;position:relative;box-sizing:border-box;overflow:hidden;will-change:opacity,transform,color}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-floating-label{color:rgba(0, 0, 0, 0.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input{color:rgba(0, 0, 0, 0.87)}@media all{.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:rgba(0, 0, 0, 0.54)}}@media all{.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:rgba(0, 0, 0, 0.54)}}.mdc-text-field .mdc-text-field__input{caret-color:#6200ee;caret-color:var(--mdc-theme-primary, #6200ee)}.mdc-text-field:not(.mdc-text-field--disabled)+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:rgba(0, 0, 0, 0.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field-character-counter,.mdc-text-field:not(.mdc-text-field--disabled)+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:rgba(0, 0, 0, 0.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon--leading{color:rgba(0, 0, 0, 0.54)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon--trailing{color:rgba(0, 0, 0, 0.54)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--prefix{color:rgba(0, 0, 0, 0.6)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__affix--suffix{color:rgba(0, 0, 0, 0.6)}.mdc-text-field .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-text-field__input{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);height:28px;transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1);width:100%;min-width:0;border:none;border-radius:0;background:none;appearance:none;padding:0}.mdc-text-field__input::-ms-clear{display:none}.mdc-text-field__input::-webkit-calendar-picker-indicator{display:none}.mdc-text-field__input:focus{outline:none}.mdc-text-field__input:invalid{box-shadow:none}@media all{.mdc-text-field__input::placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1);opacity:0}}@media all{.mdc-text-field__input:-ms-input-placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1);opacity:0}}@media all{.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mdc-text-field--focused .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}}@media all{.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}}.mdc-text-field__affix{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);height:28px;transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1);opacity:0;white-space:nowrap}.mdc-text-field--label-floating .mdc-text-field__affix,.mdc-text-field--no-label .mdc-text-field__affix{opacity:1}@supports(-webkit-hyphens: none){.mdc-text-field--outlined .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}[dir=rtl] .mdc-text-field__affix--prefix,.mdc-text-field__affix--prefix[dir=rtl]{padding-left:2px;padding-right:0}.mdc-text-field--end-aligned .mdc-text-field__affix--prefix{padding-left:0;padding-right:12px}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--prefix,.mdc-text-field--end-aligned .mdc-text-field__affix--prefix[dir=rtl]{padding-left:12px;padding-right:0}.mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}[dir=rtl] .mdc-text-field__affix--suffix,.mdc-text-field__affix--suffix[dir=rtl]{padding-left:0;padding-right:12px}.mdc-text-field--end-aligned .mdc-text-field__affix--suffix{padding-left:2px;padding-right:0}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--suffix,.mdc-text-field--end-aligned .mdc-text-field__affix--suffix[dir=rtl]{padding-left:0;padding-right:2px}.mdc-text-field--filled{height:56px}.mdc-text-field--filled .mdc-text-field__ripple::before,.mdc-text-field--filled .mdc-text-field__ripple::after{background-color:rgba(0, 0, 0, 0.87);background-color:var(--mdc-ripple-color, rgba(0, 0, 0, 0.87))}.mdc-text-field--filled:hover .mdc-text-field__ripple::before,.mdc-text-field--filled.mdc-ripple-surface--hover .mdc-text-field__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-text-field--filled.mdc-ripple-upgraded--background-focused .mdc-text-field__ripple::before,.mdc-text-field--filled:not(.mdc-ripple-upgraded):focus .mdc-text-field__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-text-field--filled::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:whitesmoke}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.42)}.mdc-text-field--filled:not(.mdc-text-field--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.87)}.mdc-text-field--filled .mdc-line-ripple::after{border-bottom-color:#6200ee;border-bottom-color:var(--mdc-theme-primary, #6200ee)}.mdc-text-field--filled .mdc-floating-label{left:16px;right:initial}[dir=rtl] .mdc-text-field--filled .mdc-floating-label,.mdc-text-field--filled .mdc-floating-label[dir=rtl]{left:initial;right:16px}.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{height:100%}.mdc-text-field--filled.mdc-text-field--no-label .mdc-floating-label{display:none}.mdc-text-field--filled.mdc-text-field--no-label::before{display:none}@supports(-webkit-hyphens: none){.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field--outlined{height:56px;overflow:visible}.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined{0%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}}.mdc-text-field--outlined .mdc-text-field__input{height:100%}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.38)}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.87)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:#6200ee;border-color:var(--mdc-theme-primary, #6200ee)}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px, var(--mdc-shape-small, 4px)) * 2)}}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}@supports(top: max(0%)){.mdc-text-field--outlined{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined{padding-right:max(16px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-right:max(16px, var(--mdc-shape-small, 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-left:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-right:max(16px, var(--mdc-shape-small, 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-right:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:max(16px, var(--mdc-shape-small, 4px))}}.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-right:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-right:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-text-field--outlined .mdc-text-field__ripple::before,.mdc-text-field--outlined .mdc-text-field__ripple::after{background-color:transparent;background-color:var(--mdc-ripple-color, transparent)}.mdc-text-field--outlined .mdc-floating-label{left:4px;right:initial}[dir=rtl] .mdc-text-field--outlined .mdc-floating-label,.mdc-text-field--outlined .mdc-floating-label[dir=rtl]{left:initial;right:4px}.mdc-text-field--outlined .mdc-text-field__input{display:flex;border:none !important;background-color:transparent}.mdc-text-field--outlined .mdc-notched-outline{z-index:1}.mdc-text-field--textarea{flex-direction:column;align-items:center;width:auto;height:auto;padding:0;transition:none}.mdc-text-field--textarea .mdc-floating-label{top:19px}.mdc-text-field--textarea .mdc-floating-label:not(.mdc-floating-label--float-above){transform:none}.mdc-text-field--textarea .mdc-text-field__input{flex-grow:1;height:auto;min-height:1.5rem;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;resize:none;padding:0 16px;line-height:1.5rem}.mdc-text-field--textarea.mdc-text-field--filled::before{display:none}.mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-10.25px) scale(0.75)}.mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-filled 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-filled{0%{transform:translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-10.25px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-10.25px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75)}}.mdc-text-field--textarea.mdc-text-field--filled .mdc-text-field__input{margin-top:23px;margin-bottom:9px}.mdc-text-field--textarea.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-27.25px) scale(1)}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-24.75px) scale(0.75)}.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-outlined{0%{transform:translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-24.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-24.75px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75)}}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label{top:18px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field__input{margin-bottom:2px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter{align-self:flex-end;padding:0 16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::after{display:inline-block;width:0;height:16px;content:"";vertical-align:-16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::before{display:none}.mdc-text-field__resizer{align-self:stretch;display:inline-flex;flex-direction:column;flex-grow:1;max-height:100%;max-width:100%;min-height:56px;min-width:fit-content;min-width:-moz-available;min-width:-webkit-fill-available;overflow:hidden;resize:both}.mdc-text-field--filled .mdc-text-field__resizer{transform:translateY(-1px)}.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field__input,.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field-character-counter{transform:translateY(1px)}.mdc-text-field--outlined .mdc-text-field__resizer{transform:translateX(-1px) translateY(-1px)}[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer,.mdc-text-field--outlined .mdc-text-field__resizer[dir=rtl]{transform:translateX(1px) translateY(-1px)}.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter{transform:translateX(1px) translateY(1px)}[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input,[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input[dir=rtl],.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter[dir=rtl]{transform:translateX(-1px) translateY(1px)}.mdc-text-field--with-leading-icon{padding-left:0;padding-right:16px}[dir=rtl] .mdc-text-field--with-leading-icon,.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:16px;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 48px);left:48px;right:initial}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label,.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label[dir=rtl]{left:initial;right:48px}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label{left:36px;right:initial}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label[dir=rtl]{left:initial;right:36px}.mdc-text-field--with-leading-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) translateX(-32px) scale(1)}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-37.25px) translateX(32px) scale(1)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) translateX(-32px) scale(0.75)}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl],.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-34.75px) translateX(32px) scale(0.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon{0%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake,.mdc-text-field--with-leading-icon.mdc-text-field--outlined[dir=rtl] .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon-rtl{0%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - -32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - -32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}}.mdc-text-field--with-trailing-icon{padding-left:16px;padding-right:0}[dir=rtl] .mdc-text-field--with-trailing-icon,.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0;padding-right:16px}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 64px)}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-text-field--with-trailing-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 96px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 96px / 0.75)}.mdc-text-field-helper-line{display:flex;justify-content:space-between;box-sizing:border-box}.mdc-text-field+.mdc-text-field-helper-line{padding-right:16px;padding-left:16px}.mdc-form-field>.mdc-text-field+label{align-self:flex-start}.mdc-text-field--focused:not(.mdc-text-field--disabled) .mdc-floating-label{color:rgba(98, 0, 238, 0.87)}.mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--focused .mdc-notched-outline__trailing{border-width:2px}.mdc-text-field--focused+.mdc-text-field-helper-line .mdc-text-field-helper-text:not(.mdc-text-field-helper-text--validation-msg){opacity:1}.mdc-text-field--focused.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-text-field--focused.mdc-text-field--outlined.mdc-text-field--textarea .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-floating-label{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid .mdc-text-field__input{caret-color:#b00020;caret-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__icon--trailing{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--invalid:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{opacity:1}.mdc-text-field--disabled{pointer-events:none}.mdc-text-field--disabled .mdc-text-field__input{color:rgba(0, 0, 0, 0.38)}@media all{.mdc-text-field--disabled .mdc-text-field__input::placeholder{color:rgba(0, 0, 0, 0.38)}}@media all{.mdc-text-field--disabled .mdc-text-field__input:-ms-input-placeholder{color:rgba(0, 0, 0, 0.38)}}.mdc-text-field--disabled .mdc-floating-label{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-text-field-character-counter,.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-text-field__icon--leading{color:rgba(0, 0, 0, 0.3)}.mdc-text-field--disabled .mdc-text-field__icon--trailing{color:rgba(0, 0, 0, 0.3)}.mdc-text-field--disabled .mdc-text-field__affix--prefix{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-text-field__affix--suffix{color:rgba(0, 0, 0, 0.38)}.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.06)}.mdc-text-field--disabled .mdc-notched-outline__leading,.mdc-text-field--disabled .mdc-notched-outline__notch,.mdc-text-field--disabled .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.06)}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__input::placeholder{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__input:-ms-input-placeholder{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-floating-label{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-helper-text{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field-character-counter,.mdc-text-field--disabled+.mdc-text-field-helper-line .mdc-text-field-character-counter{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__icon--leading{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__icon--trailing{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__affix--prefix{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-text-field__affix--suffix{color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:GrayText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-text-field--disabled .mdc-notched-outline__leading,.mdc-text-field--disabled .mdc-notched-outline__notch,.mdc-text-field--disabled .mdc-notched-outline__trailing{border-color:GrayText}}@media screen and (forced-colors: active){.mdc-text-field--disabled .mdc-text-field__input{background-color:Window}.mdc-text-field--disabled .mdc-floating-label{z-index:1}}.mdc-text-field--disabled .mdc-floating-label{cursor:default}.mdc-text-field--disabled.mdc-text-field--filled{background-color:#fafafa}.mdc-text-field--disabled.mdc-text-field--filled .mdc-text-field__ripple{display:none}.mdc-text-field--disabled .mdc-text-field__input{pointer-events:auto}.mdc-text-field--end-aligned .mdc-text-field__input{text-align:right}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__input,.mdc-text-field--end-aligned .mdc-text-field__input[dir=rtl]{text-align:left}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix{direction:ltr}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--leading,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--leading{order:1}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix{order:2}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input{order:3}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix{order:4}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--trailing,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--trailing{order:5}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__input,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__input{text-align:right}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--prefix{padding-right:12px}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--suffix{padding-left:2px}.mdc-text-field-helper-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit);display:block;margin-top:0;line-height:normal;margin:0;opacity:0;will-change:opacity;transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-text-field-helper-text::before{display:inline-block;width:0;height:16px;content:"";vertical-align:0}.mdc-text-field-helper-text--persistent{transition:none;opacity:1;will-change:initial}.mdc-text-field-character-counter{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit);display:block;margin-top:0;line-height:normal;margin-left:auto;margin-right:0;padding-left:16px;padding-right:0;white-space:nowrap}.mdc-text-field-character-counter::before{display:inline-block;width:0;height:16px;content:"";vertical-align:0}[dir=rtl] .mdc-text-field-character-counter,.mdc-text-field-character-counter[dir=rtl]{margin-left:0;margin-right:auto}[dir=rtl] .mdc-text-field-character-counter,.mdc-text-field-character-counter[dir=rtl]{padding-left:0;padding-right:16px}.mdc-text-field__icon{align-self:center;cursor:pointer}.mdc-text-field__icon:not([tabindex]),.mdc-text-field__icon[tabindex="-1"]{cursor:default;pointer-events:none}.mdc-text-field__icon svg{display:block}.mdc-text-field__icon--leading{margin-left:16px;margin-right:8px}[dir=rtl] .mdc-text-field__icon--leading,.mdc-text-field__icon--leading[dir=rtl]{margin-left:8px;margin-right:16px}.mdc-text-field__icon--trailing{padding:12px;margin-left:0px;margin-right:0px}[dir=rtl] .mdc-text-field__icon--trailing,.mdc-text-field__icon--trailing[dir=rtl]{margin-left:0px;margin-right:0px}.material-icons{font-family:var(--mdc-icon-font, "Material Icons");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}:host{display:inline-flex;flex-direction:column;outline:none}.mdc-text-field{width:100%}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.42);border-bottom-color:var(--mdc-text-field-idle-line-color, rgba(0, 0, 0, 0.42))}.mdc-text-field:not(.mdc-text-field--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.87);border-bottom-color:var(--mdc-text-field-hover-line-color, rgba(0, 0, 0, 0.87))}.mdc-text-field.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.06);border-bottom-color:var(--mdc-text-field-disabled-line-color, rgba(0, 0, 0, 0.06))}.mdc-text-field.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-text-field__input{direction:inherit}mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-outlined-idle-border-color, rgba(0, 0, 0, 0.38) )}:host(:not([disabled]):hover) :not(.mdc-text-field--invalid):not(.mdc-text-field--focused) mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-outlined-hover-border-color, rgba(0, 0, 0, 0.87) )}:host(:not([disabled])) .mdc-text-field:not(.mdc-text-field--outlined){background-color:var(--mdc-text-field-fill-color, whitesmoke)}:host(:not([disabled])) .mdc-text-field.mdc-text-field--invalid mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-error-color, var(--mdc-theme-error, #b00020) )}:host(:not([disabled])) .mdc-text-field.mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-character-counter,:host(:not([disabled])) .mdc-text-field.mdc-text-field--invalid .mdc-text-field__icon{color:var(--mdc-text-field-error-color, var(--mdc-theme-error, #b00020))}:host(:not([disabled])) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label,:host(:not([disabled])) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label::after{color:var(--mdc-text-field-label-ink-color, rgba(0, 0, 0, 0.6))}:host(:not([disabled])) .mdc-text-field.mdc-text-field--focused mwc-notched-outline{--mdc-notched-outline-stroke-width: 2px}:host(:not([disabled])) .mdc-text-field.mdc-text-field--focused:not(.mdc-text-field--invalid) mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-focused-label-color, var(--mdc-theme-primary, rgba(98, 0, 238, 0.87)) )}:host(:not([disabled])) .mdc-text-field.mdc-text-field--focused:not(.mdc-text-field--invalid) .mdc-floating-label{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}:host(:not([disabled])) .mdc-text-field .mdc-text-field__input{color:var(--mdc-text-field-ink-color, rgba(0, 0, 0, 0.87))}:host(:not([disabled])) .mdc-text-field .mdc-text-field__input::placeholder{color:var(--mdc-text-field-label-ink-color, rgba(0, 0, 0, 0.6))}:host(:not([disabled])) .mdc-text-field-helper-line .mdc-text-field-helper-text:not(.mdc-text-field-helper-text--validation-msg),:host(:not([disabled])) .mdc-text-field-helper-line:not(.mdc-text-field--invalid) .mdc-text-field-character-counter{color:var(--mdc-text-field-label-ink-color, rgba(0, 0, 0, 0.6))}:host([disabled]) .mdc-text-field:not(.mdc-text-field--outlined){background-color:var(--mdc-text-field-disabled-fill-color, #fafafa)}:host([disabled]) .mdc-text-field.mdc-text-field--outlined mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-text-field-outlined-disabled-border-color, rgba(0, 0, 0, 0.06) )}:host([disabled]) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label,:host([disabled]) .mdc-text-field:not(.mdc-text-field--invalid):not(.mdc-text-field--focused) .mdc-floating-label::after{color:var(--mdc-text-field-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-text-field .mdc-text-field__input,:host([disabled]) .mdc-text-field .mdc-text-field__input::placeholder{color:var(--mdc-text-field-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-text-field-helper-line .mdc-text-field-helper-text,:host([disabled]) .mdc-text-field-helper-line .mdc-text-field-character-counter{color:var(--mdc-text-field-disabled-ink-color, rgba(0, 0, 0, 0.38))}`;var Zi={ARIA_CONTROLS:"aria-controls",ARIA_DESCRIBEDBY:"aria-describedby",INPUT_SELECTOR:".mdc-text-field__input",LABEL_SELECTOR:".mdc-floating-label",LEADING_ICON_SELECTOR:".mdc-text-field__icon--leading",LINE_RIPPLE_SELECTOR:".mdc-line-ripple",OUTLINE_SELECTOR:".mdc-notched-outline",PREFIX_SELECTOR:".mdc-text-field__affix--prefix",SUFFIX_SELECTOR:".mdc-text-field__affix--suffix",TRAILING_ICON_SELECTOR:".mdc-text-field__icon--trailing"},Qi={DISABLED:"mdc-text-field--disabled",FOCUSED:"mdc-text-field--focused",HELPER_LINE:"mdc-text-field-helper-line",INVALID:"mdc-text-field--invalid",LABEL_FLOATING:"mdc-text-field--label-floating",NO_LABEL:"mdc-text-field--no-label",OUTLINED:"mdc-text-field--outlined",ROOT:"mdc-text-field",TEXTAREA:"mdc-text-field--textarea",WITH_LEADING_ICON:"mdc-text-field--with-leading-icon",WITH_TRAILING_ICON:"mdc-text-field--with-trailing-icon",WITH_INTERNAL_COUNTER:"mdc-text-field--with-internal-counter"},Ji={LABEL_SCALE:.75},tr=["pattern","min","max","required","step","minlength","maxlength"],er=["color","date","datetime-local","month","range","time","week"],ir=["mousedown","touchstart"],rr=["click","keydown"],nr=function(t){function r(e,n){void 0===n&&(n={});var o=t.call(this,i(i({},r.defaultAdapter),e))||this;return o.isFocused=!1,o.receivedUserInput=!1,o.valid=!0,o.useNativeValidation=!0,o.validateOnValueChange=!0,o.helperText=n.helperText,o.characterCounter=n.characterCounter,o.leadingIcon=n.leadingIcon,o.trailingIcon=n.trailingIcon,o.inputFocusHandler=function(){o.activateFocus()},o.inputBlurHandler=function(){o.deactivateFocus()},o.inputInputHandler=function(){o.handleInput()},o.setPointerXOffset=function(t){o.setTransformOrigin(t)},o.textFieldInteractionHandler=function(){o.handleTextFieldInteraction()},o.validationAttributeChangeHandler=function(t){o.handleValidationAttributeChange(t)},o}return e(r,t),Object.defineProperty(r,"cssClasses",{get:function(){return Qi},enumerable:!1,configurable:!0}),Object.defineProperty(r,"strings",{get:function(){return Zi},enumerable:!1,configurable:!0}),Object.defineProperty(r,"numbers",{get:function(){return Ji},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"shouldAlwaysFloat",{get:function(){var t=this.getNativeInput().type;return er.indexOf(t)>=0},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"shouldFloat",{get:function(){return this.shouldAlwaysFloat||this.isFocused||!!this.getValue()||this.isBadInput()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"shouldShake",{get:function(){return!this.isFocused&&!this.isValid()&&!!this.getValue()},enumerable:!1,configurable:!0}),Object.defineProperty(r,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!0},setInputAttr:function(){},removeInputAttr:function(){},registerTextFieldInteractionHandler:function(){},deregisterTextFieldInteractionHandler:function(){},registerInputInteractionHandler:function(){},deregisterInputInteractionHandler:function(){},registerValidationAttributeChangeHandler:function(){return new MutationObserver((function(){}))},deregisterValidationAttributeChangeHandler:function(){},getNativeInput:function(){return null},isFocused:function(){return!1},activateLineRipple:function(){},deactivateLineRipple:function(){},setLineRippleTransformOrigin:function(){},shakeLabel:function(){},floatLabel:function(){},setLabelRequired:function(){},hasLabel:function(){return!1},getLabelWidth:function(){return 0},hasOutline:function(){return!1},notchOutline:function(){},closeOutline:function(){}}},enumerable:!1,configurable:!0}),r.prototype.init=function(){var t,e,i,r;this.adapter.hasLabel()&&this.getNativeInput().required&&this.adapter.setLabelRequired(!0),this.adapter.isFocused()?this.inputFocusHandler():this.adapter.hasLabel()&&this.shouldFloat&&(this.notchOutline(!0),this.adapter.floatLabel(!0),this.styleFloating(!0)),this.adapter.registerInputInteractionHandler("focus",this.inputFocusHandler),this.adapter.registerInputInteractionHandler("blur",this.inputBlurHandler),this.adapter.registerInputInteractionHandler("input",this.inputInputHandler);try{for(var o=n(ir),a=o.next();!a.done;a=o.next()){var d=a.value;this.adapter.registerInputInteractionHandler(d,this.setPointerXOffset)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}try{for(var s=n(rr),l=s.next();!l.done;l=s.next()){d=l.value;this.adapter.registerTextFieldInteractionHandler(d,this.textFieldInteractionHandler)}}catch(t){i={error:t}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}this.validationObserver=this.adapter.registerValidationAttributeChangeHandler(this.validationAttributeChangeHandler),this.setcharacterCounter(this.getValue().length)},r.prototype.destroy=function(){var t,e,i,r;this.adapter.deregisterInputInteractionHandler("focus",this.inputFocusHandler),this.adapter.deregisterInputInteractionHandler("blur",this.inputBlurHandler),this.adapter.deregisterInputInteractionHandler("input",this.inputInputHandler);try{for(var o=n(ir),a=o.next();!a.done;a=o.next()){var d=a.value;this.adapter.deregisterInputInteractionHandler(d,this.setPointerXOffset)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}try{for(var s=n(rr),l=s.next();!l.done;l=s.next()){d=l.value;this.adapter.deregisterTextFieldInteractionHandler(d,this.textFieldInteractionHandler)}}catch(t){i={error:t}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}this.adapter.deregisterValidationAttributeChangeHandler(this.validationObserver)},r.prototype.handleTextFieldInteraction=function(){var t=this.adapter.getNativeInput();t&&t.disabled||(this.receivedUserInput=!0)},r.prototype.handleValidationAttributeChange=function(t){var e=this;t.some((function(t){return tr.indexOf(t)>-1&&(e.styleValidity(!0),e.adapter.setLabelRequired(e.getNativeInput().required),!0)})),t.indexOf("maxlength")>-1&&this.setcharacterCounter(this.getValue().length)},r.prototype.notchOutline=function(t){if(this.adapter.hasOutline()&&this.adapter.hasLabel())if(t){var e=this.adapter.getLabelWidth()*Ji.LABEL_SCALE;this.adapter.notchOutline(e)}else this.adapter.closeOutline()},r.prototype.activateFocus=function(){this.isFocused=!0,this.styleFocused(this.isFocused),this.adapter.activateLineRipple(),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),!this.helperText||!this.helperText.isPersistent()&&this.helperText.isValidation()&&this.valid||this.helperText.showToScreenReader()},r.prototype.setTransformOrigin=function(t){if(!this.isDisabled()&&!this.adapter.hasOutline()){var e=t.touches,i=e?e[0]:t,r=i.target.getBoundingClientRect(),n=i.clientX-r.left;this.adapter.setLineRippleTransformOrigin(n)}},r.prototype.handleInput=function(){this.autoCompleteFocus(),this.setcharacterCounter(this.getValue().length)},r.prototype.autoCompleteFocus=function(){this.receivedUserInput||this.activateFocus()},r.prototype.deactivateFocus=function(){this.isFocused=!1,this.adapter.deactivateLineRipple();var t=this.isValid();this.styleValidity(t),this.styleFocused(this.isFocused),this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.adapter.shakeLabel(this.shouldShake)),this.shouldFloat||(this.receivedUserInput=!1)},r.prototype.getValue=function(){return this.getNativeInput().value},r.prototype.setValue=function(t){if(this.getValue()!==t&&(this.getNativeInput().value=t),this.setcharacterCounter(t.length),this.validateOnValueChange){var e=this.isValid();this.styleValidity(e)}this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.validateOnValueChange&&this.adapter.shakeLabel(this.shouldShake))},r.prototype.isValid=function(){return this.useNativeValidation?this.isNativeInputValid():this.valid},r.prototype.setValid=function(t){this.valid=t,this.styleValidity(t);var e=!t&&!this.isFocused&&!!this.getValue();this.adapter.hasLabel()&&this.adapter.shakeLabel(e)},r.prototype.setValidateOnValueChange=function(t){this.validateOnValueChange=t},r.prototype.getValidateOnValueChange=function(){return this.validateOnValueChange},r.prototype.setUseNativeValidation=function(t){this.useNativeValidation=t},r.prototype.isDisabled=function(){return this.getNativeInput().disabled},r.prototype.setDisabled=function(t){this.getNativeInput().disabled=t,this.styleDisabled(t)},r.prototype.setHelperTextContent=function(t){this.helperText&&this.helperText.setContent(t)},r.prototype.setLeadingIconAriaLabel=function(t){this.leadingIcon&&this.leadingIcon.setAriaLabel(t)},r.prototype.setLeadingIconContent=function(t){this.leadingIcon&&this.leadingIcon.setContent(t)},r.prototype.setTrailingIconAriaLabel=function(t){this.trailingIcon&&this.trailingIcon.setAriaLabel(t)},r.prototype.setTrailingIconContent=function(t){this.trailingIcon&&this.trailingIcon.setContent(t)},r.prototype.setcharacterCounter=function(t){if(this.characterCounter){var e=this.getNativeInput().maxLength;if(-1===e)throw new Error("MDCTextFieldFoundation: Expected maxlength html property on text input or textarea.");this.characterCounter.setCounterValue(t,e)}},r.prototype.isBadInput=function(){return this.getNativeInput().validity.badInput||!1},r.prototype.isNativeInputValid=function(){return this.getNativeInput().validity.valid},r.prototype.styleValidity=function(t){var e=r.cssClasses.INVALID;if(t?this.adapter.removeClass(e):this.adapter.addClass(e),this.helperText){if(this.helperText.setValidity(t),!this.helperText.isValidation())return;var i=this.helperText.isVisible(),n=this.helperText.getId();i&&n?this.adapter.setInputAttr(Zi.ARIA_DESCRIBEDBY,n):this.adapter.removeInputAttr(Zi.ARIA_DESCRIBEDBY)}},r.prototype.styleFocused=function(t){var e=r.cssClasses.FOCUSED;t?this.adapter.addClass(e):this.adapter.removeClass(e)},r.prototype.styleDisabled=function(t){var e=r.cssClasses,i=e.DISABLED,n=e.INVALID;t?(this.adapter.addClass(i),this.adapter.removeClass(n)):this.adapter.removeClass(i),this.leadingIcon&&this.leadingIcon.setDisabled(t),this.trailingIcon&&this.trailingIcon.setDisabled(t)},r.prototype.styleFloating=function(t){var e=r.cssClasses.LABEL_FLOATING;t?this.adapter.addClass(e):this.adapter.removeClass(e)},r.prototype.getNativeInput=function(){return(this.adapter?this.adapter.getNativeInput():null)||{disabled:!1,maxLength:-1,required:!1,type:"input",validity:{badInput:!1,valid:!0},value:""}},r}(kt),or=nr;const ar=Vt(class extends Gt{constructor(t){if(super(t),t.type!==Ut.PROPERTY&&t.type!==Ut.ATTRIBUTE&&t.type!==Ut.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!Di(t))throw Error("`live` bindings can only contain a single expression")}render(t){return t}update(t,[e]){if(e===J||e===tt)return e;const i=t.element,r=t.name;if(t.type===Ut.PROPERTY){if(e===i[r])return J}else if(t.type===Ut.BOOLEAN_ATTRIBUTE){if(!!e===i.hasAttribute(r))return J}else if(t.type===Ut.ATTRIBUTE&&i.getAttribute(r)===e+"")return J;return((t,e=Mi)=>{t._$AH=e})(t),e}}),dr=["touchstart","touchmove","scroll","mousewheel"],sr=(t={})=>{const e={};for(const i in t)e[i]=t[i];return Object.assign({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1},e)};class lr extends ie{constructor(){super(...arguments),this.mdcFoundationClass=or,this.value="",this.type="text",this.placeholder="",this.label="",this.icon="",this.iconTrailing="",this.disabled=!1,this.required=!1,this.minLength=-1,this.maxLength=-1,this.outlined=!1,this.helper="",this.validateOnInitialRender=!1,this.validationMessage="",this.autoValidate=!1,this.pattern="",this.min="",this.max="",this.step=null,this.size=null,this.helperPersistent=!1,this.charCounter=!1,this.endAligned=!1,this.prefix="",this.suffix="",this.name="",this.readOnly=!1,this.autocapitalize="",this.outlineOpen=!1,this.outlineWidth=0,this.isUiValid=!0,this.focused=!1,this._validity=sr(),this.validityTransform=null}get validity(){return this._checkValidity(this.value),this._validity}get willValidate(){return this.formElement.willValidate}get selectionStart(){return this.formElement.selectionStart}get selectionEnd(){return this.formElement.selectionEnd}focus(){const t=new CustomEvent("focus");this.formElement.dispatchEvent(t),this.formElement.focus()}blur(){const t=new CustomEvent("blur");this.formElement.dispatchEvent(t),this.formElement.blur()}select(){this.formElement.select()}setSelectionRange(t,e,i){this.formElement.setSelectionRange(t,e,i)}update(t){t.has("autoValidate")&&this.mdcFoundation&&this.mdcFoundation.setValidateOnValueChange(this.autoValidate),t.has("value")&&"string"!=typeof this.value&&(this.value=`${this.value}`),super.update(t)}setFormData(t){this.name&&t.append(this.name,this.value)}render(){const t=this.charCounter&&-1!==this.maxLength,e=!!this.helper||!!this.validationMessage||t,i={"mdc-text-field--disabled":this.disabled,"mdc-text-field--no-label":!this.label,"mdc-text-field--filled":!this.outlined,"mdc-text-field--outlined":this.outlined,"mdc-text-field--with-leading-icon":this.icon,"mdc-text-field--with-trailing-icon":this.iconTrailing,"mdc-text-field--end-aligned":this.endAligned};return Q` - - ${this.renderHelperText(e,t)} - `}updated(t){t.has("value")&&void 0!==t.get("value")&&(this.mdcFoundation.setValue(this.value),this.autoValidate&&this.reportValidity())}renderRipple(){return this.outlined?"":Q` - - `}renderOutline(){return this.outlined?Q` - - ${this.renderLabel()} - `:""}renderLabel(){return this.label?Q` - ${this.label} - `:""}renderLeadingIcon(){return this.icon?this.renderIcon(this.icon):""}renderTrailingIcon(){return this.iconTrailing?this.renderIcon(this.iconTrailing,!0):""}renderIcon(t,e=!1){return Q`${t}`}renderPrefix(){return this.prefix?this.renderAffix(this.prefix):""}renderSuffix(){return this.suffix?this.renderAffix(this.suffix,!0):""}renderAffix(t,e=!1){return Q` - ${t}`}renderInput(t){const e=-1===this.minLength?void 0:this.minLength,i=-1===this.maxLength?void 0:this.maxLength,r=this.autocapitalize?this.autocapitalize:void 0,n=this.validationMessage&&!this.isUiValid,o=this.label?"label":void 0,a=t?"helper-text":void 0,d=this.focused||this.helperPersistent||n?"helper-text":void 0;return Q` - `}renderLineRipple(){return this.outlined?"":Q` - - `}renderHelperText(t,e){const i=this.validationMessage&&!this.isUiValid,r={"mdc-text-field-helper-text--persistent":this.helperPersistent,"mdc-text-field-helper-text--validation-msg":i},n=this.focused||this.helperPersistent||i?void 0:"true",o=i?this.validationMessage:this.helper;return t?Q` -
-
${o}
- ${this.renderCharCounter(e)} -
`:""}renderCharCounter(t){const e=Math.min(this.value.length,this.maxLength);return t?Q` - ${e} / ${this.maxLength}`:""}onInputFocus(){this.focused=!0}onInputBlur(){this.focused=!1,this.reportValidity()}checkValidity(){const t=this._checkValidity(this.value);if(!t){const t=new Event("invalid",{bubbles:!1,cancelable:!0});this.dispatchEvent(t)}return t}reportValidity(){const t=this.checkValidity();return this.mdcFoundation.setValid(t),this.isUiValid=t,t}_checkValidity(t){const e=this.formElement.validity;let i=sr(e);if(this.validityTransform){const e=this.validityTransform(t,i);i=Object.assign(Object.assign({},i),e),this.mdcFoundation.setUseNativeValidation(!1)}else this.mdcFoundation.setUseNativeValidation(!0);return this._validity=i,this._validity.valid}setCustomValidity(t){this.validationMessage=t,this.formElement.setCustomValidity(t)}handleInputChange(){this.value=this.formElement.value}createAdapter(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getRootAdapterMethods()),this.getInputAdapterMethods()),this.getLabelAdapterMethods()),this.getLineRippleAdapterMethods()),this.getOutlineAdapterMethods())}getRootAdapterMethods(){return Object.assign({registerTextFieldInteractionHandler:(t,e)=>this.addEventListener(t,e),deregisterTextFieldInteractionHandler:(t,e)=>this.removeEventListener(t,e),registerValidationAttributeChangeHandler:t=>{const e=new MutationObserver((e=>{t((t=>t.map((t=>t.attributeName)).filter((t=>t)))(e))}));return e.observe(this.formElement,{attributes:!0}),e},deregisterValidationAttributeChangeHandler:t=>t.disconnect()},It(this.mdcRoot))}getInputAdapterMethods(){return{getNativeInput:()=>this.formElement,setInputAttr:()=>{},removeInputAttr:()=>{},isFocused:()=>!!this.shadowRoot&&this.shadowRoot.activeElement===this.formElement,registerInputInteractionHandler:(t,e)=>this.formElement.addEventListener(t,e,{passive:t in dr}),deregisterInputInteractionHandler:(t,e)=>this.formElement.removeEventListener(t,e)}}getLabelAdapterMethods(){return{floatLabel:t=>this.labelElement&&this.labelElement.floatingLabelFoundation.float(t),getLabelWidth:()=>this.labelElement?this.labelElement.floatingLabelFoundation.getWidth():0,hasLabel:()=>Boolean(this.labelElement),shakeLabel:t=>this.labelElement&&this.labelElement.floatingLabelFoundation.shake(t),setLabelRequired:t=>{this.labelElement&&this.labelElement.floatingLabelFoundation.setRequired(t)}}}getLineRippleAdapterMethods(){return{activateLineRipple:()=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.activate()},deactivateLineRipple:()=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.deactivate()},setLineRippleTransformOrigin:t=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.setRippleCenter(t)}}}async getUpdateComplete(){var t;const e=await super.getUpdateComplete();return await(null===(t=this.outlineElement)||void 0===t?void 0:t.updateComplete),e}firstUpdated(){var t;super.firstUpdated(),this.mdcFoundation.setValidateOnValueChange(this.autoValidate),this.validateOnInitialRender&&this.reportValidity(),null===(t=this.outlineElement)||void 0===t||t.updateComplete.then((()=>{var t;this.outlineWidth=(null===(t=this.labelElement)||void 0===t?void 0:t.floatingLabelFoundation.getWidth())||0}))}getOutlineAdapterMethods(){return{closeOutline:()=>this.outlineElement&&(this.outlineOpen=!1),hasOutline:()=>Boolean(this.outlineElement),notchOutline:t=>{this.outlineElement&&!this.outlineOpen&&(this.outlineWidth=t,this.outlineOpen=!0)}}}async layout(){await this.updateComplete;const t=this.labelElement;if(!t)return void(this.outlineOpen=!1);const e=!!this.label&&!!this.value;if(t.floatingLabelFoundation.float(e),!this.outlined)return;this.outlineOpen=e,await this.updateComplete;const i=t.floatingLabelFoundation.getWidth();this.outlineOpen&&(this.outlineWidth=i,await this.updateComplete)}}r([m(".mdc-text-field")],lr.prototype,"mdcRoot",void 0),r([m("input")],lr.prototype,"formElement",void 0),r([m(".mdc-floating-label")],lr.prototype,"labelElement",void 0),r([m(".mdc-line-ripple")],lr.prototype,"lineRippleElement",void 0),r([m("mwc-notched-outline")],lr.prototype,"outlineElement",void 0),r([m(".mdc-notched-outline__notch")],lr.prototype,"notchElement",void 0),r([l({type:String})],lr.prototype,"value",void 0),r([l({type:String})],lr.prototype,"type",void 0),r([l({type:String})],lr.prototype,"placeholder",void 0),r([l({type:String}),ce((function(t,e){void 0!==e&&this.label!==e&&this.layout()}))],lr.prototype,"label",void 0),r([l({type:String})],lr.prototype,"icon",void 0),r([l({type:String})],lr.prototype,"iconTrailing",void 0),r([l({type:Boolean,reflect:!0})],lr.prototype,"disabled",void 0),r([l({type:Boolean})],lr.prototype,"required",void 0),r([l({type:Number})],lr.prototype,"minLength",void 0),r([l({type:Number})],lr.prototype,"maxLength",void 0),r([l({type:Boolean,reflect:!0}),ce((function(t,e){void 0!==e&&this.outlined!==e&&this.layout()}))],lr.prototype,"outlined",void 0),r([l({type:String})],lr.prototype,"helper",void 0),r([l({type:Boolean})],lr.prototype,"validateOnInitialRender",void 0),r([l({type:String})],lr.prototype,"validationMessage",void 0),r([l({type:Boolean})],lr.prototype,"autoValidate",void 0),r([l({type:String})],lr.prototype,"pattern",void 0),r([l({type:String})],lr.prototype,"min",void 0),r([l({type:String})],lr.prototype,"max",void 0),r([l({type:String})],lr.prototype,"step",void 0),r([l({type:Number})],lr.prototype,"size",void 0),r([l({type:Boolean})],lr.prototype,"helperPersistent",void 0),r([l({type:Boolean})],lr.prototype,"charCounter",void 0),r([l({type:Boolean})],lr.prototype,"endAligned",void 0),r([l({type:String})],lr.prototype,"prefix",void 0),r([l({type:String})],lr.prototype,"suffix",void 0),r([l({type:String})],lr.prototype,"name",void 0),r([l({type:String})],lr.prototype,"inputMode",void 0),r([l({type:Boolean})],lr.prototype,"readOnly",void 0),r([l({type:String})],lr.prototype,"autocapitalize",void 0),r([c()],lr.prototype,"outlineOpen",void 0),r([c()],lr.prototype,"outlineWidth",void 0),r([c()],lr.prototype,"isUiValid",void 0),r([c()],lr.prototype,"focused",void 0),r([h({passive:!0})],lr.prototype,"handleInputChange",null);const cr=T`.mdc-top-app-bar{background-color:#6200ee;background-color:var(--mdc-theme-primary, #6200ee);color:white;display:flex;position:fixed;flex-direction:column;justify-content:space-between;box-sizing:border-box;width:100%;z-index:4}.mdc-top-app-bar .mdc-top-app-bar__action-item,.mdc-top-app-bar .mdc-top-app-bar__navigation-icon{color:#fff;color:var(--mdc-theme-on-primary, #fff)}.mdc-top-app-bar .mdc-top-app-bar__action-item::before,.mdc-top-app-bar .mdc-top-app-bar__action-item::after,.mdc-top-app-bar .mdc-top-app-bar__navigation-icon::before,.mdc-top-app-bar .mdc-top-app-bar__navigation-icon::after{background-color:#fff;background-color:var(--mdc-ripple-color, var(--mdc-theme-on-primary, #fff))}.mdc-top-app-bar .mdc-top-app-bar__action-item:hover::before,.mdc-top-app-bar .mdc-top-app-bar__action-item.mdc-ripple-surface--hover::before,.mdc-top-app-bar .mdc-top-app-bar__navigation-icon:hover::before,.mdc-top-app-bar .mdc-top-app-bar__navigation-icon.mdc-ripple-surface--hover::before{opacity:0.08;opacity:var(--mdc-ripple-hover-opacity, 0.08)}.mdc-top-app-bar .mdc-top-app-bar__action-item.mdc-ripple-upgraded--background-focused::before,.mdc-top-app-bar .mdc-top-app-bar__action-item:not(.mdc-ripple-upgraded):focus::before,.mdc-top-app-bar .mdc-top-app-bar__navigation-icon.mdc-ripple-upgraded--background-focused::before,.mdc-top-app-bar .mdc-top-app-bar__navigation-icon:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-top-app-bar .mdc-top-app-bar__action-item:not(.mdc-ripple-upgraded)::after,.mdc-top-app-bar .mdc-top-app-bar__navigation-icon:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-top-app-bar .mdc-top-app-bar__action-item:not(.mdc-ripple-upgraded):active::after,.mdc-top-app-bar .mdc-top-app-bar__navigation-icon:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-top-app-bar .mdc-top-app-bar__action-item.mdc-ripple-upgraded,.mdc-top-app-bar .mdc-top-app-bar__navigation-icon.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-top-app-bar__row{display:flex;position:relative;box-sizing:border-box;width:100%;height:64px}.mdc-top-app-bar__section{display:inline-flex;flex:1 1 auto;align-items:center;min-width:0;padding:8px 12px;z-index:1}.mdc-top-app-bar__section--align-start{justify-content:flex-start;order:-1}.mdc-top-app-bar__section--align-end{justify-content:flex-end;order:1}.mdc-top-app-bar__title{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-headline6-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1.25rem;font-size:var(--mdc-typography-headline6-font-size, 1.25rem);line-height:2rem;line-height:var(--mdc-typography-headline6-line-height, 2rem);font-weight:500;font-weight:var(--mdc-typography-headline6-font-weight, 500);letter-spacing:0.0125em;letter-spacing:var(--mdc-typography-headline6-letter-spacing, 0.0125em);text-decoration:inherit;text-decoration:var(--mdc-typography-headline6-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-headline6-text-transform, inherit);padding-left:20px;padding-right:0;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;z-index:1}[dir=rtl] .mdc-top-app-bar__title,.mdc-top-app-bar__title[dir=rtl]{padding-left:0;padding-right:20px}.mdc-top-app-bar--short-collapsed{border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:24px;border-bottom-left-radius:0}[dir=rtl] .mdc-top-app-bar--short-collapsed,.mdc-top-app-bar--short-collapsed[dir=rtl]{border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:24px}.mdc-top-app-bar--short{top:0;right:auto;left:0;width:100%;transition:width 250ms cubic-bezier(0.4, 0, 0.2, 1)}[dir=rtl] .mdc-top-app-bar--short,.mdc-top-app-bar--short[dir=rtl]{right:0;left:auto}.mdc-top-app-bar--short .mdc-top-app-bar__row{height:56px}.mdc-top-app-bar--short .mdc-top-app-bar__section{padding:4px}.mdc-top-app-bar--short .mdc-top-app-bar__title{transition:opacity 200ms cubic-bezier(0.4, 0, 0.2, 1);opacity:1}.mdc-top-app-bar--short-collapsed{box-shadow:0px 2px 4px -1px rgba(0, 0, 0, 0.2),0px 4px 5px 0px rgba(0, 0, 0, 0.14),0px 1px 10px 0px rgba(0,0,0,.12);width:56px;transition:width 300ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-top-app-bar--short-collapsed .mdc-top-app-bar__title{display:none}.mdc-top-app-bar--short-collapsed .mdc-top-app-bar__action-item{transition:padding 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-top-app-bar--short-collapsed.mdc-top-app-bar--short-has-action-item{width:112px}.mdc-top-app-bar--short-collapsed.mdc-top-app-bar--short-has-action-item .mdc-top-app-bar__section--align-end{padding-left:0;padding-right:12px}[dir=rtl] .mdc-top-app-bar--short-collapsed.mdc-top-app-bar--short-has-action-item .mdc-top-app-bar__section--align-end,.mdc-top-app-bar--short-collapsed.mdc-top-app-bar--short-has-action-item .mdc-top-app-bar__section--align-end[dir=rtl]{padding-left:12px;padding-right:0}.mdc-top-app-bar--dense .mdc-top-app-bar__row{height:48px}.mdc-top-app-bar--dense .mdc-top-app-bar__section{padding:0 4px}.mdc-top-app-bar--dense .mdc-top-app-bar__title{padding-left:12px;padding-right:0}[dir=rtl] .mdc-top-app-bar--dense .mdc-top-app-bar__title,.mdc-top-app-bar--dense .mdc-top-app-bar__title[dir=rtl]{padding-left:0;padding-right:12px}.mdc-top-app-bar--prominent .mdc-top-app-bar__row{height:128px}.mdc-top-app-bar--prominent .mdc-top-app-bar__title{align-self:flex-end;padding-bottom:2px}.mdc-top-app-bar--prominent .mdc-top-app-bar__action-item,.mdc-top-app-bar--prominent .mdc-top-app-bar__navigation-icon{align-self:flex-start}.mdc-top-app-bar--fixed{transition:box-shadow 200ms linear}.mdc-top-app-bar--fixed-scrolled{box-shadow:0px 2px 4px -1px rgba(0, 0, 0, 0.2),0px 4px 5px 0px rgba(0, 0, 0, 0.14),0px 1px 10px 0px rgba(0,0,0,.12);transition:box-shadow 200ms linear}.mdc-top-app-bar--dense.mdc-top-app-bar--prominent .mdc-top-app-bar__row{height:96px}.mdc-top-app-bar--dense.mdc-top-app-bar--prominent .mdc-top-app-bar__section{padding:0 12px}.mdc-top-app-bar--dense.mdc-top-app-bar--prominent .mdc-top-app-bar__title{padding-left:20px;padding-right:0;padding-bottom:9px}[dir=rtl] .mdc-top-app-bar--dense.mdc-top-app-bar--prominent .mdc-top-app-bar__title,.mdc-top-app-bar--dense.mdc-top-app-bar--prominent .mdc-top-app-bar__title[dir=rtl]{padding-left:0;padding-right:20px}.mdc-top-app-bar--fixed-adjust{padding-top:64px}.mdc-top-app-bar--dense-fixed-adjust{padding-top:48px}.mdc-top-app-bar--short-fixed-adjust{padding-top:56px}.mdc-top-app-bar--prominent-fixed-adjust{padding-top:128px}.mdc-top-app-bar--dense-prominent-fixed-adjust{padding-top:96px}@media(max-width: 599px){.mdc-top-app-bar__row{height:56px}.mdc-top-app-bar__section{padding:4px}.mdc-top-app-bar--short{transition:width 200ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-top-app-bar--short-collapsed{transition:width 250ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-top-app-bar--short-collapsed .mdc-top-app-bar__section--align-end{padding-left:0;padding-right:12px}[dir=rtl] .mdc-top-app-bar--short-collapsed .mdc-top-app-bar__section--align-end,.mdc-top-app-bar--short-collapsed .mdc-top-app-bar__section--align-end[dir=rtl]{padding-left:12px;padding-right:0}.mdc-top-app-bar--prominent .mdc-top-app-bar__title{padding-bottom:6px}.mdc-top-app-bar--fixed-adjust{padding-top:56px}}:host{display:block}.mdc-top-app-bar{color:#fff;color:var(--mdc-theme-on-primary, #fff);width:100%;width:var(--mdc-top-app-bar-width, 100%)}.mdc-top-app-bar--prominent #navigation ::slotted(*),.mdc-top-app-bar--prominent #actions ::slotted(*){align-self:flex-start}#navigation ::slotted(*),#actions ::slotted(*){--mdc-icon-button-ripple-opacity: 0.24}.mdc-top-app-bar--short-collapsed #actions ::slotted(*){transition:padding 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-top-app-bar__section--align-center{justify-content:center}.mdc-top-app-bar__section--align-center .mdc-top-app-bar__title{padding-left:0;padding-right:0}.center-title .mdc-top-app-bar__section--align-start,.center-title .mdc-top-app-bar__section--align-end{flex-basis:0}.mdc-top-app-bar--dense.mdc-top-app-bar--prominent .mdc-top-app-bar__section--align-center .mdc-top-app-bar__title{padding-left:0;padding-right:0}.mdc-top-app-bar--fixed-scrolled{box-shadow:var(--mdc-top-app-bar-fixed-box-shadow, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12))}`;var pr={FIXED_CLASS:"mdc-top-app-bar--fixed",FIXED_SCROLLED_CLASS:"mdc-top-app-bar--fixed-scrolled",SHORT_CLASS:"mdc-top-app-bar--short",SHORT_COLLAPSED_CLASS:"mdc-top-app-bar--short-collapsed",SHORT_HAS_ACTION_ITEM_CLASS:"mdc-top-app-bar--short-has-action-item"},hr={DEBOUNCE_THROTTLE_RESIZE_TIME_MS:100,MAX_TOP_APP_BAR_HEIGHT:128},mr={ACTION_ITEM_SELECTOR:".mdc-top-app-bar__action-item",NAVIGATION_EVENT:"MDCTopAppBar:nav",NAVIGATION_ICON_SELECTOR:".mdc-top-app-bar__navigation-icon",ROOT_SELECTOR:".mdc-top-app-bar",TITLE_SELECTOR:".mdc-top-app-bar__title"},ur=function(t){function r(e){return t.call(this,i(i({},r.defaultAdapter),e))||this}return e(r,t),Object.defineProperty(r,"strings",{get:function(){return mr},enumerable:!1,configurable:!0}),Object.defineProperty(r,"cssClasses",{get:function(){return pr},enumerable:!1,configurable:!0}),Object.defineProperty(r,"numbers",{get:function(){return hr},enumerable:!1,configurable:!0}),Object.defineProperty(r,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},setStyle:function(){},getTopAppBarHeight:function(){return 0},notifyNavigationIconClicked:function(){},getViewportScrollY:function(){return 0},getTotalActionItems:function(){return 0}}},enumerable:!1,configurable:!0}),r.prototype.handleTargetScroll=function(){},r.prototype.handleWindowResize=function(){},r.prototype.handleNavigationClick=function(){this.adapter.notifyNavigationIconClicked()},r}(kt),fr=function(t){function i(e){var i=t.call(this,e)||this;return i.wasDocked=!0,i.isDockedShowing=!0,i.currentAppBarOffsetTop=0,i.isCurrentlyBeingResized=!1,i.resizeThrottleId=0,i.resizeDebounceId=0,i.lastScrollPosition=i.adapter.getViewportScrollY(),i.topAppBarHeight=i.adapter.getTopAppBarHeight(),i}return e(i,t),i.prototype.destroy=function(){t.prototype.destroy.call(this),this.adapter.setStyle("top","")},i.prototype.handleTargetScroll=function(){var t=Math.max(this.adapter.getViewportScrollY(),0),e=t-this.lastScrollPosition;this.lastScrollPosition=t,this.isCurrentlyBeingResized||(this.currentAppBarOffsetTop-=e,this.currentAppBarOffsetTop>0?this.currentAppBarOffsetTop=0:Math.abs(this.currentAppBarOffsetTop)>this.topAppBarHeight&&(this.currentAppBarOffsetTop=-this.topAppBarHeight),this.moveTopAppBar())},i.prototype.handleWindowResize=function(){var t=this;this.resizeThrottleId||(this.resizeThrottleId=setTimeout((function(){t.resizeThrottleId=0,t.throttledResizeHandler()}),hr.DEBOUNCE_THROTTLE_RESIZE_TIME_MS)),this.isCurrentlyBeingResized=!0,this.resizeDebounceId&&clearTimeout(this.resizeDebounceId),this.resizeDebounceId=setTimeout((function(){t.handleTargetScroll(),t.isCurrentlyBeingResized=!1,t.resizeDebounceId=0}),hr.DEBOUNCE_THROTTLE_RESIZE_TIME_MS)},i.prototype.checkForUpdate=function(){var t=-this.topAppBarHeight,e=this.currentAppBarOffsetTop<0,i=this.currentAppBarOffsetTop>t,r=e&&i;if(r)this.wasDocked=!1;else{if(!this.wasDocked)return this.wasDocked=!0,!0;if(this.isDockedShowing!==i)return this.isDockedShowing=i,!0}return r},i.prototype.moveTopAppBar=function(){if(this.checkForUpdate()){var t=this.currentAppBarOffsetTop;Math.abs(t)>=this.topAppBarHeight&&(t=-hr.MAX_TOP_APP_BAR_HEIGHT),this.adapter.setStyle("top",t+"px")}},i.prototype.throttledResizeHandler=function(){var t=this.adapter.getTopAppBarHeight();this.topAppBarHeight!==t&&(this.wasDocked=!1,this.currentAppBarOffsetTop-=this.topAppBarHeight-t,this.topAppBarHeight=t),this.handleTargetScroll()},i}(ur),gr=fr;const br=Ot?{passive:!0}:void 0;class xr extends Lt{constructor(){super(...arguments),this.centerTitle=!1,this.handleTargetScroll=()=>{this.mdcFoundation.handleTargetScroll()},this.handleNavigationClick=()=>{this.mdcFoundation.handleNavigationClick()}}get scrollTarget(){return this._scrollTarget||window}set scrollTarget(t){this.unregisterScrollListener();const e=this.scrollTarget;this._scrollTarget=t,this.updateRootPosition(),this.requestUpdate("scrollTarget",e),this.registerScrollListener()}updateRootPosition(){if(this.mdcRoot){const t=this.scrollTarget===window;this.mdcRoot.style.position=t?"":"absolute"}}render(){let t=Q``;return this.centerTitle&&(t=Q`
${t}
`),Q` -
-
- - ${this.centerTitle?t:null} - -
-
-
- -
- `}createAdapter(){return Object.assign(Object.assign({},It(this.mdcRoot)),{setStyle:(t,e)=>this.mdcRoot.style.setProperty(t,e),getTopAppBarHeight:()=>this.mdcRoot.clientHeight,notifyNavigationIconClicked:()=>{this.dispatchEvent(new Event(mr.NAVIGATION_EVENT,{bubbles:!0,cancelable:!0}))},getViewportScrollY:()=>this.scrollTarget instanceof Window?this.scrollTarget.pageYOffset:this.scrollTarget.scrollTop,getTotalActionItems:()=>this._actionItemsSlot.assignedNodes({flatten:!0}).length})}registerListeners(){this.registerScrollListener()}unregisterListeners(){this.unregisterScrollListener()}registerScrollListener(){this.scrollTarget.addEventListener("scroll",this.handleTargetScroll,br)}unregisterScrollListener(){this.scrollTarget.removeEventListener("scroll",this.handleTargetScroll)}firstUpdated(){super.firstUpdated(),this.updateRootPosition(),this.registerListeners()}disconnectedCallback(){super.disconnectedCallback(),this.unregisterListeners()}}r([m(".mdc-top-app-bar")],xr.prototype,"mdcRoot",void 0),r([m('slot[name="actionItems"]')],xr.prototype,"_actionItemsSlot",void 0),r([l({type:Boolean})],xr.prototype,"centerTitle",void 0),r([l({type:Object})],xr.prototype,"scrollTarget",null);class vr extends xr{constructor(){super(...arguments),this.mdcFoundationClass=gr,this.prominent=!1,this.dense=!1,this.handleResize=()=>{this.mdcFoundation.handleWindowResize()}}barClasses(){return{"mdc-top-app-bar--dense":this.dense,"mdc-top-app-bar--prominent":this.prominent,"center-title":this.centerTitle}}contentClasses(){return{"mdc-top-app-bar--fixed-adjust":!this.dense&&!this.prominent,"mdc-top-app-bar--dense-fixed-adjust":this.dense&&!this.prominent,"mdc-top-app-bar--prominent-fixed-adjust":!this.dense&&this.prominent,"mdc-top-app-bar--dense-prominent-fixed-adjust":this.dense&&this.prominent}}registerListeners(){super.registerListeners(),window.addEventListener("resize",this.handleResize,br)}unregisterListeners(){super.unregisterListeners(),window.removeEventListener("resize",this.handleResize)}}r([l({type:Boolean,reflect:!0})],vr.prototype,"prominent",void 0),r([l({type:Boolean,reflect:!0})],vr.prototype,"dense",void 0);export{He as $,le as A,Lt as B,re as C,Wt as D,Ye as E,ie as F,je as G,At as H,Nt as I,Rt as J,Xe as K,We as L,kt as M,be as N,ge as O,qe as P,ti as Q,Zt as R,Qe as S,Je as T,ai as U,ni as V,di as W,si as X,li as Y,oi as Z,r as _,Kt as a,Ue as a0,$e as a1,xe as a2,tt as a3,vi as a4,Ei as a5,Ai as a6,Ti as a7,Gt as a8,Di as a9,Ut as aa,ki as ab,Vt as ac,ft as ad,n as ae,a as af,o as ag,qi as ah,Yi as ai,lr as aj,ar as ak,Ki as al,pr as am,fr as an,vr as ao,br as ap,cr as aq,yt as ar,u as b,h as c,T as d,l as e,d as f,e as g,i as h,m as i,de as j,ae as k,Qt as l,ce as m,se as n,jt as o,It as p,Tt as q,Et as r,xt as s,c as t,me as u,ue as v,he as w,b as x,Q as y,fe as z}; diff --git a/material-yew/build/mwc-button.js b/material-yew/build/mwc-button.js deleted file mode 100644 index 940c540..0000000 --- a/material-yew/build/mwc-button.js +++ /dev/null @@ -1,35 +0,0 @@ -import{_ as t,a as o,e,i,b as n,t as d,c as r,s as a,R as p,y as l,o as c,l as s,d as b,f as u}from"./core.js";class x extends a{constructor(){super(...arguments),this.raised=!1,this.unelevated=!1,this.outlined=!1,this.dense=!1,this.disabled=!1,this.trailingIcon=!1,this.fullwidth=!1,this.icon="",this.label="",this.expandContent=!1,this.shouldRenderRipple=!1,this.rippleHandlers=new p((()=>(this.shouldRenderRipple=!0,this.ripple)))}renderOverlay(){return l``}renderRipple(){const t=this.raised||this.unelevated;return this.shouldRenderRipple?l``:""}focus(){const t=this.buttonElement;t&&(this.rippleHandlers.startFocus(),t.focus())}blur(){const t=this.buttonElement;t&&(this.rippleHandlers.endFocus(),t.blur())}getRenderClasses(){return{"mdc-button--raised":this.raised,"mdc-button--unelevated":this.unelevated,"mdc-button--outlined":this.outlined,"mdc-button--dense":this.dense}}render(){return l` - `}renderIcon(){return l` - - ${this.icon} - `}handleRippleActivate(t){const o=()=>{window.removeEventListener("mouseup",o),this.handleRippleDeactivate()};window.addEventListener("mouseup",o),this.rippleHandlers.startPress(t)}handleRippleDeactivate(){this.rippleHandlers.endPress()}handleRippleMouseEnter(){this.rippleHandlers.startHover()}handleRippleMouseLeave(){this.rippleHandlers.endHover()}handleRippleFocus(){this.rippleHandlers.startFocus()}handleRippleBlur(){this.rippleHandlers.endFocus()}}x.shadowRootOptions={mode:"open",delegatesFocus:!0},t([o,e({type:String,attribute:"aria-haspopup"})],x.prototype,"ariaHasPopup",void 0),t([e({type:Boolean,reflect:!0})],x.prototype,"raised",void 0),t([e({type:Boolean,reflect:!0})],x.prototype,"unelevated",void 0),t([e({type:Boolean,reflect:!0})],x.prototype,"outlined",void 0),t([e({type:Boolean})],x.prototype,"dense",void 0),t([e({type:Boolean,reflect:!0})],x.prototype,"disabled",void 0),t([e({type:Boolean,attribute:"trailingicon"})],x.prototype,"trailingIcon",void 0),t([e({type:Boolean,reflect:!0})],x.prototype,"fullwidth",void 0),t([e({type:String})],x.prototype,"icon",void 0),t([e({type:String})],x.prototype,"label",void 0),t([e({type:Boolean})],x.prototype,"expandContent",void 0),t([i("#button")],x.prototype,"buttonElement",void 0),t([n("mwc-ripple")],x.prototype,"ripple",void 0),t([d()],x.prototype,"shouldRenderRipple",void 0),t([r({passive:!0})],x.prototype,"handleRippleActivate",null);const m=b`.mdc-button{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-button-font-size, 0.875rem);line-height:2.25rem;line-height:var(--mdc-typography-button-line-height, 2.25rem);font-weight:500;font-weight:var(--mdc-typography-button-font-weight, 500);letter-spacing:0.0892857143em;letter-spacing:var(--mdc-typography-button-letter-spacing, 0.0892857143em);text-decoration:none;text-decoration:var(--mdc-typography-button-text-decoration, none);text-transform:uppercase;text-transform:var(--mdc-typography-button-text-transform, uppercase)}.mdc-touch-target-wrapper{display:inline}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:0;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1);background-color:#fff;background-color:var(--mdc-elevation-overlay-color, #fff)}.mdc-button{position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:64px;border:none;outline:none;line-height:inherit;user-select:none;-webkit-appearance:none;overflow:visible;vertical-align:middle;background:transparent}.mdc-button .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-button::-moz-focus-inner{padding:0;border:0}.mdc-button:active{outline:none}.mdc-button:hover{cursor:pointer}.mdc-button:disabled{cursor:default;pointer-events:none}.mdc-button .mdc-button__icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top}[dir=rtl] .mdc-button .mdc-button__icon,.mdc-button .mdc-button__icon[dir=rtl]{margin-left:8px;margin-right:0}.mdc-button .mdc-button__label{position:relative}.mdc-button .mdc-button__focus-ring{display:none}@media screen and (forced-colors: active){.mdc-button.mdc-ripple-upgraded--background-focused .mdc-button__focus-ring,.mdc-button:not(.mdc-ripple-upgraded):focus .mdc-button__focus-ring{pointer-events:none;border:2px solid transparent;border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc( 100% + 4px );width:calc( 100% + 4px );display:block}}@media screen and (forced-colors: active)and (forced-colors: active){.mdc-button.mdc-ripple-upgraded--background-focused .mdc-button__focus-ring,.mdc-button:not(.mdc-ripple-upgraded):focus .mdc-button__focus-ring{border-color:CanvasText}}@media screen and (forced-colors: active){.mdc-button.mdc-ripple-upgraded--background-focused .mdc-button__focus-ring::after,.mdc-button:not(.mdc-ripple-upgraded):focus .mdc-button__focus-ring::after{content:"";border:2px solid transparent;border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}}@media screen and (forced-colors: active)and (forced-colors: active){.mdc-button.mdc-ripple-upgraded--background-focused .mdc-button__focus-ring::after,.mdc-button:not(.mdc-ripple-upgraded):focus .mdc-button__focus-ring::after{border-color:CanvasText}}.mdc-button .mdc-button__touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}.mdc-button__label+.mdc-button__icon{margin-left:8px;margin-right:0}[dir=rtl] .mdc-button__label+.mdc-button__icon,.mdc-button__label+.mdc-button__icon[dir=rtl]{margin-left:0;margin-right:8px}svg.mdc-button__icon{fill:currentColor}.mdc-button--touch{margin-top:6px;margin-bottom:6px}.mdc-button{padding:0 8px 0 8px}.mdc-button--unelevated{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--unelevated.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--unelevated.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--raised{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--raised.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--raised.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--outlined{border-style:solid;transition:border 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-button--outlined .mdc-button__ripple{border-style:solid;border-color:transparent}.mdc-button{height:36px;border-radius:4px;border-radius:var(--mdc-shape-small, 4px)}.mdc-button:not(:disabled){color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}.mdc-button:disabled{color:rgba(0, 0, 0, 0.38)}.mdc-button .mdc-button__icon{font-size:1.125rem;width:1.125rem;height:1.125rem}.mdc-button .mdc-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-small, 4px)}.mdc-button--raised,.mdc-button--unelevated{height:36px;border-radius:4px;border-radius:var(--mdc-shape-small, 4px)}.mdc-button--raised:not(:disabled),.mdc-button--unelevated:not(:disabled){background-color:#6200ee;background-color:var(--mdc-theme-primary, #6200ee)}.mdc-button--raised:disabled,.mdc-button--unelevated:disabled{background-color:rgba(0, 0, 0, 0.12)}.mdc-button--raised:not(:disabled),.mdc-button--unelevated:not(:disabled){color:#fff;color:var(--mdc-theme-on-primary, #fff)}.mdc-button--raised:disabled,.mdc-button--unelevated:disabled{color:rgba(0, 0, 0, 0.38)}.mdc-button--raised .mdc-button__icon,.mdc-button--unelevated .mdc-button__icon{font-size:1.125rem;width:1.125rem;height:1.125rem}.mdc-button--raised .mdc-button__ripple,.mdc-button--unelevated .mdc-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-small, 4px)}.mdc-button--outlined{height:36px;border-radius:4px;border-radius:var(--mdc-shape-small, 4px);padding:0 15px 0 15px;border-width:1px}.mdc-button--outlined:not(:disabled){color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}.mdc-button--outlined:disabled{color:rgba(0, 0, 0, 0.38)}.mdc-button--outlined .mdc-button__icon{font-size:1.125rem;width:1.125rem;height:1.125rem}.mdc-button--outlined .mdc-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-small, 4px)}.mdc-button--outlined:not(:disabled){border-color:rgba(0, 0, 0, 0.12)}.mdc-button--outlined:disabled{border-color:rgba(0, 0, 0, 0.12)}.mdc-button--outlined.mdc-button--icon-trailing{padding:0 11px 0 15px}.mdc-button--outlined.mdc-button--icon-leading{padding:0 15px 0 11px}.mdc-button--outlined .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px;border-width:1px}.mdc-button--outlined .mdc-button__touch{left:calc(-1 * 1px);width:calc(100% + 2 * 1px)}.mdc-button--raised{box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2),0px 2px 2px 0px rgba(0, 0, 0, 0.14),0px 1px 5px 0px rgba(0,0,0,.12);transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-button--raised:hover,.mdc-button--raised:focus{box-shadow:0px 2px 4px -1px rgba(0, 0, 0, 0.2),0px 4px 5px 0px rgba(0, 0, 0, 0.14),0px 1px 10px 0px rgba(0,0,0,.12)}.mdc-button--raised:active{box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2),0px 8px 10px 1px rgba(0, 0, 0, 0.14),0px 3px 14px 2px rgba(0,0,0,.12)}.mdc-button--raised:disabled{box-shadow:0px 0px 0px 0px rgba(0, 0, 0, 0.2),0px 0px 0px 0px rgba(0, 0, 0, 0.14),0px 0px 0px 0px rgba(0,0,0,.12)}:host{display:inline-flex;outline:none;-webkit-tap-highlight-color:transparent;vertical-align:top}:host([fullwidth]){width:100%}:host([raised]),:host([unelevated]){--mdc-ripple-color:#fff;--mdc-ripple-focus-opacity:0.24;--mdc-ripple-hover-opacity:0.08;--mdc-ripple-press-opacity:0.24}.trailing-icon ::slotted(*),.trailing-icon .mdc-button__icon,.leading-icon ::slotted(*),.leading-icon .mdc-button__icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem}[dir=rtl] .trailing-icon ::slotted(*),[dir=rtl] .trailing-icon .mdc-button__icon,[dir=rtl] .leading-icon ::slotted(*),[dir=rtl] .leading-icon .mdc-button__icon,.trailing-icon ::slotted(*[dir=rtl]),.trailing-icon .mdc-button__icon[dir=rtl],.leading-icon ::slotted(*[dir=rtl]),.leading-icon .mdc-button__icon[dir=rtl]{margin-left:8px;margin-right:0}.trailing-icon ::slotted(*),.trailing-icon .mdc-button__icon{margin-left:8px;margin-right:0}[dir=rtl] .trailing-icon ::slotted(*),[dir=rtl] .trailing-icon .mdc-button__icon,.trailing-icon ::slotted(*[dir=rtl]),.trailing-icon .mdc-button__icon[dir=rtl]{margin-left:0;margin-right:8px}.slot-container{display:inline-flex;align-items:center;justify-content:center}.slot-container.flex{flex:auto}.mdc-button{flex:auto;overflow:hidden;padding-left:8px;padding-left:var(--mdc-button-horizontal-padding, 8px);padding-right:8px;padding-right:var(--mdc-button-horizontal-padding, 8px)}.mdc-button--raised{box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);box-shadow:var(--mdc-button-raised-box-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12))}.mdc-button--raised:focus{box-shadow:0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12);box-shadow:var(--mdc-button-raised-box-shadow-focus, var(--mdc-button-raised-box-shadow-hover, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12)))}.mdc-button--raised:hover{box-shadow:0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12);box-shadow:var(--mdc-button-raised-box-shadow-hover, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12))}.mdc-button--raised:active{box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12);box-shadow:var(--mdc-button-raised-box-shadow-active, 0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12))}.mdc-button--raised:disabled{box-shadow:0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12);box-shadow:var(--mdc-button-raised-box-shadow-disabled, 0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12))}.mdc-button--raised,.mdc-button--unelevated{padding-left:16px;padding-left:var(--mdc-button-horizontal-padding, 16px);padding-right:16px;padding-right:var(--mdc-button-horizontal-padding, 16px)}.mdc-button--outlined{border-width:1px;border-width:var(--mdc-button-outline-width, 1px);padding-left:calc(16px - 1px);padding-left:calc(var(--mdc-button-horizontal-padding, 16px) - var(--mdc-button-outline-width, 1px));padding-right:calc(16px - 1px);padding-right:calc(var(--mdc-button-horizontal-padding, 16px) - var(--mdc-button-outline-width, 1px))}.mdc-button--outlined:not(:disabled){border-color:rgba(0, 0, 0, 0.12);border-color:var(--mdc-button-outline-color, rgba(0, 0, 0, 0.12))}.mdc-button--outlined .ripple{top:calc(-1 * 1px);top:calc(-1 * var(--mdc-button-outline-width, 1px));left:calc(-1 * 1px);left:calc(-1 * var(--mdc-button-outline-width, 1px));right:initial;right:initial;border-width:1px;border-width:var(--mdc-button-outline-width, 1px);border-style:solid;border-color:transparent}[dir=rtl] .mdc-button--outlined .ripple,.mdc-button--outlined .ripple[dir=rtl]{left:initial;left:initial;right:calc(-1 * 1px);right:calc(-1 * var(--mdc-button-outline-width, 1px))}.mdc-button--dense{height:28px;margin-top:0;margin-bottom:0}.mdc-button--dense .mdc-button__touch{height:100%}:host([disabled]){pointer-events:none}:host([disabled]) .mdc-button{color:rgba(0, 0, 0, 0.38);color:var(--mdc-button-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-button--raised,:host([disabled]) .mdc-button--unelevated{background-color:rgba(0, 0, 0, 0.12);background-color:var(--mdc-button-disabled-fill-color, rgba(0, 0, 0, 0.12))}:host([disabled]) .mdc-button--outlined{border-color:rgba(0, 0, 0, 0.12);border-color:var(--mdc-button-disabled-outline-color, rgba(0, 0, 0, 0.12))}`;let h=class extends x{};h.styles=[m],h=t([u("mwc-button")],h);export{h as Button}; diff --git a/material-yew/build/mwc-check-list-item.js b/material-yew/build/mwc-check-list-item.js deleted file mode 100644 index 9b8d7e6..0000000 --- a/material-yew/build/mwc-check-list-item.js +++ /dev/null @@ -1,15 +0,0 @@ -import{_ as e,i as t,e as s,O as c,y as i,o as h,N as r,P as o,f as a}from"./core.js";import"./mwc-checkbox.js";class d extends c{constructor(){super(...arguments),this.left=!1,this.graphic="control"}render(){const e={"mdc-deprecated-list-item__graphic":this.left,"mdc-deprecated-list-item__meta":!this.left},t=this.renderText(),s=this.graphic&&"control"!==this.graphic&&!this.left?this.renderGraphic():i``,c=this.hasMeta&&this.left?this.renderMeta():i``,r=this.renderRipple();return i` - ${r} - ${s} - ${this.left?"":t} - - - - - ${this.left?t:""} - ${c}`}async onChange(e){const t=e.target;this.selected===t.checked||(this._skipPropRequest=!0,this.selected=t.checked,await this.updateComplete,this._skipPropRequest=!1)}}e([t("slot")],d.prototype,"slotElement",void 0),e([t("mwc-checkbox")],d.prototype,"checkboxElement",void 0),e([s({type:Boolean})],d.prototype,"left",void 0),e([s({type:String,reflect:!0})],d.prototype,"graphic",void 0);let p=class extends d{};p.styles=[r,o],p=e([a("mwc-check-list-item")],p);export{p as CheckListItem}; diff --git a/material-yew/build/mwc-checkbox.js b/material-yew/build/mwc-checkbox.js deleted file mode 100644 index 73bdc48..0000000 --- a/material-yew/build/mwc-checkbox.js +++ /dev/null @@ -1,37 +0,0 @@ -import{_ as c,t as e,i as o,e as d,a as r,b as a,c as t,F as i,R as n,y as m,o as h,l as k,d as b,f as s}from"./core.js";class l extends i{constructor(){super(...arguments),this.checked=!1,this.indeterminate=!1,this.disabled=!1,this.name="",this.value="on",this.reducedTouchTarget=!1,this.animationClass="",this.shouldRenderRipple=!1,this.focused=!1,this.mdcFoundationClass=void 0,this.mdcFoundation=void 0,this.rippleElement=null,this.rippleHandlers=new n((()=>(this.shouldRenderRipple=!0,this.ripple.then((c=>this.rippleElement=c)),this.ripple)))}createAdapter(){return{}}update(c){const e=c.get("indeterminate"),o=c.get("checked"),d=c.get("disabled");if(void 0!==e||void 0!==o||void 0!==d){const c=this.calculateAnimationStateName(!!o,!!e,!!d),r=this.calculateAnimationStateName(this.checked,this.indeterminate,this.disabled);this.animationClass=`${c}-${r}`}super.update(c)}calculateAnimationStateName(c,e,o){return o?"disabled":e?"indeterminate":c?"checked":"unchecked"}renderRipple(){return this.shouldRenderRipple?this.renderRippleTemplate():""}renderRippleTemplate(){return m``}render(){const c=this.indeterminate||this.checked,e={"mdc-checkbox--disabled":this.disabled,"mdc-checkbox--selected":c,"mdc-checkbox--touch":!this.reducedTouchTarget,"mdc-ripple-upgraded--background-focused":this.focused,"mdc-checkbox--anim-checked-indeterminate":"checked-indeterminate"==this.animationClass,"mdc-checkbox--anim-checked-unchecked":"checked-unchecked"==this.animationClass,"mdc-checkbox--anim-indeterminate-checked":"indeterminate-checked"==this.animationClass,"mdc-checkbox--anim-indeterminate-unchecked":"indeterminate-unchecked"==this.animationClass,"mdc-checkbox--anim-unchecked-checked":"unchecked-checked"==this.animationClass,"mdc-checkbox--anim-unchecked-indeterminate":"unchecked-indeterminate"==this.animationClass},o=this.indeterminate?"mixed":void 0;return m` -
- -
- - - -
-
- ${this.renderRipple()} -
`}setFormData(c){this.name&&this.checked&&c.append(this.name,this.value)}handleFocus(){this.focused=!0,this.handleRippleFocus()}handleBlur(){this.focused=!1,this.handleRippleBlur()}handleRippleMouseDown(c){const e=()=>{window.removeEventListener("mouseup",e),this.handleRippleDeactivate()};window.addEventListener("mouseup",e),this.rippleHandlers.startPress(c)}handleRippleTouchStart(c){this.rippleHandlers.startPress(c)}handleRippleDeactivate(){this.rippleHandlers.endPress()}handleRippleMouseEnter(){this.rippleHandlers.startHover()}handleRippleMouseLeave(){this.rippleHandlers.endHover()}handleRippleFocus(){this.rippleHandlers.startFocus()}handleRippleBlur(){this.rippleHandlers.endFocus()}handleChange(){this.checked=this.formElement.checked,this.indeterminate=this.formElement.indeterminate}resetAnimationClass(){this.animationClass=""}get isRippleActive(){var c;return(null===(c=this.rippleElement)||void 0===c?void 0:c.isActive)||!1}}c([o(".mdc-checkbox")],l.prototype,"mdcRoot",void 0),c([o("input")],l.prototype,"formElement",void 0),c([d({type:Boolean,reflect:!0})],l.prototype,"checked",void 0),c([d({type:Boolean})],l.prototype,"indeterminate",void 0),c([d({type:Boolean,reflect:!0})],l.prototype,"disabled",void 0),c([d({type:String,reflect:!0})],l.prototype,"name",void 0),c([d({type:String})],l.prototype,"value",void 0),c([r,d({type:String,attribute:"aria-label"})],l.prototype,"ariaLabel",void 0),c([r,d({type:String,attribute:"aria-labelledby"})],l.prototype,"ariaLabelledBy",void 0),c([r,d({type:String,attribute:"aria-describedby"})],l.prototype,"ariaDescribedBy",void 0),c([d({type:Boolean})],l.prototype,"reducedTouchTarget",void 0),c([e()],l.prototype,"animationClass",void 0),c([e()],l.prototype,"shouldRenderRipple",void 0),c([e()],l.prototype,"focused",void 0),c([a("mwc-ripple")],l.prototype,"ripple",void 0),c([t({passive:!0})],l.prototype,"handleRippleTouchStart",null);const p=b`.mdc-checkbox{padding:calc((40px - 18px) / 2);padding:calc((var(--mdc-checkbox-ripple-size, 40px) - 18px) / 2);margin:calc((40px - 40px) / 2);margin:calc((var(--mdc-checkbox-touch-target-size, 40px) - 40px) / 2)}.mdc-checkbox .mdc-checkbox__ripple::before,.mdc-checkbox .mdc-checkbox__ripple::after{background-color:#000;background-color:var(--mdc-ripple-color, #000)}.mdc-checkbox:hover .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-ripple-surface--hover .mdc-checkbox__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__ripple::before,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-checkbox:not(.mdc-ripple-upgraded) .mdc-checkbox__ripple::after{transition:opacity 150ms linear}.mdc-checkbox:not(.mdc-ripple-upgraded):active .mdc-checkbox__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-checkbox.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-checkbox.mdc-checkbox--selected .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-checkbox--selected .mdc-checkbox__ripple::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-checkbox.mdc-checkbox--selected:hover .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-checkbox--selected.mdc-ripple-surface--hover .mdc-checkbox__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-checkbox.mdc-checkbox--selected.mdc-ripple-upgraded--background-focused .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-checkbox--selected:not(.mdc-ripple-upgraded):focus .mdc-checkbox__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-checkbox.mdc-checkbox--selected:not(.mdc-ripple-upgraded) .mdc-checkbox__ripple::after{transition:opacity 150ms linear}.mdc-checkbox.mdc-checkbox--selected:not(.mdc-ripple-upgraded):active .mdc-checkbox__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-checkbox.mdc-checkbox--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-checkbox.mdc-ripple-upgraded--background-focused.mdc-checkbox--selected .mdc-checkbox__ripple::before,.mdc-checkbox.mdc-ripple-upgraded--background-focused.mdc-checkbox--selected .mdc-checkbox__ripple::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-checkbox .mdc-checkbox__background{top:calc((40px - 18px) / 2);top:calc((var(--mdc-checkbox-ripple-size, 40px) - 18px) / 2);left:calc((40px - 18px) / 2);left:calc((var(--mdc-checkbox-ripple-size, 40px) - 18px) / 2)}.mdc-checkbox .mdc-checkbox__native-control{top:calc((40px - 40px) / 2);top:calc((40px - var(--mdc-checkbox-touch-target-size, 40px)) / 2);right:calc((40px - 40px) / 2);right:calc((40px - var(--mdc-checkbox-touch-target-size, 40px)) / 2);left:calc((40px - 40px) / 2);left:calc((40px - var(--mdc-checkbox-touch-target-size, 40px)) / 2);width:40px;width:var(--mdc-checkbox-touch-target-size, 40px);height:40px;height:var(--mdc-checkbox-touch-target-size, 40px)}.mdc-checkbox .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:rgba(0, 0, 0, 0.54);border-color:var(--mdc-checkbox-unchecked-color, rgba(0, 0, 0, 0.54));background-color:transparent}.mdc-checkbox .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:#018786;border-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786));background-color:#018786;background-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786))}@keyframes mdc-checkbox-fade-in-background-8A000000FF01878600000000FF018786{0%{border-color:rgba(0, 0, 0, 0.54);border-color:var(--mdc-checkbox-unchecked-color, rgba(0, 0, 0, 0.54));background-color:transparent}50%{border-color:#018786;border-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786));background-color:#018786;background-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786))}}@keyframes mdc-checkbox-fade-out-background-8A000000FF01878600000000FF018786{0%,80%{border-color:#018786;border-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786));background-color:#018786;background-color:var(--mdc-checkbox-checked-color, var(--mdc-theme-secondary, #018786))}100%{border-color:rgba(0, 0, 0, 0.54);border-color:var(--mdc-checkbox-unchecked-color, rgba(0, 0, 0, 0.54));background-color:transparent}}.mdc-checkbox.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-8A000000FF01878600000000FF018786}.mdc-checkbox.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-8A000000FF01878600000000FF018786}.mdc-checkbox .mdc-checkbox__native-control[disabled]:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:rgba(0, 0, 0, 0.38);border-color:var(--mdc-checkbox-disabled-color, rgba(0, 0, 0, 0.38));background-color:transparent}.mdc-checkbox .mdc-checkbox__native-control[disabled]:checked~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[disabled]:indeterminate~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true][disabled]~.mdc-checkbox__background{border-color:transparent;background-color:rgba(0, 0, 0, 0.38);background-color:var(--mdc-checkbox-disabled-color, rgba(0, 0, 0, 0.38))}.mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:#fff;color:var(--mdc-checkbox-ink-color, #fff)}.mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:#fff;border-color:var(--mdc-checkbox-ink-color, #fff)}.mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:#fff;color:var(--mdc-checkbox-ink-color, #fff)}.mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:#fff;border-color:var(--mdc-checkbox-ink-color, #fff)}.mdc-touch-target-wrapper{display:inline}@keyframes mdc-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:29.7833385}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 1)}100%{stroke-dashoffset:0}}@keyframes mdc-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mdc-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);opacity:1;stroke-dashoffset:0}to{opacity:0;stroke-dashoffset:-29.7833385}}@keyframes mdc-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(45deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(45deg);opacity:0}to{transform:rotate(360deg);opacity:1}}@keyframes mdc-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:mdc-animation-deceleration-curve-timing-function;transform:rotate(-45deg);opacity:0}to{transform:rotate(0deg);opacity:1}}@keyframes mdc-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(315deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;transform:scaleX(1);opacity:1}32.8%,100%{transform:scaleX(0);opacity:0}}.mdc-checkbox{display:inline-block;position:relative;flex:0 0 18px;box-sizing:content-box;width:18px;height:18px;line-height:0;white-space:nowrap;cursor:pointer;vertical-align:bottom}.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring{pointer-events:none;border:2px solid transparent;border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%}@media screen and (forced-colors: active){.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring{border-color:CanvasText}}.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring::after,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring::after{content:"";border:2px solid transparent;border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring::after,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring::after{border-color:CanvasText}}@media all and (-ms-high-contrast: none){.mdc-checkbox .mdc-checkbox__focus-ring{display:none}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-checkbox__mixedmark{margin:0 1px}}.mdc-checkbox--disabled{cursor:default;pointer-events:none}.mdc-checkbox__background{display:inline-flex;position:absolute;align-items:center;justify-content:center;box-sizing:border-box;width:18px;height:18px;border:2px solid currentColor;border-radius:2px;background-color:transparent;pointer-events:none;will-change:background-color,border-color;transition:background-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__checkmark{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;opacity:0;transition:opacity 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox--upgraded .mdc-checkbox__checkmark{opacity:1}.mdc-checkbox__checkmark-path{transition:stroke-dashoffset 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1);stroke:currentColor;stroke-width:3.12px;stroke-dashoffset:29.7833385;stroke-dasharray:29.7833385}.mdc-checkbox__mixedmark{width:100%;height:0;transform:scaleX(0) rotate(0deg);border-width:1px;border-style:solid;opacity:0;transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__background,.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__background,.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__background,.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__background{animation-duration:180ms;animation-timing-function:linear}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-unchecked-checked-checkmark-path 180ms linear 0s;transition:none}.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-unchecked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-checked-unchecked-checkmark-path 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__checkmark{animation:mdc-checkbox-checked-indeterminate-checkmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-checked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__checkmark{animation:mdc-checkbox-indeterminate-checked-checkmark 500ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-checked-mixedmark 500ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-unchecked-mixedmark 300ms linear 0s;transition:none}.mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background{transition:border-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1),background-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark-path{stroke-dashoffset:0}.mdc-checkbox__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit}.mdc-checkbox__native-control:disabled{cursor:default;pointer-events:none}.mdc-checkbox--touch{margin:calc((48px - 40px) / 2);margin:calc((var(--mdc-checkbox-state-layer-size, 48px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2)}.mdc-checkbox--touch .mdc-checkbox__native-control{top:calc((40px - 48px) / 2);top:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);right:calc((40px - 48px) / 2);right:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);left:calc((40px - 48px) / 2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);width:48px;width:var(--mdc-checkbox-state-layer-size, 48px);height:48px;height:var(--mdc-checkbox-state-layer-size, 48px)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark{transition:opacity 180ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 180ms 0ms cubic-bezier(0, 0, 0.2, 1);opacity:1}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(-45deg)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark{transform:rotate(45deg);opacity:0;transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__mixedmark,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(0deg);opacity:1}.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark-path,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__mixedmark{transition:none}:host{outline:none;display:inline-flex;-webkit-tap-highlight-color:transparent}:host([checked]),:host([indeterminate]){--mdc-ripple-color:var(--mdc-theme-secondary, #018786)}.mdc-checkbox .mdc-checkbox__background::before{content:none}`;let x=class extends l{};x.styles=[p],x=c([s("mwc-checkbox")],x);export{x as Checkbox}; diff --git a/material-yew/build/mwc-circular-progress-four-color.js b/material-yew/build/mwc-circular-progress-four-color.js deleted file mode 100644 index e7191aa..0000000 --- a/material-yew/build/mwc-circular-progress-four-color.js +++ /dev/null @@ -1,15 +0,0 @@ -import{C as r,y as e,d as c,_ as i,f as a}from"./core.js";class t extends r{renderIndeterminateContainer(){return e` -
-
- ${this.renderIndeterminateSpinnerLayer()} -
-
- ${this.renderIndeterminateSpinnerLayer()} -
-
- ${this.renderIndeterminateSpinnerLayer()} -
-
- ${this.renderIndeterminateSpinnerLayer()} -
-
`}}const o=c`.mdc-circular-progress__determinate-circle,.mdc-circular-progress__indeterminate-circle-graphic{stroke:#6200ee;stroke:var(--mdc-theme-primary, #6200ee)}.mdc-circular-progress__determinate-track{stroke:transparent}@keyframes mdc-circular-progress-container-rotate{to{transform:rotate(360deg)}}@keyframes mdc-circular-progress-spinner-layer-rotate{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}@keyframes mdc-circular-progress-color-1-fade-in-out{from{opacity:.99}25%{opacity:.99}26%{opacity:0}89%{opacity:0}90%{opacity:.99}to{opacity:.99}}@keyframes mdc-circular-progress-color-2-fade-in-out{from{opacity:0}15%{opacity:0}25%{opacity:.99}50%{opacity:.99}51%{opacity:0}to{opacity:0}}@keyframes mdc-circular-progress-color-3-fade-in-out{from{opacity:0}40%{opacity:0}50%{opacity:.99}75%{opacity:.99}76%{opacity:0}to{opacity:0}}@keyframes mdc-circular-progress-color-4-fade-in-out{from{opacity:0}65%{opacity:0}75%{opacity:.99}90%{opacity:.99}to{opacity:0}}@keyframes mdc-circular-progress-left-spin{from{transform:rotate(265deg)}50%{transform:rotate(130deg)}to{transform:rotate(265deg)}}@keyframes mdc-circular-progress-right-spin{from{transform:rotate(-265deg)}50%{transform:rotate(-130deg)}to{transform:rotate(-265deg)}}.mdc-circular-progress{display:inline-flex;position:relative;direction:ltr;line-height:0;transition:opacity 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-circular-progress__determinate-container,.mdc-circular-progress__indeterminate-circle-graphic,.mdc-circular-progress__indeterminate-container,.mdc-circular-progress__spinner-layer{position:absolute;width:100%;height:100%}.mdc-circular-progress__determinate-container{transform:rotate(-90deg)}.mdc-circular-progress__indeterminate-container{font-size:0;letter-spacing:0;white-space:nowrap;opacity:0}.mdc-circular-progress__determinate-circle-graphic,.mdc-circular-progress__indeterminate-circle-graphic{fill:transparent}.mdc-circular-progress__determinate-circle{transition:stroke-dashoffset 500ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-circular-progress__gap-patch{position:absolute;top:0;left:47.5%;box-sizing:border-box;width:5%;height:100%;overflow:hidden}.mdc-circular-progress__gap-patch .mdc-circular-progress__indeterminate-circle-graphic{left:-900%;width:2000%;transform:rotate(180deg)}.mdc-circular-progress__circle-clipper{display:inline-flex;position:relative;width:50%;height:100%;overflow:hidden}.mdc-circular-progress__circle-clipper .mdc-circular-progress__indeterminate-circle-graphic{width:200%}.mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{left:-100%}.mdc-circular-progress--indeterminate .mdc-circular-progress__determinate-container{opacity:0}.mdc-circular-progress--indeterminate .mdc-circular-progress__indeterminate-container{opacity:1}.mdc-circular-progress--indeterminate .mdc-circular-progress__indeterminate-container{animation:mdc-circular-progress-container-rotate 1568.2352941176ms linear infinite}.mdc-circular-progress--indeterminate .mdc-circular-progress__spinner-layer{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-1{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-1-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-2{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-2-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-3{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-3-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-4{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-4-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-left .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-left-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-right-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--closed{opacity:0}:host{display:inline-flex}.mdc-circular-progress__determinate-track{stroke:transparent;stroke:var(--mdc-circular-progress-track-color, transparent)}.mdc-circular-progress__color-1 .mdc-circular-progress__indeterminate-circle-graphic{stroke:#6200ee;stroke:var(--mdc-circular-progress-bar-color-1, var(--mdc-theme-primary, #6200ee))}.mdc-circular-progress__color-2 .mdc-circular-progress__indeterminate-circle-graphic{stroke:#6200ee;stroke:var(--mdc-circular-progress-bar-color-2, var(--mdc-theme-primary, #6200ee))}.mdc-circular-progress__color-3 .mdc-circular-progress__indeterminate-circle-graphic{stroke:#6200ee;stroke:var(--mdc-circular-progress-bar-color-3, var(--mdc-theme-primary, #6200ee))}.mdc-circular-progress__color-4 .mdc-circular-progress__indeterminate-circle-graphic{stroke:#6200ee;stroke:var(--mdc-circular-progress-bar-color-4, var(--mdc-theme-primary, #6200ee))}:host{display:inline-flex}`;let s=class extends t{};s.styles=[o],s=i([a("mwc-circular-progress-four-color")],s);export{s as CircularProgressFourColor}; diff --git a/material-yew/build/mwc-circular-progress.js b/material-yew/build/mwc-circular-progress.js deleted file mode 100644 index 0dbbc3f..0000000 --- a/material-yew/build/mwc-circular-progress.js +++ /dev/null @@ -1 +0,0 @@ -import{d as r,_ as e,C as c,f as i}from"./core.js";const t=r`.mdc-circular-progress__determinate-circle,.mdc-circular-progress__indeterminate-circle-graphic{stroke:#6200ee;stroke:var(--mdc-theme-primary, #6200ee)}.mdc-circular-progress__determinate-track{stroke:transparent}@keyframes mdc-circular-progress-container-rotate{to{transform:rotate(360deg)}}@keyframes mdc-circular-progress-spinner-layer-rotate{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}@keyframes mdc-circular-progress-color-1-fade-in-out{from{opacity:.99}25%{opacity:.99}26%{opacity:0}89%{opacity:0}90%{opacity:.99}to{opacity:.99}}@keyframes mdc-circular-progress-color-2-fade-in-out{from{opacity:0}15%{opacity:0}25%{opacity:.99}50%{opacity:.99}51%{opacity:0}to{opacity:0}}@keyframes mdc-circular-progress-color-3-fade-in-out{from{opacity:0}40%{opacity:0}50%{opacity:.99}75%{opacity:.99}76%{opacity:0}to{opacity:0}}@keyframes mdc-circular-progress-color-4-fade-in-out{from{opacity:0}65%{opacity:0}75%{opacity:.99}90%{opacity:.99}to{opacity:0}}@keyframes mdc-circular-progress-left-spin{from{transform:rotate(265deg)}50%{transform:rotate(130deg)}to{transform:rotate(265deg)}}@keyframes mdc-circular-progress-right-spin{from{transform:rotate(-265deg)}50%{transform:rotate(-130deg)}to{transform:rotate(-265deg)}}.mdc-circular-progress{display:inline-flex;position:relative;direction:ltr;line-height:0;transition:opacity 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-circular-progress__determinate-container,.mdc-circular-progress__indeterminate-circle-graphic,.mdc-circular-progress__indeterminate-container,.mdc-circular-progress__spinner-layer{position:absolute;width:100%;height:100%}.mdc-circular-progress__determinate-container{transform:rotate(-90deg)}.mdc-circular-progress__indeterminate-container{font-size:0;letter-spacing:0;white-space:nowrap;opacity:0}.mdc-circular-progress__determinate-circle-graphic,.mdc-circular-progress__indeterminate-circle-graphic{fill:transparent}.mdc-circular-progress__determinate-circle{transition:stroke-dashoffset 500ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-circular-progress__gap-patch{position:absolute;top:0;left:47.5%;box-sizing:border-box;width:5%;height:100%;overflow:hidden}.mdc-circular-progress__gap-patch .mdc-circular-progress__indeterminate-circle-graphic{left:-900%;width:2000%;transform:rotate(180deg)}.mdc-circular-progress__circle-clipper{display:inline-flex;position:relative;width:50%;height:100%;overflow:hidden}.mdc-circular-progress__circle-clipper .mdc-circular-progress__indeterminate-circle-graphic{width:200%}.mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{left:-100%}.mdc-circular-progress--indeterminate .mdc-circular-progress__determinate-container{opacity:0}.mdc-circular-progress--indeterminate .mdc-circular-progress__indeterminate-container{opacity:1}.mdc-circular-progress--indeterminate .mdc-circular-progress__indeterminate-container{animation:mdc-circular-progress-container-rotate 1568.2352941176ms linear infinite}.mdc-circular-progress--indeterminate .mdc-circular-progress__spinner-layer{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-1{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-1-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-2{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-2-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-3{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-3-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-4{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-4-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-left .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-left-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-right-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--closed{opacity:0}:host{display:inline-flex}.mdc-circular-progress__determinate-track{stroke:transparent;stroke:var(--mdc-circular-progress-track-color, transparent)}`;let a=class extends c{};a.styles=[t],a=e([i("mwc-circular-progress")],a);export{a as CircularProgress}; diff --git a/material-yew/build/mwc-dialog.js b/material-yew/build/mwc-dialog.js deleted file mode 100644 index 4d18a1d..0000000 --- a/material-yew/build/mwc-dialog.js +++ /dev/null @@ -1,27 +0,0 @@ -import{g as t,h as e,j as i,A as o,k as a,n,M as d,_ as r,i as c,e as s,m as l,B as m,p as g,q as p,r as u,y as h,o as f,d as _,f as y}from"./core.js";var b;!function(t){t.POLL_SCROLL_POS="poll_scroll_position",t.POLL_LAYOUT_CHANGE="poll_layout_change"}(b||(b={}));var x=function(d){function r(t){var a=d.call(this,e(e({},r.defaultAdapter),t))||this;return a.dialogOpen=!1,a.isFullscreen=!1,a.animationFrame=0,a.animationTimer=0,a.escapeKeyAction=i.CLOSE_ACTION,a.scrimClickAction=i.CLOSE_ACTION,a.autoStackButtons=!0,a.areButtonsStacked=!1,a.suppressDefaultPressSelector=i.SUPPRESS_DEFAULT_PRESS_SELECTOR,a.animFrame=new o,a.contentScrollHandler=function(){a.handleScrollEvent()},a.windowResizeHandler=function(){a.layout()},a.windowOrientationChangeHandler=function(){a.layout()},a}return t(r,d),Object.defineProperty(r,"cssClasses",{get:function(){return a},enumerable:!1,configurable:!0}),Object.defineProperty(r,"strings",{get:function(){return i},enumerable:!1,configurable:!0}),Object.defineProperty(r,"numbers",{get:function(){return n},enumerable:!1,configurable:!0}),Object.defineProperty(r,"defaultAdapter",{get:function(){return{addBodyClass:function(){},addClass:function(){},areButtonsStacked:function(){return!1},clickDefaultButton:function(){},eventTargetMatches:function(){return!1},getActionFromEvent:function(){return""},getInitialFocusEl:function(){return null},hasClass:function(){return!1},isContentScrollable:function(){return!1},notifyClosed:function(){},notifyClosing:function(){},notifyOpened:function(){},notifyOpening:function(){},releaseFocus:function(){},removeBodyClass:function(){},removeClass:function(){},reverseButtons:function(){},trapFocus:function(){},registerContentEventHandler:function(){},deregisterContentEventHandler:function(){},isScrollableContentAtTop:function(){return!1},isScrollableContentAtBottom:function(){return!1},registerWindowEventHandler:function(){},deregisterWindowEventHandler:function(){}}},enumerable:!1,configurable:!0}),r.prototype.init=function(){this.adapter.hasClass(a.STACKED)&&this.setAutoStackButtons(!1),this.isFullscreen=this.adapter.hasClass(a.FULLSCREEN)},r.prototype.destroy=function(){this.animationTimer&&(clearTimeout(this.animationTimer),this.handleAnimationTimerEnd()),this.isFullscreen&&this.adapter.deregisterContentEventHandler("scroll",this.contentScrollHandler),this.animFrame.cancelAll(),this.adapter.deregisterWindowEventHandler("resize",this.windowResizeHandler),this.adapter.deregisterWindowEventHandler("orientationchange",this.windowOrientationChangeHandler)},r.prototype.open=function(t){var e=this;this.dialogOpen=!0,this.adapter.notifyOpening(),this.adapter.addClass(a.OPENING),this.isFullscreen&&this.adapter.registerContentEventHandler("scroll",this.contentScrollHandler),t&&t.isAboveFullscreenDialog&&this.adapter.addClass(a.SCRIM_HIDDEN),this.adapter.registerWindowEventHandler("resize",this.windowResizeHandler),this.adapter.registerWindowEventHandler("orientationchange",this.windowOrientationChangeHandler),this.runNextAnimationFrame((function(){e.adapter.addClass(a.OPEN),e.adapter.addBodyClass(a.SCROLL_LOCK),e.layout(),e.animationTimer=setTimeout((function(){e.handleAnimationTimerEnd(),e.adapter.trapFocus(e.adapter.getInitialFocusEl()),e.adapter.notifyOpened()}),n.DIALOG_ANIMATION_OPEN_TIME_MS)}))},r.prototype.close=function(t){var e=this;void 0===t&&(t=""),this.dialogOpen&&(this.dialogOpen=!1,this.adapter.notifyClosing(t),this.adapter.addClass(a.CLOSING),this.adapter.removeClass(a.OPEN),this.adapter.removeBodyClass(a.SCROLL_LOCK),this.isFullscreen&&this.adapter.deregisterContentEventHandler("scroll",this.contentScrollHandler),this.adapter.deregisterWindowEventHandler("resize",this.windowResizeHandler),this.adapter.deregisterWindowEventHandler("orientationchange",this.windowOrientationChangeHandler),cancelAnimationFrame(this.animationFrame),this.animationFrame=0,clearTimeout(this.animationTimer),this.animationTimer=setTimeout((function(){e.adapter.releaseFocus(),e.handleAnimationTimerEnd(),e.adapter.notifyClosed(t)}),n.DIALOG_ANIMATION_CLOSE_TIME_MS))},r.prototype.showSurfaceScrim=function(){var t=this;this.adapter.addClass(a.SURFACE_SCRIM_SHOWING),this.runNextAnimationFrame((function(){t.adapter.addClass(a.SURFACE_SCRIM_SHOWN)}))},r.prototype.hideSurfaceScrim=function(){this.adapter.removeClass(a.SURFACE_SCRIM_SHOWN),this.adapter.addClass(a.SURFACE_SCRIM_HIDING)},r.prototype.handleSurfaceScrimTransitionEnd=function(){this.adapter.removeClass(a.SURFACE_SCRIM_HIDING),this.adapter.removeClass(a.SURFACE_SCRIM_SHOWING)},r.prototype.isOpen=function(){return this.dialogOpen},r.prototype.getEscapeKeyAction=function(){return this.escapeKeyAction},r.prototype.setEscapeKeyAction=function(t){this.escapeKeyAction=t},r.prototype.getScrimClickAction=function(){return this.scrimClickAction},r.prototype.setScrimClickAction=function(t){this.scrimClickAction=t},r.prototype.getAutoStackButtons=function(){return this.autoStackButtons},r.prototype.setAutoStackButtons=function(t){this.autoStackButtons=t},r.prototype.getSuppressDefaultPressSelector=function(){return this.suppressDefaultPressSelector},r.prototype.setSuppressDefaultPressSelector=function(t){this.suppressDefaultPressSelector=t},r.prototype.layout=function(){var t=this;this.animFrame.request(b.POLL_LAYOUT_CHANGE,(function(){t.layoutInternal()}))},r.prototype.handleClick=function(t){if(this.adapter.eventTargetMatches(t.target,i.SCRIM_SELECTOR)&&""!==this.scrimClickAction)this.close(this.scrimClickAction);else{var e=this.adapter.getActionFromEvent(t);e&&this.close(e)}},r.prototype.handleKeydown=function(t){var e="Enter"===t.key||13===t.keyCode;if(e&&!this.adapter.getActionFromEvent(t)){var i=t.composedPath?t.composedPath()[0]:t.target,o=!this.suppressDefaultPressSelector||!this.adapter.eventTargetMatches(i,this.suppressDefaultPressSelector);e&&o&&this.adapter.clickDefaultButton()}},r.prototype.handleDocumentKeydown=function(t){("Escape"===t.key||27===t.keyCode)&&""!==this.escapeKeyAction&&this.close(this.escapeKeyAction)},r.prototype.handleScrollEvent=function(){var t=this;this.animFrame.request(b.POLL_SCROLL_POS,(function(){t.toggleScrollDividerHeader(),t.toggleScrollDividerFooter()}))},r.prototype.layoutInternal=function(){this.autoStackButtons&&this.detectStackedButtons(),this.toggleScrollableClasses()},r.prototype.handleAnimationTimerEnd=function(){this.animationTimer=0,this.adapter.removeClass(a.OPENING),this.adapter.removeClass(a.CLOSING)},r.prototype.runNextAnimationFrame=function(t){var e=this;cancelAnimationFrame(this.animationFrame),this.animationFrame=requestAnimationFrame((function(){e.animationFrame=0,clearTimeout(e.animationTimer),e.animationTimer=setTimeout(t,0)}))},r.prototype.detectStackedButtons=function(){this.adapter.removeClass(a.STACKED);var t=this.adapter.areButtonsStacked();t&&this.adapter.addClass(a.STACKED),t!==this.areButtonsStacked&&(this.adapter.reverseButtons(),this.areButtonsStacked=t)},r.prototype.toggleScrollableClasses=function(){this.adapter.removeClass(a.SCROLLABLE),this.adapter.isContentScrollable()&&(this.adapter.addClass(a.SCROLLABLE),this.isFullscreen&&(this.toggleScrollDividerHeader(),this.toggleScrollDividerFooter()))},r.prototype.toggleScrollDividerHeader=function(){this.adapter.isScrollableContentAtTop()?this.adapter.hasClass(a.SCROLL_DIVIDER_HEADER)&&this.adapter.removeClass(a.SCROLL_DIVIDER_HEADER):this.adapter.addClass(a.SCROLL_DIVIDER_HEADER)},r.prototype.toggleScrollDividerFooter=function(){this.adapter.isScrollableContentAtBottom()?this.adapter.hasClass(a.SCROLL_DIVIDER_FOOTER)&&this.adapter.removeClass(a.SCROLL_DIVIDER_FOOTER):this.adapter.addClass(a.SCROLL_DIVIDER_FOOTER)},r}(d);function v(t){return void 0===t&&(t=window),!!function(t){void 0===t&&(t=window);var e=!1;try{var i={get passive(){return e=!0,!1}},o=function(){};t.document.addEventListener("test",o,i),t.document.removeEventListener("test",o,i)}catch(t){e=!1}return e}(t)&&{passive:!0}}const w=document.$blockingElements;class S extends m{constructor(){super(...arguments),this.hideActions=!1,this.stacked=!1,this.heading="",this.scrimClickAction="close",this.escapeKeyAction="close",this.open=!1,this.defaultAction="close",this.actionAttribute="dialogAction",this.initialFocusAttribute="dialogInitialFocus",this.initialSupressDefaultPressSelector="",this.mdcFoundationClass=x,this.boundHandleClick=null,this.boundHandleKeydown=null,this.boundHandleDocumentKeydown=null}set suppressDefaultPressSelector(t){this.mdcFoundation?this.mdcFoundation.setSuppressDefaultPressSelector(t):this.initialSupressDefaultPressSelector=t}get suppressDefaultPressSelector(){return this.mdcFoundation?this.mdcFoundation.getSuppressDefaultPressSelector():this.initialSupressDefaultPressSelector}get primaryButton(){let t=this.primarySlot.assignedNodes();t=t.filter((t=>t instanceof HTMLElement));const e=t[0];return e||null}emitNotification(t,e){const i=new CustomEvent(t,{detail:e?{action:e}:{}});this.dispatchEvent(i)}getInitialFocusEl(){const t=`[${this.initialFocusAttribute}]`,e=this.querySelector(t);if(e)return e;const i=this.primarySlot.assignedNodes({flatten:!0}),o=this.searchNodeTreesForAttribute(i,this.initialFocusAttribute);if(o)return o;const a=this.secondarySlot.assignedNodes({flatten:!0}),n=this.searchNodeTreesForAttribute(a,this.initialFocusAttribute);if(n)return n;const d=this.contentSlot.assignedNodes({flatten:!0});return this.searchNodeTreesForAttribute(d,this.initialFocusAttribute)}searchNodeTreesForAttribute(t,e){for(const i of t)if(i instanceof HTMLElement){if(i.hasAttribute(e))return i;{const t=i.querySelector(`[${e}]`);if(t)return t}}return null}createAdapter(){return Object.assign(Object.assign({},g(this.mdcRoot)),{addBodyClass:()=>document.body.style.overflow="hidden",removeBodyClass:()=>document.body.style.overflow="",areButtonsStacked:()=>this.stacked,clickDefaultButton:()=>{const t=this.primaryButton;t&&t.click()},eventTargetMatches:(t,e)=>!!t&&p(t,e),getActionFromEvent:t=>{if(!t.target)return"";const e=u(t.target,`[${this.actionAttribute}]`);return e&&e.getAttribute(this.actionAttribute)},getInitialFocusEl:()=>this.getInitialFocusEl(),isContentScrollable:()=>{const t=this.contentElement;return!!t&&t.scrollHeight>t.offsetHeight},notifyClosed:t=>this.emitNotification("closed",t),notifyClosing:t=>{this.closingDueToDisconnect||(this.open=!1),this.emitNotification("closing",t)},notifyOpened:()=>this.emitNotification("opened"),notifyOpening:()=>{this.open=!0,this.emitNotification("opening")},reverseButtons:()=>{},releaseFocus:()=>{w.remove(this)},trapFocus:t=>{this.isConnected&&(w.push(this),t&&t.focus())},registerContentEventHandler:(t,e)=>{this.contentElement.addEventListener(t,e)},deregisterContentEventHandler:(t,e)=>{this.contentElement.removeEventListener(t,e)},isScrollableContentAtTop:()=>{const t=this.contentElement;return!!t&&0===t.scrollTop},isScrollableContentAtBottom:()=>{const t=this.contentElement;return!!t&&Math.ceil(t.scrollHeight-t.scrollTop)===t.clientHeight},registerWindowEventHandler:(t,e)=>{window.addEventListener(t,e,v())},deregisterWindowEventHandler:(t,e)=>{window.removeEventListener(t,e,v())}})}render(){const t={[a.STACKED]:this.stacked};let e=h``;this.heading&&(e=this.renderHeading());const i={"mdc-dialog__actions":!this.hideActions};return h` -
-
-
- ${e} -
- -
-
- - - - - - -
-
-
-
-
`}renderHeading(){return h` -

${this.heading}

`}firstUpdated(){super.firstUpdated(),this.mdcFoundation.setAutoStackButtons(!0),this.initialSupressDefaultPressSelector?this.suppressDefaultPressSelector=this.initialSupressDefaultPressSelector:this.suppressDefaultPressSelector=[this.suppressDefaultPressSelector,"mwc-textarea","mwc-menu mwc-list-item","mwc-select mwc-list-item"].join(", "),this.boundHandleClick=this.mdcFoundation.handleClick.bind(this.mdcFoundation),this.boundHandleKeydown=this.mdcFoundation.handleKeydown.bind(this.mdcFoundation),this.boundHandleDocumentKeydown=this.mdcFoundation.handleDocumentKeydown.bind(this.mdcFoundation)}connectedCallback(){super.connectedCallback(),this.open&&this.mdcFoundation&&!this.mdcFoundation.isOpen()&&(this.setEventListeners(),this.mdcFoundation.open())}disconnectedCallback(){super.disconnectedCallback(),this.open&&this.mdcFoundation&&(this.removeEventListeners(),this.closingDueToDisconnect=!0,this.mdcFoundation.close(this.currentAction||this.defaultAction),this.closingDueToDisconnect=!1,this.currentAction=void 0,w.remove(this))}forceLayout(){this.mdcFoundation.layout()}focus(){const t=this.getInitialFocusEl();t&&t.focus()}blur(){if(!this.shadowRoot)return;const t=this.shadowRoot.activeElement;if(t)t instanceof HTMLElement&&t.blur();else{const t=this.getRootNode(),e=t instanceof Document?t.activeElement:null;e instanceof HTMLElement&&e.blur()}}setEventListeners(){this.boundHandleClick&&this.mdcRoot.addEventListener("click",this.boundHandleClick),this.boundHandleKeydown&&this.mdcRoot.addEventListener("keydown",this.boundHandleKeydown,v()),this.boundHandleDocumentKeydown&&document.addEventListener("keydown",this.boundHandleDocumentKeydown,v())}removeEventListeners(){this.boundHandleClick&&this.mdcRoot.removeEventListener("click",this.boundHandleClick),this.boundHandleKeydown&&this.mdcRoot.removeEventListener("keydown",this.boundHandleKeydown),this.boundHandleDocumentKeydown&&document.removeEventListener("keydown",this.boundHandleDocumentKeydown)}close(){this.open=!1}show(){this.open=!0}}r([c(".mdc-dialog")],S.prototype,"mdcRoot",void 0),r([c('slot[name="primaryAction"]')],S.prototype,"primarySlot",void 0),r([c('slot[name="secondaryAction"]')],S.prototype,"secondarySlot",void 0),r([c("#contentSlot")],S.prototype,"contentSlot",void 0),r([c(".mdc-dialog__content")],S.prototype,"contentElement",void 0),r([c(".mdc-container")],S.prototype,"conatinerElement",void 0),r([s({type:Boolean})],S.prototype,"hideActions",void 0),r([s({type:Boolean}),l((function(){this.forceLayout()}))],S.prototype,"stacked",void 0),r([s({type:String})],S.prototype,"heading",void 0),r([s({type:String}),l((function(t){this.mdcFoundation.setScrimClickAction(t)}))],S.prototype,"scrimClickAction",void 0),r([s({type:String}),l((function(t){this.mdcFoundation.setEscapeKeyAction(t)}))],S.prototype,"escapeKeyAction",void 0),r([s({type:Boolean,reflect:!0}),l((function(t){this.mdcFoundation&&this.isConnected&&(t?(this.setEventListeners(),this.mdcFoundation.open()):(this.removeEventListeners(),this.mdcFoundation.close(this.currentAction||this.defaultAction),this.currentAction=void 0))}))],S.prototype,"open",void 0),r([s()],S.prototype,"defaultAction",void 0),r([s()],S.prototype,"actionAttribute",void 0),r([s()],S.prototype,"initialFocusAttribute",void 0);const C=_`.mdc-dialog .mdc-dialog__surface{background-color:#fff;background-color:var(--mdc-theme-surface, #fff)}.mdc-dialog .mdc-dialog__scrim{background-color:rgba(0,0,0,.32)}.mdc-dialog .mdc-dialog__surface-scrim{background-color:rgba(0,0,0,.32)}.mdc-dialog .mdc-dialog__title{color:rgba(0,0,0,.87)}.mdc-dialog .mdc-dialog__content{color:rgba(0,0,0,.6)}.mdc-dialog .mdc-dialog__close{color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-dialog .mdc-dialog__close .mdc-icon-button__ripple::before,.mdc-dialog .mdc-dialog__close .mdc-icon-button__ripple::after{background-color:#000;background-color:var(--mdc-ripple-color, var(--mdc-theme-on-surface, #000))}.mdc-dialog .mdc-dialog__close:hover .mdc-icon-button__ripple::before,.mdc-dialog .mdc-dialog__close.mdc-ripple-surface--hover .mdc-icon-button__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-dialog .mdc-dialog__close.mdc-ripple-upgraded--background-focused .mdc-icon-button__ripple::before,.mdc-dialog .mdc-dialog__close:not(.mdc-ripple-upgraded):focus .mdc-icon-button__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-dialog .mdc-dialog__close:not(.mdc-ripple-upgraded) .mdc-icon-button__ripple::after{transition:opacity 150ms linear}.mdc-dialog .mdc-dialog__close:not(.mdc-ripple-upgraded):active .mdc-icon-button__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-dialog .mdc-dialog__close.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-dialog.mdc-dialog--scrollable .mdc-dialog__title,.mdc-dialog.mdc-dialog--scrollable .mdc-dialog__actions,.mdc-dialog.mdc-dialog--scrollable.mdc-dialog-scroll-divider-footer .mdc-dialog__actions{border-color:rgba(0,0,0,.12)}.mdc-dialog.mdc-dialog--scrollable .mdc-dialog__title{border-bottom:1px solid rgba(0,0,0,.12);margin-bottom:0}.mdc-dialog.mdc-dialog-scroll-divider-header.mdc-dialog--fullscreen .mdc-dialog__header{box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2),0px 2px 2px 0px rgba(0, 0, 0, 0.14),0px 1px 5px 0px rgba(0,0,0,.12)}.mdc-dialog .mdc-dialog__surface{border-radius:4px;border-radius:var(--mdc-shape-medium, 4px)}.mdc-dialog__surface{box-shadow:0px 11px 15px -7px rgba(0, 0, 0, 0.2),0px 24px 38px 3px rgba(0, 0, 0, 0.14),0px 9px 46px 8px rgba(0,0,0,.12)}.mdc-dialog__title{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-headline6-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1.25rem;font-size:var(--mdc-typography-headline6-font-size, 1.25rem);line-height:2rem;line-height:var(--mdc-typography-headline6-line-height, 2rem);font-weight:500;font-weight:var(--mdc-typography-headline6-font-weight, 500);letter-spacing:0.0125em;letter-spacing:var(--mdc-typography-headline6-letter-spacing, 0.0125em);text-decoration:inherit;text-decoration:var(--mdc-typography-headline6-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-headline6-text-transform, inherit)}.mdc-dialog__content{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-body1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-body1-font-size, 1rem);line-height:1.5rem;line-height:var(--mdc-typography-body1-line-height, 1.5rem);font-weight:400;font-weight:var(--mdc-typography-body1-font-weight, 400);letter-spacing:0.03125em;letter-spacing:var(--mdc-typography-body1-letter-spacing, 0.03125em);text-decoration:inherit;text-decoration:var(--mdc-typography-body1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body1-text-transform, inherit)}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:0;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1);background-color:#fff;background-color:var(--mdc-elevation-overlay-color, #fff)}.mdc-dialog,.mdc-dialog__scrim{position:fixed;top:0;left:0;align-items:center;justify-content:center;box-sizing:border-box;width:100%;height:100%}.mdc-dialog{display:none;z-index:7;z-index:var(--mdc-dialog-z-index, 7)}.mdc-dialog .mdc-dialog__content{padding:20px 24px 20px 24px}.mdc-dialog .mdc-dialog__surface{min-width:280px}@media(max-width: 592px){.mdc-dialog .mdc-dialog__surface{max-width:calc(100vw - 32px)}}@media(min-width: 592px){.mdc-dialog .mdc-dialog__surface{max-width:560px}}.mdc-dialog .mdc-dialog__surface{max-height:calc(100% - 32px)}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-width:none}@media(max-width: 960px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:560px;width:560px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}@media(max-width: 720px)and (max-width: 672px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:calc(100vw - 112px)}}@media(max-width: 720px)and (min-width: 672px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:560px}}@media(max-width: 720px)and (max-height: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:calc(100vh - 160px)}}@media(max-width: 720px)and (min-height: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:560px}}@media(max-width: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}@media(max-width: 720px)and (max-height: 400px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{height:100%;max-height:100vh;max-width:100vw;width:100vw;border-radius:0}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{order:-1;left:-12px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__header{padding:0 16px 9px;justify-content:flex-start}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__title{margin-left:calc(16px - 2 * 12px)}}@media(max-width: 600px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{height:100%;max-height:100vh;max-width:100vw;width:100vw;border-radius:0}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{order:-1;left:-12px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__header{padding:0 16px 9px;justify-content:flex-start}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__title{margin-left:calc(16px - 2 * 12px)}}@media(min-width: 960px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:calc(100vw - 400px)}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}.mdc-dialog.mdc-dialog__scrim--hidden .mdc-dialog__scrim{opacity:0}.mdc-dialog__scrim{opacity:0;z-index:-1}.mdc-dialog__container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;transform:scale(0.8);opacity:0;pointer-events:none}.mdc-dialog__surface{position:relative;display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;max-width:100%;max-height:100%;pointer-events:auto;overflow-y:auto}.mdc-dialog__surface .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}[dir=rtl] .mdc-dialog__surface,.mdc-dialog__surface[dir=rtl]{text-align:right}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-dialog__surface{outline:2px solid windowText}}.mdc-dialog__surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid transparent;border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-dialog__surface::before{border-color:CanvasText}}@media screen and (-ms-high-contrast: active),screen and (-ms-high-contrast: none){.mdc-dialog__surface::before{content:none}}.mdc-dialog__title{display:block;margin-top:0;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:0 24px 9px}.mdc-dialog__title::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}[dir=rtl] .mdc-dialog__title,.mdc-dialog__title[dir=rtl]{text-align:right}.mdc-dialog--scrollable .mdc-dialog__title{margin-bottom:1px;padding-bottom:15px}.mdc-dialog--fullscreen .mdc-dialog__header{align-items:baseline;border-bottom:1px solid transparent;display:inline-flex;justify-content:space-between;padding:0 24px 9px;z-index:1}@media screen and (forced-colors: active){.mdc-dialog--fullscreen .mdc-dialog__header{border-bottom-color:CanvasText}}.mdc-dialog--fullscreen .mdc-dialog__header .mdc-dialog__close{right:-12px}.mdc-dialog--fullscreen .mdc-dialog__title{margin-bottom:0;padding:0;border-bottom:0}.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__title{border-bottom:0;margin-bottom:0}.mdc-dialog--fullscreen .mdc-dialog__close{top:5px}.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__actions{border-top:1px solid transparent}@media screen and (forced-colors: active){.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__actions{border-top-color:CanvasText}}.mdc-dialog__content{flex-grow:1;box-sizing:border-box;margin:0;overflow:auto}.mdc-dialog__content>:first-child{margin-top:0}.mdc-dialog__content>:last-child{margin-bottom:0}.mdc-dialog__title+.mdc-dialog__content,.mdc-dialog__header+.mdc-dialog__content{padding-top:0}.mdc-dialog--scrollable .mdc-dialog__title+.mdc-dialog__content{padding-top:8px;padding-bottom:8px}.mdc-dialog__content .mdc-deprecated-list:first-child:last-child{padding:6px 0 0}.mdc-dialog--scrollable .mdc-dialog__content .mdc-deprecated-list:first-child:last-child{padding:0}.mdc-dialog__actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;box-sizing:border-box;min-height:52px;margin:0;padding:8px;border-top:1px solid transparent}@media screen and (forced-colors: active){.mdc-dialog__actions{border-top-color:CanvasText}}.mdc-dialog--stacked .mdc-dialog__actions{flex-direction:column;align-items:flex-end}.mdc-dialog__button{margin-left:8px;margin-right:0;max-width:100%;text-align:right}[dir=rtl] .mdc-dialog__button,.mdc-dialog__button[dir=rtl]{margin-left:0;margin-right:8px}.mdc-dialog__button:first-child{margin-left:0;margin-right:0}[dir=rtl] .mdc-dialog__button:first-child,.mdc-dialog__button:first-child[dir=rtl]{margin-left:0;margin-right:0}[dir=rtl] .mdc-dialog__button,.mdc-dialog__button[dir=rtl]{text-align:left}.mdc-dialog--stacked .mdc-dialog__button:not(:first-child){margin-top:12px}.mdc-dialog--open,.mdc-dialog--opening,.mdc-dialog--closing{display:flex}.mdc-dialog--opening .mdc-dialog__scrim{transition:opacity 150ms linear}.mdc-dialog--opening .mdc-dialog__container{transition:opacity 75ms linear,transform 150ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-dialog--closing .mdc-dialog__scrim,.mdc-dialog--closing .mdc-dialog__container{transition:opacity 75ms linear}.mdc-dialog--closing .mdc-dialog__container{transform:none}.mdc-dialog--open .mdc-dialog__scrim{opacity:1}.mdc-dialog--open .mdc-dialog__container{transform:none;opacity:1}.mdc-dialog--open.mdc-dialog__surface-scrim--shown .mdc-dialog__surface-scrim{opacity:1;z-index:1}.mdc-dialog--open.mdc-dialog__surface-scrim--hiding .mdc-dialog__surface-scrim{transition:opacity 75ms linear}.mdc-dialog--open.mdc-dialog__surface-scrim--showing .mdc-dialog__surface-scrim{transition:opacity 150ms linear}.mdc-dialog__surface-scrim{display:none;opacity:0;position:absolute;width:100%;height:100%}.mdc-dialog__surface-scrim--shown .mdc-dialog__surface-scrim,.mdc-dialog__surface-scrim--showing .mdc-dialog__surface-scrim,.mdc-dialog__surface-scrim--hiding .mdc-dialog__surface-scrim{display:block}.mdc-dialog-scroll-lock{overflow:hidden}.mdc-dialog--no-content-padding .mdc-dialog__content{padding:0}.mdc-dialog--sheet .mdc-dialog__close{right:12px;top:9px;position:absolute;z-index:1}#actions:not(.mdc-dialog__actions){display:none}.mdc-dialog__surface{box-shadow:var(--mdc-dialog-box-shadow, 0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12))}@media(min-width: 560px){.mdc-dialog .mdc-dialog__surface{max-width:560px;max-width:var(--mdc-dialog-max-width, 560px)}}.mdc-dialog .mdc-dialog__scrim{background-color:rgba(0, 0, 0, 0.32);background-color:var(--mdc-dialog-scrim-color, rgba(0, 0, 0, 0.32))}.mdc-dialog .mdc-dialog__title{color:rgba(0, 0, 0, 0.87);color:var(--mdc-dialog-heading-ink-color, rgba(0, 0, 0, 0.87))}.mdc-dialog .mdc-dialog__content{color:rgba(0, 0, 0, 0.6);color:var(--mdc-dialog-content-ink-color, rgba(0, 0, 0, 0.6))}.mdc-dialog.mdc-dialog--scrollable .mdc-dialog__title,.mdc-dialog.mdc-dialog--scrollable .mdc-dialog__actions{border-color:rgba(0, 0, 0, 0.12);border-color:var(--mdc-dialog-scroll-divider-color, rgba(0, 0, 0, 0.12))}.mdc-dialog .mdc-dialog__surface{min-width:280px;min-width:var(--mdc-dialog-min-width, 280px)}.mdc-dialog .mdc-dialog__surface{max-height:var(--mdc-dialog-max-height, calc(100% - 32px))}#actions ::slotted(*){margin-left:8px;margin-right:0;max-width:100%;text-align:right}[dir=rtl] #actions ::slotted(*),#actions ::slotted(*[dir=rtl]){margin-left:0;margin-right:8px}[dir=rtl] #actions ::slotted(*),#actions ::slotted(*[dir=rtl]){text-align:left}.mdc-dialog--stacked #actions{flex-direction:column-reverse}.mdc-dialog--stacked #actions *:not(:last-child) ::slotted(*){flex-basis:.000000001px;margin-top:12px}`;let E=class extends S{};E.styles=[C],E=r([y("mwc-dialog")],E);export{E as Dialog}; diff --git a/material-yew/build/mwc-drawer.js b/material-yew/build/mwc-drawer.js deleted file mode 100644 index 5c0915c..0000000 --- a/material-yew/build/mwc-drawer.js +++ /dev/null @@ -1,17 +0,0 @@ -import{g as t,u as r,_ as e,i,m as a,e as d,B as o,v as n,p as s,w as c,y as m,o as l,d as p,f as h}from"./core.js";var g=function(r){function e(){return null!==r&&r.apply(this,arguments)||this}return t(e,r),e.prototype.handleScrimClick=function(){this.close()},e.prototype.opened=function(){this.adapter.trapFocus()},e.prototype.closed=function(){this.adapter.releaseFocus()},e}(r);const f=document.$blockingElements;class y extends o{constructor(){super(...arguments),this._previousFocus=null,this.open=!1,this.hasHeader=!1,this.type=""}get mdcFoundationClass(){return"modal"===this.type?g:n}createAdapter(){return Object.assign(Object.assign({},s(this.mdcRoot)),{elementHasClass:(t,r)=>t.classList.contains(r),saveFocus:()=>{this._previousFocus=this.getRootNode().activeElement},restoreFocus:()=>{this._previousFocus&&this._previousFocus.focus&&this._previousFocus.focus()},notifyClose:()=>{this.open=!1,this.dispatchEvent(new Event(c.CLOSE_EVENT,{bubbles:!0,cancelable:!0}))},notifyOpen:()=>{this.open=!0,this.dispatchEvent(new Event(c.OPEN_EVENT,{bubbles:!0,cancelable:!0}))},focusActiveNavigationItem:()=>{},trapFocus:()=>{f.push(this),this.appContent.inert=!0},releaseFocus:()=>{f.remove(this),this.appContent.inert=!1}})}_handleScrimClick(){this.mdcFoundation instanceof g&&this.mdcFoundation.handleScrimClick()}render(){const t="dismissible"===this.type||"modal"===this.type,r="modal"===this.type,e=this.hasHeader?m` -
-

-
- -
- `:"";return m` - - ${r?m`
`:""} -
- -
- `}firstUpdated(){this.mdcRoot.addEventListener("keydown",(t=>this.mdcFoundation.handleKeydown(t))),this.mdcRoot.addEventListener("transitionend",(t=>this.mdcFoundation.handleTransitionEnd(t)))}updated(t){t.has("type")&&this.createFoundation()}}e([i(".mdc-drawer")],y.prototype,"mdcRoot",void 0),e([i(".mdc-drawer-app-content")],y.prototype,"appContent",void 0),e([a((function(t){""!==this.type&&(t?this.mdcFoundation.open():this.mdcFoundation.close())})),d({type:Boolean,reflect:!0})],y.prototype,"open",void 0),e([d({type:Boolean})],y.prototype,"hasHeader",void 0),e([d({reflect:!0})],y.prototype,"type",void 0);const w=p`.mdc-drawer{border-color:rgba(0, 0, 0, 0.12);background-color:#fff;background-color:var(--mdc-theme-surface, #fff);border-top-left-radius:0;border-top-right-radius:0;border-top-right-radius:var(--mdc-shape-large, 0);border-bottom-right-radius:0;border-bottom-right-radius:var(--mdc-shape-large, 0);border-bottom-left-radius:0;z-index:6;width:256px;display:flex;flex-direction:column;flex-shrink:0;box-sizing:border-box;height:100%;border-right-width:1px;border-right-style:solid;overflow:hidden;transition-property:transform;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.mdc-drawer .mdc-drawer__title{color:rgba(0, 0, 0, 0.87)}.mdc-drawer .mdc-deprecated-list-group__subheader{color:rgba(0, 0, 0, 0.6)}.mdc-drawer .mdc-drawer__subtitle{color:rgba(0, 0, 0, 0.6)}.mdc-drawer .mdc-deprecated-list-item__graphic{color:rgba(0, 0, 0, 0.6)}.mdc-drawer .mdc-deprecated-list-item{color:rgba(0, 0, 0, 0.87)}.mdc-drawer .mdc-deprecated-list-item--activated .mdc-deprecated-list-item__graphic{color:#6200ee}.mdc-drawer .mdc-deprecated-list-item--activated{color:rgba(98, 0, 238, 0.87)}[dir=rtl] .mdc-drawer,.mdc-drawer[dir=rtl]{border-top-left-radius:0;border-top-left-radius:var(--mdc-shape-large, 0);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:0;border-bottom-left-radius:var(--mdc-shape-large, 0)}.mdc-drawer .mdc-deprecated-list-item{border-radius:4px;border-radius:var(--mdc-shape-small, 4px)}.mdc-drawer.mdc-drawer--open:not(.mdc-drawer--closing)+.mdc-drawer-app-content{margin-left:256px;margin-right:0}[dir=rtl] .mdc-drawer.mdc-drawer--open:not(.mdc-drawer--closing)+.mdc-drawer-app-content,.mdc-drawer.mdc-drawer--open:not(.mdc-drawer--closing)+.mdc-drawer-app-content[dir=rtl]{margin-left:0;margin-right:256px}[dir=rtl] .mdc-drawer,.mdc-drawer[dir=rtl]{border-right-width:0;border-left-width:1px;border-right-style:none;border-left-style:solid}.mdc-drawer .mdc-deprecated-list-item{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-subtitle2-font-size, 0.875rem);line-height:1.375rem;line-height:var(--mdc-typography-subtitle2-line-height, 1.375rem);font-weight:500;font-weight:var(--mdc-typography-subtitle2-font-weight, 500);letter-spacing:0.0071428571em;letter-spacing:var(--mdc-typography-subtitle2-letter-spacing, 0.0071428571em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle2-text-transform, inherit);height:calc(48px - 2 * 4px);margin:8px 8px;padding:0 8px}.mdc-drawer .mdc-deprecated-list-item:nth-child(1){margin-top:2px}.mdc-drawer .mdc-deprecated-list-item:nth-last-child(1){margin-bottom:0}.mdc-drawer .mdc-deprecated-list-group__subheader{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-body2-font-size, 0.875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:0.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, 0.0178571429em);text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform, inherit);display:block;margin-top:0;line-height:normal;margin:0;padding:0 16px}.mdc-drawer .mdc-deprecated-list-group__subheader::before{display:inline-block;width:0;height:24px;content:"";vertical-align:0}.mdc-drawer .mdc-deprecated-list-divider{margin:3px 0 4px}.mdc-drawer .mdc-deprecated-list-item__text,.mdc-drawer .mdc-deprecated-list-item__graphic{pointer-events:none}.mdc-drawer--animate{transform:translateX(-100%)}[dir=rtl] .mdc-drawer--animate,.mdc-drawer--animate[dir=rtl]{transform:translateX(100%)}.mdc-drawer--opening{transform:translateX(0);transition-duration:250ms}[dir=rtl] .mdc-drawer--opening,.mdc-drawer--opening[dir=rtl]{transform:translateX(0)}.mdc-drawer--closing{transform:translateX(-100%);transition-duration:200ms}[dir=rtl] .mdc-drawer--closing,.mdc-drawer--closing[dir=rtl]{transform:translateX(100%)}.mdc-drawer__header{flex-shrink:0;box-sizing:border-box;min-height:64px;padding:0 16px 4px}.mdc-drawer__title{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-headline6-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1.25rem;font-size:var(--mdc-typography-headline6-font-size, 1.25rem);line-height:2rem;line-height:var(--mdc-typography-headline6-line-height, 2rem);font-weight:500;font-weight:var(--mdc-typography-headline6-font-weight, 500);letter-spacing:0.0125em;letter-spacing:var(--mdc-typography-headline6-letter-spacing, 0.0125em);text-decoration:inherit;text-decoration:var(--mdc-typography-headline6-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-headline6-text-transform, inherit);display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-drawer__title::before{display:inline-block;width:0;height:36px;content:"";vertical-align:0}.mdc-drawer__title::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-drawer__subtitle{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-body2-font-size, 0.875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:0.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, 0.0178571429em);text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform, inherit);display:block;margin-top:0;line-height:normal;margin-bottom:0}.mdc-drawer__subtitle::before{display:inline-block;width:0;height:20px;content:"";vertical-align:0}.mdc-drawer__content{height:100%;overflow-y:auto;-webkit-overflow-scrolling:touch}.mdc-drawer--dismissible{left:0;right:initial;display:none;position:absolute}[dir=rtl] .mdc-drawer--dismissible,.mdc-drawer--dismissible[dir=rtl]{left:initial;right:0}.mdc-drawer--dismissible.mdc-drawer--open{display:flex}.mdc-drawer-app-content{margin-left:0;margin-right:0;position:relative}[dir=rtl] .mdc-drawer-app-content,.mdc-drawer-app-content[dir=rtl]{margin-left:0;margin-right:0}.mdc-drawer--modal{box-shadow:0px 8px 10px -5px rgba(0, 0, 0, 0.2),0px 16px 24px 2px rgba(0, 0, 0, 0.14),0px 6px 30px 5px rgba(0,0,0,.12);left:0;right:initial;display:none;position:fixed}.mdc-drawer--modal+.mdc-drawer-scrim{background-color:rgba(0, 0, 0, 0.32)}[dir=rtl] .mdc-drawer--modal,.mdc-drawer--modal[dir=rtl]{left:initial;right:0}.mdc-drawer--modal.mdc-drawer--open{display:flex}.mdc-drawer-scrim{display:none;position:fixed;top:0;left:0;width:100%;height:100%;z-index:5;transition-property:opacity;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.mdc-drawer--open+.mdc-drawer-scrim{display:block}.mdc-drawer--animate+.mdc-drawer-scrim{opacity:0}.mdc-drawer--opening+.mdc-drawer-scrim{transition-duration:250ms;opacity:1}.mdc-drawer--closing+.mdc-drawer-scrim{transition-duration:200ms;opacity:0}.mdc-drawer-app-content{overflow:auto;flex:1}:host{display:flex;height:100%}.mdc-drawer{width:256px;width:var(--mdc-drawer-width, 256px)}.mdc-drawer.mdc-drawer--open:not(.mdc-drawer--closing)+.mdc-drawer-app-content{margin-left:256px;margin-left:var(--mdc-drawer-width, 256px);margin-right:0}[dir=rtl] .mdc-drawer.mdc-drawer--open:not(.mdc-drawer--closing)+.mdc-drawer-app-content,.mdc-drawer.mdc-drawer--open:not(.mdc-drawer--closing)+.mdc-drawer-app-content[dir=rtl]{margin-left:0;margin-right:256px;margin-right:var(--mdc-drawer-width, 256px)}`;let b=class extends y{};b.styles=[w],b=e([h("mwc-drawer")],b);export{b as Drawer}; diff --git a/material-yew/build/mwc-fab.js b/material-yew/build/mwc-fab.js deleted file mode 100644 index 1a91d4c..0000000 --- a/material-yew/build/mwc-fab.js +++ /dev/null @@ -1,23 +0,0 @@ -import{_ as e,b as t,e as a,t as o,c as d,s as i,R as r,y as n,o as c,d as p,f as s}from"./core.js";class l extends i{constructor(){super(...arguments),this.mini=!1,this.exited=!1,this.disabled=!1,this.extended=!1,this.showIconAtEnd=!1,this.reducedTouchTarget=!1,this.icon="",this.label="",this.shouldRenderRipple=!1,this.useStateLayerCustomProperties=!1,this.rippleHandlers=new r((()=>(this.shouldRenderRipple=!0,this.ripple)))}render(){const e=this.mini&&!this.reducedTouchTarget,t={"mdc-fab--mini":this.mini,"mdc-fab--touch":e,"mdc-fab--exited":this.exited,"mdc-fab--extended":this.extended,"icon-end":this.showIconAtEnd},a=this.label?this.label:this.icon;return n``}renderIcon(){return n``}renderTouchTarget(){const e=this.mini&&!this.reducedTouchTarget;return n`${e?n`
`:""}`}renderLabel(){const e=""!==this.label&&this.extended;return n`${e?n`${this.label}`:""}`}renderBeforeRipple(){return n``}renderRipple(){return this.shouldRenderRipple?n``:""}handleRippleActivate(e){const t=()=>{window.removeEventListener("mouseup",t),this.handleRippleDeactivate()};window.addEventListener("mouseup",t),this.handleRippleStartPress(e)}handleRippleStartPress(e){this.rippleHandlers.startPress(e)}handleRippleDeactivate(){this.rippleHandlers.endPress()}handleRippleMouseEnter(){this.rippleHandlers.startHover()}handleRippleMouseLeave(){this.rippleHandlers.endHover()}handleRippleFocus(){this.rippleHandlers.startFocus()}handleRippleBlur(){this.rippleHandlers.endFocus()}}l.shadowRootOptions={mode:"open",delegatesFocus:!0},e([t("mwc-ripple")],l.prototype,"ripple",void 0),e([a({type:Boolean})],l.prototype,"mini",void 0),e([a({type:Boolean})],l.prototype,"exited",void 0),e([a({type:Boolean})],l.prototype,"disabled",void 0),e([a({type:Boolean})],l.prototype,"extended",void 0),e([a({type:Boolean})],l.prototype,"showIconAtEnd",void 0),e([a({type:Boolean})],l.prototype,"reducedTouchTarget",void 0),e([a()],l.prototype,"icon",void 0),e([a()],l.prototype,"label",void 0),e([o()],l.prototype,"shouldRenderRipple",void 0),e([o()],l.prototype,"useStateLayerCustomProperties",void 0),e([d({passive:!0})],l.prototype,"handleRippleStartPress",null);const b=p`:host .mdc-fab .material-icons{font-family:var(--mdc-icon-font, "Material Icons");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}:host{outline:none;--mdc-ripple-color: currentcolor;user-select:none;-webkit-tap-highlight-color:transparent;display:inline-flex;-webkit-tap-highlight-color:transparent;display:inline-flex;outline:none;user-select:none}:host .mdc-touch-target-wrapper{display:inline}:host .mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:0;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1);background-color:#fff;background-color:var(--mdc-elevation-overlay-color, #fff)}:host .mdc-fab{position:relative;display:inline-flex;position:relative;align-items:center;justify-content:center;box-sizing:border-box;width:56px;height:56px;padding:0;border:none;fill:currentColor;text-decoration:none;cursor:pointer;user-select:none;-moz-appearance:none;-webkit-appearance:none;overflow:visible;transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1),opacity 15ms linear 30ms,transform 270ms 0ms cubic-bezier(0, 0, 0.2, 1)}:host .mdc-fab .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}:host .mdc-fab::-moz-focus-inner{padding:0;border:0}:host .mdc-fab:hover{box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2),0px 8px 10px 1px rgba(0, 0, 0, 0.14),0px 3px 14px 2px rgba(0,0,0,.12)}:host .mdc-fab.mdc-ripple-upgraded--background-focused,:host .mdc-fab:not(.mdc-ripple-upgraded):focus{box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2),0px 8px 10px 1px rgba(0, 0, 0, 0.14),0px 3px 14px 2px rgba(0,0,0,.12)}:host .mdc-fab .mdc-fab__focus-ring{position:absolute}:host .mdc-fab.mdc-ripple-upgraded--background-focused .mdc-fab__focus-ring,:host .mdc-fab:not(.mdc-ripple-upgraded):focus .mdc-fab__focus-ring{pointer-events:none;border:2px solid transparent;border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc( 100% + 4px );width:calc( 100% + 4px )}@media screen and (forced-colors: active){:host .mdc-fab.mdc-ripple-upgraded--background-focused .mdc-fab__focus-ring,:host .mdc-fab:not(.mdc-ripple-upgraded):focus .mdc-fab__focus-ring{border-color:CanvasText}}:host .mdc-fab.mdc-ripple-upgraded--background-focused .mdc-fab__focus-ring::after,:host .mdc-fab:not(.mdc-ripple-upgraded):focus .mdc-fab__focus-ring::after{content:"";border:2px solid transparent;border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){:host .mdc-fab.mdc-ripple-upgraded--background-focused .mdc-fab__focus-ring::after,:host .mdc-fab:not(.mdc-ripple-upgraded):focus .mdc-fab__focus-ring::after{border-color:CanvasText}}:host .mdc-fab:active,:host .mdc-fab:focus:active{box-shadow:0px 7px 8px -4px rgba(0, 0, 0, 0.2),0px 12px 17px 2px rgba(0, 0, 0, 0.14),0px 5px 22px 4px rgba(0,0,0,.12)}:host .mdc-fab:active,:host .mdc-fab:focus{outline:none}:host .mdc-fab:hover{cursor:pointer}:host .mdc-fab>svg{width:100%}:host .mdc-fab--mini{width:40px;height:40px}:host .mdc-fab--extended{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-button-font-size, 0.875rem);line-height:2.25rem;line-height:var(--mdc-typography-button-line-height, 2.25rem);font-weight:500;font-weight:var(--mdc-typography-button-font-weight, 500);letter-spacing:0.0892857143em;letter-spacing:var(--mdc-typography-button-letter-spacing, 0.0892857143em);text-decoration:none;text-decoration:var(--mdc-typography-button-text-decoration, none);text-transform:uppercase;text-transform:var(--mdc-typography-button-text-transform, uppercase);border-radius:24px;padding-left:20px;padding-right:20px;width:auto;max-width:100%;height:48px;line-height:normal}:host .mdc-fab--extended .mdc-fab__ripple{border-radius:24px}:host .mdc-fab--extended .mdc-fab__icon{margin-left:calc(12px - 20px);margin-right:12px}[dir=rtl] :host .mdc-fab--extended .mdc-fab__icon,:host .mdc-fab--extended .mdc-fab__icon[dir=rtl]{margin-left:12px;margin-right:calc(12px - 20px)}:host .mdc-fab--extended .mdc-fab__label+.mdc-fab__icon{margin-left:12px;margin-right:calc(12px - 20px)}[dir=rtl] :host .mdc-fab--extended .mdc-fab__label+.mdc-fab__icon,:host .mdc-fab--extended .mdc-fab__label+.mdc-fab__icon[dir=rtl]{margin-left:calc(12px - 20px);margin-right:12px}:host .mdc-fab--touch{margin-top:4px;margin-bottom:4px;margin-right:4px;margin-left:4px}:host .mdc-fab--touch .mdc-fab__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}:host .mdc-fab::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid transparent;border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){:host .mdc-fab::before{border-color:CanvasText}}:host .mdc-fab__label{justify-content:flex-start;text-overflow:ellipsis;white-space:nowrap;overflow-x:hidden;overflow-y:visible}:host .mdc-fab__icon{transition:transform 180ms 90ms cubic-bezier(0, 0, 0.2, 1);fill:currentColor;will-change:transform}:host .mdc-fab .mdc-fab__icon{display:inline-flex;align-items:center;justify-content:center}:host .mdc-fab--exited{transform:scale(0);opacity:0;transition:opacity 15ms linear 150ms,transform 180ms 0ms cubic-bezier(0.4, 0, 1, 1)}:host .mdc-fab--exited .mdc-fab__icon{transform:scale(0);transition:transform 135ms 0ms cubic-bezier(0.4, 0, 1, 1)}:host .mdc-fab{background-color:#018786;background-color:var(--mdc-theme-secondary, #018786);box-shadow:0px 3px 5px -1px rgba(0, 0, 0, 0.2),0px 6px 10px 0px rgba(0, 0, 0, 0.14),0px 1px 18px 0px rgba(0,0,0,.12)}:host .mdc-fab .mdc-fab__icon{width:24px;height:24px;font-size:24px}:host .mdc-fab,:host .mdc-fab:not(:disabled) .mdc-fab__icon,:host .mdc-fab:not(:disabled) .mdc-fab__label,:host .mdc-fab:disabled .mdc-fab__icon,:host .mdc-fab:disabled .mdc-fab__label{color:#fff;color:var(--mdc-theme-on-secondary, #fff)}:host .mdc-fab:not(.mdc-fab--extended){border-radius:50%}:host .mdc-fab:not(.mdc-fab--extended) .mdc-fab__ripple{border-radius:50%}:host .mdc-fab{position:relative;display:inline-flex;position:relative;align-items:center;justify-content:center;box-sizing:border-box;width:56px;height:56px;padding:0;border:none;fill:currentColor;text-decoration:none;cursor:pointer;user-select:none;-moz-appearance:none;-webkit-appearance:none;overflow:visible;transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1),opacity 15ms linear 30ms,transform 270ms 0ms cubic-bezier(0, 0, 0.2, 1)}:host .mdc-fab .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}:host .mdc-fab::-moz-focus-inner{padding:0;border:0}:host .mdc-fab:hover{box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2),0px 8px 10px 1px rgba(0, 0, 0, 0.14),0px 3px 14px 2px rgba(0,0,0,.12)}:host .mdc-fab.mdc-ripple-upgraded--background-focused,:host .mdc-fab:not(.mdc-ripple-upgraded):focus{box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2),0px 8px 10px 1px rgba(0, 0, 0, 0.14),0px 3px 14px 2px rgba(0,0,0,.12)}:host .mdc-fab .mdc-fab__focus-ring{position:absolute}:host .mdc-fab.mdc-ripple-upgraded--background-focused .mdc-fab__focus-ring,:host .mdc-fab:not(.mdc-ripple-upgraded):focus .mdc-fab__focus-ring{pointer-events:none;border:2px solid transparent;border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc( 100% + 4px );width:calc( 100% + 4px )}@media screen and (forced-colors: active){:host .mdc-fab.mdc-ripple-upgraded--background-focused .mdc-fab__focus-ring,:host .mdc-fab:not(.mdc-ripple-upgraded):focus .mdc-fab__focus-ring{border-color:CanvasText}}:host .mdc-fab.mdc-ripple-upgraded--background-focused .mdc-fab__focus-ring::after,:host .mdc-fab:not(.mdc-ripple-upgraded):focus .mdc-fab__focus-ring::after{content:"";border:2px solid transparent;border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){:host .mdc-fab.mdc-ripple-upgraded--background-focused .mdc-fab__focus-ring::after,:host .mdc-fab:not(.mdc-ripple-upgraded):focus .mdc-fab__focus-ring::after{border-color:CanvasText}}:host .mdc-fab:active,:host .mdc-fab:focus:active{box-shadow:0px 7px 8px -4px rgba(0, 0, 0, 0.2),0px 12px 17px 2px rgba(0, 0, 0, 0.14),0px 5px 22px 4px rgba(0,0,0,.12)}:host .mdc-fab:active,:host .mdc-fab:focus{outline:none}:host .mdc-fab:hover{cursor:pointer}:host .mdc-fab>svg{width:100%}:host .mdc-fab--mini{width:40px;height:40px}:host .mdc-fab--extended{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-button-font-size, 0.875rem);line-height:2.25rem;line-height:var(--mdc-typography-button-line-height, 2.25rem);font-weight:500;font-weight:var(--mdc-typography-button-font-weight, 500);letter-spacing:0.0892857143em;letter-spacing:var(--mdc-typography-button-letter-spacing, 0.0892857143em);text-decoration:none;text-decoration:var(--mdc-typography-button-text-decoration, none);text-transform:uppercase;text-transform:var(--mdc-typography-button-text-transform, uppercase);border-radius:24px;padding-left:20px;padding-right:20px;width:auto;max-width:100%;height:48px;line-height:normal}:host .mdc-fab--extended .mdc-fab__ripple{border-radius:24px}:host .mdc-fab--extended .mdc-fab__icon{margin-left:calc(12px - 20px);margin-right:12px}[dir=rtl] :host .mdc-fab--extended .mdc-fab__icon,:host .mdc-fab--extended .mdc-fab__icon[dir=rtl]{margin-left:12px;margin-right:calc(12px - 20px)}:host .mdc-fab--extended .mdc-fab__label+.mdc-fab__icon{margin-left:12px;margin-right:calc(12px - 20px)}[dir=rtl] :host .mdc-fab--extended .mdc-fab__label+.mdc-fab__icon,:host .mdc-fab--extended .mdc-fab__label+.mdc-fab__icon[dir=rtl]{margin-left:calc(12px - 20px);margin-right:12px}:host .mdc-fab--touch{margin-top:4px;margin-bottom:4px;margin-right:4px;margin-left:4px}:host .mdc-fab--touch .mdc-fab__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}:host .mdc-fab::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid transparent;border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){:host .mdc-fab::before{border-color:CanvasText}}:host .mdc-fab__label{justify-content:flex-start;text-overflow:ellipsis;white-space:nowrap;overflow-x:hidden;overflow-y:visible}:host .mdc-fab__icon{transition:transform 180ms 90ms cubic-bezier(0, 0, 0.2, 1);fill:currentColor;will-change:transform}:host .mdc-fab .mdc-fab__icon{display:inline-flex;align-items:center;justify-content:center}:host .mdc-fab--exited{transform:scale(0);opacity:0;transition:opacity 15ms linear 150ms,transform 180ms 0ms cubic-bezier(0.4, 0, 1, 1)}:host .mdc-fab--exited .mdc-fab__icon{transform:scale(0);transition:transform 135ms 0ms cubic-bezier(0.4, 0, 1, 1)}:host .mdc-fab .ripple{overflow:hidden}:host .mdc-fab:not(.mdc-fab--extended) .ripple{border-radius:50%}:host .mdc-fab.mdc-fab--extended .ripple{border-radius:24px}:host .mdc-fab .mdc-fab__label{z-index:0}:host .mdc-fab .mdc-fab__icon ::slotted(*){width:inherit;height:inherit;font-size:inherit}:host .mdc-fab--extended.mdc-fab--exited .mdc-fab__icon ::slotted(*){transform:scale(0);transition:transform 135ms 0ms cubic-bezier(0.4, 0, 1, 1)}:host .mdc-fab{padding-top:0px;padding-top:max(0px, var(--mdc-fab-focus-outline-width, 0px));padding-right:0px;padding-right:max(0px, var(--mdc-fab-focus-outline-width, 0px));padding-bottom:0px;padding-bottom:max(0px, var(--mdc-fab-focus-outline-width, 0px));padding-left:0px;padding-left:max(0px, var(--mdc-fab-focus-outline-width, 0px));box-shadow:0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12);box-shadow:var(--mdc-fab-box-shadow, 0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12))}:host .mdc-fab:not(:disabled).mdc-ripple-upgraded--background-focused,:host .mdc-fab:not(:disabled):not(.mdc-ripple-upgraded):focus{border-color:initial;border-color:var(--mdc-fab-focus-outline-color, initial)}:host .mdc-fab:not(:disabled).mdc-ripple-upgraded--background-focused,:host .mdc-fab:not(:disabled):not(.mdc-ripple-upgraded):focus{border-style:solid;border-width:var(--mdc-fab-focus-outline-width, 0px);padding-top:0px;padding-top:max(calc(0px - var(--mdc-fab-focus-outline-width, 0px)), calc(calc(0px - var(--mdc-fab-focus-outline-width, 0px)) * -1));padding-right:0px;padding-right:max(calc(0px - var(--mdc-fab-focus-outline-width, 0px)), calc(calc(0px - var(--mdc-fab-focus-outline-width, 0px)) * -1));padding-bottom:0px;padding-bottom:max(calc(0px - var(--mdc-fab-focus-outline-width, 0px)), calc(calc(0px - var(--mdc-fab-focus-outline-width, 0px)) * -1));padding-left:0px;padding-left:max(calc(0px - var(--mdc-fab-focus-outline-width, 0px)), calc(calc(0px - var(--mdc-fab-focus-outline-width, 0px)) * -1))}:host .mdc-fab:hover,:host .mdc-fab:focus{box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12);box-shadow:var(--mdc-fab-box-shadow, 0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12))}:host .mdc-fab:active{box-shadow:0px 7px 8px -4px rgba(0, 0, 0, 0.2), 0px 12px 17px 2px rgba(0, 0, 0, 0.14), 0px 5px 22px 4px rgba(0, 0, 0, 0.12);box-shadow:var(--mdc-fab-box-shadow, 0px 7px 8px -4px rgba(0, 0, 0, 0.2), 0px 12px 17px 2px rgba(0, 0, 0, 0.14), 0px 5px 22px 4px rgba(0, 0, 0, 0.12))}:host .mdc-fab .ripple{overflow:hidden}:host .mdc-fab .mdc-fab__label{z-index:0}:host .mdc-fab:not(.mdc-fab--extended) .ripple{border-radius:50%}:host .mdc-fab.mdc-fab--extended .ripple{border-radius:24px}:host .mdc-fab .mdc-fab__icon{width:24px;width:var(--mdc-icon-size, 24px);height:24px;height:var(--mdc-icon-size, 24px);font-size:24px;font-size:var(--mdc-icon-size, 24px);transition:transform 180ms 90ms cubic-bezier(0, 0, 0.2, 1);fill:currentColor;will-change:transform;display:inline-flex;align-items:center;justify-content:center}:host .mdc-fab.mdc-fab--extended{padding-top:0px;padding-top:max(0px, var(--mdc-fab-focus-outline-width, 0px));padding-right:20px;padding-right:max(var(--mdc-fab-extended-label-padding, 20px), var(--mdc-fab-focus-outline-width, 0px));padding-bottom:0px;padding-bottom:max(0px, var(--mdc-fab-focus-outline-width, 0px));padding-left:20px;padding-left:max(var(--mdc-fab-extended-label-padding, 20px), var(--mdc-fab-focus-outline-width, 0px))}:host .mdc-fab.mdc-fab--extended:not(:disabled).mdc-ripple-upgraded--background-focused,:host .mdc-fab.mdc-fab--extended:not(:disabled):not(.mdc-ripple-upgraded):focus{border-style:solid;border-width:var(--mdc-fab-focus-outline-width, 0px);padding-top:0px;padding-top:max(calc(0px - var(--mdc-fab-focus-outline-width, 0px)), calc(calc(0px - var(--mdc-fab-focus-outline-width, 0px)) * -1));padding-right:20px;padding-right:max(calc(var(--mdc-fab-extended-label-padding, 20px) - var(--mdc-fab-focus-outline-width, 0px)), calc(calc(var(--mdc-fab-extended-label-padding, 20px) - var(--mdc-fab-focus-outline-width, 0px)) * -1));padding-bottom:0px;padding-bottom:max(calc(0px - var(--mdc-fab-focus-outline-width, 0px)), calc(calc(0px - var(--mdc-fab-focus-outline-width, 0px)) * -1));padding-left:20px;padding-left:max(calc(var(--mdc-fab-extended-label-padding, 20px) - var(--mdc-fab-focus-outline-width, 0px)), calc(calc(var(--mdc-fab-extended-label-padding, 20px) - var(--mdc-fab-focus-outline-width, 0px)) * -1))}:host .mdc-fab.mdc-fab--extended.icon-end .mdc-fab__icon{margin-left:12px;margin-left:var(--mdc-fab-extended-icon-padding, 12px);margin-right:calc(12px - 20px);margin-right:calc(var(--mdc-fab-extended-icon-padding, 12px) - var(--mdc-fab-extended-label-padding, 20px))}[dir=rtl] :host .mdc-fab.mdc-fab--extended.icon-end .mdc-fab__icon,:host .mdc-fab.mdc-fab--extended.icon-end .mdc-fab__icon[dir=rtl]{margin-left:calc(12px - 20px);margin-left:calc(var(--mdc-fab-extended-icon-padding, 12px) - var(--mdc-fab-extended-label-padding, 20px));margin-right:12px;margin-right:var(--mdc-fab-extended-icon-padding, 12px)}`;let f=class extends l{};f.styles=[b],f=e([s("mwc-fab")],f);export{f as Fab}; diff --git a/material-yew/build/mwc-formfield.js b/material-yew/build/mwc-formfield.js deleted file mode 100644 index 63444d6..0000000 --- a/material-yew/build/mwc-formfield.js +++ /dev/null @@ -1,6 +0,0 @@ -import{g as t,h as e,M as i,_ as r,x as a,e as n,m as o,i as l,B as d,F as c,y as s,o as p,d as f,f as m}from"./core.js";var g={ROOT:"mdc-form-field"},h={LABEL_SELECTOR:".mdc-form-field > label"},y=function(i){function r(t){var a=i.call(this,e(e({},r.defaultAdapter),t))||this;return a.click=function(){a.handleClick()},a}return t(r,i),Object.defineProperty(r,"cssClasses",{get:function(){return g},enumerable:!1,configurable:!0}),Object.defineProperty(r,"strings",{get:function(){return h},enumerable:!1,configurable:!0}),Object.defineProperty(r,"defaultAdapter",{get:function(){return{activateInputRipple:function(){},deactivateInputRipple:function(){},deregisterInteractionHandler:function(){},registerInteractionHandler:function(){}}},enumerable:!1,configurable:!0}),r.prototype.init=function(){this.adapter.registerInteractionHandler("click",this.click)},r.prototype.destroy=function(){this.adapter.deregisterInteractionHandler("click",this.click)},r.prototype.handleClick=function(){var t=this;this.adapter.activateInputRipple(),requestAnimationFrame((function(){t.adapter.deactivateInputRipple()}))},r}(i);class b extends d{constructor(){super(...arguments),this.alignEnd=!1,this.spaceBetween=!1,this.nowrap=!1,this.label="",this.mdcFoundationClass=y}createAdapter(){return{registerInteractionHandler:(t,e)=>{this.labelEl.addEventListener(t,e)},deregisterInteractionHandler:(t,e)=>{this.labelEl.removeEventListener(t,e)},activateInputRipple:async()=>{const t=this.input;if(t instanceof c){const e=await t.ripple;e&&e.startPress()}},deactivateInputRipple:async()=>{const t=this.input;if(t instanceof c){const e=await t.ripple;e&&e.endPress()}}}}get input(){var t,e;return null!==(e=null===(t=this.slottedInputs)||void 0===t?void 0:t[0])&&void 0!==e?e:null}render(){const t={"mdc-form-field--align-end":this.alignEnd,"mdc-form-field--space-between":this.spaceBetween,"mdc-form-field--nowrap":this.nowrap};return s` -
- - -
`}click(){this._labelClick()}_labelClick(){const t=this.input;t&&(t.focus(),t.click())}}r([n({type:Boolean})],b.prototype,"alignEnd",void 0),r([n({type:Boolean})],b.prototype,"spaceBetween",void 0),r([n({type:Boolean})],b.prototype,"nowrap",void 0),r([n({type:String}),o((async function(t){var e;null===(e=this.input)||void 0===e||e.setAttribute("aria-label",t)}))],b.prototype,"label",void 0),r([l(".mdc-form-field")],b.prototype,"mdcRoot",void 0),r([a("",!0,"*")],b.prototype,"slottedInputs",void 0),r([l("label")],b.prototype,"labelEl",void 0);const u=f`.mdc-form-field{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-body2-font-size, 0.875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:0.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, 0.0178571429em);text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform, inherit);color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87));display:inline-flex;align-items:center;vertical-align:middle}.mdc-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{margin-left:auto;margin-right:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{padding-left:0;padding-right:4px}.mdc-form-field--nowrap>label{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{margin-left:0;margin-right:auto}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{padding-left:4px;padding-right:0}.mdc-form-field--space-between{justify-content:space-between}.mdc-form-field--space-between>label{margin:0}[dir=rtl] .mdc-form-field--space-between>label,.mdc-form-field--space-between>label[dir=rtl]{margin:0}:host{display:inline-flex}.mdc-form-field{width:100%}::slotted(*){-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-body2-font-size, 0.875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:0.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, 0.0178571429em);text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform, inherit);color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87))}::slotted(mwc-switch){margin-right:10px}[dir=rtl] ::slotted(mwc-switch),::slotted(mwc-switch[dir=rtl]){margin-left:10px}`;let v=class extends b{};v.styles=[u],v=r([m("mwc-formfield")],v);export{v as Formfield}; diff --git a/material-yew/build/mwc-icon-button-toggle.js b/material-yew/build/mwc-icon-button-toggle.js deleted file mode 100644 index 67102f8..0000000 --- a/material-yew/build/mwc-icon-button-toggle.js +++ /dev/null @@ -1,30 +0,0 @@ -import{_ as e,t,i,a as o,e as s,b as n,c as l,s as a,R as p,y as r,o as d,l as c,z as h,f as u}from"./core.js";class b extends a{constructor(){super(...arguments),this.disabled=!1,this.onIcon="",this.offIcon="",this.on=!1,this.shouldRenderRipple=!1,this.rippleHandlers=new p((()=>(this.shouldRenderRipple=!0,this.ripple)))}handleClick(){this.on=!this.on,this.dispatchEvent(new CustomEvent("icon-button-toggle-change",{detail:{isOn:this.on},bubbles:!0}))}click(){this.mdcRoot.focus(),this.mdcRoot.click()}focus(){this.rippleHandlers.startFocus(),this.mdcRoot.focus()}blur(){this.rippleHandlers.endFocus(),this.mdcRoot.blur()}renderRipple(){return this.shouldRenderRipple?r` - - `:""}render(){const e={"mdc-icon-button--on":this.on},t=void 0!==this.ariaLabelOn&&void 0!==this.ariaLabelOff,i=t?void 0:this.on,o=t?this.on?this.ariaLabelOn:this.ariaLabelOff:this.ariaLabel;return r``}handleRippleMouseDown(e){const t=()=>{window.removeEventListener("mouseup",t),this.handleRippleDeactivate()};window.addEventListener("mouseup",t),this.rippleHandlers.startPress(e)}handleRippleTouchStart(e){this.rippleHandlers.startPress(e)}handleRippleDeactivate(){this.rippleHandlers.endPress()}handleRippleMouseEnter(){this.rippleHandlers.startHover()}handleRippleMouseLeave(){this.rippleHandlers.endHover()}handleRippleFocus(){this.rippleHandlers.startFocus()}handleRippleBlur(){this.rippleHandlers.endFocus()}}e([i(".mdc-icon-button")],b.prototype,"mdcRoot",void 0),e([o,s({type:String,attribute:"aria-label"})],b.prototype,"ariaLabel",void 0),e([s({type:Boolean,reflect:!0})],b.prototype,"disabled",void 0),e([s({type:String})],b.prototype,"onIcon",void 0),e([s({type:String})],b.prototype,"offIcon",void 0),e([s({type:String})],b.prototype,"ariaLabelOn",void 0),e([s({type:String})],b.prototype,"ariaLabelOff",void 0),e([s({type:Boolean,reflect:!0})],b.prototype,"on",void 0),e([n("mwc-ripple")],b.prototype,"ripple",void 0),e([t()],b.prototype,"shouldRenderRipple",void 0),e([l({passive:!0})],b.prototype,"handleRippleMouseDown",null),e([l({passive:!0})],b.prototype,"handleRippleTouchStart",null);let R=class extends b{};R.styles=[h],R=e([u("mwc-icon-button-toggle")],R);export{R as IconButtonToggle}; diff --git a/material-yew/build/mwc-icon-button.js b/material-yew/build/mwc-icon-button.js deleted file mode 100644 index b050dd9..0000000 --- a/material-yew/build/mwc-icon-button.js +++ /dev/null @@ -1,23 +0,0 @@ -import{_ as e,t,e as s,a as i,i as p,b as l,c as a,s as o,R as r,y as n,l as d,z as h,f as u}from"./core.js";class c extends o{constructor(){super(...arguments),this.disabled=!1,this.icon="",this.shouldRenderRipple=!1,this.rippleHandlers=new r((()=>(this.shouldRenderRipple=!0,this.ripple)))}renderRipple(){return this.shouldRenderRipple?n` - - `:""}focus(){const e=this.buttonElement;e&&(this.rippleHandlers.startFocus(),e.focus())}blur(){const e=this.buttonElement;e&&(this.rippleHandlers.endFocus(),e.blur())}render(){return n``}handleRippleMouseDown(e){const t=()=>{window.removeEventListener("mouseup",t),this.handleRippleDeactivate()};window.addEventListener("mouseup",t),this.rippleHandlers.startPress(e)}handleRippleTouchStart(e){this.rippleHandlers.startPress(e)}handleRippleDeactivate(){this.rippleHandlers.endPress()}handleRippleMouseEnter(){this.rippleHandlers.startHover()}handleRippleMouseLeave(){this.rippleHandlers.endHover()}handleRippleFocus(){this.rippleHandlers.startFocus()}handleRippleBlur(){this.rippleHandlers.endFocus()}}e([s({type:Boolean,reflect:!0})],c.prototype,"disabled",void 0),e([s({type:String})],c.prototype,"icon",void 0),e([i,s({type:String,attribute:"aria-label"})],c.prototype,"ariaLabel",void 0),e([i,s({type:String,attribute:"aria-haspopup"})],c.prototype,"ariaHasPopup",void 0),e([p("button")],c.prototype,"buttonElement",void 0),e([l("mwc-ripple")],c.prototype,"ripple",void 0),e([t()],c.prototype,"shouldRenderRipple",void 0),e([a({passive:!0})],c.prototype,"handleRippleMouseDown",null),e([a({passive:!0})],c.prototype,"handleRippleTouchStart",null);let R=class extends c{};R.styles=[h],R=e([u("mwc-icon-button")],R);export{R as IconButton}; diff --git a/material-yew/build/mwc-icon.js b/material-yew/build/mwc-icon.js deleted file mode 100644 index 0bb8914..0000000 --- a/material-yew/build/mwc-icon.js +++ /dev/null @@ -1 +0,0 @@ -export{ar as Icon}from"./core.js"; diff --git a/material-yew/build/mwc-linear-progress.js b/material-yew/build/mwc-linear-progress.js deleted file mode 100644 index f6ff723..0000000 --- a/material-yew/build/mwc-linear-progress.js +++ /dev/null @@ -1,27 +0,0 @@ -import{_ as r,t as e,i as a,e as i,a as s,s as n,y as t,o,D as l,l as d,d as m,f as c}from"./core.js";class p extends n{constructor(){super(...arguments),this.indeterminate=!1,this.progress=0,this.buffer=1,this.reverse=!1,this.closed=!1,this.stylePrimaryHalf="",this.stylePrimaryFull="",this.styleSecondaryQuarter="",this.styleSecondaryHalf="",this.styleSecondaryFull="",this.animationReady=!0,this.closedAnimationOff=!1,this.resizeObserver=null}connectedCallback(){super.connectedCallback(),this.rootEl&&this.attachResizeObserver()}render(){const r={"mdc-linear-progress--closed":this.closed,"mdc-linear-progress--closed-animation-off":this.closedAnimationOff,"mdc-linear-progress--indeterminate":this.indeterminate,"mdc-linear-progress--animation-ready":this.animationReady},e={"--mdc-linear-progress-primary-half":this.stylePrimaryHalf,"--mdc-linear-progress-primary-half-neg":""!==this.stylePrimaryHalf?`-${this.stylePrimaryHalf}`:"","--mdc-linear-progress-primary-full":this.stylePrimaryFull,"--mdc-linear-progress-primary-full-neg":""!==this.stylePrimaryFull?`-${this.stylePrimaryFull}`:"","--mdc-linear-progress-secondary-quarter":this.styleSecondaryQuarter,"--mdc-linear-progress-secondary-quarter-neg":""!==this.styleSecondaryQuarter?`-${this.styleSecondaryQuarter}`:"","--mdc-linear-progress-secondary-half":this.styleSecondaryHalf,"--mdc-linear-progress-secondary-half-neg":""!==this.styleSecondaryHalf?`-${this.styleSecondaryHalf}`:"","--mdc-linear-progress-secondary-full":this.styleSecondaryFull,"--mdc-linear-progress-secondary-full-neg":""!==this.styleSecondaryFull?`-${this.styleSecondaryFull}`:""},a={"flex-basis":this.indeterminate?"100%":100*this.buffer+"%"},i={transform:this.indeterminate?"scaleX(1)":`scaleX(${this.progress})`};return t` -
-
-
-
-
-
-
- -
-
- -
-
`}update(r){!r.has("closed")||this.closed&&void 0!==r.get("closed")||this.syncClosedState(),super.update(r)}async firstUpdated(r){super.firstUpdated(r),this.attachResizeObserver()}syncClosedState(){this.closedAnimationOff=this.closed}updated(r){!r.has("indeterminate")&&r.has("reverse")&&this.indeterminate&&this.restartAnimation(),r.has("indeterminate")&&void 0!==r.get("indeterminate")&&this.indeterminate&&window.ResizeObserver&&this.calculateAndSetAnimationDimensions(this.rootEl.offsetWidth),super.updated(r)}disconnectedCallback(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),super.disconnectedCallback()}attachResizeObserver(){if(window.ResizeObserver)return this.resizeObserver=new window.ResizeObserver((r=>{if(this.indeterminate)for(const e of r)if(e.contentRect){const r=e.contentRect.width;this.calculateAndSetAnimationDimensions(r)}})),void this.resizeObserver.observe(this.rootEl);this.resizeObserver=null}calculateAndSetAnimationDimensions(r){const e=.8367142*r,a=2.00611057*r,i=.37651913*r,s=.84386165*r,n=1.60277782*r;this.stylePrimaryHalf=`${e}px`,this.stylePrimaryFull=`${a}px`,this.styleSecondaryQuarter=`${i}px`,this.styleSecondaryHalf=`${s}px`,this.styleSecondaryFull=`${n}px`,this.restartAnimation()}async restartAnimation(){this.animationReady=!1,await this.updateComplete,await new Promise(requestAnimationFrame),this.animationReady=!0,await this.updateComplete}open(){this.closed=!1}close(){this.closed=!0}}r([a(".mdc-linear-progress")],p.prototype,"rootEl",void 0),r([i({type:Boolean,reflect:!0})],p.prototype,"indeterminate",void 0),r([i({type:Number})],p.prototype,"progress",void 0),r([i({type:Number})],p.prototype,"buffer",void 0),r([i({type:Boolean,reflect:!0})],p.prototype,"reverse",void 0),r([i({type:Boolean,reflect:!0})],p.prototype,"closed",void 0),r([s,i({attribute:"aria-label"})],p.prototype,"ariaLabel",void 0),r([e()],p.prototype,"stylePrimaryHalf",void 0),r([e()],p.prototype,"stylePrimaryFull",void 0),r([e()],p.prototype,"styleSecondaryQuarter",void 0),r([e()],p.prototype,"styleSecondaryHalf",void 0),r([e()],p.prototype,"styleSecondaryFull",void 0),r([e()],p.prototype,"animationReady",void 0),r([e()],p.prototype,"closedAnimationOff",void 0);const g=m`@keyframes mdc-linear-progress-primary-indeterminate-translate{0%{transform:translateX(0)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(83.67142%);transform:translateX(var(--mdc-linear-progress-primary-half, 83.67142%))}100%{transform:translateX(200.611057%);transform:translateX(var(--mdc-linear-progress-primary-full, 200.611057%))}}@keyframes mdc-linear-progress-primary-indeterminate-scale{0%{transform:scaleX(0.08)}36.65%{animation-timing-function:cubic-bezier(0.334731, 0.12482, 0.785844, 1);transform:scaleX(0.08)}69.15%{animation-timing-function:cubic-bezier(0.06, 0.11, 0.6, 1);transform:scaleX(0.661479)}100%{transform:scaleX(0.08)}}@keyframes mdc-linear-progress-secondary-indeterminate-translate{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(37.651913%);transform:translateX(var(--mdc-linear-progress-secondary-quarter, 37.651913%))}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(84.386165%);transform:translateX(var(--mdc-linear-progress-secondary-half, 84.386165%))}100%{transform:translateX(160.277782%);transform:translateX(var(--mdc-linear-progress-secondary-full, 160.277782%))}}@keyframes mdc-linear-progress-secondary-indeterminate-scale{0%{animation-timing-function:cubic-bezier(0.205028, 0.057051, 0.57661, 0.453971);transform:scaleX(0.08)}19.15%{animation-timing-function:cubic-bezier(0.152313, 0.196432, 0.648374, 1.004315);transform:scaleX(0.457104)}44.15%{animation-timing-function:cubic-bezier(0.257759, -0.003163, 0.211762, 1.38179);transform:scaleX(0.72796)}100%{transform:scaleX(0.08)}}@keyframes mdc-linear-progress-buffering{from{transform:rotate(180deg) translateX(-10px)}}@keyframes mdc-linear-progress-primary-indeterminate-translate-reverse{0%{transform:translateX(0)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(-83.67142%);transform:translateX(var(--mdc-linear-progress-primary-half-neg, -83.67142%))}100%{transform:translateX(-200.611057%);transform:translateX(var(--mdc-linear-progress-primary-full-neg, -200.611057%))}}@keyframes mdc-linear-progress-secondary-indeterminate-translate-reverse{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(-37.651913%);transform:translateX(var(--mdc-linear-progress-secondary-quarter-neg, -37.651913%))}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(-84.386165%);transform:translateX(var(--mdc-linear-progress-secondary-half-neg, -84.386165%))}100%{transform:translateX(-160.277782%);transform:translateX(var(--mdc-linear-progress-secondary-full-neg, -160.277782%))}}@keyframes mdc-linear-progress-buffering-reverse{from{transform:translateX(-10px)}}.mdc-linear-progress{position:relative;width:100%;transform:translateZ(0);outline:1px solid transparent;overflow:hidden;transition:opacity 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}@media screen and (forced-colors: active){.mdc-linear-progress{outline-color:CanvasText}}.mdc-linear-progress__bar{position:absolute;width:100%;height:100%;animation:none;transform-origin:top left;transition:transform 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-linear-progress__bar-inner{display:inline-block;position:absolute;width:100%;animation:none;border-top-style:solid}.mdc-linear-progress__buffer{display:flex;position:absolute;width:100%;height:100%}.mdc-linear-progress__buffer-dots{background-repeat:repeat-x;flex:auto;transform:rotate(180deg);animation:mdc-linear-progress-buffering 250ms infinite linear}.mdc-linear-progress__buffer-bar{flex:0 1 100%;transition:flex-basis 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-linear-progress__primary-bar{transform:scaleX(0)}.mdc-linear-progress__secondary-bar{display:none}.mdc-linear-progress--indeterminate .mdc-linear-progress__bar{transition:none}.mdc-linear-progress--indeterminate .mdc-linear-progress__primary-bar{left:-145.166611%}.mdc-linear-progress--indeterminate .mdc-linear-progress__secondary-bar{left:-54.888891%;display:block}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar{animation:mdc-linear-progress-primary-indeterminate-translate 2s infinite linear}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar>.mdc-linear-progress__bar-inner{animation:mdc-linear-progress-primary-indeterminate-scale 2s infinite linear}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar{animation:mdc-linear-progress-secondary-indeterminate-translate 2s infinite linear}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar>.mdc-linear-progress__bar-inner{animation:mdc-linear-progress-secondary-indeterminate-scale 2s infinite linear}[dir=rtl] .mdc-linear-progress:not([dir=ltr]) .mdc-linear-progress__bar,.mdc-linear-progress[dir=rtl]:not([dir=ltr]) .mdc-linear-progress__bar{right:0;-webkit-transform-origin:center right;transform-origin:center right}[dir=rtl] .mdc-linear-progress:not([dir=ltr]).mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar,.mdc-linear-progress[dir=rtl]:not([dir=ltr]).mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar{animation-name:mdc-linear-progress-primary-indeterminate-translate-reverse}[dir=rtl] .mdc-linear-progress:not([dir=ltr]).mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar,.mdc-linear-progress[dir=rtl]:not([dir=ltr]).mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar{animation-name:mdc-linear-progress-secondary-indeterminate-translate-reverse}[dir=rtl] .mdc-linear-progress:not([dir=ltr]) .mdc-linear-progress__buffer-dots,.mdc-linear-progress[dir=rtl]:not([dir=ltr]) .mdc-linear-progress__buffer-dots{animation:mdc-linear-progress-buffering-reverse 250ms infinite linear;transform:rotate(0)}[dir=rtl] .mdc-linear-progress:not([dir=ltr]).mdc-linear-progress--indeterminate .mdc-linear-progress__primary-bar,.mdc-linear-progress[dir=rtl]:not([dir=ltr]).mdc-linear-progress--indeterminate .mdc-linear-progress__primary-bar{right:-145.166611%;left:auto}[dir=rtl] .mdc-linear-progress:not([dir=ltr]).mdc-linear-progress--indeterminate .mdc-linear-progress__secondary-bar,.mdc-linear-progress[dir=rtl]:not([dir=ltr]).mdc-linear-progress--indeterminate .mdc-linear-progress__secondary-bar{right:-54.888891%;left:auto}.mdc-linear-progress--closed{opacity:0}.mdc-linear-progress--closed-animation-off .mdc-linear-progress__buffer-dots{animation:none}.mdc-linear-progress--closed-animation-off.mdc-linear-progress--indeterminate .mdc-linear-progress__bar,.mdc-linear-progress--closed-animation-off.mdc-linear-progress--indeterminate .mdc-linear-progress__bar .mdc-linear-progress__bar-inner{animation:none}.mdc-linear-progress__bar-inner{border-color:#6200ee;border-color:var(--mdc-theme-primary, #6200ee)}.mdc-linear-progress__buffer-dots{background-image:url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='none slice'%3E%3Ccircle cx='1' cy='1' r='1' fill='%23e6e6e6'/%3E%3C/svg%3E")}.mdc-linear-progress__buffer-bar{background-color:#e6e6e6}.mdc-linear-progress{height:4px}.mdc-linear-progress__bar-inner{border-top-width:4px}.mdc-linear-progress__buffer-dots{background-size:10px 4px}:host{display:block}.mdc-linear-progress__buffer-bar{background-color:#e6e6e6;background-color:var(--mdc-linear-progress-buffer-color, #e6e6e6)}.mdc-linear-progress__buffer-dots{background-image:url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='none slice'%3E%3Ccircle cx='1' cy='1' r='1' fill='%23e6e6e6'/%3E%3C/svg%3E");background-image:var(--mdc-linear-progress-buffering-dots-image, url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='none slice'%3E%3Ccircle cx='1' cy='1' r='1' fill='%23e6e6e6'/%3E%3C/svg%3E"))}`;let f=class extends p{};f.styles=[g],f=r([c("mwc-linear-progress")],f);export{f as LinearProgress}; diff --git a/material-yew/build/mwc-list-item.js b/material-yew/build/mwc-list-item.js deleted file mode 100644 index 8adf7c3..0000000 --- a/material-yew/build/mwc-list-item.js +++ /dev/null @@ -1 +0,0 @@ -import{N as s,_ as e,O as t,f as a}from"./core.js";let l=class extends t{};l.styles=[s],l=e([a("mwc-list-item")],l);export{l as ListItem}; diff --git a/material-yew/build/mwc-list.js b/material-yew/build/mwc-list.js deleted file mode 100644 index dfd9cd8..0000000 --- a/material-yew/build/mwc-list.js +++ /dev/null @@ -1,18 +0,0 @@ -import{_ as t,x as e,e as i,i as s,m as o,B as n,E as d,G as r,y as a,l as c,H as l,I as m,J as h,d as p,f as u}from"./core.js";export{K as createSetFromIndex,L as isEventMulti,G as isIndexSet}from"./core.js";import"./mwc-list-item.js";const g=t=>t.hasAttribute("mwc-list-item");function f(){const t=this.itemsReadyResolver;this.itemsReady=new Promise((t=>this.itemsReadyResolver=t)),t()}class b extends n{constructor(){super(),this.mdcAdapter=null,this.mdcFoundationClass=d,this.activatable=!1,this.multi=!1,this.wrapFocus=!1,this.itemRoles=null,this.innerRole=null,this.innerAriaLabel=null,this.rootTabbable=!1,this.previousTabindex=null,this.noninteractive=!1,this.itemsReadyResolver=()=>{},this.itemsReady=Promise.resolve([]),this.items_=[];const t=function(t,e=50){let i;return function(s=!0){clearTimeout(i),i=setTimeout((()=>{t(s)}),e)}}(this.layout.bind(this));this.debouncedLayout=(e=!0)=>{f.call(this),t(e)}}async getUpdateComplete(){const t=await super.getUpdateComplete();return await this.itemsReady,t}get items(){return this.items_}updateItems(){var t;const e=null!==(t=this.assignedElements)&&void 0!==t?t:[],i=[];for(const t of e)g(t)&&(i.push(t),t._managingList=this),t.hasAttribute("divider")&&!t.hasAttribute("role")&&t.setAttribute("role","separator");this.items_=i;const s=new Set;if(this.items_.forEach(((t,e)=>{this.itemRoles?t.setAttribute("role",this.itemRoles):t.removeAttribute("role"),t.selected&&s.add(e)})),this.multi)this.select(s);else{const t=s.size?s.entries().next().value[1]:-1;this.select(t)}const o=new Event("items-updated",{bubbles:!0,composed:!0});this.dispatchEvent(o)}get selected(){const t=this.index;if(!r(t))return-1===t?null:this.items[t];const e=[];for(const i of t)e.push(this.items[i]);return e}get index(){return this.mdcFoundation?this.mdcFoundation.getSelectedIndex():-1}render(){const t=null===this.innerRole?void 0:this.innerRole,e=null===this.innerAriaLabel?void 0:this.innerAriaLabel,i=this.rootTabbable?"0":"-1";return a` - - - `}renderPlaceholder(){var t;const e=null!==(t=this.assignedElements)&&void 0!==t?t:[];return void 0!==this.emptyMessage&&0===e.length?a` - ${this.emptyMessage} - `:null}firstUpdated(){super.firstUpdated(),this.items.length||(this.mdcFoundation.setMulti(this.multi),this.layout())}onFocusIn(t){if(this.mdcFoundation&&this.mdcRoot){const e=this.getIndexOfTarget(t);this.mdcFoundation.handleFocusIn(t,e)}}onFocusOut(t){if(this.mdcFoundation&&this.mdcRoot){const e=this.getIndexOfTarget(t);this.mdcFoundation.handleFocusOut(t,e)}}onKeydown(t){if(this.mdcFoundation&&this.mdcRoot){const e=this.getIndexOfTarget(t),i=t.target,s=g(i);this.mdcFoundation.handleKeydown(t,s,e)}}onRequestSelected(t){if(this.mdcFoundation){let e=this.getIndexOfTarget(t);if(-1===e&&(this.layout(),e=this.getIndexOfTarget(t),-1===e))return;if(this.items[e].disabled)return;const i=t.detail.selected,s=t.detail.source;this.mdcFoundation.handleSingleSelection(e,"interaction"===s,i),t.stopPropagation()}}getIndexOfTarget(t){const e=this.items,i=t.composedPath();for(const t of i){let i=-1;if(l(t)&&g(t)&&(i=e.indexOf(t)),-1!==i)return i}return-1}createAdapter(){return this.mdcAdapter={getListItemCount:()=>this.mdcRoot?this.items.length:0,getFocusedElementIndex:this.getFocusedItemIndex,getAttributeForElementIndex:(t,e)=>{if(!this.mdcRoot)return"";const i=this.items[t];return i?i.getAttribute(e):""},setAttributeForElementIndex:(t,e,i)=>{if(!this.mdcRoot)return;const s=this.items[t];s&&s.setAttribute(e,i)},focusItemAtIndex:t=>{const e=this.items[t];e&&e.focus()},setTabIndexForElementIndex:(t,e)=>{const i=this.items[t];i&&(i.tabindex=e)},notifyAction:t=>{const e={bubbles:!0,composed:!0};e.detail={index:t};const i=new CustomEvent("action",e);this.dispatchEvent(i)},notifySelected:(t,e)=>{const i={bubbles:!0,composed:!0};i.detail={index:t,diff:e};const s=new CustomEvent("selected",i);this.dispatchEvent(s)},isFocusInsideList:()=>m(this),isRootFocused:()=>{const t=this.mdcRoot;return t.getRootNode().activeElement===t},setDisabledStateForElementIndex:(t,e)=>{const i=this.items[t];i&&(i.disabled=e)},getDisabledStateForElementIndex:t=>{const e=this.items[t];return!!e&&e.disabled},setSelectedStateForElementIndex:(t,e)=>{const i=this.items[t];i&&(i.selected=e)},getSelectedStateForElementIndex:t=>{const e=this.items[t];return!!e&&e.selected},setActivatedStateForElementIndex:(t,e)=>{const i=this.items[t];i&&(i.activated=e)}},this.mdcAdapter}selectUi(t,e=!1){const i=this.items[t];i&&(i.selected=!0,i.activated=e)}deselectUi(t){const e=this.items[t];e&&(e.selected=!1,e.activated=!1)}select(t){this.mdcFoundation&&this.mdcFoundation.setSelectedIndex(t)}toggle(t,e){this.multi&&this.mdcFoundation.toggleMultiAtIndex(t,e)}onListItemConnected(t){const e=t.target;this.layout(-1===this.items.indexOf(e))}layout(t=!0){t&&this.updateItems();const e=this.items[0];for(const t of this.items)t.tabindex=-1;e&&(this.noninteractive?this.previousTabindex||(this.previousTabindex=e):e.tabindex=0),this.itemsReadyResolver()}getFocusedItemIndex(){if(!this.mdcRoot)return-1;if(!this.items.length)return-1;const t=h();if(!t.length)return-1;for(let e=t.length-1;e>=0;e--){const i=t[e];if(g(i))return this.items.indexOf(i)}return-1}focusItemAtIndex(t){for(const t of this.items)if(0===t.tabindex){t.tabindex=-1;break}this.items[t].tabindex=0,this.items[t].focus()}focus(){const t=this.mdcRoot;t&&t.focus()}blur(){const t=this.mdcRoot;t&&t.blur()}}t([i({type:String})],b.prototype,"emptyMessage",void 0),t([s(".mdc-deprecated-list")],b.prototype,"mdcRoot",void 0),t([e("",!0,"*")],b.prototype,"assignedElements",void 0),t([e("",!0,'[tabindex="0"]')],b.prototype,"tabbableElements",void 0),t([i({type:Boolean}),o((function(t){this.mdcFoundation&&this.mdcFoundation.setUseActivatedClass(t)}))],b.prototype,"activatable",void 0),t([i({type:Boolean}),o((function(t,e){this.mdcFoundation&&this.mdcFoundation.setMulti(t),void 0!==e&&this.layout()}))],b.prototype,"multi",void 0),t([i({type:Boolean}),o((function(t){this.mdcFoundation&&this.mdcFoundation.setWrapFocus(t)}))],b.prototype,"wrapFocus",void 0),t([i({type:String}),o((function(t,e){void 0!==e&&this.updateItems()}))],b.prototype,"itemRoles",void 0),t([i({type:String})],b.prototype,"innerRole",void 0),t([i({type:String})],b.prototype,"innerAriaLabel",void 0),t([i({type:Boolean})],b.prototype,"rootTabbable",void 0),t([i({type:Boolean,reflect:!0}),o((function(t){var e,i;if(t){const t=null!==(i=null===(e=this.tabbableElements)||void 0===e?void 0:e[0])&&void 0!==i?i:null;this.previousTabindex=t,t&&t.setAttribute("tabindex","-1")}else!t&&this.previousTabindex&&(this.previousTabindex.setAttribute("tabindex","0"),this.previousTabindex=null)}))],b.prototype,"noninteractive",void 0);const v=p`@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}:host{display:block}.mdc-deprecated-list{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height, 1.75rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);line-height:1.5rem;margin:0;padding:8px 0;list-style-type:none;color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87));padding:var(--mdc-list-vertical-padding, 8px) 0}.mdc-deprecated-list:focus{outline:none}.mdc-deprecated-list-item{height:48px}.mdc-deprecated-list--dense{padding-top:4px;padding-bottom:4px;font-size:.812rem}.mdc-deprecated-list ::slotted([divider]){height:0;margin:0;border:none;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgba(0, 0, 0, 0.12)}.mdc-deprecated-list ::slotted([divider][padded]){margin:0 var(--mdc-list-side-padding, 16px)}.mdc-deprecated-list ::slotted([divider][inset]){margin-left:var(--mdc-list-inset-margin, 72px);margin-right:0;width:calc( 100% - var(--mdc-list-inset-margin, 72px) )}[dir=rtl] .mdc-deprecated-list ::slotted([divider][inset]),.mdc-deprecated-list ::slotted([divider][inset][dir=rtl]){margin-left:0;margin-right:var(--mdc-list-inset-margin, 72px)}.mdc-deprecated-list ::slotted([divider][inset][padded]){width:calc( 100% - var(--mdc-list-inset-margin, 72px) - var(--mdc-list-side-padding, 16px) )}.mdc-deprecated-list--dense ::slotted([mwc-list-item]){height:40px}.mdc-deprecated-list--dense ::slotted([mwc-list]){--mdc-list-item-graphic-size: 20px}.mdc-deprecated-list--two-line.mdc-deprecated-list--dense ::slotted([mwc-list-item]),.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense ::slotted([mwc-list-item]){height:60px}.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense ::slotted([mwc-list]){--mdc-list-item-graphic-size: 36px}:host([noninteractive]){pointer-events:none;cursor:default}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text){display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text)::before{display:inline-block;width:0;height:24px;content:"";vertical-align:0}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text)::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}`;let y=class extends b{};y.styles=[v],y=t([u("mwc-list")],y);export{y as List}; diff --git a/material-yew/build/mwc-menu.js b/material-yew/build/mwc-menu.js deleted file mode 100644 index fd97677..0000000 --- a/material-yew/build/mwc-menu.js +++ /dev/null @@ -1,40 +0,0 @@ -import{Q as t,_ as e,t as o,m as i,i as n,e as s,T as r,B as d,U as l,y as c,o as a,D as u,p as h,I as m,J as p,d as f,f as y,g,h as x,V as b,W as T,X as v,Y as I,Z as E,$ as A,M as C}from"./core.js";export{K as createSetFromIndex,L as isEventMulti,G as isIndexSet}from"./core.js";import"./mwc-list.js";import"./mwc-list-item.js";const S={TOP_LEFT:t.TOP_LEFT,TOP_RIGHT:t.TOP_RIGHT,BOTTOM_LEFT:t.BOTTOM_LEFT,BOTTOM_RIGHT:t.BOTTOM_RIGHT,TOP_START:t.TOP_START,TOP_END:t.TOP_END,BOTTOM_START:t.BOTTOM_START,BOTTOM_END:t.BOTTOM_END};class w extends d{constructor(){super(...arguments),this.mdcFoundationClass=l,this.absolute=!1,this.fullwidth=!1,this.fixed=!1,this.x=null,this.y=null,this.quick=!1,this.open=!1,this.stayOpenOnBodyClick=!1,this.bitwiseCorner=t.TOP_START,this.previousMenuCorner=null,this.menuCorner="START",this.corner="TOP_START",this.styleTop="",this.styleLeft="",this.styleRight="",this.styleBottom="",this.styleMaxHeight="",this.styleTransformOrigin="",this.anchor=null,this.previouslyFocused=null,this.previousAnchor=null,this.onBodyClickBound=()=>{}}render(){return this.renderSurface()}renderSurface(){const t=this.getRootClasses(),e=this.getRootStyles();return c` -
- ${this.renderContent()} -
`}getRootClasses(){return{"mdc-menu-surface":!0,"mdc-menu-surface--fixed":this.fixed,"mdc-menu-surface--fullwidth":this.fullwidth}}getRootStyles(){return{top:this.styleTop,left:this.styleLeft,right:this.styleRight,bottom:this.styleBottom,"max-height":this.styleMaxHeight,"transform-origin":this.styleTransformOrigin}}renderContent(){return c``}createAdapter(){return Object.assign(Object.assign({},h(this.mdcRoot)),{hasAnchor:()=>!!this.anchor,notifyClose:()=>{const t=new CustomEvent("closed",{bubbles:!0,composed:!0});this.open=!1,this.mdcRoot.dispatchEvent(t)},notifyClosing:()=>{const t=new CustomEvent("closing",{bubbles:!0,composed:!0});this.mdcRoot.dispatchEvent(t)},notifyOpen:()=>{const t=new CustomEvent("opened",{bubbles:!0,composed:!0});this.open=!0,this.mdcRoot.dispatchEvent(t)},notifyOpening:()=>{const t=new CustomEvent("opening",{bubbles:!0,composed:!0});this.mdcRoot.dispatchEvent(t)},isElementInContainer:()=>!1,isRtl:()=>!!this.mdcRoot&&"rtl"===getComputedStyle(this.mdcRoot).direction,setTransformOrigin:t=>{this.mdcRoot&&(this.styleTransformOrigin=t)},isFocused:()=>m(this),saveFocus:()=>{const t=p(),e=t.length;e||(this.previouslyFocused=null),this.previouslyFocused=t[e-1]},restoreFocus:()=>{this.previouslyFocused&&"focus"in this.previouslyFocused&&this.previouslyFocused.focus()},getInnerDimensions:()=>{const t=this.mdcRoot;return t?{width:t.offsetWidth,height:t.offsetHeight}:{width:0,height:0}},getAnchorDimensions:()=>{const t=this.anchor;return t?t.getBoundingClientRect():null},getBodyDimensions:()=>({width:document.body.clientWidth,height:document.body.clientHeight}),getWindowDimensions:()=>({width:window.innerWidth,height:window.innerHeight}),getWindowScroll:()=>({x:window.pageXOffset,y:window.pageYOffset}),setPosition:t=>{this.mdcRoot&&(this.styleLeft="left"in t?`${t.left}px`:"",this.styleRight="right"in t?`${t.right}px`:"",this.styleTop="top"in t?`${t.top}px`:"",this.styleBottom="bottom"in t?`${t.bottom}px`:"")},setMaxHeight:async t=>{this.mdcRoot&&(this.styleMaxHeight=t,await this.updateComplete,this.styleMaxHeight=`var(--mdc-menu-max-height, ${t})`)}})}onKeydown(t){this.mdcFoundation&&this.mdcFoundation.handleKeydown(t)}onBodyClick(t){if(this.stayOpenOnBodyClick)return;-1===t.composedPath().indexOf(this)&&this.close()}registerBodyClick(){this.onBodyClickBound=this.onBodyClick.bind(this),document.body.addEventListener("click",this.onBodyClickBound,{passive:!0,capture:!0})}deregisterBodyClick(){document.body.removeEventListener("click",this.onBodyClickBound,{capture:!0})}onOpenChanged(t,e){this.mdcFoundation&&(t?this.mdcFoundation.open():void 0!==e&&this.mdcFoundation.close())}close(){this.open=!1}show(){this.open=!0}}e([n(".mdc-menu-surface")],w.prototype,"mdcRoot",void 0),e([n("slot")],w.prototype,"slotElement",void 0),e([s({type:Boolean}),i((function(t){this.mdcFoundation&&!this.fixed&&this.mdcFoundation.setIsHoisted(t)}))],w.prototype,"absolute",void 0),e([s({type:Boolean})],w.prototype,"fullwidth",void 0),e([s({type:Boolean}),i((function(t){this.mdcFoundation&&!this.absolute&&this.mdcFoundation.setFixedPosition(t)}))],w.prototype,"fixed",void 0),e([s({type:Number}),i((function(t){this.mdcFoundation&&null!==this.y&&null!==t&&(this.mdcFoundation.setAbsolutePosition(t,this.y),this.mdcFoundation.setAnchorMargin({left:t,top:this.y,right:-t,bottom:this.y}))}))],w.prototype,"x",void 0),e([s({type:Number}),i((function(t){this.mdcFoundation&&null!==this.x&&null!==t&&(this.mdcFoundation.setAbsolutePosition(this.x,t),this.mdcFoundation.setAnchorMargin({left:this.x,top:t,right:-this.x,bottom:t}))}))],w.prototype,"y",void 0),e([s({type:Boolean}),i((function(t){this.mdcFoundation&&this.mdcFoundation.setQuickOpen(t)}))],w.prototype,"quick",void 0),e([s({type:Boolean,reflect:!0}),i((function(t,e){this.onOpenChanged(t,e)}))],w.prototype,"open",void 0),e([s({type:Boolean})],w.prototype,"stayOpenOnBodyClick",void 0),e([o(),i((function(t){this.mdcFoundation&&this.mdcFoundation.setAnchorCorner(t)}))],w.prototype,"bitwiseCorner",void 0),e([s({type:String}),i((function(t){if(this.mdcFoundation){const e="START"===t||"END"===t,o=null===this.previousMenuCorner,i=!o&&t!==this.previousMenuCorner,n=o&&"END"===t;e&&(i||n)&&(this.bitwiseCorner=this.bitwiseCorner^r.RIGHT,this.mdcFoundation.flipCornerHorizontally(),this.previousMenuCorner=t)}}))],w.prototype,"menuCorner",void 0),e([s({type:String}),i((function(t){if(this.mdcFoundation&&t){let e=S[t];"END"===this.menuCorner&&(e^=r.RIGHT),this.bitwiseCorner=e}}))],w.prototype,"corner",void 0),e([o()],w.prototype,"styleTop",void 0),e([o()],w.prototype,"styleLeft",void 0),e([o()],w.prototype,"styleRight",void 0),e([o()],w.prototype,"styleBottom",void 0),e([o()],w.prototype,"styleMaxHeight",void 0),e([o()],w.prototype,"styleTransformOrigin",void 0);const O=f`.mdc-menu-surface{display:none;position:absolute;box-sizing:border-box;max-width:calc(100vw - 32px);max-width:var(--mdc-menu-max-width, calc(100vw - 32px));max-height:calc(100vh - 32px);max-height:var(--mdc-menu-max-height, calc(100vh - 32px));margin:0;padding:0;transform:scale(1);transform-origin:top left;opacity:0;overflow:auto;will-change:transform,opacity;z-index:8;transition:opacity .03s linear,transform .12s cubic-bezier(0, 0, 0.2, 1),height 250ms cubic-bezier(0, 0, 0.2, 1);box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2),0px 8px 10px 1px rgba(0, 0, 0, 0.14),0px 3px 14px 2px rgba(0,0,0,.12);background-color:#fff;background-color:var(--mdc-theme-surface, #fff);color:#000;color:var(--mdc-theme-on-surface, #000);border-radius:4px;border-radius:var(--mdc-shape-medium, 4px);transform-origin-left:top left;transform-origin-right:top right}.mdc-menu-surface:focus{outline:none}.mdc-menu-surface--animating-open{display:inline-block;transform:scale(0.8);opacity:0}.mdc-menu-surface--open{display:inline-block;transform:scale(1);opacity:1}.mdc-menu-surface--animating-closed{display:inline-block;opacity:0;transition:opacity .075s linear}[dir=rtl] .mdc-menu-surface,.mdc-menu-surface[dir=rtl]{transform-origin-left:top right;transform-origin-right:top left}.mdc-menu-surface--anchor{position:relative;overflow:visible}.mdc-menu-surface--fixed{position:fixed}.mdc-menu-surface--fullwidth{width:100%}:host(:not([open])){display:none}.mdc-menu-surface{z-index:8;z-index:var(--mdc-menu-z-index, 8);min-width:112px;min-width:var(--mdc-menu-min-width, 112px)}`;let F=class extends w{};F.styles=[O],F=e([y("mwc-menu-surface")],F);var R=function(t){function e(o){var i=t.call(this,x(x({},e.defaultAdapter),o))||this;return i.closeAnimationEndTimerId=0,i.defaultFocusState=b.LIST_ROOT,i.selectedIndex=-1,i}return g(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return T},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return v},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return I},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClassToElementAtIndex:function(){},removeClassFromElementAtIndex:function(){},addAttributeToElementAtIndex:function(){},removeAttributeFromElementAtIndex:function(){},getAttributeFromElementAtIndex:function(){return null},elementContainsClass:function(){return!1},closeSurface:function(){},getElementIndex:function(){return-1},notifySelected:function(){},getMenuItemCount:function(){return 0},focusItemAtIndex:function(){},focusListRoot:function(){},getSelectedSiblingOfItemAtIndex:function(){return-1},isSelectableItemAtIndex:function(){return!1}}},enumerable:!1,configurable:!0}),e.prototype.destroy=function(){this.closeAnimationEndTimerId&&clearTimeout(this.closeAnimationEndTimerId),this.adapter.closeSurface()},e.prototype.handleKeydown=function(t){var e=t.key,o=t.keyCode;("Tab"===e||9===o)&&this.adapter.closeSurface(!0)},e.prototype.handleItemAction=function(t){var e=this,o=this.adapter.getElementIndex(t);if(!(o<0)){this.adapter.notifySelected({index:o});var i="true"===this.adapter.getAttributeFromElementAtIndex(o,v.SKIP_RESTORE_FOCUS);this.adapter.closeSurface(i),this.closeAnimationEndTimerId=setTimeout((function(){var o=e.adapter.getElementIndex(t);o>=0&&e.adapter.isSelectableItemAtIndex(o)&&e.setSelectedIndex(o)}),E.numbers.TRANSITION_CLOSE_DURATION)}},e.prototype.handleMenuSurfaceOpened=function(){switch(this.defaultFocusState){case b.FIRST_ITEM:this.adapter.focusItemAtIndex(0);break;case b.LAST_ITEM:this.adapter.focusItemAtIndex(this.adapter.getMenuItemCount()-1);break;case b.NONE:break;default:this.adapter.focusListRoot()}},e.prototype.setDefaultFocusState=function(t){this.defaultFocusState=t},e.prototype.getSelectedIndex=function(){return this.selectedIndex},e.prototype.setSelectedIndex=function(t){if(this.validatedIndex(t),!this.adapter.isSelectableItemAtIndex(t))throw new Error("MDCMenuFoundation: No selection group at specified index.");var e=this.adapter.getSelectedSiblingOfItemAtIndex(t);e>=0&&(this.adapter.removeAttributeFromElementAtIndex(e,v.ARIA_CHECKED_ATTR),this.adapter.removeClassFromElementAtIndex(e,T.MENU_SELECTED_LIST_ITEM)),this.adapter.addClassToElementAtIndex(t,T.MENU_SELECTED_LIST_ITEM),this.adapter.addAttributeToElementAtIndex(t,v.ARIA_CHECKED_ATTR,"true"),this.selectedIndex=t},e.prototype.setEnabled=function(t,e){this.validatedIndex(t),e?(this.adapter.removeClassFromElementAtIndex(t,A.LIST_ITEM_DISABLED_CLASS),this.adapter.addAttributeToElementAtIndex(t,v.ARIA_DISABLED_ATTR,"false")):(this.adapter.addClassToElementAtIndex(t,A.LIST_ITEM_DISABLED_CLASS),this.adapter.addAttributeToElementAtIndex(t,v.ARIA_DISABLED_ATTR,"true"))},e.prototype.validatedIndex=function(t){var e=this.adapter.getMenuItemCount();if(!(t>=0&&t - ${this.renderList()} - `}getSurfaceClasses(){return{"mdc-menu":!0,"mdc-menu-surface":!0}}renderList(){const t="menu"===this.innerRole?"menuitem":"option",e=this.renderListClasses();return c` - - - `}renderListClasses(){return{"mdc-deprecated-list":!0}}createAdapter(){return{addClassToElementAtIndex:(t,e)=>{const o=this.listElement;if(!o)return;const i=o.items[t];i&&("mdc-menu-item--selected"===e?this.forceGroupSelection&&!i.selected&&o.toggle(t,!0):i.classList.add(e))},removeClassFromElementAtIndex:(t,e)=>{const o=this.listElement;if(!o)return;const i=o.items[t];i&&("mdc-menu-item--selected"===e?i.selected&&o.toggle(t,!1):i.classList.remove(e))},addAttributeToElementAtIndex:(t,e,o)=>{const i=this.listElement;if(!i)return;const n=i.items[t];n&&n.setAttribute(e,o)},removeAttributeFromElementAtIndex:(t,e)=>{const o=this.listElement;if(!o)return;const i=o.items[t];i&&i.removeAttribute(e)},getAttributeFromElementAtIndex:(t,e)=>{const o=this.listElement;if(!o)return null;const i=o.items[t];return i?i.getAttribute(e):null},elementContainsClass:(t,e)=>t.classList.contains(e),closeSurface:()=>{this.open=!1},getElementIndex:t=>{const e=this.listElement;return e?e.items.indexOf(t):-1},notifySelected:()=>{},getMenuItemCount:()=>{const t=this.listElement;return t?t.items.length:0},focusItemAtIndex:t=>{const e=this.listElement;if(!e)return;const o=e.items[t];o&&o.focus()},focusListRoot:()=>{this.listElement&&this.listElement.focus()},getSelectedSiblingOfItemAtIndex:t=>{const e=this.listElement;if(!e)return-1;const o=e.items[t];if(!o||!o.group)return-1;for(let i=0;i{const e=this.listElement;if(!e)return!1;const o=e.items[t];return!!o&&o.hasAttribute("group")}}}onKeydown(t){this.mdcFoundation&&this.mdcFoundation.handleKeydown(t)}onAction(t){const e=this.listElement;if(this.mdcFoundation&&e){const o=t.detail.index,i=e.items[o];i&&this.mdcFoundation.handleItemAction(i)}}onOpened(){this.open=!0,this.mdcFoundation&&this.mdcFoundation.handleMenuSurfaceOpened()}onClosed(){this.open=!1}async getUpdateComplete(){await this._listUpdateComplete;return await super.getUpdateComplete()}async firstUpdated(){super.firstUpdated();const t=this.listElement;t&&(this._listUpdateComplete=t.updateComplete,await this._listUpdateComplete)}select(t){const e=this.listElement;e&&e.select(t)}close(){this.open=!1}show(){this.open=!0}getFocusedItemIndex(){const t=this.listElement;return t?t.getFocusedItemIndex():-1}focusItemAtIndex(t){const e=this.listElement;e&&e.focusItemAtIndex(t)}layout(t=!0){const e=this.listElement;e&&e.layout(t)}}e([n(".mdc-menu")],B.prototype,"mdcRoot",void 0),e([n("slot")],B.prototype,"slotElement",void 0),e([s({type:Object})],B.prototype,"anchor",void 0),e([s({type:Boolean,reflect:!0})],B.prototype,"open",void 0),e([s({type:Boolean})],B.prototype,"quick",void 0),e([s({type:Boolean})],B.prototype,"wrapFocus",void 0),e([s({type:String})],B.prototype,"innerRole",void 0),e([s({type:String})],B.prototype,"innerAriaLabel",void 0),e([s({type:String})],B.prototype,"corner",void 0),e([s({type:Number})],B.prototype,"x",void 0),e([s({type:Number})],B.prototype,"y",void 0),e([s({type:Boolean})],B.prototype,"absolute",void 0),e([s({type:Boolean})],B.prototype,"multi",void 0),e([s({type:Boolean})],B.prototype,"activatable",void 0),e([s({type:Boolean})],B.prototype,"fixed",void 0),e([s({type:Boolean})],B.prototype,"forceGroupSelection",void 0),e([s({type:Boolean})],B.prototype,"fullwidth",void 0),e([s({type:String})],B.prototype,"menuCorner",void 0),e([s({type:Boolean})],B.prototype,"stayOpenOnBodyClick",void 0),e([s({type:String}),i((function(t){this.mdcFoundation&&this.mdcFoundation.setDefaultFocusState(b[t])}))],B.prototype,"defaultFocus",void 0);const _=f`mwc-list ::slotted([mwc-list-item]:not([twoline])),mwc-list ::slotted([noninteractive]:not([twoline])){height:var(--mdc-menu-item-height, 48px)}`;let M=class extends B{};M.styles=[_],M=e([y("mwc-menu")],M);export{M as Menu}; diff --git a/material-yew/build/mwc-radio-list-item.js b/material-yew/build/mwc-radio-list-item.js deleted file mode 100644 index 2c47b72..0000000 --- a/material-yew/build/mwc-radio-list-item.js +++ /dev/null @@ -1,15 +0,0 @@ -import{_ as e,i as t,e as i,O as s,y as r,o as c,l as o,N as h,P as a,f as l}from"./core.js";import"./mwc-radio.js";class d extends s{constructor(){super(...arguments),this.left=!1,this.graphic="control",this._changeFromClick=!1}render(){const e={"mdc-deprecated-list-item__graphic":this.left,"mdc-deprecated-list-item__meta":!this.left},t=this.renderText(),i=this.graphic&&"control"!==this.graphic&&!this.left?this.renderGraphic():r``,s=this.hasMeta&&this.left?this.renderMeta():r``,h=this.renderRipple();return r` - ${h} - ${i} - ${this.left?"":t} - - - ${this.left?t:""} - ${s}`}onClick(){this._changeFromClick=!0,super.onClick()}async onChange(e){const t=e.target;this.selected===t.checked||(this._skipPropRequest=!0,this.selected=t.checked,await this.updateComplete,this._skipPropRequest=!1,this._changeFromClick||this.fireRequestSelected(this.selected,"interaction")),this._changeFromClick=!1}}e([t("slot")],d.prototype,"slotElement",void 0),e([t("mwc-radio")],d.prototype,"radioElement",void 0),e([i({type:Boolean})],d.prototype,"left",void 0),e([i({type:String,reflect:!0})],d.prototype,"graphic",void 0);let n=class extends d{};n.styles=[h,a],n=e([l("mwc-radio-list-item")],n);export{n as RadioListItem}; diff --git a/material-yew/build/mwc-radio.js b/material-yew/build/mwc-radio.js deleted file mode 100644 index a62327d..0000000 --- a/material-yew/build/mwc-radio.js +++ /dev/null @@ -1,30 +0,0 @@ -import{g as e,h as r,M as d,_ as o,t as i,i as a,e as c,m as t,b as n,a as l,c as s,F as m,R as p,y as u,S as _,p as b,o as h,l as g,d as v,f}from"./core.js";export{S as SingleSelectionController}from"./core.js";var k={NATIVE_CONTROL_SELECTOR:".mdc-radio__native-control"},x={DISABLED:"mdc-radio--disabled",ROOT:"mdc-radio"},y=function(d){function o(e){return d.call(this,r(r({},o.defaultAdapter),e))||this}return e(o,d),Object.defineProperty(o,"cssClasses",{get:function(){return x},enumerable:!1,configurable:!0}),Object.defineProperty(o,"strings",{get:function(){return k},enumerable:!1,configurable:!0}),Object.defineProperty(o,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},setNativeControlDisabled:function(){}}},enumerable:!1,configurable:!0}),o.prototype.setDisabled=function(e){var r=o.cssClasses.DISABLED;this.adapter.setNativeControlDisabled(e),e?this.adapter.addClass(r):this.adapter.removeClass(r)},o}(d);class R extends m{constructor(){super(...arguments),this._checked=!1,this.useStateLayerCustomProperties=!1,this.global=!1,this.disabled=!1,this.value="on",this.name="",this.reducedTouchTarget=!1,this.mdcFoundationClass=y,this.formElementTabIndex=0,this.focused=!1,this.shouldRenderRipple=!1,this.rippleElement=null,this.rippleHandlers=new p((()=>(this.shouldRenderRipple=!0,this.ripple.then((e=>{this.rippleElement=e})),this.ripple)))}get checked(){return this._checked}set checked(e){var r,d;const o=this._checked;e!==o&&(this._checked=e,this.formElement&&(this.formElement.checked=e),null===(r=this._selectionController)||void 0===r||r.update(this),!1===e&&(null===(d=this.formElement)||void 0===d||d.blur()),this.requestUpdate("checked",o),this.dispatchEvent(new Event("checked",{bubbles:!0,composed:!0})))}_handleUpdatedValue(e){this.formElement.value=e}renderRipple(){return this.shouldRenderRipple?u``:""}get isRippleActive(){var e;return(null===(e=this.rippleElement)||void 0===e?void 0:e.isActive)||!1}connectedCallback(){super.connectedCallback(),this._selectionController=_.getController(this),this._selectionController.register(this),this._selectionController.update(this)}disconnectedCallback(){this._selectionController.unregister(this),this._selectionController=void 0}focus(){this.formElement.focus()}createAdapter(){return Object.assign(Object.assign({},b(this.mdcRoot)),{setNativeControlDisabled:e=>{this.formElement.disabled=e}})}handleFocus(){this.focused=!0,this.handleRippleFocus()}handleClick(){this.formElement.focus()}handleBlur(){this.focused=!1,this.formElement.blur(),this.rippleHandlers.endFocus()}setFormData(e){this.name&&this.checked&&e.append(this.name,this.value)}render(){const e={"mdc-radio--touch":!this.reducedTouchTarget,"mdc-ripple-upgraded--background-focused":this.focused,"mdc-radio--disabled":this.disabled};return u` -
- -
-
-
-
- ${this.renderRipple()} -
`}handleRippleMouseDown(e){const r=()=>{window.removeEventListener("mouseup",r),this.handleRippleDeactivate()};window.addEventListener("mouseup",r),this.rippleHandlers.startPress(e)}handleRippleTouchStart(e){this.rippleHandlers.startPress(e)}handleRippleDeactivate(){this.rippleHandlers.endPress()}handleRippleMouseEnter(){this.rippleHandlers.startHover()}handleRippleMouseLeave(){this.rippleHandlers.endHover()}handleRippleFocus(){this.rippleHandlers.startFocus()}changeHandler(){this.checked=this.formElement.checked}}o([a(".mdc-radio")],R.prototype,"mdcRoot",void 0),o([a("input")],R.prototype,"formElement",void 0),o([i()],R.prototype,"useStateLayerCustomProperties",void 0),o([c({type:Boolean})],R.prototype,"global",void 0),o([c({type:Boolean,reflect:!0})],R.prototype,"checked",null),o([c({type:Boolean}),t((function(e){this.mdcFoundation.setDisabled(e)}))],R.prototype,"disabled",void 0),o([c({type:String}),t((function(e){this._handleUpdatedValue(e)}))],R.prototype,"value",void 0),o([c({type:String})],R.prototype,"name",void 0),o([c({type:Boolean})],R.prototype,"reducedTouchTarget",void 0),o([c({type:Number})],R.prototype,"formElementTabIndex",void 0),o([i()],R.prototype,"focused",void 0),o([i()],R.prototype,"shouldRenderRipple",void 0),o([n("mwc-ripple")],R.prototype,"ripple",void 0),o([l,c({attribute:"aria-label"})],R.prototype,"ariaLabel",void 0),o([l,c({attribute:"aria-labelledby"})],R.prototype,"ariaLabelledBy",void 0),o([s({passive:!0})],R.prototype,"handleRippleTouchStart",null);const C=v`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc((40px - 20px) / 2)}.mdc-radio .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:rgba(0, 0, 0, 0.54)}.mdc-radio .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:#018786;border-color:var(--mdc-theme-secondary, #018786)}.mdc-radio .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:#018786;border-color:var(--mdc-theme-secondary, #018786)}.mdc-radio [aria-disabled=true] .mdc-radio__native-control:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle,.mdc-radio .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:rgba(0, 0, 0, 0.38)}.mdc-radio [aria-disabled=true] .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mdc-radio .mdc-radio__native-control:disabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:rgba(0, 0, 0, 0.38)}.mdc-radio [aria-disabled=true] .mdc-radio__native-control+.mdc-radio__background .mdc-radio__inner-circle,.mdc-radio .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:rgba(0, 0, 0, 0.38)}.mdc-radio .mdc-radio__background::before{background-color:#018786;background-color:var(--mdc-theme-secondary, #018786)}.mdc-radio .mdc-radio__background::before{top:calc(-1 * (40px - 20px) / 2);left:calc(-1 * (40px - 20px) / 2);width:40px;height:40px}.mdc-radio .mdc-radio__native-control{top:calc((40px - 40px) / 2);right:calc((40px - 40px) / 2);left:calc((40px - 40px) / 2);width:40px;height:40px}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-radio.mdc-radio--disabled [aria-disabled=true] .mdc-radio__native-control:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle,.mdc-radio.mdc-radio--disabled .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:GrayText}.mdc-radio.mdc-radio--disabled [aria-disabled=true] .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mdc-radio.mdc-radio--disabled .mdc-radio__native-control:disabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:GrayText}.mdc-radio.mdc-radio--disabled [aria-disabled=true] .mdc-radio__native-control+.mdc-radio__background .mdc-radio__inner-circle,.mdc-radio.mdc-radio--disabled .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:GrayText}}.mdc-radio{display:inline-block;position:relative;flex:0 0 auto;box-sizing:content-box;width:20px;height:20px;cursor:pointer;will-change:opacity,transform,border-color,color}.mdc-radio__background{display:inline-block;position:relative;box-sizing:border-box;width:20px;height:20px}.mdc-radio__background::before{position:absolute;transform:scale(0, 0);border-radius:50%;opacity:0;pointer-events:none;content:"";transition:opacity 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-radio__outer-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;border-width:2px;border-style:solid;border-radius:50%;transition:border-color 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-radio__inner-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;transform:scale(0, 0);border-width:10px;border-style:solid;border-radius:50%;transition:transform 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1),border-color 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-radio__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit;z-index:1}.mdc-radio--touch{margin-top:4px;margin-bottom:4px;margin-right:4px;margin-left:4px}.mdc-radio--touch .mdc-radio__native-control{top:calc((40px - 48px) / 2);right:calc((40px - 48px) / 2);left:calc((40px - 48px) / 2);width:48px;height:48px}.mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring,.mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring{pointer-events:none;border:2px solid transparent;border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%}@media screen and (forced-colors: active){.mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring,.mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring{border-color:CanvasText}}.mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring::after,.mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring::after{content:"";border:2px solid transparent;border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring::after,.mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring::after{border-color:CanvasText}}.mdc-radio__native-control:checked+.mdc-radio__background,.mdc-radio__native-control:disabled+.mdc-radio__background{transition:opacity 120ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__outer-circle{transition:border-color 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle,.mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{transition:transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1),border-color 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-radio--disabled{cursor:default;pointer-events:none}.mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle{transform:scale(0.5);transition:transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1),border-color 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-radio__native-control:disabled+.mdc-radio__background,[aria-disabled=true] .mdc-radio__native-control+.mdc-radio__background{cursor:default}.mdc-radio__native-control:focus+.mdc-radio__background::before{transform:scale(1);opacity:.12;transition:opacity 120ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}:host{display:inline-block;outline:none}.mdc-radio{vertical-align:bottom}.mdc-radio .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unchecked-color, rgba(0, 0, 0, 0.54))}.mdc-radio [aria-disabled=true] .mdc-radio__native-control:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle,.mdc-radio .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-color, rgba(0, 0, 0, 0.38))}.mdc-radio [aria-disabled=true] .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mdc-radio .mdc-radio__native-control:disabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-color, rgba(0, 0, 0, 0.38))}.mdc-radio [aria-disabled=true] .mdc-radio__native-control+.mdc-radio__background .mdc-radio__inner-circle,.mdc-radio .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-disabled-color, rgba(0, 0, 0, 0.38))}`;let E=class extends R{};E.styles=[C],E=o([f("mwc-radio")],E);export{E as Radio}; diff --git a/material-yew/build/mwc-select.js b/material-yew/build/mwc-select.js deleted file mode 100644 index 5a432bb..0000000 --- a/material-yew/build/mwc-select.js +++ /dev/null @@ -1,87 +0,0 @@ -import{a0 as e,a1 as t,g as i,h as c,a2 as l,Q as d,M as o,_ as n,t as a,i as r,e as s,m,c as p,F as h,y as u,o as f,l as g,a3 as b,a4 as _,a5 as x,p as v,H as y,d as w,f as I}from"./core.js";import"./mwc-menu.js";import"./mwc-list.js";import"./mwc-list-item.js";var E=["input","button","textarea","select"],C=function(e){var t=e.target;if(t){var i=(""+t.tagName).toLowerCase();-1===E.indexOf(i)&&e.preventDefault()}};function A(e,t){for(var i=new Map,c=0;ct&&!i(d[n].index)){a=n;break}if(-1!==a)return c.sortedIndexCursor=a,d[c.sortedIndexCursor].index;return-1}(o,n,r,i):function(e,t,i){var c=i.typeaheadBuffer[0],l=e.get(c);if(!l)return-1;var d=l[i.sortedIndexCursor];if(0===d.text.lastIndexOf(i.typeaheadBuffer,0)&&!t(d.index))return d.index;var o=(i.sortedIndexCursor+1)%l.length,n=-1;for(;o!==i.sortedIndexCursor;){var a=l[o],r=0===a.text.lastIndexOf(i.typeaheadBuffer,0),s=!t(a.index);if(r&&s){n=o;break}o=(o+1)%l.length}if(-1!==n)return i.sortedIndexCursor=n,l[i.sortedIndexCursor].index;return-1}(o,r,i),-1===c||a||d(c),c}function T(e){return e.typeaheadBuffer.length>0}var S={ACTIVATED:"mdc-select--activated",DISABLED:"mdc-select--disabled",FOCUSED:"mdc-select--focused",INVALID:"mdc-select--invalid",MENU_INVALID:"mdc-select__menu--invalid",OUTLINED:"mdc-select--outlined",REQUIRED:"mdc-select--required",ROOT:"mdc-select",WITH_LEADING_ICON:"mdc-select--with-leading-icon"},O={ARIA_CONTROLS:"aria-controls",ARIA_DESCRIBEDBY:"aria-describedby",ARIA_SELECTED_ATTR:"aria-selected",CHANGE_EVENT:"MDCSelect:change",HIDDEN_INPUT_SELECTOR:'input[type="hidden"]',LABEL_SELECTOR:".mdc-floating-label",LEADING_ICON_SELECTOR:".mdc-select__icon",LINE_RIPPLE_SELECTOR:".mdc-line-ripple",MENU_SELECTOR:".mdc-select__menu",OUTLINE_SELECTOR:".mdc-notched-outline",SELECTED_TEXT_SELECTOR:".mdc-select__selected-text",SELECT_ANCHOR_SELECTOR:".mdc-select__anchor",VALUE_ATTR:"data-value"},M={LABEL_SCALE:.75,UNSET_INDEX:-1,CLICK_DEBOUNCE_TIMEOUT_MS:330},R=function(e){function o(t,i){void 0===i&&(i={});var l=e.call(this,c(c({},o.defaultAdapter),t))||this;return l.disabled=!1,l.isMenuOpen=!1,l.useDefaultValidation=!0,l.customValidity=!0,l.lastSelectedIndex=M.UNSET_INDEX,l.clickDebounceTimeout=0,l.recentlyClicked=!1,l.leadingIcon=i.leadingIcon,l.helperText=i.helperText,l}return i(o,e),Object.defineProperty(o,"cssClasses",{get:function(){return S},enumerable:!1,configurable:!0}),Object.defineProperty(o,"numbers",{get:function(){return M},enumerable:!1,configurable:!0}),Object.defineProperty(o,"strings",{get:function(){return O},enumerable:!1,configurable:!0}),Object.defineProperty(o,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},activateBottomLine:function(){},deactivateBottomLine:function(){},getSelectedIndex:function(){return-1},setSelectedIndex:function(){},hasLabel:function(){return!1},floatLabel:function(){},getLabelWidth:function(){return 0},setLabelRequired:function(){},hasOutline:function(){return!1},notchOutline:function(){},closeOutline:function(){},setRippleCenter:function(){},notifyChange:function(){},setSelectedText:function(){},isSelectAnchorFocused:function(){return!1},getSelectAnchorAttr:function(){return""},setSelectAnchorAttr:function(){},removeSelectAnchorAttr:function(){},addMenuClass:function(){},removeMenuClass:function(){},openMenu:function(){},closeMenu:function(){},getAnchorElement:function(){return null},setMenuAnchorElement:function(){},setMenuAnchorCorner:function(){},setMenuWrapFocus:function(){},focusMenuItemAtIndex:function(){},getMenuItemCount:function(){return 0},getMenuItemValues:function(){return[]},getMenuItemTextAtIndex:function(){return""},isTypeaheadInProgress:function(){return!1},typeaheadMatchItem:function(){return-1}}},enumerable:!1,configurable:!0}),o.prototype.getSelectedIndex=function(){return this.adapter.getSelectedIndex()},o.prototype.setSelectedIndex=function(e,t,i){void 0===t&&(t=!1),void 0===i&&(i=!1),e>=this.adapter.getMenuItemCount()||(e===M.UNSET_INDEX?this.adapter.setSelectedText(""):this.adapter.setSelectedText(this.adapter.getMenuItemTextAtIndex(e).trim()),this.adapter.setSelectedIndex(e),t&&this.adapter.closeMenu(),i||this.lastSelectedIndex===e||this.handleChange(),this.lastSelectedIndex=e)},o.prototype.setValue=function(e,t){void 0===t&&(t=!1);var i=this.adapter.getMenuItemValues().indexOf(e);this.setSelectedIndex(i,!1,t)},o.prototype.getValue=function(){var e=this.adapter.getSelectedIndex(),t=this.adapter.getMenuItemValues();return e!==M.UNSET_INDEX?t[e]:""},o.prototype.getDisabled=function(){return this.disabled},o.prototype.setDisabled=function(e){this.disabled=e,this.disabled?(this.adapter.addClass(S.DISABLED),this.adapter.closeMenu()):this.adapter.removeClass(S.DISABLED),this.leadingIcon&&this.leadingIcon.setDisabled(this.disabled),this.disabled?this.adapter.removeSelectAnchorAttr("tabindex"):this.adapter.setSelectAnchorAttr("tabindex","0"),this.adapter.setSelectAnchorAttr("aria-disabled",this.disabled.toString())},o.prototype.openMenu=function(){this.adapter.addClass(S.ACTIVATED),this.adapter.openMenu(),this.isMenuOpen=!0,this.adapter.setSelectAnchorAttr("aria-expanded","true")},o.prototype.setHelperTextContent=function(e){this.helperText&&this.helperText.setContent(e)},o.prototype.layout=function(){if(this.adapter.hasLabel()){var e=this.getValue().length>0,t=this.adapter.hasClass(S.FOCUSED),i=e||t,c=this.adapter.hasClass(S.REQUIRED);this.notchOutline(i),this.adapter.floatLabel(i),this.adapter.setLabelRequired(c)}},o.prototype.layoutOptions=function(){var e=this.adapter.getMenuItemValues().indexOf(this.getValue());this.setSelectedIndex(e,!1,!0)},o.prototype.handleMenuOpened=function(){if(0!==this.adapter.getMenuItemValues().length){var e=this.getSelectedIndex(),t=e>=0?e:0;this.adapter.focusMenuItemAtIndex(t)}},o.prototype.handleMenuClosing=function(){this.adapter.setSelectAnchorAttr("aria-expanded","false")},o.prototype.handleMenuClosed=function(){this.adapter.removeClass(S.ACTIVATED),this.isMenuOpen=!1,this.adapter.isSelectAnchorFocused()||this.blur()},o.prototype.handleChange=function(){this.layout(),this.adapter.notifyChange(this.getValue()),this.adapter.hasClass(S.REQUIRED)&&this.useDefaultValidation&&this.setValid(this.isValid())},o.prototype.handleMenuItemAction=function(e){this.setSelectedIndex(e,!0)},o.prototype.handleFocus=function(){this.adapter.addClass(S.FOCUSED),this.layout(),this.adapter.activateBottomLine()},o.prototype.handleBlur=function(){this.isMenuOpen||this.blur()},o.prototype.handleClick=function(e){this.disabled||this.recentlyClicked||(this.setClickDebounceTimeout(),this.isMenuOpen?this.adapter.closeMenu():(this.adapter.setRippleCenter(e),this.openMenu()))},o.prototype.handleKeydown=function(e){if(!this.isMenuOpen&&this.adapter.hasClass(S.FOCUSED)){var i=t(e)===l.ENTER,c=t(e)===l.SPACEBAR,d=t(e)===l.ARROW_UP,o=t(e)===l.ARROW_DOWN;if(!(e.ctrlKey||e.metaKey)&&(!c&&e.key&&1===e.key.length||c&&this.adapter.isTypeaheadInProgress())){var n=c?" ":e.key,a=this.adapter.typeaheadMatchItem(n,this.getSelectedIndex());return a>=0&&this.setSelectedIndex(a),void e.preventDefault()}(i||c||d||o)&&(this.openMenu(),e.preventDefault())}},o.prototype.notchOutline=function(e){if(this.adapter.hasOutline()){var t=this.adapter.hasClass(S.FOCUSED);if(e){var i=M.LABEL_SCALE,c=this.adapter.getLabelWidth()*i;this.adapter.notchOutline(c)}else t||this.adapter.closeOutline()}},o.prototype.setLeadingIconAriaLabel=function(e){this.leadingIcon&&this.leadingIcon.setAriaLabel(e)},o.prototype.setLeadingIconContent=function(e){this.leadingIcon&&this.leadingIcon.setContent(e)},o.prototype.getUseDefaultValidation=function(){return this.useDefaultValidation},o.prototype.setUseDefaultValidation=function(e){this.useDefaultValidation=e},o.prototype.setValid=function(e){this.useDefaultValidation||(this.customValidity=e),this.adapter.setSelectAnchorAttr("aria-invalid",(!e).toString()),e?(this.adapter.removeClass(S.INVALID),this.adapter.removeMenuClass(S.MENU_INVALID)):(this.adapter.addClass(S.INVALID),this.adapter.addMenuClass(S.MENU_INVALID)),this.syncHelperTextValidity(e)},o.prototype.isValid=function(){return this.useDefaultValidation&&this.adapter.hasClass(S.REQUIRED)&&!this.adapter.hasClass(S.DISABLED)?this.getSelectedIndex()!==M.UNSET_INDEX&&(0!==this.getSelectedIndex()||Boolean(this.getValue())):this.customValidity},o.prototype.setRequired=function(e){e?this.adapter.addClass(S.REQUIRED):this.adapter.removeClass(S.REQUIRED),this.adapter.setSelectAnchorAttr("aria-required",e.toString()),this.adapter.setLabelRequired(e)},o.prototype.getRequired=function(){return"true"===this.adapter.getSelectAnchorAttr("aria-required")},o.prototype.init=function(){var e=this.adapter.getAnchorElement();e&&(this.adapter.setMenuAnchorElement(e),this.adapter.setMenuAnchorCorner(d.BOTTOM_START)),this.adapter.setMenuWrapFocus(!1),this.setDisabled(this.adapter.hasClass(S.DISABLED)),this.syncHelperTextValidity(!this.adapter.hasClass(S.INVALID)),this.layout(),this.layoutOptions()},o.prototype.blur=function(){this.adapter.removeClass(S.FOCUSED),this.layout(),this.adapter.deactivateBottomLine(),this.adapter.hasClass(S.REQUIRED)&&this.useDefaultValidation&&this.setValid(this.isValid())},o.prototype.syncHelperTextValidity=function(e){if(this.helperText){this.helperText.setValidity(e);var t=this.helperText.isVisible(),i=this.helperText.getId();t&&i?this.adapter.setSelectAnchorAttr(O.ARIA_DESCRIBEDBY,i):this.adapter.removeSelectAnchorAttr(O.ARIA_DESCRIBEDBY)}},o.prototype.setClickDebounceTimeout=function(){var e=this;clearTimeout(this.clickDebounceTimeout),this.clickDebounceTimeout=setTimeout((function(){e.recentlyClicked=!1}),M.CLICK_DEBOUNCE_TIMEOUT_MS),this.recentlyClicked=!0},o}(o);const D=(e={})=>{const t={};for(const i in e)t[i]=e[i];return Object.assign({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1},t)};class L extends h{constructor(){super(...arguments),this.mdcFoundationClass=R,this.disabled=!1,this.outlined=!1,this.label="",this.outlineOpen=!1,this.outlineWidth=0,this.value="",this.name="",this.selectedText="",this.icon="",this.menuOpen=!1,this.helper="",this.validateOnInitialRender=!1,this.validationMessage="",this.required=!1,this.naturalMenuWidth=!1,this.isUiValid=!0,this.fixedMenuPosition=!1,this.typeaheadState={bufferClearTimeout:0,currentFirstChar:"",sortedIndexCursor:0,typeaheadBuffer:""},this.sortedIndexByFirstChar=new Map,this.menuElement_=null,this.listeners=[],this.onBodyClickBound=()=>{},this._menuUpdateComplete=null,this.valueSetDirectly=!1,this.validityTransform=null,this._validity=D()}get items(){return this.menuElement_||(this.menuElement_=this.menuElement),this.menuElement_?this.menuElement_.items:[]}get selected(){const e=this.menuElement;return e?e.selected:null}get index(){const e=this.menuElement;return e?e.index:-1}get shouldRenderHelperText(){return!!this.helper||!!this.validationMessage}get validity(){return this._checkValidity(this.value),this._validity}render(){const e={"mdc-select--disabled":this.disabled,"mdc-select--no-label":!this.label,"mdc-select--filled":!this.outlined,"mdc-select--outlined":this.outlined,"mdc-select--with-leading-icon":!!this.icon,"mdc-select--required":this.required,"mdc-select--invalid":!this.isUiValid},t=this.label?"label":void 0,i=this.shouldRenderHelperText?"helper-text":void 0;return u` -
- - -
- ${this.renderRipple()} - ${this.outlined?this.renderOutline():this.renderLabel()} - ${this.renderLeadingIcon()} - - ${this.selectedText} - - - - - - - - - - ${this.renderLineRipple()} -
- ${this.renderMenu()} -
- ${this.renderHelperText()}`}renderMenu(){const e=this.getMenuClasses();return u` - - ${this.renderMenuContent()} - `}getMenuClasses(){return{"mdc-select__menu":!0,"mdc-menu":!0,"mdc-menu-surface":!0,"mdc-select__menu--invalid":!this.isUiValid}}renderMenuContent(){return u``}renderRipple(){return this.outlined?b:u` - - `}renderOutline(){return this.outlined?u` - - ${this.renderLabel()} - `:b}renderLabel(){return this.label?u` - ${this.label} - `:b}renderLeadingIcon(){return this.icon?u`
${this.icon}
`:b}renderLineRipple(){return this.outlined?b:u` - - `}renderHelperText(){if(!this.shouldRenderHelperText)return b;const e=this.validationMessage&&!this.isUiValid;return u` -

${e?this.validationMessage:this.helper}

`}createAdapter(){return Object.assign(Object.assign({},v(this.mdcRoot)),{activateBottomLine:()=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.activate()},deactivateBottomLine:()=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.deactivate()},hasLabel:()=>!!this.label,floatLabel:e=>{this.labelElement&&this.labelElement.floatingLabelFoundation.float(e)},getLabelWidth:()=>this.labelElement?this.labelElement.floatingLabelFoundation.getWidth():0,setLabelRequired:e=>{this.labelElement&&this.labelElement.floatingLabelFoundation.setRequired(e)},hasOutline:()=>this.outlined,notchOutline:e=>{this.outlineElement&&!this.outlineOpen&&(this.outlineWidth=e,this.outlineOpen=!0)},closeOutline:()=>{this.outlineElement&&(this.outlineOpen=!1)},setRippleCenter:e=>{if(this.lineRippleElement){this.lineRippleElement.lineRippleFoundation.setRippleCenter(e)}},notifyChange:async e=>{if(!this.valueSetDirectly&&e===this.value)return;this.valueSetDirectly=!1,this.value=e,await this.updateComplete;const t=new Event("change",{bubbles:!0});this.dispatchEvent(t)},setSelectedText:e=>this.selectedText=e,isSelectAnchorFocused:()=>{const e=this.anchorElement;if(!e)return!1;return e.getRootNode().activeElement===e},getSelectAnchorAttr:e=>{const t=this.anchorElement;return t?t.getAttribute(e):null},setSelectAnchorAttr:(e,t)=>{const i=this.anchorElement;i&&i.setAttribute(e,t)},removeSelectAnchorAttr:e=>{const t=this.anchorElement;t&&t.removeAttribute(e)},openMenu:()=>{this.menuOpen=!0},closeMenu:()=>{this.menuOpen=!1},addMenuClass:()=>{},removeMenuClass:()=>{},getAnchorElement:()=>this.anchorElement,setMenuAnchorElement:()=>{},setMenuAnchorCorner:()=>{const e=this.menuElement;e&&(e.corner="BOTTOM_START")},setMenuWrapFocus:e=>{const t=this.menuElement;t&&(t.wrapFocus=e)},focusMenuItemAtIndex:e=>{const t=this.menuElement;if(!t)return;const i=t.items[e];i&&i.focus()},getMenuItemCount:()=>{const e=this.menuElement;return e?e.items.length:0},getMenuItemValues:()=>{const e=this.menuElement;if(!e)return[];return e.items.map((e=>e.value))},getMenuItemTextAtIndex:e=>{const t=this.menuElement;if(!t)return"";const i=t.items[e];return i?i.text:""},getSelectedIndex:()=>this.index,setSelectedIndex:()=>{},isTypeaheadInProgress:()=>T(this.typeaheadState),typeaheadMatchItem:(e,t)=>{if(!this.menuElement)return-1;const i={focusItemAtIndex:e=>{this.menuElement.focusItemAtIndex(e)},focusedItemIndex:t||this.menuElement.getFocusedItemIndex(),nextChar:e,sortedIndexByFirstChar:this.sortedIndexByFirstChar,skipFocus:!1,isItemAtIndexDisabled:e=>this.items[e].disabled},c=k(i,this.typeaheadState);return-1!==c&&this.select(c),c}})}checkValidity(){const e=this._checkValidity(this.value);if(!e){const e=new Event("invalid",{bubbles:!1,cancelable:!0});this.dispatchEvent(e)}return e}reportValidity(){const e=this.checkValidity();return this.isUiValid=e,e}_checkValidity(e){const t=this.formElement.validity;let i=D(t);if(this.validityTransform){const t=this.validityTransform(e,i);i=Object.assign(Object.assign({},i),t)}return this._validity=i,this._validity.valid}setCustomValidity(e){this.validationMessage=e,this.formElement.setCustomValidity(e)}async getUpdateComplete(){await this._menuUpdateComplete;return await super.getUpdateComplete()}async firstUpdated(){const e=this.menuElement;if(e&&(this._menuUpdateComplete=e.updateComplete,await this._menuUpdateComplete),super.firstUpdated(),this.mdcFoundation.isValid=()=>!0,this.mdcFoundation.setValid=()=>{},this.mdcFoundation.setDisabled(this.disabled),this.validateOnInitialRender&&this.reportValidity(),!this.selected){!this.items.length&&this.slotElement&&this.slotElement.assignedNodes({flatten:!0}).length&&(await new Promise((e=>requestAnimationFrame(e))),await this.layout());const e=this.items.length&&""===this.items[0].value;if(!this.value&&e)return void this.select(0);this.selectByValue(this.value)}this.sortedIndexByFirstChar=A(this.items.length,(e=>this.items[e].text))}onItemsUpdated(){this.sortedIndexByFirstChar=A(this.items.length,(e=>this.items[e].text))}select(e){const t=this.menuElement;t&&t.select(e)}selectByValue(e){let t=-1;for(let i=0;i0,l=c&&this.index{this.menuElement.focusItemAtIndex(e)},focusedItemIndex:i,isTargetListItem:!!c&&c.hasAttribute("mwc-list-item"),sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:e=>this.items[e].disabled},this.typeaheadState)}async onSelected(e){this.mdcFoundation||await this.updateComplete,this.mdcFoundation.handleMenuItemAction(e.detail.index);const t=this.items[e.detail.index];t&&(this.value=t.value)}onOpened(){this.mdcFoundation&&(this.menuOpen=!0,this.mdcFoundation.handleMenuOpened())}onClosed(){this.mdcFoundation&&(this.menuOpen=!1,this.mdcFoundation.handleMenuClosed())}setFormData(e){this.name&&null!==this.selected&&e.append(this.name,this.value)}async layout(e=!0){this.mdcFoundation&&this.mdcFoundation.layout(),await this.updateComplete;const t=this.menuElement;t&&t.layout(e);const i=this.labelElement;if(!i)return void(this.outlineOpen=!1);const c=!!this.label&&!!this.value;if(i.floatingLabelFoundation.float(c),!this.outlined)return;this.outlineOpen=c,await this.updateComplete;const l=i.floatingLabelFoundation.getWidth();this.outlineOpen&&(this.outlineWidth=l)}async layoutOptions(){this.mdcFoundation&&this.mdcFoundation.layoutOptions()}}n([r(".mdc-select")],L.prototype,"mdcRoot",void 0),n([r(".formElement")],L.prototype,"formElement",void 0),n([r("slot")],L.prototype,"slotElement",void 0),n([r("select")],L.prototype,"nativeSelectElement",void 0),n([r("input")],L.prototype,"nativeInputElement",void 0),n([r(".mdc-line-ripple")],L.prototype,"lineRippleElement",void 0),n([r(".mdc-floating-label")],L.prototype,"labelElement",void 0),n([r("mwc-notched-outline")],L.prototype,"outlineElement",void 0),n([r(".mdc-menu")],L.prototype,"menuElement",void 0),n([r(".mdc-select__anchor")],L.prototype,"anchorElement",void 0),n([s({type:Boolean,attribute:"disabled",reflect:!0}),m((function(e){this.mdcFoundation&&this.mdcFoundation.setDisabled(e)}))],L.prototype,"disabled",void 0),n([s({type:Boolean}),m((function(e,t){void 0!==t&&this.outlined!==t&&this.layout(!1)}))],L.prototype,"outlined",void 0),n([s({type:String}),m((function(e,t){void 0!==t&&this.label!==t&&this.layout(!1)}))],L.prototype,"label",void 0),n([a()],L.prototype,"outlineOpen",void 0),n([a()],L.prototype,"outlineWidth",void 0),n([s({type:String}),m((function(e){if(this.mdcFoundation){const t=null===this.selected&&!!e,i=this.selected&&this.selected.value!==e;(t||i)&&this.selectByValue(e),this.reportValidity()}}))],L.prototype,"value",void 0),n([s()],L.prototype,"name",void 0),n([a()],L.prototype,"selectedText",void 0),n([s({type:String})],L.prototype,"icon",void 0),n([a()],L.prototype,"menuOpen",void 0),n([s({type:String})],L.prototype,"helper",void 0),n([s({type:Boolean})],L.prototype,"validateOnInitialRender",void 0),n([s({type:String})],L.prototype,"validationMessage",void 0),n([s({type:Boolean})],L.prototype,"required",void 0),n([s({type:Boolean})],L.prototype,"naturalMenuWidth",void 0),n([a()],L.prototype,"isUiValid",void 0),n([s({type:Boolean})],L.prototype,"fixedMenuPosition",void 0),n([p({capture:!0})],L.prototype,"handleTypeahead",null);const F=w`.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform;transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}[dir=rtl] .mdc-floating-label,.mdc-floating-label[dir=rtl]{right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right}.mdc-floating-label--float-above{cursor:auto}.mdc-floating-label--required::after{margin-left:1px;margin-right:0px;content:"*"}[dir=rtl] .mdc-floating-label--required::after,.mdc-floating-label--required[dir=rtl]::after{margin-left:0;margin-right:1px}.mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-standard 250ms 1}@keyframes mdc-floating-label-shake-float-above-standard{0%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-106%) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{border-bottom-width:1px}.mdc-line-ripple::before{z-index:1}.mdc-line-ripple::after{transform:scaleX(0);border-bottom-width:2px;opacity:0;z-index:2}.mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline,.mdc-notched-outline[dir=rtl]{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;border-top:1px solid;border-bottom:1px solid;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}[dir=rtl] .mdc-notched-outline__leading,.mdc-notched-outline__leading[dir=rtl]{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid;flex-grow:1}[dir=rtl] .mdc-notched-outline__trailing,.mdc-notched-outline__trailing[dir=rtl]{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 12px * 2)}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(100% / 0.75)}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch,.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl]{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}.mdc-select{display:inline-flex;position:relative}.mdc-select:not(.mdc-select--disabled) .mdc-select__selected-text{color:rgba(0, 0, 0, 0.87)}.mdc-select.mdc-select--disabled .mdc-select__selected-text{color:rgba(0, 0, 0, 0.38)}.mdc-select:not(.mdc-select--disabled) .mdc-floating-label{color:rgba(0, 0, 0, 0.6)}.mdc-select:not(.mdc-select--disabled).mdc-select--focused .mdc-floating-label{color:rgba(98, 0, 238, 0.87)}.mdc-select.mdc-select--disabled .mdc-floating-label{color:rgba(0, 0, 0, 0.38)}.mdc-select:not(.mdc-select--disabled) .mdc-select__dropdown-icon{fill:rgba(0, 0, 0, 0.54)}.mdc-select:not(.mdc-select--disabled).mdc-select--focused .mdc-select__dropdown-icon{fill:#6200ee;fill:var(--mdc-theme-primary, #6200ee)}.mdc-select.mdc-select--disabled .mdc-select__dropdown-icon{fill:rgba(0, 0, 0, 0.38)}.mdc-select:not(.mdc-select--disabled)+.mdc-select-helper-text{color:rgba(0, 0, 0, 0.6)}.mdc-select.mdc-select--disabled+.mdc-select-helper-text{color:rgba(0, 0, 0, 0.38)}.mdc-select:not(.mdc-select--disabled) .mdc-select__icon{color:rgba(0, 0, 0, 0.54)}.mdc-select.mdc-select--disabled .mdc-select__icon{color:rgba(0, 0, 0, 0.38)}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-select.mdc-select--disabled .mdc-select__selected-text{color:GrayText}.mdc-select.mdc-select--disabled .mdc-select__dropdown-icon{fill:red}.mdc-select.mdc-select--disabled .mdc-floating-label{color:GrayText}.mdc-select.mdc-select--disabled .mdc-line-ripple::before{border-bottom-color:GrayText}.mdc-select.mdc-select--disabled .mdc-notched-outline__leading,.mdc-select.mdc-select--disabled .mdc-notched-outline__notch,.mdc-select.mdc-select--disabled .mdc-notched-outline__trailing{border-color:GrayText}.mdc-select.mdc-select--disabled .mdc-select__icon{color:GrayText}.mdc-select.mdc-select--disabled+.mdc-select-helper-text{color:GrayText}}.mdc-select .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-select .mdc-select__anchor{padding-left:16px;padding-right:0}[dir=rtl] .mdc-select .mdc-select__anchor,.mdc-select .mdc-select__anchor[dir=rtl]{padding-left:0;padding-right:16px}.mdc-select.mdc-select--with-leading-icon .mdc-select__anchor{padding-left:0;padding-right:0}[dir=rtl] .mdc-select.mdc-select--with-leading-icon .mdc-select__anchor,.mdc-select.mdc-select--with-leading-icon .mdc-select__anchor[dir=rtl]{padding-left:0;padding-right:0}.mdc-select .mdc-select__icon{width:24px;height:24px;font-size:24px}.mdc-select .mdc-select__dropdown-icon{width:24px;height:24px}.mdc-select .mdc-select__menu .mdc-deprecated-list-item{padding-left:16px;padding-right:16px}[dir=rtl] .mdc-select .mdc-select__menu .mdc-deprecated-list-item,.mdc-select .mdc-select__menu .mdc-deprecated-list-item[dir=rtl]{padding-left:16px;padding-right:16px}.mdc-select .mdc-select__menu .mdc-deprecated-list-item__graphic{margin-left:0;margin-right:12px}[dir=rtl] .mdc-select .mdc-select__menu .mdc-deprecated-list-item__graphic,.mdc-select .mdc-select__menu .mdc-deprecated-list-item__graphic[dir=rtl]{margin-left:12px;margin-right:0}.mdc-select__dropdown-icon{margin-left:12px;margin-right:12px;display:inline-flex;position:relative;align-self:center;align-items:center;justify-content:center;flex-shrink:0;pointer-events:none}.mdc-select__dropdown-icon .mdc-select__dropdown-icon-active,.mdc-select__dropdown-icon .mdc-select__dropdown-icon-inactive{position:absolute;top:0;left:0}.mdc-select__dropdown-icon .mdc-select__dropdown-icon-graphic{width:41.6666666667%;height:20.8333333333%}.mdc-select__dropdown-icon .mdc-select__dropdown-icon-inactive{opacity:1;transition:opacity 75ms linear 75ms}.mdc-select__dropdown-icon .mdc-select__dropdown-icon-active{opacity:0;transition:opacity 75ms linear}[dir=rtl] .mdc-select__dropdown-icon,.mdc-select__dropdown-icon[dir=rtl]{margin-left:12px;margin-right:12px}.mdc-select--activated .mdc-select__dropdown-icon .mdc-select__dropdown-icon-inactive{opacity:0;transition:opacity 49.5ms linear}.mdc-select--activated .mdc-select__dropdown-icon .mdc-select__dropdown-icon-active{opacity:1;transition:opacity 100.5ms linear 49.5ms}.mdc-select__anchor{width:200px;min-width:0;flex:1 1 auto;position:relative;box-sizing:border-box;overflow:hidden;outline:none;cursor:pointer}.mdc-select__anchor .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-select__selected-text-container{display:flex;appearance:none;pointer-events:none;box-sizing:border-box;width:auto;min-width:0;flex-grow:1;height:28px;border:none;outline:none;padding:0;background-color:transparent;color:inherit}.mdc-select__selected-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height, 1.75rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;width:100%;text-align:left}[dir=rtl] .mdc-select__selected-text,.mdc-select__selected-text[dir=rtl]{text-align:right}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-floating-label{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-floating-label{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--invalid+.mdc-select-helper-text--validation-msg{color:#b00020;color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-select__dropdown-icon{fill:#b00020;fill:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-select__dropdown-icon{fill:#b00020;fill:var(--mdc-theme-error, #b00020)}.mdc-select--disabled{cursor:default;pointer-events:none}.mdc-select--with-leading-icon .mdc-select__menu .mdc-deprecated-list-item{padding-left:12px;padding-right:12px}[dir=rtl] .mdc-select--with-leading-icon .mdc-select__menu .mdc-deprecated-list-item,.mdc-select--with-leading-icon .mdc-select__menu .mdc-deprecated-list-item[dir=rtl]{padding-left:12px;padding-right:12px}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-select__menu::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid transparent;border-radius:inherit;content:"";pointer-events:none}}@media screen and (forced-colors: active)and (forced-colors: active),screen and (-ms-high-contrast: active)and (forced-colors: active){.mdc-select__menu::before{border-color:CanvasText}}.mdc-select__menu .mdc-deprecated-list .mdc-select__icon,.mdc-select__menu .mdc-list .mdc-select__icon{margin-left:0;margin-right:0}[dir=rtl] .mdc-select__menu .mdc-deprecated-list .mdc-select__icon,[dir=rtl] .mdc-select__menu .mdc-list .mdc-select__icon,.mdc-select__menu .mdc-deprecated-list .mdc-select__icon[dir=rtl],.mdc-select__menu .mdc-list .mdc-select__icon[dir=rtl]{margin-left:0;margin-right:0}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--activated,.mdc-select__menu .mdc-list .mdc-deprecated-list-item--selected,.mdc-select__menu .mdc-list .mdc-deprecated-list-item--activated{color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-deprecated-list-item__graphic,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--activated .mdc-deprecated-list-item__graphic,.mdc-select__menu .mdc-list .mdc-deprecated-list-item--selected .mdc-deprecated-list-item__graphic,.mdc-select__menu .mdc-list .mdc-deprecated-list-item--activated .mdc-deprecated-list-item__graphic{color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-select__menu .mdc-list-item__start{display:inline-flex;align-items:center}.mdc-select__option{padding-left:16px;padding-right:16px}[dir=rtl] .mdc-select__option,.mdc-select__option[dir=rtl]{padding-left:16px;padding-right:16px}.mdc-select__one-line-option.mdc-list-item--with-one-line{height:48px}.mdc-select__two-line-option.mdc-list-item--with-two-lines{height:64px}.mdc-select__two-line-option.mdc-list-item--with-two-lines .mdc-list-item__start{margin-top:20px}.mdc-select__two-line-option.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-select__two-line-option.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-select__two-line-option.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-select__two-line-option.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-select__two-line-option.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:36px;content:"";vertical-align:0}.mdc-select__option-with-leading-content{padding-left:0;padding-right:12px}.mdc-select__option-with-leading-content.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-select__option-with-leading-content.mdc-list-item,.mdc-select__option-with-leading-content.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-select__option-with-leading-content .mdc-list-item__start{margin-left:12px;margin-right:0}[dir=rtl] .mdc-select__option-with-leading-content .mdc-list-item__start,.mdc-select__option-with-leading-content .mdc-list-item__start[dir=rtl]{margin-left:0;margin-right:12px}.mdc-select__option-with-leading-content .mdc-list-item__start{width:36px;height:24px}[dir=rtl] .mdc-select__option-with-leading-content,.mdc-select__option-with-leading-content[dir=rtl]{padding-left:12px;padding-right:0}.mdc-select__option-with-meta.mdc-list-item{padding-left:auto;padding-right:0}[dir=rtl] .mdc-select__option-with-meta.mdc-list-item,.mdc-select__option-with-meta.mdc-list-item[dir=rtl]{padding-left:0;padding-right:auto}.mdc-select__option-with-meta .mdc-list-item__end{margin-left:12px;margin-right:12px}[dir=rtl] .mdc-select__option-with-meta .mdc-list-item__end,.mdc-select__option-with-meta .mdc-list-item__end[dir=rtl]{margin-left:12px;margin-right:12px}.mdc-select--filled .mdc-select__anchor{height:56px;display:flex;align-items:baseline}.mdc-select--filled .mdc-select__anchor::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}.mdc-select--filled.mdc-select--no-label .mdc-select__anchor .mdc-select__selected-text::before{content:"​"}.mdc-select--filled.mdc-select--no-label .mdc-select__anchor .mdc-select__selected-text-container{height:100%;display:inline-flex;align-items:center}.mdc-select--filled.mdc-select--no-label .mdc-select__anchor::before{display:none}.mdc-select--filled .mdc-select__anchor{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:0;border-bottom-left-radius:0}.mdc-select--filled:not(.mdc-select--disabled) .mdc-select__anchor{background-color:whitesmoke}.mdc-select--filled.mdc-select--disabled .mdc-select__anchor{background-color:#fafafa}.mdc-select--filled:not(.mdc-select--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.42)}.mdc-select--filled:not(.mdc-select--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.87)}.mdc-select--filled:not(.mdc-select--disabled) .mdc-line-ripple::after{border-bottom-color:#6200ee;border-bottom-color:var(--mdc-theme-primary, #6200ee)}.mdc-select--filled.mdc-select--disabled .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.06)}.mdc-select--filled .mdc-floating-label{max-width:calc(100% - 64px)}.mdc-select--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-select--filled .mdc-menu-surface--is-open-below{border-top-left-radius:0px;border-top-right-radius:0px}.mdc-select--filled.mdc-select--focused.mdc-line-ripple::after{transform:scale(1, 2);opacity:1}.mdc-select--filled .mdc-floating-label{left:16px;right:initial}[dir=rtl] .mdc-select--filled .mdc-floating-label,.mdc-select--filled .mdc-floating-label[dir=rtl]{left:initial;right:16px}.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label{left:48px;right:initial}[dir=rtl] .mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label,.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label[dir=rtl]{left:initial;right:48px}.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label{max-width:calc(100% - 96px)}.mdc-select--filled.mdc-select--with-leading-icon .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 96px / 0.75)}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled):hover .mdc-line-ripple::before{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-select--invalid:not(.mdc-select--disabled) .mdc-line-ripple::after{border-bottom-color:#b00020;border-bottom-color:var(--mdc-theme-error, #b00020)}.mdc-select--outlined{border:none}.mdc-select--outlined .mdc-select__anchor{height:56px}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{font-size:.75rem}.mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-select-outlined-56px 250ms 1}@keyframes mdc-floating-label-shake-float-above-select-outlined-56px{0%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}}.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}[dir=rtl] .mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px, var(--mdc-shape-small, 4px)) * 2)}}.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:4px;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:4px;border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}[dir=rtl] .mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-select--outlined .mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:4px;border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:4px;border-bottom-left-radius:var(--mdc-shape-small, 4px)}@supports(top: max(0%)){.mdc-select--outlined .mdc-select__anchor{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}[dir=rtl] .mdc-select--outlined .mdc-select__anchor,.mdc-select--outlined .mdc-select__anchor[dir=rtl]{padding-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-select--outlined .mdc-select__anchor,.mdc-select--outlined .mdc-select__anchor[dir=rtl]{padding-right:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-select--outlined+.mdc-select-helper-text{margin-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}[dir=rtl] .mdc-select--outlined+.mdc-select-helper-text,.mdc-select--outlined+.mdc-select-helper-text[dir=rtl]{margin-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-select--outlined+.mdc-select-helper-text,.mdc-select--outlined+.mdc-select-helper-text[dir=rtl]{margin-right:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}.mdc-select--outlined:not(.mdc-select--disabled) .mdc-select__anchor{background-color:transparent}.mdc-select--outlined.mdc-select--disabled .mdc-select__anchor{background-color:transparent}.mdc-select--outlined:not(.mdc-select--disabled) .mdc-notched-outline__leading,.mdc-select--outlined:not(.mdc-select--disabled) .mdc-notched-outline__notch,.mdc-select--outlined:not(.mdc-select--disabled) .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.38)}.mdc-select--outlined:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.87)}.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-width:2px}.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#6200ee;border-color:var(--mdc-theme-primary, #6200ee)}.mdc-select--outlined.mdc-select--disabled .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--disabled .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--disabled .mdc-notched-outline__trailing{border-color:rgba(0, 0, 0, 0.06)}.mdc-select--outlined .mdc-select__anchor :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-select--outlined .mdc-select__anchor{display:flex;align-items:baseline;overflow:visible}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-select-outlined 250ms 1}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-select--outlined .mdc-select__anchor .mdc-floating-label--float-above{font-size:.75rem}.mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-select--outlined .mdc-select__anchor.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-select--outlined .mdc-select__anchor .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-select--outlined .mdc-select__anchor .mdc-select__selected-text::before{content:"​"}.mdc-select--outlined .mdc-select__anchor .mdc-select__selected-text-container{height:100%;display:inline-flex;align-items:center}.mdc-select--outlined .mdc-select__anchor::before{display:none}.mdc-select--outlined .mdc-select__selected-text-container{display:flex;border:none;z-index:1;background-color:transparent}.mdc-select--outlined .mdc-select__icon{z-index:2}.mdc-select--outlined .mdc-floating-label{line-height:1.15rem;left:4px;right:initial}[dir=rtl] .mdc-select--outlined .mdc-floating-label,.mdc-select--outlined .mdc-floating-label[dir=rtl]{left:initial;right:4px}.mdc-select--outlined.mdc-select--focused .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled) .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled) .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled) .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled):not(.mdc-select--focused) .mdc-select__anchor:hover .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-width:2px}.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__leading,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__notch,.mdc-select--outlined.mdc-select--invalid:not(.mdc-select--disabled).mdc-select--focused .mdc-notched-outline .mdc-notched-outline__trailing{border-color:#b00020;border-color:var(--mdc-theme-error, #b00020)}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label{left:36px;right:initial}[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label,.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label[dir=rtl]{left:initial;right:36px}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above{transform:translateY(-37.25px) translateX(-32px) scale(1)}[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above,.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-37.25px) translateX(32px) scale(1)}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--float-above{font-size:.75rem}.mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) translateX(-32px) scale(0.75)}[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above,[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl],.mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-34.75px) translateX(32px) scale(0.75)}.mdc-select--outlined.mdc-select--with-leading-icon.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-select--outlined.mdc-select--with-leading-icon .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px 250ms 1}@keyframes mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px{0%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}}[dir=rtl] .mdc-select--outlined.mdc-select--with-leading-icon .mdc-floating-label--shake,.mdc-select--outlined.mdc-select--with-leading-icon[dir=rtl] .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px 250ms 1}@keyframes mdc-floating-label-shake-float-above-select-outlined-leading-icon-56px-rtl{0%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - -32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - -32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}}.mdc-select--outlined.mdc-select--with-leading-icon .mdc-select__anchor :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 96px)}.mdc-select--outlined .mdc-menu-surface{margin-bottom:8px}.mdc-select--outlined.mdc-select--no-label .mdc-menu-surface,.mdc-select--outlined .mdc-menu-surface--is-open-below{margin-bottom:0}.mdc-select__anchor{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity}.mdc-select__anchor .mdc-select__ripple::before,.mdc-select__anchor .mdc-select__ripple::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-select__anchor .mdc-select__ripple::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-select__anchor .mdc-select__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-select__anchor.mdc-ripple-upgraded .mdc-select__ripple::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-select__anchor.mdc-ripple-upgraded .mdc-select__ripple::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-select__anchor.mdc-ripple-upgraded--unbounded .mdc-select__ripple::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-select__anchor.mdc-ripple-upgraded--foreground-activation .mdc-select__ripple::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-select__anchor.mdc-ripple-upgraded--foreground-deactivation .mdc-select__ripple::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-select__anchor .mdc-select__ripple::before,.mdc-select__anchor .mdc-select__ripple::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-select__anchor.mdc-ripple-upgraded .mdc-select__ripple::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-select__anchor .mdc-select__ripple::before,.mdc-select__anchor .mdc-select__ripple::after{background-color:rgba(0, 0, 0, 0.87);background-color:var(--mdc-ripple-color, rgba(0, 0, 0, 0.87))}.mdc-select__anchor:hover .mdc-select__ripple::before,.mdc-select__anchor.mdc-ripple-surface--hover .mdc-select__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-select__anchor.mdc-ripple-upgraded--background-focused .mdc-select__ripple::before,.mdc-select__anchor:not(.mdc-ripple-upgraded):focus .mdc-select__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-select__anchor .mdc-select__ripple{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-deprecated-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-deprecated-list-item__ripple::after{background-color:#000;background-color:var(--mdc-ripple-color, var(--mdc-theme-on-surface, #000))}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:hover .mdc-deprecated-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-surface--hover .mdc-deprecated-list-item__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-upgraded--background-focused .mdc-deprecated-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):focus .mdc-deprecated-list-item__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded) .mdc-deprecated-list-item__ripple::after{transition:opacity 150ms linear}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):active .mdc-deprecated-list-item__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected .mdc-list-item__ripple::after{background-color:#000;background-color:var(--mdc-ripple-color, var(--mdc-theme-on-surface, #000))}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:hover .mdc-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-surface--hover .mdc-list-item__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-upgraded--background-focused .mdc-list-item__ripple::before,.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):focus .mdc-list-item__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded) .mdc-list-item__ripple::after{transition:opacity 150ms linear}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected:not(.mdc-ripple-upgraded):active .mdc-list-item__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-select__menu .mdc-deprecated-list .mdc-deprecated-list-item--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-select-helper-text{margin:0;margin-left:16px;margin-right:16px;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.75rem;font-size:var(--mdc-typography-caption-font-size, 0.75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight, 400);letter-spacing:0.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, 0.0333333333em);text-decoration:inherit;text-decoration:var(--mdc-typography-caption-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform, inherit);display:block;margin-top:0;line-height:normal}[dir=rtl] .mdc-select-helper-text,.mdc-select-helper-text[dir=rtl]{margin-left:16px;margin-right:16px}.mdc-select-helper-text::before{display:inline-block;width:0;height:16px;content:"";vertical-align:0}.mdc-select-helper-text--validation-msg{opacity:0;transition:opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-select--invalid+.mdc-select-helper-text--validation-msg,.mdc-select-helper-text--validation-msg-persistent{opacity:1}.mdc-select--with-leading-icon .mdc-select__icon{display:inline-block;box-sizing:border-box;border:none;text-decoration:none;cursor:pointer;user-select:none;flex-shrink:0;align-self:center;background-color:transparent;fill:currentColor}.mdc-select--with-leading-icon .mdc-select__icon{margin-left:12px;margin-right:12px}[dir=rtl] .mdc-select--with-leading-icon .mdc-select__icon,.mdc-select--with-leading-icon .mdc-select__icon[dir=rtl]{margin-left:12px;margin-right:12px}.mdc-select__icon:not([tabindex]),.mdc-select__icon[tabindex="-1"]{cursor:default;pointer-events:none}.material-icons{font-family:var(--mdc-icon-font, "Material Icons");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}:host{display:inline-block;vertical-align:top;outline:none}.mdc-select{width:100%}[hidden]{display:none}.mdc-select__icon{z-index:2}.mdc-select--with-leading-icon{--mdc-list-item-graphic-margin: calc( 48px - var(--mdc-list-item-graphic-size, 24px) - var(--mdc-list-side-padding, 16px) )}.mdc-select .mdc-select__anchor .mdc-select__selected-text{overflow:hidden}.mdc-select .mdc-select__anchor *{display:inline-flex}.mdc-select .mdc-select__anchor .mdc-floating-label{display:inline-block}mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-select-outlined-idle-border-color, rgba(0, 0, 0, 0.38) );--mdc-notched-outline-notch-offset: 1px}:host(:not([disabled]):hover) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-select-outlined-hover-border-color, rgba(0, 0, 0, 0.87) )}:host(:not([disabled])) .mdc-select:not(.mdc-select--disabled) .mdc-select__selected-text{color:rgba(0, 0, 0, 0.87);color:var(--mdc-select-ink-color, rgba(0, 0, 0, 0.87))}:host(:not([disabled])) .mdc-select:not(.mdc-select--disabled) .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.42);border-bottom-color:var(--mdc-select-idle-line-color, rgba(0, 0, 0, 0.42))}:host(:not([disabled])) .mdc-select:not(.mdc-select--disabled):hover .mdc-line-ripple::before{border-bottom-color:rgba(0, 0, 0, 0.87);border-bottom-color:var(--mdc-select-hover-line-color, rgba(0, 0, 0, 0.87))}:host(:not([disabled])) .mdc-select:not(.mdc-select--outlined):not(.mdc-select--disabled) .mdc-select__anchor{background-color:whitesmoke;background-color:var(--mdc-select-fill-color, whitesmoke)}:host(:not([disabled])) .mdc-select.mdc-select--invalid .mdc-select__dropdown-icon{fill:var(--mdc-select-error-dropdown-icon-color, var(--mdc-select-error-color, var(--mdc-theme-error, #b00020)))}:host(:not([disabled])) .mdc-select.mdc-select--invalid .mdc-floating-label,:host(:not([disabled])) .mdc-select.mdc-select--invalid .mdc-floating-label::after{color:var(--mdc-select-error-color, var(--mdc-theme-error, #b00020))}:host(:not([disabled])) .mdc-select.mdc-select--invalid mwc-notched-outline{--mdc-notched-outline-border-color: var(--mdc-select-error-color, var(--mdc-theme-error, #b00020))}.mdc-select__menu--invalid{--mdc-theme-primary: var(--mdc-select-error-color, var(--mdc-theme-error, #b00020))}:host(:not([disabled])) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-floating-label,:host(:not([disabled])) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-floating-label::after{color:rgba(0, 0, 0, 0.6);color:var(--mdc-select-label-ink-color, rgba(0, 0, 0, 0.6))}:host(:not([disabled])) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-select__dropdown-icon{fill:rgba(0, 0, 0, 0.54);fill:var(--mdc-select-dropdown-icon-color, rgba(0, 0, 0, 0.54))}:host(:not([disabled])) .mdc-select.mdc-select--focused mwc-notched-outline{--mdc-notched-outline-stroke-width: 2px;--mdc-notched-outline-notch-offset: 2px}:host(:not([disabled])) .mdc-select.mdc-select--focused:not(.mdc-select--invalid) mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-select-focused-label-color, var(--mdc-theme-primary, rgba(98, 0, 238, 0.87)) )}:host(:not([disabled])) .mdc-select.mdc-select--focused:not(.mdc-select--invalid) .mdc-select__dropdown-icon{fill:rgba(98,0,238,.87);fill:var(--mdc-select-focused-dropdown-icon-color, var(--mdc-theme-primary, rgba(98, 0, 238, 0.87)))}:host(:not([disabled])) .mdc-select.mdc-select--focused:not(.mdc-select--invalid) .mdc-floating-label{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}:host(:not([disabled])) .mdc-select.mdc-select--focused:not(.mdc-select--invalid) .mdc-floating-label::after{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}:host(:not([disabled])) .mdc-select-helper-text:not(.mdc-select-helper-text--validation-msg){color:var(--mdc-select-label-ink-color, rgba(0, 0, 0, 0.6))}:host([disabled]){pointer-events:none}:host([disabled]) .mdc-select:not(.mdc-select--outlined).mdc-select--disabled .mdc-select__anchor{background-color:#fafafa;background-color:var(--mdc-select-disabled-fill-color, #fafafa)}:host([disabled]) .mdc-select.mdc-select--outlined mwc-notched-outline{--mdc-notched-outline-border-color: var( --mdc-select-outlined-disabled-border-color, rgba(0, 0, 0, 0.06) )}:host([disabled]) .mdc-select .mdc-select__dropdown-icon{fill:rgba(0, 0, 0, 0.38);fill:var(--mdc-select-disabled-dropdown-icon-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-floating-label,:host([disabled]) .mdc-select:not(.mdc-select--invalid):not(.mdc-select--focused) .mdc-floating-label::after{color:rgba(0, 0, 0, 0.38);color:var(--mdc-select-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-select-helper-text{color:rgba(0, 0, 0, 0.38);color:var(--mdc-select-disabled-ink-color, rgba(0, 0, 0, 0.38))}:host([disabled]) .mdc-select__selected-text{color:rgba(0, 0, 0, 0.38);color:var(--mdc-select-disabled-ink-color, rgba(0, 0, 0, 0.38))}`;let V=class extends L{};V.styles=[F],V=n([I("mwc-select")],V);export{V as Select}; diff --git a/material-yew/build/mwc-slider.js b/material-yew/build/mwc-slider.js deleted file mode 100644 index 83bfd6f..0000000 --- a/material-yew/build/mwc-slider.js +++ /dev/null @@ -1,60 +0,0 @@ -import{d as t,g as e,h as i,A as r,a8 as n,a9 as a,M as s,_ as d,t as o,i as u,b as l,e as h,a as c,F as m,R as p,y as v,o as b,a5 as T,l as f,E as g,K as y,f as S}from"./core.js";export{a8 as Thumb}from"./core.js";const E=t`.mdc-slider{cursor:pointer;height:48px;margin:0 24px;position:relative;touch-action:pan-y}.mdc-slider .mdc-slider__track{height:4px;position:absolute;top:50%;transform:translateY(-50%);width:100%}.mdc-slider .mdc-slider__track--active,.mdc-slider .mdc-slider__track--inactive{display:flex;height:100%;position:absolute;width:100%}.mdc-slider .mdc-slider__track--active{border-radius:3px;height:6px;overflow:hidden;top:-1px}.mdc-slider .mdc-slider__track--active_fill{border-top:6px solid;box-sizing:border-box;height:100%;width:100%;position:relative;-webkit-transform-origin:left;transform-origin:left}[dir=rtl] .mdc-slider .mdc-slider__track--active_fill,.mdc-slider .mdc-slider__track--active_fill[dir=rtl]{-webkit-transform-origin:right;transform-origin:right}.mdc-slider .mdc-slider__track--inactive{border-radius:2px;height:4px;left:0;top:0}.mdc-slider .mdc-slider__track--inactive::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid transparent;border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-slider .mdc-slider__track--inactive::before{border-color:CanvasText}}.mdc-slider .mdc-slider__track--active_fill{border-color:#6200ee;border-color:var(--mdc-theme-primary, #6200ee)}.mdc-slider.mdc-slider--disabled .mdc-slider__track--active_fill{border-color:#000;border-color:var(--mdc-theme-on-surface, #000)}.mdc-slider .mdc-slider__track--inactive{background-color:#6200ee;background-color:var(--mdc-theme-primary, #6200ee);opacity:.24}.mdc-slider.mdc-slider--disabled .mdc-slider__track--inactive{background-color:#000;background-color:var(--mdc-theme-on-surface, #000);opacity:.24}.mdc-slider .mdc-slider__value-indicator-container{bottom:44px;left:50%;left:var(--slider-value-indicator-container-left, 50%);pointer-events:none;position:absolute;right:var(--slider-value-indicator-container-right);transform:translateX(-50%);transform:var(--slider-value-indicator-container-transform, translateX(-50%))}.mdc-slider .mdc-slider__value-indicator{transition:transform 100ms 0ms cubic-bezier(0.4, 0, 1, 1);align-items:center;border-radius:4px;display:flex;height:32px;padding:0 12px;transform:scale(0);transform-origin:bottom}.mdc-slider .mdc-slider__value-indicator::before{border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid;bottom:-5px;content:"";height:0;left:50%;left:var(--slider-value-indicator-caret-left, 50%);position:absolute;right:var(--slider-value-indicator-caret-right);transform:translateX(-50%);transform:var(--slider-value-indicator-caret-transform, translateX(-50%));width:0}.mdc-slider .mdc-slider__value-indicator::after{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid transparent;border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-slider .mdc-slider__value-indicator::after{border-color:CanvasText}}.mdc-slider .mdc-slider__thumb--with-indicator .mdc-slider__value-indicator-container{pointer-events:auto}.mdc-slider .mdc-slider__thumb--with-indicator .mdc-slider__value-indicator{transition:transform 100ms 0ms cubic-bezier(0, 0, 0.2, 1);transform:scale(1)}@media(prefers-reduced-motion){.mdc-slider .mdc-slider__value-indicator,.mdc-slider .mdc-slider__thumb--with-indicator .mdc-slider__value-indicator{transition:none}}.mdc-slider .mdc-slider__value-indicator-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-subtitle2-font-size, 0.875rem);line-height:1.375rem;line-height:var(--mdc-typography-subtitle2-line-height, 1.375rem);font-weight:500;font-weight:var(--mdc-typography-subtitle2-font-weight, 500);letter-spacing:0.0071428571em;letter-spacing:var(--mdc-typography-subtitle2-letter-spacing, 0.0071428571em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle2-text-transform, inherit)}.mdc-slider .mdc-slider__value-indicator{background-color:#000;opacity:.6}.mdc-slider .mdc-slider__value-indicator::before{border-top-color:#000}.mdc-slider .mdc-slider__value-indicator{color:#fff;color:var(--mdc-theme-on-primary, #fff)}.mdc-slider .mdc-slider__thumb{display:flex;height:48px;left:-24px;outline:none;position:absolute;user-select:none;width:48px}.mdc-slider .mdc-slider__thumb--top{z-index:1}.mdc-slider .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-style:solid;border-width:1px;box-sizing:content-box}.mdc-slider .mdc-slider__thumb-knob{box-shadow:0px 2px 1px -1px rgba(0, 0, 0, 0.2),0px 1px 1px 0px rgba(0, 0, 0, 0.14),0px 1px 3px 0px rgba(0,0,0,.12);border:10px solid;border-radius:50%;box-sizing:border-box;height:20px;left:50%;position:absolute;top:50%;transform:translate(-50%, -50%);width:20px}.mdc-slider .mdc-slider__thumb-knob{background-color:#6200ee;background-color:var(--mdc-theme-primary, #6200ee);border-color:#6200ee;border-color:var(--mdc-theme-primary, #6200ee)}.mdc-slider .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-color:#fff}.mdc-slider.mdc-slider--disabled .mdc-slider__thumb-knob{background-color:#000;background-color:var(--mdc-theme-on-surface, #000);border-color:#000;border-color:var(--mdc-theme-on-surface, #000)}.mdc-slider.mdc-slider--disabled .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mdc-slider.mdc-slider--disabled .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mdc-slider.mdc-slider--disabled .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-color:#fff}.mdc-slider .mdc-slider__thumb::before,.mdc-slider .mdc-slider__thumb::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-slider .mdc-slider__thumb:hover::before,.mdc-slider .mdc-slider__thumb.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-slider .mdc-slider__thumb.mdc-ripple-upgraded--background-focused::before,.mdc-slider .mdc-slider__thumb:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-slider .mdc-slider__thumb:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-slider .mdc-slider__thumb:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-slider .mdc-slider__thumb.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-slider .mdc-slider__tick-marks{align-items:center;box-sizing:border-box;display:flex;height:100%;justify-content:space-between;padding:0 1px;position:absolute;width:100%}.mdc-slider .mdc-slider__tick-mark--active,.mdc-slider .mdc-slider__tick-mark--inactive{border-radius:50%;height:2px;width:2px}.mdc-slider .mdc-slider__tick-mark--active{background-color:#fff;background-color:var(--mdc-theme-on-primary, #fff);opacity:.6}.mdc-slider.mdc-slider--disabled .mdc-slider__tick-mark--active{background-color:#fff;background-color:var(--mdc-theme-on-primary, #fff);opacity:.6}.mdc-slider .mdc-slider__tick-mark--inactive{background-color:#6200ee;background-color:var(--mdc-theme-primary, #6200ee);opacity:.6}.mdc-slider.mdc-slider--disabled .mdc-slider__tick-mark--inactive{background-color:#000;background-color:var(--mdc-theme-on-surface, #000);opacity:.6}.mdc-slider--discrete .mdc-slider__thumb,.mdc-slider--discrete .mdc-slider__track--active_fill{transition:transform 80ms ease}@media(prefers-reduced-motion){.mdc-slider--discrete .mdc-slider__thumb,.mdc-slider--discrete .mdc-slider__track--active_fill{transition:none}}.mdc-slider--disabled{opacity:.38;cursor:auto}.mdc-slider--disabled .mdc-slider__thumb{pointer-events:none}.mdc-slider__input{cursor:pointer;left:0;margin:0;height:100%;opacity:0;pointer-events:none;position:absolute;top:0;width:100%}:host{outline:none;display:block;-webkit-tap-highlight-color:transparent}.ripple{--mdc-ripple-color:#6200ee;--mdc-ripple-color:var(--mdc-theme-primary, #6200ee)}`;var _={animation:{prefixed:"-webkit-animation",standard:"animation"},transform:{prefixed:"-webkit-transform",standard:"transform"},transition:{prefixed:"-webkit-transition",standard:"transition"}};function R(t,e){if(function(t){return Boolean(t.document)&&"function"==typeof t.document.createElement}(t)&&e in _){var i=t.document.createElement("div"),r=_[e],n=r.standard,a=r.prefixed;return n in i.style?n:a}return e}var k,w="mdc-slider--disabled",A="mdc-slider--discrete",I="mdc-slider--range",x="mdc-slider__thumb--focused",D="mdc-slider__thumb--top",C="mdc-slider__thumb--with-indicator",P="mdc-slider--tick-marks",M=1,F=0,N=5,L="aria-valuetext",H="disabled",V="min",B="max",$="value",U="step",X="data-min-range",W="--slider-value-indicator-caret-left",O="--slider-value-indicator-caret-right",z="--slider-value-indicator-caret-transform",K="--slider-value-indicator-container-left",q="--slider-value-indicator-container-right",j="--slider-value-indicator-container-transform";!function(t){t.SLIDER_UPDATE="slider_update"}(k||(k={}));var Y="undefined"!=typeof window,G=function(t){function s(e){var n=t.call(this,i(i({},s.defaultAdapter),e))||this;return n.initialStylesRemoved=!1,n.isDisabled=!1,n.isDiscrete=!1,n.step=M,n.minRange=F,n.hasTickMarks=!1,n.isRange=!1,n.thumb=null,n.downEventClientX=null,n.startThumbKnobWidth=0,n.endThumbKnobWidth=0,n.animFrame=new r,n}return e(s,t),Object.defineProperty(s,"defaultAdapter",{get:function(){return{hasClass:function(){return!1},addClass:function(){},removeClass:function(){},addThumbClass:function(){},removeThumbClass:function(){},getAttribute:function(){return null},getInputValue:function(){return""},setInputValue:function(){},getInputAttribute:function(){return null},setInputAttribute:function(){return null},removeInputAttribute:function(){return null},focusInput:function(){},isInputFocused:function(){return!1},shouldHideFocusStylesForPointerEvents:function(){return!1},getThumbKnobWidth:function(){return 0},getValueIndicatorContainerWidth:function(){return 0},getThumbBoundingClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},getBoundingClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},isRTL:function(){return!1},setThumbStyleProperty:function(){},removeThumbStyleProperty:function(){},setTrackActiveStyleProperty:function(){},removeTrackActiveStyleProperty:function(){},setValueIndicatorText:function(){},getValueToAriaValueTextFn:function(){return null},updateTickMarks:function(){},setPointerCapture:function(){},emitChangeEvent:function(){},emitInputEvent:function(){},emitDragStartEvent:function(){},emitDragEndEvent:function(){},registerEventHandler:function(){},deregisterEventHandler:function(){},registerThumbEventHandler:function(){},deregisterThumbEventHandler:function(){},registerInputEventHandler:function(){},deregisterInputEventHandler:function(){},registerBodyEventHandler:function(){},deregisterBodyEventHandler:function(){},registerWindowEventHandler:function(){},deregisterWindowEventHandler:function(){}}},enumerable:!1,configurable:!0}),s.prototype.init=function(){var t=this;this.isDisabled=this.adapter.hasClass(w),this.isDiscrete=this.adapter.hasClass(A),this.hasTickMarks=this.adapter.hasClass(P),this.isRange=this.adapter.hasClass(I);var e=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(V,this.isRange?n.START:n.END),V),i=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(B,n.END),B),r=this.convertAttributeValueToNumber(this.adapter.getInputAttribute($,n.END),$),a=this.isRange?this.convertAttributeValueToNumber(this.adapter.getInputAttribute($,n.START),$):e,s=this.adapter.getInputAttribute(U,n.END),d=s?this.convertAttributeValueToNumber(s,U):this.step,o=this.adapter.getAttribute(X),u=o?this.convertAttributeValueToNumber(o,X):this.minRange;this.validateProperties({min:e,max:i,value:r,valueStart:a,step:d,minRange:u}),this.min=e,this.max=i,this.value=r,this.valueStart=a,this.step=d,this.minRange=u,this.numDecimalPlaces=J(this.step),this.valueBeforeDownEvent=r,this.valueStartBeforeDownEvent=a,this.mousedownOrTouchstartListener=this.handleMousedownOrTouchstart.bind(this),this.moveListener=this.handleMove.bind(this),this.pointerdownListener=this.handlePointerdown.bind(this),this.pointerupListener=this.handlePointerup.bind(this),this.thumbMouseenterListener=this.handleThumbMouseenter.bind(this),this.thumbMouseleaveListener=this.handleThumbMouseleave.bind(this),this.inputStartChangeListener=function(){t.handleInputChange(n.START)},this.inputEndChangeListener=function(){t.handleInputChange(n.END)},this.inputStartFocusListener=function(){t.handleInputFocus(n.START)},this.inputEndFocusListener=function(){t.handleInputFocus(n.END)},this.inputStartBlurListener=function(){t.handleInputBlur(n.START)},this.inputEndBlurListener=function(){t.handleInputBlur(n.END)},this.resizeListener=this.handleResize.bind(this),this.registerEventHandlers()},s.prototype.destroy=function(){this.deregisterEventHandlers()},s.prototype.setMin=function(t){this.min=t,this.isRange||(this.valueStart=t),this.updateUI()},s.prototype.setMax=function(t){this.max=t,this.updateUI()},s.prototype.getMin=function(){return this.min},s.prototype.getMax=function(){return this.max},s.prototype.getValue=function(){return this.value},s.prototype.setValue=function(t){if(this.isRange&&t= start thumb value ("+this.valueStart+") + min range ("+this.minRange+")");this.updateValue(t,n.END)},s.prototype.getValueStart=function(){if(!this.isRange)throw new Error("`valueStart` is only applicable for range sliders.");return this.valueStart},s.prototype.setValueStart=function(t){if(!this.isRange)throw new Error("`valueStart` is only applicable for range sliders.");if(this.isRange&&t>this.value-this.minRange)throw new Error("start thumb value ("+t+") must be <= end thumb value ("+this.value+") - min range ("+this.minRange+")");this.updateValue(t,n.START)},s.prototype.setStep=function(t){this.step=t,this.numDecimalPlaces=J(t),this.updateUI()},s.prototype.setMinRange=function(t){if(!this.isRange)throw new Error("`minRange` is only applicable for range sliders.");if(t<0)throw new Error("`minRange` must be non-negative. Current value: "+t);if(this.value-this.valueStart=i.left&&t<=i.right,s=t>=r.left&&t<=r.right;return a&&s?null:a?n.START:s?n.END:ethis.value?n.END:e-this.valueStart<=this.value-e?n.START:n.END},s.prototype.getThumbFromMoveEvent=function(t){if(null!==this.thumb)return this.thumb;if(null===this.downEventClientX)throw new Error("`downEventClientX` is null after move event.");return Math.abs(this.downEventClientX-t)this.value-this.minRange?this.value-this.minRange:this.isRange&&e===n.END&&te+i?(this.adapter.setThumbStyleProperty(W,i+"px",t),this.adapter.setThumbStyleProperty(O,"auto",t),this.adapter.setThumbStyleProperty(z,"translateX(-50%)",t),this.adapter.setThumbStyleProperty(K,"0",t),this.adapter.setThumbStyleProperty(q,"auto",t),this.adapter.setThumbStyleProperty(j,"none",t)):r/2>n-e+i?(this.adapter.setThumbStyleProperty(W,"auto",t),this.adapter.setThumbStyleProperty(O,i+"px",t),this.adapter.setThumbStyleProperty(z,"translateX(50%)",t),this.adapter.setThumbStyleProperty(K,"auto",t),this.adapter.setThumbStyleProperty(q,"0",t),this.adapter.setThumbStyleProperty(j,"none",t)):(this.adapter.setThumbStyleProperty(W,"50%",t),this.adapter.setThumbStyleProperty(O,"auto",t),this.adapter.setThumbStyleProperty(z,"translateX(-50%)",t),this.adapter.setThumbStyleProperty(K,"50%",t),this.adapter.setThumbStyleProperty(q,"auto",t),this.adapter.setThumbStyleProperty(j,"translateX(-50%)",t))}},s.prototype.removeInitialStyles=function(t){if(!this.initialStylesRemoved){var e=t?"right":"left";this.adapter.removeThumbStyleProperty(e,n.END),this.isRange&&this.adapter.removeThumbStyleProperty(e,n.START),this.initialStylesRemoved=!0,this.resetTrackAndThumbAnimation()}},s.prototype.resetTrackAndThumbAnimation=function(){var t=this;if(this.isDiscrete){var e=Y?R(window,"transition"):"transition",i="none 0s ease 0s";this.adapter.setThumbStyleProperty(e,i,n.END),this.isRange&&this.adapter.setThumbStyleProperty(e,i,n.START),this.adapter.setTrackActiveStyleProperty(e,i),requestAnimationFrame((function(){t.adapter.removeThumbStyleProperty(e,n.END),t.adapter.removeTrackActiveStyleProperty(e),t.isRange&&t.adapter.removeThumbStyleProperty(e,n.START)}))}},s.prototype.updateOverlappingThumbsUI=function(t,e,i){var r=!1;if(this.adapter.isRTL()){var a=t-this.startThumbKnobWidth/2;r=e+this.endThumbKnobWidth/2>=a}else{r=t+this.startThumbKnobWidth/2>=e-this.endThumbKnobWidth/2}r?(this.adapter.addThumbClass(D,i||n.END),this.adapter.removeThumbClass(D,i===n.START?n.END:n.START)):(this.adapter.removeThumbClass(D,n.START),this.adapter.removeThumbClass(D,n.END))},s.prototype.convertAttributeValueToNumber=function(t,e){if(null===t)throw new Error("MDCSliderFoundation: `"+e+"` must be non-null.");var i=Number(t);if(isNaN(i))throw new Error("MDCSliderFoundation: `"+e+"` value is `"+t+"`, but must be a number.");return i},s.prototype.validateProperties=function(t){var e=t.min,i=t.max,r=t.value,n=t.valueStart,a=t.step,s=t.minRange;if(e>=i)throw new Error("MDCSliderFoundation: min must be strictly less than max. Current: [min: "+e+", max: "+i+"]");if(a<=0)throw new Error("MDCSliderFoundation: step must be a positive number. Current step: "+a);if(this.isRange){if(ri||ni)throw new Error("MDCSliderFoundation: values must be in [min, max] range. Current values: [start value: "+n+", end value: "+r+", min: "+e+", max: "+i+"]");if(n>r)throw new Error("MDCSliderFoundation: start value must be <= end value. Current values: [start value: "+n+", end value: "+r+"]");if(s<0)throw new Error("MDCSliderFoundation: minimum range must be non-negative. Current min range: "+s);if(r-ni)throw new Error("MDCSliderFoundation: value must be in [min, max] range. Current values: [value: "+r+", min: "+e+", max: "+i+"]");o=(r-e)/a;if(!Number.isInteger(parseFloat(o.toFixed(6))))throw new Error("MDCSliderFoundation: Slider value must be valid based on the step value ("+a+"). Current value: "+r)}},s.prototype.registerEventHandlers=function(){this.adapter.registerWindowEventHandler("resize",this.resizeListener),s.SUPPORTS_POINTER_EVENTS?(this.adapter.registerEventHandler("pointerdown",this.pointerdownListener),this.adapter.registerEventHandler("pointerup",this.pointerupListener)):(this.adapter.registerEventHandler("mousedown",this.mousedownOrTouchstartListener),this.adapter.registerEventHandler("touchstart",this.mousedownOrTouchstartListener)),this.isRange&&(this.adapter.registerThumbEventHandler(n.START,"mouseenter",this.thumbMouseenterListener),this.adapter.registerThumbEventHandler(n.START,"mouseleave",this.thumbMouseleaveListener),this.adapter.registerInputEventHandler(n.START,"change",this.inputStartChangeListener),this.adapter.registerInputEventHandler(n.START,"focus",this.inputStartFocusListener),this.adapter.registerInputEventHandler(n.START,"blur",this.inputStartBlurListener)),this.adapter.registerThumbEventHandler(n.END,"mouseenter",this.thumbMouseenterListener),this.adapter.registerThumbEventHandler(n.END,"mouseleave",this.thumbMouseleaveListener),this.adapter.registerInputEventHandler(n.END,"change",this.inputEndChangeListener),this.adapter.registerInputEventHandler(n.END,"focus",this.inputEndFocusListener),this.adapter.registerInputEventHandler(n.END,"blur",this.inputEndBlurListener)},s.prototype.deregisterEventHandlers=function(){this.adapter.deregisterWindowEventHandler("resize",this.resizeListener),s.SUPPORTS_POINTER_EVENTS?(this.adapter.deregisterEventHandler("pointerdown",this.pointerdownListener),this.adapter.deregisterEventHandler("pointerup",this.pointerupListener)):(this.adapter.deregisterEventHandler("mousedown",this.mousedownOrTouchstartListener),this.adapter.deregisterEventHandler("touchstart",this.mousedownOrTouchstartListener)),this.isRange&&(this.adapter.deregisterThumbEventHandler(n.START,"mouseenter",this.thumbMouseenterListener),this.adapter.deregisterThumbEventHandler(n.START,"mouseleave",this.thumbMouseleaveListener),this.adapter.deregisterInputEventHandler(n.START,"change",this.inputStartChangeListener),this.adapter.deregisterInputEventHandler(n.START,"focus",this.inputStartFocusListener),this.adapter.deregisterInputEventHandler(n.START,"blur",this.inputStartBlurListener)),this.adapter.deregisterThumbEventHandler(n.END,"mouseenter",this.thumbMouseenterListener),this.adapter.deregisterThumbEventHandler(n.END,"mouseleave",this.thumbMouseleaveListener),this.adapter.deregisterInputEventHandler(n.END,"change",this.inputEndChangeListener),this.adapter.deregisterInputEventHandler(n.END,"focus",this.inputEndFocusListener),this.adapter.deregisterInputEventHandler(n.END,"blur",this.inputEndBlurListener)},s.prototype.handlePointerup=function(){this.handleUp(),this.adapter.deregisterEventHandler("pointermove",this.moveListener)},s.SUPPORTS_POINTER_EVENTS=Y&&Boolean(window.PointerEvent)&&!(["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document),s}(s);function J(t){var e=/(?:\.(\d+))?(?:[eE]([+\-]?\d+))?$/.exec(String(t));if(!e)return 0;var i=e[1]||"",r=e[2]||0;return Math.max(0,("0"===i?0:i.length)-Number(r))}class Q extends m{constructor(){super(...arguments),this.mdcFoundationClass=G,this.disabled=!1,this.min=0,this.max=100,this.valueEnd=0,this.name="",this.step=1,this.withTickMarks=!1,this.discrete=!1,this.tickMarks=[],this.trackTransformOriginStyle="",this.trackLeftStyle="",this.trackRightStyle="",this.trackTransitionStyle="",this.endThumbWithIndicator=!1,this.endThumbTop=!1,this.shouldRenderEndRipple=!1,this.endThumbTransformStyle="",this.endThumbTransitionStyle="",this.endThumbCssProperties={},this.valueToAriaTextTransform=null,this.valueToValueIndicatorTransform=t=>`${t}`,this.boundMoveListener=null,this.endRippleHandlers=new p((()=>(this.shouldRenderEndRipple=!0,this.endRipple)))}update(t){if(t.has("valueEnd")&&this.mdcFoundation){this.mdcFoundation.setValue(this.valueEnd);const t=this.mdcFoundation.getValue();t!==this.valueEnd&&(this.valueEnd=t)}t.has("discrete")&&(this.discrete||(this.tickMarks=[])),super.update(t)}render(){return this.renderRootEl(v` - ${this.renderStartInput()} - ${this.renderEndInput()} - ${this.renderTrack()} - ${this.renderTickMarks()} - ${this.renderStartThumb()} - ${this.renderEndThumb()}`)}renderRootEl(t){const e=b({"mdc-slider--disabled":this.disabled,"mdc-slider--discrete":this.discrete});return v` -
- ${t} -
`}renderStartInput(){return T}renderEndInput(){var t;return v` - - `}renderTrack(){return T}renderTickMarks(){return this.withTickMarks?v` -
- ${this.tickMarks.map((t=>{const e=t===a.ACTIVE;return v`
`}))} -
`:T}renderStartThumb(){return T}renderEndThumb(){const t=b({"mdc-slider__thumb--with-indicator":this.endThumbWithIndicator,"mdc-slider__thumb--top":this.endThumbTop}),e=g(Object.assign({"-webkit-transform":this.endThumbTransformStyle,transform:this.endThumbTransformStyle,"-webkit-transition":this.endThumbTransitionStyle,transition:this.endThumbTransitionStyle,left:this.endThumbTransformStyle||"rtl"===getComputedStyle(this).direction?"":`calc(${(this.valueEnd-this.min)/(this.max-this.min)*100}% - 24px)`,right:this.endThumbTransformStyle||"rtl"!==getComputedStyle(this).direction?"":`calc(${(this.valueEnd-this.min)/(this.max-this.min)*100}% - 24px)`},this.endThumbCssProperties)),i=this.shouldRenderEndRipple?v``:T;return v` -
- ${i} - ${this.renderValueIndicator(this.valueToValueIndicatorTransform(this.valueEnd))} -
-
- `}renderValueIndicator(t){return this.discrete?v` - `:T}disconnectedCallback(){super.disconnectedCallback(),this.mdcFoundation&&this.mdcFoundation.destroy()}createAdapter(){}async firstUpdated(){super.firstUpdated(),await this.layout(!0)}updated(t){super.updated(t),this.mdcFoundation&&(t.has("disabled")&&this.mdcFoundation.setDisabled(this.disabled),t.has("min")&&this.mdcFoundation.setMin(this.min),t.has("max")&&this.mdcFoundation.setMax(this.max),t.has("step")&&this.mdcFoundation.setStep(this.step),t.has("discrete")&&this.mdcFoundation.setIsDiscrete(this.discrete),t.has("withTickMarks")&&this.mdcFoundation.setHasTickMarks(this.withTickMarks))}async layout(t=!1){var e;null===(e=this.mdcFoundation)||void 0===e||e.layout({skipUpdateUI:t}),this.requestUpdate(),await this.updateComplete}onEndChange(t){var e;this.valueEnd=Number(t.target.value),null===(e=this.mdcFoundation)||void 0===e||e.handleInputChange(n.END)}onEndFocus(){var t;null===(t=this.mdcFoundation)||void 0===t||t.handleInputFocus(n.END),this.endRippleHandlers.startFocus()}onEndBlur(){var t;null===(t=this.mdcFoundation)||void 0===t||t.handleInputBlur(n.END),this.endRippleHandlers.endFocus()}onEndMouseenter(){var t;null===(t=this.mdcFoundation)||void 0===t||t.handleThumbMouseenter(),this.endRippleHandlers.startHover()}onEndMouseleave(){var t;null===(t=this.mdcFoundation)||void 0===t||t.handleThumbMouseleave(),this.endRippleHandlers.endHover()}onPointerdown(t){this.layout(),this.mdcFoundation&&(this.mdcFoundation.handlePointerdown(t),this.boundMoveListener=this.mdcFoundation.handleMove.bind(this.mdcFoundation),this.mdcRoot.addEventListener("pointermove",this.boundMoveListener))}onPointerup(){this.mdcFoundation&&(this.mdcFoundation.handleUp(),this.boundMoveListener&&(this.mdcRoot.removeEventListener("pointermove",this.boundMoveListener),this.boundMoveListener=null))}onContextmenu(t){t.preventDefault()}setFormData(t){this.name&&t.append(this.name,`${this.valueEnd}`)}}d([u("input.end")],Q.prototype,"formElement",void 0),d([u(".mdc-slider")],Q.prototype,"mdcRoot",void 0),d([u(".end.mdc-slider__thumb")],Q.prototype,"endThumb",void 0),d([u(".end.mdc-slider__thumb .mdc-slider__thumb-knob")],Q.prototype,"endThumbKnob",void 0),d([u(".end.mdc-slider__thumb .mdc-slider__value-indicator-container")],Q.prototype,"endValueIndicatorContainer",void 0),d([l(".end .ripple")],Q.prototype,"endRipple",void 0),d([h({type:Boolean,reflect:!0})],Q.prototype,"disabled",void 0),d([h({type:Number})],Q.prototype,"min",void 0),d([h({type:Number})],Q.prototype,"max",void 0),d([h({type:Number})],Q.prototype,"valueEnd",void 0),d([h({type:String})],Q.prototype,"name",void 0),d([h({type:Number})],Q.prototype,"step",void 0),d([h({type:Boolean})],Q.prototype,"withTickMarks",void 0),d([h({type:Boolean})],Q.prototype,"discrete",void 0),d([o()],Q.prototype,"tickMarks",void 0),d([o()],Q.prototype,"trackTransformOriginStyle",void 0),d([o()],Q.prototype,"trackLeftStyle",void 0),d([o()],Q.prototype,"trackRightStyle",void 0),d([o()],Q.prototype,"trackTransitionStyle",void 0),d([o()],Q.prototype,"endThumbWithIndicator",void 0),d([o()],Q.prototype,"endThumbTop",void 0),d([o()],Q.prototype,"shouldRenderEndRipple",void 0),d([o()],Q.prototype,"endThumbTransformStyle",void 0),d([o()],Q.prototype,"endThumbTransitionStyle",void 0),d([o()],Q.prototype,"endThumbCssProperties",void 0),d([c,h({type:String,attribute:"aria-label"})],Q.prototype,"ariaLabel",void 0),d([c,h({type:String,attribute:"aria-labelledby"})],Q.prototype,"ariaLabelledBy",void 0),d([c,h({type:String,attribute:"aria-describedby"})],Q.prototype,"ariaDescribedBy",void 0);class Z extends Q{get value(){return this.valueEnd}set value(t){this.valueEnd=t}renderTrack(){const t=g({"transform-origin":this.trackTransformOriginStyle,left:this.trackLeftStyle,right:this.trackRightStyle,"-webkit-transform":`scaleX(${(this.valueEnd-this.min)/(this.max-this.min)})`,transform:`scaleX(${(this.valueEnd-this.min)/(this.max-this.min)})`,"-webkit-transition":this.trackTransitionStyle,transition:this.trackTransitionStyle});return v` -
-
-
-
-
-
-
`}createAdapter(){return{addClass:t=>{if("mdc-slider--disabled"===t)this.disabled=!0},removeClass:t=>{if("mdc-slider--disabled"===t)this.disabled=!1},hasClass:t=>{switch(t){case"mdc-slider--disabled":return this.disabled;case"mdc-slider--discrete":return this.discrete;default:return!1}},addThumbClass:(t,e)=>{if(e!==n.START&&"mdc-slider__thumb--with-indicator"===t)this.endThumbWithIndicator=!0},removeThumbClass:(t,e)=>{if(e!==n.START&&"mdc-slider__thumb--with-indicator"===t)this.endThumbWithIndicator=!1},registerEventHandler:()=>{},deregisterEventHandler:()=>{},registerBodyEventHandler:(t,e)=>{document.body.addEventListener(t,e)},deregisterBodyEventHandler:(t,e)=>{document.body.removeEventListener(t,e)},registerInputEventHandler:(t,e,i)=>{t!==n.START&&this.formElement.addEventListener(e,i)},deregisterInputEventHandler:(t,e,i)=>{t!==n.START&&this.formElement.removeEventListener(e,i)},registerThumbEventHandler:()=>{},deregisterThumbEventHandler:()=>{},registerWindowEventHandler:(t,e)=>{window.addEventListener(t,e)},deregisterWindowEventHandler:(t,e)=>{window.addEventListener(t,e)},emitChangeEvent:(t,e)=>{if(e===n.START)return;const i=new CustomEvent("change",{bubbles:!0,composed:!0,detail:{value:t,thumb:e}});this.dispatchEvent(i)},emitDragEndEvent:(t,e)=>{e!==n.START&&this.endRippleHandlers.endPress()},emitDragStartEvent:(t,e)=>{e!==n.START&&this.endRippleHandlers.startPress()},emitInputEvent:(t,e)=>{if(e===n.START)return;const i=new CustomEvent("input",{bubbles:!0,composed:!0,detail:{value:t,thumb:e}});this.dispatchEvent(i)},focusInput:t=>{t!==n.START&&this.formElement.focus()},getAttribute:()=>"",getBoundingClientRect:()=>this.mdcRoot.getBoundingClientRect(),getInputAttribute:(t,e)=>{if(e===n.START)return null;switch(t){case"min":return this.min.toString();case"max":return this.max.toString();case"value":return this.valueEnd.toString();case"step":return this.step.toString();default:return null}},getInputValue:t=>t===n.START?"":this.valueEnd.toString(),getThumbBoundingClientRect:t=>t===n.START?this.getBoundingClientRect():this.endThumb.getBoundingClientRect(),getThumbKnobWidth:t=>t===n.START?0:this.endThumbKnob.getBoundingClientRect().width,getValueIndicatorContainerWidth:t=>t===n.START?0:this.endValueIndicatorContainer.getBoundingClientRect().width,getValueToAriaValueTextFn:()=>this.valueToAriaTextTransform,isInputFocused:t=>{if(t===n.START)return!1;const e=y();return e[e.length-1]===this.formElement},isRTL:()=>"rtl"===getComputedStyle(this).direction,setInputAttribute:(t,e,i)=>{n.START},removeInputAttribute:t=>{},setThumbStyleProperty:(t,e,i)=>{if(i!==n.START)switch(t){case"transform":case"-webkit-transform":this.endThumbTransformStyle=e;break;case"transition":case"-webkit-transition":this.endThumbTransitionStyle=e;break;default:t.startsWith("--")&&(this.endThumbCssProperties[t]=e)}},removeThumbStyleProperty:(t,e)=>{if(e!==n.START)switch(t){case"left":case"right":break;case"transition":case"-webkit-transition":this.endThumbTransitionStyle=""}},setTrackActiveStyleProperty:(t,e)=>{switch(t){case"transform-origin":this.trackTransformOriginStyle=e;break;case"left":this.trackLeftStyle=e;break;case"right":this.trackRightStyle=e;break;case"transform":case"-webkit-transform":break;case"transition":case"-webkit-transition":this.trackTransitionStyle=e}},removeTrackActiveStyleProperty:t=>{switch(t){case"transition":case"-webkit-transition":this.trackTransitionStyle=""}},setInputValue:(t,e)=>{e!==n.START&&(this.valueEnd=Number(t))},setPointerCapture:t=>{this.mdcRoot.setPointerCapture(t)},setValueIndicatorText:()=>{},updateTickMarks:t=>{this.tickMarks=t}}}}d([h({type:Number})],Z.prototype,"value",null);let tt=class extends Z{};tt.styles=[E],tt=d([S("mwc-slider")],tt);export{tt as Slider}; diff --git a/material-yew/build/mwc-snackbar.js b/material-yew/build/mwc-snackbar.js deleted file mode 100644 index d8cd0c3..0000000 --- a/material-yew/build/mwc-snackbar.js +++ /dev/null @@ -1,11 +0,0 @@ -import{a8 as t,a9 as i,aa as a,ab as s,ac as e,ad as c,y as n,_ as r,i as o,e as d,m,B as l,o as p,p as b,d as _,f as u}from"./core.js";const h=(t,i)=>{var a,s;const e=t._$AN;if(void 0===e)return!1;for(const t of e)null===(s=(a=t)._$AO)||void 0===s||s.call(a,i,!1),h(t,i);return!0},f=t=>{let i,a;do{if(void 0===(i=t._$AM))break;a=i._$AN,a.delete(t),t=i}while(0===(null==a?void 0:a.size))},g=t=>{for(let i;i=t._$AM;t=i){let a=i._$AN;if(void 0===a)i._$AN=a=new Set;else if(a.has(t))break;a.add(t),y(i)}};function k(t){void 0!==this._$AN?(f(this),this._$AM=t,g(this)):this._$AM=t}function x(t,i=!1,a=0){const s=this._$AH,e=this._$AN;if(void 0!==e&&0!==e.size)if(i)if(Array.isArray(s))for(let t=a;t{var i,s,e,c;t.type==a.CHILD&&(null!==(i=(e=t)._$AP)&&void 0!==i||(e._$AP=x),null!==(s=(c=t)._$AQ)&&void 0!==s||(c._$AQ=k))};class v extends t{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,i,a){super._$AT(t,i,a),g(this),this.isConnected=t._$AU}_$AO(t,i=!0){var a,s;t!==this.isConnected&&(this.isConnected=t,t?null===(a=this.reconnected)||void 0===a||a.call(this):null===(s=this.disconnected)||void 0===s||s.call(this)),i&&(h(this,t),f(this))}setValue(t){if(i(this._$Ct))this._$Ct._$AI(t,this);else{const i=[...this._$Ct._$AH];i[this._$Ci]=t,this._$Ct._$AI(i,this,0)}}disconnected(){}reconnected(){}}const{ARIA_LIVE_DELAY_MS:w}=s.numbers;const A=e(class extends v{constructor(t){if(super(t),this.labelEl=null,this.timerId=null,this.previousPart=null,t.type!==a.CHILD)throw new Error("AccessibleSnackbarLabel only supports child parts.")}update(t,[i,a]){var s;if(!a)return;if(null===this.labelEl){const a=document.createElement("div"),e=n`
`;c(e,a);const r=a.firstElementChild;return r.textContent=i,null===(s=t.endNode)||void 0===s||s.parentNode.insertBefore(r,t.endNode),this.labelEl=r,r}const e=this.labelEl;e.setAttribute("aria-live","off"),e.textContent="";const r=document.createElement("span");return r.style.display="inline-block",r.style.width="0",r.style.height="1px",r.textContent=" ",e.appendChild(r),e.setAttribute("data-mdc-snackbar-label-text",i),null!==this.timerId&&clearTimeout(this.timerId),this.timerId=window.setTimeout((()=>{this.timerId=null,e.setAttribute("aria-live","polite"),e.removeAttribute("data-mdc-snackbar-label-text"),e.textContent=i,this.setValue(this.labelEl)}),w),e}render(t,i){return i?n` -
${t}
`:n``}}),{OPENING_EVENT:C,OPENED_EVENT:E,CLOSING_EVENT:$,CLOSED_EVENT:z}=s.strings;class N extends l{constructor(){super(...arguments),this.mdcFoundationClass=s,this.open=!1,this.timeoutMs=5e3,this.closeOnEscape=!1,this.labelText="",this.stacked=!1,this.leading=!1,this.reason=""}render(){const t={"mdc-snackbar--stacked":this.stacked,"mdc-snackbar--leading":this.leading};return n` -
-
- ${A(this.labelText,this.open)} -
- - -
-
-
`}createAdapter(){return Object.assign(Object.assign({},b(this.mdcRoot)),{announce:()=>{},notifyClosed:t=>{this.dispatchEvent(new CustomEvent(z,{bubbles:!0,cancelable:!0,detail:{reason:t}}))},notifyClosing:t=>{this.open=!1,this.dispatchEvent(new CustomEvent($,{bubbles:!0,cancelable:!0,detail:{reason:t}}))},notifyOpened:()=>{this.dispatchEvent(new CustomEvent(E,{bubbles:!0,cancelable:!0}))},notifyOpening:()=>{this.open=!0,this.dispatchEvent(new CustomEvent(C,{bubbles:!0,cancelable:!0}))}})}show(){this.open=!0}close(t=""){this.reason=t,this.open=!1}firstUpdated(){super.firstUpdated(),this.open&&this.mdcFoundation.open()}_handleKeydown(t){this.mdcFoundation.handleKeyDown(t)}_handleActionClick(t){this.mdcFoundation.handleActionButtonClick(t)}_handleDismissClick(t){this.mdcFoundation.handleActionIconClick(t)}}r([o(".mdc-snackbar")],N.prototype,"mdcRoot",void 0),r([o(".mdc-snackbar__label")],N.prototype,"labelElement",void 0),r([d({type:Boolean,reflect:!0}),m((function(t){this.mdcFoundation&&(t?this.mdcFoundation.open():(this.mdcFoundation.close(this.reason),this.reason=""))}))],N.prototype,"open",void 0),r([m((function(t){this.mdcFoundation.setTimeoutMs(t)})),d({type:Number})],N.prototype,"timeoutMs",void 0),r([m((function(t){this.mdcFoundation.setCloseOnEscape(t)})),d({type:Boolean})],N.prototype,"closeOnEscape",void 0),r([d({type:String})],N.prototype,"labelText",void 0),r([d({type:Boolean})],N.prototype,"stacked",void 0),r([d({type:Boolean})],N.prototype,"leading",void 0);const T=_`.mdc-snackbar{z-index:8;margin:8px;display:none;position:fixed;right:0;bottom:0;left:0;align-items:center;justify-content:center;box-sizing:border-box;pointer-events:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mdc-snackbar__surface{background-color:#333333}.mdc-snackbar__label{color:rgba(255, 255, 255, 0.87)}.mdc-snackbar__surface{min-width:344px}@media(max-width: 480px),(max-width: 344px){.mdc-snackbar__surface{min-width:100%}}.mdc-snackbar__surface{max-width:672px}.mdc-snackbar__surface{box-shadow:0px 3px 5px -1px rgba(0, 0, 0, 0.2),0px 6px 10px 0px rgba(0, 0, 0, 0.14),0px 1px 18px 0px rgba(0,0,0,.12)}.mdc-snackbar__surface{border-radius:4px;border-radius:var(--mdc-shape-small, 4px)}.mdc-snackbar--opening,.mdc-snackbar--open,.mdc-snackbar--closing{display:flex}.mdc-snackbar--open .mdc-snackbar__label,.mdc-snackbar--open .mdc-snackbar__actions{visibility:visible}.mdc-snackbar--leading{justify-content:flex-start}.mdc-snackbar--stacked .mdc-snackbar__label{padding-left:16px;padding-right:8px;padding-bottom:12px}[dir=rtl] .mdc-snackbar--stacked .mdc-snackbar__label,.mdc-snackbar--stacked .mdc-snackbar__label[dir=rtl]{padding-left:8px;padding-right:16px}.mdc-snackbar--stacked .mdc-snackbar__surface{flex-direction:column;align-items:flex-start}.mdc-snackbar--stacked .mdc-snackbar__actions{align-self:flex-end;margin-bottom:8px}.mdc-snackbar__surface{padding-left:0;padding-right:8px;display:flex;align-items:center;justify-content:flex-start;box-sizing:border-box;transform:scale(0.8);opacity:0}.mdc-snackbar__surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid transparent;border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-snackbar__surface::before{border-color:CanvasText}}[dir=rtl] .mdc-snackbar__surface,.mdc-snackbar__surface[dir=rtl]{padding-left:8px;padding-right:0}.mdc-snackbar--open .mdc-snackbar__surface{transform:scale(1);opacity:1;pointer-events:auto;transition:opacity 150ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 150ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-snackbar--closing .mdc-snackbar__surface{transform:scale(1);transition:opacity 75ms 0ms cubic-bezier(0.4, 0, 1, 1)}.mdc-snackbar__label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-body2-font-size, 0.875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:0.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, 0.0178571429em);text-decoration:inherit;text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform, inherit);padding-left:16px;padding-right:8px;width:100%;flex-grow:1;box-sizing:border-box;margin:0;visibility:hidden;padding-top:14px;padding-bottom:14px}[dir=rtl] .mdc-snackbar__label,.mdc-snackbar__label[dir=rtl]{padding-left:8px;padding-right:16px}.mdc-snackbar__label::before{display:inline;content:attr(data-mdc-snackbar-label-text)}.mdc-snackbar__actions{display:flex;flex-shrink:0;align-items:center;box-sizing:border-box;visibility:hidden}.mdc-snackbar__action:not(:disabled){color:#bb86fc}.mdc-snackbar__action .mdc-button__ripple::before,.mdc-snackbar__action .mdc-button__ripple::after{background-color:#bb86fc;background-color:var(--mdc-ripple-color, #bb86fc)}.mdc-snackbar__action:hover .mdc-button__ripple::before,.mdc-snackbar__action.mdc-ripple-surface--hover .mdc-button__ripple::before{opacity:0.08;opacity:var(--mdc-ripple-hover-opacity, 0.08)}.mdc-snackbar__action.mdc-ripple-upgraded--background-focused .mdc-button__ripple::before,.mdc-snackbar__action:not(.mdc-ripple-upgraded):focus .mdc-button__ripple::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-snackbar__action:not(.mdc-ripple-upgraded) .mdc-button__ripple::after{transition:opacity 150ms linear}.mdc-snackbar__action:not(.mdc-ripple-upgraded):active .mdc-button__ripple::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-snackbar__action.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-snackbar__dismiss{color:rgba(255, 255, 255, 0.87)}.mdc-snackbar__dismiss .mdc-icon-button__ripple::before,.mdc-snackbar__dismiss .mdc-icon-button__ripple::after{background-color:rgba(255, 255, 255, 0.87);background-color:var(--mdc-ripple-color, rgba(255, 255, 255, 0.87))}.mdc-snackbar__dismiss:hover .mdc-icon-button__ripple::before,.mdc-snackbar__dismiss.mdc-ripple-surface--hover .mdc-icon-button__ripple::before{opacity:0.08;opacity:var(--mdc-ripple-hover-opacity, 0.08)}.mdc-snackbar__dismiss.mdc-ripple-upgraded--background-focused .mdc-icon-button__ripple::before,.mdc-snackbar__dismiss:not(.mdc-ripple-upgraded):focus .mdc-icon-button__ripple::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-snackbar__dismiss:not(.mdc-ripple-upgraded) .mdc-icon-button__ripple::after{transition:opacity 150ms linear}.mdc-snackbar__dismiss:not(.mdc-ripple-upgraded):active .mdc-icon-button__ripple::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-snackbar__dismiss.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-snackbar__dismiss.mdc-snackbar__dismiss{width:36px;height:36px;padding:6px;font-size:18px}.mdc-snackbar__dismiss.mdc-snackbar__dismiss .mdc-icon-button__focus-ring{display:none}.mdc-snackbar__dismiss.mdc-snackbar__dismiss.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring,.mdc-snackbar__dismiss.mdc-snackbar__dismiss:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring{display:block;max-height:36px;max-width:36px}@media screen and (forced-colors: active){.mdc-snackbar__dismiss.mdc-snackbar__dismiss.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring,.mdc-snackbar__dismiss.mdc-snackbar__dismiss:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring{pointer-events:none;border:2px solid transparent;border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%}}@media screen and (forced-colors: active)and (forced-colors: active){.mdc-snackbar__dismiss.mdc-snackbar__dismiss.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring,.mdc-snackbar__dismiss.mdc-snackbar__dismiss:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring{border-color:CanvasText}}@media screen and (forced-colors: active){.mdc-snackbar__dismiss.mdc-snackbar__dismiss.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring::after,.mdc-snackbar__dismiss.mdc-snackbar__dismiss:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring::after{content:"";border:2px solid transparent;border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}}@media screen and (forced-colors: active)and (forced-colors: active){.mdc-snackbar__dismiss.mdc-snackbar__dismiss.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring::after,.mdc-snackbar__dismiss.mdc-snackbar__dismiss:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring::after{border-color:CanvasText}}.mdc-snackbar__dismiss.mdc-snackbar__dismiss.mdc-icon-button--reduced-size .mdc-icon-button__ripple{width:36px;height:36px;margin-top:0px;margin-bottom:0px;margin-right:0px;margin-left:0px}.mdc-snackbar__dismiss.mdc-snackbar__dismiss.mdc-icon-button--reduced-size.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring,.mdc-snackbar__dismiss.mdc-snackbar__dismiss.mdc-icon-button--reduced-size:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring{max-height:36px;max-width:36px}.mdc-snackbar__dismiss.mdc-snackbar__dismiss .mdc-icon-button__touch{position:absolute;top:50%;height:36px;left:50%;width:36px;transform:translate(-50%, -50%)}.mdc-snackbar__action+.mdc-snackbar__dismiss{margin-left:8px;margin-right:0}[dir=rtl] .mdc-snackbar__action+.mdc-snackbar__dismiss,.mdc-snackbar__action+.mdc-snackbar__dismiss[dir=rtl]{margin-left:0;margin-right:8px}slot[name=action]::slotted(mwc-button){--mdc-theme-primary: var( --mdc-snackbar-action-color, #bb86fc )}slot[name=dismiss]::slotted(mwc-icon-button){--mdc-icon-size: 18px;--mdc-icon-button-size: 36px;color:rgba(255, 255, 255, 0.87);margin-left:8px;margin-right:0}[dir=rtl] slot[name=dismiss]::slotted(mwc-icon-button),::slotted(mwc-icon-buttonslot[name=dismiss][dir=rtl]){margin-left:0;margin-right:8px}`;let I=class extends N{};I.styles=[T],I=r([u("mwc-snackbar")],I);export{I as Snackbar}; diff --git a/material-yew/build/mwc-switch.js b/material-yew/build/mwc-switch.js deleted file mode 100644 index 8f69f01..0000000 --- a/material-yew/build/mwc-switch.js +++ /dev/null @@ -1,60 +0,0 @@ -import{h as e,ae as t,g as c,af as s,ag as i,M as r,_ as a,t as d,e as o,a as l,b as n,i as h,c as p,F as m,R as w,y as b,o as u,l as f,d as v,f as _}from"./core.js";function y(c,s,i){var r=function(c,s){var i=new Map;g.has(c)||g.set(c,{isEnabled:!0,getObservers:function(e){var t=i.get(e)||[];return i.has(e)||i.set(e,t),t},installedProperties:new Set});var r=g.get(c);if(r.installedProperties.has(s))return r;var a=function(e,t){var c,s=e;for(;s&&!(c=Object.getOwnPropertyDescriptor(s,t));)s=Object.getPrototypeOf(s);return c}(c,s)||{configurable:!0,enumerable:!0,value:c[s],writable:!0},d=e({},a),o=a.get,l=a.set;if("value"in a){delete d.value,delete d.writable;var n=a.value;o=function(){return n},a.writable&&(l=function(e){n=e})}o&&(d.get=function(){return o.call(this)});l&&(d.set=function(e){var c,i,a=o?o.call(this):e;if(l.call(this,e),r.isEnabled&&(!o||e!==a))try{for(var d=t(r.getObservers(s)),n=d.next();!n.done;n=d.next()){(0,n.value)(e,a)}}catch(e){c={error:e}}finally{try{n&&!n.done&&(i=d.return)&&i.call(d)}finally{if(c)throw c.error}}});return r.installedProperties.add(s),Object.defineProperty(c,s,d),r}(c,s),a=r.getObservers(s);return a.push(i),function(){a.splice(a.indexOf(i),1)}}var g=new WeakMap;var x,k,C=function(e){function r(t){var c=e.call(this,t)||this;return c.unobserves=new Set,c}return c(r,e),r.prototype.destroy=function(){e.prototype.destroy.call(this),this.unobserve()},r.prototype.observe=function(e,c){var s,i,r=this,a=[];try{for(var d=t(Object.keys(c)),o=d.next();!o.done;o=d.next()){var l=o.value,n=c[l].bind(this);a.push(this.observeProperty(e,l,n))}}catch(e){s={error:e}}finally{try{o&&!o.done&&(i=d.return)&&i.call(d)}finally{if(s)throw s.error}}var h=function(){var e,c;try{for(var s=t(a),i=s.next();!i.done;i=s.next()){(0,i.value)()}}catch(t){e={error:t}}finally{try{i&&!i.done&&(c=s.return)&&c.call(s)}finally{if(e)throw e.error}}r.unobserves.delete(h)};return this.unobserves.add(h),h},r.prototype.observeProperty=function(e,t,c){return y(e,t,c)},r.prototype.setObserversEnabled=function(e,t){!function(e,t){var c=g.get(e);c&&(c.isEnabled=t)}(e,t)},r.prototype.unobserve=function(){var e,c;try{for(var r=t(s([],i(this.unobserves))),a=r.next();!a.done;a=r.next()){(0,a.value)()}}catch(t){e={error:t}}finally{try{a&&!a.done&&(c=r.return)&&c.call(r)}finally{if(e)throw e.error}}},r}(r);!function(e){e.PROCESSING="mdc-switch--processing",e.SELECTED="mdc-switch--selected",e.UNSELECTED="mdc-switch--unselected"}(x||(x={})),function(e){e.RIPPLE=".mdc-switch__ripple"}(k||(k={}));var P=function(e){function t(t){var c=e.call(this,t)||this;return c.handleClick=c.handleClick.bind(c),c}return c(t,e),t.prototype.init=function(){this.observe(this.adapter.state,{disabled:this.stopProcessingIfDisabled,processing:this.stopProcessingIfDisabled})},t.prototype.handleClick=function(){this.adapter.state.disabled||(this.adapter.state.selected=!this.adapter.state.selected)},t.prototype.stopProcessingIfDisabled=function(){this.adapter.state.disabled&&(this.adapter.state.processing=!1)},t}(C);!function(e){function t(){return null!==e&&e.apply(this,arguments)||this}c(t,e),t.prototype.init=function(){e.prototype.init.call(this),this.observe(this.adapter.state,{disabled:this.onDisabledChange,processing:this.onProcessingChange,selected:this.onSelectedChange})},t.prototype.initFromDOM=function(){this.setObserversEnabled(this.adapter.state,!1),this.adapter.state.selected=this.adapter.hasClass(x.SELECTED),this.onSelectedChange(),this.adapter.state.disabled=this.adapter.isDisabled(),this.adapter.state.processing=this.adapter.hasClass(x.PROCESSING),this.setObserversEnabled(this.adapter.state,!0),this.stopProcessingIfDisabled()},t.prototype.onDisabledChange=function(){this.adapter.setDisabled(this.adapter.state.disabled)},t.prototype.onProcessingChange=function(){this.toggleClass(this.adapter.state.processing,x.PROCESSING)},t.prototype.onSelectedChange=function(){this.adapter.setAriaChecked(String(this.adapter.state.selected)),this.toggleClass(this.adapter.state.selected,x.SELECTED),this.toggleClass(!this.adapter.state.selected,x.UNSELECTED)},t.prototype.toggleClass=function(e,t){e?this.adapter.addClass(t):this.adapter.removeClass(t)}}(P);class E extends m{constructor(){super(...arguments),this.processing=!1,this.selected=!1,this.ariaLabel="",this.ariaLabelledBy="",this.shouldRenderRipple=!1,this.rippleHandlers=new w((()=>(this.shouldRenderRipple=!0,this.ripple))),this.name="",this.value="on",this.mdcFoundationClass=P}setFormData(e){this.name&&this.selected&&e.append(this.name,this.value)}click(){var e,t;this.disabled||(null===(e=this.mdcRoot)||void 0===e||e.focus(),null===(t=this.mdcRoot)||void 0===t||t.click())}render(){return b` - - - - `}getRenderClasses(){return{"mdc-switch--processing":this.processing,"mdc-switch--selected":this.selected,"mdc-switch--unselected":!this.selected}}renderHandle(){return b` -
- ${this.renderShadow()} - ${this.renderRipple()} -
- ${this.renderOnIcon()} - ${this.renderOffIcon()} -
-
- `}renderShadow(){return b` -
-
-
- `}renderRipple(){return this.shouldRenderRipple?b` -
- - -
- `:b``}renderOnIcon(){return b` - - - - `}renderOffIcon(){return b` - - - - `}handleClick(){var e;null===(e=this.mdcFoundation)||void 0===e||e.handleClick()}handleFocus(){this.rippleHandlers.startFocus()}handleBlur(){this.rippleHandlers.endFocus()}handlePointerDown(e){e.target.setPointerCapture(e.pointerId),this.rippleHandlers.startPress(e)}handlePointerUp(){this.rippleHandlers.endPress()}handlePointerEnter(){this.rippleHandlers.startHover()}handlePointerLeave(){this.rippleHandlers.endHover()}createAdapter(){return{state:this}}}a([o({type:Boolean})],E.prototype,"processing",void 0),a([o({type:Boolean})],E.prototype,"selected",void 0),a([l,o({type:String,attribute:"aria-label"})],E.prototype,"ariaLabel",void 0),a([l,o({type:String,attribute:"aria-labelledby"})],E.prototype,"ariaLabelledBy",void 0),a([n("mwc-ripple")],E.prototype,"ripple",void 0),a([d()],E.prototype,"shouldRenderRipple",void 0),a([o({type:String,reflect:!0})],E.prototype,"name",void 0),a([o({type:String})],E.prototype,"value",void 0),a([h("input")],E.prototype,"formElement",void 0),a([h(".mdc-switch")],E.prototype,"mdcRoot",void 0),a([p({passive:!0})],E.prototype,"handlePointerDown",null);const S=v`.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:0;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1);background-color:#fff;background-color:var(--mdc-elevation-overlay-color, #fff)}.mdc-switch{align-items:center;background:none;border:none;cursor:pointer;display:inline-flex;flex-shrink:0;margin:0;outline:none;overflow:visible;padding:0;position:relative}.mdc-switch:disabled{cursor:default;pointer-events:none}.mdc-switch__track{overflow:hidden;position:relative;width:100%}.mdc-switch__track::before,.mdc-switch__track::after{border:1px solid transparent;border-radius:inherit;box-sizing:border-box;content:"";height:100%;left:0;position:absolute;width:100%}@media screen and (forced-colors: active){.mdc-switch__track::before,.mdc-switch__track::after{border-color:currentColor}}.mdc-switch__track::before{transition:transform 75ms 0ms cubic-bezier(0, 0, 0.2, 1);transform:translateX(0)}.mdc-switch__track::after{transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.6, 1);transform:translateX(-100%)}[dir=rtl] .mdc-switch__track::after,.mdc-switch__track[dir=rtl]::after{transform:translateX(100%)}.mdc-switch--selected .mdc-switch__track::before{transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.6, 1);transform:translateX(100%)}[dir=rtl] .mdc-switch--selected .mdc-switch__track::before,.mdc-switch--selected .mdc-switch__track[dir=rtl]::before{transform:translateX(-100%)}.mdc-switch--selected .mdc-switch__track::after{transition:transform 75ms 0ms cubic-bezier(0, 0, 0.2, 1);transform:translateX(0)}.mdc-switch__handle-track{height:100%;pointer-events:none;position:absolute;top:0;transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);left:0;right:auto;transform:translateX(0)}[dir=rtl] .mdc-switch__handle-track,.mdc-switch__handle-track[dir=rtl]{left:auto;right:0}.mdc-switch--selected .mdc-switch__handle-track{transform:translateX(100%)}[dir=rtl] .mdc-switch--selected .mdc-switch__handle-track,.mdc-switch--selected .mdc-switch__handle-track[dir=rtl]{transform:translateX(-100%)}.mdc-switch__handle{display:flex;pointer-events:auto;position:absolute;top:50%;transform:translateY(-50%);left:0;right:auto}[dir=rtl] .mdc-switch__handle,.mdc-switch__handle[dir=rtl]{left:auto;right:0}.mdc-switch__handle::before,.mdc-switch__handle::after{border:1px solid transparent;border-radius:inherit;box-sizing:border-box;content:"";width:100%;height:100%;left:0;position:absolute;top:0;transition:background-color 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1),border-color 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);z-index:-1}@media screen and (forced-colors: active){.mdc-switch__handle::before,.mdc-switch__handle::after{border-color:currentColor}}.mdc-switch__shadow{border-radius:inherit;bottom:0;left:0;position:absolute;right:0;top:0}.mdc-elevation-overlay{bottom:0;left:0;right:0;top:0}.mdc-switch__ripple{left:50%;position:absolute;top:50%;transform:translate(-50%, -50%);z-index:-1}.mdc-switch:disabled .mdc-switch__ripple{display:none}.mdc-switch__icons{height:100%;position:relative;width:100%;z-index:1}.mdc-switch__icon{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0;opacity:0;transition:opacity 30ms 0ms cubic-bezier(0.4, 0, 1, 1)}.mdc-switch--selected .mdc-switch__icon--on,.mdc-switch--unselected .mdc-switch__icon--off{opacity:1;transition:opacity 45ms 30ms cubic-bezier(0, 0, 0.2, 1)}:host{display:inline-flex;outline:none}input{display:none}.mdc-switch{width:36px;width:var(--mdc-switch-track-width, 36px)}.mdc-switch.mdc-switch--selected:enabled .mdc-switch__handle::after{background:#6200ee;background:var(--mdc-switch-selected-handle-color, var(--mdc-theme-primary, #6200ee))}.mdc-switch.mdc-switch--selected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:#310077;background:var(--mdc-switch-selected-hover-handle-color, #310077)}.mdc-switch.mdc-switch--selected:enabled:focus:not(:active) .mdc-switch__handle::after{background:#310077;background:var(--mdc-switch-selected-focus-handle-color, #310077)}.mdc-switch.mdc-switch--selected:enabled:active .mdc-switch__handle::after{background:#310077;background:var(--mdc-switch-selected-pressed-handle-color, #310077)}.mdc-switch.mdc-switch--selected:disabled .mdc-switch__handle::after{background:#424242;background:var(--mdc-switch-disabled-selected-handle-color, #424242)}.mdc-switch.mdc-switch--unselected:enabled .mdc-switch__handle::after{background:#616161;background:var(--mdc-switch-unselected-handle-color, #616161)}.mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:#212121;background:var(--mdc-switch-unselected-hover-handle-color, #212121)}.mdc-switch.mdc-switch--unselected:enabled:focus:not(:active) .mdc-switch__handle::after{background:#212121;background:var(--mdc-switch-unselected-focus-handle-color, #212121)}.mdc-switch.mdc-switch--unselected:enabled:active .mdc-switch__handle::after{background:#212121;background:var(--mdc-switch-unselected-pressed-handle-color, #212121)}.mdc-switch.mdc-switch--unselected:disabled .mdc-switch__handle::after{background:#424242;background:var(--mdc-switch-disabled-unselected-handle-color, #424242)}.mdc-switch .mdc-switch__handle::before{background:#fff;background:var(--mdc-switch-handle-surface-color, var(--mdc-theme-surface, #fff))}.mdc-switch:enabled .mdc-switch__shadow{--mdc-elevation-box-shadow-for-gss:0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12);box-shadow:0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12);box-shadow:var(--mdc-switch-handle-elevation, var(--mdc-elevation-box-shadow-for-gss))}.mdc-switch:disabled .mdc-switch__shadow{--mdc-elevation-box-shadow-for-gss:0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12);box-shadow:0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12);box-shadow:var(--mdc-switch-disabled-handle-elevation, var(--mdc-elevation-box-shadow-for-gss))}.mdc-switch .mdc-switch__focus-ring-wrapper,.mdc-switch .mdc-switch__handle{height:20px;height:var(--mdc-switch-handle-height, 20px)}.mdc-switch:disabled .mdc-switch__handle::after{opacity:0.38;opacity:var(--mdc-switch-disabled-handle-opacity, 0.38)}.mdc-switch .mdc-switch__handle{border-radius:10px;border-radius:var(--mdc-switch-handle-shape, 10px)}.mdc-switch .mdc-switch__handle{width:20px;width:var(--mdc-switch-handle-width, 20px)}.mdc-switch .mdc-switch__handle-track{width:calc(100% - 20px);width:calc(100% - var(--mdc-switch-handle-width, 20px))}.mdc-switch.mdc-switch--selected:enabled .mdc-switch__icon{fill:#fff;fill:var(--mdc-switch-selected-icon-color, var(--mdc-theme-on-primary, #fff))}.mdc-switch.mdc-switch--selected:disabled .mdc-switch__icon{fill:#fff;fill:var(--mdc-switch-disabled-selected-icon-color, var(--mdc-theme-on-primary, #fff))}.mdc-switch.mdc-switch--unselected:enabled .mdc-switch__icon{fill:#fff;fill:var(--mdc-switch-unselected-icon-color, var(--mdc-theme-on-primary, #fff))}.mdc-switch.mdc-switch--unselected:disabled .mdc-switch__icon{fill:#fff;fill:var(--mdc-switch-disabled-unselected-icon-color, var(--mdc-theme-on-primary, #fff))}.mdc-switch.mdc-switch--selected:disabled .mdc-switch__icons{opacity:0.38;opacity:var(--mdc-switch-disabled-selected-icon-opacity, 0.38)}.mdc-switch.mdc-switch--unselected:disabled .mdc-switch__icons{opacity:0.38;opacity:var(--mdc-switch-disabled-unselected-icon-opacity, 0.38)}.mdc-switch.mdc-switch--selected .mdc-switch__icon{width:18px;width:var(--mdc-switch-selected-icon-size, 18px);height:18px;height:var(--mdc-switch-selected-icon-size, 18px)}.mdc-switch.mdc-switch--unselected .mdc-switch__icon{width:18px;width:var(--mdc-switch-unselected-icon-size, 18px);height:18px;height:var(--mdc-switch-unselected-icon-size, 18px)}.mdc-switch .mdc-switch__ripple{height:48px;height:var(--mdc-switch-state-layer-size, 48px);width:48px;width:var(--mdc-switch-state-layer-size, 48px)}.mdc-switch .mdc-switch__track{height:14px;height:var(--mdc-switch-track-height, 14px)}.mdc-switch:disabled .mdc-switch__track{opacity:0.12;opacity:var(--mdc-switch-disabled-track-opacity, 0.12)}.mdc-switch:enabled .mdc-switch__track::after{background:#d7bbff;background:var(--mdc-switch-selected-track-color, #d7bbff)}.mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::after{background:#d7bbff;background:var(--mdc-switch-selected-hover-track-color, #d7bbff)}.mdc-switch:enabled:focus:not(:active) .mdc-switch__track::after{background:#d7bbff;background:var(--mdc-switch-selected-focus-track-color, #d7bbff)}.mdc-switch:enabled:active .mdc-switch__track::after{background:#d7bbff;background:var(--mdc-switch-selected-pressed-track-color, #d7bbff)}.mdc-switch:disabled .mdc-switch__track::after{background:#424242;background:var(--mdc-switch-disabled-selected-track-color, #424242)}.mdc-switch:enabled .mdc-switch__track::before{background:#e0e0e0;background:var(--mdc-switch-unselected-track-color, #e0e0e0)}.mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::before{background:#e0e0e0;background:var(--mdc-switch-unselected-hover-track-color, #e0e0e0)}.mdc-switch:enabled:focus:not(:active) .mdc-switch__track::before{background:#e0e0e0;background:var(--mdc-switch-unselected-focus-track-color, #e0e0e0)}.mdc-switch:enabled:active .mdc-switch__track::before{background:#e0e0e0;background:var(--mdc-switch-unselected-pressed-track-color, #e0e0e0)}.mdc-switch:disabled .mdc-switch__track::before{background:#424242;background:var(--mdc-switch-disabled-unselected-track-color, #424242)}.mdc-switch .mdc-switch__track{border-radius:7px;border-radius:var(--mdc-switch-track-shape, 7px)}.mdc-switch.mdc-switch--selected{--mdc-ripple-focus-state-layer-color:var(--mdc-switch-selected-focus-state-layer-color, var(--mdc-theme-primary, #6200ee));--mdc-ripple-focus-state-layer-opacity:var(--mdc-switch-selected-focus-state-layer-opacity, 0.12);--mdc-ripple-hover-state-layer-color:var(--mdc-switch-selected-hover-state-layer-color, var(--mdc-theme-primary, #6200ee));--mdc-ripple-hover-state-layer-opacity:var(--mdc-switch-selected-hover-state-layer-opacity, 0.04);--mdc-ripple-pressed-state-layer-color:var(--mdc-switch-selected-pressed-state-layer-color, var(--mdc-theme-primary, #6200ee));--mdc-ripple-pressed-state-layer-opacity:var(--mdc-switch-selected-pressed-state-layer-opacity, 0.1)}.mdc-switch.mdc-switch--selected:enabled:focus:not(:active){--mdc-ripple-hover-state-layer-color:var(--mdc-switch-selected-focus-state-layer-color, var(--mdc-theme-primary, #6200ee))}.mdc-switch.mdc-switch--selected:enabled:active{--mdc-ripple-hover-state-layer-color:var(--mdc-switch-selected-pressed-state-layer-color, var(--mdc-theme-primary, #6200ee))}.mdc-switch.mdc-switch--unselected{--mdc-ripple-focus-state-layer-color:var(--mdc-switch-unselected-focus-state-layer-color, #424242);--mdc-ripple-focus-state-layer-opacity:var(--mdc-switch-unselected-focus-state-layer-opacity, 0.12);--mdc-ripple-hover-state-layer-color:var(--mdc-switch-unselected-hover-state-layer-color, #424242);--mdc-ripple-hover-state-layer-opacity:var(--mdc-switch-unselected-hover-state-layer-opacity, 0.04);--mdc-ripple-pressed-state-layer-color:var(--mdc-switch-unselected-pressed-state-layer-color, #424242);--mdc-ripple-pressed-state-layer-opacity:var(--mdc-switch-unselected-pressed-state-layer-opacity, 0.1)}.mdc-switch.mdc-switch--unselected:enabled:focus:not(:active){--mdc-ripple-hover-state-layer-color:var(--mdc-switch-unselected-focus-state-layer-color, #424242)}.mdc-switch.mdc-switch--unselected:enabled:active{--mdc-ripple-hover-state-layer-color:var(--mdc-switch-unselected-pressed-state-layer-color, #424242)}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-switch:disabled .mdc-switch__handle::after{opacity:1;opacity:var(--mdc-switch-disabled-handle-opacity, 1)}.mdc-switch.mdc-switch--selected:enabled .mdc-switch__icon{fill:ButtonText;fill:var(--mdc-switch-selected-icon-color, ButtonText)}.mdc-switch.mdc-switch--selected:disabled .mdc-switch__icon{fill:GrayText;fill:var(--mdc-switch-disabled-selected-icon-color, GrayText)}.mdc-switch.mdc-switch--unselected:enabled .mdc-switch__icon{fill:ButtonText;fill:var(--mdc-switch-unselected-icon-color, ButtonText)}.mdc-switch.mdc-switch--unselected:disabled .mdc-switch__icon{fill:GrayText;fill:var(--mdc-switch-disabled-unselected-icon-color, GrayText)}.mdc-switch.mdc-switch--selected:disabled .mdc-switch__icons{opacity:1;opacity:var(--mdc-switch-disabled-selected-icon-opacity, 1)}.mdc-switch.mdc-switch--unselected:disabled .mdc-switch__icons{opacity:1;opacity:var(--mdc-switch-disabled-unselected-icon-opacity, 1)}.mdc-switch:disabled .mdc-switch__track{opacity:1;opacity:var(--mdc-switch-disabled-track-opacity, 1)}}`;let z=class extends E{};z.styles=[S],z=a([_("mwc-switch")],z);export{z as Switch}; diff --git a/material-yew/build/mwc-tab-bar.js b/material-yew/build/mwc-tab-bar.js deleted file mode 100644 index 3ba0109..0000000 --- a/material-yew/build/mwc-tab-bar.js +++ /dev/null @@ -1,19 +0,0 @@ -import{g as t,ah as e,h as r,ag as o,M as l,_ as n,i,c as a,B as c,y as s,p as d,q as h,d as u,f as p,m as f,e as m,ai as g}from"./core.js";import"./mwc-tab.js";var S={ANIMATING:"mdc-tab-scroller--animating",SCROLL_AREA_SCROLL:"mdc-tab-scroller__scroll-area--scroll",SCROLL_TEST:"mdc-tab-scroller__test"},T={AREA_SELECTOR:".mdc-tab-scroller__scroll-area",CONTENT_SELECTOR:".mdc-tab-scroller__scroll-content"},A=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return t(r,e),r.prototype.getScrollPositionRTL=function(){var t=this.adapter.getScrollAreaScrollLeft(),e=this.calculateScrollEdges().right;return Math.round(e-t)},r.prototype.scrollToRTL=function(t){var e=this.calculateScrollEdges(),r=this.adapter.getScrollAreaScrollLeft(),o=this.clampScrollValue(e.right-t);return{finalScrollPosition:o,scrollDelta:o-r}},r.prototype.incrementScrollRTL=function(t){var e=this.adapter.getScrollAreaScrollLeft(),r=this.clampScrollValue(e-t);return{finalScrollPosition:r,scrollDelta:r-e}},r.prototype.getAnimatingScrollPosition=function(t){return t},r.prototype.calculateScrollEdges=function(){return{left:0,right:this.adapter.getScrollContentOffsetWidth()-this.adapter.getScrollAreaOffsetWidth()}},r.prototype.clampScrollValue=function(t){var e=this.calculateScrollEdges();return Math.min(Math.max(e.left,t),e.right)},r}(e),b=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return t(r,e),r.prototype.getScrollPositionRTL=function(t){var e=this.adapter.getScrollAreaScrollLeft();return Math.round(t-e)},r.prototype.scrollToRTL=function(t){var e=this.adapter.getScrollAreaScrollLeft(),r=this.clampScrollValue(-t);return{finalScrollPosition:r,scrollDelta:r-e}},r.prototype.incrementScrollRTL=function(t){var e=this.adapter.getScrollAreaScrollLeft(),r=this.clampScrollValue(e-t);return{finalScrollPosition:r,scrollDelta:r-e}},r.prototype.getAnimatingScrollPosition=function(t,e){return t-e},r.prototype.calculateScrollEdges=function(){var t=this.adapter.getScrollContentOffsetWidth();return{left:this.adapter.getScrollAreaOffsetWidth()-t,right:0}},r.prototype.clampScrollValue=function(t){var e=this.calculateScrollEdges();return Math.max(Math.min(e.right,t),e.left)},r}(e),E=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return t(r,e),r.prototype.getScrollPositionRTL=function(t){var e=this.adapter.getScrollAreaScrollLeft();return Math.round(e-t)},r.prototype.scrollToRTL=function(t){var e=this.adapter.getScrollAreaScrollLeft(),r=this.clampScrollValue(t);return{finalScrollPosition:r,scrollDelta:e-r}},r.prototype.incrementScrollRTL=function(t){var e=this.adapter.getScrollAreaScrollLeft(),r=this.clampScrollValue(e+t);return{finalScrollPosition:r,scrollDelta:e-r}},r.prototype.getAnimatingScrollPosition=function(t,e){return t+e},r.prototype.calculateScrollEdges=function(){return{left:this.adapter.getScrollContentOffsetWidth()-this.adapter.getScrollAreaOffsetWidth(),right:0}},r.prototype.clampScrollValue=function(t){var e=this.calculateScrollEdges();return Math.min(Math.max(e.right,t),e.left)},r}(e),_=function(e){function l(t){var o=e.call(this,r(r({},l.defaultAdapter),t))||this;return o.isAnimating=!1,o}return t(l,e),Object.defineProperty(l,"cssClasses",{get:function(){return S},enumerable:!1,configurable:!0}),Object.defineProperty(l,"strings",{get:function(){return T},enumerable:!1,configurable:!0}),Object.defineProperty(l,"defaultAdapter",{get:function(){return{eventTargetMatchesSelector:function(){return!1},addClass:function(){},removeClass:function(){},addScrollAreaClass:function(){},setScrollAreaStyleProperty:function(){},setScrollContentStyleProperty:function(){},getScrollContentStyleValue:function(){return""},setScrollAreaScrollLeft:function(){},getScrollAreaScrollLeft:function(){return 0},getScrollContentOffsetWidth:function(){return 0},getScrollAreaOffsetWidth:function(){return 0},computeScrollAreaClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},computeScrollContentClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},computeHorizontalScrollbarHeight:function(){return 0}}},enumerable:!1,configurable:!0}),l.prototype.init=function(){var t=this.adapter.computeHorizontalScrollbarHeight();this.adapter.setScrollAreaStyleProperty("margin-bottom",-t+"px"),this.adapter.addScrollAreaClass(l.cssClasses.SCROLL_AREA_SCROLL)},l.prototype.getScrollPosition=function(){if(this.isRTL())return this.computeCurrentScrollPositionRTL();var t=this.calculateCurrentTranslateX();return this.adapter.getScrollAreaScrollLeft()-t},l.prototype.handleInteraction=function(){this.isAnimating&&this.stopScrollAnimation()},l.prototype.handleTransitionEnd=function(t){var e=t.target;this.isAnimating&&this.adapter.eventTargetMatchesSelector(e,l.strings.CONTENT_SELECTOR)&&(this.isAnimating=!1,this.adapter.removeClass(l.cssClasses.ANIMATING))},l.prototype.incrementScroll=function(t){0!==t&&this.animate(this.getIncrementScrollOperation(t))},l.prototype.incrementScrollImmediate=function(t){if(0!==t){var e=this.getIncrementScrollOperation(t);0!==e.scrollDelta&&(this.stopScrollAnimation(),this.adapter.setScrollAreaScrollLeft(e.finalScrollPosition))}},l.prototype.scrollTo=function(t){this.isRTL()?this.scrollToImplRTL(t):this.scrollToImpl(t)},l.prototype.getRTLScroller=function(){return this.rtlScrollerInstance||(this.rtlScrollerInstance=this.rtlScrollerFactory()),this.rtlScrollerInstance},l.prototype.calculateCurrentTranslateX=function(){var t=this.adapter.getScrollContentStyleValue("transform");if("none"===t)return 0;var e=/\((.+?)\)/.exec(t);if(!e)return 0;var r=e[1],l=o(r.split(","),6);l[0],l[1],l[2],l[3];var n=l[4];return l[5],parseFloat(n)},l.prototype.clampScrollValue=function(t){var e=this.calculateScrollEdges();return Math.min(Math.max(e.left,t),e.right)},l.prototype.computeCurrentScrollPositionRTL=function(){var t=this.calculateCurrentTranslateX();return this.getRTLScroller().getScrollPositionRTL(t)},l.prototype.calculateScrollEdges=function(){return{left:0,right:this.adapter.getScrollContentOffsetWidth()-this.adapter.getScrollAreaOffsetWidth()}},l.prototype.scrollToImpl=function(t){var e=this.getScrollPosition(),r=this.clampScrollValue(t),o=r-e;this.animate({finalScrollPosition:r,scrollDelta:o})},l.prototype.scrollToImplRTL=function(t){var e=this.getRTLScroller().scrollToRTL(t);this.animate(e)},l.prototype.getIncrementScrollOperation=function(t){if(this.isRTL())return this.getRTLScroller().incrementScrollRTL(t);var e=this.getScrollPosition(),r=t+e,o=this.clampScrollValue(r);return{finalScrollPosition:o,scrollDelta:o-e}},l.prototype.animate=function(t){var e=this;0!==t.scrollDelta&&(this.stopScrollAnimation(),this.adapter.setScrollAreaScrollLeft(t.finalScrollPosition),this.adapter.setScrollContentStyleProperty("transform","translateX("+t.scrollDelta+"px)"),this.adapter.computeScrollAreaClientRect(),requestAnimationFrame((function(){e.adapter.addClass(l.cssClasses.ANIMATING),e.adapter.setScrollContentStyleProperty("transform","none")})),this.isAnimating=!0)},l.prototype.stopScrollAnimation=function(){this.isAnimating=!1;var t=this.getAnimatingScrollPosition();this.adapter.removeClass(l.cssClasses.ANIMATING),this.adapter.setScrollContentStyleProperty("transform","translateX(0px)"),this.adapter.setScrollAreaScrollLeft(t)},l.prototype.getAnimatingScrollPosition=function(){var t=this.calculateCurrentTranslateX(),e=this.adapter.getScrollAreaScrollLeft();return this.isRTL()?this.getRTLScroller().getAnimatingScrollPosition(e,t):e-t},l.prototype.rtlScrollerFactory=function(){var t=this.adapter.getScrollAreaScrollLeft();this.adapter.setScrollAreaScrollLeft(t-1);var e=this.adapter.getScrollAreaScrollLeft();if(e<0)return this.adapter.setScrollAreaScrollLeft(t),new b(this.adapter);var r=this.adapter.computeScrollAreaClientRect(),o=this.adapter.computeScrollContentClientRect(),l=Math.round(o.right-r.right);return this.adapter.setScrollAreaScrollLeft(t),l===e?new E(this.adapter):new A(this.adapter)},l.prototype.isRTL=function(){return"rtl"===this.adapter.getScrollContentStyleValue("direction")},l}(l);class v extends c{constructor(){super(...arguments),this.mdcFoundationClass=_,this._scrollbarHeight=-1}_handleInteraction(){this.mdcFoundation.handleInteraction()}_handleTransitionEnd(t){this.mdcFoundation.handleTransitionEnd(t)}render(){return s` -
-
-
-
-
- `}createAdapter(){return Object.assign(Object.assign({},d(this.mdcRoot)),{eventTargetMatchesSelector:(t,e)=>h(t,e),addScrollAreaClass:t=>this.scrollAreaElement.classList.add(t),setScrollAreaStyleProperty:(t,e)=>this.scrollAreaElement.style.setProperty(t,e),setScrollContentStyleProperty:(t,e)=>this.scrollContentElement.style.setProperty(t,e),getScrollContentStyleValue:t=>window.getComputedStyle(this.scrollContentElement).getPropertyValue(t),setScrollAreaScrollLeft:t=>this.scrollAreaElement.scrollLeft=t,getScrollAreaScrollLeft:()=>this.scrollAreaElement.scrollLeft,getScrollContentOffsetWidth:()=>this.scrollContentElement.offsetWidth,getScrollAreaOffsetWidth:()=>this.scrollAreaElement.offsetWidth,computeScrollAreaClientRect:()=>this.scrollAreaElement.getBoundingClientRect(),computeScrollContentClientRect:()=>this.scrollContentElement.getBoundingClientRect(),computeHorizontalScrollbarHeight:()=>(-1===this._scrollbarHeight&&(this.scrollAreaElement.style.overflowX="scroll",this._scrollbarHeight=this.scrollAreaElement.offsetHeight-this.scrollAreaElement.clientHeight,this.scrollAreaElement.style.overflowX=""),this._scrollbarHeight)})}getScrollPosition(){return this.mdcFoundation.getScrollPosition()}getScrollContentWidth(){return this.scrollContentElement.offsetWidth}incrementScrollPosition(t){this.mdcFoundation.incrementScroll(t)}scrollToPosition(t){this.mdcFoundation.scrollTo(t)}}n([i(".mdc-tab-scroller")],v.prototype,"mdcRoot",void 0),n([i(".mdc-tab-scroller__scroll-area")],v.prototype,"scrollAreaElement",void 0),n([i(".mdc-tab-scroller__scroll-content")],v.prototype,"scrollContentElement",void 0),n([a({passive:!0})],v.prototype,"_handleInteraction",null);const y=u`.mdc-tab-scroller{overflow-y:hidden}.mdc-tab-scroller.mdc-tab-scroller--animating .mdc-tab-scroller__scroll-content{transition:250ms transform cubic-bezier(0.4, 0, 0.2, 1)}.mdc-tab-scroller__test{position:absolute;top:-9999px;width:100px;height:100px;overflow-x:scroll}.mdc-tab-scroller__scroll-area{-webkit-overflow-scrolling:touch;display:flex;overflow-x:hidden}.mdc-tab-scroller__scroll-area::-webkit-scrollbar,.mdc-tab-scroller__test::-webkit-scrollbar{display:none}.mdc-tab-scroller__scroll-area--scroll{overflow-x:scroll}.mdc-tab-scroller__scroll-content{position:relative;display:flex;flex:1 0 auto;transform:none;will-change:transform}.mdc-tab-scroller--align-start .mdc-tab-scroller__scroll-content{justify-content:flex-start}.mdc-tab-scroller--align-end .mdc-tab-scroller__scroll-content{justify-content:flex-end}.mdc-tab-scroller--align-center .mdc-tab-scroller__scroll-content{justify-content:center}.mdc-tab-scroller--animating .mdc-tab-scroller__scroll-area{-webkit-overflow-scrolling:auto}:host{display:flex}.mdc-tab-scroller{flex:1}`;let R=class extends v{};R.styles=[y],R=n([p("mwc-tab-scroller")],R);var I={ARROW_LEFT_KEY:"ArrowLeft",ARROW_RIGHT_KEY:"ArrowRight",END_KEY:"End",ENTER_KEY:"Enter",HOME_KEY:"Home",SPACE_KEY:"Space",TAB_ACTIVATED_EVENT:"MDCTabBar:activated",TAB_SCROLLER_SELECTOR:".mdc-tab-scroller",TAB_SELECTOR:".mdc-tab"},L={ARROW_LEFT_KEYCODE:37,ARROW_RIGHT_KEYCODE:39,END_KEYCODE:35,ENTER_KEYCODE:13,EXTRA_SCROLL_AMOUNT:20,HOME_KEYCODE:36,SPACE_KEYCODE:32},C=new Set;C.add(I.ARROW_LEFT_KEY),C.add(I.ARROW_RIGHT_KEY),C.add(I.END_KEY),C.add(I.HOME_KEY),C.add(I.ENTER_KEY),C.add(I.SPACE_KEY);var O=new Map;O.set(L.ARROW_LEFT_KEYCODE,I.ARROW_LEFT_KEY),O.set(L.ARROW_RIGHT_KEYCODE,I.ARROW_RIGHT_KEY),O.set(L.END_KEYCODE,I.END_KEY),O.set(L.HOME_KEYCODE,I.HOME_KEY),O.set(L.ENTER_KEYCODE,I.ENTER_KEY),O.set(L.SPACE_KEYCODE,I.SPACE_KEY);var x=function(e){function o(t){var l=e.call(this,r(r({},o.defaultAdapter),t))||this;return l.useAutomaticActivation=!1,l}return t(o,e),Object.defineProperty(o,"strings",{get:function(){return I},enumerable:!1,configurable:!0}),Object.defineProperty(o,"numbers",{get:function(){return L},enumerable:!1,configurable:!0}),Object.defineProperty(o,"defaultAdapter",{get:function(){return{scrollTo:function(){},incrementScroll:function(){},getScrollPosition:function(){return 0},getScrollContentWidth:function(){return 0},getOffsetWidth:function(){return 0},isRTL:function(){return!1},setActiveTab:function(){},activateTabAtIndex:function(){},deactivateTabAtIndex:function(){},focusTabAtIndex:function(){},getTabIndicatorClientRectAtIndex:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},getTabDimensionsAtIndex:function(){return{rootLeft:0,rootRight:0,contentLeft:0,contentRight:0}},getPreviousActiveTabIndex:function(){return-1},getFocusedTabIndex:function(){return-1},getIndexOfTabById:function(){return-1},getTabListLength:function(){return 0},notifyTabActivated:function(){}}},enumerable:!1,configurable:!0}),o.prototype.setUseAutomaticActivation=function(t){this.useAutomaticActivation=t},o.prototype.activateTab=function(t){var e,r=this.adapter.getPreviousActiveTabIndex();this.indexIsInRange(t)&&t!==r&&(-1!==r&&(this.adapter.deactivateTabAtIndex(r),e=this.adapter.getTabIndicatorClientRectAtIndex(r)),this.adapter.activateTabAtIndex(t,e),this.scrollIntoView(t),this.adapter.notifyTabActivated(t))},o.prototype.handleKeyDown=function(t){var e=this.getKeyFromEvent(t);if(void 0!==e)if(this.isActivationKey(e)||t.preventDefault(),this.useAutomaticActivation){if(this.isActivationKey(e))return;var r=this.determineTargetFromKey(this.adapter.getPreviousActiveTabIndex(),e);this.adapter.setActiveTab(r),this.scrollIntoView(r)}else{var o=this.adapter.getFocusedTabIndex();if(this.isActivationKey(e))this.adapter.setActiveTab(o);else{r=this.determineTargetFromKey(o,e);this.adapter.focusTabAtIndex(r),this.scrollIntoView(r)}}},o.prototype.handleTabInteraction=function(t){this.adapter.setActiveTab(this.adapter.getIndexOfTabById(t.detail.tabId))},o.prototype.scrollIntoView=function(t){this.indexIsInRange(t)&&(0!==t?t!==this.adapter.getTabListLength()-1?this.isRTL()?this.scrollIntoViewImplRTL(t):this.scrollIntoViewImpl(t):this.adapter.scrollTo(this.adapter.getScrollContentWidth()):this.adapter.scrollTo(0))},o.prototype.determineTargetFromKey=function(t,e){var r=this.isRTL(),o=this.adapter.getTabListLength()-1,l=t;return e===I.END_KEY?l=o:e===I.ARROW_LEFT_KEY&&!r||e===I.ARROW_RIGHT_KEY&&r?l-=1:e===I.ARROW_RIGHT_KEY&&!r||e===I.ARROW_LEFT_KEY&&r?l+=1:l=0,l<0?l=o:l>o&&(l=0),l},o.prototype.calculateScrollIncrement=function(t,e,r,o){var l=this.adapter.getTabDimensionsAtIndex(e),n=l.contentLeft-r-o,i=l.contentRight-r-L.EXTRA_SCROLL_AMOUNT,a=n+L.EXTRA_SCROLL_AMOUNT;return et?Math.max(a,0):Math.min(c,0)},o.prototype.findAdjacentTabIndexClosestToEdge=function(t,e,r,o){var l=e.rootLeft-r,n=e.rootRight-r-o,i=l+n;return l<0||i<0?t-1:n>0||i>0?t+1:-1},o.prototype.findAdjacentTabIndexClosestToEdgeRTL=function(t,e,r,o,l){var n=l-e.rootLeft-o-r,i=l-e.rootRight-r,a=n+i;return n>0||a>0?t+1:i<0||a<0?t-1:-1},o.prototype.getKeyFromEvent=function(t){return C.has(t.key)?t.key:O.get(t.keyCode)},o.prototype.isActivationKey=function(t){return t===I.SPACE_KEY||t===I.ENTER_KEY},o.prototype.indexIsInRange=function(t){return t>=0&&t - - - `}_getTabs(){return this.tabsSlot.assignedNodes({flatten:!0}).filter((t=>t instanceof g))}_getTab(t){return this._getTabs()[t]}createAdapter(){return{scrollTo:t=>this.scrollerElement.scrollToPosition(t),incrementScroll:t=>this.scrollerElement.incrementScrollPosition(t),getScrollPosition:()=>this.scrollerElement.getScrollPosition(),getScrollContentWidth:()=>this.scrollerElement.getScrollContentWidth(),getOffsetWidth:()=>this.mdcRoot.offsetWidth,isRTL:()=>"rtl"===window.getComputedStyle(this.mdcRoot).getPropertyValue("direction"),setActiveTab:t=>this.mdcFoundation.activateTab(t),activateTabAtIndex:(t,e)=>{const r=this._getTab(t);void 0!==r&&r.activate(e),this._previousActiveIndex=t},deactivateTabAtIndex:t=>{const e=this._getTab(t);void 0!==e&&e.deactivate()},focusTabAtIndex:t=>{const e=this._getTab(t);void 0!==e&&e.focus()},getTabIndicatorClientRectAtIndex:t=>{const e=this._getTab(t);return void 0!==e?e.computeIndicatorClientRect():new DOMRect},getTabDimensionsAtIndex:t=>{const e=this._getTab(t);return void 0!==e?e.computeDimensions():{rootLeft:0,rootRight:0,contentLeft:0,contentRight:0}},getPreviousActiveTabIndex:()=>this._previousActiveIndex,getFocusedTabIndex:()=>{const t=this._getTabs(),e=this.getRootNode().activeElement;return t.indexOf(e)},getIndexOfTabById:t=>{const e=this._getTabs();for(let r=0;rthis._getTabs().length,notifyTabActivated:t=>{this.activeIndex=t,this.dispatchEvent(new CustomEvent(x.strings.TAB_ACTIVATED_EVENT,{detail:{index:t},bubbles:!0,cancelable:!0}))}}}firstUpdated(){}async getUpdateComplete(){const t=await super.getUpdateComplete();return await this.scrollerElement.updateComplete,void 0===this.mdcFoundation&&this.createFoundation(),t}scrollIndexIntoView(t){this.mdcFoundation.scrollIntoView(t)}}n([i(".mdc-tab-bar")],P.prototype,"mdcRoot",void 0),n([i("mwc-tab-scroller")],P.prototype,"scrollerElement",void 0),n([i("slot")],P.prototype,"tabsSlot",void 0),n([f((async function(){await this.updateComplete,this.activeIndex!==this._previousActiveIndex&&this.mdcFoundation.activateTab(this.activeIndex)})),m({type:Number})],P.prototype,"activeIndex",void 0);const w=u`.mdc-tab-bar{width:100%}.mdc-tab{height:48px}.mdc-tab--stacked{height:72px}:host{display:block}.mdc-tab-bar{flex:1}mwc-tab{--mdc-tab-height: 48px;--mdc-tab-stacked-height: 72px}`;let K=class extends P{};K.styles=[w],K=n([p("mwc-tab-bar")],K);export{K as TabBar}; diff --git a/material-yew/build/mwc-tab.js b/material-yew/build/mwc-tab.js deleted file mode 100644 index f616ed1..0000000 --- a/material-yew/build/mwc-tab.js +++ /dev/null @@ -1 +0,0 @@ -import{d as t,_ as a,ai as e,f as r}from"./core.js";const c=t`.material-icons{font-family:var(--mdc-icon-font, "Material Icons");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}.mdc-tab{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-button-font-size, 0.875rem);line-height:2.25rem;line-height:var(--mdc-typography-button-line-height, 2.25rem);font-weight:500;font-weight:var(--mdc-typography-button-font-weight, 500);letter-spacing:0.0892857143em;letter-spacing:var(--mdc-typography-button-letter-spacing, 0.0892857143em);text-decoration:none;text-decoration:var(--mdc-typography-button-text-decoration, none);text-transform:uppercase;text-transform:var(--mdc-typography-button-text-transform, uppercase);position:relative}.mdc-tab .mdc-tab__text-label{color:rgba(0, 0, 0, 0.6)}.mdc-tab .mdc-tab__icon{color:rgba(0, 0, 0, 0.54);fill:currentColor}.mdc-tab.mdc-ripple-upgraded--background-focused.mdc-tab--active .mdc-tab__focus-ring,.mdc-tab:not(.mdc-ripple-upgraded):focus.mdc-tab--active .mdc-tab__focus-ring{pointer-events:none;border:2px solid transparent;border-radius:8px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc( 100% + -12px );width:calc( 100% + -8px );margin-top:-2px;z-index:2}@media screen and (forced-colors: active){.mdc-tab.mdc-ripple-upgraded--background-focused.mdc-tab--active .mdc-tab__focus-ring,.mdc-tab:not(.mdc-ripple-upgraded):focus.mdc-tab--active .mdc-tab__focus-ring{border-color:CanvasText}}.mdc-tab.mdc-ripple-upgraded--background-focused.mdc-tab--active .mdc-tab__focus-ring::after,.mdc-tab:not(.mdc-ripple-upgraded):focus.mdc-tab--active .mdc-tab__focus-ring::after{content:"";border:2px solid transparent;border-radius:10px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-tab.mdc-ripple-upgraded--background-focused.mdc-tab--active .mdc-tab__focus-ring::after,.mdc-tab:not(.mdc-ripple-upgraded):focus.mdc-tab--active .mdc-tab__focus-ring::after{border-color:CanvasText}}.mdc-tab.mdc-ripple-upgraded--background-focused .mdc-tab__focus-ring,.mdc-tab:not(.mdc-ripple-upgraded):focus .mdc-tab__focus-ring{pointer-events:none;border:2px solid transparent;border-radius:8px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc( 100% + -8px );width:calc( 100% + -8px );z-index:2}@media screen and (forced-colors: active){.mdc-tab.mdc-ripple-upgraded--background-focused .mdc-tab__focus-ring,.mdc-tab:not(.mdc-ripple-upgraded):focus .mdc-tab__focus-ring{border-color:CanvasText}}.mdc-tab.mdc-ripple-upgraded--background-focused .mdc-tab__focus-ring::after,.mdc-tab:not(.mdc-ripple-upgraded):focus .mdc-tab__focus-ring::after{content:"";border:2px solid transparent;border-radius:10px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-tab.mdc-ripple-upgraded--background-focused .mdc-tab__focus-ring::after,.mdc-tab:not(.mdc-ripple-upgraded):focus .mdc-tab__focus-ring::after{border-color:CanvasText}}.mdc-tab__content{position:relative}.mdc-tab__icon{width:24px;height:24px;font-size:24px}.mdc-tab--active .mdc-tab__text-label{color:#6200ee;color:var(--mdc-theme-primary, #6200ee)}.mdc-tab--active .mdc-tab__icon{color:#6200ee;color:var(--mdc-theme-primary, #6200ee);fill:currentColor}.mdc-tab{background:none}.mdc-tab{min-width:90px;padding-right:24px;padding-left:24px;display:flex;flex:1 0 auto;justify-content:center;box-sizing:border-box;margin:0;padding-top:0;padding-bottom:0;border:none;outline:none;text-align:center;white-space:nowrap;cursor:pointer;-webkit-appearance:none;z-index:1}.mdc-tab::-moz-focus-inner{padding:0;border:0}.mdc-tab--min-width{flex:0 1 auto}.mdc-tab__content{display:flex;align-items:center;justify-content:center;height:inherit;pointer-events:none}.mdc-tab__text-label{transition:150ms color linear;display:inline-block;line-height:1;z-index:2}.mdc-tab__icon{transition:150ms color linear;z-index:2}.mdc-tab--stacked .mdc-tab__content{flex-direction:column;align-items:center;justify-content:center}.mdc-tab--stacked .mdc-tab__text-label{padding-top:6px;padding-bottom:4px}.mdc-tab--active .mdc-tab__text-label,.mdc-tab--active .mdc-tab__icon{transition-delay:100ms}.mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label{padding-left:8px;padding-right:0}[dir=rtl] .mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label,.mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label[dir=rtl]{padding-left:0;padding-right:8px}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-tab{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mdc-tab .mdc-tab__ripple::before,.mdc-tab .mdc-tab__ripple::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-tab .mdc-tab__ripple::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-tab .mdc-tab__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-tab.mdc-ripple-upgraded .mdc-tab__ripple::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-tab.mdc-ripple-upgraded .mdc-tab__ripple::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-tab.mdc-ripple-upgraded--unbounded .mdc-tab__ripple::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-tab.mdc-ripple-upgraded--foreground-activation .mdc-tab__ripple::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-tab.mdc-ripple-upgraded--foreground-deactivation .mdc-tab__ripple::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-tab .mdc-tab__ripple::before,.mdc-tab .mdc-tab__ripple::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-tab.mdc-ripple-upgraded .mdc-tab__ripple::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-tab .mdc-tab__ripple::before,.mdc-tab .mdc-tab__ripple::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-tab:hover .mdc-tab__ripple::before,.mdc-tab.mdc-ripple-surface--hover .mdc-tab__ripple::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-tab.mdc-ripple-upgraded--background-focused .mdc-tab__ripple::before,.mdc-tab:not(.mdc-ripple-upgraded):focus .mdc-tab__ripple::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-tab:not(.mdc-ripple-upgraded) .mdc-tab__ripple::after{transition:opacity 150ms linear}.mdc-tab:not(.mdc-ripple-upgraded):active .mdc-tab__ripple::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-tab.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-tab__ripple{position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden;will-change:transform,opacity}:host{outline:none;flex:1 0 auto;display:flex;justify-content:center;-webkit-tap-highlight-color:transparent}.mdc-tab{height:var(--mdc-tab-height, 48px);margin-left:0;margin-right:0;padding-right:var(--mdc-tab-horizontal-padding, 24px);padding-left:var(--mdc-tab-horizontal-padding, 24px)}.mdc-tab--stacked{height:var(--mdc-tab-stacked-height, 72px)}.mdc-tab::-moz-focus-inner{border:0}.mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label{padding-left:8px;padding-right:0}[dir=rtl] .mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label,.mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label[dir=rtl]{padding-left:0;padding-right:8px}.mdc-tab:not(.mdc-tab--active) .mdc-tab__text-label{color:var(--mdc-tab-text-label-color-default, rgba(0, 0, 0, 0.6))}.mdc-tab:not(.mdc-tab--active) .mdc-tab__icon{color:var(--mdc-tab-color-default, rgba(0, 0, 0, 0.54))}`;let d=class extends e{};d.styles=[c],d=a([r("mwc-tab")],d);export{d as Tab}; diff --git a/material-yew/build/mwc-textarea.js b/material-yew/build/mwc-textarea.js deleted file mode 100644 index 9fd7542..0000000 --- a/material-yew/build/mwc-textarea.js +++ /dev/null @@ -1,28 +0,0 @@ -import{_ as e,i as t,e as i,aj as l,y as s,o as r,l as n,ak as a,d,al as o,f as h}from"./core.js";const u={fromAttribute:e=>null!==e&&(""===e||e),toAttribute:e=>"boolean"==typeof e?e?"":null:e};class c extends l{constructor(){super(...arguments),this.rows=2,this.cols=20,this.charCounter=!1}render(){const e=this.charCounter&&-1!==this.maxLength,t=e&&"internal"===this.charCounter,i=e&&!t,l=!!this.helper||!!this.validationMessage||i,n={"mdc-text-field--disabled":this.disabled,"mdc-text-field--no-label":!this.label,"mdc-text-field--filled":!this.outlined,"mdc-text-field--outlined":this.outlined,"mdc-text-field--end-aligned":this.endAligned,"mdc-text-field--with-internal-counter":t};return s` - - ${this.renderHelperText(l,i)} - `}renderInput(){const e=this.label?"label":void 0,t=-1===this.minLength?void 0:this.minLength,i=-1===this.maxLength?void 0:this.maxLength,l=this.autocapitalize?this.autocapitalize:void 0;return s` - `}}e([t("textarea")],c.prototype,"formElement",void 0),e([i({type:Number})],c.prototype,"rows",void 0),e([i({type:Number})],c.prototype,"cols",void 0),e([i({converter:u})],c.prototype,"charCounter",void 0);const p=d`.mdc-text-field{height:100%}.mdc-text-field__input{resize:none}`;let m=class extends c{};m.styles=[o,p],m=e([h("mwc-textarea")],m);export{m as TextArea}; diff --git a/material-yew/build/mwc-textfield.js b/material-yew/build/mwc-textfield.js deleted file mode 100644 index 308e582..0000000 --- a/material-yew/build/mwc-textfield.js +++ /dev/null @@ -1 +0,0 @@ -import{al as s,_ as e,aj as a,f as t}from"./core.js";let l=class extends a{};l.styles=[s],l=e([t("mwc-textfield")],l);export{l as TextField}; diff --git a/material-yew/build/mwc-top-app-bar-fixed.js b/material-yew/build/mwc-top-app-bar-fixed.js deleted file mode 100644 index c963ae0..0000000 --- a/material-yew/build/mwc-top-app-bar-fixed.js +++ /dev/null @@ -1 +0,0 @@ -import{g as s,am as e,an as a,ao as r,ap as t,aq as l,_ as o,f as i}from"./core.js";var n=function(a){function r(){var s=null!==a&&a.apply(this,arguments)||this;return s.wasScrolled=!1,s}return s(r,a),r.prototype.handleTargetScroll=function(){this.adapter.getViewportScrollY()<=0?this.wasScrolled&&(this.adapter.removeClass(e.FIXED_SCROLLED_CLASS),this.wasScrolled=!1):this.wasScrolled||(this.adapter.addClass(e.FIXED_SCROLLED_CLASS),this.wasScrolled=!0)},r}(a);class c extends r{constructor(){super(...arguments),this.mdcFoundationClass=n}barClasses(){return Object.assign(Object.assign({},super.barClasses()),{"mdc-top-app-bar--fixed":!0})}registerListeners(){this.scrollTarget.addEventListener("scroll",this.handleTargetScroll,t)}unregisterListeners(){this.scrollTarget.removeEventListener("scroll",this.handleTargetScroll)}}let d=class extends c{};d.styles=[l],d=o([i("mwc-top-app-bar-fixed")],d);export{d as TopAppBarFixed}; diff --git a/material-yew/build/mwc-top-app-bar.js b/material-yew/build/mwc-top-app-bar.js deleted file mode 100644 index f6c8f44..0000000 --- a/material-yew/build/mwc-top-app-bar.js +++ /dev/null @@ -1 +0,0 @@ -import{aq as s,_ as a,ao as e,f as o}from"./core.js";let t=class extends e{};t.styles=[s],t=a([o("mwc-top-app-bar")],t);export{t as TopAppBar}; diff --git a/material-yew/build/slider.js b/material-yew/build/slider.js deleted file mode 100644 index a98b3b2..0000000 --- a/material-yew/build/slider.js +++ /dev/null @@ -1,60 +0,0 @@ -import{d as t,g as e,h as i,A as r,a6 as n,a7 as a,M as s,_ as d,t as o,i as u,b as l,e as h,a as c,F as m,R as p,y as v,o as b,a3 as T,l as f,D as g,J as y,f as S}from"./core.js";export{a6 as Thumb}from"./core.js";const E=t`.mdc-slider{cursor:pointer;height:48px;margin:0 24px;position:relative;touch-action:pan-y}.mdc-slider .mdc-slider__track{height:4px;position:absolute;top:50%;transform:translateY(-50%);width:100%}.mdc-slider .mdc-slider__track--active,.mdc-slider .mdc-slider__track--inactive{display:flex;height:100%;position:absolute;width:100%}.mdc-slider .mdc-slider__track--active{border-radius:3px;height:6px;overflow:hidden;top:-1px}.mdc-slider .mdc-slider__track--active_fill{border-top:6px solid;box-sizing:border-box;height:100%;width:100%;position:relative;-webkit-transform-origin:left;transform-origin:left}[dir=rtl] .mdc-slider .mdc-slider__track--active_fill,.mdc-slider .mdc-slider__track--active_fill[dir=rtl]{-webkit-transform-origin:right;transform-origin:right}.mdc-slider .mdc-slider__track--inactive{border-radius:2px;height:4px;left:0;top:0}.mdc-slider .mdc-slider__track--inactive::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid transparent;border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-slider .mdc-slider__track--inactive::before{border-color:CanvasText}}.mdc-slider .mdc-slider__track--active_fill{border-color:#6200ee;border-color:var(--mdc-theme-primary, #6200ee)}.mdc-slider.mdc-slider--disabled .mdc-slider__track--active_fill{border-color:#000;border-color:var(--mdc-theme-on-surface, #000)}.mdc-slider .mdc-slider__track--inactive{background-color:#6200ee;background-color:var(--mdc-theme-primary, #6200ee);opacity:.24}.mdc-slider.mdc-slider--disabled .mdc-slider__track--inactive{background-color:#000;background-color:var(--mdc-theme-on-surface, #000);opacity:.24}.mdc-slider .mdc-slider__value-indicator-container{bottom:44px;left:50%;left:var(--slider-value-indicator-container-left, 50%);pointer-events:none;position:absolute;right:var(--slider-value-indicator-container-right);transform:translateX(-50%);transform:var(--slider-value-indicator-container-transform, translateX(-50%))}.mdc-slider .mdc-slider__value-indicator{transition:transform 100ms 0ms cubic-bezier(0.4, 0, 1, 1);align-items:center;border-radius:4px;display:flex;height:32px;padding:0 12px;transform:scale(0);transform-origin:bottom}.mdc-slider .mdc-slider__value-indicator::before{border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid;bottom:-5px;content:"";height:0;left:50%;left:var(--slider-value-indicator-caret-left, 50%);position:absolute;right:var(--slider-value-indicator-caret-right);transform:translateX(-50%);transform:var(--slider-value-indicator-caret-transform, translateX(-50%));width:0}.mdc-slider .mdc-slider__value-indicator::after{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid transparent;border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-slider .mdc-slider__value-indicator::after{border-color:CanvasText}}.mdc-slider .mdc-slider__thumb--with-indicator .mdc-slider__value-indicator-container{pointer-events:auto}.mdc-slider .mdc-slider__thumb--with-indicator .mdc-slider__value-indicator{transition:transform 100ms 0ms cubic-bezier(0, 0, 0.2, 1);transform:scale(1)}@media(prefers-reduced-motion){.mdc-slider .mdc-slider__value-indicator,.mdc-slider .mdc-slider__thumb--with-indicator .mdc-slider__value-indicator{transition:none}}.mdc-slider .mdc-slider__value-indicator-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:0.875rem;font-size:var(--mdc-typography-subtitle2-font-size, 0.875rem);line-height:1.375rem;line-height:var(--mdc-typography-subtitle2-line-height, 1.375rem);font-weight:500;font-weight:var(--mdc-typography-subtitle2-font-weight, 500);letter-spacing:0.0071428571em;letter-spacing:var(--mdc-typography-subtitle2-letter-spacing, 0.0071428571em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle2-text-transform, inherit)}.mdc-slider .mdc-slider__value-indicator{background-color:#000;opacity:.6}.mdc-slider .mdc-slider__value-indicator::before{border-top-color:#000}.mdc-slider .mdc-slider__value-indicator{color:#fff;color:var(--mdc-theme-on-primary, #fff)}.mdc-slider .mdc-slider__thumb{display:flex;height:48px;left:-24px;outline:none;position:absolute;user-select:none;width:48px}.mdc-slider .mdc-slider__thumb--top{z-index:1}.mdc-slider .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-style:solid;border-width:1px;box-sizing:content-box}.mdc-slider .mdc-slider__thumb-knob{box-shadow:0px 2px 1px -1px rgba(0, 0, 0, 0.2),0px 1px 1px 0px rgba(0, 0, 0, 0.14),0px 1px 3px 0px rgba(0,0,0,.12);border:10px solid;border-radius:50%;box-sizing:border-box;height:20px;left:50%;position:absolute;top:50%;transform:translate(-50%, -50%);width:20px}.mdc-slider .mdc-slider__thumb-knob{background-color:#6200ee;background-color:var(--mdc-theme-primary, #6200ee);border-color:#6200ee;border-color:var(--mdc-theme-primary, #6200ee)}.mdc-slider .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mdc-slider .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-color:#fff}.mdc-slider.mdc-slider--disabled .mdc-slider__thumb-knob{background-color:#000;background-color:var(--mdc-theme-on-surface, #000);border-color:#000;border-color:var(--mdc-theme-on-surface, #000)}.mdc-slider.mdc-slider--disabled .mdc-slider__thumb--top .mdc-slider__thumb-knob,.mdc-slider.mdc-slider--disabled .mdc-slider__thumb--top.mdc-slider__thumb:hover .mdc-slider__thumb-knob,.mdc-slider.mdc-slider--disabled .mdc-slider__thumb--top.mdc-slider__thumb--focused .mdc-slider__thumb-knob{border-color:#fff}.mdc-slider .mdc-slider__thumb::before,.mdc-slider .mdc-slider__thumb::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-slider .mdc-slider__thumb:hover::before,.mdc-slider .mdc-slider__thumb.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-slider .mdc-slider__thumb.mdc-ripple-upgraded--background-focused::before,.mdc-slider .mdc-slider__thumb:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-slider .mdc-slider__thumb:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-slider .mdc-slider__thumb:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-slider .mdc-slider__thumb.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-slider .mdc-slider__tick-marks{align-items:center;box-sizing:border-box;display:flex;height:100%;justify-content:space-between;padding:0 1px;position:absolute;width:100%}.mdc-slider .mdc-slider__tick-mark--active,.mdc-slider .mdc-slider__tick-mark--inactive{border-radius:50%;height:2px;width:2px}.mdc-slider .mdc-slider__tick-mark--active{background-color:#fff;background-color:var(--mdc-theme-on-primary, #fff);opacity:.6}.mdc-slider.mdc-slider--disabled .mdc-slider__tick-mark--active{background-color:#fff;background-color:var(--mdc-theme-on-primary, #fff);opacity:.6}.mdc-slider .mdc-slider__tick-mark--inactive{background-color:#6200ee;background-color:var(--mdc-theme-primary, #6200ee);opacity:.6}.mdc-slider.mdc-slider--disabled .mdc-slider__tick-mark--inactive{background-color:#000;background-color:var(--mdc-theme-on-surface, #000);opacity:.6}.mdc-slider--discrete .mdc-slider__thumb,.mdc-slider--discrete .mdc-slider__track--active_fill{transition:transform 80ms ease}@media(prefers-reduced-motion){.mdc-slider--discrete .mdc-slider__thumb,.mdc-slider--discrete .mdc-slider__track--active_fill{transition:none}}.mdc-slider--disabled{opacity:.38;cursor:auto}.mdc-slider--disabled .mdc-slider__thumb{pointer-events:none}.mdc-slider__input{cursor:pointer;left:0;margin:0;height:100%;opacity:0;pointer-events:none;position:absolute;top:0;width:100%}:host{outline:none;display:block;-webkit-tap-highlight-color:transparent}.ripple{--mdc-ripple-color:#6200ee;--mdc-ripple-color:var(--mdc-theme-primary, #6200ee)}`;var _={animation:{prefixed:"-webkit-animation",standard:"animation"},transform:{prefixed:"-webkit-transform",standard:"transform"},transition:{prefixed:"-webkit-transition",standard:"transition"}};function R(t,e){if(function(t){return Boolean(t.document)&&"function"==typeof t.document.createElement}(t)&&e in _){var i=t.document.createElement("div"),r=_[e],n=r.standard,a=r.prefixed;return n in i.style?n:a}return e}var k,w="mdc-slider--disabled",A="mdc-slider--discrete",I="mdc-slider--range",x="mdc-slider__thumb--focused",D="mdc-slider__thumb--top",C="mdc-slider__thumb--with-indicator",P="mdc-slider--tick-marks",M=1,F=0,N=5,L="aria-valuetext",H="disabled",V="min",B="max",$="value",U="step",X="data-min-range",W="--slider-value-indicator-caret-left",O="--slider-value-indicator-caret-right",z="--slider-value-indicator-caret-transform",K="--slider-value-indicator-container-left",q="--slider-value-indicator-container-right",j="--slider-value-indicator-container-transform";!function(t){t.SLIDER_UPDATE="slider_update"}(k||(k={}));var J="undefined"!=typeof window,Y=function(t){function s(e){var n=t.call(this,i(i({},s.defaultAdapter),e))||this;return n.initialStylesRemoved=!1,n.isDisabled=!1,n.isDiscrete=!1,n.step=M,n.minRange=F,n.hasTickMarks=!1,n.isRange=!1,n.thumb=null,n.downEventClientX=null,n.startThumbKnobWidth=0,n.endThumbKnobWidth=0,n.animFrame=new r,n}return e(s,t),Object.defineProperty(s,"defaultAdapter",{get:function(){return{hasClass:function(){return!1},addClass:function(){},removeClass:function(){},addThumbClass:function(){},removeThumbClass:function(){},getAttribute:function(){return null},getInputValue:function(){return""},setInputValue:function(){},getInputAttribute:function(){return null},setInputAttribute:function(){return null},removeInputAttribute:function(){return null},focusInput:function(){},isInputFocused:function(){return!1},shouldHideFocusStylesForPointerEvents:function(){return!1},getThumbKnobWidth:function(){return 0},getValueIndicatorContainerWidth:function(){return 0},getThumbBoundingClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},getBoundingClientRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},isRTL:function(){return!1},setThumbStyleProperty:function(){},removeThumbStyleProperty:function(){},setTrackActiveStyleProperty:function(){},removeTrackActiveStyleProperty:function(){},setValueIndicatorText:function(){},getValueToAriaValueTextFn:function(){return null},updateTickMarks:function(){},setPointerCapture:function(){},emitChangeEvent:function(){},emitInputEvent:function(){},emitDragStartEvent:function(){},emitDragEndEvent:function(){},registerEventHandler:function(){},deregisterEventHandler:function(){},registerThumbEventHandler:function(){},deregisterThumbEventHandler:function(){},registerInputEventHandler:function(){},deregisterInputEventHandler:function(){},registerBodyEventHandler:function(){},deregisterBodyEventHandler:function(){},registerWindowEventHandler:function(){},deregisterWindowEventHandler:function(){}}},enumerable:!1,configurable:!0}),s.prototype.init=function(){var t=this;this.isDisabled=this.adapter.hasClass(w),this.isDiscrete=this.adapter.hasClass(A),this.hasTickMarks=this.adapter.hasClass(P),this.isRange=this.adapter.hasClass(I);var e=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(V,this.isRange?n.START:n.END),V),i=this.convertAttributeValueToNumber(this.adapter.getInputAttribute(B,n.END),B),r=this.convertAttributeValueToNumber(this.adapter.getInputAttribute($,n.END),$),a=this.isRange?this.convertAttributeValueToNumber(this.adapter.getInputAttribute($,n.START),$):e,s=this.adapter.getInputAttribute(U,n.END),d=s?this.convertAttributeValueToNumber(s,U):this.step,o=this.adapter.getAttribute(X),u=o?this.convertAttributeValueToNumber(o,X):this.minRange;this.validateProperties({min:e,max:i,value:r,valueStart:a,step:d,minRange:u}),this.min=e,this.max=i,this.value=r,this.valueStart=a,this.step=d,this.minRange=u,this.numDecimalPlaces=G(this.step),this.valueBeforeDownEvent=r,this.valueStartBeforeDownEvent=a,this.mousedownOrTouchstartListener=this.handleMousedownOrTouchstart.bind(this),this.moveListener=this.handleMove.bind(this),this.pointerdownListener=this.handlePointerdown.bind(this),this.pointerupListener=this.handlePointerup.bind(this),this.thumbMouseenterListener=this.handleThumbMouseenter.bind(this),this.thumbMouseleaveListener=this.handleThumbMouseleave.bind(this),this.inputStartChangeListener=function(){t.handleInputChange(n.START)},this.inputEndChangeListener=function(){t.handleInputChange(n.END)},this.inputStartFocusListener=function(){t.handleInputFocus(n.START)},this.inputEndFocusListener=function(){t.handleInputFocus(n.END)},this.inputStartBlurListener=function(){t.handleInputBlur(n.START)},this.inputEndBlurListener=function(){t.handleInputBlur(n.END)},this.resizeListener=this.handleResize.bind(this),this.registerEventHandlers()},s.prototype.destroy=function(){this.deregisterEventHandlers()},s.prototype.setMin=function(t){this.min=t,this.isRange||(this.valueStart=t),this.updateUI()},s.prototype.setMax=function(t){this.max=t,this.updateUI()},s.prototype.getMin=function(){return this.min},s.prototype.getMax=function(){return this.max},s.prototype.getValue=function(){return this.value},s.prototype.setValue=function(t){if(this.isRange&&t= start thumb value ("+this.valueStart+") + min range ("+this.minRange+")");this.updateValue(t,n.END)},s.prototype.getValueStart=function(){if(!this.isRange)throw new Error("`valueStart` is only applicable for range sliders.");return this.valueStart},s.prototype.setValueStart=function(t){if(!this.isRange)throw new Error("`valueStart` is only applicable for range sliders.");if(this.isRange&&t>this.value-this.minRange)throw new Error("start thumb value ("+t+") must be <= end thumb value ("+this.value+") - min range ("+this.minRange+")");this.updateValue(t,n.START)},s.prototype.setStep=function(t){this.step=t,this.numDecimalPlaces=G(t),this.updateUI()},s.prototype.setMinRange=function(t){if(!this.isRange)throw new Error("`minRange` is only applicable for range sliders.");if(t<0)throw new Error("`minRange` must be non-negative. Current value: "+t);if(this.value-this.valueStart=i.left&&t<=i.right,s=t>=r.left&&t<=r.right;return a&&s?null:a?n.START:s?n.END:ethis.value?n.END:e-this.valueStart<=this.value-e?n.START:n.END},s.prototype.getThumbFromMoveEvent=function(t){if(null!==this.thumb)return this.thumb;if(null===this.downEventClientX)throw new Error("`downEventClientX` is null after move event.");return Math.abs(this.downEventClientX-t)this.value-this.minRange?this.value-this.minRange:this.isRange&&e===n.END&&te+i?(this.adapter.setThumbStyleProperty(W,i+"px",t),this.adapter.setThumbStyleProperty(O,"auto",t),this.adapter.setThumbStyleProperty(z,"translateX(-50%)",t),this.adapter.setThumbStyleProperty(K,"0",t),this.adapter.setThumbStyleProperty(q,"auto",t),this.adapter.setThumbStyleProperty(j,"none",t)):r/2>n-e+i?(this.adapter.setThumbStyleProperty(W,"auto",t),this.adapter.setThumbStyleProperty(O,i+"px",t),this.adapter.setThumbStyleProperty(z,"translateX(50%)",t),this.adapter.setThumbStyleProperty(K,"auto",t),this.adapter.setThumbStyleProperty(q,"0",t),this.adapter.setThumbStyleProperty(j,"none",t)):(this.adapter.setThumbStyleProperty(W,"50%",t),this.adapter.setThumbStyleProperty(O,"auto",t),this.adapter.setThumbStyleProperty(z,"translateX(-50%)",t),this.adapter.setThumbStyleProperty(K,"50%",t),this.adapter.setThumbStyleProperty(q,"auto",t),this.adapter.setThumbStyleProperty(j,"translateX(-50%)",t))}},s.prototype.removeInitialStyles=function(t){if(!this.initialStylesRemoved){var e=t?"right":"left";this.adapter.removeThumbStyleProperty(e,n.END),this.isRange&&this.adapter.removeThumbStyleProperty(e,n.START),this.initialStylesRemoved=!0,this.resetTrackAndThumbAnimation()}},s.prototype.resetTrackAndThumbAnimation=function(){var t=this;if(this.isDiscrete){var e=J?R(window,"transition"):"transition",i="none 0s ease 0s";this.adapter.setThumbStyleProperty(e,i,n.END),this.isRange&&this.adapter.setThumbStyleProperty(e,i,n.START),this.adapter.setTrackActiveStyleProperty(e,i),requestAnimationFrame((function(){t.adapter.removeThumbStyleProperty(e,n.END),t.adapter.removeTrackActiveStyleProperty(e),t.isRange&&t.adapter.removeThumbStyleProperty(e,n.START)}))}},s.prototype.updateOverlappingThumbsUI=function(t,e,i){var r=!1;if(this.adapter.isRTL()){var a=t-this.startThumbKnobWidth/2;r=e+this.endThumbKnobWidth/2>=a}else{r=t+this.startThumbKnobWidth/2>=e-this.endThumbKnobWidth/2}r?(this.adapter.addThumbClass(D,i||n.END),this.adapter.removeThumbClass(D,i===n.START?n.END:n.START)):(this.adapter.removeThumbClass(D,n.START),this.adapter.removeThumbClass(D,n.END))},s.prototype.convertAttributeValueToNumber=function(t,e){if(null===t)throw new Error("MDCSliderFoundation: `"+e+"` must be non-null.");var i=Number(t);if(isNaN(i))throw new Error("MDCSliderFoundation: `"+e+"` value is `"+t+"`, but must be a number.");return i},s.prototype.validateProperties=function(t){var e=t.min,i=t.max,r=t.value,n=t.valueStart,a=t.step,s=t.minRange;if(e>=i)throw new Error("MDCSliderFoundation: min must be strictly less than max. Current: [min: "+e+", max: "+i+"]");if(a<=0)throw new Error("MDCSliderFoundation: step must be a positive number. Current step: "+a);if(this.isRange){if(ri||ni)throw new Error("MDCSliderFoundation: values must be in [min, max] range. Current values: [start value: "+n+", end value: "+r+", min: "+e+", max: "+i+"]");if(n>r)throw new Error("MDCSliderFoundation: start value must be <= end value. Current values: [start value: "+n+", end value: "+r+"]");if(s<0)throw new Error("MDCSliderFoundation: minimum range must be non-negative. Current min range: "+s);if(r-ni)throw new Error("MDCSliderFoundation: value must be in [min, max] range. Current values: [value: "+r+", min: "+e+", max: "+i+"]");o=(r-e)/a;if(!Number.isInteger(parseFloat(o.toFixed(6))))throw new Error("MDCSliderFoundation: Slider value must be valid based on the step value ("+a+"). Current value: "+r)}},s.prototype.registerEventHandlers=function(){this.adapter.registerWindowEventHandler("resize",this.resizeListener),s.SUPPORTS_POINTER_EVENTS?(this.adapter.registerEventHandler("pointerdown",this.pointerdownListener),this.adapter.registerEventHandler("pointerup",this.pointerupListener)):(this.adapter.registerEventHandler("mousedown",this.mousedownOrTouchstartListener),this.adapter.registerEventHandler("touchstart",this.mousedownOrTouchstartListener)),this.isRange&&(this.adapter.registerThumbEventHandler(n.START,"mouseenter",this.thumbMouseenterListener),this.adapter.registerThumbEventHandler(n.START,"mouseleave",this.thumbMouseleaveListener),this.adapter.registerInputEventHandler(n.START,"change",this.inputStartChangeListener),this.adapter.registerInputEventHandler(n.START,"focus",this.inputStartFocusListener),this.adapter.registerInputEventHandler(n.START,"blur",this.inputStartBlurListener)),this.adapter.registerThumbEventHandler(n.END,"mouseenter",this.thumbMouseenterListener),this.adapter.registerThumbEventHandler(n.END,"mouseleave",this.thumbMouseleaveListener),this.adapter.registerInputEventHandler(n.END,"change",this.inputEndChangeListener),this.adapter.registerInputEventHandler(n.END,"focus",this.inputEndFocusListener),this.adapter.registerInputEventHandler(n.END,"blur",this.inputEndBlurListener)},s.prototype.deregisterEventHandlers=function(){this.adapter.deregisterWindowEventHandler("resize",this.resizeListener),s.SUPPORTS_POINTER_EVENTS?(this.adapter.deregisterEventHandler("pointerdown",this.pointerdownListener),this.adapter.deregisterEventHandler("pointerup",this.pointerupListener)):(this.adapter.deregisterEventHandler("mousedown",this.mousedownOrTouchstartListener),this.adapter.deregisterEventHandler("touchstart",this.mousedownOrTouchstartListener)),this.isRange&&(this.adapter.deregisterThumbEventHandler(n.START,"mouseenter",this.thumbMouseenterListener),this.adapter.deregisterThumbEventHandler(n.START,"mouseleave",this.thumbMouseleaveListener),this.adapter.deregisterInputEventHandler(n.START,"change",this.inputStartChangeListener),this.adapter.deregisterInputEventHandler(n.START,"focus",this.inputStartFocusListener),this.adapter.deregisterInputEventHandler(n.START,"blur",this.inputStartBlurListener)),this.adapter.deregisterThumbEventHandler(n.END,"mouseenter",this.thumbMouseenterListener),this.adapter.deregisterThumbEventHandler(n.END,"mouseleave",this.thumbMouseleaveListener),this.adapter.deregisterInputEventHandler(n.END,"change",this.inputEndChangeListener),this.adapter.deregisterInputEventHandler(n.END,"focus",this.inputEndFocusListener),this.adapter.deregisterInputEventHandler(n.END,"blur",this.inputEndBlurListener)},s.prototype.handlePointerup=function(){this.handleUp(),this.adapter.deregisterEventHandler("pointermove",this.moveListener)},s.SUPPORTS_POINTER_EVENTS=J&&Boolean(window.PointerEvent)&&!(["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document),s}(s);function G(t){var e=/(?:\.(\d+))?(?:[eE]([+\-]?\d+))?$/.exec(String(t));if(!e)return 0;var i=e[1]||"",r=e[2]||0;return Math.max(0,("0"===i?0:i.length)-Number(r))}class Q extends m{constructor(){super(...arguments),this.mdcFoundationClass=Y,this.disabled=!1,this.min=0,this.max=100,this.valueEnd=0,this.name="",this.step=1,this.withTickMarks=!1,this.discrete=!1,this.tickMarks=[],this.trackTransformOriginStyle="",this.trackLeftStyle="",this.trackRightStyle="",this.trackTransitionStyle="",this.endThumbWithIndicator=!1,this.endThumbTop=!1,this.shouldRenderEndRipple=!1,this.endThumbTransformStyle="",this.endThumbTransitionStyle="",this.endThumbCssProperties={},this.valueToAriaTextTransform=null,this.valueToValueIndicatorTransform=t=>`${t}`,this.boundMoveListener=null,this.endRippleHandlers=new p((()=>(this.shouldRenderEndRipple=!0,this.endRipple)))}update(t){if(t.has("valueEnd")&&this.mdcFoundation){this.mdcFoundation.setValue(this.valueEnd);const t=this.mdcFoundation.getValue();t!==this.valueEnd&&(this.valueEnd=t)}t.has("discrete")&&(this.discrete||(this.tickMarks=[])),super.update(t)}render(){return this.renderRootEl(v` - ${this.renderStartInput()} - ${this.renderEndInput()} - ${this.renderTrack()} - ${this.renderTickMarks()} - ${this.renderStartThumb()} - ${this.renderEndThumb()}`)}renderRootEl(t){const e=b({"mdc-slider--disabled":this.disabled,"mdc-slider--discrete":this.discrete});return v` -
- ${t} -
`}renderStartInput(){return T}renderEndInput(){var t;return v` - - `}renderTrack(){return T}renderTickMarks(){return this.withTickMarks?v` -
- ${this.tickMarks.map((t=>{const e=t===a.ACTIVE;return v`
`}))} -
`:T}renderStartThumb(){return T}renderEndThumb(){const t=b({"mdc-slider__thumb--with-indicator":this.endThumbWithIndicator,"mdc-slider__thumb--top":this.endThumbTop}),e=g(Object.assign({"-webkit-transform":this.endThumbTransformStyle,transform:this.endThumbTransformStyle,"-webkit-transition":this.endThumbTransitionStyle,transition:this.endThumbTransitionStyle,left:this.endThumbTransformStyle||"rtl"===getComputedStyle(this).direction?"":`calc(${(this.valueEnd-this.min)/(this.max-this.min)*100}% - 24px)`,right:this.endThumbTransformStyle||"rtl"!==getComputedStyle(this).direction?"":`calc(${(this.valueEnd-this.min)/(this.max-this.min)*100}% - 24px)`},this.endThumbCssProperties)),i=this.shouldRenderEndRipple?v``:T;return v` -
- ${i} - ${this.renderValueIndicator(this.valueToValueIndicatorTransform(this.valueEnd))} -
-
- `}renderValueIndicator(t){return this.discrete?v` - `:T}disconnectedCallback(){super.disconnectedCallback(),this.mdcFoundation&&this.mdcFoundation.destroy()}createAdapter(){}async firstUpdated(){super.firstUpdated(),await this.layout(!0)}updated(t){super.updated(t),this.mdcFoundation&&(t.has("disabled")&&this.mdcFoundation.setDisabled(this.disabled),t.has("min")&&this.mdcFoundation.setMin(this.min),t.has("max")&&this.mdcFoundation.setMax(this.max),t.has("step")&&this.mdcFoundation.setStep(this.step),t.has("discrete")&&this.mdcFoundation.setIsDiscrete(this.discrete),t.has("withTickMarks")&&this.mdcFoundation.setHasTickMarks(this.withTickMarks))}async layout(t=!1){var e;null===(e=this.mdcFoundation)||void 0===e||e.layout({skipUpdateUI:t}),this.requestUpdate(),await this.updateComplete}onEndChange(t){var e;this.valueEnd=Number(t.target.value),null===(e=this.mdcFoundation)||void 0===e||e.handleInputChange(n.END)}onEndFocus(){var t;null===(t=this.mdcFoundation)||void 0===t||t.handleInputFocus(n.END),this.endRippleHandlers.startFocus()}onEndBlur(){var t;null===(t=this.mdcFoundation)||void 0===t||t.handleInputBlur(n.END),this.endRippleHandlers.endFocus()}onEndMouseenter(){var t;null===(t=this.mdcFoundation)||void 0===t||t.handleThumbMouseenter(),this.endRippleHandlers.startHover()}onEndMouseleave(){var t;null===(t=this.mdcFoundation)||void 0===t||t.handleThumbMouseleave(),this.endRippleHandlers.endHover()}onPointerdown(t){this.layout(),this.mdcFoundation&&(this.mdcFoundation.handlePointerdown(t),this.boundMoveListener=this.mdcFoundation.handleMove.bind(this.mdcFoundation),this.mdcRoot.addEventListener("pointermove",this.boundMoveListener))}onPointerup(){this.mdcFoundation&&(this.mdcFoundation.handleUp(),this.boundMoveListener&&(this.mdcRoot.removeEventListener("pointermove",this.boundMoveListener),this.boundMoveListener=null))}onContextmenu(t){t.preventDefault()}setFormData(t){this.name&&t.append(this.name,`${this.valueEnd}`)}}d([u("input.end")],Q.prototype,"formElement",void 0),d([u(".mdc-slider")],Q.prototype,"mdcRoot",void 0),d([u(".end.mdc-slider__thumb")],Q.prototype,"endThumb",void 0),d([u(".end.mdc-slider__thumb .mdc-slider__thumb-knob")],Q.prototype,"endThumbKnob",void 0),d([u(".end.mdc-slider__thumb .mdc-slider__value-indicator-container")],Q.prototype,"endValueIndicatorContainer",void 0),d([l(".end .ripple")],Q.prototype,"endRipple",void 0),d([h({type:Boolean,reflect:!0})],Q.prototype,"disabled",void 0),d([h({type:Number})],Q.prototype,"min",void 0),d([h({type:Number})],Q.prototype,"max",void 0),d([h({type:Number})],Q.prototype,"valueEnd",void 0),d([h({type:String})],Q.prototype,"name",void 0),d([h({type:Number})],Q.prototype,"step",void 0),d([h({type:Boolean})],Q.prototype,"withTickMarks",void 0),d([h({type:Boolean})],Q.prototype,"discrete",void 0),d([o()],Q.prototype,"tickMarks",void 0),d([o()],Q.prototype,"trackTransformOriginStyle",void 0),d([o()],Q.prototype,"trackLeftStyle",void 0),d([o()],Q.prototype,"trackRightStyle",void 0),d([o()],Q.prototype,"trackTransitionStyle",void 0),d([o()],Q.prototype,"endThumbWithIndicator",void 0),d([o()],Q.prototype,"endThumbTop",void 0),d([o()],Q.prototype,"shouldRenderEndRipple",void 0),d([o()],Q.prototype,"endThumbTransformStyle",void 0),d([o()],Q.prototype,"endThumbTransitionStyle",void 0),d([o()],Q.prototype,"endThumbCssProperties",void 0),d([c,h({type:String,attribute:"aria-label"})],Q.prototype,"ariaLabel",void 0),d([c,h({type:String,attribute:"aria-labelledby"})],Q.prototype,"ariaLabelledBy",void 0),d([c,h({type:String,attribute:"aria-describedby"})],Q.prototype,"ariaDescribedBy",void 0);class Z extends Q{get value(){return this.valueEnd}set value(t){this.valueEnd=t}renderTrack(){const t=g({"transform-origin":this.trackTransformOriginStyle,left:this.trackLeftStyle,right:this.trackRightStyle,"-webkit-transform":`scaleX(${(this.valueEnd-this.min)/(this.max-this.min)})`,transform:`scaleX(${(this.valueEnd-this.min)/(this.max-this.min)})`,"-webkit-transition":this.trackTransitionStyle,transition:this.trackTransitionStyle});return v` -
-
-
-
-
-
-
`}createAdapter(){return{addClass:t=>{if("mdc-slider--disabled"===t)this.disabled=!0},removeClass:t=>{if("mdc-slider--disabled"===t)this.disabled=!1},hasClass:t=>{switch(t){case"mdc-slider--disabled":return this.disabled;case"mdc-slider--discrete":return this.discrete;default:return!1}},addThumbClass:(t,e)=>{if(e!==n.START&&"mdc-slider__thumb--with-indicator"===t)this.endThumbWithIndicator=!0},removeThumbClass:(t,e)=>{if(e!==n.START&&"mdc-slider__thumb--with-indicator"===t)this.endThumbWithIndicator=!1},registerEventHandler:()=>{},deregisterEventHandler:()=>{},registerBodyEventHandler:(t,e)=>{document.body.addEventListener(t,e)},deregisterBodyEventHandler:(t,e)=>{document.body.removeEventListener(t,e)},registerInputEventHandler:(t,e,i)=>{t!==n.START&&this.formElement.addEventListener(e,i)},deregisterInputEventHandler:(t,e,i)=>{t!==n.START&&this.formElement.removeEventListener(e,i)},registerThumbEventHandler:()=>{},deregisterThumbEventHandler:()=>{},registerWindowEventHandler:(t,e)=>{window.addEventListener(t,e)},deregisterWindowEventHandler:(t,e)=>{window.addEventListener(t,e)},emitChangeEvent:(t,e)=>{if(e===n.START)return;const i=new CustomEvent("change",{bubbles:!0,composed:!0,detail:{value:t,thumb:e}});this.dispatchEvent(i)},emitDragEndEvent:(t,e)=>{e!==n.START&&this.endRippleHandlers.endPress()},emitDragStartEvent:(t,e)=>{e!==n.START&&this.endRippleHandlers.startPress()},emitInputEvent:(t,e)=>{if(e===n.START)return;const i=new CustomEvent("input",{bubbles:!0,composed:!0,detail:{value:t,thumb:e}});this.dispatchEvent(i)},focusInput:t=>{t!==n.START&&this.formElement.focus()},getAttribute:()=>"",getBoundingClientRect:()=>this.mdcRoot.getBoundingClientRect(),getInputAttribute:(t,e)=>{if(e===n.START)return null;switch(t){case"min":return this.min.toString();case"max":return this.max.toString();case"value":return this.valueEnd.toString();case"step":return this.step.toString();default:return null}},getInputValue:t=>t===n.START?"":this.valueEnd.toString(),getThumbBoundingClientRect:t=>t===n.START?this.getBoundingClientRect():this.endThumb.getBoundingClientRect(),getThumbKnobWidth:t=>t===n.START?0:this.endThumbKnob.getBoundingClientRect().width,getValueIndicatorContainerWidth:t=>t===n.START?0:this.endValueIndicatorContainer.getBoundingClientRect().width,getValueToAriaValueTextFn:()=>this.valueToAriaTextTransform,isInputFocused:t=>{if(t===n.START)return!1;const e=y();return e[e.length-1]===this.formElement},isRTL:()=>"rtl"===getComputedStyle(this).direction,setInputAttribute:(t,e,i)=>{n.START},removeInputAttribute:t=>{},setThumbStyleProperty:(t,e,i)=>{if(i!==n.START)switch(t){case"transform":case"-webkit-transform":this.endThumbTransformStyle=e;break;case"transition":case"-webkit-transition":this.endThumbTransitionStyle=e;break;default:t.startsWith("--")&&(this.endThumbCssProperties[t]=e)}},removeThumbStyleProperty:(t,e)=>{if(e!==n.START)switch(t){case"left":case"right":break;case"transition":case"-webkit-transition":this.endThumbTransitionStyle=""}},setTrackActiveStyleProperty:(t,e)=>{switch(t){case"transform-origin":this.trackTransformOriginStyle=e;break;case"left":this.trackLeftStyle=e;break;case"right":this.trackRightStyle=e;break;case"transform":case"-webkit-transform":break;case"transition":case"-webkit-transition":this.trackTransitionStyle=e}},removeTrackActiveStyleProperty:t=>{switch(t){case"transition":case"-webkit-transition":this.trackTransitionStyle=""}},setInputValue:(t,e)=>{e!==n.START&&(this.valueEnd=Number(t))},setPointerCapture:t=>{this.mdcRoot.setPointerCapture(t)},setValueIndicatorText:()=>{},updateTickMarks:t=>{this.tickMarks=t}}}}d([h({type:Number})],Z.prototype,"value",null);let tt=class extends Z{};tt.styles=[E],tt=d([S("mwc-slider")],tt);export{tt as Slider}; diff --git a/material-yew/src/button.rs b/material-yew/src/button.rs deleted file mode 100644 index e99181d..0000000 --- a/material-yew/src/button.rs +++ /dev/null @@ -1,60 +0,0 @@ -use crate::bool_to_option; -use wasm_bindgen::prelude::*; -use yew::prelude::*; -use yew::virtual_dom::AttrValue; - -#[wasm_bindgen(module = "/build/mwc-button.js")] -extern "C" { - #[derive(Debug)] - type Button; - - // This needs to be added to each component - #[wasm_bindgen(getter, static_method_of = Button)] - fn _dummy_loader() -> JsValue; -} - -// call the macro with the type -loader_hack!(Button); - -/// Props for [`MatButton`] -/// -/// [MWC Documentation for properties](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/button#propertiesattributes) -#[derive(Debug, Properties, PartialEq, Clone)] -pub struct ButtonProps { - pub label: String, - #[prop_or_default] - pub icon: Option, - #[prop_or_default] - pub raised: bool, - #[prop_or_default] - pub unelevated: bool, - #[prop_or_default] - pub outlined: bool, - #[prop_or_default] - pub dense: bool, - #[prop_or_default] - pub disabled: bool, - #[prop_or_default] - pub trailing_icon: bool, -} - -component!( - MatButton, - ButtonProps, - |props: &ButtonProps| { - html! { - - } - }, - Button, - "button" -); diff --git a/material-yew/src/checkbox.rs b/material-yew/src/checkbox.rs deleted file mode 100644 index 0e403ba..0000000 --- a/material-yew/src/checkbox.rs +++ /dev/null @@ -1,103 +0,0 @@ -use crate::bool_to_option; -use gloo::events::EventListener; -use wasm_bindgen::prelude::*; -use web_sys::{Element, Node}; -use yew::prelude::*; -use yew::virtual_dom::AttrValue; - -#[wasm_bindgen(module = "/build/mwc-checkbox.js")] -extern "C" { - #[derive(Debug)] - #[wasm_bindgen(extends = Node)] - type Checkbox; - - #[wasm_bindgen(getter, static_method_of = Checkbox)] - fn _dummy_loader() -> JsValue; - - #[wasm_bindgen(method, setter)] - fn set_checked(this: &Checkbox, value: bool); - - #[wasm_bindgen(method, getter)] - fn checked(this: &Checkbox) -> bool; -} - -loader_hack!(Checkbox); - -/// The `mwc-checkbox` component -/// -/// [MWC Documentation](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/checkbox) -pub struct MatCheckbox { - node_ref: NodeRef, - change_listener: Option, -} - -/// Props for [`MatCheckbox`] -/// -/// MWC Documentation: -/// -/// - [Properties](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/checkbox#propertiesattributes) -/// - [Events](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/checkbox#events) -#[derive(Debug, Properties, PartialEq, Clone)] -pub struct CheckboxProps { - #[prop_or_default] - pub checked: bool, - #[prop_or_default] - pub indeterminate: bool, - #[prop_or_default] - pub disabled: bool, - #[prop_or_default] - pub value: Option, - #[prop_or_default] - pub reduced_touch_target: bool, - /// Binds to `change` event on `mwc-checkbox` - /// - /// See events docs to learn more. - #[prop_or_default] - pub onchange: Callback, -} - -impl Component for MatCheckbox { - type Message = (); - type Properties = CheckboxProps; - - fn create(_: &Context) -> Self { - Checkbox::ensure_loaded(); - Self { - node_ref: NodeRef::default(), - change_listener: None, - } - } - - fn view(&self, ctx: &Context) -> Html { - let props = ctx.props(); - html! { - - } - } - - fn changed(&mut self, _ctx: &Context, _old_props: &Self::Properties) -> bool { - // clear event listeners in case the props changed - self.change_listener = None; - true - } - - fn rendered(&mut self, ctx: &Context, _first_render: bool) { - let props = ctx.props(); - let element = self.node_ref.cast::().unwrap(); - element.set_checked(props.checked); - - if self.change_listener.is_none() { - let callback = props.onchange.clone(); - let target = self.node_ref.cast::().unwrap(); - self.change_listener = Some(EventListener::new(&target, "change", move |_| { - callback.emit(element.checked()); - })); - } - } -} diff --git a/material-yew/src/circular_progress.rs b/material-yew/src/circular_progress.rs deleted file mode 100644 index 6383119..0000000 --- a/material-yew/src/circular_progress.rs +++ /dev/null @@ -1,48 +0,0 @@ -use crate::{bool_to_option, to_option_string}; -use wasm_bindgen::prelude::*; -use yew::prelude::*; - -#[wasm_bindgen(module = "/build/mwc-circular-progress.js")] -extern "C" { - #[derive(Debug)] - type CircularProgress; - - // This needs to be added to each component - #[wasm_bindgen(getter, static_method_of = CircularProgress)] - fn _dummy_loader() -> JsValue; -} - -// call the macro with the type -loader_hack!(CircularProgress); - -/// Props for [`MatCircularProgress`] -/// -/// [MWC Documentation for properties](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/circular-progress#propertiesattributes) -#[derive(Debug, Properties, PartialEq, Clone)] -pub struct CircularProgressProps { - #[prop_or_default] - pub indeterminate: bool, - #[prop_or_default] - pub progress: f32, - #[prop_or_default] - pub density: u32, - #[prop_or_default] - pub closed: bool, -} - -component!( - MatCircularProgress, - CircularProgressProps, - |props: &CircularProgressProps| { - html! { - - } - }, - CircularProgress, - "circular-progress" -); diff --git a/material-yew/src/circular_progress_four_color.rs b/material-yew/src/circular_progress_four_color.rs deleted file mode 100644 index cded874..0000000 --- a/material-yew/src/circular_progress_four_color.rs +++ /dev/null @@ -1,48 +0,0 @@ -use crate::{bool_to_option, to_option_string}; -use wasm_bindgen::prelude::*; -use yew::prelude::*; - -#[wasm_bindgen(module = "/build/mwc-circular-progress-four-color.js")] -extern "C" { - #[derive(Debug)] - type CircularProgressFourColor; - - // This needs to be added to each component - #[wasm_bindgen(getter, static_method_of = CircularProgressFourColor)] - fn _dummy_loader() -> JsValue; -} - -// call the macro with the type -loader_hack!(CircularProgressFourColor); - -/// Props for [`MatCircularProgressFourColor`] -/// -/// [MWC Documentation for properties](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/circular-progress-four-color#propertiesattributes) -#[derive(Debug, Properties, PartialEq, Clone)] -pub struct CircularProgressFourColorProps { - #[prop_or_default] - pub indeterminate: bool, - #[prop_or_default] - pub progress: f32, - #[prop_or_default] - pub density: u32, - #[prop_or_default] - pub closed: bool, -} - -component!( - MatCircularProgressFourColor, - CircularProgressFourColorProps, - |props: &CircularProgressFourColorProps| { - html! { - - } - }, - CircularProgressFourColor, - "circular-progress-four-color" -); diff --git a/material-yew/src/dialog.rs b/material-yew/src/dialog.rs deleted file mode 100644 index cebfc83..0000000 --- a/material-yew/src/dialog.rs +++ /dev/null @@ -1,256 +0,0 @@ -mod dialog_action; - -pub use dialog_action::*; - -use crate::{bool_to_option, event_details_into, WeakComponentLink}; -use gloo::events::EventListener; -use wasm_bindgen::prelude::*; -use web_sys::{Element, Node}; -use yew::prelude::*; -use yew::virtual_dom::AttrValue; - -#[wasm_bindgen(module = "/build/mwc-dialog.js")] -extern "C" { - #[derive(Debug)] - #[wasm_bindgen(extends = Node)] - type Dialog; - - #[wasm_bindgen(getter, static_method_of = Dialog)] - fn _dummy_loader() -> JsValue; - - #[wasm_bindgen(method)] - fn focus(this: &Dialog); - - #[wasm_bindgen(method)] - fn blur(this: &Dialog); - - #[wasm_bindgen(method)] - fn show(this: &Dialog); - - #[wasm_bindgen(method)] - fn close(this: &Dialog); -} - -loader_hack!(Dialog); - -/// The `mwc-dialog` component. -/// -/// [MWC Documentation](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/dialog) -/// -/// ## Actions -/// -/// In order to pass actions, [`MatDialogAction`] component should be -/// used. -pub struct MatDialog { - node_ref: NodeRef, - opening_listener: Option, - opened_listener: Option, - closing_listener: Option, - closed_listener: Option, -} - -/// Props for [`MatDialog`] -/// -/// MWC Documentation: -/// -/// - [Properties](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/dialog#propertiesattributes) -/// - [Events](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/dialog#events) -#[derive(Properties, PartialEq, Clone)] -pub struct DialogProps { - #[prop_or_default] - pub open: bool, - #[prop_or_default] - pub hide_action: bool, - #[prop_or_default] - pub stacked: bool, - #[prop_or_default] - pub heading: Option, - #[prop_or_default] - pub scrim_click_action: Option, - #[prop_or_default] - pub escape_key_action: Option, - #[prop_or_default] - pub default_action: Option, - #[prop_or_default] - pub action_attribute: Option, - #[prop_or_default] - pub initial_focus_attribute: Option, - /// Binds to `opening` event on `mwc-dialog` - /// - /// See events docs to learn more. - #[prop_or_default] - pub onopening: Callback<()>, - /// Binds to `opened` event on `mwc-dialog` - /// - /// See events docs to learn more. - #[prop_or_default] - pub onopened: Callback<()>, - /// Binds to `closing` event on `mwc-dialog` - /// - /// See events docs to learn more. - #[prop_or_default] - pub onclosing: Callback, - /// Binds to `closed` event on `mwc-dialog` - /// - /// See events docs to learn more. - #[prop_or_default] - pub onclosed: Callback, - /// [`WeakComponentLink`] for `MatDialog` which provides the following - /// methods: - /// - ```focus(&self)``` - /// - ```blur(&self)``` - /// - ```show(&self)``` - /// - ```close(&self)``` - /// - /// See [`WeakComponentLink`] documentation for more information - #[prop_or_default] - pub dialog_link: WeakComponentLink, - pub children: Children, -} - -impl Component for MatDialog { - type Message = (); - type Properties = DialogProps; - - fn create(ctx: &Context) -> Self { - ctx.props() - .dialog_link - .borrow_mut() - .replace(ctx.link().clone()); - Dialog::ensure_loaded(); - Self { - node_ref: NodeRef::default(), - opening_listener: None, - opened_listener: None, - closing_listener: None, - closed_listener: None, - } - } - - fn view(&self, ctx: &Context) -> Html { - let props = ctx.props(); - html! { - - {props.children.clone()} - - } - } - - fn changed(&mut self, ctx: &Context, _old_props: &Self::Properties) -> bool { - // clear event listeners and update link in case the props changed - self.opening_listener = None; - self.opened_listener = None; - self.closing_listener = None; - self.closed_listener = None; - ctx.props() - .dialog_link - .borrow_mut() - .replace(ctx.link().clone()); - true - } - - fn rendered(&mut self, ctx: &Context, _first_render: bool) { - let props = ctx.props(); - let element = self.node_ref.cast::().unwrap(); - if self.opening_listener.is_none() { - let onopening = props.onopening.clone(); - self.opening_listener = Some(EventListener::new(&element, "opening", move |_| { - onopening.emit(()) - })); - } - - if self.opened_listener.is_none() { - let onopened = props.onopened.clone(); - self.opened_listener = Some(EventListener::new(&element, "opened", move |_| { - onopened.emit(()) - })); - } - - if self.closing_listener.is_none() { - let onclosing = props.onclosing.clone(); - self.closing_listener = Some(EventListener::new(&element, "closing", move |event| { - onclosing.emit(action_from_event(event)) - })); - } - - if self.closed_listener.is_none() { - let onclosed = props.onclosed.clone(); - self.closed_listener = Some(EventListener::new(&element, "closed", move |event| { - onclosed.emit(action_from_event(event)) - })); - } - } -} - -impl WeakComponentLink { - pub fn focus(&self) { - self.borrow() - .as_ref() - .unwrap() - .get_component() - .unwrap() - .node_ref - .cast::() - .unwrap() - .focus() - } - - pub fn blur(&self) { - self.borrow() - .as_ref() - .unwrap() - .get_component() - .unwrap() - .node_ref - .cast::() - .unwrap() - .blur() - } - - pub fn show(&self) { - self.borrow() - .as_ref() - .unwrap() - .get_component() - .unwrap() - .node_ref - .cast::() - .unwrap() - .show() - } - - pub fn close(&self) { - self.borrow() - .as_ref() - .unwrap() - .get_component() - .unwrap() - .node_ref - .cast::() - .unwrap() - .close() - } -} - -#[wasm_bindgen] -extern "C" { - type DialogActionType; - - #[wasm_bindgen(method, getter)] - fn action(this: &DialogActionType) -> String; -} - -fn action_from_event(event: &Event) -> String { - event_details_into::(event).action() -} diff --git a/material-yew/src/dialog/dialog_action.rs b/material-yew/src/dialog/dialog_action.rs deleted file mode 100644 index 2e4536b..0000000 --- a/material-yew/src/dialog/dialog_action.rs +++ /dev/null @@ -1,78 +0,0 @@ -use std::fmt; -use yew::prelude::*; -use yew::virtual_dom::AttrValue; - -/// Dialog action type. -#[derive(Clone, PartialEq)] -pub enum ActionType { - /// Binds `to slot` of `primaryAction` - Primary, - /// Binds `to slot` of `secondaryAction` - Secondary, -} - -impl ActionType { - fn as_str(&self) -> &'static str { - match self { - ActionType::Primary => "primaryAction", - ActionType::Secondary => "secondaryAction", - } - } -} - -impl fmt::Display for ActionType { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "{}", self.as_str()) - } -} - -/// Props for [`MatDialogAction`] -#[derive(Properties, PartialEq, Clone)] -pub struct ActionProps { - pub action_type: ActionType, - #[prop_or_default] - pub action: Option, - pub children: Children, -} - -/// Defines actions for [`MatDialog`][crate::MatDialog]. -/// -/// If the child passed is an element (a `VTag`), then it is modified to include -/// the appropriate attributes. Otherwise, the child is wrapped in a `span` -/// containing said attributes. -pub struct MatDialogAction {} - -impl Component for MatDialogAction { - type Message = (); - type Properties = ActionProps; - - fn create(_: &Context) -> Self { - Self {} - } - - fn view(&self, ctx: &Context) -> Html { - let props = ctx.props(); - let children = props - .children - .iter() - .map(|child| match child { - Html::VTag(mut vtag) => { - vtag.add_attribute("slot", props.action_type.to_string()); - if let Some(action) = props.action.as_ref() { - vtag.add_attribute("dialogAction", action.to_owned()); - } - Html::VTag(vtag) - } - _ => html! { - - {child} - - }, - }) - .collect::(); - - html! { - {children} - } - } -} diff --git a/material-yew/src/drawer.rs b/material-yew/src/drawer.rs deleted file mode 100644 index 917f23b..0000000 --- a/material-yew/src/drawer.rs +++ /dev/null @@ -1,154 +0,0 @@ -mod drawer_app_content; -mod drawer_header; -mod drawer_subtitle; -mod drawer_title; - -pub use drawer_app_content::*; -pub use drawer_header::*; -pub use drawer_subtitle::*; -pub use drawer_title::*; - -use crate::{bool_to_option, WeakComponentLink}; -use gloo::events::EventListener; -use wasm_bindgen::prelude::*; -use web_sys::Node; -use yew::prelude::*; -use yew::virtual_dom::AttrValue; - -#[wasm_bindgen(module = "/build/mwc-drawer.js")] -extern "C" { - #[derive(Debug)] - #[wasm_bindgen(extends = Node)] - type Drawer; - - #[wasm_bindgen(getter, static_method_of = Drawer)] - fn _dummy_loader() -> JsValue; - - #[wasm_bindgen(method, getter)] - fn open(this: &Drawer) -> bool; - - #[wasm_bindgen(method, setter)] - fn set_open(this: &Drawer, value: bool); - - #[wasm_bindgen(method, setter)] - fn set_type(this: &Drawer, value: &JsValue); -} - -loader_hack!(Drawer); - -/// The `mwc-drawer` component -/// -/// [MWC Documentation](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/drawer) -pub struct MatDrawer { - node_ref: NodeRef, - opened_listener: Option, - closed_listener: Option, -} - -/// Props for [`MatDrawer`] -/// -/// MWC Documentation: -/// -/// - [Properties](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/drawer#propertiesattributes) -/// - [Events](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/drawer#events) -#[derive(Properties, PartialEq, Clone)] -pub struct DrawerProps { - #[prop_or_default] - pub open: bool, - #[prop_or_default] - pub has_header: bool, - #[prop_or_default] - pub drawer_type: Option, - /// Binds to `opened` event on `mwc-drawer` - /// - /// See events docs to learn more. - #[prop_or_default] - pub onopened: Callback<()>, - /// Binds to `closed` event on `mwc-drawer` - /// - /// See events docs to learn more. - #[prop_or_default] - pub onclosed: Callback<()>, - #[prop_or_default] - pub drawer_link: WeakComponentLink, - pub children: Children, -} - -impl Component for MatDrawer { - type Message = (); - type Properties = DrawerProps; - - fn create(ctx: &Context) -> Self { - ctx.props() - .drawer_link - .borrow_mut() - .replace(ctx.link().clone()); - Drawer::ensure_loaded(); - Self { - node_ref: NodeRef::default(), - opened_listener: None, - closed_listener: None, - } - } - - fn view(&self, ctx: &Context) -> Html { - let props = ctx.props(); - html! { - - {props.children.clone()} - - } - } - - fn rendered(&mut self, ctx: &Context, _first_render: bool) { - let props = ctx.props(); - let element = self.node_ref.cast::().unwrap(); - element.set_type(&JsValue::from( - props - .drawer_type - .as_ref() - .map(|s| s.as_ref()) - .unwrap_or_default(), - )); - element.set_open(props.open); - - if self.opened_listener.is_none() { - let onopen_callback = props.onopened.clone(); - self.opened_listener = Some(EventListener::new( - &element, - "MDCDrawer:opened", - move |_| { - onopen_callback.emit(()); - }, - )); - } - - if self.closed_listener.is_none() { - let onclose_callback = props.onclosed.clone(); - self.closed_listener = Some(EventListener::new( - &element, - "MDCDrawer:closed", - move |_| { - onclose_callback.emit(()); - }, - )); - } - } -} - -impl WeakComponentLink { - /// A convenience method to for `drawer.open = !drawer.open` - pub fn flip_open_state(&self) { - let node_ref = self - .borrow() - .as_ref() - .unwrap() - .get_component() - .unwrap() - .node_ref - .clone(); - let element = node_ref.cast::().unwrap(); - let open = element.open(); - element.set_open(!open); - } -} diff --git a/material-yew/src/drawer/drawer_app_content.rs b/material-yew/src/drawer/drawer_app_content.rs deleted file mode 100644 index 245e71a..0000000 --- a/material-yew/src/drawer/drawer_app_content.rs +++ /dev/null @@ -1,52 +0,0 @@ -use yew::prelude::*; - -const SLOT: &str = "appContent"; - -/// Props for [`MatDrawerAppContent`] -#[derive(Properties, PartialEq, Clone)] -pub struct DrawerAppContentProps { - pub children: Children, -} - -/// Defines `appContent` for [`MatDrawer`][crate::MatDrawer]. -/// -/// If the child passed is an element (a `VTag`), then it is modified to include -/// the appropriate attributes. Otherwise, the child is wrapped in a `span` -/// containing said attributes. -pub struct MatDrawerAppContent {} - -impl Component for MatDrawerAppContent { - type Message = (); - type Properties = DrawerAppContentProps; - - fn create(_: &Context) -> Self { - Self {} - } - - fn view(&self, ctx: &Context) -> Html { - let props = ctx.props(); - let children = props - .children - .iter() - .map(|child| { - match child { - Html::VTag(mut vtag) => { - vtag.add_attribute("slot", "appContent"); - Html::VTag(vtag) - } - _ => { - html! { - - {child} - - } - } - } - }) - .collect::(); - - html! { - {children} - } - } -} diff --git a/material-yew/src/drawer/drawer_header.rs b/material-yew/src/drawer/drawer_header.rs deleted file mode 100644 index f5a5f99..0000000 --- a/material-yew/src/drawer/drawer_header.rs +++ /dev/null @@ -1,52 +0,0 @@ -use yew::prelude::*; - -const SLOT: &str = "header"; - -/// Props for [`MatDrawerHeader`] -#[derive(Properties, PartialEq, Clone)] -pub struct DrawerHeaderProps { - pub children: Children, -} - -/// Defines header for [`MatDrawer`][crate::MatDrawer]. -/// -/// If the child passed is an element (a `VTag`), then it is modified to include -/// the appropriate attributes. Otherwise, the child is wrapped in a `span` -/// containing said attributes. -pub struct MatDrawerHeader {} - -impl Component for MatDrawerHeader { - type Message = (); - type Properties = DrawerHeaderProps; - - fn create(_: &Context) -> Self { - Self {} - } - - fn view(&self, ctx: &Context) -> Html { - let props = ctx.props(); - let children = props - .children - .iter() - .map(|child| { - match child { - Html::VTag(mut vtag) => { - vtag.add_attribute("slot", SLOT); - Html::VTag(vtag) - } - _ => { - html! { - - {child} - - } - } - } - }) - .collect::(); - - html! { - {children} - } - } -} diff --git a/material-yew/src/drawer/drawer_subtitle.rs b/material-yew/src/drawer/drawer_subtitle.rs deleted file mode 100644 index 678e69f..0000000 --- a/material-yew/src/drawer/drawer_subtitle.rs +++ /dev/null @@ -1,52 +0,0 @@ -use yew::prelude::*; - -const SLOT: &str = "subtitle"; - -/// Props for [`MatDrawerSubtitle`] -#[derive(Properties, PartialEq, Clone)] -pub struct DrawerSubtitleProps { - pub children: Children, -} - -/// Defines sub title for [`MatDrawer`][crate::MatDrawer]. -/// -/// If the child passed is an element (a `VTag`), then it is modified to include -/// the appropriate attributes. Otherwise, the child is wrapped in a `span` -/// containing said attributes. -pub struct MatDrawerSubtitle {} - -impl Component for MatDrawerSubtitle { - type Message = (); - type Properties = DrawerSubtitleProps; - - fn create(_: &Context) -> Self { - Self {} - } - - fn view(&self, ctx: &Context) -> Html { - let props = ctx.props(); - let children = props - .children - .iter() - .map(|child| { - match child { - Html::VTag(mut vtag) => { - vtag.add_attribute("slot", "subtitle"); - Html::VTag(vtag) - } - _ => { - html! { - - {child} - - } - } - } - }) - .collect::(); - - html! { - {children} - } - } -} diff --git a/material-yew/src/drawer/drawer_title.rs b/material-yew/src/drawer/drawer_title.rs deleted file mode 100644 index 79477c1..0000000 --- a/material-yew/src/drawer/drawer_title.rs +++ /dev/null @@ -1,52 +0,0 @@ -use yew::prelude::*; - -const SLOT: &str = "title"; - -/// Props for [`MatDrawerTitle`] -#[derive(Properties, PartialEq, Clone)] -pub struct DrawerTitleProps { - pub children: Children, -} - -/// Defines title for [`MatDrawer`][crate::MatDrawer]. -/// -/// If the child passed is an element (a `VTag`), then it is modified to include -/// the appropriate attributes. Otherwise, the child is wrapped in a `span` -/// containing said attributes. -pub struct MatDrawerTitle {} - -impl Component for MatDrawerTitle { - type Message = (); - type Properties = DrawerTitleProps; - - fn create(_: &Context) -> Self { - Self {} - } - - fn view(&self, ctx: &Context) -> Html { - let props = ctx.props(); - let children = props - .children - .iter() - .map(|child| { - match child { - Html::VTag(mut vtag) => { - vtag.add_attribute("slot", "title"); - Html::VTag(vtag) - } - _ => { - html! { - - {child} - - } - } - } - }) - .collect::(); - - html! { - {children} - } - } -} diff --git a/material-yew/src/fab.rs b/material-yew/src/fab.rs deleted file mode 100644 index 3cb0aa2..0000000 --- a/material-yew/src/fab.rs +++ /dev/null @@ -1,55 +0,0 @@ -use crate::bool_to_option; -use wasm_bindgen::prelude::*; -use yew::prelude::*; -use yew::virtual_dom::AttrValue; - -#[wasm_bindgen(module = "/build/mwc-fab.js")] -extern "C" { - #[derive(Debug)] - type Fab; - - #[wasm_bindgen(getter, static_method_of = Fab)] - fn _dummy_loader() -> JsValue; -} - -loader_hack!(Fab); - -/// Props for [`MatFab`] -/// -/// [MWC Documentation for properties](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/fab#propertiesattributes) -#[derive(Debug, Properties, PartialEq, Clone)] -pub struct FabProps { - #[prop_or_default] - pub icon: Option, - #[prop_or_default] - pub label: Option, - #[prop_or_default] - pub mini: bool, - #[prop_or_default] - pub reduced_touch_target: bool, - #[prop_or_default] - pub extended: bool, - #[prop_or_default] - pub show_icon_at_end: bool, - #[prop_or_default] - pub children: Children, -} - -component!( - MatFab, - FabProps, - |props: &FabProps| { - html! { - {props.children.clone()} - } - }, - Fab, - "fab" -); diff --git a/material-yew/src/form_field.rs b/material-yew/src/form_field.rs deleted file mode 100644 index 5e46cde..0000000 --- a/material-yew/src/form_field.rs +++ /dev/null @@ -1,48 +0,0 @@ -use crate::bool_to_option; -use wasm_bindgen::prelude::*; -use yew::prelude::*; -use yew::virtual_dom::AttrValue; - -#[wasm_bindgen(module = "/build/mwc-formfield.js")] -extern "C" { - #[derive(Debug)] - type Formfield; - - #[wasm_bindgen(getter, static_method_of = Formfield)] - fn _dummy_loader() -> JsValue; -} - -loader_hack!(Formfield); - -/// Props for [`MatFormfield`] -/// -/// [MWC Documentation for properties](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/formfield#propertiesattributes) -#[derive(Properties, PartialEq, Clone)] -pub struct FormfieldProps { - pub children: Children, - #[prop_or_default] - pub label: Option, - #[prop_or_default] - pub align_end: bool, - #[prop_or_default] - pub space_between: bool, - #[prop_or_default] - pub nowrap: bool, -} - -component!( - MatFormfield, - FormfieldProps, - |props: &FormfieldProps| { - html! { - {props.children.clone()} - } - }, - Formfield, - "formfield" -); diff --git a/material-yew/src/icon.rs b/material-yew/src/icon.rs deleted file mode 100644 index 88ba4c7..0000000 --- a/material-yew/src/icon.rs +++ /dev/null @@ -1,33 +0,0 @@ -use wasm_bindgen::prelude::*; -use yew::prelude::*; - -#[wasm_bindgen(module = "/build/mwc-icon.js")] -extern "C" { - #[derive(Debug)] - type Icon; - - #[wasm_bindgen(getter, static_method_of = Icon)] - fn _dummy_loader() -> JsValue; -} - -loader_hack!(Icon); - -/// Props for [`MatIcon`] -/// -/// [MWC Documentation for properties](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/icon#propertiesattributes) -#[derive(Debug, Properties, PartialEq, Clone)] -pub struct IconProps { - pub children: Children, -} - -component!( - MatIcon, - IconProps, - |props: &IconProps| { - html! { - {props.children.clone()} - } - }, - Icon, - "icon" -); diff --git a/material-yew/src/icon_button.rs b/material-yew/src/icon_button.rs deleted file mode 100644 index 02e8e41..0000000 --- a/material-yew/src/icon_button.rs +++ /dev/null @@ -1,45 +0,0 @@ -use wasm_bindgen::prelude::*; -use yew::prelude::*; -use yew::virtual_dom::AttrValue; - -#[wasm_bindgen(module = "/build/mwc-icon-button.js")] -extern "C" { - #[derive(Debug)] - type IconButton; - - #[wasm_bindgen(getter, static_method_of = IconButton)] - fn _dummy_loader() -> JsValue; -} - -loader_hack!(IconButton); - -/// Props for [`MatIconButton`] -/// -/// [MWC Documentation for properties](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/icon-button#propertiesattributes) -#[derive(Debug, Properties, PartialEq, Clone)] -pub struct IconButtonProps { - #[prop_or_default] - pub label: Option, - #[prop_or_default] - pub icon: Option, - #[prop_or_default] - pub disabled: bool, - #[prop_or_default] - pub children: Children, -} - -component!( - MatIconButton, - IconButtonProps, - |props: &IconButtonProps| { - html! { - {props.children.clone()} - } - }, - IconButton, - "icon-button" -); diff --git a/material-yew/src/icon_button_toggle.rs b/material-yew/src/icon_button_toggle.rs deleted file mode 100644 index 3ce8704..0000000 --- a/material-yew/src/icon_button_toggle.rs +++ /dev/null @@ -1,111 +0,0 @@ -mod off_icon; -mod on_icon; - -pub use off_icon::*; -pub use on_icon::*; - -use crate::bool_to_option; -use gloo::events::EventListener; -use wasm_bindgen::prelude::*; -use web_sys::Node; -use yew::prelude::*; -use yew::virtual_dom::AttrValue; - -#[wasm_bindgen(module = "/build/mwc-icon-button-toggle.js")] -extern "C" { - #[derive(Debug)] - #[wasm_bindgen(extends = Node)] - type IconButtonToggle; - - #[wasm_bindgen(getter, static_method_of = IconButtonToggle)] - fn _dummy_loader() -> JsValue; - - #[wasm_bindgen(method, getter)] - fn on(this: &IconButtonToggle) -> bool; -} - -loader_hack!(IconButtonToggle); - -/// The `mwc-icon-button-toggle` component -/// -/// [MWC Documentation](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/icon-button-toggle) -pub struct MatIconButtonToggle { - node_ref: NodeRef, - change_listener: Option, -} - -/// Props for [`MatIconButtonToggle`] -/// -/// MWC Documentation: -/// -/// - [Properties](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/icon-button-toggle#propertiesattributes) -/// - [Events](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/icon-button-toggle#events) -#[derive(Debug, Properties, PartialEq, Clone)] -pub struct IconButtonToggleProps { - #[prop_or_default] - pub on: bool, - #[prop_or_default] - pub on_icon: Option, - #[prop_or_default] - pub off_icon: Option, - #[prop_or_default] - pub label: Option, - #[prop_or_default] - pub disabled: bool, - /// Binds to `MDCIconButtonToggle:change`. - /// - /// Callback's parameter is the `isOn` value passed - /// - /// See events docs to learn more. - #[prop_or_default] - pub onchange: Callback, - #[prop_or_default] - pub children: Children, -} - -impl Component for MatIconButtonToggle { - type Message = (); - type Properties = IconButtonToggleProps; - - fn create(_: &Context) -> Self { - IconButtonToggle::ensure_loaded(); - Self { - node_ref: NodeRef::default(), - change_listener: None, - } - } - - fn view(&self, ctx: &Context) -> Html { - let props = ctx.props(); - html! { - {props.children.clone()} - } - } - - fn changed(&mut self, _ctx: &Context, _old_props: &Self::Properties) -> bool { - // clear event listener in case the props changed - self.change_listener = None; - true - } - - fn rendered(&mut self, ctx: &Context, _first_render: bool) { - let props = ctx.props(); - if self.change_listener.is_none() { - let element = self.node_ref.cast::().unwrap(); - - let callback = props.onchange.clone(); - self.change_listener = Some(EventListener::new( - &element.clone(), - "MDCIconButtonToggle:change", - move |_| callback.emit(element.on()), - )); - } - } -} diff --git a/material-yew/src/icon_button_toggle/off_icon.rs b/material-yew/src/icon_button_toggle/off_icon.rs deleted file mode 100644 index 4794c04..0000000 --- a/material-yew/src/icon_button_toggle/off_icon.rs +++ /dev/null @@ -1,52 +0,0 @@ -use yew::prelude::*; - -const SLOT: &str = "offIcon"; - -/// Props for [`MatOffIconButtonToggle`] -#[derive(Properties, PartialEq, Clone)] -pub struct OffIconButtonToggleProps { - pub children: Children, -} - -/// Defines header for [`MatIconButtonToggle`][crate::MatIconButtonToggle]. -/// -/// If the child passed is an element (a `VTag`), then it is modified to include -/// the appropriate attributes. Otherwise, the child is wrapped in a `span` -/// containing said attributes. -pub struct MatOffIconButtonToggle {} - -impl Component for MatOffIconButtonToggle { - type Message = (); - type Properties = OffIconButtonToggleProps; - - fn create(_: &Context) -> Self { - Self {} - } - - fn view(&self, ctx: &Context) -> Html { - let props = ctx.props(); - let children = props - .children - .iter() - .map(|child| { - match child { - Html::VTag(mut vtag) => { - vtag.add_attribute("slot", SLOT); - Html::VTag(vtag) - } - _ => { - html! { - - {child} - - } - } - } - }) - .collect::(); - - html! { - {children} - } - } -} diff --git a/material-yew/src/icon_button_toggle/on_icon.rs b/material-yew/src/icon_button_toggle/on_icon.rs deleted file mode 100644 index 16f0d8b..0000000 --- a/material-yew/src/icon_button_toggle/on_icon.rs +++ /dev/null @@ -1,52 +0,0 @@ -use yew::prelude::*; - -const SLOT: &str = "onIcon"; - -/// Props for [`MatOnIconButtonToggle`] -#[derive(Properties, PartialEq, Clone)] -pub struct OnIconButtonToggleProps { - pub children: Children, -} - -/// Defines header for [`MatIconButtonToggle`][crate::MatIconButtonToggle]. -/// -/// If the child passed is an element (a `VTag`), then it is modified to include -/// the appropriate attributes. Otherwise, the child is wrapped in a `span` -/// containing said attributes. -pub struct MatOnIconButtonToggle {} - -impl Component for MatOnIconButtonToggle { - type Message = (); - type Properties = OnIconButtonToggleProps; - - fn create(_: &Context) -> Self { - Self {} - } - - fn view(&self, ctx: &Context) -> Html { - let props = ctx.props(); - let children = props - .children - .iter() - .map(|child| { - match child { - Html::VTag(mut vtag) => { - vtag.add_attribute("slot", SLOT); - Html::VTag(vtag) - } - _ => { - html! { - - {child} - - } - } - } - }) - .collect::(); - - html! { - {children} - } - } -} diff --git a/material-yew/src/lib.rs b/material-yew/src/lib.rs deleted file mode 100644 index 8241374..0000000 --- a/material-yew/src/lib.rs +++ /dev/null @@ -1,251 +0,0 @@ -#![doc(html_root_url = "/docs")] -// See: https://github.com/rustwasm/wasm-bindgen/issues/2774 -// Can remove when wasm-bindgen is updated. -#![allow(clippy::unused_unit)] -//! A Material components library for [Yew](https://yew.rs). It wrpas around [Material Web Components](https://github.com/material-components/material-web) exposing Yew components. -//! -//! Example usage: -//! ```rust -//! use material_yew::MatButton; -//! use yew::html; -//! -//! html! { -//! -//! }; -//! ``` -//! -//! All the main components from the modules are re-exported. -//! The specialized components used for populating slots and models can be -//! accessed from their respective modules. -//! -//! More information can be found on the [website](https://yew-material.web.app) and in the [GitHub README](https://github.com/hamza1311/yew-material) - -use wasm_bindgen::prelude::*; -use wasm_bindgen::{JsCast, JsValue}; -use web_sys::{CustomEvent, Event}; -mod utils; - -// this macro is defined here so we can access it in the modules -macro_rules! loader_hack { - ($ty:ty) => { - #[allow(dead_code)] - static LOADED: std::sync::Once = std::sync::Once::new(); - impl $ty { - #[allow(dead_code)] - fn ensure_loaded() { - LOADED.call_once(|| { - <$ty>::_dummy_loader(); - }); - } - } - }; -} - -macro_rules! component { - ($comp: ident, $props: ty, $html: expr, $mwc_to_initialize: ident, $mwc_name: literal) => { - paste::paste! { - #[doc = "The `mwc-" $mwc_name "` component"] - #[doc = ""] - #[doc = "[MWC Documentation](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/"$mwc_name")"] - pub struct $comp; - } - impl yew::Component for $comp { - type Message = (); - type Properties = $props; - - fn create(_: &Context) -> Self { - $mwc_to_initialize::ensure_loaded(); - Self - } - - fn view(&self, ctx: &Context) -> Html { - let props = ctx.props(); - $html(props) - } - } - }; -} - -fn bool_to_option(value: bool) -> Option { - value.then_some(AttrValue::Static("true")) -} - -fn to_option_string(s: impl Display) -> Option { - let s = s.to_string(); - if s.is_empty() { - None - } else { - Some(AttrValue::from(s)) - } -} - -fn event_into_details(event: &Event) -> JsValue { - JsValue::from(event) - .dyn_into::() - .unwrap_or_else(|_| panic!("could not convert to CustomEvent")) - .detail() -} -fn event_details_into(event: &Event) -> T { - event_into_details(event).unchecked_into::() -} - -#[cfg(feature = "button")] -pub mod button; -#[cfg(feature = "button")] -#[doc(hidden)] -pub use button::MatButton; - -#[cfg(feature = "circular-progress")] -pub mod circular_progress; -#[cfg(feature = "circular-progress")] -#[doc(hidden)] -pub use circular_progress::MatCircularProgress; - -#[cfg(feature = "checkbox")] -pub mod checkbox; -#[cfg(feature = "checkbox")] -#[doc(hidden)] -pub use checkbox::MatCheckbox; - -#[cfg(feature = "circular-progress-four-color")] -pub mod circular_progress_four_color; -#[cfg(feature = "circular-progress-four-color")] -#[doc(hidden)] -pub use circular_progress_four_color::MatCircularProgressFourColor; - -#[cfg(feature = "drawer")] -pub mod drawer; -#[cfg(feature = "drawer")] -#[doc(hidden)] -pub use drawer::MatDrawer; - -#[cfg(feature = "top-app-bar")] -pub mod top_app_bar; -#[cfg(feature = "top-app-bar")] -#[doc(hidden)] -pub use top_app_bar::MatTopAppBar; - -#[cfg(feature = "icon-button")] -pub mod icon_button; -#[cfg(feature = "icon-button")] -#[doc(hidden)] -pub use icon_button::MatIconButton; - -#[cfg(feature = "fab")] -pub mod fab; -#[cfg(feature = "fab")] -#[doc(hidden)] -pub use fab::MatFab; - -#[cfg(feature = "formfield")] -pub mod form_field; -#[cfg(feature = "formfield")] -#[doc(hidden)] -pub use form_field::MatFormfield; - -#[cfg(feature = "icon")] -pub mod icon; -#[cfg(feature = "icon")] -#[doc(hidden)] -pub use icon::MatIcon; - -#[cfg(feature = "linear-progress")] -pub mod linear_progress; -#[cfg(feature = "linear-progress")] -#[doc(hidden)] -pub use linear_progress::MatLinearProgress; - -#[cfg(feature = "radio")] -pub mod radio; -#[cfg(feature = "radio")] -#[doc(hidden)] -pub use radio::MatRadio; - -#[cfg(feature = "switch")] -pub mod switch; -#[cfg(feature = "switch")] -#[doc(hidden)] -pub use switch::MatSwitch; - -#[cfg(feature = "top-app-bar-fixed")] -pub mod top_app_bar_fixed; -#[cfg(feature = "top-app-bar-fixed")] -#[doc(hidden)] -pub use top_app_bar_fixed::MatTopAppBarFixed; - -#[cfg(feature = "dialog")] -pub mod dialog; -#[cfg(feature = "dialog")] -#[doc(hidden)] -pub use dialog::MatDialog; - -#[cfg(feature = "list")] -pub mod list; -#[cfg(feature = "list")] -#[doc(no_inline)] -#[doc(hidden)] -pub use list::{MatCheckListItem, MatList, MatListItem, MatRadioListItem}; - -#[cfg(feature = "icon-button-toggle")] -pub mod icon_button_toggle; -#[cfg(feature = "icon-button-toggle")] -#[doc(hidden)] -pub use icon_button_toggle::MatIconButtonToggle; - -#[cfg(feature = "slider")] -pub mod slider; -#[cfg(feature = "slider")] -#[doc(hidden)] -pub use slider::MatSlider; - -#[cfg(feature = "tabs")] -pub mod tabs; -#[cfg(feature = "tabs")] -#[doc(no_inline)] -#[doc(hidden)] -pub use tabs::{MatTab, MatTabBar}; - -#[cfg(feature = "snackbar")] -pub mod snackbar; -#[cfg(feature = "snackbar")] -#[doc(hidden)] -pub use snackbar::MatSnackbar; - -#[cfg(any(feature = "textfield", feature = "textarea"))] -pub mod text_inputs; -#[cfg(feature = "textarea")] -#[doc(no_inline)] -#[doc(hidden)] -pub use text_inputs::MatTextArea; -#[cfg(feature = "textfield")] -#[doc(no_inline)] -#[doc(hidden)] -pub use text_inputs::MatTextField; - -#[cfg(feature = "select")] -pub mod select; -#[cfg(feature = "select")] -#[doc(hidden)] -pub use select::MatSelect; - -#[cfg(feature = "menu")] -pub mod menu; -#[cfg(feature = "menu")] -#[doc(hidden)] -pub use menu::MatMenu; - -use std::fmt::Display; -#[doc(hidden)] -pub use utils::WeakComponentLink; -use yew::virtual_dom::AttrValue; - -#[wasm_bindgen(module = "/build/core.js")] -extern "C" { - #[derive(Debug)] - type Ripple; - - #[wasm_bindgen(getter, static_method_of = Ripple)] - fn _dummy_loader() -> JsValue; -} - -loader_hack!(Ripple); diff --git a/material-yew/src/linear_progress.rs b/material-yew/src/linear_progress.rs deleted file mode 100644 index f4375ee..0000000 --- a/material-yew/src/linear_progress.rs +++ /dev/null @@ -1,49 +0,0 @@ -use crate::{bool_to_option, to_option_string}; -use wasm_bindgen::prelude::*; -use yew::prelude::*; - -#[wasm_bindgen(module = "/build/mwc-linear-progress.js")] -extern "C" { - #[derive(Debug)] - type LinearProgress; - - #[wasm_bindgen(getter, static_method_of = LinearProgress)] - fn _dummy_loader() -> JsValue; -} - -loader_hack!(LinearProgress); - -/// Props for [`MatLinearProgress`] -/// -/// [MWC Documentation for properties](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/linear-progress#propertiesattributes) -#[derive(Debug, Properties, PartialEq, Clone)] -pub struct LinearProgressProps { - #[prop_or_default] - pub indeterminate: bool, - #[prop_or_default] - pub progress: f32, - #[prop_or_default] - pub buffer: f32, - #[prop_or_default] - pub reverse: bool, - #[prop_or_default] - pub closed: bool, -} - -component!( - MatLinearProgress, - LinearProgressProps, - |props: &LinearProgressProps| { - html! { - - } - }, - LinearProgress, - "linear-progress" -); diff --git a/material-yew/src/list.rs b/material-yew/src/list.rs deleted file mode 100644 index c3244b4..0000000 --- a/material-yew/src/list.rs +++ /dev/null @@ -1,218 +0,0 @@ -mod list_item; -pub use list_item::*; - -mod check_list_item; -pub use check_list_item::*; - -mod radio_list_item; -pub use radio_list_item::*; - -mod list_index; -pub use list_index::ListIndex; - -mod selected_detail; -pub use selected_detail::{IndexDiff, SelectedDetail}; - -mod action_detail; -pub use action_detail::ActionDetail; - -mod request_selected; -pub use request_selected::{RequestSelectedDetail, RequestSelectedSource}; - -mod graphic_type; -pub use graphic_type::GraphicType; - -use crate::{bool_to_option, event_into_details, WeakComponentLink}; -use gloo::events::EventListener; -use wasm_bindgen::prelude::*; -use web_sys::Node; -use yew::prelude::*; -use yew::virtual_dom::AttrValue; - -#[wasm_bindgen(module = "/build/mwc-list.js")] -extern "C" { - #[derive(Debug)] - #[wasm_bindgen(extends = Node)] - type List; - - #[wasm_bindgen(getter, static_method_of = List)] - fn _dummy_loader() -> JsValue; - - #[wasm_bindgen(method, getter)] - fn index(this: &List) -> JsValue; - - #[wasm_bindgen(method)] - fn toggle(this: &List, index: usize, force: bool); - - #[wasm_bindgen(method, js_name = getFocusedItemIndex)] - fn get_focused_item_index(this: &List) -> usize; - - #[wasm_bindgen(method, js_name = focusItemAtIndex)] - fn focus_item_at_index(this: &List, index: usize); -} - -loader_hack!(List); - -/// The `mwc-list` component -/// -/// [MWC Documentation](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/list) -pub struct MatList { - node_ref: NodeRef, - action_listener: Option, - selected_listener: Option, -} - -/// Props for [`MatList`] -/// -/// MWC Documentation: -/// -/// - [Properties](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/list#mwc-list-1) -/// - [Events](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/list#mwc-list-2) -#[derive(Properties, PartialEq, Clone)] -pub struct ListProps { - #[prop_or_default] - pub activatable: bool, - #[prop_or_default] - pub root_tabbable: bool, - #[prop_or_default] - pub multi: bool, - #[prop_or_default] - pub wrap_focus: bool, - #[prop_or_default] - pub item_roles: Option, - #[prop_or_default] - pub inner_role: Option, - #[prop_or_default] - pub noninteractive: bool, - /// Binds to `action` event on `mwc-list` - #[prop_or_default] - pub onaction: Callback, - /// Binds to `selected` event `mwc-list` - #[prop_or_default] - pub onselected: Callback, - /// [`WeakComponentLink`] for `MatList` which provides the following methods - /// - ```toggle(&self, index: usize, force: bool)``` - /// - ```get_focused_item_index(&self) -> usize``` - /// - ```focus_item_at_index(&self, index: usize)``` - /// - /// See [`WeakComponentLink`] documentation for more information - #[prop_or_default] - pub list_link: WeakComponentLink, - pub children: Children, -} - -impl Component for MatList { - type Message = (); - type Properties = ListProps; - - fn create(ctx: &Context) -> Self { - ctx.props() - .list_link - .borrow_mut() - .replace(ctx.link().clone()); - List::ensure_loaded(); - Self { - node_ref: NodeRef::default(), - action_listener: None, - selected_listener: None, - } - } - - fn changed(&mut self, ctx: &Context, _old_props: &Self::Properties) -> bool { - // clear event listeners and update link in case the props changed - self.action_listener = None; - self.selected_listener = None; - ctx.props() - .list_link - .borrow_mut() - .replace(ctx.link().clone()); - true - } - - fn view(&self, ctx: &Context) -> Html { - let props = ctx.props(); - html! { - - {props.children.clone()} - - } - } - - fn rendered(&mut self, ctx: &Context, _first_render: bool) { - let props = ctx.props(); - let list = self.node_ref.cast::().unwrap(); - if self.selected_listener.is_none() { - let onselected = props.onselected.clone(); - self.selected_listener = Some(EventListener::new(&list, "selected", move |event| { - let val = SelectedDetail::from(event_into_details(event)); - onselected.emit(val); - })); - } - - if self.action_listener.is_none() { - let onaction = props.onaction.clone(); - self.action_listener = Some(EventListener::new(&list.clone(), "action", move |_| { - let val: JsValue = list.index(); - let index = ListIndex::from(val); - onaction.emit(index); - })); - } - } -} - -impl WeakComponentLink { - /// Binds to `toggle` method. - /// - /// See [here](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/list#methods) for details - pub fn toggle(&self, index: usize, force: bool) { - let list = self - .borrow() - .as_ref() - .unwrap() - .get_component() - .unwrap() - .node_ref - .cast::() - .unwrap(); - list.toggle(index, force) - } - - /// Binds to `getFocusedItemIndex` method. - /// - /// See [here](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/list#methods) for details - pub fn get_focused_item_index(&self) -> usize { - self.borrow() - .as_ref() - .unwrap() - .get_component() - .unwrap() - .node_ref - .cast::() - .unwrap() - .get_focused_item_index() - } - - /// Binds to `focusItemAtIndex` method. - /// - /// See [here](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/list#methods) for details - pub fn focus_item_at_index(&self, index: usize) { - self.borrow() - .as_ref() - .unwrap() - .get_component() - .unwrap() - .node_ref - .cast::() - .unwrap() - .focus_item_at_index(index) - } -} diff --git a/material-yew/src/list/action_detail.rs b/material-yew/src/list/action_detail.rs deleted file mode 100644 index 3a4942a..0000000 --- a/material-yew/src/list/action_detail.rs +++ /dev/null @@ -1,31 +0,0 @@ -use crate::list::ListIndex; -use js_sys::Object; -use wasm_bindgen::prelude::*; -use wasm_bindgen::JsCast; - -/// The `ActionDetail` type -/// -/// [MWC Documentation](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/list#mwc-list-2) -#[derive(Debug)] -pub struct ActionDetail { - #[allow(dead_code)] - index: ListIndex, -} - -impl From for ActionDetail { - fn from(value: JsValue) -> Self { - let detail = value.unchecked_into::(); - let index = ListIndex::from(detail.index()); - Self { index } - } -} - -#[wasm_bindgen] -extern "C" { - #[derive(Debug)] - #[wasm_bindgen(extends = Object)] - type ActionDetailJs; - - #[wasm_bindgen(method, getter)] - pub fn index(this: &ActionDetailJs) -> JsValue; -} diff --git a/material-yew/src/list/check_list_item.rs b/material-yew/src/list/check_list_item.rs deleted file mode 100644 index 075947c..0000000 --- a/material-yew/src/list/check_list_item.rs +++ /dev/null @@ -1,80 +0,0 @@ -use crate::bool_to_option; -use crate::list::request_selected::request_selected_listener; -use crate::list::{GraphicType, RequestSelectedDetail}; -use gloo::events::EventListener; -use wasm_bindgen::prelude::*; -use yew::prelude::*; - -#[wasm_bindgen(module = "/build/mwc-check-list-item.js")] -extern "C" { - #[derive(Debug)] - type CheckListItem; - - #[wasm_bindgen(getter, static_method_of = CheckListItem)] - fn _dummy_loader() -> JsValue; -} - -loader_hack!(CheckListItem); - -/// The `mwc-check-list-item` component -/// -/// [MWC Documentation](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/list#checklist) -pub struct MatCheckListItem { - node_ref: NodeRef, - request_selected_listener: Option, -} - -/// Props for [`MatCheckListItem`] -/// -/// MWC Documentation for [properties](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/list#mwc-check-list-item) -/// and [events](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/list#mwc-check-list-item-1) -#[derive(Debug, Properties, PartialEq, Clone)] -pub struct CheckListItemProps { - #[prop_or_default] - pub left: bool, - #[prop_or(GraphicType::Control)] - pub graphic: GraphicType, - #[prop_or_default] - pub disabled: bool, - #[prop_or_default] - pub on_request_selected: Callback, - #[prop_or_default] - pub selected: bool, - pub children: Children, -} - -impl Component for MatCheckListItem { - type Message = (); - type Properties = CheckListItemProps; - - fn create(_: &Context) -> Self { - CheckListItem::ensure_loaded(); - Self { - node_ref: NodeRef::default(), - request_selected_listener: None, - } - } - - fn view(&self, ctx: &Context) -> Html { - let props = ctx.props(); - html! { - {props.children.clone()} - } - } - - fn rendered(&mut self, ctx: &Context, _first_render: bool) { - let props = ctx.props(); - if self.request_selected_listener.is_none() { - self.request_selected_listener = Some(request_selected_listener( - &self.node_ref, - props.on_request_selected.clone(), - )); - } - } -} diff --git a/material-yew/src/list/graphic_type.rs b/material-yew/src/list/graphic_type.rs deleted file mode 100644 index e47376d..0000000 --- a/material-yew/src/list/graphic_type.rs +++ /dev/null @@ -1,35 +0,0 @@ -use std::fmt; - -/// Equivalent to typescript type -/// `'avatar'|'icon'|'medium'|'large'|'control'|null` -/// -/// See `GraphicType` [here](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/list#mwc-list-item-1) -#[derive(Clone, PartialEq, Debug)] -pub enum GraphicType { - Avatar, - Icon, - Medium, - Large, - Control, - Null, -} - -impl GraphicType { - pub fn as_str(&self) -> &'static str { - use GraphicType::*; - match self { - Avatar => "avatar", - Icon => "icon", - Medium => "medium", - Large => "large", - Control => "control", - Null => "null", - } - } -} - -impl fmt::Display for GraphicType { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "{}", self.as_str()) - } -} diff --git a/material-yew/src/list/list_index.rs b/material-yew/src/list/list_index.rs deleted file mode 100644 index e76ce44..0000000 --- a/material-yew/src/list/list_index.rs +++ /dev/null @@ -1,39 +0,0 @@ -use std::collections::HashSet; -use wasm_bindgen::{JsCast, JsValue}; - -/// The `MWCListIndex` type -/// -/// [MWC Documentation](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/list#mwc-list-1) -#[derive(Debug)] -pub enum ListIndex { - /// Provided when `multi` prop is set to `false` (default) on the component - /// - /// `None` denotes value os `-1` - Single(Option), - /// Provided when `multi` prop is set to `true` on the component - Multi(HashSet), -} - -impl From for ListIndex { - fn from(val: JsValue) -> Self { - if let Ok(set) = val.clone().dyn_into::() { - let indices = set - .values() - .into_iter() - .filter_map(|item| item.ok()) - .filter_map(|value| value.as_f64()) - .map(|num| num as usize) - .collect(); - ListIndex::Multi(indices) - } else if let Some(value) = val.as_f64() { - #[allow(clippy::float_cmp)] - ListIndex::Single(if value != -1.0 { - Some(value as usize) - } else { - None - }) - } else { - panic!("This should never happen") - } - } -} diff --git a/material-yew/src/list/list_item.rs b/material-yew/src/list/list_item.rs deleted file mode 100644 index 10fd0a1..0000000 --- a/material-yew/src/list/list_item.rs +++ /dev/null @@ -1,103 +0,0 @@ -use crate::list::request_selected::request_selected_listener; -use crate::list::{GraphicType, RequestSelectedDetail}; -use crate::{bool_to_option, to_option_string}; -use gloo::events::EventListener; -use wasm_bindgen::prelude::*; -use yew::prelude::*; -use yew::virtual_dom::AttrValue; - -#[wasm_bindgen(module = "/build/mwc-list-item.js")] -extern "C" { - #[derive(Debug)] - type ListItem; - - #[wasm_bindgen(getter, static_method_of = ListItem)] - fn _dummy_loader() -> JsValue; -} - -loader_hack!(ListItem); - -/// The `mwc-list-item` Component -/// -/// [MWC Documentation](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/list#mwc-list-item) -pub struct MatListItem { - node_ref: NodeRef, - request_selected_listener: Option, -} - -/// Props for [`MatListItem`] -/// -/// MWC Documentation [properties](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/list#mwc-list-item-1) -/// and [events](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/list#mwc-list-item-2) -#[derive(Debug, Properties, PartialEq, Clone)] -pub struct ListItemProps { - #[prop_or_default] - pub value: Option, - #[prop_or_default] - pub group: bool, - #[prop_or(- 1)] - pub tabindex: i32, - #[prop_or_default] - pub disabled: bool, - #[prop_or_default] - pub twoline: bool, - #[prop_or_default] - pub activated: bool, - #[prop_or(GraphicType::Null)] - pub graphic: GraphicType, - #[prop_or_default] - pub multiple_graphics: bool, - #[prop_or_default] - pub has_meta: bool, - #[prop_or_default] - pub noninteractive: bool, - #[prop_or_default] - pub selected: bool, - /// Binds to `request-selected` event on `mwc-list-item`. - #[prop_or_default] - pub on_request_selected: Callback, - pub children: Children, -} - -impl Component for MatListItem { - type Message = (); - type Properties = ListItemProps; - - fn create(_: &Context) -> Self { - ListItem::ensure_loaded(); - Self { - node_ref: NodeRef::default(), - request_selected_listener: None, - } - } - - fn view(&self, ctx: &Context) -> Html { - let props = ctx.props(); - html! { - {props.children.clone()} - } - } - - fn rendered(&mut self, ctx: &Context, _first_render: bool) { - let props = ctx.props(); - if self.request_selected_listener.is_none() { - self.request_selected_listener = Some(request_selected_listener( - &self.node_ref, - props.on_request_selected.clone(), - )); - } - } -} diff --git a/material-yew/src/list/radio_list_item.rs b/material-yew/src/list/radio_list_item.rs deleted file mode 100644 index b66b128..0000000 --- a/material-yew/src/list/radio_list_item.rs +++ /dev/null @@ -1,79 +0,0 @@ -use crate::bool_to_option; -use crate::list::request_selected::request_selected_listener; -use crate::list::{GraphicType, RequestSelectedDetail}; -use gloo::events::EventListener; -use wasm_bindgen::prelude::*; -use yew::prelude::*; -use yew::virtual_dom::AttrValue; - -#[wasm_bindgen(module = "/build/mwc-radio-list-item.js")] -extern "C" { - #[derive(Debug)] - type RadioListItem; - - #[wasm_bindgen(getter, static_method_of = RadioListItem)] - fn _dummy_loader() -> JsValue; -} - -loader_hack!(RadioListItem); - -/// The `mwc-list-item` Component -/// -/// [MWC Documentation](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/list#mwc-radio-list-item) -pub struct MatRadioListItem { - node_ref: NodeRef, - request_selected_listener: Option, -} - -/// Props for [`MatRadioListItem`] -/// -/// MWC Documentation [properties](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/list#mwc-radio-list-item-1) -/// and [events](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/list#mwc-radio-list-item-2) -#[derive(Debug, Properties, PartialEq, Clone)] -pub struct RadioListItemProps { - #[prop_or_default] - pub left: bool, - #[prop_or_default] - pub group: Option, - #[prop_or(GraphicType::Control)] - pub graphic: GraphicType, - /// Binds to `request-selected` event on `mwc-list-item`. - #[prop_or_default] - pub on_request_selected: Callback, - pub children: Children, -} - -impl Component for MatRadioListItem { - type Message = (); - type Properties = RadioListItemProps; - - fn create(_: &Context) -> Self { - RadioListItem::ensure_loaded(); - Self { - node_ref: NodeRef::default(), - request_selected_listener: None, - } - } - - fn view(&self, ctx: &Context) -> Html { - let props = ctx.props(); - html! { - {props.children.clone()} - } - } - - fn rendered(&mut self, ctx: &Context, _first_render: bool) { - let props = ctx.props(); - if self.request_selected_listener.is_none() { - self.request_selected_listener = Some(request_selected_listener( - &self.node_ref, - props.on_request_selected.clone(), - )); - } - } -} diff --git a/material-yew/src/list/request_selected.rs b/material-yew/src/list/request_selected.rs deleted file mode 100644 index 4efa639..0000000 --- a/material-yew/src/list/request_selected.rs +++ /dev/null @@ -1,57 +0,0 @@ -use crate::event_details_into; -use gloo::events::EventListener; -use js_sys::Object; -use wasm_bindgen::prelude::*; -use web_sys::Element; -use yew::prelude::*; - -/// Type for [`RequestSelectedDetail::source`] -pub enum RequestSelectedSource { - Interaction, - Property, -} - -/// The `RequestSelectedDetail` type -/// -/// [MWC Documentation](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/list#mwc-list-item-2) -pub struct RequestSelectedDetail { - pub selected: bool, - pub source: RequestSelectedSource, -} - -#[wasm_bindgen] -extern "C" { - #[derive(Debug)] - #[wasm_bindgen(extends = Object)] - type RequestSelectedDetailJS; - - #[wasm_bindgen(method, getter)] - fn selected(this: &RequestSelectedDetailJS) -> bool; - - #[wasm_bindgen(method, getter)] - fn source(this: &RequestSelectedDetailJS) -> String; -} - -pub fn request_selected_listener( - node_ref: &NodeRef, - callback: Callback, -) -> EventListener { - let element = node_ref.cast::().unwrap(); - EventListener::new(&element, "request-selected", move |event| { - let selected_detail = event_details_into::(event); - let selected_detail = RequestSelectedDetail { - selected: selected_detail.selected(), - source: match selected_detail.source().as_str() { - "interaction" => RequestSelectedSource::Interaction, - "property" => RequestSelectedSource::Property, - val => { - panic!( - "invalid `source` value {} received. This should never happen", - val - ) - } - }, - }; - callback.emit(selected_detail); - }) -} diff --git a/material-yew/src/list/selected_detail.rs b/material-yew/src/list/selected_detail.rs deleted file mode 100644 index caa2d84..0000000 --- a/material-yew/src/list/selected_detail.rs +++ /dev/null @@ -1,63 +0,0 @@ -use crate::list::ListIndex; -use js_sys::Object; -use wasm_bindgen::prelude::*; -use wasm_bindgen::JsCast; - -/// The `RequestSelectedDetail` type -/// -/// [MWC Documentation](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/list#mwc-list-2) -#[derive(Debug)] -pub struct SelectedDetail { - pub index: ListIndex, - pub diff: Option, -} - -/// Type for [`SelectedDetail::diff`] -/// -/// See `**` [here on MWC documentation](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/list#mwc-list-2). -#[derive(Debug)] -pub struct IndexDiff { - pub added: Vec, - pub removed: Vec, -} - -impl From for SelectedDetail { - fn from(value: JsValue) -> Self { - let detail = value.unchecked_into::(); - let index = ListIndex::from(detail.index()); - - let diff = if detail.diff().is_undefined() { - None - } else { - let diff = detail.diff(); - Some(IndexDiff { - added: diff.added(), - removed: diff.removed(), - }) - }; - Self { index, diff } - } -} - -#[wasm_bindgen] -extern "C" { - #[derive(Debug)] - #[wasm_bindgen(extends = Object)] - type SelectedDetailJS; - - #[wasm_bindgen(method, getter)] - pub fn index(this: &SelectedDetailJS) -> JsValue; - - #[wasm_bindgen(method, getter)] - pub fn diff(this: &SelectedDetailJS) -> IndexDiffJS; - - #[derive(Debug)] - #[wasm_bindgen(extends = Object)] - type IndexDiffJS; - - #[wasm_bindgen(method, getter)] - pub fn added(this: &IndexDiffJS) -> Vec; - - #[wasm_bindgen(method, getter)] - pub fn removed(this: &IndexDiffJS) -> Vec; -} diff --git a/material-yew/src/menu.rs b/material-yew/src/menu.rs deleted file mode 100644 index 059e4d8..0000000 --- a/material-yew/src/menu.rs +++ /dev/null @@ -1,310 +0,0 @@ -mod models; - -pub use models::*; - -use crate::list::{ListIndex, SelectedDetail}; -use crate::{bool_to_option, event_into_details, to_option_string, WeakComponentLink}; -use gloo::events::EventListener; -use wasm_bindgen::prelude::*; -use web_sys::Node; -use yew::prelude::*; -use yew::virtual_dom::AttrValue; - -#[wasm_bindgen(module = "/build/mwc-menu.js")] -extern "C" { - #[derive(Debug)] - #[wasm_bindgen(extends = Node)] - type Menu; - - #[wasm_bindgen(getter, static_method_of = Menu)] - fn _dummy_loader() -> JsValue; - - #[wasm_bindgen(method, getter)] - fn index(this: &Menu) -> JsValue; - - #[wasm_bindgen(method)] - fn show(this: &Menu); - - #[wasm_bindgen(method)] - fn close(this: &Menu); - - // `MWCMenuIndex` is completely undocumented - #[wasm_bindgen(method)] - fn select(this: &Menu, index: &JsValue) -> usize; - - #[wasm_bindgen(method, js_name = getFocusedItemIndex)] - fn get_focused_item_index(this: &Menu) -> usize; - - #[wasm_bindgen(method, js_name = focusItemAtIndex)] - fn focus_item_at_index(this: &Menu, index: usize); - - #[wasm_bindgen(method, setter)] - fn set_anchor(this: &Menu, value: &web_sys::HtmlElement); -} - -loader_hack!(Menu); - -/// The `mwc-menu` Component -/// -/// [MWC Documentation](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/menu) -pub struct MatMenu { - node_ref: NodeRef, - opened_listener: Option, - closed_listener: Option, - action_listener: Option, - selected_listener: Option, -} - -/// Props for `MatMenu` -/// -/// MWC Documentation [properties](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/menu#propertiesattributes) -/// and [events](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/menu#events) -#[derive(Properties, PartialEq, Clone)] -pub struct MenuProps { - /// Changing this prop re-renders the component. - /// For general usage, consider using `show` method provided by - /// `WeakComponentLink` via `menu_link` - #[prop_or_default] - pub open: bool, - #[prop_or_default] - pub anchor: Option, - #[prop_or(Corner::TopStart)] - pub corner: Corner, - #[prop_or(MenuCorner::Start)] - pub menu_corner: MenuCorner, - #[prop_or_default] - pub quick: bool, - #[prop_or_default] - pub absolute: bool, - #[prop_or_default] - pub fixed: bool, - #[prop_or_default] - pub x: Option, - #[prop_or_default] - pub y: Option, - #[prop_or_default] - pub force_group_selection: bool, - #[prop_or(DefaultFocusState::ListRoot)] - pub default_focus: DefaultFocusState, - #[prop_or_default] - pub fullwidth: bool, - #[prop_or_default] - pub wrap_focus: bool, - #[prop_or_default] - pub inner_role: Option, - #[prop_or_default] - pub multi: bool, - #[prop_or_default] - pub activatable: bool, - /// Binds to `opened` event on `mwc-menu-surface` - /// - /// See events docs to learn more. - #[prop_or_default] - pub onopened: Callback<()>, - /// Binds to `closed` event on `mwc-menu-surface` - /// - /// See events docs to learn more. - #[prop_or_default] - pub onclosed: Callback<()>, - /// Binds to `action` event on `mwc-list` - /// - /// See events docs to learn more. - #[prop_or_default] - pub onaction: Callback, - /// Binds to `selected` event on `mwc-list` - /// - /// See events docs to learn more. - #[prop_or_default] - pub onselected: Callback, - /// `WeakComponentLink` for `MatMenu` which provides the following methods - /// - `get_focused_item_index(&self) -> usize` - /// - `focus_item_at_index(&self, index: usize)` - /// - `select(&self, index: &JsValue)` - /// - `show(&self)` - /// - `close(&self)` - /// - /// See [`WeakComponentLink`](/material_yew/struct.WeakComponentLink.html) - /// documentation for more information - #[prop_or_default] - pub menu_link: WeakComponentLink, - pub children: Children, -} - -impl Component for MatMenu { - type Message = (); - type Properties = MenuProps; - - fn create(ctx: &Context) -> Self { - ctx.props() - .menu_link - .borrow_mut() - .replace(ctx.link().clone()); - Menu::ensure_loaded(); - Self { - node_ref: NodeRef::default(), - opened_listener: None, - closed_listener: None, - action_listener: None, - selected_listener: None, - } - } - - fn view(&self, ctx: &Context) -> Html { - let props = ctx.props(); - html! { - - {props.children.clone()} - - } - } - - fn rendered(&mut self, ctx: &Context, first_render: bool) { - let props = ctx.props(); - let menu = self.node_ref.cast::().unwrap(); - if first_render { - if let Some(anchor) = props.anchor.as_ref() { - menu.set_anchor(anchor); - } - } - if self.opened_listener.is_none() { - let onopened = props.onopened.clone(); - self.opened_listener = Some(EventListener::new(&menu, "opened", move |_| { - onopened.emit(()); - })); - } - - if self.closed_listener.is_none() { - let onclosed = props.onclosed.clone(); - self.closed_listener = Some(EventListener::new(&menu, "closed", move |_| { - onclosed.emit(()); - })); - } - - if self.selected_listener.is_none() { - let onselected = props.onselected.clone(); - self.selected_listener = Some(EventListener::new(&menu, "selected", move |event| { - onselected.emit(SelectedDetail::from(event_into_details(event))); - })); - } - - if self.action_listener.is_none() { - let onaction = props.onaction.clone(); - self.action_listener = Some(EventListener::new(&menu.clone(), "action", move |_| { - let val: JsValue = menu.index(); - - let index = ListIndex::from(val); - onaction.emit(index); - })); - } - } -} - -impl WeakComponentLink { - /// Binds to `getFocusedItemIndex` method. - /// - /// See [here](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/menu#methods) for details - pub fn get_focused_item_index(&self) -> usize { - self.borrow() - .as_ref() - .unwrap() - .get_component() - .unwrap() - .node_ref - .cast::() - .unwrap() - .get_focused_item_index() - } - - /// Binds to `focusItemAtIndex` method. - /// - /// See [here](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/menu#methods) for details - pub fn focus_item_at_index(&self, index: usize) { - self.borrow() - .as_ref() - .unwrap() - .get_component() - .unwrap() - .node_ref - .cast::() - .unwrap() - .focus_item_at_index(index) - } - - /// Binds to `select` method. - /// - /// `index` is `JsValue` because `MWCMenuIndex` mentioned in mwc docs is - /// completely undocumented. - /// - /// See [here](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/menu#methods) for details - pub fn select(&self, index: &JsValue) { - self.borrow() - .as_ref() - .unwrap() - .get_component() - .unwrap() - .node_ref - .cast::() - .unwrap() - .select(index); - } - - /// Binds to `show` method. - /// - /// See [here](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/menu#methods) for details - pub fn show(&self) { - self.borrow() - .as_ref() - .unwrap() - .get_component() - .unwrap() - .node_ref - .cast::() - .unwrap() - .show(); - } - - /// Binds to `close` method. - /// - /// See [here](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/menu#methods) for details - pub fn close(&self) { - self.borrow() - .as_ref() - .unwrap() - .get_component() - .unwrap() - .node_ref - .cast::() - .unwrap() - .close(); - } - - /// Setter method for `anchor`. - pub fn set_anchor(&self, anchor: web_sys::HtmlElement) { - self.borrow() - .as_ref() - .unwrap() - .get_component() - .unwrap() - .node_ref - .cast::() - .unwrap() - .set_anchor(&anchor); - } -} diff --git a/material-yew/src/menu/models.rs b/material-yew/src/menu/models.rs deleted file mode 100644 index 52a2e19..0000000 --- a/material-yew/src/menu/models.rs +++ /dev/null @@ -1,75 +0,0 @@ -/// The `Corner` type -/// -/// [MWC Documentation](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/menu#propertiesattributes) -#[derive(Clone, PartialEq)] -pub enum Corner { - TopLeft, - TopRight, - BottomLeft, - BottomRight, - TopStart, - TopEnd, - BottomStart, - BottomEnd, -} - -impl ToString for Corner { - fn to_string(&self) -> String { - use Corner::*; - match self { - TopLeft => "TOP_LEFT", - TopRight => "TOP_RIGHT", - BottomLeft => "BOTTOM_LEFT", - BottomRight => "BOTTOM_RIGHT", - TopStart => "TOP_START", - TopEnd => "TOP_END ", - BottomStart => "BOTTOM_START", - BottomEnd => "BOTTOM_END", - } - .to_string() - } -} - -/// The `MenuCorner` type -/// -/// [MWC Documentation](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/menu#propertiesattributes) -#[derive(Clone, PartialEq)] -pub enum MenuCorner { - Start, - End, -} - -impl ToString for MenuCorner { - fn to_string(&self) -> String { - use MenuCorner::*; - match self { - Start => "START", - End => "END", - } - .to_string() - } -} - -/// The `DefaultFocusState` type -/// -/// [MWC Documentation](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/menu#propertiesattributes) -#[derive(Clone, PartialEq)] -pub enum DefaultFocusState { - None, - ListRoot, - FirstItem, - LastItem, -} - -impl ToString for DefaultFocusState { - fn to_string(&self) -> String { - use DefaultFocusState::*; - match self { - None => "NONE", - ListRoot => "LIST_ROOT", - FirstItem => "FIRST_ITEM", - LastItem => "LAST_ITEM", - } - .to_string() - } -} diff --git a/material-yew/src/radio.rs b/material-yew/src/radio.rs deleted file mode 100644 index 554321f..0000000 --- a/material-yew/src/radio.rs +++ /dev/null @@ -1,102 +0,0 @@ -use crate::bool_to_option; -use gloo::events::EventListener; -use wasm_bindgen::prelude::*; -use web_sys::Node; -use yew::prelude::*; -use yew::virtual_dom::AttrValue; - -#[wasm_bindgen(module = "/build/mwc-radio.js")] -extern "C" { - #[derive(Debug)] - #[wasm_bindgen(extends = Node)] - type Radio; - - #[wasm_bindgen(getter, static_method_of = Radio)] - fn _dummy_loader() -> JsValue; - - #[wasm_bindgen(method, getter)] - fn checked(this: &Radio) -> bool; - - #[wasm_bindgen(method, setter)] - fn set_checked(this: &Radio, value: bool); -} - -loader_hack!(Radio); - -/// The `mwc-radio` component -/// -/// [MWC Documentation](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/radio) -pub struct MatRadio { - node_ref: NodeRef, - change_listener: Option, -} - -/// Props for [`MatRadio`] -/// -/// MWC Documentation: -/// -/// - [Properties](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/radio#propertiesattributes) -/// - [Events](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/radio#events) -#[derive(Debug, Properties, PartialEq, Clone)] -pub struct RadioProps { - #[prop_or_default] - pub checked: bool, - #[prop_or_default] - pub disabled: bool, - #[prop_or_default] - pub name: Option, - #[prop_or_default] - pub value: Option, - #[prop_or_default] - pub global: bool, - #[prop_or_default] - pub reduced_touch_target: bool, - /// Binds to `change`. - /// - /// Callback's parameter of type denotes if the radio is checked or not. - /// - /// See events docs to learn more. - #[prop_or_default] - pub onchange: Callback, -} - -impl Component for MatRadio { - type Message = (); - type Properties = RadioProps; - - fn create(_: &Context) -> Self { - Radio::ensure_loaded(); - Self { - node_ref: NodeRef::default(), - change_listener: None, - } - } - - fn view(&self, ctx: &Context) -> Html { - let props = ctx.props(); - html! { - - } - } - - fn rendered(&mut self, ctx: &Context, _first_render: bool) { - let props = ctx.props(); - let element = self.node_ref.cast::().unwrap(); - element.set_checked(props.checked); - - if self.change_listener.is_none() { - let callback = props.onchange.clone(); - self.change_listener = - Some(EventListener::new(&element.clone(), "change", move |_| { - callback.emit(element.checked()); - })); - } - } -} diff --git a/material-yew/src/select.rs b/material-yew/src/select.rs deleted file mode 100644 index 0b9086c..0000000 --- a/material-yew/src/select.rs +++ /dev/null @@ -1,237 +0,0 @@ -#[doc(inline)] -pub use crate::list::{ActionDetail, ListIndex, SelectedDetail}; - -use crate::text_inputs::{ - validity_state::ValidityStateJS, NativeValidityState, ValidityState, ValidityTransform, -}; -use crate::utils::WeakComponentLink; -use crate::{bool_to_option, event_into_details, to_option_string}; -use gloo::events::EventListener; -use wasm_bindgen::prelude::*; -use web_sys::Node; -use yew::prelude::*; -use yew::virtual_dom::AttrValue; - -#[wasm_bindgen(module = "/build/mwc-select.js")] -extern "C" { - #[derive(Debug)] - #[wasm_bindgen(extends = Node)] - type Select; - - #[wasm_bindgen(getter, static_method_of = Select)] - fn _dummy_loader() -> JsValue; - - #[wasm_bindgen(method)] - fn select(this: &Select, index: usize); - - #[wasm_bindgen(method, setter = validityTransform)] - fn set_validity_transform( - this: &Select, - val: &Closure ValidityStateJS>, - ); -} - -loader_hack!(Select); - -/// The `mwc-select` component -/// -/// [MWC Documentation](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/select) -pub struct MatSelect { - node_ref: NodeRef, - validity_transform_closure: - Option ValidityStateJS>>, - opened_listener: Option, - closed_listener: Option, - action_listener: Option, - selected_listener: Option, -} - -/// Props for [`MatSelect`] -/// -/// MWC Documentation: -/// -/// - [Properties](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/select#propertiesattributes) -/// - [Events](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/select#events) -#[derive(Properties, PartialEq, Clone)] -pub struct Props { - #[prop_or_default] - pub value: Option, - #[prop_or_default] - pub label: Option, - #[prop_or_default] - pub natural_menu_width: bool, - #[prop_or_default] - pub icon: Option, - #[prop_or_default] - pub disabled: bool, - #[prop_or_default] - pub outlined: bool, - #[prop_or_default] - pub helper: Option, - #[prop_or_default] - pub required: bool, - #[prop_or_default] - pub validation_message: Option, - #[prop_or_default] - pub items: Option, - #[prop_or(- 1)] - pub index: i64, - #[prop_or_default] - pub validity_transform: Option, - #[prop_or_default] - pub validate_on_initial_render: bool, - #[prop_or_default] - pub children: Children, - /// [`WeakComponentLink`] for `MatList` which provides the following methods - /// - ```select(&self)``` - /// - /// See [`WeakComponentLink`] documentation for more information - #[prop_or_default] - pub select_link: WeakComponentLink, - /// Binds to `opened` event on `mwc-select-surface` - /// - /// See events docs to learn more. - #[prop_or_default] - pub onopened: Callback<()>, - /// Binds to `closed` event on `mwc-select-surface` - /// - /// See events docs to learn more. - #[prop_or_default] - pub onclosed: Callback<()>, - /// Binds to `action` event on `mwc-list` - /// - /// See events docs to learn more. - #[prop_or_default] - pub onaction: Callback, - /// Binds to `selected` event on `mwc-list` - /// - /// See events docs to learn more. - #[prop_or_default] - pub onselected: Callback, -} - -impl Component for MatSelect { - type Message = (); - type Properties = Props; - - fn create(ctx: &Context) -> Self { - ctx.props() - .select_link - .borrow_mut() - .replace(ctx.link().clone()); - Select::ensure_loaded(); - Self { - node_ref: NodeRef::default(), - validity_transform_closure: None, - opened_listener: None, - closed_listener: None, - action_listener: None, - selected_listener: None, - } - } - - fn view(&self, ctx: &Context) -> Html { - let props = ctx.props(); - html! { - - {props.children.clone()} - - } - } - - fn changed(&mut self, ctx: &Context, _old_props: &Self::Properties) -> bool { - // clear event listeners and update link in case the props changed - self.opened_listener = None; - self.closed_listener = None; - self.action_listener = None; - self.selected_listener = None; - ctx.props() - .select_link - .borrow_mut() - .replace(ctx.link().clone()); - true - } - - //noinspection DuplicatedCode - fn rendered(&mut self, ctx: &Context, first_render: bool) { - let props = ctx.props(); - let element = self.node_ref.cast::().unwrap(); - select_element.select(val); - } -} - -impl MatSelect { - /// Returns [`ValidityTransform`] to be passed to `validity_transform` prop - pub fn validity_transform ValidityState + 'static>( - func: F, - ) -> ValidityTransform { - ValidityTransform::new(func) - } -} diff --git a/material-yew/src/slider.rs b/material-yew/src/slider.rs deleted file mode 100644 index 417dd31..0000000 --- a/material-yew/src/slider.rs +++ /dev/null @@ -1,107 +0,0 @@ -use crate::{bool_to_option, to_option_string}; -use gloo::events::EventListener; -use wasm_bindgen::prelude::*; -use wasm_bindgen::JsCast; -use web_sys::{CustomEvent, Element}; -use yew::prelude::*; - -#[wasm_bindgen(module = "/build/mwc-slider.js")] -extern "C" { - #[derive(Debug)] - type Slider; - - // This needs to be added to each component - #[wasm_bindgen(getter, static_method_of = Slider)] - fn _dummy_loader() -> JsValue; -} - -// call the macro with the type -loader_hack!(Slider); - -/// The `mwc-snackbar` component -/// -/// [MWC Documentation](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/slider) -pub struct MatSlider { - node_ref: NodeRef, - input_listener: Option, - change_listener: Option, -} - -/// Props for [`MatSlider`] -/// -/// MWC Documentation: -/// -/// - [Properties](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/slider#propertiesattributes) -/// - [Events](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/slider#events) -#[derive(Debug, Properties, PartialEq, Clone)] -pub struct SliderProps { - #[prop_or(0)] - pub value: u32, - #[prop_or(0)] - pub min: u32, - #[prop_or(100)] - pub max: u32, - #[prop_or(1)] - pub step: u32, - #[prop_or(false)] - pub pin: bool, - #[prop_or(false)] - pub markers: bool, - /// Binds to input on `mwc-slider` - /// Type passed to callback is `CustomEvent` because `Slider` is - /// undocumented See: - #[prop_or_default] - pub oninput: Callback, - /// Binds to change on `mwc-slider` - /// Type passed to callback is `CustomEvent` because `Slider` is - /// undocumented See: - #[prop_or_default] - pub onchange: Callback, -} - -impl Component for MatSlider { - type Message = (); - type Properties = SliderProps; - - fn create(_: &Context) -> Self { - Slider::ensure_loaded(); - Self { - node_ref: NodeRef::default(), - input_listener: None, - change_listener: None, - } - } - - fn view(&self, ctx: &Context) -> Html { - let props = ctx.props(); - html! { - - } - } - - fn rendered(&mut self, ctx: &Context, _first_render: bool) { - let props = ctx.props(); - let element = self.node_ref.cast::().unwrap(); - if self.input_listener.is_none() { - let oninput = props.oninput.clone(); - self.input_listener = Some(EventListener::new(&element, "input", move |event| { - oninput.emit(JsValue::from(event).unchecked_into::()) - })); - }; - - if self.change_listener.is_none() { - let onchange = props.onchange.clone(); - self.change_listener = Some(EventListener::new(&element, "change", move |event| { - onchange.emit(JsValue::from(event).unchecked_into::()) - })); - } - } -} diff --git a/material-yew/src/snackbar.rs b/material-yew/src/snackbar.rs deleted file mode 100644 index f0b3f20..0000000 --- a/material-yew/src/snackbar.rs +++ /dev/null @@ -1,226 +0,0 @@ -use crate::{bool_to_option, event_into_details, to_option_string, WeakComponentLink}; -use gloo::events::EventListener; -use js_sys::Object; -use wasm_bindgen::prelude::*; -use wasm_bindgen::JsCast; -use web_sys::Node; -use yew::prelude::*; -use yew::virtual_dom::AttrValue; - -#[wasm_bindgen(module = "/build/mwc-snackbar.js")] -extern "C" { - #[derive(Debug)] - #[wasm_bindgen(extends = Node)] - type Snackbar; - - #[wasm_bindgen(getter, static_method_of = Snackbar)] - fn _dummy_loader() -> JsValue; - - #[wasm_bindgen(method, setter)] - fn set_open(this: &Snackbar, value: bool); - - #[wasm_bindgen(method)] - fn show(this: &Snackbar); - - #[wasm_bindgen(method)] - fn close(this: &Snackbar, reason: &JsValue); -} - -#[wasm_bindgen] -extern "C" { - #[derive(Debug)] - #[wasm_bindgen(extends = Object)] - type DetailsReason; - - #[wasm_bindgen(method, getter)] - fn reason(this: &DetailsReason) -> String; -} - -loader_hack!(Snackbar); - -/// The `mwc-snackbar` component -/// -/// [MWC Documentation](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/snackbar) -pub struct MatSnackbar { - node_ref: NodeRef, - opening_listener: Option, - opened_listener: Option, - closing_listener: Option, - closed_listener: Option, -} - -/// Props for [`MatSnackbar`] -/// -/// MWC Documentation: -/// -/// - [Properties](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/snackbar#propertiesattributes) -/// - [Events](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/snackbar#events) -#[derive(Properties, PartialEq, Clone)] -pub struct SnackbarProps { - #[prop_or_default] - pub open: bool, - #[prop_or(5000)] - pub timeout_ms: i32, - #[prop_or_default] - pub close_on_escape: bool, - #[prop_or_default] - pub label_text: Option, - #[prop_or_default] - pub stacked: bool, - #[prop_or_default] - pub leading: bool, - /// Binds to `MDCSnackbar:opening` event - /// - /// See events docs to learn more. - #[prop_or_default] - pub onopening: Callback<()>, - /// Binds to `MDCSnackbar:opened` event - /// - /// See events docs to learn more. - #[prop_or_default] - pub onopened: Callback<()>, - /// Binds to `MDCSnackbar:` event - /// - /// The argument passed to callback corresponds to `reason` parameter of the - /// event - /// - /// See events docs to learn more. - #[prop_or_default] - pub onclosing: Callback>, - /// Binds to `closing` event - /// - /// The argument passed to callback corresponds to `reason` parameter of the - /// event - /// - /// See events docs to learn more. - #[prop_or_default] - pub onclosed: Callback>, - /// [`WeakComponentLink`] for `MatList` which provides the following methods - /// - ```show(&self)``` - /// - ```close(&self, reason: &str)``` - /// - /// See [`WeakComponentLink`] documentation for more information - #[prop_or_default] - pub snackbar_link: WeakComponentLink, - #[prop_or_default] - pub children: Children, -} - -impl Component for MatSnackbar { - type Message = (); - type Properties = SnackbarProps; - - fn create(ctx: &Context) -> Self { - ctx.props() - .snackbar_link - .borrow_mut() - .replace(ctx.link().clone()); - Snackbar::ensure_loaded(); - Self { - node_ref: NodeRef::default(), - opening_listener: None, - opened_listener: None, - closing_listener: None, - closed_listener: None, - } - } - - fn view(&self, ctx: &Context) -> Html { - let props = ctx.props(); - html! { - {props.children.clone()} - } - } - - fn rendered(&mut self, ctx: &Context, _first_render: bool) { - let props = ctx.props(); - let element = self.node_ref.cast::().unwrap(); - element.set_open(props.open); - - if self.opening_listener.is_none() { - let on_opening = props.onopening.clone(); - self.opening_listener = Some(EventListener::new( - &element, - "MDCSnackbar:opening", - move |_| { - on_opening.emit(()); - }, - )); - }; - - if self.opened_listener.is_none() { - let on_opened = props.onopened.clone(); - self.opened_listener = Some(EventListener::new( - &element, - "MDCSnackbar:opened", - move |_| { - on_opened.emit(()); - }, - )); - }; - - if self.closing_listener.is_none() { - let on_closing = props.onclosing.clone(); - self.closing_listener = Some(EventListener::new( - &element, - "MDCSnackbar:closing", - move |event| { - on_closing.emit(event_into_details_reason(event)); - }, - )); - } - - if self.closed_listener.is_none() { - let on_closed = props.onclosed.clone(); - self.closed_listener = Some(EventListener::new( - &element, - "MDCSnackbar:closed", - move |event| { - on_closed.emit(event_into_details_reason(event)); - }, - )); - } - } -} - -impl WeakComponentLink { - pub fn show(&self) { - self.borrow() - .as_ref() - .unwrap() - .get_component() - .unwrap() - .node_ref - .cast::() - .unwrap() - .show() - } - - pub fn close(&self, reason: &str) { - self.borrow() - .as_ref() - .unwrap() - .get_component() - .unwrap() - .node_ref - .cast::() - .unwrap() - .close(&JsValue::from_str(reason)) - } -} - -fn event_into_details_reason(event: &Event) -> Option { - let details: JsValue = event_into_details(event); - if details.is_undefined() { - None - } else { - Some(details.unchecked_into::().reason()) - } -} diff --git a/material-yew/src/switch.rs b/material-yew/src/switch.rs deleted file mode 100644 index 7d73a33..0000000 --- a/material-yew/src/switch.rs +++ /dev/null @@ -1,86 +0,0 @@ -use gloo::events::EventListener; -use wasm_bindgen::prelude::*; -use web_sys::Node; -use yew::prelude::*; - -#[wasm_bindgen(module = "/build/mwc-switch.js")] -extern "C" { - #[derive(Debug)] - #[wasm_bindgen(extends = Node)] - type Switch; - - #[wasm_bindgen(getter, static_method_of = Switch)] - fn _dummy_loader() -> JsValue; - - #[wasm_bindgen(method, getter)] - fn checked(this: &Switch) -> bool; - - #[wasm_bindgen(method, setter)] - fn set_checked(this: &Switch, value: bool); -} - -loader_hack!(Switch); - -/// The `mwc-switch` component -/// -/// [MWC Documentation](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/switch) -pub struct MatSwitch { - node_ref: NodeRef, - change_listener: Option, -} - -/// Props for [`MatSwitch`] -/// -/// MWC Documentation: -/// -/// - [Properties](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/switch#propertiesattributes) -/// - [Events](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/switch#events) -#[derive(Debug, Properties, PartialEq, Clone)] -pub struct SwitchProps { - #[prop_or_default] - pub checked: bool, - #[prop_or_default] - pub disabled: bool, - /// Binds to `change` event on `mwc-switch` - /// - /// See events docs to learn more. - #[prop_or_default] - pub onchange: Callback, -} - -impl Component for MatSwitch { - type Message = (); - type Properties = SwitchProps; - - fn create(_: &Context) -> Self { - Switch::ensure_loaded(); - Self { - node_ref: NodeRef::default(), - change_listener: None, - } - } - - fn view(&self, ctx: &Context) -> Html { - let props = ctx.props(); - html! { - - } - } - - fn rendered(&mut self, ctx: &Context, _first_render: bool) { - let props = ctx.props(); - let element = self.node_ref.cast::().unwrap(); - element.set_checked(props.checked); - - if self.change_listener.is_none() { - let callback = props.onchange.clone(); - self.change_listener = - Some(EventListener::new(&element.clone(), "change", move |_| { - callback.emit(element.checked()); - })); - } - } -} diff --git a/material-yew/src/tabs/mod.rs b/material-yew/src/tabs/mod.rs deleted file mode 100644 index 6e3891c..0000000 --- a/material-yew/src/tabs/mod.rs +++ /dev/null @@ -1,8 +0,0 @@ -mod tab; -pub use tab::*; - -mod tab_bar; -pub use tab_bar::*; - -mod tab_icon; -pub use tab_icon::*; diff --git a/material-yew/src/tabs/tab.rs b/material-yew/src/tabs/tab.rs deleted file mode 100644 index 844e3c4..0000000 --- a/material-yew/src/tabs/tab.rs +++ /dev/null @@ -1,114 +0,0 @@ -use crate::{bool_to_option, event_details_into}; -use gloo::events::EventListener; -use js_sys::Object; -use wasm_bindgen::prelude::*; -use web_sys::Element; -use yew::prelude::*; -use yew::virtual_dom::AttrValue; - -#[wasm_bindgen(module = "/build/mwc-tab.js")] -extern "C" { - #[derive(Debug)] - type Tab; - - #[wasm_bindgen(getter, static_method_of = Tab)] - fn _dummy_loader() -> JsValue; -} - -loader_hack!(Tab); - -/// The `mwc-tab` component -/// -/// [MWC Documentation](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/tab) -pub struct MatTab { - node_ref: NodeRef, - interacted_listener: Option, -} - -/// Props for `MatTab` -/// -/// MWC Documentation [properties](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/tab#propertiesattributes) -/// and [events](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/tab#events) -#[derive(Debug, Properties, PartialEq, Clone)] -pub struct TabProps { - #[prop_or_default] - pub label: Option, - #[prop_or_default] - pub icon: Option, - #[prop_or_default] - pub has_image_icon: bool, - #[prop_or_default] - pub indicator_icon: Option, - #[prop_or_default] - pub is_fading_indicator: bool, - #[prop_or_default] - pub min_width: bool, - #[prop_or_default] - pub is_min_width_indicator: bool, - #[prop_or_default] - pub stacked: bool, - /// Binds to `MDCTab:interacted` event on `mwc-tab` - /// - /// See events docs to learn more. - #[prop_or_default] - pub oninteracted: Callback, - #[prop_or_default] - pub children: Children, -} - -impl Component for MatTab { - type Message = (); - type Properties = TabProps; - - fn create(_: &Context) -> Self { - Tab::ensure_loaded(); - Self { - node_ref: NodeRef::default(), - interacted_listener: None, - } - } - - fn view(&self, ctx: &Context) -> Html { - let props = ctx.props(); - html! { - {props.children.clone()} - } - } - - fn rendered(&mut self, ctx: &Context, _first_render: bool) { - let props = ctx.props(); - if self.interacted_listener.is_none() { - let element = self.node_ref.cast::().unwrap(); - - let on_interacted = props.oninteracted.clone(); - self.interacted_listener = Some(EventListener::new( - &element, - "MDCTab:interacted", - move |event| { - let detail = event_details_into::(event); - on_interacted.emit(detail.tab_id()); - }, - )); - } - } -} - -#[wasm_bindgen] -extern "C" { - #[derive(Debug)] - #[wasm_bindgen(extends = Object)] - type InteractedDetailJS; - - #[wasm_bindgen(method, getter, js_name=tabId)] - fn tab_id(this: &InteractedDetailJS) -> String; -} diff --git a/material-yew/src/tabs/tab_bar.rs b/material-yew/src/tabs/tab_bar.rs deleted file mode 100644 index bd6ae93..0000000 --- a/material-yew/src/tabs/tab_bar.rs +++ /dev/null @@ -1,92 +0,0 @@ -use crate::{event_details_into, to_option_string}; -use gloo::events::EventListener; -use js_sys::Object; -use wasm_bindgen::prelude::*; -use web_sys::Element; -use yew::prelude::*; - -#[wasm_bindgen(module = "/build/mwc-tab-bar.js")] -extern "C" { - #[derive(Debug)] - type TabBar; - - #[wasm_bindgen(getter, static_method_of = TabBar)] - fn _dummy_loader() -> JsValue; -} - -loader_hack!(TabBar); - -/// The `mwc-tab-bar` component -/// -/// [MWC Documentation](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/tab-bar) -pub struct MatTabBar { - node_ref: NodeRef, - activated_listener: Option, -} - -/// Props for `MatTabBar`. -/// -/// MWC Documentation [properties](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/tab-bar#propertiesattributes) -/// and [events](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/tab-bar#events) -#[derive(Debug, Properties, PartialEq, Clone)] -pub struct TabBarProps { - #[prop_or_default] - pub active_index: u32, - /// Binds to `MDCTabBar:activated` event on `mwc-tab` - /// - /// See events docs to learn more. - #[prop_or_default] - pub onactivated: Callback, - #[prop_or_default] - pub children: Children, -} - -impl Component for MatTabBar { - type Message = (); - type Properties = TabBarProps; - - fn create(_: &Context) -> Self { - TabBar::ensure_loaded(); - Self { - node_ref: NodeRef::default(), - activated_listener: None, - } - } - - fn view(&self, ctx: &Context) -> Html { - let props = ctx.props(); - html! { - {props.children.clone()} - } - } - - fn rendered(&mut self, ctx: &Context, _first_render: bool) { - let props = ctx.props(); - if self.activated_listener.is_none() { - let element = self.node_ref.cast::().unwrap(); - - let on_activated = props.onactivated.clone(); - self.activated_listener = Some(EventListener::new( - &element, - "MDCTabBar:activated", - move |event| { - let detail = event_details_into::(event); - on_activated.emit(detail.index()); - }, - )); - } - } -} - -#[wasm_bindgen] -extern "C" { - #[derive(Debug)] - #[wasm_bindgen(extends = Object)] - type ActivatedDetailJS; - - #[wasm_bindgen(method, getter)] - fn index(this: &ActivatedDetailJS) -> usize; -} diff --git a/material-yew/src/tabs/tab_icon.rs b/material-yew/src/tabs/tab_icon.rs deleted file mode 100644 index a378cd7..0000000 --- a/material-yew/src/tabs/tab_icon.rs +++ /dev/null @@ -1,52 +0,0 @@ -use yew::prelude::*; - -const SLOT: &str = "icon"; - -/// Props for [`MatTabIcon`] -#[derive(Properties, PartialEq, Clone)] -pub struct TabIconProps { - pub children: Children, -} - -/// Defines title for [`MatTab`][crate::MatTab]. -/// -/// If the child passed is an element (a `VTag`), then it is modified to include -/// the appropriate attributes. Otherwise, the child is wrapped in a `span` -/// containing said attributes. -pub struct MatTabIcon {} - -impl Component for MatTabIcon { - type Message = (); - type Properties = TabIconProps; - - fn create(_: &Context) -> Self { - Self {} - } - - fn view(&self, ctx: &Context) -> Html { - let props = ctx.props(); - let children = props - .children - .iter() - .map(|child| { - match child { - Html::VTag(mut vtag) => { - vtag.add_attribute("slot", "title"); - Html::VTag(vtag) - } - _ => { - html! { - - {child} - - } - } - } - }) - .collect::(); - - html! { - {children} - } - } -} diff --git a/material-yew/src/text_inputs/mod.rs b/material-yew/src/text_inputs/mod.rs deleted file mode 100644 index 9a0eee8..0000000 --- a/material-yew/src/text_inputs/mod.rs +++ /dev/null @@ -1,66 +0,0 @@ -#[cfg(feature = "textfield")] -mod textfield; -#[cfg(feature = "textfield")] -pub use textfield::*; - -#[cfg(any(feature = "textfield", feature = "textarea"))] -pub(crate) mod validity_state; -#[cfg(any(feature = "textfield", feature = "textarea"))] -pub use validity_state::ValidityState; - -#[cfg(any(feature = "textfield", feature = "textarea"))] -pub(crate) mod text_field_type; -#[cfg(any(feature = "textfield", feature = "textarea"))] -pub use text_field_type::*; - -#[cfg(feature = "textarea")] -mod textarea; -#[cfg(feature = "textarea")] -pub use textarea::*; - -#[cfg(any(feature = "textfield", feature = "textarea"))] -pub use web_sys::ValidityState as NativeValidityState; - -use std::rc::Rc; - -use gloo::events::EventListener; -use wasm_bindgen::JsValue; -use web_sys::{Element, Event}; -use yew::{Callback, NodeRef}; - -#[cfg(any(feature = "textfield", feature = "textarea"))] -pub(crate) type ValidityTransformFn = dyn Fn(String, NativeValidityState) -> ValidityState; - -#[cfg(any(feature = "textfield", feature = "textarea"))] -#[derive(Clone)] -/// Owned function for validity props -pub struct ValidityTransform(pub(crate) Rc); - -#[cfg(any(feature = "textfield", feature = "textarea"))] -impl ValidityTransform { - pub(crate) fn new ValidityState + 'static>( - func: F, - ) -> ValidityTransform { - ValidityTransform(Rc::new(func)) - } -} - -impl PartialEq for ValidityTransform { - #[allow(clippy::vtable_address_comparisons)] - fn eq(&self, other: &Self) -> bool { - Rc::ptr_eq(&self.0, &other.0) - } -} - -fn set_on_input_handler( - node_ref: &NodeRef, - callback: Callback, - convert: impl Fn((Event, JsValue)) -> String + 'static, -) -> EventListener { - let element = node_ref.cast::().unwrap(); - EventListener::new(&element, "input", move |event: &Event| { - let js_value = JsValue::from(event); - - callback.emit(convert((event.clone(), js_value))) - }) -} diff --git a/material-yew/src/text_inputs/text_field_type.rs b/material-yew/src/text_inputs/text_field_type.rs deleted file mode 100644 index 493c167..0000000 --- a/material-yew/src/text_inputs/text_field_type.rs +++ /dev/null @@ -1,38 +0,0 @@ -/// The `TextFieldType` type -#[derive(Debug, Clone, PartialEq)] -pub enum TextFieldType { - Text, - Search, - Tel, - Url, - Email, - Password, - Date, - Month, - Week, - Time, - DatetimeLocal, - Number, - Color, -} - -impl TextFieldType { - pub fn as_str(&self) -> &'static str { - use TextFieldType::*; - match self { - Text => "text", - Search => "search", - Tel => "tel", - Url => "url", - Email => "email", - Password => "password", - Date => "date", - Month => "month", - Week => "week", - Time => "time", - DatetimeLocal => "datetime-local", - Number => "number", - Color => "color", - } - } -} diff --git a/material-yew/src/text_inputs/textarea.rs b/material-yew/src/text_inputs/textarea.rs deleted file mode 100644 index be42e40..0000000 --- a/material-yew/src/text_inputs/textarea.rs +++ /dev/null @@ -1,226 +0,0 @@ -use super::set_on_input_handler; -use crate::bool_to_option; -use crate::text_inputs::validity_state::ValidityStateJS; -use crate::text_inputs::{TextFieldType, ValidityState, ValidityTransform}; -use gloo::events::EventListener; -use wasm_bindgen::prelude::*; -use wasm_bindgen::JsCast; -use web_sys::Node; -pub use web_sys::ValidityState as NativeValidityState; -use yew::prelude::*; -use yew::virtual_dom::AttrValue; - -#[wasm_bindgen(module = "/build/mwc-textarea.js")] -extern "C" { - #[derive(Debug)] - #[wasm_bindgen(extends = Node)] - type TextArea; - - #[wasm_bindgen(getter, static_method_of = TextArea)] - fn _dummy_loader() -> JsValue; - - #[wasm_bindgen(method, setter = validityTransform)] - fn set_validity_transform( - this: &TextArea, - val: &Closure ValidityStateJS>, - ); - - #[wasm_bindgen(method, setter)] - fn set_type(this: &TextArea, val: &JsValue); - - #[wasm_bindgen(method, getter)] - fn value(this: &TextArea) -> String; - - #[wasm_bindgen(method, setter)] - fn set_value(this: &TextArea, val: &JsValue); -} - -loader_hack!(TextArea); - -/// The `mwc-textarea` component -/// -/// [MWC Documentation](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/textarea) -pub struct MatTextArea { - node_ref: NodeRef, - validity_transform_closure: - Option ValidityStateJS>>, - input_listener: Option, -} - -/// Type for [`TextAreaProps::char_counter`]. -/// -/// Equivalent to `type TextAreaCharCounter = 'external'|'internal';` Typescript -/// type. -#[derive(Clone, Copy, PartialEq)] -pub enum TextAreaCharCounter { - Internal, - External, -} - -impl TextAreaCharCounter { - pub fn as_str(&self) -> &'static str { - match self { - TextAreaCharCounter::Internal => "internal", - TextAreaCharCounter::External => "external", - } - } -} - -/// Props for [`MatTextArea`] -/// -/// MWC Documentation: -/// -/// - [Properties](https://github.com/material-components/material-components-web-components/tree/v0.27.0/packages/checkbox#propertiesattributes) -#[derive(Properties, PartialEq, Clone)] -pub struct TextAreaProps { - #[prop_or_default] - pub rows: Option, - #[prop_or_default] - pub cols: Option, - #[prop_or_default] - pub value: Option, - #[prop_or(TextFieldType::Text)] - pub field_type: TextFieldType, - #[prop_or_default] - pub label: Option, - #[prop_or_default] - pub placeholder: Option, - #[prop_or_default] - pub icon: Option, - #[prop_or_default] - pub icon_trailing: Option, - #[prop_or_default] - pub disabled: bool, - /// For boolean value `true`, `TextAreaCharCounter::External` is to be used. - /// Boolean value `false` results in character counter not being shown so - /// `None` should be used - #[prop_or_default] - pub char_counter: Option, - #[prop_or_default] - pub outlined: bool, - #[prop_or_default] - pub helper: Option, - #[prop_or_default] - pub helper_persistent: bool, - #[prop_or_default] - pub required: bool, - #[prop_or_default] - pub max_length: Option, - #[prop_or_default] - pub validation_message: Option, - /// Type: `number | string` so I'll leave it as a string - #[prop_or_default] - pub min: Option, - /// Type: `number | string` so I'll leave it as a string - #[prop_or_default] - pub max: Option, - #[prop_or_default] - pub size: Option, // --| - #[prop_or_default] // | -- What you doing step size - pub step: Option, // --| - #[prop_or_default] - pub auto_validate: bool, - #[prop_or_default] - pub validity_transform: Option, - #[prop_or_default] - pub validate_on_initial_render: bool, - #[prop_or_default] - pub oninput: Callback, - #[prop_or_default] - pub name: Option, -} - -impl Component for MatTextArea { - type Message = (); - type Properties = TextAreaProps; - - fn create(_: &Context) -> Self { - TextArea::ensure_loaded(); - Self { - node_ref: NodeRef::default(), - validity_transform_closure: None, - input_listener: None, - } - } - - fn view(&self, ctx: &Context) -> Html { - let props = ctx.props(); - html! { - - } - } - - fn rendered(&mut self, ctx: &Context, first_render: bool) { - let props = ctx.props(); - let element = self.node_ref.cast::