diff --git a/.Rbuildignore b/.Rbuildignore index a18cb35..cae1011 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -8,3 +8,6 @@ ^pkgdown$ ^\.github$ ^CODE_OF_CONDUCT\.md$ +^README\.Rmd$ +^index\.Rmd$ +^index\.md$ \ No newline at end of file diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 6ab6888..d46a617 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -1,16 +1,14 @@ -# Workflow derived from https://github.com/r-lib/actions/tree/master/examples +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help -# -# NOTE: This workflow is overkill for most R packages and -# check-standard.yaml is likely a better choice. -# usethis::use_github_action("check-standard") will install it. on: push: branches: [main, master] pull_request: branches: [main, master] -name: R-CMD-check +name: R-CMD-check.yaml + +permissions: read-all jobs: R-CMD-check: @@ -22,49 +20,33 @@ jobs: fail-fast: false matrix: config: - - {os: macOS-latest, r: 'release'} - + - {os: macos-latest, r: 'release'} - {os: windows-latest, r: 'release'} - # Use 3.6 to trigger usage of RTools35 - - {os: windows-latest, r: '3.6'} - - # Use older ubuntu to maximise backward compatibility - - {os: ubuntu-18.04, r: 'devel', http-user-agent: 'release'} - - {os: ubuntu-18.04, r: 'release'} - - {os: ubuntu-18.04, r: 'oldrel-1'} - - {os: ubuntu-18.04, r: 'oldrel-2'} - - {os: ubuntu-18.04, r: 'oldrel-3'} - - {os: ubuntu-18.04, r: 'oldrel-4'} + - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} + - {os: ubuntu-latest, r: 'release'} + - {os: ubuntu-latest, r: 'oldrel-1'} env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} R_KEEP_PKG_SOURCE: yes steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - uses: r-lib/actions/setup-pandoc@v1 + - uses: r-lib/actions/setup-pandoc@v2 - - uses: r-lib/actions/setup-r@v1 + - uses: r-lib/actions/setup-r@v2 with: r-version: ${{ matrix.config.r }} http-user-agent: ${{ matrix.config.http-user-agent }} use-public-rspm: true - - uses: r-lib/actions/setup-r-dependencies@v1 + - uses: r-lib/actions/setup-r-dependencies@v2 with: - extra-packages: rcmdcheck - - - uses: r-lib/actions/check-r-package@v1 - - - name: Show testthat output - if: always() - run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true - shell: bash + extra-packages: any::rcmdcheck + needs: check - - name: Upload check results - if: failure() - uses: actions/upload-artifact@main + - uses: r-lib/actions/check-r-package@v2 with: - name: ${{ runner.os }}-r${{ matrix.config.r }}-results - path: check + upload-snapshots: true + build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")' diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index 8bc9210..e1e2e52 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -1,46 +1,46 @@ +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help on: push: - branches: master + branches: [main, master] + pull_request: + branches: [main, master] + release: + types: [published] + workflow_dispatch: name: pkgdown jobs: pkgdown: - runs-on: macOS-latest + runs-on: ubuntu-latest + # Only restrict concurrency for non-PR jobs + concurrency: + group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }} env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - uses: r-lib/actions/setup-r@master + - uses: r-lib/actions/setup-pandoc@v2 - - uses: r-lib/actions/setup-pandoc@master - - - name: Query dependencies - run: | - install.packages('remotes') - saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) - writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version") - shell: Rscript {0} + - uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true - - name: Cache R packages - uses: actions/cache@v1 + - uses: r-lib/actions/setup-r-dependencies@v2 with: - path: ${{ env.R_LIBS_USER }} - key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }} - restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1- + extra-packages: any::pkgdown, local::. + needs: website - - name: Install dependencies - run: | - remotes::install_deps(dependencies = TRUE) - install.packages("pkgdown") + - name: Build site + run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE) shell: Rscript {0} - - name: Install package - run: R CMD INSTALL . - - - name: Deploy package - run: | - git config --local user.email "actions@github.com" - git config --local user.name "GitHub Actions" - Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)' + - name: Deploy to GitHub pages 🚀 + if: github.event_name != 'pull_request' + uses: JamesIves/github-pages-deploy-action@v4.4.1 + with: + clean: false + branch: gh-pages + folder: docs \ No newline at end of file diff --git a/DESCRIPTION b/DESCRIPTION index 391a46a..11e46db 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -15,9 +15,10 @@ Description: 'R' interface to the 'Tabler' HTML template. See more here . URL: https://rinterface.github.io/tablerDash/, https://github.com/RinteRface/tablerDash/ BugReports: https://github.com/RinteRface/tablerDash/issues -Imports: shiny, htmltools, knitr -Suggests: shinyWidgets, shinyEffects, echarts4r +Imports: shiny, htmltools +Suggests: shinyWidgets, shinyEffects, echarts4r, knitr License: GPL (>= 2) Encoding: UTF-8 -LazyData: true -RoxygenNote: 6.1.1 +RoxygenNote: 7.3.2 +Depends: + R (>= 2.10) diff --git a/NEWS.md b/NEWS.md index 270e879..6e2ad73 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,9 @@ # tablerDash 0.1.5.9000 +## Documentation +- Upgrade pkgdown setup. +- Added shinylive support. + ## Bug Fix - Resizing a `tablerCard()` triggers the shown javascript event, telling shiny to update the size of the contained object. diff --git a/R/sysdata.rda b/R/sysdata.rda new file mode 100644 index 0000000..aa24958 Binary files /dev/null and b/R/sysdata.rda differ diff --git a/R/utils.R b/R/utils.R index e3ab761..44c4191 100644 --- a/R/utils.R +++ b/R/utils.R @@ -53,3 +53,46 @@ validateTabName <- function(name) { stop("tabName must not have a '.' in it.") } } + +#' Create shinylive iframe +#' +#' Useful for pkgdown website +#' +#' @param url app url. A shinylive link. +#' @param mode How to display the shinylive app. Default to app mode. +#' @param header Whether to display the shinylive header. Default to TRUE. +#' @keywords internal +create_app_link <- function(url, mode = c("app", "editor"), header = TRUE) { + mode <- match.arg(mode) + + if (mode != "editor") url <- gsub("editor", mode, url) + + if (!header) { + url <- paste0(url, "&h=0") + } + + shiny::tags$iframe( + # To allow the content to fill the full screen card + class = "html-fill-item", + src = url, + height = "700", + width = "100%", + style = "border: 1px solid rgba(0,0,0,0.175); border-radius: .375rem;", + allowfullscreen = "", + allow = "autoplay", + `data-external` = "1" + ) +} + +code_chunk <- function(output, language = "r") { + cat(paste0("```", language)) + cat(output) + cat("\n```\n") +} + +print_r_code <- function(name) { + path <- system.file(sprintf("examples/shinylive/%s/app.R", name), package = "shiny386") + lines <- readLines(path) + to_remove <- grep("webr::", lines) + code_chunk(cat(paste(lines[-to_remove], collapse = "\n"))) +} \ No newline at end of file diff --git a/README.Rmd b/README.Rmd new file mode 100644 index 0000000..d9401f5 --- /dev/null +++ b/README.Rmd @@ -0,0 +1,71 @@ +--- +output: github_document +--- + + + +```{r, include = FALSE} +knitr::opts_chunk$set( + collapse = TRUE, + comment = "#>", + fig.path = "man/figures/README-", + out.width = "100%" +) +``` + +# tablerDash + + +[![R build status](https://github.com/RinteRface/tablerDash/workflows/R-CMD-check/badge.svg)](https://github.com/RinteRface/tablerDash/actions) +[![CRAN status](https://www.r-pkg.org/badges/version/tablerDash)](https://cran.r-project.org/package=tablerDash) +[![lifecycle](https://img.shields.io/badge/lifecycle-maturing-ff69b4.svg)](https://www.tidyverse.org/lifecycle/#maturing) +[![cranlogs](https://cranlogs.r-pkg.org/badges/tablerDash)](https://cran.r-project.org/package=tablerDash) +[![total](https://cranlogs.r-pkg.org/badges/grand-total/tablerDash)](https://www.rpackages.io/package/tablerDash) +[![R-CMD-check](https://github.com/RinteRface/tablerDash/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/RinteRface/tablerDash/actions/workflows/R-CMD-check.yaml) + + +> Tabler dashboard template for shiny with Bootstrap 4 + +See [https://tabler.io](https://tabler.io) for the original template. + +## Installation + +This package is on CRAN: + +```r +# latest devel version +devtools::install_github("RinteRface/tablerDash") +# CRAN version +install.packages("tablerDash") +``` + +## Demo + +`{tablerDash}` works on all the RStudio products. See a demo [on shinyapps.io](https://dgranjon.shinyapps.io/tablerDashDemo/). + + +
+
+ +
+
+ +
+ +
+
+ +
+
+ +
+ + +## Issues + +Issues are listed [here](https://github.com/RinteRface/tablerDash/issues). + +## Code of Conduct + + Please note that the tablerDash project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms. + diff --git a/README.md b/README.md index f9ef5fa..d16cfb7 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,29 @@ + + + # tablerDash -[![R build status](https://github.com/RinteRface/tablerDash/workflows/R-CMD-check/badge.svg)](https://github.com/RinteRface/tablerDash/actions) -[![CRAN status](https://www.r-pkg.org/badges/version/tablerDash)](https://cran.r-project.org/package=tablerDash) + + +[![R build +status](https://github.com/RinteRface/tablerDash/workflows/R-CMD-check/badge.svg)](https://github.com/RinteRface/tablerDash/actions) +[![CRAN +status](https://www.r-pkg.org/badges/version/tablerDash)](https://cran.r-project.org/package=tablerDash) [![lifecycle](https://img.shields.io/badge/lifecycle-maturing-ff69b4.svg)](https://www.tidyverse.org/lifecycle/#maturing) [![cranlogs](https://cranlogs.r-pkg.org/badges/tablerDash)](https://cran.r-project.org/package=tablerDash) [![total](https://cranlogs.r-pkg.org/badges/grand-total/tablerDash)](https://www.rpackages.io/package/tablerDash) +[![R-CMD-check](https://github.com/RinteRface/tablerDash/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/RinteRface/tablerDash/actions/workflows/R-CMD-check.yaml) + > Tabler dashboard template for shiny with Bootstrap 4 -See [https://tabler.io](https://tabler.io) for the original template. +See for the original template. ## Installation This package is on CRAN: -```r +``` r # latest devel version devtools::install_github("RinteRface/tablerDash") # CRAN version @@ -23,30 +32,41 @@ install.packages("tablerDash") ## Demo -`{tablerDash}` works on all the RStudio products. See a demo [on shinyapps.io](https://dgranjon.shinyapps.io/tablerDashDemo/). - +`{tablerDash}` works on all the RStudio products. See a demo [on +shinyapps.io](https://dgranjon.shinyapps.io/tablerDashDemo/).
+
+ +
+

+
+ +
+

- ## Issues -Issues are listed [here](https://github.com/RinteRface/tablerDash/issues). +Issues are listed +[here](https://github.com/RinteRface/tablerDash/issues). ## Code of Conduct - - Please note that the tablerDash project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms. + +Please note that the tablerDash project is released with a [Contributor +Code of +Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html). +By contributing to this project, you agree to abide by its terms. diff --git a/_pkgdown.yml b/_pkgdown.yml index c33ab58..d0ba2ca 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -1,3 +1,8 @@ +template: + bootstrap: 5 + +url: https://rinterface.github.io/tablerDash/ + reference: - title: Basic dashboard functions desc: Dashboard skeleton functions @@ -56,10 +61,6 @@ reference: contents: - '`tablerDashGallery`' -template: - params: - bootswatch: journal - navbar: structure: left: diff --git a/cran-comments.md b/cran-comments.md index 6dacaca..cee4d1b 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,19 +1,8 @@ ## Test environments -* local OS X install, R 3.4.4 -* ubuntu 14.04 (on travis-ci), R 3.4.4 +* local OS X install, R 4.2.2 +* Rhub * win-builder (devel and release) ## R CMD check results 0 errors | 0 warnings | 1 note - -* This is a new release. - -Possibly mis-spelled words in DESCRIPTION: - Tabler (3:8, 11:33) - -This is a FALSE positive, there is no mis-spelled word - -## Re submission -- I wrote package names, software names and API names in single quotes (e.g. 'Tabler') in Title and Description. -- I enlarged the description diff --git a/docs/authors.html b/docs/authors.html index 5611932..b499026 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -1,161 +1,89 @@ - - - - - - +Authors and Citation • tablerDash + Skip to contents -Authors • tablerDash +
+
+
-
- - - - -
- +
+ - - - + diff --git a/docs/extra.css b/docs/extra.css index 433189f..3ddab74 100644 --- a/docs/extra.css +++ b/docs/extra.css @@ -17,3 +17,27 @@ .container { padding: 2px 16px; } + +/* bslib cards */ +.bslib-card{overflow:auto}.bslib-card .card-body+.card-body{padding-top:0}.bslib-card .card-body{overflow:auto}.bslib-card .card-body p{margin-top:0}.bslib-card .card-body p:last-child{margin-bottom:0}.bslib-card .card-body{max-height:var(--bslib-card-body-max-height, none)}.bslib-card[data-full-screen="true"]>.card-body{max-height:var(--bslib-card-body-max-height-full-screen, none)}.bslib-card .card-header .form-group{margin-bottom:0}.bslib-card .card-header .selectize-control{margin-bottom:0}.bslib-card .card-header .selectize-control .item{margin-right:1.15rem}.bslib-card .card-footer{margin-top:auto}.bslib-card .bslib-navs-card-title{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center}.bslib-card .bslib-navs-card-title .nav{margin-left:auto}.bslib-card .bslib-sidebar-layout:not([data-bslib-sidebar-border="true"]){border:none}.bslib-card .bslib-sidebar-layout:not([data-bslib-sidebar-border-radius="true"]){border-top-left-radius:0;border-top-right-radius:0}[data-full-screen="true"]{position:fixed;inset:3.5rem 1rem 1rem;height:auto !important;max-height:none !important;width:auto !important;z-index:1070}.bslib-full-screen-enter{display:none;position:absolute;bottom:var(--bslib-full-screen-enter-bottom, 0.2rem);right:var(--bslib-full-screen-enter-right, 0);top:var(--bslib-full-screen-enter-top);left:var(--bslib-full-screen-enter-left);color:var(--bslib-color-fg, var(--bs-card-color));background-color:var(--bslib-color-bg, var(--bs-card-bg, var(--bs-body-bg)));border:var(--bs-card-border-width) solid var(--bslib-color-fg, var(--bs-card-border-color));box-shadow:0 2px 4px rgba(0,0,0,0.15);margin:0.2rem 0.4rem;padding:0.55rem !important;font-size:.8rem;cursor:pointer;opacity:0.7;z-index:1070}.bslib-full-screen-enter:hover{opacity:1}.card[data-full-screen="false"]:hover>*>.bslib-full-screen-enter{display:block}.bslib-has-full-screen .card:hover>*>.bslib-full-screen-enter{display:none}@media (max-width: 575.98px){.bslib-full-screen-enter{display:none !important}}.bslib-full-screen-exit{position:relative;top:1.35rem;font-size:0.9rem;cursor:pointer;text-decoration:none;display:flex;float:right;margin-right:2.15rem;align-items:center;color:rgba(var(--bs-body-bg-rgb), 0.8)}.bslib-full-screen-exit:hover{color:rgba(var(--bs-body-bg-rgb), 1)}.bslib-full-screen-exit svg{margin-left:0.5rem;font-size:1.5rem}#bslib-full-screen-overlay{position:fixed;inset:0;background-color:rgba(var(--bs-body-color-rgb), 0.6);backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px);z-index:1069;animation:bslib-full-screen-overlay-enter 400ms cubic-bezier(0.6, 0.02, 0.65, 1) forwards}@keyframes bslib-full-screen-overlay-enter{0%{opacity:0}100%{opacity:1}} + +/* fill css for fullscreen cards */ +.html-fill-container { + display: flex; + flex-direction: column; + /* Prevent the container from expanding vertically or horizontally beyond its + parent's constraints. */ + min-height: 0; + min-width: 0; +} +.html-fill-container > .html-fill-item { + /* Fill items can grow and shrink freely within + available vertical space in fillable container */ + flex: 1 1 auto; + min-height: 0; + min-width: 0; +} +.html-fill-container > :not(.html-fill-item) { + /* Prevent shrinking or growing of non-fill items */ + flex: 0 0 auto; +} \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 1a7f8d0..561341c 100644 --- a/docs/index.html +++ b/docs/index.html @@ -4,183 +4,174 @@ - + Tabler API for Shiny • tablerDash - - - - - - - - - + + + + + + + + - -
-
-
-
- +
+
+
+ +

Tabler dashboard template for shiny with Bootstrap 4

-

See https://tabler.io for the original template.

-
-

-Installation

+

See https://tabler.io for the original template.

+
+

Installation +

This package is on CRAN:

-# latest devel version
-devtools::install_github("RinteRface/tablerDash")
-# CRAN version
-install.packages("tablerDash")
-
-
-

-Demo

-

tablerDash works on all the RStudio products. See a demo on shinyapps.io.

+# latest devel version +devtools::install_github("RinteRface/tablerDash") +# CRAN version +install.packages("tablerDash")
+
+
+

Demo +

+

tablerDash works on all the RStudio products.

+
+
+ +
+ +
+

+ +

+
+
+
+
-

+


-

+


-
-

-Issues

-

Issues are listed here.

+
+

Issues +

+

Issues are listed here.

-
-

-Code of Conduct

-

Please note that the tablerDash project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

+
+

Code of Conduct +

+

Please note that the tablerDash project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

-
- -
-
- + + diff --git a/docs/news/index.html b/docs/news/index.html index 73e88bd..ff8b910 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -1,168 +1,69 @@ - - - - - - +Changelog • tablerDash + Skip to contents -Changelog • tablerDash +
+
+
+
+

tablerDash 0.1.5.9000

+
+

Documentation

+
  • Upgrade pkgdown setup.
  • +
  • Added shinylive support.
  • +
+
+

Bug Fix

+
  • Resizing a tablerCard() triggers the shown javascript event, telling shiny to update the size of the contained object.
  • +
+
+

tablerDash 0.1.0

CRAN release: 2019-03-08

+
  • first release
  • +
