diff --git a/.Rbuildignore b/.Rbuildignore index f0fc408..e5d17da 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -11,3 +11,4 @@ ^CODE_OF_CONDUCT\.md$ ^_pkgdown\.yml$ ^pkgdown$ +^README\.Rmd$ diff --git a/DESCRIPTION b/DESCRIPTION index 5bd3a8e..7ea4f0a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -18,3 +18,5 @@ BugReports: https://github.com/RinteRface/argonDash/issues Encoding: UTF-8 LazyData: true RoxygenNote: 7.0.1 +Depends: + R (>= 2.10) diff --git a/R/sysdata.rda b/R/sysdata.rda new file mode 100644 index 0000000..3fa2208 Binary files /dev/null and b/R/sysdata.rda differ diff --git a/R/utils.R b/R/utils.R index 22ecf09..778425d 100644 --- a/R/utils.R +++ b/R/utils.R @@ -12,22 +12,25 @@ tagAssert <- function(tag, type = NULL, class = NULL, allowUI = TRUE) { print(tag) stop("Expected an object with class 'shiny.tag'.") } - + # Skip dynamic output elements - if (allowUI && - (hasCssClass(tag, "shiny-html-output") || - hasCssClass(tag, "shinydashboard-menu-output"))) { + if ( + allowUI && + ( + hasCssClass(tag, "shiny-html-output") || + hasCssClass(tag, "shinydashboard-menu-output") + ) + ) { return() } - + if (!is.null(type) && tag$name != type) { stop("Expected tag to be of type ", type) } - + if (!is.null(class)) { if (is.null(tag$attribs$class)) { stop("Expected tag to have class '", class, "'") - } else { tagClasses <- strsplit(tag$attribs$class, " ")[[1]] if (!(class %in% tagClasses)) { @@ -37,19 +40,46 @@ tagAssert <- function(tag, type = NULL, class = NULL, allowUI = TRUE) { } } - hasCssClass <- function(tag, class) { - if (is.null(tag$attribs) || is.null(tag$attribs$class)) - return(FALSE) - + if (is.null(tag$attribs) || is.null(tag$attribs$class)) return(FALSE) + classes <- strsplit(tag$attribs$class, " +")[[1]] return(class %in% classes) } - # Make sure a tab name is valid (there's no "." in it). validateTabName <- function(name) { if (grepl(".", name, fixed = TRUE)) { stop("tabName must not have a '.' in it.") } -} \ No newline at end of file +} + +#' 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" + ) +} diff --git a/README.Rmd b/README.Rmd new file mode 100644 index 0000000..840b425 --- /dev/null +++ b/README.Rmd @@ -0,0 +1,63 @@ +--- +output: github_document +--- + + + +```{r, include = FALSE} +knitr::opts_chunk$set( + collapse = TRUE, + comment = "#>", + fig.path = "man/figures/README-", + out.width = "100%" +) +``` + +# argonDash + +[![R build status](https://github.com/RinteRface/argonDash/workflows/R-CMD-check/badge.svg)](https://github.com/RinteRface/argonDash/actions) +[![CRAN status](https://www.r-pkg.org/badges/version/argonDash)](https://cran.r-project.org/package=argonDash) +[![lifecycle](https://img.shields.io/badge/lifecycle-maturing-ff69b4.svg)](https://www.tidyverse.org/lifecycle/#maturing) +[![cranlogs](https://cranlogs.r-pkg.org/badges/argonDash)](https://cran.r-project.org/package=argonDash) +[![total](https://cranlogs.r-pkg.org/badges/grand-total/argonDash)](https://www.rpackages.io/package/argonDash) + +> argon Bootstrap4 dashboard template for Shiny + +## Installation + +`{argonDash}` requires to install `{argonR}`. + +```r +install.packages("argonR") +# devel version +devtools::install_github("RinteRface/argonDash") +# from CRAN +install.packages("argonDash") +``` + +## Demo + +```r +library(argonDash) +argonDashGallery() +``` + +### Vertical layout +
+ + +### Horizontal layout + +This layout is experimental. + +
+ + +## Aknowledgement + +* [Creative Tim](https://www.creative-tim.com/) for designing the original argon dashboard HTML template. + +## Code of Conduct + + Please note that the argonDash 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 f20b173..86d16bf 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,12 @@ + + + # argonDash -[![R build status](https://github.com/RinteRface/argonDash/workflows/R-CMD-check/badge.svg)](https://github.com/RinteRface/argonDash/actions) -[![CRAN status](https://www.r-pkg.org/badges/version/argonDash)](https://cran.r-project.org/package=argonDash) +[![R build +status](https://github.com/RinteRface/argonDash/workflows/R-CMD-check/badge.svg)](https://github.com/RinteRface/argonDash/actions) +[![CRAN +status](https://www.r-pkg.org/badges/version/argonDash)](https://cran.r-project.org/package=argonDash) [![lifecycle](https://img.shields.io/badge/lifecycle-maturing-ff69b4.svg)](https://www.tidyverse.org/lifecycle/#maturing) [![cranlogs](https://cranlogs.r-pkg.org/badges/argonDash)](https://cran.r-project.org/package=argonDash) [![total](https://cranlogs.r-pkg.org/badges/grand-total/argonDash)](https://www.rpackages.io/package/argonDash) @@ -12,7 +17,7 @@ `{argonDash}` requires to install `{argonR}`. -```r +``` r install.packages("argonR") # devel version devtools::install_github("RinteRface/argonDash") @@ -22,26 +27,29 @@ install.packages("argonDash") ## Demo -```r +``` r library(argonDash) argonDashGallery() ``` ### Vertical layout -
- + +
### Horizontal layout This layout is experimental. -
- +
## Aknowledgement -* [Creative Tim](https://www.creative-tim.com/) for designing the original argon dashboard HTML template. +- [Creative Tim](https://www.creative-tim.com/) for designing the + original argon dashboard HTML template. ## Code of Conduct - - Please note that the argonDash 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 argonDash 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 4471de8..1fac18e 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -41,10 +41,8 @@ reference: - '`argonDashGallery`' template: - params: - bootswatch: journal - - + bootstrap: 5 + navbar: structure: left: @@ -69,8 +67,10 @@ navbar: icon: fa-github fa-lg href: https://github.com/RinteRface/argonDash +url: https://rinterface.github.io/argonDash/ news: releases: + - text: "argonDash 0.3.0.9000" - text: "argonDash 0.2.0" - text: "argonDash 0.1.0" diff --git a/docs/404.html b/docs/404.html index 2c62119..38e99c6 100644 --- a/docs/404.html +++ b/docs/404.html @@ -1,148 +1,74 @@ - - - - + + + + - - + Page not found (404) • argonDash + + + + + + + + + Skip to contents - - - - - - - - - - - - - - - - - - - - - - - - - - - +
-
- - - - +
- -
- -
-
- + - - diff --git a/docs/CODE_OF_CONDUCT.html b/docs/CODE_OF_CONDUCT.html index 4456075..2f6100b 100644 --- a/docs/CODE_OF_CONDUCT.html +++ b/docs/CODE_OF_CONDUCT.html @@ -1,229 +1,121 @@ - - - - - - +Contributor Covenant Code of Conduct • argonDash + Skip to contents -Contributor Covenant Code of Conduct • argonDash +
-
- - - -
- - -
- +
+ - - - + diff --git a/docs/authors.html b/docs/authors.html index a708480..4fd5f05 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -1,155 +1,86 @@ - - - - - - +Authors and Citation • argonDash + Skip to contents -Authors • argonDash +
+
+
-
- -
- - -
+ - - - + diff --git a/docs/index.html b/docs/index.html index 677c948..8a8d7f2 100644 --- a/docs/index.html +++ b/docs/index.html @@ -4,184 +4,163 @@ - + Argon Shiny Dashboard Template • argonDash - - - - - - - - + + + + + + + + - -
-
-
-
- +
+
+
+ - +

R build status CRAN status lifecycle cranlogs total

argon Bootstrap4 dashboard template for Shiny

-
-

-Installation

-

argonDash requires to install argonR.

+
+

Installation +

+

argonDash requires to install argonR.

-install.packages("argonR")
-# devel version
-devtools::install_github("RinteRface/argonDash")
-# from CRAN
-install.packages("argonDash")
-
-
-

-Demo

-

See a demonstration on shinyapps.io.

+install.packages("argonR") +# devel version +devtools::install_github("RinteRface/argonDash") +# from CRAN +install.packages("argonDash")
+
+
+

Demo +

+

You can play with the demo app below and modify the code.

+
+
+ +
+ +
+


-
-

-Vertical layout

-


-
-
-

-Horizontal layout

+library(argonDash) +argonDashGallery()
+
+

Vertical layout +

+


argon dashboard demo with vertical layout

+
+
+

Horizontal layout +

This layout is experimental.

-


+


argon dashboard demo with horizontal layout

-
-

-Aknowledgement

+
+

Aknowledgement +

  • -Creative Tim for designing the original argon dashboard HTML template.
  • +Creative Tim for designing the original argon dashboard HTML template.
-
-

-Code of Conduct

-

Please note that the argonDash 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 argonDash 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 61a0183..f52105a 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -1,225 +1,100 @@ - - - - - - +Changelog • argonDash + Skip to contents -Changelog • argonDash +
-
- -
-

-argonDash 0.2.0 2019-11-27 -

-
-

-Major Note

-
    -
  • add support for shinyapps.io, RStudio connect and shiny server pro
  • -
-
-
-

-Documentation

-
+
+

Bug fix

+
+
+

Breaking changes

+

In order to enable user to choose between shiny::icon() and argonR::argonIcon(): - Change icon args of argonDropNavItem(), argonSidebarItem() and argonInfoCard() - remove icon_color arg from argonSidebarItem() - stat_icon arg of argonInfoCard() can use either icon() or argonIcon()

-
- - -
+
+

argonDash 0.1.0

CRAN release: 2018-12-03

+
  • first release
  • +