+
-
- +
+ - - - + diff --git a/docs/pkgdown.js b/docs/pkgdown.js index 7e7048f..9757bf9 100644 --- a/docs/pkgdown.js +++ b/docs/pkgdown.js @@ -2,85 +2,45 @@ (function($) { $(function() { - $('.navbar-fixed-top').headroom(); + $('nav.navbar').headroom(); - $('body').css('padding-top', $('.navbar').height() + 10); - $(window).resize(function(){ - $('body').css('padding-top', $('.navbar').height() + 10); + Toc.init({ + $nav: $("#toc"), + $scope: $("main h2, main h3, main h4, main h5, main h6") }); - $('[data-toggle="tooltip"]').tooltip(); - - var cur_path = paths(location.pathname); - var links = $("#navbar ul li a"); - var max_length = -1; - var pos = -1; - for (var i = 0; i < links.length; i++) { - if (links[i].getAttribute("href") === "#") - continue; - // Ignore external links - if (links[i].host !== location.host) - continue; - - var nav_path = paths(links[i].pathname); - - var length = prefix_length(nav_path, cur_path); - if (length > max_length) { - max_length = length; - pos = i; - } - } - - // Add class to parent
  • , and enclosing
  • if in dropdown - if (pos >= 0) { - var menu_anchor = $(links[pos]); - menu_anchor.parent().addClass("active"); - menu_anchor.closest("li.dropdown").addClass("active"); - } - }); - - function paths(pathname) { - var pieces = pathname.split("/"); - pieces.shift(); // always starts with / - - var end = pieces[pieces.length - 1]; - if (end === "index.html" || end === "") - pieces.pop(); - return(pieces); - } - - // Returns -1 if not found - function prefix_length(needle, haystack) { - if (needle.length > haystack.length) - return(-1); - - // Special case for length-0 haystack, since for loop won't run - if (haystack.length === 0) { - return(needle.length === 0 ? 0 : -1); + if ($('#toc').length) { + $('body').scrollspy({ + target: '#toc', + offset: $("nav.navbar").outerHeight() + 1 + }); } - for (var i = 0; i < haystack.length; i++) { - if (needle[i] != haystack[i]) - return(i); - } + // Activate popovers + $('[data-bs-toggle="popover"]').popover({ + container: 'body', + html: true, + trigger: 'focus', + placement: "top", + sanitize: false, + }); - return(haystack.length); - } + $('[data-bs-toggle="tooltip"]').tooltip(); /* Clipboard --------------------------*/ function changeTooltipMessage(element, msg) { - var tooltipOriginalTitle=element.getAttribute('data-original-title'); - element.setAttribute('data-original-title', msg); + var tooltipOriginalTitle=element.getAttribute('data-bs-original-title'); + element.setAttribute('data-bs-original-title', msg); $(element).tooltip('show'); - element.setAttribute('data-original-title', tooltipOriginalTitle); + element.setAttribute('data-bs-original-title', tooltipOriginalTitle); } if(ClipboardJS.isSupported()) { $(document).ready(function() { - var copyButton = ""; + var copyButton = ""; - $(".examples, div.sourceCode").addClass("hasCopyButton"); + $("div.sourceCode").addClass("hasCopyButton"); // Insert copy buttons: $(copyButton).prependTo(".hasCopyButton"); @@ -89,20 +49,106 @@ $('.btn-copy-ex').tooltip({container: 'body'}); // Initialize clipboard: - var clipboardBtnCopies = new ClipboardJS('[data-clipboard-copy]', { + var clipboard = new ClipboardJS('[data-clipboard-copy]', { text: function(trigger) { - return trigger.parentNode.textContent; + return trigger.parentNode.textContent.replace(/\n#>[^\n]*/g, ""); } }); - clipboardBtnCopies.on('success', function(e) { + clipboard.on('success', function(e) { changeTooltipMessage(e.trigger, 'Copied!'); e.clearSelection(); }); - clipboardBtnCopies.on('error', function() { + clipboard.on('error', function(e) { changeTooltipMessage(e.trigger,'Press Ctrl+C or Command+C to copy'); }); + }); } + + /* Search marking --------------------------*/ + var url = new URL(window.location.href); + var toMark = url.searchParams.get("q"); + var mark = new Mark("main#main"); + if (toMark) { + mark.mark(toMark, { + accuracy: { + value: "complementary", + limiters: [",", ".", ":", "/"], + } + }); + } + + /* Search --------------------------*/ + /* Adapted from https://github.com/rstudio/bookdown/blob/2d692ba4b61f1e466c92e78fd712b0ab08c11d31/inst/resources/bs4_book/bs4_book.js#L25 */ + // Initialise search index on focus + var fuse; + $("#search-input").focus(async function(e) { + if (fuse) { + return; + } + + $(e.target).addClass("loading"); + var response = await fetch($("#search-input").data("search-index")); + var data = await response.json(); + + var options = { + keys: ["what", "text", "code"], + ignoreLocation: true, + threshold: 0.1, + includeMatches: true, + includeScore: true, + }; + fuse = new Fuse(data, options); + + $(e.target).removeClass("loading"); + }); + + // Use algolia autocomplete + var options = { + autoselect: true, + debug: true, + hint: false, + minLength: 2, + }; + var q; +async function searchFuse(query, callback) { + await fuse; + + var items; + if (!fuse) { + items = []; + } else { + q = query; + var results = fuse.search(query, { limit: 20 }); + items = results + .filter((x) => x.score <= 0.75) + .map((x) => x.item); + if (items.length === 0) { + items = [{dir:"Sorry 😿",previous_headings:"",title:"No results found.",what:"No results found.",path:window.location.href}]; + } + } + callback(items); +} + $("#search-input").autocomplete(options, [ + { + name: "content", + source: searchFuse, + templates: { + suggestion: (s) => { + if (s.title == s.what) { + return `${s.dir} >
    ${s.title}
    `; + } else if (s.previous_headings == "") { + return `${s.dir} >
    ${s.title}
    > ${s.what}`; + } else { + return `${s.dir} >
    ${s.title}
    > ${s.previous_headings} > ${s.what}`; + } + }, + }, + }, + ]).on('autocomplete:selected', function(event, s) { + window.location.href = s.path + "?q=" + q + "#" + s.id; + }); + }); })(window.jQuery || window.$) diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index ca8b92a..10fe0fd 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -1,6 +1,8 @@ -pandoc: 2.14.0.3 -pkgdown: 1.6.1 +pandoc: '3.2' +pkgdown: 2.1.0 pkgdown_sha: ~ articles: {} -last_built: 2021-11-15T16:22Z - +last_built: 2024-09-26T16:02Z +urls: + reference: https://rinterface.github.io/tablerDash/reference + article: https://rinterface.github.io/tablerDash/articles diff --git a/docs/reference/index.html b/docs/reference/index.html index 3c7f783..c6ab7a3 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -1,432 +1,317 @@ - - - - - - +Package index • tablerDash + Skip to contents -Function reference • tablerDash +
    +
    +
    +
    +

    Basic dashboard functions

    +

    Dashboard skeleton functions

    - - - +
    - - - +
    - + tablerDashPage() +
    +
    Create a Boostrap 4 dashboard page
    +
    + tablerDashNav() - +
    +
    Create a Boostrap 4 dashboard navbar
    +
    - -
    -
    - - - - -
    +
    +
    Create a Boostrap 4 dashboard body
    +
    -
    -
    - + tablerDashFooter() - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Basic dashboard functions

    -

    Dashboard skeleton functions

    -
    -

    tablerDashPage()

    -

    Create a Boostrap 4 dashboard page

    -

    tablerDashNav()

    -

    Create a Boostrap 4 dashboard navbar

    -

    tablerDashBody()

    -

    Create a Boostrap 4 dashboard body

    -

    tablerDashFooter()

    -

    Create a Boostrap 4 dashboard footer

    -

    Body content functions

    -

    Functions that are to be used in the tablerDashBody

    -
    -

    tablerTabItems()

    -

    A container for tab items

    -

    tablerTabItem()

    -

    One tab to put inside a tab items container

    -

    Navbar Content functions

    -

    Functions that are to be used in the tablerDashNav

    -
    -

    tablerDropdown()

    -

    Create a Boostrap 4 dashboard dropdown container

    -

    tablerDropdownItem()

    -

    Create a Boostrap 4 dashboard dropdown container

    -

    tablerNavMenu()

    -

    Create a Boostrap 4 dashboard navbar menu

    -

    tablerNavMenuItem()

    -

    Create a Boostrap 4 dashboard navbar menu item

    -

    Cards

    -

    Build cards

    -
    -

    tablerBlogCard()

    -

    Create a Boostrap 4 blog card

    -

    tablerCard()

    -

    Create a Boostrap 4 card

    -

    tablerInfoCard()

    -

    Create a Boostrap 4 info card

    -

    tablerMediaCard()

    -

    Create a Boostrap 4 media card

    -

    tablerProfileCard()

    -

    Create a Boostrap 4 profile card

    -

    tablerStatCard()

    -

    Create a Boostrap 4 stat card

    -

    Other bs4 items

    -

    To better customize your app

    -
    -

    tablerAlert()

    -

    Create a Boostrap 4 alert

    -

    tablerAvatar()

    -

    Create a Boostrap 4 avatar

    -

    tablerAvatarList()

    -

    Create a Boostrap 4 avatar list

    -

    tablerIcon()

    -

    Create a Boostrap 4 icon

    -

    tablerList()

    -

    Create a Boostrap 4 list container

    -

    tablerListItem()

    -

    Create a Boostrap 4 list item

    -

    tablerProgress()

    -

    Create a Boostrap 4 progress bar

    -

    tablerSocialLink()

    -

    Create a Boostrap 4 social link

    -

    tablerSocialLinks()

    -

    Create a Boostrap 4 social link list

    -

    tablerStatus()

    -

    Create a Boostrap 4 status

    -

    tablerTable()

    -

    Create a Boostrap 4 table container

    -

    tablerTableItem()

    -

    Create a Boostrap 4 table item

    -

    tablerTag()

    -

    Create a Boostrap 4 tag

    -

    tablerTagList()

    -

    Create a Boostrap 4 tag list

    -

    tablerTimeline()

    -

    Create a Boostrap 4 timeline

    -

    tablerTimelineItem()

    -

    Create a Boostrap 4 timeline item

    - -

    tablerDash showcase

    -
    -

    tablerDashGallery()

    -

    Launch the tablerDash Gallery

    -
    +
    +
    Create a Boostrap 4 dashboard footer
    +
    +

    Body content functions

    - -
    +

    Functions that are to be used in the tablerDashBody

    + + +
    + + + + +
    + + tablerTabItems() + +
    +
    A container for tab items
    +
    + + tablerTabItem() + +
    +
    One tab to put inside a tab items container
    +
    + + +

    Functions that are to be used in the tablerDashNav

    + + +
    + + + + +
    + + tablerDropdown() + +
    +
    Create a Boostrap 4 dashboard dropdown container
    +
    + + tablerDropdownItem() + +
    +
    Create a Boostrap 4 dashboard dropdown container
    +
    + + tablerNavMenu() + +
    +
    Create a Boostrap 4 dashboard navbar menu
    +
    + + tablerNavMenuItem() + +
    +
    Create a Boostrap 4 dashboard navbar menu item
    +
    +

    Cards

    + +

    Build cards

    + + +
    + + + + +
    + + tablerBlogCard() + +
    +
    Create a Boostrap 4 blog card
    +
    + + tablerCard() + +
    +
    Create a Boostrap 4 card
    +
    + + tablerInfoCard() + +
    +
    Create a Boostrap 4 info card
    +
    + + tablerMediaCard() + +
    +
    Create a Boostrap 4 media card
    +
    + + tablerProfileCard() + +
    +
    Create a Boostrap 4 profile card
    +
    + tablerStatCard() -
    -
    +
    Create a Boostrap 4 stat card
    +
    +

    Other bs4 items

    + +

    To better customize your app

    + + +
    + + + + +
    + + tablerAlert() + +
    +
    Create a Boostrap 4 alert
    +
    + + tablerAvatar() + +
    +
    Create a Boostrap 4 avatar
    +
    + + tablerAvatarList() + +
    +
    Create a Boostrap 4 avatar list
    +
    + + tablerIcon() + +
    +
    Create a Boostrap 4 icon
    +
    + + tablerList() + +
    +
    Create a Boostrap 4 list container
    +
    + + tablerListItem() + +
    +
    Create a Boostrap 4 list item
    +
    + + tablerProgress() + +
    +
    Create a Boostrap 4 progress bar
    +
    + + tablerSocialLink() + +
    +
    Create a Boostrap 4 social link
    +
    + + tablerSocialLinks() + +
    +
    Create a Boostrap 4 social link list
    +
    + + tablerStatus() + +
    +
    Create a Boostrap 4 status
    +
    + + tablerTable() + +
    +
    Create a Boostrap 4 table container
    +
    + + tablerTableItem() + +
    +
    Create a Boostrap 4 table item
    +
    + + tablerTag() + +
    +
    Create a Boostrap 4 tag
    +
    + + tablerTagList() + +
    +
    Create a Boostrap 4 tag list
    +
    + + tablerTimeline() + +
    +
    Create a Boostrap 4 timeline
    +
    + + tablerTimelineItem() + +
    +
    Create a Boostrap 4 timeline item
    +
    + + +

    tablerDash showcase

    + + +
    + + + + +
    + + tablerDashGallery() + +
    +
    Launch the tablerDash Gallery
    +
    +
    + + +
    -
    -

    Site built with pkgdown 1.6.1.

    + -
    -
  • +
    + - - - + diff --git a/docs/reference/tablerAlert.html b/docs/reference/tablerAlert.html index 61ea140..3780438 100644 --- a/docs/reference/tablerAlert.html +++ b/docs/reference/tablerAlert.html @@ -1,211 +1,122 @@ - - - - - - +Create a Boostrap 4 alert — tablerAlert • tablerDash + Skip to contents -Create a Boostrap 4 alert — tablerAlert • tablerDash +
    +
    +
    +
    +

    Build a tabler alert

    +
    - - +
    +

    Usage

    +
    tablerAlert(..., title = NULL, status, icon = NULL, closable = TRUE)
    +
    - - +
    +

    Arguments

    +
    ...
    +

    Alert content.

    - - - +
    title
    +

    Alert title.

    - +
    status
    +

    Alert status. See https://preview.tabler.io/docs/colors.html.

    - +
    icon
    +

    Alert icon.

    - -
    -
    - - - - -
    +
    closable
    +

    Whether to close the alert. TRUE by default.

    -
    -
    -
    +
    +

    Author

    +

    David Granjon, dgranjon@ymail.com

    -
    -

    Build a tabler alert

    +
    +

    Examples

    +
    if(interactive()){
    + library(shiny)
    + library(tablerDash)
    +
    + shiny::shinyApp(
    +   ui = tablerDashPage(
    +    navbar = NULL,
    +    footer = NULL,
    +    title = "test",
    +    body = tablerDashBody(
    +     tablerAlert(
    +      title = "Alert",
    +      "Lorem ipsum dolor sit amet, consectetur
    +      adipisicing elit. Lorem ipsum dolor sit
    +      amet, consectetur adipisicing elit.
    +      Lorem ipsum dolor sit amet, consectetur
    +      adipisicing elit.",
    +      icon = "alert-triangle",
    +      status = "info"
    +     )
    +    )
    +   ),
    +   server = function(input, output) {}
    + )
    +}
    +
    +
    - -
    tablerAlert(..., title = NULL, status, icon = NULL, closable = TRUE)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - - - - - -
    ...

    Alert content.

    title

    Alert title.

    status

    Alert status. See https://preview.tabler.io/docs/colors.html.

    icon

    Alert icon.

    closable

    Whether to close the alert. TRUE by default.

    - -

    Author

    - -

    David Granjon, dgranjon@ymail.com

    - -

    Examples

    -
    if(interactive()){
    - library(shiny)
    - library(tablerDash)
    -
    - shiny::shinyApp(
    -   ui = tablerDashPage(
    -    navbar = NULL,
    -    footer = NULL,
    -    title = "test",
    -    body = tablerDashBody(
    -     tablerAlert(
    -      title = "Alert",
    -      "Lorem ipsum dolor sit amet, consectetur
    -      adipisicing elit. Lorem ipsum dolor sit
    -      amet, consectetur adipisicing elit.
    -      Lorem ipsum dolor sit amet, consectetur
    -      adipisicing elit.",
    -      icon = "alert-triangle",
    -      status = "info"
    -     )
    -    )
    -   ),
    -   server = function(input, output) {}
    - )
    -}
    -
    -
    -
    - -
    +
    -
    - +
    + - - - + diff --git a/docs/reference/tablerAvatar.html b/docs/reference/tablerAvatar.html index 722e053..88b4158 100644 --- a/docs/reference/tablerAvatar.html +++ b/docs/reference/tablerAvatar.html @@ -1,217 +1,127 @@ - - - - - - +Create a Boostrap 4 avatar — tablerAvatar • tablerDash + Skip to contents -Create a Boostrap 4 avatar — tablerAvatar • tablerDash +
    +
    +
    +
    +

    Build a tabler avatar

    +
    - - +
    +

    Usage

    +
    tablerAvatar(name = NULL, url = NULL, size = NULL, status = NULL, color = NULL)
    +
    - - +
    +

    Arguments

    +
    name
    +

    Avatar placeholder. If not NULL, url cannot be used.

    - - - +
    url
    +

    Avatar image if any. If not NULL, name cannot be used.

    - +
    size
    +

    Avatar size. NULL, "sm", "md", "lg", "xl" or "xxl".

    - +
    status
    +

    Avatar status. See https://preview.tabler.io/docs/colors.html +for valid statuses.

    - -
    -
    - - - - -
    +
    color
    +

    Avatar background color. See https://preview.tabler.io/docs/colors.html +for valid colors.

    -
    -
    -
    +
    +

    Author

    +

    David Granjon, dgranjon@ymail.com

    -
    -

    Build a tabler avatar

    +
    +

    Examples

    +
    if(interactive()){
    + library(shiny)
    + library(tablerDash)
    +
    + shiny::shinyApp(
    +   ui = tablerDashPage(
    +    navbar = NULL,
    +    footer = NULL,
    +    title = "test",
    +    body = tablerDashBody(
    +     tablerAvatar(
    +      name = "DG",
    +      size = "xxl"
    +     ),
    +     tablerAvatar(
    +      name = "DG",
    +      color = "orange"
    +     ),
    +     tablerAvatar(
    +      name = "DG",
    +      status = "warning"
    +     ),
    +     tablerAvatar(url = "https://image.flaticon.com/icons/svg/145/145852.svg")
    +    )
    +   ),
    +   server = function(input, output) {}
    + )
    +}
    +
    +
    - -
    tablerAvatar(name = NULL, url = NULL, size = NULL, status = NULL,
    -  color = NULL)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - - - - - -
    name

    Avatar placeholder. If not NULL, url cannot be used.

    url

    Avatar image if any. If not NULL, name cannot be used.

    size

    Avatar size. NULL, "sm", "md", "lg", "xl" or "xxl".

    status

    Avatar status. See https://preview.tabler.io/docs/colors.html -for valid statuses.

    color

    Avatar background color. See https://preview.tabler.io/docs/colors.html -for valid colors.

    - -

    Author

    - -

    David Granjon, dgranjon@ymail.com

    - -

    Examples

    -
    if(interactive()){
    - library(shiny)
    - library(tablerDash)
    -
    - shiny::shinyApp(
    -   ui = tablerDashPage(
    -    navbar = NULL,
    -    footer = NULL,
    -    title = "test",
    -    body = tablerDashBody(
    -     tablerAvatar(
    -      name = "DG",
    -      size = "xxl"
    -     ),
    -     tablerAvatar(
    -      name = "DG",
    -      color = "orange"
    -     ),
    -     tablerAvatar(
    -      name = "DG",
    -      status = "warning"
    -     ),
    -     tablerAvatar(url = "https://image.flaticon.com/icons/svg/145/145852.svg")
    -    )
    -   ),
    -   server = function(input, output) {}
    - )
    -}
    -
    -
    -
    - -
    +
    -
    - +
    + - - - + diff --git a/docs/reference/tablerAvatarList.html b/docs/reference/tablerAvatarList.html index 83ad837..2ede8b5 100644 --- a/docs/reference/tablerAvatarList.html +++ b/docs/reference/tablerAvatarList.html @@ -1,205 +1,116 @@ - - - - - - +Create a Boostrap 4 avatar list — tablerAvatarList • tablerDash + Skip to contents -Create a Boostrap 4 avatar list — tablerAvatarList • tablerDash +
    +
    +
    - - - +
    +

    Build a tabler avatar list

    +
    - +
    +

    Usage

    +
    tablerAvatarList(..., stacked = FALSE)
    +
    +
    +

    Arguments

    - +
    ...
    +

    Slot for tablerAvatar.

    - -
    -
    - - - - -
    +
    stacked
    +

    Whether to stack avatars. FALSE by default.

    -
    -
    -
    +
    +

    Author

    +

    David Granjon, dgranjon@ymail.com

    -
    -

    Build a tabler avatar list

    +
    +

    Examples

    +
    if(interactive()){
    + library(shiny)
    + library(tablerDash)
    +
    + shiny::shinyApp(
    +   ui = tablerDashPage(
    +    navbar = NULL,
    +    footer = NULL,
    +    title = "test",
    +    body = tablerDashBody(
    +     tablerAvatarList(
    +      stacked = TRUE,
    +      tablerAvatar(
    +       name = "DG",
    +       size = "xxl"
    +      ),
    +      tablerAvatar(
    +       name = "DG",
    +       color = "orange"
    +      ),
    +      tablerAvatar(
    +       name = "DG",
    +       status = "warning"
    +      ),
    +      tablerAvatar(url = "https://image.flaticon.com/icons/svg/145/145852.svg")
    +     )
    +    )
    +   ),
    +   server = function(input, output) {}
    + )
    +}
    +
    +
    +
    -
    tablerAvatarList(..., stacked = FALSE)
    - -

    Arguments

    - - - - - - - - - - -
    ...

    Slot for tablerAvatar.

    stacked

    Whether to stack avatars. FALSE by default.

    - -

    Author

    - -

    David Granjon, dgranjon@ymail.com

    - -

    Examples

    -
    if(interactive()){
    - library(shiny)
    - library(tablerDash)
    -
    - shiny::shinyApp(
    -   ui = tablerDashPage(
    -    navbar = NULL,
    -    footer = NULL,
    -    title = "test",
    -    body = tablerDashBody(
    -     tablerAvatarList(
    -      stacked = TRUE,
    -      tablerAvatar(
    -       name = "DG",
    -       size = "xxl"
    -      ),
    -      tablerAvatar(
    -       name = "DG",
    -       color = "orange"
    -      ),
    -      tablerAvatar(
    -       name = "DG",
    -       status = "warning"
    -      ),
    -      tablerAvatar(url = "https://image.flaticon.com/icons/svg/145/145852.svg")
    -     )
    -    )
    -   ),
    -   server = function(input, output) {}
    - )
    -}
    -
    -
    -
    - - - -
    - +
    + - - - + diff --git a/docs/reference/tablerBlogCard.html b/docs/reference/tablerBlogCard.html index 1814cb6..a4c4a13 100644 --- a/docs/reference/tablerBlogCard.html +++ b/docs/reference/tablerBlogCard.html @@ -1,231 +1,150 @@ - - - - - - +Create a Boostrap 4 blog card — tablerBlogCard • tablerDash + Skip to contents -Create a Boostrap 4 blog card — tablerBlogCard • tablerDash +
    +
    +
    +
    +

    Build a tabler blog card

    +
    +
    +

    Usage

    +
    tablerBlogCard(
    +  ...,
    +  title = NULL,
    +  author = NULL,
    +  date = NULL,
    +  href = NULL,
    +  src = NULL,
    +  avatarUrl = NULL,
    +  width = 4,
    +  horizontal = FALSE
    +)
    +
    - - +
    +

    Arguments

    - - +
    ...
    +

    Any other elements.

    +
    title
    +

    Title.

    - - - - +
    author
    +

    Blog post author.

    +
    date
    +

    Date.

    - - -
    -
    - - - - -
    -
    -
    - +
    src
    +

    Image url.

    -
    -

    Build a tabler blog card

    + +
    avatarUrl
    +

    Avatar image.

    + + +
    width
    +

    Card width. 4 by default.

    + + +
    horizontal
    +

    Whether the card is horizontally displayed. FALSE by default.

    + +
    +
    +

    Author

    +

    David Granjon, dgranjon@ymail.com

    -
    tablerBlogCard(..., title = NULL, author = NULL, date = NULL,
    -  href = NULL, src = NULL, avatarUrl = NULL, width = 4,
    -  horizontal = FALSE)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ...

    Any other elements.

    title

    Title.

    author

    Blog post author.

    date

    Date.

    href

    External link.

    src

    Image url.

    avatarUrl

    Avatar image.

    width

    Card width. 4 by default.

    horizontal

    Whether the card is horizontally displayed. FALSE by default.

    - -

    Author

    - -

    David Granjon, dgranjon@ymail.com

    - -

    Examples

    -
    if(interactive()){
    - library(shiny)
    - library(tablerDash)
    -
    - shiny::shinyApp(
    -   ui = tablerDashPage(
    -    navbar = NULL,
    -    footer = NULL,
    -    title = "test",
    -    body = tablerDashBody(
    -     tablerBlogCard(
    -      title = "Blog Card",
    -      author = "David",
    -      date = "Today",
    -      href = "https://www.google.com",
    -      src = "https://preview.tabler.io/demo/photos/matt-barrett-339981-500.jpg",
    -      avatarUrl = "https://image.flaticon.com/icons/svg/145/145842.svg",
    -      width = 6,
    -      "Look, my liege! The Knights Who Say Ni
    -      demand a sacrifice! …Are you suggesting
    -      that coconuts migr..."
    -     )
    -    )
    -   ),
    -   server = function(input, output) {}
    - )
    -}
    -
    -
    -
    - -
    +
    +

    Examples

    +
    if(interactive()){
    + library(shiny)
    + library(tablerDash)
    +
    + shiny::shinyApp(
    +   ui = tablerDashPage(
    +    navbar = NULL,
    +    footer = NULL,
    +    title = "test",
    +    body = tablerDashBody(
    +     tablerBlogCard(
    +      title = "Blog Card",
    +      author = "David",
    +      date = "Today",
    +      href = "https://www.google.com",
    +      src = "https://preview.tabler.io/demo/photos/matt-barrett-339981-500.jpg",
    +      avatarUrl = "https://image.flaticon.com/icons/svg/145/145842.svg",
    +      width = 6,
    +      "Look, my liege! The Knights Who Say Ni
    +      demand a sacrifice! …Are you suggesting
    +      that coconuts migr..."
    +     )
    +    )
    +   ),
    +   server = function(input, output) {}
    + )
    +}
    +
    +
    +
    + -
    - +
    + - - - + diff --git a/docs/reference/tablerCard.html b/docs/reference/tablerCard.html index e17be8e..3bee255 100644 --- a/docs/reference/tablerCard.html +++ b/docs/reference/tablerCard.html @@ -1,247 +1,168 @@ - - - - - - +Create a Boostrap 4 card — tablerCard • tablerDash + Skip to contents -Create a Boostrap 4 card — tablerCard • tablerDash +
    +
    +
    +
    +

    Build a tabler card

    +
    +
    +

    Usage

    +
    tablerCard(
    +  ...,
    +  title = NULL,
    +  options = NULL,
    +  footer = NULL,
    +  status = NULL,
    +  statusSide = c("top", "left"),
    +  collapsible = TRUE,
    +  collapsed = FALSE,
    +  closable = TRUE,
    +  zoomable = TRUE,
    +  width = 6,
    +  overflow = FALSE
    +)
    +
    - - +
    +

    Arguments

    - - +
    ...
    +

    Body content

    +
    title
    +

    Card title. If NULL, the header is not displayed.

    - - - - +
    options
    +

    Card extra header elements.

    + +

    Card footer. NULL by default. Not displayed if NULL.

    - - -
    -
    - - - - -
    -
    -
    - +
    statusSide
    +

    Status side: "top" or "left".

    -
    -

    Build a tabler card

    + +
    collapsible
    +

    Whether the card is collapsible. TRUE by default.

    + + +
    collapsed
    +

    Whether to collapse the card at start. FALSE by default.

    + + +
    closable
    +

    Whether the card is closable. TRUE by default.

    + + +
    zoomable
    +

    Whether the card is zoomable. TRUE by default.

    + + +
    width
    +

    Card width. 6 by default. See Bootstrap grid system. If NULL, the card is +full width.

    + + +
    overflow
    +

    Whether to set up a x and y overflow. FALSE by default. +Useful in case the card contains large tables.

    + +
    +
    +

    Author

    +

    David Granjon, dgranjon@ymail.com

    -
    tablerCard(..., title = NULL, options = NULL, footer = NULL,
    -  status = NULL, statusSide = c("top", "left"), collapsible = TRUE,
    -  collapsed = FALSE, closable = TRUE, zoomable = TRUE, width = 6,
    -  overflow = FALSE)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ...

    Body content

    title

    Card title. If NULL, the header is not displayed.

    options

    Card extra header elements.

    footer

    Card footer. NULL by default. Not displayed if NULL.

    status

    Card status. NULL by default. See https://preview.tabler.io/docs/colors.html for valid statuses.

    statusSide

    Status side: "top" or "left".

    collapsible

    Whether the card is collapsible. TRUE by default.

    collapsed

    Whether to collapse the card at start. FALSE by default.

    closable

    Whether the card is closable. TRUE by default.

    zoomable

    Whether the card is zoomable. TRUE by default.

    width

    Card width. 6 by default. See Bootstrap grid system. If NULL, the card is -full width.

    overflow

    Whether to set up a x and y overflow. FALSE by default. -Useful in case the card contains large tables.

    - -

    Author

    - -

    David Granjon, dgranjon@ymail.com

    - -

    Examples

    -
    if(interactive()){
    - library(shiny)
    - library(tablerDash)
    -
    - shiny::shinyApp(
    -   ui = tablerDashPage(
    -    navbar = NULL,
    -    footer = NULL,
    -    title = "test",
    -    body = tablerDashBody(
    -     tablerCard(
    -      title = "Card",
    -      sliderInput("obs", "Number of observations:",
    -      min = 0, max = 1000, value = 500
    -      ),
    -      plotOutput("distPlot"),
    -      status = "success",
    -      statusSide = "left"
    -     )
    -    )
    -   ),
    -   server = function(input, output) {
    -   output$distPlot <- renderPlot({
    -    hist(rnorm(input$obs))
    -   })
    -  }
    - )
    -}
    -
    -
    -
    - -
    +
    +

    Examples

    +
    if(interactive()){
    + library(shiny)
    + library(tablerDash)
    +
    + shiny::shinyApp(
    +   ui = tablerDashPage(
    +    navbar = NULL,
    +    footer = NULL,
    +    title = "test",
    +    body = tablerDashBody(
    +     tablerCard(
    +      title = "Card",
    +      sliderInput("obs", "Number of observations:",
    +      min = 0, max = 1000, value = 500
    +      ),
    +      plotOutput("distPlot"),
    +      status = "success",
    +      statusSide = "left"
    +     )
    +    )
    +   ),
    +   server = function(input, output) {
    +   output$distPlot <- renderPlot({
    +    hist(rnorm(input$obs))
    +   })
    +  }
    + )
    +}
    +
    +
    +
    + -
    - +
    + - - - + diff --git a/docs/reference/tablerDashBody.html b/docs/reference/tablerDashBody.html index 7637c45..3092152 100644 --- a/docs/reference/tablerDashBody.html +++ b/docs/reference/tablerDashBody.html @@ -1,167 +1,76 @@ - - - - - - +Create a Boostrap 4 dashboard body — tablerDashBody • tablerDash + Skip to contents -Create a Boostrap 4 dashboard body — tablerDashBody • tablerDash +
    +
    +
    -
    - +
    + - - - + diff --git a/docs/reference/tablerDashFooter.html b/docs/reference/tablerDashFooter.html index 63b61ce..7eca1f3 100644 --- a/docs/reference/tablerDashFooter.html +++ b/docs/reference/tablerDashFooter.html @@ -1,171 +1,80 @@ - - - - - - +Create a Boostrap 4 dashboard footer — tablerDashFooter • tablerDash + Skip to contents -Create a Boostrap 4 dashboard footer — tablerDashFooter • tablerDash +
    +
    +
    -
    - +
    + - - - + diff --git a/docs/reference/tablerDashGallery.html b/docs/reference/tablerDashGallery.html index d2e56a8..06335d7 100644 --- a/docs/reference/tablerDashGallery.html +++ b/docs/reference/tablerDashGallery.html @@ -1,164 +1,74 @@ - - - - - - +Launch the tablerDash Gallery — tablerDashGallery • tablerDash + Skip to contents -Launch the tablerDash Gallery — tablerDashGallery • tablerDash +
    -
    - +
    +

    Examples

    +
    
    +if (interactive()) {
    +
    + tablerDashGallery()
    +
    +}
    +
    +
    +
    -
    - +
    + - - - + diff --git a/docs/reference/tablerDashNav.html b/docs/reference/tablerDashNav.html index 6fc839e..2fae450 100644 --- a/docs/reference/tablerDashNav.html +++ b/docs/reference/tablerDashNav.html @@ -1,179 +1,88 @@ - - - - - - +Create a Boostrap 4 dashboard navbar — tablerDashNav • tablerDash + Skip to contents -Create a Boostrap 4 dashboard navbar — tablerDashNav • tablerDash +
    +
    +
    +
    +

    Build a tabler dashboard page

    +
    - - +
    +

    Usage

    +
    tablerDashNav(id, ..., src = NULL, navMenu = NULL)
    +
    - - +
    +

    Arguments

    +
    id
    +

    Navbar id.

    - - - +
    ...
    +

    Navbar content.

    - +
    src
    +

    Brand image url or path.

    - +
    navMenu
    +

    Slot for tablerNavMenu

    - -
    -
    -
    +
    +

    Author

    +

    David Granjon, dgranjon@ymail.com

    - -
    -
    - - - - +
    -
    -
    - -
    -

    Build a tabler dashboard page

    -
    - -
    tablerDashNav(id, ..., src = NULL, navMenu = NULL)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - -
    id

    Navbar id.

    ...

    Navbar content.

    src

    Brand image url or path.

    navMenu

    Slot for tablerNavMenu

    - -

    Author

    - -

    David Granjon, dgranjon@ymail.com

    - -
    - -
    - - -
    - +
    + - - - + diff --git a/docs/reference/tablerDashPage.html b/docs/reference/tablerDashPage.html index eec951b..6209df6 100644 --- a/docs/reference/tablerDashPage.html +++ b/docs/reference/tablerDashPage.html @@ -1,205 +1,122 @@ - - - - - - +Create a Boostrap 4 dashboard page — tablerDashPage • tablerDash + Skip to contents -Create a Boostrap 4 dashboard page — tablerDashPage • tablerDash +
    +
    +
    +
    +

    Build a tabler dashboard page

    +
    +
    +

    Usage

    +
    tablerDashPage(
    +  navbar = NULL,
    +  body = NULL,
    +  footer = NULL,
    +  title = NULL,
    +  enable_preloader = FALSE,
    +  loading_duration = 2
    +)
    +
    - - +
    +

    Arguments

    - - +
    navbar
    +

    Slot for tablerDashNav.

    +
    body
    +

    Slot for tablerDashBody.

    - - - - + +

    Slot for tablerDashFooter.

    +
    title
    +

    App title.

    - - -
    -
    - - - - -
    -
    -
    - +
    loading_duration
    +

    Loader duration in seconds. 2s by default.

    -
    -

    Build a tabler dashboard page

    +
    +
    +

    Author

    +

    David Granjon, dgranjon@ymail.com

    -
    tablerDashPage(navbar = NULL, body = NULL, footer = NULL,
    -  title = NULL, enable_preloader = FALSE, loading_duration = 2)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    navbar

    Slot for tablerDashNav.

    body

    Slot for tablerDashBody.

    footer

    Slot for tablerDashFooter.

    title

    App title.

    enable_preloader

    Whether to enable a page loader. FALSE by default.

    loading_duration

    Loader duration in seconds. 2s by default.

    - -

    Author

    - -

    David Granjon, dgranjon@ymail.com

    - -

    Examples

    -
    if(interactive()){
    - library(shiny)
    - library(tablerDash)
    -
    - shiny::shinyApp(
    -   ui = tablerDashPage(
    -    navbar = tablerDashNav(),
    -    footer = tablerDashFooter(),
    -    title = "test",
    -    body = tablerDashBody()
    -   ),
    -   server = function(input, output) {}
    - )
    -}
    -
    -
    -
    - -
    +
    +

    Examples

    +
    if(interactive()){
    + library(shiny)
    + library(tablerDash)
    +
    + shiny::shinyApp(
    +   ui = tablerDashPage(
    +    navbar = tablerDashNav(),
    +    footer = tablerDashFooter(),
    +    title = "test",
    +    body = tablerDashBody()
    +   ),
    +   server = function(input, output) {}
    + )
    +}
    +
    +
    +
    + -
    - +
    + - - - + diff --git a/docs/reference/tablerDropDown.html b/docs/reference/tablerDropDown.html index 6d8f865..7a13dd1 100644 --- a/docs/reference/tablerDropDown.html +++ b/docs/reference/tablerDropDown.html @@ -1,172 +1,84 @@ - - - - - - +Create a Boostrap 4 dashboard dropdown container — tablerDropdown • tablerDash + Skip to contents -Create a Boostrap 4 dashboard dropdown container — tablerDropdown • tablerDash +
    +
    +
    +
    +

    Build a tabler dashboard dropdown container

    +
    - - - +
    +

    Usage

    +
    tablerDropdown(..., icon = "bell", collapsed = TRUE)
    +
    - +
    +

    Arguments

    +
    ...
    +

    Slot for tablerDropdownItem.

    - - -
    -
    - - - - -
    -
    -
    - +
    collapsed
    +

    Whether to collapse the dropdown. TRUE by default.

    -
    -

    Build a tabler dashboard dropdown container

    +
    +
    +

    Author

    +

    David Granjon, dgranjon@ymail.com

    -
    tablerDropdown(..., icon = "bell", collapsed = TRUE)
    - -

    Arguments

    - - - - - - - - - - - - - - -
    ...

    Slot for tablerDropdownItem.

    icon

    Dropdown icon.

    collapsed

    Whether to collapse the dropdown. TRUE by default.

    +
    -
    - - - - -
    - +
    + - - - + diff --git a/docs/reference/tablerDropdownItem.html b/docs/reference/tablerDropdownItem.html index 1367f92..990eca9 100644 --- a/docs/reference/tablerDropdownItem.html +++ b/docs/reference/tablerDropdownItem.html @@ -1,188 +1,103 @@ - - - - - - +Create a Boostrap 4 dashboard dropdown container — tablerDropdownItem • tablerDash + Skip to contents -Create a Boostrap 4 dashboard dropdown container — tablerDropdownItem • tablerDash +
    +
    +
    +
    +

    Build a tabler dashboard dropdown container

    +
    +
    +

    Usage

    +
    tablerDropdownItem(
    +  ...,
    +  title = NULL,
    +  href = NULL,
    +  url = NULL,
    +  status = NULL,
    +  date = NULL
    +)
    +
    - - +
    +

    Arguments

    - - +
    ...
    +

    Item content.

    +
    title
    +

    Item title.

    - - - - +
    href
    +

    External link.

    +
    url
    +

    Author image.

    - - -
    -
    - - - - -
    -
    -
    - +
    date
    +

    Item date.

    -
    -

    Build a tabler dashboard dropdown container

    +
    +
    +

    Author

    +

    David Granjon, dgranjon@ymail.com

    -
    tablerDropdownItem(..., title = NULL, href = NULL, url = NULL,
    -  status = NULL, date = NULL)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ...

    Item content.

    title

    Item title.

    href

    External link.

    url

    Author image.

    status

    Item status. Only if url is not NULL.

    date

    Item date.

    - -

    Author

    - -

    David Granjon, dgranjon@ymail.com

    - -
    - -
    + -
    - +
    + - - - + diff --git a/docs/reference/tablerIcon.html b/docs/reference/tablerIcon.html index 30e87fb..9c3f228 100644 --- a/docs/reference/tablerIcon.html +++ b/docs/reference/tablerIcon.html @@ -1,171 +1,80 @@ - - - - - - +Create a Boostrap 4 icon — tablerIcon • tablerDash + Skip to contents -Create a Boostrap 4 icon — tablerIcon • tablerDash +
    +
    +
    -
    - +
    + - - - + diff --git a/docs/reference/tablerInfoCard.html b/docs/reference/tablerInfoCard.html index 0e89ea2..3ebd25d 100644 --- a/docs/reference/tablerInfoCard.html +++ b/docs/reference/tablerInfoCard.html @@ -1,212 +1,122 @@ - - - - - - +Create a Boostrap 4 info card — tablerInfoCard • tablerDash + Skip to contents -Create a Boostrap 4 info card — tablerInfoCard • tablerDash +
    +
    +
    +
    +

    Build a tabler info card

    +
    +
    +

    Usage

    +
    tablerInfoCard(value, description = NULL, status, icon, href = NULL, width = 4)
    +
    - - +
    +

    Arguments

    - - +
    value
    +

    Card value.

    +
    description
    +

    Percentage increase/decrease.

    - - - - +
    status
    +

    Card status. See https://preview.tabler.io/docs/colors.html.

    +
    icon
    +

    Card icon.

    - - -
    -
    - - - - -
    -
    -
    - +
    width
    +

    Card width. 4 by default.

    -
    -

    Build a tabler info card

    +
    +
    +

    Author

    +

    David Granjon, dgranjon@ymail.com

    -
    tablerInfoCard(value, description = NULL, status, icon, href = NULL,
    -  width = 4)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    value

    Card value.

    description

    Percentage increase/decrease.

    status

    Card status. See https://preview.tabler.io/docs/colors.html.

    icon

    Card icon.

    href

    External link.

    width

    Card width. 4 by default.

    - -

    Author

    - -

    David Granjon, dgranjon@ymail.com

    - -

    Examples

    -
    if(interactive()){
    - library(shiny)
    - library(tablerDash)
    -
    - shiny::shinyApp(
    -   ui = tablerDashPage(
    -    navbar = NULL,
    -    footer = NULL,
    -    title = "test",
    -    body = tablerDashBody(
    -     tablerInfoCard(
    -      value = "132 sales",
    -      status = "danger",
    -      icon = "dollar-sign",
    -      description = "12 waiting payments"
    -     )
    -    )
    -   ),
    -   server = function(input, output) {}
    - )
    -}
    -
    -
    -
    - -
    +
    +

    Examples

    +
    if(interactive()){
    + library(shiny)
    + library(tablerDash)
    +
    + shiny::shinyApp(
    +   ui = tablerDashPage(
    +    navbar = NULL,
    +    footer = NULL,
    +    title = "test",
    +    body = tablerDashBody(
    +     tablerInfoCard(
    +      value = "132 sales",
    +      status = "danger",
    +      icon = "dollar-sign",
    +      description = "12 waiting payments"
    +     )
    +    )
    +   ),
    +   server = function(input, output) {}
    + )
    +}
    +
    +
    +
    + -
    - +
    + - - - + diff --git a/docs/reference/tablerList.html b/docs/reference/tablerList.html index 7b93d40..29963ea 100644 --- a/docs/reference/tablerList.html +++ b/docs/reference/tablerList.html @@ -1,214 +1,125 @@ - - - - - - +Create a Boostrap 4 list container — tablerList • tablerDash + Skip to contents -Create a Boostrap 4 list container — tablerList • tablerDash +
    +
    +
    +
    +

    Build a tabler list container

    +
    +
    +

    Usage

    +
    tablerList(...)
    +
    - +
    +

    Arguments

    - -
    -
    - - - - -
    +
    ...
    +

    Slot for tablerListItem.

    -
    -
    -
    +
    +

    Author

    +

    David Granjon, dgranjon@ymail.com

    -
    -

    Build a tabler list container

    +
    +

    Examples

    +
    if(interactive()){
    + library(shiny)
    + library(tablerDash)
    +
    + shiny::shinyApp(
    +   ui = tablerDashPage(
    +    navbar = NULL,
    +    footer = NULL,
    +    title = "test",
    +    body = tablerDashBody(
    +      tablerCard(
    +       title = "tablerList",
    +       tablerList(
    +       tablerListItem(
    +        tablerTag(name = "Tag"),
    +        tablerTag(name = "Tag", href = "https://www.google.com"),
    +        tablerTag(name = "Tag", rounded = TRUE, color = "pink")
    +       ),
    +       tablerListItem(tablerStatus(color = "red")),
    +       tablerListItem(
    +        tablerAvatarList(
    +         stacked = TRUE,
    +         tablerAvatar(
    +           name = "DG",
    +           size = "xxl"
    +         ),
    +         tablerAvatar(
    +           name = "DG",
    +           color = "orange"
    +         ),
    +         tablerAvatar(
    +           name = "DG",
    +           status = "warning"
    +         ),
    +         tablerAvatar(url = "https://image.flaticon.com/icons/svg/145/145852.svg")
    +         )
    +        )
    +       )
    +      )
    +     )
    +   ),
    +   server = function(input, output) {}
    + )
    +}
    +
    +
    +
    -
    tablerList(...)
    - -

    Arguments

    - - - - - - -
    ...

    Slot for tablerListItem.

    - -

    Author

    - -

    David Granjon, dgranjon@ymail.com

    - -

    Examples

    -
    if(interactive()){
    - library(shiny)
    - library(tablerDash)
    -
    - shiny::shinyApp(
    -   ui = tablerDashPage(
    -    navbar = NULL,
    -    footer = NULL,
    -    title = "test",
    -    body = tablerDashBody(
    -      tablerCard(
    -       title = "tablerList",
    -       tablerList(
    -       tablerListItem(
    -        tablerTag(name = "Tag"),
    -        tablerTag(name = "Tag", href = "https://www.google.com"),
    -        tablerTag(name = "Tag", rounded = TRUE, color = "pink")
    -       ),
    -       tablerListItem(tablerStatus(color = "red")),
    -       tablerListItem(
    -        tablerAvatarList(
    -         stacked = TRUE,
    -         tablerAvatar(
    -           name = "DG",
    -           size = "xxl"
    -         ),
    -         tablerAvatar(
    -           name = "DG",
    -           color = "orange"
    -         ),
    -         tablerAvatar(
    -           name = "DG",
    -           status = "warning"
    -         ),
    -         tablerAvatar(url = "https://image.flaticon.com/icons/svg/145/145852.svg")
    -         )
    -        )
    -       )
    -      )
    -     )
    -   ),
    -   server = function(input, output) {}
    - )
    -}
    -
    -
    -
    - - - -
    - +
    + - - - + diff --git a/docs/reference/tablerListItem.html b/docs/reference/tablerListItem.html index 004ddde..d092129 100644 --- a/docs/reference/tablerListItem.html +++ b/docs/reference/tablerListItem.html @@ -1,167 +1,76 @@ - - - - - - +Create a Boostrap 4 list item — tablerListItem • tablerDash + Skip to contents -Create a Boostrap 4 list item — tablerListItem • tablerDash +
    +
    +
    -
    - +
    + - - - + diff --git a/docs/reference/tablerMediaCard.html b/docs/reference/tablerMediaCard.html index 28e7762..0a07207 100644 --- a/docs/reference/tablerMediaCard.html +++ b/docs/reference/tablerMediaCard.html @@ -1,218 +1,136 @@ - - - - - - +Create a Boostrap 4 media card — tablerMediaCard • tablerDash + Skip to contents -Create a Boostrap 4 media card — tablerMediaCard • tablerDash +
    +
    +
    +
    +

    Build a tabler media card

    +
    +
    +

    Usage

    +
    tablerMediaCard(
    +  ...,
    +  title = NULL,
    +  date = NULL,
    +  href = NULL,
    +  src = NULL,
    +  avatarUrl = NULL,
    +  width = 4
    +)
    +
    - - +
    +

    Arguments

    - - +
    ...
    +

    Any other elements.

    +
    title
    +

    Title.

    - - - - +
    date
    +

    Date.

    +
    href
    +

    External link.

    - - -
    -
    - - - - -
    -
    -
    - +
    avatarUrl
    +

    Avatar image.

    -
    -

    Build a tabler media card

    + +
    width
    +

    Card width. 4 by default.

    + +
    +
    +

    Author

    +

    David Granjon, dgranjon@ymail.com

    -
    tablerMediaCard(..., title = NULL, date = NULL, href = NULL,
    -  src = NULL, avatarUrl = NULL, width = 4)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ...

    Any other elements.

    title

    Title.

    date

    Date.

    href

    External link.

    src

    Image url.

    avatarUrl

    Avatar image.

    width

    Card width. 4 by default.

    - -

    Author

    - -

    David Granjon, dgranjon@ymail.com

    - -

    Examples

    -
    if(interactive()){
    - library(shiny)
    - library(tablerDash)
    -
    - shiny::shinyApp(
    -   ui = tablerDashPage(
    -    navbar = NULL,
    -    footer = NULL,
    -    title = "test",
    -    body = tablerDashBody(
    -     tablerMediaCard(
    -      title = "Media Card",
    -      date = "Today",
    -      href = "https://www.google.com",
    -      src = "https://preview.tabler.io/demo/photos/matt-barrett-339981-500.jpg",
    -      avatarUrl = "https://image.flaticon.com/icons/svg/145/145842.svg",
    -      width = 6
    -     )
    -    )
    -   ),
    -   server = function(input, output) {}
    - )
    -}
    -
    -
    -
    - -
    +
    +

    Examples

    +
    if(interactive()){
    + library(shiny)
    + library(tablerDash)
    +
    + shiny::shinyApp(
    +   ui = tablerDashPage(
    +    navbar = NULL,
    +    footer = NULL,
    +    title = "test",
    +    body = tablerDashBody(
    +     tablerMediaCard(
    +      title = "Media Card",
    +      date = "Today",
    +      href = "https://www.google.com",
    +      src = "https://preview.tabler.io/demo/photos/matt-barrett-339981-500.jpg",
    +      avatarUrl = "https://image.flaticon.com/icons/svg/145/145842.svg",
    +      width = 6
    +     )
    +    )
    +   ),
    +   server = function(input, output) {}
    + )
    +}
    +
    +
    +
    + -
    - +
    + - - - + diff --git a/docs/reference/tablerNavMenu.html b/docs/reference/tablerNavMenu.html index 45cb90b..4fba867 100644 --- a/docs/reference/tablerNavMenu.html +++ b/docs/reference/tablerNavMenu.html @@ -1,167 +1,76 @@ - - - - - - +Create a Boostrap 4 dashboard navbar menu — tablerNavMenu • tablerDash + Skip to contents -Create a Boostrap 4 dashboard navbar menu — tablerNavMenu • tablerDash +
    +
    +
    -
    - +
    + - - - + diff --git a/docs/reference/tablerNavMenuItem.html b/docs/reference/tablerNavMenuItem.html index 71786c7..08bed7a 100644 --- a/docs/reference/tablerNavMenuItem.html +++ b/docs/reference/tablerNavMenuItem.html @@ -1,175 +1,84 @@ - - - - - - +Create a Boostrap 4 dashboard navbar menu item — tablerNavMenuItem • tablerDash + Skip to contents -Create a Boostrap 4 dashboard navbar menu item — tablerNavMenuItem • tablerDash +
    +
    +
    +
    +

    Build a tabler dashboard navbar menu item

    +
    - - - +
    +

    Usage

    +
    tablerNavMenuItem(..., tabName = NULL, icon = NULL)
    +
    - +
    +

    Arguments

    +
    ...
    +

    Item name.

    - - -
    -
    - - - - -
    -
    -
    - +
    icon
    +

    Item icon.

    -
    -

    Build a tabler dashboard navbar menu item

    +
    +
    +

    Author

    +

    David Granjon, dgranjon@ymail.com

    -
    tablerNavMenuItem(..., tabName = NULL, icon = NULL)
    - -

    Arguments

    - - - - - - - - - - - - - - -
    ...

    Item name.

    tabName

    Should correspond exactly to the tabName given in tablerTabItem.

    icon

    Item icon.

    - -

    Author

    - -

    David Granjon, dgranjon@ymail.com

    +
    -
    - - - -
    - +
    + - - - + diff --git a/docs/reference/tablerProfileCard.html b/docs/reference/tablerProfileCard.html index f2dcd79..1d472c7 100644 --- a/docs/reference/tablerProfileCard.html +++ b/docs/reference/tablerProfileCard.html @@ -1,225 +1,142 @@ - - - - - - +Create a Boostrap 4 profile card — tablerProfileCard • tablerDash + Skip to contents -Create a Boostrap 4 profile card — tablerProfileCard • tablerDash +
    +
    +
    +
    +

    Build a tabler profile card

    +
    +
    +

    Usage

    +
    tablerProfileCard(
    +  title = NULL,
    +  subtitle = NULL,
    +  background = NULL,
    +  src = NULL,
    +  socials = NULL,
    +  width = 4
    +)
    +
    - - +
    +

    Arguments

    - - +
    title
    +

    Profile title.

    +
    subtitle
    +

    Card subtitle.

    - - - - +
    background
    +

    Card background url or path.

    +
    src
    +

    User profile image.

    - - -
    -
    - - - - -
    -
    -
    - +
    width
    +

    Card width. 4 by default.

    -
    -

    Build a tabler profile card

    +
    +
    +

    Author

    +

    David Granjon, dgranjon@ymail.com

    -
    tablerProfileCard(title = NULL, subtitle = NULL, background = NULL,
    -  src = NULL, socials = NULL, width = 4)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    title

    Profile title.

    subtitle

    Card subtitle.

    background

    Card background url or path.

    src

    User profile image.

    socials

    Slot for tablerSocialLinks and tablerSocialLink.

    width

    Card width. 4 by default.

    - -

    Author

    - -

    David Granjon, dgranjon@ymail.com

    - -

    Examples

    -
    if(interactive()){
    - library(shiny)
    - library(tablerDash)
    -
    - shiny::shinyApp(
    -   ui = tablerDashPage(
    -    navbar = NULL,
    -    footer = NULL,
    -    title = "test",
    -    body = tablerDashBody(
    -     tablerProfileCard(
    -      title = "Peter Richards",
    -      subtitle = "Big belly rude boy, million
    -      dollar hustler. Unemployed.",
    -      background = "https://preview.tabler.io/demo/photos/ilnur-kalimullin-218996-500.jpg",
    -      src = "https://preview.tabler.io/demo/faces/male/16.jpg",
    -      tablerSocialLinks(
    -       tablerSocialLink(
    -        name = "facebook",
    -        href = "https://www.facebook.com",
    -        icon = "facebook"
    -       ),
    -       tablerSocialLink(
    -        name = "twitter",
    -        href = "https://www.twitter.com",
    -        icon = "twitter"
    -       )
    -      )
    -     )
    -    )
    -   ),
    -   server = function(input, output) {}
    - )
    -}
    -
    -
    -
    - -
    +
    +

    Examples

    +
    if(interactive()){
    + library(shiny)
    + library(tablerDash)
    +
    + shiny::shinyApp(
    +   ui = tablerDashPage(
    +    navbar = NULL,
    +    footer = NULL,
    +    title = "test",
    +    body = tablerDashBody(
    +     tablerProfileCard(
    +      title = "Peter Richards",
    +      subtitle = "Big belly rude boy, million
    +      dollar hustler. Unemployed.",
    +      background = "https://preview.tabler.io/demo/photos/ilnur-kalimullin-218996-500.jpg",
    +      src = "https://preview.tabler.io/demo/faces/male/16.jpg",
    +      tablerSocialLinks(
    +       tablerSocialLink(
    +        name = "facebook",
    +        href = "https://www.facebook.com",
    +        icon = "facebook"
    +       ),
    +       tablerSocialLink(
    +        name = "twitter",
    +        href = "https://www.twitter.com",
    +        icon = "twitter"
    +       )
    +      )
    +     )
    +    )
    +   ),
    +   server = function(input, output) {}
    + )
    +}
    +
    +
    +
    + -
    - +
    + - - - + diff --git a/docs/reference/tablerProgress.html b/docs/reference/tablerProgress.html index f6bca19..1503880 100644 --- a/docs/reference/tablerProgress.html +++ b/docs/reference/tablerProgress.html @@ -1,195 +1,106 @@ - - - - - - +Create a Boostrap 4 progress bar — tablerProgress • tablerDash + Skip to contents -Create a Boostrap 4 progress bar — tablerProgress • tablerDash +
    +
    +
    +
    +

    Build a tabler progress bar

    +
    +
    +

    Usage

    +
    tablerProgress(value, status = NULL, size = NULL)
    +
    - - - +
    +

    Arguments

    - +
    value
    +

    Progress value.

    - +
    status
    +

    Progress status. See https://preview.tabler.io/docs/colors.html.

    - -
    -
    - - - - -
    +
    size
    +

    Progress bar size: NULL, "xs", "sm", "md".

    -
    -
    -
    +
    +

    Author

    +

    David Granjon, dgranjon@ymail.com

    -
    -

    Build a tabler progress bar

    +
    +

    Examples

    +
    if(interactive()){
    + library(shiny)
    + library(tablerDash)
    +
    + shiny::shinyApp(
    +   ui = tablerDashPage(
    +    navbar = NULL,
    +    footer = NULL,
    +    title = "test",
    +    body = tablerDashBody(
    +      tablerProgress(value = 10, size = "xs"),
    +      tablerProgress(value = 90, status = "red", size = "sm")
    +     )
    +   ),
    +   server = function(input, output) {}
    + )
    +}
    +
    +
    +
    -
    tablerProgress(value, status = NULL, size = NULL)
    - -

    Arguments

    - - - - - - - - - - - - - - -
    value

    Progress value.

    status

    Progress status. See https://preview.tabler.io/docs/colors.html.

    size

    Progress bar size: NULL, "xs", "sm", "md".

    - -

    Author

    - -

    David Granjon, dgranjon@ymail.com

    - -

    Examples

    -
    if(interactive()){
    - library(shiny)
    - library(tablerDash)
    -
    - shiny::shinyApp(
    -   ui = tablerDashPage(
    -    navbar = NULL,
    -    footer = NULL,
    -    title = "test",
    -    body = tablerDashBody(
    -      tablerProgress(value = 10, size = "xs"),
    -      tablerProgress(value = 90, status = "red", size = "sm")
    -     )
    -   ),
    -   server = function(input, output) {}
    - )
    -}
    -
    -
    -
    - - - -
    - +
    + - - - + diff --git a/docs/reference/tablerSocialLink.html b/docs/reference/tablerSocialLink.html index 9c36671..92602d4 100644 --- a/docs/reference/tablerSocialLink.html +++ b/docs/reference/tablerSocialLink.html @@ -1,175 +1,84 @@ - - - - - - +Create a Boostrap 4 social link — tablerSocialLink • tablerDash + Skip to contents -Create a Boostrap 4 social link — tablerSocialLink • tablerDash +
    +
    +
    +
    +

    Build a tabler social link

    +
    - - - +
    +

    Usage

    +
    tablerSocialLink(name = NULL, href = NULL, icon)
    +
    - +
    +

    Arguments

    +
    name
    +

    Link tooltip name.

    - - -
    -
    - - - - -
    -
    -
    - +
    icon
    +

    Icon (font awesome).

    -
    -

    Build a tabler social link

    +
    +
    +

    Author

    +

    David Granjon, dgranjon@ymail.com

    -
    tablerSocialLink(name = NULL, href = NULL, icon)
    - -

    Arguments

    - - - - - - - - - - - - - - -
    name

    Link tooltip name.

    href

    External link.

    icon

    Icon (font awesome).

    - -

    Author

    - -

    David Granjon, dgranjon@ymail.com

    +
    -
    - - - -
    - +
    + - - - + diff --git a/docs/reference/tablerSocialLinks.html b/docs/reference/tablerSocialLinks.html index a2a0538..6b2de44 100644 --- a/docs/reference/tablerSocialLinks.html +++ b/docs/reference/tablerSocialLinks.html @@ -1,197 +1,108 @@ - - - - - - +Create a Boostrap 4 social link list — tablerSocialLinks • tablerDash + Skip to contents -Create a Boostrap 4 social link list — tablerSocialLinks • tablerDash +
    +
    +
    +
    +

    Build a tabler social link list

    +
    +
    +

    Usage

    +
    tablerSocialLinks(...)
    +
    - +
    +

    Arguments

    - -
    -
    - - - - -
    +
    ...
    +

    Slot for tablerSocialLink.

    -
    -
    -
    +
    +

    Author

    +

    David Granjon, dgranjon@ymail.com

    -
    -

    Build a tabler social link list

    +
    +

    Examples

    +
    if(interactive()){
    + library(shiny)
    + library(tablerDash)
    +
    + shiny::shinyApp(
    +   ui = tablerDashPage(
    +    navbar = NULL,
    +    footer = NULL,
    +    title = "test",
    +    body = tablerDashBody(
    +     tablerSocialLinks(
    +       tablerSocialLink(
    +        name = "facebook",
    +        href = "https://www.facebook.com",
    +        icon = "facebook"
    +       ),
    +       tablerSocialLink(
    +        name = "twitter",
    +        href = "https://www.twitter.com",
    +        icon = "twitter"
    +       )
    +      )
    +    )
    +   ),
    +   server = function(input, output) {}
    + )
    +}
    +
    +
    +
    -
    tablerSocialLinks(...)
    - -

    Arguments

    - - - - - - -
    ...

    Slot for tablerSocialLink.

    - -

    Author

    - -

    David Granjon, dgranjon@ymail.com

    - -

    Examples

    -
    if(interactive()){
    - library(shiny)
    - library(tablerDash)
    -
    - shiny::shinyApp(
    -   ui = tablerDashPage(
    -    navbar = NULL,
    -    footer = NULL,
    -    title = "test",
    -    body = tablerDashBody(
    -     tablerSocialLinks(
    -       tablerSocialLink(
    -        name = "facebook",
    -        href = "https://www.facebook.com",
    -        icon = "facebook"
    -       ),
    -       tablerSocialLink(
    -        name = "twitter",
    -        href = "https://www.twitter.com",
    -        icon = "twitter"
    -       )
    -      )
    -    )
    -   ),
    -   server = function(input, output) {}
    - )
    -}
    -
    -
    -
    - - - -
    - +
    + - - - + diff --git a/docs/reference/tablerStatCard.html b/docs/reference/tablerStatCard.html index 4136456..7494929 100644 --- a/docs/reference/tablerStatCard.html +++ b/docs/reference/tablerStatCard.html @@ -1,202 +1,113 @@ - - - - - - +Create a Boostrap 4 stat card — tablerStatCard • tablerDash + Skip to contents -Create a Boostrap 4 stat card — tablerStatCard • tablerDash +
    +
    +
    +
    +

    Build a tabler stat card

    +
    - - +
    +

    Usage

    +
    tablerStatCard(value, title, trend = NULL, width = 3)
    +
    - - +
    +

    Arguments

    +
    value
    +

    Card value.

    - - - +
    title
    +

    Card title.

    - +
    trend
    +

    Percentage increase/decrease.

    - +
    width
    +

    Card width. 3 by default.

    - -
    -
    -
    +
    +

    Author

    +

    David Granjon, dgranjon@ymail.com

    - -
    -
    - - - - - -
    -
    - -
    -

    Build a tabler stat card

    -
    - -
    tablerStatCard(value, title, trend = NULL, width = 3)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - -
    value

    Card value.

    title

    Card title.

    trend

    Percentage increase/decrease.

    width

    Card width. 3 by default.

    - -

    Author

    - -

    David Granjon, dgranjon@ymail.com

    - -

    Examples

    -
    if(interactive()){
    - library(shiny)
    - library(tablerDash)
    -
    - shiny::shinyApp(
    -   ui = tablerDashPage(
    -    navbar = NULL,
    -    footer = NULL,
    -    title = "test",
    -    body = tablerDashBody(
    -     tablerStatCard(
    -      value = 43,
    -      title = "Followers",
    -      trend = -10
    -     )
    -    )
    -   ),
    -   server = function(input, output) {}
    - )
    -}
    -
    -
    -
    - -
    - -
    - +
    + - - - + diff --git a/docs/reference/tablerStatus.html b/docs/reference/tablerStatus.html index 6bffc63..fbcd05a 100644 --- a/docs/reference/tablerStatus.html +++ b/docs/reference/tablerStatus.html @@ -1,186 +1,97 @@ - - - - - - +Create a Boostrap 4 status — tablerStatus • tablerDash + Skip to contents -Create a Boostrap 4 status — tablerStatus • tablerDash +
    +
    +
    +
    +

    Build a tabler status

    +
    +
    +

    Usage

    +
    tablerStatus(color)
    +
    - +
    +

    Arguments

    - -
    -
    - - - - -
    +
    color
    +

    Status color. See https://preview.tabler.io/docs/colors.html.

    -
    -
    -
    +
    +

    Author

    +

    David Granjon, dgranjon@ymail.com

    -
    -

    Build a tabler status

    +
    +

    Examples

    +
    if(interactive()){
    + library(shiny)
    + library(tablerDash)
    +
    + shiny::shinyApp(
    +   ui = tablerDashPage(
    +    navbar = NULL,
    +    footer = NULL,
    +    title = "test",
    +    body = tablerDashBody(
    +     tablerStatus(color = "lime")
    +    )
    +   ),
    +   server = function(input, output) {}
    + )
    +}
    +
    +
    +
    -
    tablerStatus(color)
    - -

    Arguments

    - - - - - - -
    color

    Status color. See https://preview.tabler.io/docs/colors.html.

    - -

    Author

    - -

    David Granjon, dgranjon@ymail.com

    - -

    Examples

    -
    if(interactive()){
    - library(shiny)
    - library(tablerDash)
    -
    - shiny::shinyApp(
    -   ui = tablerDashPage(
    -    navbar = NULL,
    -    footer = NULL,
    -    title = "test",
    -    body = tablerDashBody(
    -     tablerStatus(color = "lime")
    -    )
    -   ),
    -   server = function(input, output) {}
    - )
    -}
    -
    -
    -
    - - - -
    - +
    + - - - + diff --git a/docs/reference/tablerTabItem.html b/docs/reference/tablerTabItem.html index aa19e97..6ae3986 100644 --- a/docs/reference/tablerTabItem.html +++ b/docs/reference/tablerTabItem.html @@ -1,169 +1,77 @@ - - - - - - +One tab to put inside a tab items container — tablerTabItem • tablerDash + Skip to contents -One tab to put inside a tab items container — tablerTabItem • tablerDash +
    +
    +
    - +
    +

    One tab to put inside a tab items container

    +
    - -
    -
    -
    +
    +

    Arguments

    -
    -
    - -
    -

    One tab to put inside a tab items container

    -
    +
    tabName
    +

    The name of a tab. This must correspond to the tabName +of a tablerNavMenuItem.

    -
    tablerTabItem(tabName = NULL, ...)
    -

    Arguments

    - - - - - - - - - - -
    tabName

    The name of a tab. This must correspond to the tabName -of a tablerNavMenuItem.

    ...

    Contents of the tab.

    +
    ...
    +

    Contents of the tab.

    +
    -
    - -
    +
    -
    - +
    + - - - + diff --git a/docs/reference/tablerTabItems.html b/docs/reference/tablerTabItems.html index dcc46c3..ca82667 100644 --- a/docs/reference/tablerTabItems.html +++ b/docs/reference/tablerTabItems.html @@ -1,165 +1,73 @@ - - - - - - +A container for tab items — tablerTabItems • tablerDash + Skip to contents -A container for tab items — tablerTabItems • tablerDash +
    +
    +
    -
    - +
    + - - - + diff --git a/docs/reference/tablerTable.html b/docs/reference/tablerTable.html index ea771d4..c5739b9 100644 --- a/docs/reference/tablerTable.html +++ b/docs/reference/tablerTable.html @@ -1,219 +1,130 @@ - - - - - - +Create a Boostrap 4 table container — tablerTable • tablerDash + Skip to contents -Create a Boostrap 4 table container — tablerTable • tablerDash +
    +
    +
    +
    +

    Build a tabler table container

    +
    +
    +

    Usage

    +
    tablerTable(..., title = NULL, width = 4)
    +
    - - - +
    +

    Arguments

    - +
    ...
    +

    Slot for tablerTableItem.

    - +
    title
    +

    Card wrapper title.

    - -
    -
    - - - - -
    +
    width
    +

    Card wrapper width.

    -
    -
    -
    +
    +

    Author

    +

    David Granjon, dgranjon@ymail.com

    -
    -

    Build a tabler table container

    +
    +

    Examples

    +
    if(interactive()){
    + library(shiny)
    + library(tablerDash)
    +
    + shiny::shinyApp(
    +   ui = tablerDashPage(
    +    navbar = NULL,
    +    footer = NULL,
    +    title = "test",
    +    body = tablerDashBody(
    +       tablerTable(
    +        title = "tablerTable",
    +        tablerTableItem(
    +         left = tablerTag(name = "Tag"),
    +         right = tablerTag(name = "Tag", href = "https://www.google.com")
    +        ),
    +        tablerTableItem(right = tablerStatus(color = "red")),
    +        tablerTableItem(
    +         left = tablerAvatarList(
    +          stacked = TRUE,
    +          tablerAvatar(
    +           name = "DG",
    +           size = "xxl"
    +          ),
    +          tablerAvatar(
    +           name = "DG",
    +           color = "orange"
    +          ),
    +          tablerAvatar(
    +           name = "DG",
    +           status = "warning"
    +          ),
    +          tablerAvatar(url = "https://image.flaticon.com/icons/svg/145/145852.svg")
    +          )
    +         )
    +       )
    +     )
    +   ),
    +   server = function(input, output) {}
    + )
    +}
    +
    +
    +
    -
    tablerTable(..., title = NULL, width = 4)
    - -

    Arguments

    - - - - - - - - - - - - - - -
    ...

    Slot for tablerTableItem.

    title

    Card wrapper title.

    width

    Card wrapper width.

    - -

    Author

    - -

    David Granjon, dgranjon@ymail.com

    - -

    Examples

    -
    if(interactive()){
    - library(shiny)
    - library(tablerDash)
    -
    - shiny::shinyApp(
    -   ui = tablerDashPage(
    -    navbar = NULL,
    -    footer = NULL,
    -    title = "test",
    -    body = tablerDashBody(
    -       tablerTable(
    -        title = "tablerTable",
    -        tablerTableItem(
    -         left = tablerTag(name = "Tag"),
    -         right = tablerTag(name = "Tag", href = "https://www.google.com")
    -        ),
    -        tablerTableItem(right = tablerStatus(color = "red")),
    -        tablerTableItem(
    -         left = tablerAvatarList(
    -          stacked = TRUE,
    -          tablerAvatar(
    -           name = "DG",
    -           size = "xxl"
    -          ),
    -          tablerAvatar(
    -           name = "DG",
    -           color = "orange"
    -          ),
    -          tablerAvatar(
    -           name = "DG",
    -           status = "warning"
    -          ),
    -          tablerAvatar(url = "https://image.flaticon.com/icons/svg/145/145852.svg")
    -          )
    -         )
    -       )
    -     )
    -   ),
    -   server = function(input, output) {}
    - )
    -}
    -
    -
    -
    - - - -
    - +
    + - - - + diff --git a/docs/reference/tablerTableItem.html b/docs/reference/tablerTableItem.html index 14b7121..5c46db3 100644 --- a/docs/reference/tablerTableItem.html +++ b/docs/reference/tablerTableItem.html @@ -1,171 +1,80 @@ - - - - - - +Create a Boostrap 4 table item — tablerTableItem • tablerDash + Skip to contents -Create a Boostrap 4 table item — tablerTableItem • tablerDash +
    +
    +
    -
    - +
    + - - - + diff --git a/docs/reference/tablerTag.html b/docs/reference/tablerTag.html index b965068..8ad91bc 100644 --- a/docs/reference/tablerTag.html +++ b/docs/reference/tablerTag.html @@ -1,217 +1,134 @@ - - - - - - +Create a Boostrap 4 tag — tablerTag • tablerDash + Skip to contents -Create a Boostrap 4 tag — tablerTag • tablerDash +
    +
    +
    +
    +

    Build a tabler tag

    +
    +
    +

    Usage

    +
    tablerTag(
    +  name,
    +  href = NULL,
    +  rounded = FALSE,
    +  color = NULL,
    +  addon = NULL,
    +  addonColor = NULL
    +)
    +
    - - +
    +

    Arguments

    - - +
    name
    +

    Tag name.

    +
    href
    +

    Tag external link.

    - - - - +
    rounded
    +

    Whether the tag is rounded. FALSE by default.

    +
    color
    +

    Tag color. See https://preview.tabler.io/docs/colors.html.

    - - -
    -
    - - - - -
    -
    -
    - +
    addonColor
    +

    Addon background color. See https://preview.tabler.io/docs/colors.html.

    -
    -

    Build a tabler tag

    +
    +
    +

    Author

    +

    David Granjon, dgranjon@ymail.com

    -
    tablerTag(name, href = NULL, rounded = FALSE, color = NULL,
    -  addon = NULL, addonColor = NULL)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    name

    Tag name.

    href

    Tag external link.

    rounded

    Whether the tag is rounded. FALSE by default.

    color

    Tag color. See https://preview.tabler.io/docs/colors.html.

    addon

    Tag addon (right side).

    addonColor

    Addon background color. See https://preview.tabler.io/docs/colors.html.

    - -

    Author

    - -

    David Granjon, dgranjon@ymail.com

    - -

    Examples

    -
    if(interactive()){
    - library(shiny)
    - library(tablerDash)
    -
    - shiny::shinyApp(
    -   ui = tablerDashPage(
    -    navbar = NULL,
    -    footer = NULL,
    -    title = "test",
    -    body = tablerDashBody(
    -     tablerTag(name = "Tag"),
    -     tablerTag(name = "Tag", href = "https://www.google.com"),
    -     tablerTag(name = "Tag", rounded = TRUE, color = "pink"),
    -     tablerTag(
    -      name = "npm",
    -      href = "https://www.google.com",
    -      color = "dark",
    -      addon = "passing",
    -      addonColor = "warning"
    -     ),
    -     tablerTag(name = "build", addon = "passing", addonColor = "success")
    -    )
    -   ),
    -   server = function(input, output) {}
    - )
    -}
    -
    -
    -
    - -
    +
    +

    Examples

    +
    if(interactive()){
    + library(shiny)
    + library(tablerDash)
    +
    + shiny::shinyApp(
    +   ui = tablerDashPage(
    +    navbar = NULL,
    +    footer = NULL,
    +    title = "test",
    +    body = tablerDashBody(
    +     tablerTag(name = "Tag"),
    +     tablerTag(name = "Tag", href = "https://www.google.com"),
    +     tablerTag(name = "Tag", rounded = TRUE, color = "pink"),
    +     tablerTag(
    +      name = "npm",
    +      href = "https://www.google.com",
    +      color = "dark",
    +      addon = "passing",
    +      addonColor = "warning"
    +     ),
    +     tablerTag(name = "build", addon = "passing", addonColor = "success")
    +    )
    +   ),
    +   server = function(input, output) {}
    + )
    +}
    +
    +
    +
    + -
    - +
    + - - - + diff --git a/docs/reference/tablerTagList.html b/docs/reference/tablerTagList.html index a4733bd..9ec378b 100644 --- a/docs/reference/tablerTagList.html +++ b/docs/reference/tablerTagList.html @@ -1,190 +1,101 @@ - - - - - - +Create a Boostrap 4 tag list — tablerTagList • tablerDash + Skip to contents -Create a Boostrap 4 tag list — tablerTagList • tablerDash +
    +
    +
    +
    +

    Build a tabler tag list

    +
    +
    +

    Usage

    +
    tablerTagList(...)
    +
    - +
    +

    Arguments

    - -
    -
    - - - - -
    +
    ...
    +

    Slot for tablerTag.

    -
    -
    -
    +
    +

    Author

    +

    David Granjon, dgranjon@ymail.com

    -
    -

    Build a tabler tag list

    +
    +

    Examples

    +
    if(interactive()){
    + library(shiny)
    + library(tablerDash)
    +
    + shiny::shinyApp(
    +   ui = tablerDashPage(
    +    navbar = NULL,
    +    footer = NULL,
    +    title = "test",
    +    body = tablerDashBody(
    +     tablerTagList(
    +      lapply(X = 1:5, FUN = function(i) {
    +       tablerTag(name = i)
    +      })
    +     )
    +    )
    +   ),
    +   server = function(input, output) {}
    + )
    +}
    +
    +
    +
    -
    tablerTagList(...)
    - -

    Arguments

    - - - - - - -
    ...

    Slot for tablerTag.

    - -

    Author

    - -

    David Granjon, dgranjon@ymail.com

    - -

    Examples

    -
    if(interactive()){
    - library(shiny)
    - library(tablerDash)
    -
    - shiny::shinyApp(
    -   ui = tablerDashPage(
    -    navbar = NULL,
    -    footer = NULL,
    -    title = "test",
    -    body = tablerDashBody(
    -     tablerTagList(
    -      lapply(X = 1:5, FUN = function(i) {
    -       tablerTag(name = i)
    -      })
    -     )
    -    )
    -   ),
    -   server = function(input, output) {}
    - )
    -}
    -
    -
    -
    - - - -
    - +
    + - - - + diff --git a/docs/reference/tablerTimeline.html b/docs/reference/tablerTimeline.html index f42b02e..cbd4797 100644 --- a/docs/reference/tablerTimeline.html +++ b/docs/reference/tablerTimeline.html @@ -1,199 +1,110 @@ - - - - - - +Create a Boostrap 4 timeline — tablerTimeline • tablerDash + Skip to contents -Create a Boostrap 4 timeline — tablerTimeline • tablerDash +
    +
    +
    +
    +

    Build a tabler timeline

    +
    +
    +

    Usage

    +
    tablerTimeline(...)
    +
    - +
    +

    Arguments

    - -
    -
    - - - - -
    +
    ...
    +

    slot for tablerTimelineItem.

    -
    -
    -
    +
    +

    Author

    +

    David Granjon, dgranjon@ymail.com

    -
    -

    Build a tabler timeline

    +
    +

    Examples

    +
    if(interactive()){
    + library(shiny)
    + library(tablerDash)
    +
    + shiny::shinyApp(
    +   ui = tablerDashPage(
    +    navbar = NULL,
    +    footer = NULL,
    +    title = "test",
    +    body = tablerDashBody(
    +     tablerTimeline(
    +      tablerTimelineItem(
    +       title = "Item 1",
    +       status = "green",
    +       date = "now"
    +      ),
    +      tablerTimelineItem(
    +       title = "Item 2",
    +       status = NULL,
    +       date = "yesterday",
    +       "Lorem ipsum dolor sit amet,
    +       consectetur adipisicing elit."
    +      )
    +     )
    +    )
    +   ),
    +   server = function(input, output) {}
    + )
    +}
    +
    +
    +
    -
    tablerTimeline(...)
    - -

    Arguments

    - - - - - - -
    ...

    slot for tablerTimelineItem.

    - -

    Author

    - -

    David Granjon, dgranjon@ymail.com

    - -

    Examples

    -
    if(interactive()){
    - library(shiny)
    - library(tablerDash)
    -
    - shiny::shinyApp(
    -   ui = tablerDashPage(
    -    navbar = NULL,
    -    footer = NULL,
    -    title = "test",
    -    body = tablerDashBody(
    -     tablerTimeline(
    -      tablerTimelineItem(
    -       title = "Item 1",
    -       status = "green",
    -       date = "now"
    -      ),
    -      tablerTimelineItem(
    -       title = "Item 2",
    -       status = NULL,
    -       date = "yesterday",
    -       "Lorem ipsum dolor sit amet,
    -       consectetur adipisicing elit."
    -      )
    -     )
    -    )
    -   ),
    -   server = function(input, output) {}
    - )
    -}
    -
    -
    -
    - - - -
    - +
    + - - - + diff --git a/docs/reference/tablerTimelineItem.html b/docs/reference/tablerTimelineItem.html index 83bf6a9..aa448ec 100644 --- a/docs/reference/tablerTimelineItem.html +++ b/docs/reference/tablerTimelineItem.html @@ -1,179 +1,88 @@ - - - - - - +Create a Boostrap 4 timeline item — tablerTimelineItem • tablerDash + Skip to contents -Create a Boostrap 4 timeline item — tablerTimelineItem • tablerDash +
    +
    +
    +
    +

    Build a tabler timeline item

    +
    - - +
    +

    Usage

    +
    tablerTimelineItem(..., status = NULL, title, date)
    +
    - - +
    +

    Arguments

    +
    ...
    +

    Item content.

    - - - +
    status
    +

    Item status.

    - +
    title
    +

    Item title.

    - +
    date
    +

    Event date.

    - -
    -
    -
    +
    +

    Author

    +

    David Granjon, dgranjon@ymail.com

    - -
    -
    - - - - + -
    -
    - -
    -

    Build a tabler timeline item

    -
    - -
    tablerTimelineItem(..., status = NULL, title, date)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - -
    ...

    Item content.

    status

    Item status.

    title

    Item title.

    date

    Event date.

    - -

    Author

    - -

    David Granjon, dgranjon@ymail.com

    - -
    - -
    - - -
    - +
    + - - - + diff --git a/docs/reference/tagAssert.html b/docs/reference/tagAssert.html index 93a2d7f..466d79b 100644 --- a/docs/reference/tagAssert.html +++ b/docs/reference/tagAssert.html @@ -1,179 +1,87 @@ - - - - - - +Assert that a tag has specified properties — tagAssert • tablerDash + Skip to contents -Assert that a tag has specified properties — tagAssert • tablerDash +
    +
    +
    +
    +

    Assert that a tag has specified properties

    +
    - - - +
    +

    Usage

    +
    tagAssert(tag, type = NULL, class = NULL, allowUI = TRUE)
    +
    - +
    +

    Arguments

    +
    tag
    +

    A tag object.

    - - -
    -
    - - - - -
    -
    -
    - +
    class
    +

    An HTML class.

    -
    -

    Assert that a tag has specified properties

    -
    -
    tagAssert(tag, type = NULL, class = NULL, allowUI = TRUE)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - -
    tag

    A tag object.

    type

    The type of a tag, like "div", "a", "span".

    class

    An HTML class.

    allowUI

    If TRUE (the default), allow dynamic outputs generated by -uiOutput or htmlOutput. When a +

    allowUI
    +

    If TRUE (the default), allow dynamic outputs generated by +uiOutput or htmlOutput. When a dynamic output is provided, tagAssert won't try to validate the the -contents.

    +contents.

    +
    -
    - -
    + -
    - +
    + - - - + diff --git a/index.Rmd b/index.Rmd new file mode 100644 index 0000000..1af2148 --- /dev/null +++ b/index.Rmd @@ -0,0 +1,98 @@ +--- +output: github_document +always_allow_html: true +--- + +```{r setup, include=FALSE} +library(bslib) +``` + +```{r, include = FALSE} +knitr::opts_chunk$set( + collapse = TRUE, + comment = "#>", + fig.path = "man/figures/README-", + out.width = "100%" +) +``` + +# tablerDash + + +[![R build status](https://github.com/RinteRface/tablerDash/workflows/R-CMD-check/badge.svg)](https://github.com/RinteRface/tablerDash/actions) +[![CRAN status](https://www.r-pkg.org/badges/version/tablerDash)](https://cran.r-project.org/package=tablerDash) +[![lifecycle](https://img.shields.io/badge/lifecycle-maturing-ff69b4.svg)](https://www.tidyverse.org/lifecycle/#maturing) +[![cranlogs](https://cranlogs.r-pkg.org/badges/tablerDash)](https://cran.r-project.org/package=tablerDash) +[![total](https://cranlogs.r-pkg.org/badges/grand-total/tablerDash)](https://www.rpackages.io/package/tablerDash) + + +> Tabler dashboard template for shiny with Bootstrap 4 + +See [https://tabler.io](https://tabler.io) for the original template. + +## Installation + +This package is on CRAN: + +```r +# latest devel version +devtools::install_github("RinteRface/tablerDash") +# CRAN version +install.packages("tablerDash") +``` + +## Demo + +`{tablerDash}` works on all the RStudio products. + +```{r dashboard-code, eval=TRUE, echo=FALSE} +card( + tablerDash:::create_app_link(tablerDash:::shinylive_links["inst/examples/shinylive/dashboard"], header = FALSE), + full_screen = TRUE, + style = "margin: 0 auto; float: none;" +) +``` + +

    + +Toggle code + +

    + +
    +```{r, results="asis", echo=FALSE, warning=FALSE, comment = ""} +tablerDash:::print_r_code("dashboard") +``` +
    + + +
    +
    + +
    +
    + +
    + +
    +
    + +
    +
    + +
    + + +## Issues + +Issues are listed [here](https://github.com/RinteRface/tablerDash/issues). + +## Code of Conduct + + Please note that the tablerDash project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms. \ No newline at end of file diff --git a/index.md b/index.md new file mode 100644 index 0000000..767f201 --- /dev/null +++ b/index.md @@ -0,0 +1,95 @@ + +# tablerDash + + + +[![R build +status](https://github.com/RinteRface/tablerDash/workflows/R-CMD-check/badge.svg)](https://github.com/RinteRface/tablerDash/actions) +[![CRAN +status](https://www.r-pkg.org/badges/version/tablerDash)](https://cran.r-project.org/package=tablerDash) +[![lifecycle](https://img.shields.io/badge/lifecycle-maturing-ff69b4.svg)](https://www.tidyverse.org/lifecycle/#maturing) +[![cranlogs](https://cranlogs.r-pkg.org/badges/tablerDash)](https://cran.r-project.org/package=tablerDash) +[![total](https://cranlogs.r-pkg.org/badges/grand-total/tablerDash)](https://www.rpackages.io/package/tablerDash) + + +> Tabler dashboard template for shiny with Bootstrap 4 + +See for the original template. + +## Installation + +This package is on CRAN: + +``` r +# latest devel version +devtools::install_github("RinteRface/tablerDash") +# CRAN version +install.packages("tablerDash") +``` + +## Demo + +`{tablerDash}` works on all the RStudio products. + +
    +
    + +
    + + + + + +
    +

    + Toggle code +

    + +
    + +``` r +``` + +
    + +
    + +
    + + + +
    + +
    + +
    + +
    + +
    + + + +
    + +
    + +
    + +## Issues + +Issues are listed +[here](https://github.com/RinteRface/tablerDash/issues). + +## Code of Conduct + +Please note that the tablerDash project is released with a [Contributor +Code of +Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html). +By contributing to this project, you agree to abide by its terms. diff --git a/inst/examples/app.R b/inst/examples/app.R deleted file mode 100644 index 82183a5..0000000 --- a/inst/examples/app.R +++ /dev/null @@ -1,276 +0,0 @@ -library(shiny) -library(tablerDash) -library(echarts4r) -library(shinyWidgets) -library(magrittr) - -# datas flowGl -vectors <- expand.grid(x = -3:3, y = -3:3) -mu <- 1 -vectors$sx <- vectors$y -vectors$sy <- mu * (1 - vectors$x^2) * vectors$y - vectors$x -vectors$color <- log10(runif(nrow(vectors), 1, 10)) - -# calendar plot -dates <- seq.Date(as.Date("2018-01-01"), as.Date("2018-12-31"), by = "day") -values <- rnorm(length(dates), 20, 6) - -year <- data.frame(date = dates, values = values) - -# cards -flowCard <- tablerCard( - title = "FlowGl Chart", - closable = FALSE, - zoomable = FALSE, - options = tagList( - tablerAvatar(status = "lime", url = "https://john-coene.com/img/profile.png"), - tablerTag(name = "build", addon = "passing", addonColor = "success") - ), - width = 12, - echarts4rOutput("flowGl") -) - -profileCard <- tablerProfileCard( - width = 12, - title = "Peter Richards", - subtitle = "Big belly rude boy, million - dollar hustler. Unemployed.", - background = "https://preview.tabler.io/demo/photos/ilnur-kalimullin-218996-500.jpg", - src = "https://preview.tabler.io/demo/faces/male/16.jpg", - tablerSocialLinks( - tablerSocialLink( - name = "facebook", - href = "https://www.facebook.com", - icon = "facebook" - ), - tablerSocialLink( - name = "twitter", - href = "https://www.twitter.com", - icon = "twitter" - ) - ) -) - - -calendarCard <- tablerBlogCard( - horizontal = TRUE, - width = 12, - echarts4rOutput("calendar") -) - - -# app -shiny::shinyApp( - ui = tablerDashPage( - navbar = tablerDashNav( - id = "mymenu", - src = "https://preview.tabler.io/demo/brand/tabler.svg", - tablerDropdown( - tablerDropdownItem( - title = "Item 1 title", - href = "https://google.com", - url = "https://image.flaticon.com/icons/svg/1301/1301804.svg", - status = "danger", - date = "now", - "This is the first dropdown item" - ), - tablerDropdownItem( - url = "https://image.flaticon.com/icons/svg/1301/1301809.svg", - status = "warning", - "This is the second dropdown item", - date = "yesterday" - ), - tablerDropdownItem( - title = "Item 3 title", - "This is the third dropdown item" - ) - ) - ), - footer = tablerDashFooter( - tablerIcon(name = "maestro", lib = "payment"), - tablerIcon(name = "mastercard", lib = "payment"), - copyrights = "@David Granjon, 2019" - ), - title = "tablerDash", - body = tablerDashBody( - - chooseSliderSkin("Nice"), - - fluidRow( - column( - width = 3, - profileCard, - tablerStatCard( - value = 43, - title = "Followers", - trend = -10, - width = 12 - ) - ), - column( - width = 6, - flowCard - ), - column( - width = 3, - tablerCard( - width = 12, - tablerTimeline( - tablerTimelineItem( - title = "Item 1", - status = "green", - date = "now" - ), - tablerTimelineItem( - title = "Item 2", - status = NULL, - date = "yesterday", - "Lorem ipsum dolor sit amet, - consectetur adipisicing elit." - ) - ) - ), - tablerInfoCard( - value = "132 sales", - status = "danger", - icon = "dollar-sign", - description = "12 waiting payments", - width = 12 - ), - numericInput( - inputId = "totalStorage", - label = "Enter storage capacity", - value = 1000), - uiOutput("info") - ) - ), - fluidRow( - column( - width = 6, - tablerCard( - title = "Plots", - zoomable = FALSE, - closable = FALSE, - options = tagList( - switchInput( - inputId = "enable_distPlot", - label = "Plot?", - value = TRUE, - onStatus = "success", - offStatus = "danger" - ) - ), - plotOutput("distPlot"), - status = "info", - statusSide = "left", - width = 12, - footer = tagList( - column( - width = 12, - align = "center", - sliderInput( - "obs", - "Number of observations:", - min = 0, - max = 1000, - value = 500 - ) - ) - ) - ) - ), - column( - width = 6, - tablerCard( - title = "Tables", - checkboxGroupInput( - "variable", - "Variables to show:", - c("Cylinders" = "cyl", - "Transmission" = "am", - "Gears" = "gear" - ), - inline = TRUE - ), - tableOutput("data"), - width = 12, - overflow = TRUE - ), - fluidRow( - column( - width = 6, - echarts4rOutput("gauge", height = "300px") - ), - column( - width = 6, - sliderInput( - "gaugeVal", - "Gauge Value:", - min = 0, - max = 100, - value = 50 - ) - ) - ) - ) - ), - fluidRow(calendarCard) - ) - ), - server = function(input, output) { - output$distPlot <- renderPlot({ - if (input$enable_distPlot) hist(rnorm(input$obs)) - }) - output$data <- renderTable({ - mtcars[, c("mpg", input$variable), drop = FALSE] - }, rownames = TRUE) - - output$flowGl <- renderEcharts4r({ - vectors %>% - e_charts(x) %>% - e_flow_gl(y, sx, sy, color) %>% - e_visual_map( - min = 0, max = 1, # log 10 - dimension = 4, # x = 0, y = 1, sx = 3, sy = 4 - show = FALSE, # hide - inRange = list( - color = c('#313695', '#4575b4', '#74add1', '#abd9e9', '#e0f3f8', - '#ffffbf', '#fee090', '#fdae61', '#f46d43', '#d73027', '#a50026') - ) - ) %>% - e_x_axis( - splitLine = list(show = FALSE) - ) %>% - e_y_axis( - splitLine = list(show = FALSE) - ) - }) - - - output$info <- renderUI({ - tablerInfoCard( - width = 12, - value = paste0(input$totalStorage, "GB"), - status = "success", - icon = "database", - description = "Total Storage Capacity" - ) - }) - - - output$calendar <- renderEcharts4r({ - year %>% - e_charts(date) %>% - e_calendar(range = "2018") %>% - e_heatmap(values, coord_system = "calendar") %>% - e_visual_map(max = 30) - }) - - - output$gauge <- renderEcharts4r({ - e_charts() %>% - e_gauge(as.numeric(input$gaugeVal), "%") - }) - - } -) diff --git a/inst/examples/tabs/app.R b/inst/examples/shinylive/dashboard/app.R similarity index 98% rename from inst/examples/tabs/app.R rename to inst/examples/shinylive/dashboard/app.R index 5d7edb5..db772bc 100644 --- a/inst/examples/tabs/app.R +++ b/inst/examples/shinylive/dashboard/app.R @@ -1,3 +1,5 @@ +webr::install("tablerDash", repos = c("https://rinterface.github.io/rinterface-wasm-cran/", "https://repo.r-wasm.org")) + library(shiny) library(tablerDash) library(echarts4r) @@ -107,7 +109,7 @@ shiny::shinyApp( title = "tablerDash", body = tablerDashBody( - chooseSliderSkin("Nice"), + chooseSliderSkin("Modern"), tablerTabItems( tablerTabItem( tabName = "Home", diff --git a/inst/examples/tabs/rsconnect/130.60.24.205/divadnojnarg/tablerdashdemo.dcf b/inst/examples/tabs/rsconnect/130.60.24.205/divadnojnarg/tablerdashdemo.dcf deleted file mode 100644 index a1f1204..0000000 --- a/inst/examples/tabs/rsconnect/130.60.24.205/divadnojnarg/tablerdashdemo.dcf +++ /dev/null @@ -1,12 +0,0 @@ -name: tablerdashdemo -title: tablerDashDemo -username: divadnojnarg -account: divadnojnarg -server: 130.60.24.205 -hostUrl: http://130.60.24.205:3939/__api__ -appId: 4 -bundleId: 21 -url: http://130.60.24.205:3939/content/4/ -when: 1549454616.05144 -asMultiple: FALSE -asStatic: FALSE diff --git a/inst/examples/tabs/rsconnect/shinyapps.io/dgranjon/tablerDashDemo.dcf b/inst/examples/tabs/rsconnect/shinyapps.io/dgranjon/tablerDashDemo.dcf deleted file mode 100644 index e15fc78..0000000 --- a/inst/examples/tabs/rsconnect/shinyapps.io/dgranjon/tablerDashDemo.dcf +++ /dev/null @@ -1,12 +0,0 @@ -name: tablerDashDemo -title: tablerDashDemo -username: -account: dgranjon -server: shinyapps.io -hostUrl: https://api.shinyapps.io/v1 -appId: 694065 -bundleId: 1859334 -url: https://dgranjon.shinyapps.io/tablerDashDemo/ -when: 1549454140.1919 -asMultiple: FALSE -asStatic: FALSE diff --git a/inst/examples/vanilla_shiny/app.R b/inst/examples/vanilla_shiny/app.R deleted file mode 100644 index 7fcd05b..0000000 --- a/inst/examples/vanilla_shiny/app.R +++ /dev/null @@ -1,174 +0,0 @@ -library(shiny) -library(tablerDash) -library(shinyWidgets) - - -profileCard <- tablerProfileCard( - width = 12, - title = "Peter Richards", - subtitle = "Big belly rude boy, million - dollar hustler. Unemployed.", - background = "https://preview.tabler.io/demo/photos/ilnur-kalimullin-218996-500.jpg", - src = "https://preview.tabler.io/demo/faces/male/16.jpg", - tablerSocialLinks( - tablerSocialLink( - name = "facebook", - href = "https://www.facebook.com", - icon = "facebook" - ), - tablerSocialLink( - name = "twitter", - href = "https://www.twitter.com", - icon = "twitter" - ) - ) -) - - -plotCard <- tablerCard( - title = "Plots", - zoomable = TRUE, - closable = TRUE, - options = tagList( - switchInput( - inputId = "enable_distPlot", - label = "Plot?", - value = TRUE, - onStatus = "success", - offStatus = "danger" - ) - ), - plotOutput("distPlot"), - status = "info", - statusSide = "left", - width = 12, - footer = tagList( - column( - width = 12, - align = "center", - sliderInput( - "obs", - "Number of observations:", - min = 0, - max = 1000, - value = 500 - ) - ) - ) -) - - -# app -shiny::shinyApp( - ui = fluidPage( - useTablerDash(), - chooseSliderSkin("Nice"), - - h1("Import tablerDash elements inside shiny!", align = "center"), - h5("Don't need any sidebar, navbar, ...", align = "center"), - h5("Only focus on basic elements for a pure interface", align = "center"), - - fluidRow( - column( - width = 3, - profileCard, - tablerStatCard( - value = 43, - title = "Followers", - trend = -10, - width = 12 - ), - tablerAvatarList( - stacked = TRUE, - tablerAvatar( - name = "DG", - size = "xxl" - ), - tablerAvatar( - name = "DG", - color = "orange" - ), - tablerAvatar( - name = "DG", - status = "warning" - ), - tablerAvatar(url = "https://image.flaticon.com/icons/svg/145/145852.svg") - ) - ), - column( - width = 6, - plotCard - ), - column( - width = 3, - tablerCard( - width = 12, - tablerTimeline( - tablerTimelineItem( - title = "Item 1", - status = "green", - date = "now" - ), - tablerTimelineItem( - title = "Item 2", - status = NULL, - date = "yesterday", - "Lorem ipsum dolor sit amet, - consectetur adipisicing elit." - ) - ) - ), - tablerInfoCard( - value = "132 sales", - status = "danger", - icon = "dollar-sign", - description = "12 waiting payments", - width = 12 - ), - numericInput( - inputId = "totalStorage", - label = "Enter storage capacity", - value = 1000), - uiOutput("info"), - knobInput( - inputId = "knob", - width = "50%", - label = "Progress value:", - value = 10, - min = 0, - max = 100, - skin = "tron", - displayPrevious = TRUE, - fgColor = "#428BCA", - inputColor = "#428BCA" - ), - uiOutput("progress") - ) - ) - ), - server = function(input, output) { - - output$distPlot <- renderPlot({ - if (input$enable_distPlot) hist(rnorm(input$obs)) - }) - - output$info <- renderUI({ - tablerInfoCard( - width = 12, - value = paste0(input$totalStorage, "GB"), - status = "success", - icon = "database", - description = "Total Storage Capacity" - ) - }) - - - output$progress <- renderUI({ - tagList( - tablerProgress(value = input$knob, size = "xs", status = "yellow"), - tablerProgress(value = input$knob, status = "red", size = "sm") - ) - }) - - } -) diff --git a/inst/examples/vanilla_shiny/rsconnect/shinyapps.io/dgranjon/tablerVanillaShiny.dcf b/inst/examples/vanilla_shiny/rsconnect/shinyapps.io/dgranjon/tablerVanillaShiny.dcf deleted file mode 100644 index a5797a9..0000000 --- a/inst/examples/vanilla_shiny/rsconnect/shinyapps.io/dgranjon/tablerVanillaShiny.dcf +++ /dev/null @@ -1,12 +0,0 @@ -name: tablerVanillaShiny -title: tablerVanillaShiny -username: -account: dgranjon -server: shinyapps.io -hostUrl: https://api.shinyapps.io/v1 -appId: 952750 -bundleId: 2113615 -url: https://dgranjon.shinyapps.io/tablerVanillaShiny/ -when: 1559053308.06512 -asMultiple: FALSE -asStatic: FALSE diff --git a/inst/shinylive/tools.R b/inst/shinylive/tools.R new file mode 100644 index 0000000..d7b6b8f --- /dev/null +++ b/inst/shinylive/tools.R @@ -0,0 +1,19 @@ +pak::pak("parmsam/r-shinylive@feat/encode-decode-url") + +create_shinylive_links <- function(path) { + + dirs <- list.dirs(path)[-1] + + vapply( + list.dirs(path)[-1], + shinylive:::url_encode_dir, + FUN.VALUE = character(1) + ) +} + +create_vignettes_links <- function() { + create_shinylive_links("inst/examples/shinylive") +} + +shinylive_links <- create_vignettes_links() +usethis::use_data(shinylive_links, internal = TRUE, overwrite = TRUE) \ No newline at end of file diff --git a/man/create_app_link.Rd b/man/create_app_link.Rd new file mode 100644 index 0000000..f558701 --- /dev/null +++ b/man/create_app_link.Rd @@ -0,0 +1,19 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/utils.R +\name{create_app_link} +\alias{create_app_link} +\title{Create shinylive iframe} +\usage{ +create_app_link(url, mode = c("app", "editor"), header = TRUE) +} +\arguments{ +\item{url}{app url. A shinylive link.} + +\item{mode}{How to display the shinylive app. Default to app mode.} + +\item{header}{Whether to display the shinylive header. Default to TRUE.} +} +\description{ +Useful for pkgdown website +} +\keyword{internal} diff --git a/man/tablerAvatar.Rd b/man/tablerAvatar.Rd index 2377867..c46210d 100644 --- a/man/tablerAvatar.Rd +++ b/man/tablerAvatar.Rd @@ -4,8 +4,7 @@ \alias{tablerAvatar} \title{Create a Boostrap 4 avatar} \usage{ -tablerAvatar(name = NULL, url = NULL, size = NULL, status = NULL, - color = NULL) +tablerAvatar(name = NULL, url = NULL, size = NULL, status = NULL, color = NULL) } \arguments{ \item{name}{Avatar placeholder. If not NULL, url cannot be used.} diff --git a/man/tablerBlogCard.Rd b/man/tablerBlogCard.Rd index 293c357..52fecae 100644 --- a/man/tablerBlogCard.Rd +++ b/man/tablerBlogCard.Rd @@ -4,9 +4,17 @@ \alias{tablerBlogCard} \title{Create a Boostrap 4 blog card} \usage{ -tablerBlogCard(..., title = NULL, author = NULL, date = NULL, - href = NULL, src = NULL, avatarUrl = NULL, width = 4, - horizontal = FALSE) +tablerBlogCard( + ..., + title = NULL, + author = NULL, + date = NULL, + href = NULL, + src = NULL, + avatarUrl = NULL, + width = 4, + horizontal = FALSE +) } \arguments{ \item{...}{Any other elements.} diff --git a/man/tablerCard.Rd b/man/tablerCard.Rd index 5f96d1f..bdee6a1 100644 --- a/man/tablerCard.Rd +++ b/man/tablerCard.Rd @@ -4,10 +4,20 @@ \alias{tablerCard} \title{Create a Boostrap 4 card} \usage{ -tablerCard(..., title = NULL, options = NULL, footer = NULL, - status = NULL, statusSide = c("top", "left"), collapsible = TRUE, - collapsed = FALSE, closable = TRUE, zoomable = TRUE, width = 6, - overflow = FALSE) +tablerCard( + ..., + title = NULL, + options = NULL, + footer = NULL, + status = NULL, + statusSide = c("top", "left"), + collapsible = TRUE, + collapsed = FALSE, + closable = TRUE, + zoomable = TRUE, + width = 6, + overflow = FALSE +) } \arguments{ \item{...}{Body content} diff --git a/man/tablerDashPage.Rd b/man/tablerDashPage.Rd index 27d6e6e..eee4629 100644 --- a/man/tablerDashPage.Rd +++ b/man/tablerDashPage.Rd @@ -4,8 +4,14 @@ \alias{tablerDashPage} \title{Create a Boostrap 4 dashboard page} \usage{ -tablerDashPage(navbar = NULL, body = NULL, footer = NULL, - title = NULL, enable_preloader = FALSE, loading_duration = 2) +tablerDashPage( + navbar = NULL, + body = NULL, + footer = NULL, + title = NULL, + enable_preloader = FALSE, + loading_duration = 2 +) } \arguments{ \item{navbar}{Slot for \link{tablerDashNav}.} diff --git a/man/tablerDropdownItem.Rd b/man/tablerDropdownItem.Rd index eb7d78b..cb5c94c 100644 --- a/man/tablerDropdownItem.Rd +++ b/man/tablerDropdownItem.Rd @@ -4,8 +4,14 @@ \alias{tablerDropdownItem} \title{Create a Boostrap 4 dashboard dropdown container} \usage{ -tablerDropdownItem(..., title = NULL, href = NULL, url = NULL, - status = NULL, date = NULL) +tablerDropdownItem( + ..., + title = NULL, + href = NULL, + url = NULL, + status = NULL, + date = NULL +) } \arguments{ \item{...}{Item content.} diff --git a/man/tablerInfoCard.Rd b/man/tablerInfoCard.Rd index 29fb72d..4a7358a 100644 --- a/man/tablerInfoCard.Rd +++ b/man/tablerInfoCard.Rd @@ -4,8 +4,7 @@ \alias{tablerInfoCard} \title{Create a Boostrap 4 info card} \usage{ -tablerInfoCard(value, description = NULL, status, icon, href = NULL, - width = 4) +tablerInfoCard(value, description = NULL, status, icon, href = NULL, width = 4) } \arguments{ \item{value}{Card value.} diff --git a/man/tablerMediaCard.Rd b/man/tablerMediaCard.Rd index 766ef84..17b040b 100644 --- a/man/tablerMediaCard.Rd +++ b/man/tablerMediaCard.Rd @@ -4,8 +4,15 @@ \alias{tablerMediaCard} \title{Create a Boostrap 4 media card} \usage{ -tablerMediaCard(..., title = NULL, date = NULL, href = NULL, - src = NULL, avatarUrl = NULL, width = 4) +tablerMediaCard( + ..., + title = NULL, + date = NULL, + href = NULL, + src = NULL, + avatarUrl = NULL, + width = 4 +) } \arguments{ \item{...}{Any other elements.} diff --git a/man/tablerProfileCard.Rd b/man/tablerProfileCard.Rd index b7798a0..dbed6a7 100644 --- a/man/tablerProfileCard.Rd +++ b/man/tablerProfileCard.Rd @@ -4,8 +4,14 @@ \alias{tablerProfileCard} \title{Create a Boostrap 4 profile card} \usage{ -tablerProfileCard(title = NULL, subtitle = NULL, background = NULL, - src = NULL, socials = NULL, width = 4) +tablerProfileCard( + title = NULL, + subtitle = NULL, + background = NULL, + src = NULL, + socials = NULL, + width = 4 +) } \arguments{ \item{title}{Profile title.} diff --git a/man/tablerTag.Rd b/man/tablerTag.Rd index a38beab..ea8e2c5 100644 --- a/man/tablerTag.Rd +++ b/man/tablerTag.Rd @@ -4,8 +4,14 @@ \alias{tablerTag} \title{Create a Boostrap 4 tag} \usage{ -tablerTag(name, href = NULL, rounded = FALSE, color = NULL, - addon = NULL, addonColor = NULL) +tablerTag( + name, + href = NULL, + rounded = FALSE, + color = NULL, + addon = NULL, + addonColor = NULL +) } \arguments{ \item{name}{Tag name.} diff --git a/pkgdown/extra.css b/pkgdown/extra.css index 433189f..3ddab74 100644 --- a/pkgdown/extra.css +++ b/pkgdown/extra.css @@ -17,3 +17,27 @@ .container { padding: 2px 16px; } + +/* bslib cards */ +.bslib-card{overflow:auto}.bslib-card .card-body+.card-body{padding-top:0}.bslib-card .card-body{overflow:auto}.bslib-card .card-body p{margin-top:0}.bslib-card .card-body p:last-child{margin-bottom:0}.bslib-card .card-body{max-height:var(--bslib-card-body-max-height, none)}.bslib-card[data-full-screen="true"]>.card-body{max-height:var(--bslib-card-body-max-height-full-screen, none)}.bslib-card .card-header .form-group{margin-bottom:0}.bslib-card .card-header .selectize-control{margin-bottom:0}.bslib-card .card-header .selectize-control .item{margin-right:1.15rem}.bslib-card .card-footer{margin-top:auto}.bslib-card .bslib-navs-card-title{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center}.bslib-card .bslib-navs-card-title .nav{margin-left:auto}.bslib-card .bslib-sidebar-layout:not([data-bslib-sidebar-border="true"]){border:none}.bslib-card .bslib-sidebar-layout:not([data-bslib-sidebar-border-radius="true"]){border-top-left-radius:0;border-top-right-radius:0}[data-full-screen="true"]{position:fixed;inset:3.5rem 1rem 1rem;height:auto !important;max-height:none !important;width:auto !important;z-index:1070}.bslib-full-screen-enter{display:none;position:absolute;bottom:var(--bslib-full-screen-enter-bottom, 0.2rem);right:var(--bslib-full-screen-enter-right, 0);top:var(--bslib-full-screen-enter-top);left:var(--bslib-full-screen-enter-left);color:var(--bslib-color-fg, var(--bs-card-color));background-color:var(--bslib-color-bg, var(--bs-card-bg, var(--bs-body-bg)));border:var(--bs-card-border-width) solid var(--bslib-color-fg, var(--bs-card-border-color));box-shadow:0 2px 4px rgba(0,0,0,0.15);margin:0.2rem 0.4rem;padding:0.55rem !important;font-size:.8rem;cursor:pointer;opacity:0.7;z-index:1070}.bslib-full-screen-enter:hover{opacity:1}.card[data-full-screen="false"]:hover>*>.bslib-full-screen-enter{display:block}.bslib-has-full-screen .card:hover>*>.bslib-full-screen-enter{display:none}@media (max-width: 575.98px){.bslib-full-screen-enter{display:none !important}}.bslib-full-screen-exit{position:relative;top:1.35rem;font-size:0.9rem;cursor:pointer;text-decoration:none;display:flex;float:right;margin-right:2.15rem;align-items:center;color:rgba(var(--bs-body-bg-rgb), 0.8)}.bslib-full-screen-exit:hover{color:rgba(var(--bs-body-bg-rgb), 1)}.bslib-full-screen-exit svg{margin-left:0.5rem;font-size:1.5rem}#bslib-full-screen-overlay{position:fixed;inset:0;background-color:rgba(var(--bs-body-color-rgb), 0.6);backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px);z-index:1069;animation:bslib-full-screen-overlay-enter 400ms cubic-bezier(0.6, 0.02, 0.65, 1) forwards}@keyframes bslib-full-screen-overlay-enter{0%{opacity:0}100%{opacity:1}} + +/* fill css for fullscreen cards */ +.html-fill-container { + display: flex; + flex-direction: column; + /* Prevent the container from expanding vertically or horizontally beyond its + parent's constraints. */ + min-height: 0; + min-width: 0; +} +.html-fill-container > .html-fill-item { + /* Fill items can grow and shrink freely within + available vertical space in fillable container */ + flex: 1 1 auto; + min-height: 0; + min-width: 0; +} +.html-fill-container > :not(.html-fill-item) { + /* Prevent shrinking or growing of non-fill items */ + flex: 0 0 auto; +} \ No newline at end of file diff --git a/pkgdown/extra.js b/pkgdown/extra.js new file mode 100644 index 0000000..879ceb6 --- /dev/null +++ b/pkgdown/extra.js @@ -0,0 +1,804 @@ +/*! bslib 0.8.0 | (c) 2012-2024 RStudio, PBC. | License: MIT + file LICENSE */ +"use strict"; +( () => { + var f = (r, e) => () => (r && (e = r(r = 0)), + e); + var X = (r, e) => () => (e || r((e = { + exports: {} + }).exports, e), + e.exports); + var k = (r, e, t) => { + if (!e.has(r)) + throw TypeError("Cannot " + t) + } + ; + var v = (r, e, t) => (k(r, e, "read from private field"), + t ? t.call(r) : e.get(r)) + , H = (r, e, t) => { + if (e.has(r)) + throw TypeError("Cannot add the same private member more than once"); + e instanceof WeakSet ? e.add(r) : e.set(r, t) + } + ; + var O = (r, e, t) => (k(r, e, "access private method"), + t); + var h = (r, e, t) => new Promise( (i, s) => { + var n = o => { + try { + d(t.next(o)) + } catch (b) { + s(b) + } + } + , l = o => { + try { + d(t.throw(o)) + } catch (b) { + s(b) + } + } + , d = o => o.done ? i(o.value) : Promise.resolve(o.value).then(n, l); + d((t = t.apply(r, e)).next()) + } + ); + function y(r, e) { + u && u.inputBindings.register(new r, "bslib." + e) + } + function _(r, e) { + window.bslib = window.bslib || {}, + window.bslib[r] ? console.error(`[bslib] Global window.bslib.${r} was already defined, using previous definition.`) : window.bslib[r] = e + } + function w(r, e) { + return Object.prototype.hasOwnProperty.call(r, e) && r[e] !== void 0 + } + function U(r) { + let e = ["a[href]", "area[href]", "button", "details summary", "input", "iframe", "select", "textarea", '[contentEditable=""]', '[contentEditable="true"]', '[contentEditable="TRUE"]', "[tabindex]"] + , t = [':not([tabindex="-1"])', ":not([disabled])"] + , i = e.map(n => n + t.join("")) + , s = r.querySelectorAll(i.join(", ")); + return Array.from(s) + } + function E(...r) { + return h(this, null, function*() { + if (!u) + throw new Error("This function must be called in a Shiny app."); + return u.renderContentAsync ? yield u.renderContentAsync.apply(null, r) : yield u.renderContent.apply(null, r) + }) + } + var u, m, L = f( () => { + "use strict"; + u = window.Shiny, + m = u ? u.InputBinding : class { + } + } + ); + var R, B = f( () => { + "use strict"; + L(); + R = class extends m { + find(e) { + return $(e).find(".accordion.bslib-accordion-input") + } + getValue(e) { + let i = this._getItemInfo(e).filter(s => s.isOpen()).map(s => s.value); + return i.length === 0 ? null : i + } + subscribe(e, t) { + $(e).on("shown.bs.collapse.accordionInputBinding hidden.bs.collapse.accordionInputBinding", function(i) { + t(!0) + }) + } + unsubscribe(e) { + $(e).off(".accordionInputBinding") + } + receiveMessage(e, t) { + return h(this, null, function*() { + let i = t.method; + if (i === "set") + this._setItems(e, t); + else if (i === "open") + this._openItems(e, t); + else if (i === "close") + this._closeItems(e, t); + else if (i === "remove") + this._removeItem(e, t); + else if (i === "insert") + yield this._insertItem(e, t); + else if (i === "update") + yield this._updateItem(e, t); + else + throw new Error(`Method not yet implemented: ${i}`) + }) + } + _setItems(e, t) { + let i = this._getItemInfo(e) + , s = this._getValues(e, i, t.values); + i.forEach(n => { + s.indexOf(n.value) > -1 ? n.show() : n.hide() + } + ) + } + _openItems(e, t) { + let i = this._getItemInfo(e) + , s = this._getValues(e, i, t.values); + i.forEach(n => { + s.indexOf(n.value) > -1 && n.show() + } + ) + } + _closeItems(e, t) { + let i = this._getItemInfo(e) + , s = this._getValues(e, i, t.values); + i.forEach(n => { + s.indexOf(n.value) > -1 && n.hide() + } + ) + } + _insertItem(e, t) { + return h(this, null, function*() { + let i = this._findItem(e, t.target); + i || (i = t.position === "before" ? e.firstElementChild : e.lastElementChild); + let s = t.panel; + if (i ? yield E(i, s, t.position === "before" ? "beforeBegin" : "afterEnd") : yield E(e, s), + this._isAutoClosing(e)) { + let n = $(s.html).attr("data-value"); + $(e).find(`[data-value="${n}"] .accordion-collapse`).attr("data-bs-parent", "#" + e.id) + } + }) + } + _removeItem(e, t) { + var n; + let i = this._getItemInfo(e).filter(l => t.target.indexOf(l.value) > -1) + , s = (n = window.Shiny) == null ? void 0 : n.unbindAll; + i.forEach(l => { + s && s(l.item), + l.item.remove() + } + ) + } + _updateItem(e, t) { + return h(this, null, function*() { + let i = this._findItem(e, t.target); + if (!i) + throw new Error(`Unable to find an accordion_panel() with a value of ${t.target}`); + if (w(t, "value") && (i.dataset.value = t.value), + w(t, "body")) { + let n = i.querySelector(".accordion-body"); + yield E(n, t.body) + } + let s = i.querySelector(".accordion-header"); + if (w(t, "title")) { + let n = s.querySelector(".accordion-title"); + yield E(n, t.title) + } + if (w(t, "icon")) { + let n = s.querySelector(".accordion-button > .accordion-icon"); + yield E(n, t.icon) + } + }) + } + _getItemInfo(e) { + return Array.from(e.querySelectorAll(":scope > .accordion-item")).map(i => this._getSingleItemInfo(i)) + } + _getSingleItemInfo(e) { + let t = e.querySelector(".accordion-collapse") + , i = () => $(t).hasClass("show"); + return { + item: e, + value: e.dataset.value, + isOpen: i, + show: () => { + i() || $(t).collapse("show") + } + , + hide: () => { + i() && $(t).collapse("hide") + } + } + } + _getValues(e, t, i) { + let s = i !== !0 ? i : t.map(l => l.value); + return this._isAutoClosing(e) && (s = s.slice(s.length - 1, s.length)), + s + } + _findItem(e, t) { + return e.querySelector(`[data-value="${t}"]`) + } + _isAutoClosing(e) { + return e.classList.contains("autoclose") + } + } + ; + y(R, "accordion") + } + ); + var S, z = f( () => { + "use strict"; + S = class { + constructor() { + this.resizeObserverEntries = [], + this.resizeObserver = new ResizeObserver(e => { + let t = new Event("resize"); + if (window.dispatchEvent(t), + !window.Shiny) + return; + let i = []; + for (let s of e) + s.target instanceof HTMLElement && s.target.querySelector(".shiny-bound-output") && s.target.querySelectorAll(".shiny-bound-output").forEach(n => { + if (i.includes(n)) + return; + let {binding: l, onResize: d} = $(n).data("shinyOutputBinding"); + if (!l || !l.resize) + return; + let o = n.shinyResizeObserver; + if (o && o !== this || (o || (n.shinyResizeObserver = this), + d(n), + i.push(n), + !n.classList.contains("shiny-plot-output"))) + return; + let b = n.querySelector('img:not([width="100%"])'); + b && b.setAttribute("width", "100%") + } + ) + } + ) + } + observe(e) { + this.resizeObserver.observe(e), + this.resizeObserverEntries.push(e) + } + unobserve(e) { + let t = this.resizeObserverEntries.indexOf(e); + t < 0 || (this.resizeObserver.unobserve(e), + this.resizeObserverEntries.splice(t, 1)) + } + flush() { + this.resizeObserverEntries.forEach(e => { + document.body.contains(e) || this.unobserve(e) + } + ) + } + } + } + ); + var I, q = f( () => { + "use strict"; + I = class { + constructor(e, t) { + this.watching = new Set, + this.observer = new MutationObserver(i => { + let s = new Set; + for (let {type: n, removedNodes: l} of i) + if (n === "childList" && l.length !== 0) + for (let d of l) + d instanceof HTMLElement && (d.matches(e) && s.add(d), + d.querySelector(e) && d.querySelectorAll(e).forEach(o => s.add(o))); + if (s.size !== 0) + for (let n of s) + try { + t(n) + } catch (l) { + console.error(l) + } + } + ) + } + observe(e) { + let t = this._flush(); + if (this.watching.has(e)) { + if (!t) + return + } else + this.watching.add(e); + t ? this._restartObserver() : this.observer.observe(e, { + childList: !0, + subtree: !0 + }) + } + unobserve(e) { + this.watching.has(e) && (this.watching.delete(e), + this._flush(), + this._restartObserver()) + } + _restartObserver() { + this.observer.disconnect(); + for (let e of this.watching) + this.observer.observe(e, { + childList: !0, + subtree: !0 + }) + } + _flush() { + let e = !1 + , t = Array.from(this.watching); + for (let i of t) + document.body.contains(i) || (this.watching.delete(i), + e = !0); + return e + } + } + } + ); + var a, g, D = f( () => { + "use strict"; + L(); + z(); + q(); + a = class { + constructor(e) { + var t; + e.removeAttribute(a.attr.ATTR_INIT), + (t = e.querySelector(`script[${a.attr.ATTR_INIT}]`)) == null || t.remove(), + this.card = e, + a.instanceMap.set(e, this), + a.shinyResizeObserver.observe(this.card), + a.cardRemovedObserver.observe(document.body), + this._addEventListeners(), + this.overlay = this._createOverlay(), + this._setShinyInput(), + this._exitFullScreenOnEscape = this._exitFullScreenOnEscape.bind(this), + this._trapFocusExit = this._trapFocusExit.bind(this) + } + enterFullScreen(e) { + var t; + e && e.preventDefault(), + this.card.id && this.overlay.anchor.setAttribute("aria-controls", this.card.id), + document.addEventListener("keydown", this._exitFullScreenOnEscape, !1), + document.addEventListener("keydown", this._trapFocusExit, !0), + this.card.setAttribute(a.attr.ATTR_FULL_SCREEN, "true"), + document.body.classList.add(a.attr.CLASS_HAS_FULL_SCREEN), + this.card.insertAdjacentElement("beforebegin", this.overlay.container), + (!this.card.contains(document.activeElement) || (t = document.activeElement) != null && t.classList.contains(a.attr.CLASS_FULL_SCREEN_ENTER)) && (this.card.setAttribute("tabindex", "-1"), + this.card.focus()), + this._emitFullScreenEvent(!0), + this._setShinyInput() + } + exitFullScreen() { + document.removeEventListener("keydown", this._exitFullScreenOnEscape, !1), + document.removeEventListener("keydown", this._trapFocusExit, !0), + this.overlay.container.remove(), + this.card.setAttribute(a.attr.ATTR_FULL_SCREEN, "false"), + this.card.removeAttribute("tabindex"), + document.body.classList.remove(a.attr.CLASS_HAS_FULL_SCREEN), + this._emitFullScreenEvent(!1), + this._setShinyInput() + } + _setShinyInput() { + if (!this.card.classList.contains(a.attr.CLASS_SHINY_INPUT) || !u) + return; + if (!u.setInputValue) { + setTimeout( () => this._setShinyInput(), 0); + return + } + let e = this.card.getAttribute(a.attr.ATTR_FULL_SCREEN); + u.setInputValue(this.card.id + "_full_screen", e === "true") + } + _emitFullScreenEvent(e) { + let t = new CustomEvent("bslib.card",{ + bubbles: !0, + detail: { + fullScreen: e + } + }); + this.card.dispatchEvent(t) + } + _addEventListeners() { + let e = this.card.querySelector(`:scope > * > .${a.attr.CLASS_FULL_SCREEN_ENTER}`); + e && e.addEventListener("click", t => this.enterFullScreen(t)) + } + _exitFullScreenOnEscape(e) { + if (!(e.target instanceof HTMLElement)) + return; + let t = ["select[open]", "input[aria-expanded='true']"]; + e.target.matches(t.join(", ")) || e.key === "Escape" && this.exitFullScreen() + } + _trapFocusExit(e) { + if (!(e instanceof KeyboardEvent) || e.key !== "Tab") + return; + let t = e.target === this.card + , i = e.target === this.overlay.anchor + , s = this.card.contains(e.target) + , n = () => { + e.preventDefault(), + e.stopImmediatePropagation() + } + ; + if (!(s || t || i)) { + n(), + this.card.focus(); + return + } + let l = U(this.card).filter(A => !A.classList.contains(a.attr.CLASS_FULL_SCREEN_ENTER)); + if (!(l.length > 0)) { + n(), + this.overlay.anchor.focus(); + return + } + if (t) + return; + let o = l[l.length - 1] + , b = e.target === o; + if (i && e.shiftKey) { + n(), + o.focus(); + return + } + if (b && !e.shiftKey) { + n(), + this.overlay.anchor.focus(); + return + } + } + _createOverlay() { + let e = document.createElement("div"); + e.id = a.attr.ID_FULL_SCREEN_OVERLAY, + e.onclick = this.exitFullScreen.bind(this); + let t = this._createOverlayCloseAnchor(); + return e.appendChild(t), + { + container: e, + anchor: t + } + } + _createOverlayCloseAnchor() { + let e = document.createElement("a"); + return e.classList.add(a.attr.CLASS_FULL_SCREEN_EXIT), + e.tabIndex = 0, + e.setAttribute("aria-expanded", "true"), + e.setAttribute("aria-label", "Close card"), + e.setAttribute("role", "button"), + e.onclick = t => { + this.exitFullScreen(), + t.stopPropagation() + } + , + e.onkeydown = t => { + (t.key === "Enter" || t.key === " ") && this.exitFullScreen() + } + , + e.innerHTML = this._overlayCloseHtml(), + e + } + _overlayCloseHtml() { + return "Close " + } + static getInstance(e) { + return a.instanceMap.get(e) + } + static initializeAllCards(e=!0) { + if (document.readyState === "loading") { + a.onReadyScheduled || (a.onReadyScheduled = !0, + document.addEventListener("DOMContentLoaded", () => { + a.initializeAllCards(!1) + } + )); + return + } + e && a.shinyResizeObserver.flush(); + let t = `.${a.attr.CLASS_CARD}[${a.attr.ATTR_INIT}]`; + if (!document.querySelector(t)) + return; + document.querySelectorAll(t).forEach(s => new a(s)) + } + } + , + g = a; + g.attr = { + ATTR_INIT: "data-bslib-card-init", + CLASS_CARD: "bslib-card", + ATTR_FULL_SCREEN: "data-full-screen", + CLASS_HAS_FULL_SCREEN: "bslib-has-full-screen", + CLASS_FULL_SCREEN_ENTER: "bslib-full-screen-enter", + CLASS_FULL_SCREEN_EXIT: "bslib-full-screen-exit", + ID_FULL_SCREEN_OVERLAY: "bslib-full-screen-overlay", + CLASS_SHINY_INPUT: "bslib-card-input" + }, + g.shinyResizeObserver = new S, + g.cardRemovedObserver = new I(`.${a.attr.CLASS_CARD}`,e => { + let t = a.getInstance(e); + t && t.card.getAttribute(a.attr.ATTR_FULL_SCREEN) === "true" && t.exitFullScreen() + } + ), + g.instanceMap = new WeakMap, + g.onReadyScheduled = !1; + _("Card", g) + } + ); + var c, p, F, P = f( () => { + "use strict"; + L(); + z(); + c = class { + constructor(e) { + this.windowSize = ""; + var s; + c.instanceMap.set(e, this), + this.layout = { + container: e, + main: e.querySelector(":scope > .main"), + sidebar: e.querySelector(":scope > .sidebar"), + toggle: e.querySelector(":scope > .collapse-toggle") + }; + let t = this.layout.sidebar.querySelector(":scope > .sidebar-content > .accordion"); + t && ((s = t == null ? void 0 : t.parentElement) == null || s.classList.add("has-accordion"), + t.classList.add("accordion-flush")), + this._initSidebarCounters(), + this._initSidebarState(), + (this._isCollapsible("desktop") || this._isCollapsible("mobile")) && this._initEventListeners(), + c.shinyResizeObserver.observe(this.layout.main), + e.removeAttribute("data-bslib-sidebar-init"); + let i = e.querySelector(":scope > script[data-bslib-sidebar-init]"); + i && e.removeChild(i) + } + get isClosed() { + return this.layout.container.classList.contains(c.classes.COLLAPSE) + } + static getInstance(e) { + return c.instanceMap.get(e) + } + _isCollapsible(e="desktop") { + let {container: t} = this.layout + , i = e === "desktop" ? "collapsibleDesktop" : "collapsibleMobile" + , s = t.dataset[i]; + return s === void 0 ? !0 : s.trim().toLowerCase() !== "false" + } + static initCollapsibleAll(e=!0) { + if (document.readyState === "loading") { + c.onReadyScheduled || (c.onReadyScheduled = !0, + document.addEventListener("DOMContentLoaded", () => { + c.initCollapsibleAll(!1) + } + )); + return + } + let t = `.${c.classes.LAYOUT}[data-bslib-sidebar-init]`; + if (!document.querySelector(t)) + return; + e && c.shinyResizeObserver.flush(), + document.querySelectorAll(t).forEach(s => new c(s)) + } + _initEventListeners() { + var t; + let {toggle: e} = this.layout; + e.addEventListener("click", i => { + i.preventDefault(), + this.toggle("toggle") + } + ), + (t = e.querySelector(".collapse-icon")) == null || t.addEventListener("transitionend", () => this._finalizeState()), + !(this._isCollapsible("desktop") && this._isCollapsible("mobile")) && window.addEventListener("resize", () => this._handleWindowResizeEvent()) + } + _initSidebarCounters() { + let {container: e} = this.layout + , t = `.${c.classes.LAYOUT}> .main > .${c.classes.LAYOUT}:not([data-bslib-sidebar-open="always"])`; + if (!(e.querySelector(t) === null)) + return; + function s(o) { + return o = o ? o.parentElement : null, + o && o.classList.contains("main") && (o = o.parentElement), + o && o.classList.contains(c.classes.LAYOUT) ? o : null + } + let n = [e] + , l = s(e); + for (; l; ) + n.unshift(l), + l = s(l); + let d = { + left: 0, + right: 0 + }; + n.forEach(function(o) { + let A = o.classList.contains("sidebar-right") ? d.right++ : d.left++; + o.style.setProperty("--_js-toggle-count-this-side", A.toString()), + o.style.setProperty("--_js-toggle-count-max-side", Math.max(d.right, d.left).toString()) + }) + } + _getWindowSize() { + let {container: e} = this.layout; + return window.getComputedStyle(e).getPropertyValue("--bslib-sidebar-js-window-size").trim() + } + _initialToggleState() { + var s, n; + let {container: e} = this.layout + , t = this.windowSize === "desktop" ? "openDesktop" : "openMobile" + , i = (n = (s = e.dataset[t]) == null ? void 0 : s.trim()) == null ? void 0 : n.toLowerCase(); + return i === void 0 || ["open", "always"].includes(i) ? "open" : ["close", "closed"].includes(i) ? "close" : "open" + } + _initSidebarState() { + this.windowSize = this._getWindowSize(); + let e = this._initialToggleState(); + this.toggle(e, !0) + } + _handleWindowResizeEvent() { + let e = this._getWindowSize(); + !e || e == this.windowSize || this._initSidebarState() + } + toggle(e, t=!1) { + typeof e == "undefined" ? e = "toggle" : e === "closed" && (e = "close"); + let {container: i, sidebar: s} = this.layout + , n = this.isClosed; + if (["open", "close", "toggle"].indexOf(e) === -1) + throw new Error(`Unknown method ${e}`); + if (e === "toggle" && (e = n ? "open" : "close"), + n && e === "close" || !n && e === "open") { + t && this._finalizeState(); + return + } + e === "open" && (s.hidden = !1), + i.classList.toggle(c.classes.TRANSITIONING, !t), + i.classList.toggle(c.classes.COLLAPSE), + t && this._finalizeState() + } + _finalizeState() { + let {container: e, sidebar: t, toggle: i} = this.layout; + e.classList.remove(c.classes.TRANSITIONING), + t.hidden = this.isClosed, + i.setAttribute("aria-expanded", this.isClosed ? "false" : "true"); + let s = new CustomEvent("bslib.sidebar",{ + bubbles: !0, + detail: { + open: !this.isClosed + } + }); + t.dispatchEvent(s), + $(t).trigger("toggleCollapse.sidebarInputBinding"), + $(t).trigger(this.isClosed ? "hidden" : "shown") + } + } + , + p = c; + p.shinyResizeObserver = new S, + p.classes = { + LAYOUT: "bslib-sidebar-layout", + COLLAPSE: "sidebar-collapsed", + TRANSITIONING: "transitioning" + }, + p.onReadyScheduled = !1, + p.instanceMap = new WeakMap; + F = class extends m { + find(e) { + return $(e).find(`.${p.classes.LAYOUT} > .bslib-sidebar-input`) + } + getValue(e) { + let t = p.getInstance(e.parentElement); + return t ? !t.isClosed : !1 + } + setValue(e, t) { + let i = t ? "open" : "close"; + this.receiveMessage(e, { + method: i + }) + } + subscribe(e, t) { + $(e).on("toggleCollapse.sidebarInputBinding", function(i) { + t(!0) + }) + } + unsubscribe(e) { + $(e).off(".sidebarInputBinding") + } + receiveMessage(e, t) { + let i = p.getInstance(e.parentElement); + i && i.toggle(t.method) + } + } + ; + y(F, "sidebar"); + _("Sidebar", p) + } + ); + var T, M, C, x, N, W = f( () => { + "use strict"; + L(); + N = class extends m { + constructor() { + super(...arguments); + H(this, C); + H(this, T, new WeakMap); + H(this, M, new WeakMap) + } + find(t) { + return $(t).find(".bslib-task-button") + } + getValue(t) { + var i; + return { + value: (i = v(this, T).get(t)) != null ? i : 0, + autoReset: t.hasAttribute("data-auto-reset") + } + } + getType() { + return "bslib.taskbutton" + } + subscribe(t, i) { + v(this, M).has(t) && this.unsubscribe(t); + let s = () => { + var n; + v(this, T).set(t, ((n = v(this, T).get(t)) != null ? n : 0) + 1), + i(!0), + O(this, C, x).call(this, t, "busy") + } + ; + v(this, M).set(t, s), + t.addEventListener("click", s) + } + unsubscribe(t) { + let i = v(this, M).get(t); + i && t.removeEventListener("click", i) + } + receiveMessage(s, n) { + return h(this, arguments, function*(t, {state: i}) { + O(this, C, x).call(this, t, i) + }) + } + } + ; + T = new WeakMap, + M = new WeakMap, + C = new WeakSet, + x = function(t, i) { + t.disabled = i === "busy"; + let s = t.querySelector("bslib-switch-inline"); + s && (s.case = i) + } + ; + y(N, "task-button") + } + ); + function V(r) { + if (window.Shiny) + for (let[e,t] of Object.entries(r)) + window.Shiny.addCustomMessageHandler(e, t) + } + var j = f( () => { + "use strict" + } + ); + var Z = X(Y => { + B(); + D(); + P(); + W(); + L(); + j(); + var K = { + "bslib.toggle-input-binary": r => h(Y, null, function*() { + let e = document.getElementById(r.id); + e || console.warn("[bslib.toggle-input-binary] No element found", r); + let t = $(e).data("shiny-input-binding"); + if (!(t instanceof m)) { + console.warn("[bslib.toggle-input-binary] No input binding found", r); + return + } + let i = r.value; + typeof i == "undefined" && (i = !t.getValue(e)), + yield t.receiveMessage(e, { + value: i + }) + }) + }; + window.Shiny && V(K); + function G() { + let r = document.createElement("div"); + r.innerHTML = ` + `, + document.body.appendChild(r.children[0]) + } + document.readyState === "complete" ? G() : document.addEventListener("DOMContentLoaded", G) + } + ); + Z(); +} +)(); +//# sourceMappingURL=components.min.js.map