+
-
- +
+ - - - + diff --git a/docs/pkgdown.css b/docs/pkgdown.css index 1273238..80ea5b8 100644 --- a/docs/pkgdown.css +++ b/docs/pkgdown.css @@ -56,8 +56,10 @@ img.icon { float: right; } -img { +/* Ensure in-page images don't run outside their container */ +.contents img { max-width: 100%; + height: auto; } /* Fix bug in bootstrap (only seen in firefox) */ @@ -78,11 +80,10 @@ dd { /* Section anchors ---------------------------------*/ a.anchor { - margin-left: -30px; - display:inline-block; - width: 30px; - height: 30px; - visibility: hidden; + display: none; + margin-left: 5px; + width: 20px; + height: 20px; background-image: url(./link.svg); background-repeat: no-repeat; @@ -90,17 +91,15 @@ a.anchor { background-position: center center; } -.hasAnchor:hover a.anchor { - visibility: visible; -} - -@media (max-width: 767px) { - .hasAnchor:hover a.anchor { - visibility: hidden; - } +h1:hover .anchor, +h2:hover .anchor, +h3:hover .anchor, +h4:hover .anchor, +h5:hover .anchor, +h6:hover .anchor { + display: inline-block; } - /* Fixes for fixed navbar --------------------------*/ .contents h1, .contents h2, .contents h3, .contents h4 { @@ -264,31 +263,26 @@ table { /* Syntax highlighting ---------------------------------------------------- */ -pre { - word-wrap: normal; - word-break: normal; - border: 1px solid #eee; -} - -pre, code { +pre, code, pre code { background-color: #f8f8f8; color: #333; } +pre, pre code { + white-space: pre-wrap; + word-break: break-all; + overflow-wrap: break-word; +} -pre code { - overflow: auto; - word-wrap: normal; - white-space: pre; +pre { + border: 1px solid #eee; } -pre .img { +pre .img, pre .r-plt { margin: 5px 0; } -pre .img img { +pre .img img, pre .r-plt img { background-color: #fff; - display: block; - height: auto; } code a, pre a { @@ -305,9 +299,8 @@ a.sourceLine:hover { .kw {color: #264D66;} /* keyword */ .co {color: #888888;} /* comment */ -.message { color: black; font-weight: bolder;} -.error { color: orange; font-weight: bolder;} -.warning { color: #6A0366; font-weight: bolder;} +.error {font-weight: bolder;} +.warning {font-weight: bolder;} /* Clipboard --------------------------*/ @@ -365,3 +358,27 @@ mark { content: ""; } } + +/* Section anchors --------------------------------- + Added in pandoc 2.11: https://github.com/jgm/pandoc-templates/commit/9904bf71 +*/ + +div.csl-bib-body { } +div.csl-entry { + clear: both; +} +.hanging-indent div.csl-entry { + margin-left:2em; + text-indent:-2em; +} +div.csl-left-margin { + min-width:2em; + float:left; +} +div.csl-right-inline { + margin-left:2em; + padding-left:1em; +} +div.csl-indent { + margin-left: 2em; +} 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 09603db..ea6b627 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-15T13:17Z - +last_built: 2025-01-25T21:36Z +urls: + reference: https://rinterface.github.io/argonDash/reference + article: https://rinterface.github.io/argonDash/articles diff --git a/docs/reference/argonAvatar.html b/docs/reference/argonAvatar.html index 01a348a..8e1fb4d 100644 --- a/docs/reference/argonAvatar.html +++ b/docs/reference/argonAvatar.html @@ -1,173 +1,84 @@ - - - - - - +Create a Boostrap 4 avatar — argonAvatar • argonDash + Skip to contents -Create a Boostrap 4 avatar — argonAvatar • argonDash +
    +
    +
    +
    +

    Build an argon avatar

    +
    - - - +
    +

    Usage

    +
    argonAvatar(src, toolTip = NULL, size = c("sm", "md", "lg"))
    +
    - +
    +

    Arguments

    +
    src
    +

    Avatar inag path or url.

    - - -
    -
    - - - - -
    -
    -
    - +
    size
    +

    Avatar size: choose one of "sm", "md" or "lg".

    -
    -

    Build an argon avatar

    +
    +
    +

    Author

    +

    David Granjon, dgranjon@ymail.com

    -
    argonAvatar(src, toolTip = NULL, size = c("sm", "md", "lg"))
    - -

    Arguments

    - - - - - - - - - - - - - - -
    src

    Avatar inag path or url.

    toolTip

    Optional tooltip triggered on mouse hover.

    size

    Avatar size: choose one of "sm", "md" or "lg".

    - -

    Author

    - -

    David Granjon, dgranjon@ymail.com

    +
    -
    - -
  • - -
    - +
    + - - - + diff --git a/docs/reference/argonAvatars.html b/docs/reference/argonAvatars.html index 1c1438b..257c06e 100644 --- a/docs/reference/argonAvatars.html +++ b/docs/reference/argonAvatars.html @@ -1,165 +1,76 @@ - - - - - - +Create a Boostrap 4 avatar container — argonAvatars • argonDash + Skip to contents -Create a Boostrap 4 avatar container — argonAvatars • argonDash +
    +
    +
    -
    - +
    + - - - + diff --git a/docs/reference/argonDashBody.html b/docs/reference/argonDashBody.html index e13b62b..5d3a177 100644 --- a/docs/reference/argonDashBody.html +++ b/docs/reference/argonDashBody.html @@ -1,165 +1,76 @@ - - - - - - +Create a Boostrap 4 dashboard body — argonDashBody • argonDash + Skip to contents -Create a Boostrap 4 dashboard body — argonDashBody • argonDash +
    +
    +
    -
    - +
    + - - - + diff --git a/docs/reference/argonDashFooter.html b/docs/reference/argonDashFooter.html index a843556..556d1d1 100644 --- a/docs/reference/argonDashFooter.html +++ b/docs/reference/argonDashFooter.html @@ -1,173 +1,84 @@ - - - - - - +Create a Boostrap 4 dashboard footer — argonDashFooter • argonDash + Skip to contents -Create a Boostrap 4 dashboard footer — argonDashFooter • argonDash +
    +
    +
    +
    +

    Build an argon dashboard footer

    +
    - - - +
    +

    Usage

    +
    argonDashFooter(..., copyrights = NULL, src = NULL)
    +
    - +
    +

    Arguments

    +
    ...
    +

    Slot for argonFooterMenu.

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

    Left text src, if any.

    -
    -

    Build an argon dashboard footer

    +
    +
    +

    Author

    +

    David Granjon, dgranjon@ymail.com

    -
    argonDashFooter(..., copyrights = NULL, src = NULL)
    - -

    Arguments

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

    Slot for argonFooterMenu.

    copyrights

    Left text, if any.

    src

    Left text src, if any.

    - -

    Author

    - -

    David Granjon, dgranjon@ymail.com

    +
    -
    - -
    - -
    + - - - + diff --git a/docs/reference/argonDashGallery.html b/docs/reference/argonDashGallery.html index ed8516b..fd2a3d0 100644 --- a/docs/reference/argonDashGallery.html +++ b/docs/reference/argonDashGallery.html @@ -1,162 +1,74 @@ - - - - - - +Launch the argonDash Gallery — argonDashGallery • argonDash + Skip to contents -Launch the argonDash Gallery — argonDashGallery • argonDash +
    -
    - +
    +

    Examples

    +
    
    +if (interactive()) {
    +
    + argonDashGallery()
    +
    +}
    +
    +
    +
    -
    - +
    + - - - + diff --git a/docs/reference/argonDashHeader.html b/docs/reference/argonDashHeader.html index f39eec0..34d1bb3 100644 --- a/docs/reference/argonDashHeader.html +++ b/docs/reference/argonDashHeader.html @@ -1,217 +1,128 @@ - - - - - - +Create a Boostrap 4 dashboard header — argonDashHeader • argonDash + Skip to contents -Create a Boostrap 4 dashboard header — argonDashHeader • argonDash +
    +
    +
    +
    +

    Build an argon dashboard header

    +
    +
    +

    Usage

    +
    argonDashHeader(
    +  ...,
    +  gradient = TRUE,
    +  color = NULL,
    +  separator = FALSE,
    +  separator_color = "secondary",
    +  bottom_padding = 4,
    +  top_padding = 6,
    +  background_img = NULL,
    +  mask = FALSE,
    +  opacity = 8,
    +  height = 600
    +)
    +
    +
    +

    Arguments

    - - +
    ...
    +

    Any element

    +
    gradient
    +

    Whether to apply a gradient effect. TRUE by default.

    - - - - +
    color
    +

    Header color. See https://demos.creative-tim.com/argon-design-system/docs/foundation/colors.html.

    +
    separator
    +

    Header bottom separator. FALSE by default.

    - - -
    -
    - - - - -
    -
    -
    - +
    bottom_padding
    +

    Bottom padding. 4 by default.

    -
    -

    Build an argon dashboard header

    -
    -
    argonDashHeader(
    -  ...,
    -  gradient = TRUE,
    -  color = NULL,
    -  separator = FALSE,
    -  separator_color = "secondary",
    -  bottom_padding = 4,
    -  top_padding = 6,
    -  background_img = NULL,
    -  mask = FALSE,
    -  opacity = 8,
    -  height = 600
    -)
    - -

    Arguments

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

    Any element

    gradient

    Whether to apply a gradient effect. TRUE by default.

    color

    Header color. See https://demos.creative-tim.com/argon-design-system/docs/foundation/colors.html.

    separator

    Header bottom separator. FALSE by default.

    separator_color

    Separator color. "secondary" by default. See https://demos.creative-tim.com/argon-design-system/docs/foundation/colors.html.

    bottom_padding

    Bottom padding. 4 by default.

    top_padding

    Bottom padding. 6 by default.

    background_img

    Background image url or path.

    mask

    Whether to add an opacity mask on the header. FALSE by default

    opacity

    Mask opacity. Between 0 and 8. Only if mask is TRUE.

    height

    Header height. 600px by default. Only if background image.

    - -

    Author

    - -

    David Granjon, dgranjon@ymail.com

    +
    top_padding
    +

    Bottom padding. 6 by default.

    -
    - -
    + +
    background_img
    +

    Background image url or path.

    + + +
    mask
    +

    Whether to add an opacity mask on the header. FALSE by default

    + + +
    opacity
    +

    Mask opacity. Between 0 and 8. Only if mask is TRUE.

    -
    -
    +
    +

    Author

    +

    David Granjon, dgranjon@ymail.com

    +
    + +
    + + + -
    +
    + - - - + diff --git a/docs/reference/argonDashNavbar.html b/docs/reference/argonDashNavbar.html index 9804890..43f4474 100644 --- a/docs/reference/argonDashNavbar.html +++ b/docs/reference/argonDashNavbar.html @@ -1,165 +1,76 @@ - - - - - - +Create a Boostrap 4 dashboard navbar — argonDashNavbar • argonDash + Skip to contents -Create a Boostrap 4 dashboard navbar — argonDashNavbar • argonDash +
    +
    +
    -
    + - - - + diff --git a/docs/reference/argonDashPage.html b/docs/reference/argonDashPage.html index 8df842c..28d1fc3 100644 --- a/docs/reference/argonDashPage.html +++ b/docs/reference/argonDashPage.html @@ -1,215 +1,128 @@ - - - - - - +Create a Boostrap 4 dashboard page — argonDashPage • argonDash + Skip to contents -Create a Boostrap 4 dashboard page — argonDashPage • argonDash +
    +
    +
    +
    +

    Build an argon dashboard page

    +
    +
    +

    Usage

    +
    argonDashPage(
    +  title = NULL,
    +  description = NULL,
    +  author = NULL,
    +  navbar = NULL,
    +  sidebar = NULL,
    +  header = NULL,
    +  body = NULL,
    +  footer = NULL
    +)
    +
    +
    +

    Arguments

    - - +
    title
    +

    App title.

    +
    description
    +

    Dashboard purpose.

    - - - - +
    author
    +

    Dashboard author.

    +
    navbar
    +

    Bootstrap 4 dashboard navbar.

    - - -
    -
    - - - - -
    -
    -
    - +
    header
    +

    Bootstrap 4 dashboard header (below the navbar). Useful to hightlight elements or +print a message.

    -
    -

    Build an argon dashboard page

    + +
    body
    +

    Bootstrap 4 dashboard body wrapper.

    + + + +

    Bootstrap 4 dashboard footer.

    + +
    +
    +

    Author

    +

    David Granjon, dgranjon@ymail.com

    -
    argonDashPage(
    -  title = NULL,
    -  description = NULL,
    -  author = NULL,
    -  navbar = NULL,
    -  sidebar = NULL,
    -  header = NULL,
    -  body = NULL,
    -  footer = NULL
    -)
    - -

    Arguments

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

    App title.

    description

    Dashboard purpose.

    author

    Dashboard author.

    navbar

    Bootstrap 4 dashboard navbar.

    sidebar

    Bootstrap 4 dashboard main sidebar.

    header

    Bootstrap 4 dashboard header (below the navbar). Useful to hightlight elements or -print a message.

    body

    Bootstrap 4 dashboard body wrapper.

    footer

    Bootstrap 4 dashboard footer.

    - -

    Author

    - -

    David Granjon, dgranjon@ymail.com

    - -

    Examples

    -
    if(interactive()){
    - library(shiny)
    - library(argonDash)
    -
    - shiny::shinyApp(
    -   ui = argonDashPage(),
    -   server = function(input, output) {}
    - )
    -}
    -
    -
    -
    - -
    +
    +

    Examples

    +
    if(interactive()){
    + library(shiny)
    + library(argonDash)
    +
    + shiny::shinyApp(
    +   ui = argonDashPage(),
    +   server = function(input, output) {}
    + )
    +}
    +
    +
    +
    + - + - - - + diff --git a/docs/reference/argonDashSidebar.html b/docs/reference/argonDashSidebar.html index 7d2872b..4578725 100644 --- a/docs/reference/argonDashSidebar.html +++ b/docs/reference/argonDashSidebar.html @@ -1,213 +1,124 @@ - - - - - - +Create a Boostrap 4 dashboard sidebar — argonDashSidebar • argonDash + Skip to contents -Create a Boostrap 4 dashboard sidebar — argonDashSidebar • argonDash +
    +
    +
    +
    +

    Build an argon dashboard sidebar

    +
    +
    +

    Usage

    +
    argonDashSidebar(
    +  ...,
    +  dropdownMenus = NULL,
    +  id,
    +  brand_url = NULL,
    +  brand_logo = NULL,
    +  vertical = TRUE,
    +  side = c("left", "right"),
    +  size = c("s", "md", "lg"),
    +  skin = c("light", "dark"),
    +  background = "white"
    +)
    +
    +
    +

    Arguments

    - - +
    ...
    +

    Any element such as argonDashSidebar, argonSidebarMenu, +argonSidebarItem, argonSidebarHeader and argonSidebarDivider.

    +
    dropdownMenus
    +

    Slot for dropdown menus. Not displayd on large screens.

    - - - - +
    id
    +

    Unique sidebar id.

    +
    brand_url
    +

    Sidebar brand url

    - - -
    -
    - - - - -
    -
    -
    - +
    vertical
    +

    Whether to display the sidebar in vertical mode. TRUE by default.

    -
    -

    Build an argon dashboard sidebar

    -
    -
    argonDashSidebar(
    -  ...,
    -  dropdownMenus = NULL,
    -  id,
    -  brand_url = NULL,
    -  brand_logo = NULL,
    -  vertical = TRUE,
    -  side = c("left", "right"),
    -  size = c("s", "md", "lg"),
    -  skin = c("light", "dark"),
    -  background = "white"
    -)
    - -

    Arguments

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

    Any element such as argonDashSidebar, argonSidebarMenu, -argonSidebarItem, argonSidebarHeader and argonSidebarDivider.

    dropdownMenus

    Slot for dropdown menus. Not displayd on large screens.

    id

    Unique sidebar id.

    brand_url

    Sidebar brand url

    brand_logo

    Sidebar brand logo

    vertical

    Whether to display the sidebar in vertical mode. TRUE by default.

    side

    Sidebar side: "right" or "left". "left" by default.

    size

    Sidebar size: "s", "md", "lg". "md" by default.

    skin

    Sidebar skin. "light" by default.

    background

    Sidebar background color. See https://demos.creative-tim.com/argon-design-system/docs/foundation/colors.html.

    - -

    Author

    - -

    David Granjon, dgranjon@ymail.com

    +
    side
    +

    Sidebar side: "right" or "left". "left" by default.

    + + +
    size
    +

    Sidebar size: "s", "md", "lg". "md" by default.

    + + +
    skin
    +

    Sidebar skin. "light" by default.

    -
    - -
    +
    background
    +

    Sidebar background color. See https://demos.creative-tim.com/argon-design-system/docs/foundation/colors.html.

    -
    -
    +
    +

    Author

    +

    David Granjon, dgranjon@ymail.com

    +
    + +
    + + + -
    + + - - - + diff --git a/docs/reference/argonDropNav.html b/docs/reference/argonDropNav.html index 0a078cc..205ff58 100644 --- a/docs/reference/argonDropNav.html +++ b/docs/reference/argonDropNav.html @@ -1,177 +1,88 @@ - - - - - - +Create a Boostrap 4 dashboard dropdown menu — argonDropNav • argonDash + Skip to contents -Create a Boostrap 4 dashboard dropdown menu — argonDropNav • argonDash +
    +
    +
    +
    +

    Build an argon dashboard dropdown menu

    +
    +
    +

    Usage

    +
    argonDropNav(..., title = NULL, src = NULL, orientation = "right")
    +
    - - +
    +

    Arguments

    +
    ...
    +

    slot for argonDropNavItem, argonDropNavTitle or argonDropNavDivider.

    - - - +
    title
    +

    Menu title.

    - +
    src
    +

    Menu image, if any.

    - +
    orientation
    +

    Dropdown orientation: "left" or "right".

    - -
    -
    -
    +
    +

    Author

    +

    David Granjon, dgranjon@ymail.com

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

    Build an argon dashboard dropdown menu

    -
    - -
    argonDropNav(..., title = NULL, src = NULL, orientation = "right")
    - -

    Arguments

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

    slot for argonDropNavItem, argonDropNavTitle or argonDropNavDivider.

    title

    Menu title.

    src

    Menu image, if any.

    orientation

    Dropdown orientation: "left" or "right".

    - -

    Author

    - -

    David Granjon, dgranjon@ymail.com

    - -
    - -
    - - - + - - - + diff --git a/docs/reference/argonDropNavDivider.html b/docs/reference/argonDropNavDivider.html index 534f9bc..3d5eec3 100644 --- a/docs/reference/argonDropNavDivider.html +++ b/docs/reference/argonDropNavDivider.html @@ -1,157 +1,68 @@ - - - - - - +Create a Boostrap 4 dashboard dropdown menu divider — argonDropNavDivider • argonDash + Skip to contents -Create a Boostrap 4 dashboard dropdown menu divider — argonDropNavDivider • argonDash +
    -
    - +
    -
    - +
    + - - - + diff --git a/docs/reference/argonDropNavItem.html b/docs/reference/argonDropNavItem.html index 89fb45f..b29471c 100644 --- a/docs/reference/argonDropNavItem.html +++ b/docs/reference/argonDropNavItem.html @@ -1,173 +1,84 @@ - - - - - - +Create a Boostrap 4 dashboard dropdown menu item — argonDropNavItem • argonDash + Skip to contents -Create a Boostrap 4 dashboard dropdown menu item — argonDropNavItem • argonDash +
    +
    +
    +
    +

    Build an argon dashboard dropdown menu item

    +
    - - - +
    +

    Usage

    +
    argonDropNavItem(title = NULL, src = NULL, icon = NULL)
    +
    - +
    +

    Arguments

    +
    title
    +

    Item title.

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

    Icon, if any. Expect argonIcon or icon.

    -
    -

    Build an argon dashboard dropdown menu item

    +
    +
    +

    Author

    +

    David Granjon, dgranjon@ymail.com

    -
    argonDropNavItem(title = NULL, src = NULL, icon = NULL)
    - -

    Arguments

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

    Item title.

    src

    External link.

    icon

    Icon, if any. Expect argonIcon or icon.

    - -

    Author

    - -

    David Granjon, dgranjon@ymail.com

    +
    -
    - -
    - - + - - - + diff --git a/docs/reference/argonDropNavTitle.html b/docs/reference/argonDropNavTitle.html index f004933..ed7ee91 100644 --- a/docs/reference/argonDropNavTitle.html +++ b/docs/reference/argonDropNavTitle.html @@ -1,165 +1,76 @@ - - - - - - +Create a Boostrap 4 dashboard dropdown menu title — argonDropNavTitle • argonDash + Skip to contents -Create a Boostrap 4 dashboard dropdown menu title — argonDropNavTitle • argonDash +
    +
    +
    -
    + - - - + diff --git a/docs/reference/argonFooterItem.html b/docs/reference/argonFooterItem.html index edd8afb..6f69e5f 100644 --- a/docs/reference/argonFooterItem.html +++ b/docs/reference/argonFooterItem.html @@ -1,169 +1,80 @@ - - - - - - +Create a Boostrap 4 dashboard footer menu item — argonFooterItem • argonDash + Skip to contents -Create a Boostrap 4 dashboard footer menu item — argonFooterItem • argonDash +
    +
    +
    -
    + - - - + diff --git a/docs/reference/argonFooterMenu.html b/docs/reference/argonFooterMenu.html index 83c3bef..7986c53 100644 --- a/docs/reference/argonFooterMenu.html +++ b/docs/reference/argonFooterMenu.html @@ -1,165 +1,76 @@ - - - - - - +Create a Boostrap 4 dashboard footer menu — argonFooterMenu • argonDash + Skip to contents -Create a Boostrap 4 dashboard footer menu — argonFooterMenu • argonDash +
    +
    +
    -
    + - - - + diff --git a/docs/reference/argonInfoCard.html b/docs/reference/argonInfoCard.html index 6f7fff9..6715b06 100644 --- a/docs/reference/argonInfoCard.html +++ b/docs/reference/argonInfoCard.html @@ -1,223 +1,134 @@ - - - - - - +Create a Boostrap 4 dashboard info card — argonInfoCard • argonDash + Skip to contents -Create a Boostrap 4 dashboard info card — argonInfoCard • argonDash +
    +
    +
    +
    +

    Build an argon dashboard info card

    +
    +
    +

    Usage

    +
    argonInfoCard(
    +  value,
    +  title = NULL,
    +  stat = NULL,
    +  stat_icon = NULL,
    +  description = NULL,
    +  icon,
    +  icon_background = "default",
    +  hover_lift = FALSE,
    +  shadow = FALSE,
    +  background_color = NULL,
    +  gradient = FALSE,
    +  width = 3
    +)
    +
    +
    +

    Arguments

    - - +
    value
    +

    info card value.

    +
    title
    +

    info card title.

    - - - - +
    stat
    +

    info card stat value.

    +
    stat_icon
    +

    info card stat icon. Expect argonIcon or icon.

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

    info card icon. Expect argonIcon or icon.

    -
    -

    Build an argon dashboard info card

    -
    -
    argonInfoCard(
    -  value,
    -  title = NULL,
    -  stat = NULL,
    -  stat_icon = NULL,
    -  description = NULL,
    -  icon,
    -  icon_background = "default",
    -  hover_lift = FALSE,
    -  shadow = FALSE,
    -  background_color = NULL,
    -  gradient = FALSE,
    -  width = 3
    -)
    - -

    Arguments

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

    info card value.

    title

    info card title.

    stat

    info card stat value.

    stat_icon

    info card stat icon. Expect argonIcon or icon.

    description

    info card stat description.

    icon

    info card icon. Expect argonIcon or icon.

    icon_background

    info card icon background color.

    hover_lift

    Whether to apply a lift effect on hover. FALSE by default. -Not compatible with floating.

    shadow

    Whether to apply a shadow effect. FALSE by default.

    background_color

    Card background color. NULL by default.

    gradient

    Whether to apply a gradient effect on the card background. FALSE by default.

    width

    info card width. Between 1 and 12.

    - -

    Author

    - -

    David Granjon, dgranjon@ymail.com

    +
    icon_background
    +

    info card icon background color.

    -
    - -
    +
    hover_lift
    +

    Whether to apply a lift effect on hover. FALSE by default. +Not compatible with floating.

    -
    -
    +
    +

    Author

    +

    David Granjon, dgranjon@ymail.com

    +
    + +
    + + + -
    + + - - - + diff --git a/docs/reference/argonSidebarDivider.html b/docs/reference/argonSidebarDivider.html index 360a4e1..67a12ca 100644 --- a/docs/reference/argonSidebarDivider.html +++ b/docs/reference/argonSidebarDivider.html @@ -1,154 +1,63 @@ - - - - - - +A divider to put inside argonDashSidebar — argonSidebarDivider • argonDash + Skip to contents -A divider to put inside argonDashSidebar — argonSidebarDivider • argonDash +
    +
    +
    -
    - - - - - + - - - + diff --git a/docs/reference/argonSidebarHeader.html b/docs/reference/argonSidebarHeader.html index 6b7daed..0246fbd 100644 --- a/docs/reference/argonSidebarHeader.html +++ b/docs/reference/argonSidebarHeader.html @@ -1,162 +1,72 @@ - - - - - - +A header to put inside argonDashSidebar — argonSidebarHeader • argonDash + Skip to contents -A header to put inside argonDashSidebar — argonSidebarHeader • argonDash +
    +
    +
    -
    + - - - + diff --git a/docs/reference/argonSidebarItem.html b/docs/reference/argonSidebarItem.html index a658cf9..396f0f2 100644 --- a/docs/reference/argonSidebarItem.html +++ b/docs/reference/argonSidebarItem.html @@ -1,173 +1,84 @@ - - - - - - +Create a Boostrap 4 argon sidebar menu — argonSidebarItem • argonDash + Skip to contents -Create a Boostrap 4 argon sidebar menu — argonSidebarItem • argonDash +
    +
    +
    +
    +

    Build an argon dashboard main sidebar menu

    +
    - - - +
    +

    Usage

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

    Arguments

    +
    ...
    +

    Item name.

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

    Item icon. argonIcon or icon.

    -
    -

    Build an argon dashboard main sidebar menu

    +
    +
    +

    Author

    +

    David Granjon, dgranjon@ymail.com

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

    Arguments

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

    Item name.

    tabName

    Should correspond exactly to the tabName given in argonTabItem.

    icon

    Item icon. argonIcon or icon.

    - -

    Author

    - -

    David Granjon, dgranjon@ymail.com

    +
    -
    - - - - + - - - + diff --git a/docs/reference/argonSidebarMenu.html b/docs/reference/argonSidebarMenu.html index 8b78e0e..a8b842b 100644 --- a/docs/reference/argonSidebarMenu.html +++ b/docs/reference/argonSidebarMenu.html @@ -1,165 +1,76 @@ - - - - - - +Create a Boostrap 4 argon sidebar menu — argonSidebarMenu • argonDash + Skip to contents -Create a Boostrap 4 argon sidebar menu — argonSidebarMenu • argonDash +
    +
    +
    -
    + - - - + diff --git a/docs/reference/argonTabItem.html b/docs/reference/argonTabItem.html index adfebf7..549d25b 100644 --- a/docs/reference/argonTabItem.html +++ b/docs/reference/argonTabItem.html @@ -1,167 +1,77 @@ - - - - - - +One tab to put inside a tab items container — argonTabItem • argonDash + Skip to contents -One tab to put inside a tab items container — argonTabItem • argonDash +
    +
    +
    - +
    +

    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 argonSidebarItem.

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

    Arguments

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

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

    ...

    Contents of the tab.

    +
    ...
    +

    Contents of the tab.

    +
    -
    - -
    +
    -
    + - - - + diff --git a/docs/reference/argonTabItems.html b/docs/reference/argonTabItems.html index dbf647c..44afcd0 100644 --- a/docs/reference/argonTabItems.html +++ b/docs/reference/argonTabItems.html @@ -1,163 +1,73 @@ - - - - - - +A container for tab items — argonTabItems • argonDash + Skip to contents -A container for tab items — argonTabItems • argonDash +
    +
    +
    -
    + - - - + diff --git a/docs/reference/argonTable.html b/docs/reference/argonTable.html index d3c09db..7933658 100644 --- a/docs/reference/argonTable.html +++ b/docs/reference/argonTable.html @@ -1,252 +1,165 @@ - - - - - - +Create a Boostrap 4 table container — argonTable • argonDash + Skip to contents -Create a Boostrap 4 table container — argonTable • argonDash +
    +
    +
    +
    +

    Build an argon table container

    +
    +
    +

    Usage

    +
    argonTable(
    +  ...,
    +  cardWrap = FALSE,
    +  title = NULL,
    +  headTitles,
    +  dark = FALSE,
    +  width = 12
    +)
    +
    +
    +

    Arguments

    - - +
    ...
    +

    argonTableItems.

    +
    cardWrap
    +

    Whether to wrap the table in a card. FALSE by default.

    - - - - +
    title
    +

    Card title if any.

    +
    headTitles
    +

    Table header names. Must have the same length as the number of +argonTableItem in argonTableItems. Set "" to have an empty title field.

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

    Table width. 12 by default.

    -
    -

    Build an argon table container

    +
    +
    +

    Author

    +

    David Granjon, dgranjon@ymail.com

    -
    argonTable(
    -  ...,
    -  cardWrap = FALSE,
    -  title = NULL,
    -  headTitles,
    -  dark = FALSE,
    -  width = 12
    -)
    - -

    Arguments

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

    argonTableItems.

    cardWrap

    Whether to wrap the table in a card. FALSE by default.

    title

    Card title if any.

    headTitles

    Table header names. Must have the same length as the number of -argonTableItem in argonTableItems. Set "" to have an empty title field.

    dark

    Whether to enable dark mode. FALSE by default.

    width

    Table width. 12 by default.

    - -

    Author

    - -

    David Granjon, dgranjon@ymail.com

    - -

    Examples

    -
    if (interactive()) {
    - library(shiny)
    - library(argonR)
    - library(argonDash)
    - shinyApp(
    -  ui = argonDashPage(
    -    navbar = argonDashNavbar(), 
    -    sidebar = argonDashSidebar(id = "mysidebar"), 
    -    header = argonDashHeader(), 
    -    body = argonDashBody(
    -     argonTable(
    -      headTitles = c(
    -       "PROJECT",
    -       "BUDGET",
    -       "STATUS",
    -       "USERS",
    -       "COMPLETION",
    -       ""
    -      ),
    -      argonTableItems(
    -       argonTableItem("Argon Design System"),
    -       argonTableItem(dataCell = TRUE, "$2,500 USD"),
    -       argonTableItem(
    -        dataCell = TRUE, 
    -        argonBadge(
    -         text = "Pending",
    -         status = "danger"
    -        )
    -       ),
    -       argonTableItem(
    -        argonAvatar(
    -         size = "sm",
    -         src = "https://image.flaticon.com/icons/svg/219/219976.svg"
    -         )
    -       ),
    -       argonTableItem(
    -        dataCell = TRUE, 
    -        argonProgress(value = 60, status = "danger")
    -       ),
    -       argonTableItem(
    -        argonButton(
    -         name = "Click me!",
    -         status = "warning",
    -         icon = "atom",
    -         size = "sm"
    -        )
    -       )
    -      )
    -     )
    -    ), 
    -    footer = argonDashFooter()
    -  ),
    -  server = function(input, output) { }
    - )
    -}
    -
    -
    -
    -
    - -
    +
    +

    Examples

    +
    if (interactive()) {
    + library(shiny)
    + library(argonR)
    + library(argonDash)
    + shinyApp(
    +  ui = argonDashPage(
    +    navbar = argonDashNavbar(), 
    +    sidebar = argonDashSidebar(id = "mysidebar"), 
    +    header = argonDashHeader(), 
    +    body = argonDashBody(
    +     argonTable(
    +      headTitles = c(
    +       "PROJECT",
    +       "BUDGET",
    +       "STATUS",
    +       "USERS",
    +       "COMPLETION",
    +       ""
    +      ),
    +      argonTableItems(
    +       argonTableItem("Argon Design System"),
    +       argonTableItem(dataCell = TRUE, "$2,500 USD"),
    +       argonTableItem(
    +        dataCell = TRUE, 
    +        argonBadge(
    +         text = "Pending",
    +         status = "danger"
    +        )
    +       ),
    +       argonTableItem(
    +        argonAvatar(
    +         size = "sm",
    +         src = "https://image.flaticon.com/icons/svg/219/219976.svg"
    +         )
    +       ),
    +       argonTableItem(
    +        dataCell = TRUE, 
    +        argonProgress(value = 60, status = "danger")
    +       ),
    +       argonTableItem(
    +        argonButton(
    +         name = "Click me!",
    +         status = "warning",
    +         icon = "atom",
    +         size = "sm"
    +        )
    +       )
    +      )
    +     )
    +    ), 
    +    footer = argonDashFooter()
    +  ),
    +  server = function(input, output) { }
    + )
    +}
    +
    +
    +
    +
    + - + - - - + diff --git a/docs/reference/argonTableItem.html b/docs/reference/argonTableItem.html index 55350f0..06736db 100644 --- a/docs/reference/argonTableItem.html +++ b/docs/reference/argonTableItem.html @@ -1,169 +1,80 @@ - - - - - - +Create a Boostrap 4 table item — argonTableItem • argonDash + Skip to contents -Create a Boostrap 4 table item — argonTableItem • argonDash +
    +
    +
    -
    + - - - + diff --git a/docs/reference/argonTableItems.html b/docs/reference/argonTableItems.html index 253eda4..4dcd2fb 100644 --- a/docs/reference/argonTableItems.html +++ b/docs/reference/argonTableItems.html @@ -1,165 +1,76 @@ - - - - - - +Create a Boostrap 4 table item row — argonTableItems • argonDash + Skip to contents -Create a Boostrap 4 table item row — argonTableItems • argonDash +
    +
    +
    -
    + - - - + diff --git a/docs/reference/index.html b/docs/reference/index.html index 90c3712..17c5643 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -1,356 +1,247 @@ - - - - - - +Package index • argonDash + Skip to contents -Function reference • argonDash +
    +
    +
    +
    +

    Skeleton Functions

    +

    Page main elements

    - +
    - - - +
    - + argonDashBody() +
    +
    Create a Boostrap 4 dashboard body
    +
    + argonDashFooter() - +
    +
    Create a Boostrap 4 dashboard footer
    +
    - -
    -
    - - - - -
    +
    +
    Create a Boostrap 4 dashboard footer menu item
    +
    -
    -
    - + argonFooterMenu() - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Skeleton Functions

    -

    Page main elements

    -
    -

    argonDashBody()

    -

    Create a Boostrap 4 dashboard body

    -

    argonDashFooter()

    -

    Create a Boostrap 4 dashboard footer

    -

    argonFooterItem()

    -

    Create a Boostrap 4 dashboard footer menu item

    -

    argonFooterMenu()

    -

    Create a Boostrap 4 dashboard footer menu

    -

    argonDashHeader()

    -

    Create a Boostrap 4 dashboard header

    -

    argonDashNavbar()

    -

    Create a Boostrap 4 dashboard navbar

    -

    argonDashPage()

    -

    Create a Boostrap 4 dashboard page

    -

    argonDashSidebar()

    -

    Create a Boostrap 4 dashboard sidebar

    -

    argonDropNav()

    -

    Create a Boostrap 4 dashboard dropdown menu

    -

    argonDropNavDivider()

    -

    Create a Boostrap 4 dashboard dropdown menu divider

    -

    argonDropNavItem()

    -

    Create a Boostrap 4 dashboard dropdown menu item

    -

    argonDropNavTitle()

    -

    Create a Boostrap 4 dashboard dropdown menu title

    -

    argonSidebarDivider()

    -

    A divider to put inside argonDashSidebar

    -

    argonSidebarHeader()

    -

    A header to put inside argonDashSidebar

    -

    argonSidebarMenu()

    -

    Create a Boostrap 4 argon sidebar menu

    -

    argonSidebarItem()

    -

    Create a Boostrap 4 argon sidebar menu

    -

    argonTabItem()

    -

    One tab to put inside a tab items container

    -

    argonTabItems()

    -

    A container for tab items

    -

    Cards

    -

    Cards components …

    -
    -

    argonInfoCard()

    -

    Create a Boostrap 4 dashboard info card

    -

    Extras

    -

    Extra elements

    -
    -

    argonAvatar()

    -

    Create a Boostrap 4 avatar

    -

    argonAvatars()

    -

    Create a Boostrap 4 avatar container

    -

    argonTable()

    -

    Create a Boostrap 4 table container

    -

    argonTableItems()

    -

    Create a Boostrap 4 table item row

    -

    argonTableItem()

    -

    Create a Boostrap 4 table item

    - -

    argonDash Gallery

    -
    -

    argonDashGallery()

    -

    Launch the argonDash Gallery

    -
    +
    +
    Create a Boostrap 4 dashboard footer menu
    +
    - -
    + argonDashHeader() + + +
    Create a Boostrap 4 dashboard header
    +
    + + argonDashNavbar() + +
    +
    Create a Boostrap 4 dashboard navbar
    +
    + + argonDashPage() + +
    +
    Create a Boostrap 4 dashboard page
    +
    + + argonDashSidebar() + +
    +
    Create a Boostrap 4 dashboard sidebar
    +
    + + argonDropNav() + +
    +
    Create a Boostrap 4 dashboard dropdown menu
    +
    + + argonDropNavDivider() + +
    +
    Create a Boostrap 4 dashboard dropdown menu divider
    +
    + + argonDropNavItem() + +
    +
    Create a Boostrap 4 dashboard dropdown menu item
    +
    + + argonDropNavTitle() + +
    +
    Create a Boostrap 4 dashboard dropdown menu title
    +
    + + argonSidebarDivider() + +
    +
    A divider to put inside argonDashSidebar
    +
    + + argonSidebarHeader() + +
    +
    A header to put inside argonDashSidebar
    +
    + + argonSidebarMenu() + +
    +
    Create a Boostrap 4 argon sidebar menu
    +
    + + argonSidebarItem() + +
    +
    Create a Boostrap 4 argon sidebar menu
    +
    + + argonTabItem() + +
    +
    One tab to put inside a tab items container
    +
    + + argonTabItems() + +
    +
    A container for tab items
    +
    +

    Cards

    +

    Cards components …

    -
    -
    + + + + +
    + + argonInfoCard() + +
    +
    Create a Boostrap 4 dashboard info card
    +
    +

    Extras

    + +

    Extra elements

    + + +
    + + + + +
    + + argonAvatar() + +
    +
    Create a Boostrap 4 avatar
    +
    + + argonAvatars() + +
    +
    Create a Boostrap 4 avatar container
    +
    + + argonTable() + +
    +
    Create a Boostrap 4 table container
    +
    + + argonTableItems() + +
    +
    Create a Boostrap 4 table item row
    +
    + + argonTableItem() + +
    +
    Create a Boostrap 4 table item
    +
    + + +

    argonDash Gallery

    + + +
    + + + + +
    + + argonDashGallery() + +
    +
    Launch the argonDash Gallery
    +
    +
    + + + -
    + + - - - + diff --git a/docs/reference/tagAssert.html b/docs/reference/tagAssert.html index ae4cecf..6153057 100644 --- a/docs/reference/tagAssert.html +++ b/docs/reference/tagAssert.html @@ -1,177 +1,87 @@ - - - - - - +Assert that a tag has specified properties — tagAssert • argonDash + Skip to contents -Assert that a tag has specified properties — tagAssert • argonDash +
    +
    +
    +
    +

    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..90650c5 --- /dev/null +++ b/index.Rmd @@ -0,0 +1,72 @@ +--- +output: github_document +always_allow_html: true +--- + +```{r setup, include=FALSE} +library(bslib) +knitr::opts_chunk$set(echo = TRUE) +``` + +# argonDash argon hex sticker + +[![R build status](https://github.com/RinteRface/argonDash/workflows/R-CMD-check/badge.svg)](https://github.com/RinteRface/argonDash/actions) +[![CRAN status](https://www.r-pkg.org/badges/version/argonDash)](https://cran.r-project.org/package=argonDash) +[![lifecycle](https://img.shields.io/badge/lifecycle-maturing-ff69b4.svg)](https://www.tidyverse.org/lifecycle/#maturing) +[![cranlogs](https://cranlogs.r-pkg.org/badges/argonDash)](https://cran.r-project.org/package=argonDash) +[![total](https://cranlogs.r-pkg.org/badges/grand-total/argonDash)](https://www.rpackages.io/package/argonDash) + +> argon Bootstrap4 dashboard template for Shiny + +## Installation + +`{argonDash}` requires to install `{argonR}`. + +```r +install.packages("argonR") +# devel version +devtools::install_github("RinteRface/argonDash") +# from CRAN +install.packages("argonDash") +``` + +## Demo + +You can play with the demo app below and modify the code. + +```{r basic-code, eval=TRUE, echo=FALSE} +card( + argonDash:::create_app_link( + argonDash:::shinylive_links["inst/examples/shinylive/gallery"], + mode = "editor" + ), + full_screen = TRUE, + style = "margin: 0 auto; float: none;" +) +``` + +
    + +```r +library(argonDash) +argonDashGallery() +``` + +### Vertical layout +
    +argon dashboard demo with vertical layout + +### Horizontal layout + +This layout is experimental. + +
    +argon dashboard demo with horizontal layout + +## Aknowledgement + +* [Creative Tim](https://www.creative-tim.com/) for designing the original argon dashboard HTML template. + +## Code of Conduct + + Please note that the argonDash 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.html b/index.html new file mode 100644 index 0000000..3275a6f --- /dev/null +++ b/index.html @@ -0,0 +1,729 @@ + + + + + + + + + + + + + + + + + + + +

    argonDash + + + + + + + + + + Element 8 + + + + + + argonDash + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    +

    R build status CRAN status lifecycle cranlogs +total

    +
    +

    argon Bootstrap4 dashboard template for Shiny

    +
    +

    Installation

    +

    {argonDash} requires to install +{argonR}.

    +
    install.packages("argonR")
    +# devel version
    +devtools::install_github("RinteRface/argonDash")
    +# from CRAN
    +install.packages("argonDash")
    +

    Demo

    +

    You can play with the demo app below and modify the code.

    +
    +
    + +
    + + + + + +
    + +
    + +
    library(argonDash)
    +argonDashGallery()
    +

    Vertical layout

    +
    +argon dashboard demo with vertical layout + +

    Horizontal layout

    +

    This layout is experimental.

    +
    +argon dashboard demo with horizontal layout + +

    Aknowledgement

    + +

    Code of Conduct

    +

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

    + + + diff --git a/index.md b/index.md new file mode 100644 index 0000000..d2ff932 --- /dev/null +++ b/index.md @@ -0,0 +1,70 @@ + +# argonDash argon hex sticker + +[![R build +status](https://github.com/RinteRface/argonDash/workflows/R-CMD-check/badge.svg)](https://github.com/RinteRface/argonDash/actions) +[![CRAN +status](https://www.r-pkg.org/badges/version/argonDash)](https://cran.r-project.org/package=argonDash) +[![lifecycle](https://img.shields.io/badge/lifecycle-maturing-ff69b4.svg)](https://www.tidyverse.org/lifecycle/#maturing) +[![cranlogs](https://cranlogs.r-pkg.org/badges/argonDash)](https://cran.r-project.org/package=argonDash) +[![total](https://cranlogs.r-pkg.org/badges/grand-total/argonDash)](https://www.rpackages.io/package/argonDash) + +> argon Bootstrap4 dashboard template for Shiny + +## Installation + +`{argonDash}` requires to install `{argonR}`. + +``` r +install.packages("argonR") +# devel version +devtools::install_github("RinteRface/argonDash") +# from CRAN +install.packages("argonDash") +``` + +## Demo + +You can play with the demo app below and modify the code. + +
    +
    + +
    + + + + + +
    + +
    + +``` r +library(argonDash) +argonDashGallery() +``` + +### Vertical layout + +
    +argon dashboard demo with vertical layout + +### Horizontal layout + +This layout is experimental. + +
    +argon dashboard demo with horizontal layout + +## Aknowledgement + +- [Creative Tim](https://www.creative-tim.com/) for designing the + original argon dashboard HTML template. + +## Code of Conduct + +Please note that the argonDash 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/shinylive/gallery/app.R b/inst/examples/shinylive/gallery/app.R new file mode 100644 index 0000000..c3b48ec --- /dev/null +++ b/inst/examples/shinylive/gallery/app.R @@ -0,0 +1,4 @@ +library(argonDash) +library(shiny) + +shinyAppDir(system.file("examples/gallery", package = "argonDash")) diff --git a/inst/shinylive/tools.R b/inst/shinylive/tools.R new file mode 100644 index 0000000..022a491 --- /dev/null +++ b/inst/shinylive/tools.R @@ -0,0 +1,18 @@ +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) diff --git a/pkgdown/extra.css b/pkgdown/extra.css new file mode 100644 index 0000000..5a872d8 --- /dev/null +++ b/pkgdown/extra.css @@ -0,0 +1,175 @@ +/* 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..97fbb02 --- /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 \ No newline at end of file