diff --git a/.Rbuildignore b/.Rbuildignore index b513032..503e196 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -16,4 +16,5 @@ development ^tools$ ^srcjs$ ^styles$ -^_pkgdown\.yml$ +pkgdown +.lintr diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5569b8c..c1c9e33 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,74 +3,51 @@ on: push name: R-CMD-check jobs: - R-CMD-check: + main: + name: ${{ matrix.config.os }} (${{ matrix.config.r }}) + runs-on: ${{ matrix.config.os }} - name: ${{ matrix.config.os }} (${{ matrix.config.r }}) + timeout-minutes: 30 strategy: fail-fast: false matrix: config: - - { os: windows-latest, r: '3.6'} - - { os: macOS-latest, r: '3.6'} - - { os: ubuntu-18.04, r: '3.6', cran: "https://demo.rstudiopm.com/all/__linux__/bionic/latest"} - - env: - R_REMOTES_NO_ERRORS_FROM_WARNINGS: true - CRAN: ${{ matrix.config.cran }} + - {os: macOS-latest, r: 'release'} + - {os: windows-latest, r: 'release'} + - {os: ubuntu-22.04, r: 'devel'} + - {os: ubuntu-22.04, r: 'release'} + - {os: ubuntu-22.04, r: 'oldrel'} steps: - - uses: actions/checkout@v1 + - name: Checkout repository + uses: actions/checkout@v2 - - uses: r-lib/actions/setup-r@master + - name: Install R + uses: r-lib/actions/setup-r@v2 with: r-version: ${{ matrix.config.r }} - - uses: r-lib/actions/setup-pandoc@master - - - name: Query dependencies - run: Rscript -e "install.packages('remotes')" -e "saveRDS(remotes::dev_package_deps(dependencies = TRUE), 'depends.Rds', version = 2)" - - - name: Cache R packages - if: runner.os != 'Windows' - uses: actions/cache@v1 + - name: Install R package dependencies + uses: r-lib/actions/setup-r-dependencies@v2 with: - path: ${{ env.R_LIBS_USER }} - key: ${{ runner.os }}-r-${{ matrix.config.r }}-${{ hashFiles('depends.Rds') }} - restore-keys: ${{ runner.os }}-r-${{ matrix.config.r }}- + extra-packages: local::. # Necessary to avoid object usage linter errors. - - name: Install system dependencies - if: runner.os == 'Linux' - env: - RHUB_PLATFORM: linux-x86_64-ubuntu-gcc - run: | - Rscript -e "remotes::install_github('r-hub/sysreqs')" - sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))") - sudo -s eval "$sysreqs" - - - name: Install vctrs - if: runner.os == 'Windows' - run: Rscript -e "remotes::install_cran('vctrs')" - - - name: Install vctrs - if: runner.os == 'macos' - run: Rscript -e "remotes::install_cran('Rcpp')" - - - name: Install dependencies - run: Rscript -e "library(remotes)" -e "update(readRDS('depends.Rds'))" -e "remotes::install_cran('rcmdcheck')" - - - name: Check - run: Rscript -e "rcmdcheck::rcmdcheck(args = c('--no-manual', '--as-cran'), error_on = 'error', check_dir = 'check')" - - - name: Upload check results - if: failure() - uses: actions/upload-artifact@master + - name: R CMD check + if: always() + uses: r-lib/actions/check-r-package@v2 with: - name: ${{ runner.os }}-r${{ matrix.config.r }}-results - path: check + error-on: '"note"' + - name: Lint + if: always() + shell: Rscript {0} + run: | + lints <- lintr::lint_package() + for (lint in lints) print(lint) + quit(status = length(lints) > 0) - name: Test coverage - if: matrix.config.os == 'macOS-latest' && matrix.config.r == '3.6' + if: matrix.config.os == 'ubuntu-22.04' && matrix.config.r == 'release' run: | Rscript -e 'covr::codecov(token = "${{secrets.CODECOV_TOKEN}}")' diff --git a/.github/workflows/pkgdown.yml b/.github/workflows/pkgdown.yml new file mode 100644 index 0000000..6164374 --- /dev/null +++ b/.github/workflows/pkgdown.yml @@ -0,0 +1,34 @@ +# 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: + - develop + workflow_dispatch: + +name: pkgdown + +jobs: + pkgdown: + runs-on: ubuntu-latest + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + steps: + - uses: actions/checkout@v2 + + - uses: r-lib/actions/setup-pandoc@v2 + + - uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::pkgdown, local::. + needs: website + + - name: Deploy to gh-pages branch + run: | + git config --local user.name "$GITHUB_ACTOR" + git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com" + Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)' diff --git a/.gitignore b/.gitignore index 674991a..42726c5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +.DS_Store + # History files .Rhistory .Rapp.history @@ -33,3 +35,4 @@ vignettes/*.pdf *.knit.md .Rproj.user +/docs/ diff --git a/.lintr b/.lintr new file mode 100644 index 0000000..e64fd0f --- /dev/null +++ b/.lintr @@ -0,0 +1,9 @@ +linters: + linters_with_defaults( + line_length_linter = line_length_linter(100), + object_name_linter = NULL + ) +exclusions: + c( + "vignettes" + ) diff --git a/CHANGELOG.md b/CHANGELOG.md index 800731e..ad6bf4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/). ## [Unreleased] ### Added +- `sidebarUserPanel` was added increasing support of `shinydashboard` functions + ### Changed ### Fixed ### Removed @@ -17,7 +19,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/). - `fluid` param for `tabItem` - `class` param for `dashboardPage`, `dashboardBody`, `dashboardSidebar` and `dashboardHeader` - `dashboardPage`, `dashboardBody`, `dashboardSidebar` and `dashboardHeader` have now built-in CSS classes of syntax `dashboard-` e.g. `dashboard-page`. Thanks to that it's easy to write selectors for DOM nodes related to them -- pkgdown docuemntation +- pkgdown documentation - tests for dropdown menu, utils and value box ### Changed diff --git a/DESCRIPTION b/DESCRIPTION index 5dcc3b8..10a10d6 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,17 +1,17 @@ Package: semantic.dashboard Type: Package Title: Dashboard with Fomantic UI Support for Shiny -Version: 0.2.0 +Version: 0.2.1 Authors@R: c(person("Filip", "Stachura", email = "filip@appsilon.com", role = "aut"), - person("Dominik", "Krzeminski", email = "dominik@appsilon.com", role = "cre"), + person("Dominik", "Krzeminski", email = "dominik@appsilon.com", role = "aut"), person("Krystian", "Igras", role = "aut"), person("Michał", "Maj", role = "ctb"), person("Michał", "Drzazga", role = "ctb"), + person("Developers", "Appsilon", email = "support+opensource@appsilon.com", role = "cre"), person(family = "Appsilon", role = "cph")) -Description: It offers functions for creating dashboard with Fomantic UI. +Description: It offers functions for creating dashboard with Fomantic UI. BugReports: https://github.com/Appsilon/semantic.dashboard/issues Encoding: UTF-8 -LazyData: TRUE License: MIT + file LICENSE Imports: utils, @@ -21,8 +21,14 @@ Imports: glue, checkmate Suggests: - testthat, + covr, + knitr, lintr, + markdown, + rcmdcheck, + rmarkdown, shinydashboard, - covr -RoxygenNote: 7.1.1 + testthat +RoxygenNote: 7.2.1 +VignetteBuilder: + knitr diff --git a/NAMESPACE b/NAMESPACE index d941fde..2b77a67 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -37,8 +37,10 @@ export(render_value_box) export(semantic_palette) export(sidebarMenu) export(sidebarMenuOutput) +export(sidebarUserPanel) export(sidebar_menu) export(sidebar_menu_output) +export(sidebar_user_panel) export(tabBox) export(tabItem) export(tabItems) @@ -47,6 +49,8 @@ export(tab_item) export(tab_items) export(taskItem) export(task_item) +export(updateTabItems) +export(update_tab_items) export(valueBox) export(valueBoxOutput) export(value_box) diff --git a/R/box.R b/R/box.R index 77316fe..5162da4 100644 --- a/R/box.R +++ b/R/box.R @@ -23,12 +23,16 @@ box <- function(..., title = NULL, color = "", ribbon = TRUE, title_side = "top collapsible = TRUE, width = 8, id = NULL, collapse_icon = "minus", expand_icon = "plus") { verify_value_allowed("color", c("", ALLOWED_COLORS)) - verify_value_allowed("title_side", if (ribbon) ALLOWED_BOX_SIDES_RIBBON else ALLOWED_BOX_SIDES_NONRIBBON) + verify_value_allowed( + "title_side", + if (ribbon) ALLOWED_BOX_SIDES_RIBBON else ALLOWED_BOX_SIDES_NONRIBBON + ) box_id <- if (!is.character(id)) { paste0("box_", random_id_generator()) } else { id } + title_id <- sub("box_", "title_", box_id) label <- if (!is.character(title)) { NULL } else { @@ -40,18 +44,23 @@ box <- function(..., title = NULL, color = "", ribbon = TRUE, title_side = "top } shiny::div(class = title_class, minimize_button, title) } + icon_selector <- glue::glue("'#{title_id} > .label > .icon'") + # nolint start: line_length_linter js_script <- glue::glue("$('#{box_id}').accordion({{ - selector: {{ trigger: '.title .icon' }}, - onOpening: function() {{ $('#{box_id}').find('.label .icon').removeClass('{expand_icon}').addClass('{collapse_icon}'); }}, - onClosing: function() {{ $('#{box_id}').find('.label .icon').removeClass('{collapse_icon}').addClass('{expand_icon}'); }} + selector: {{ trigger: {icon_selector} }}, + onOpening: function() {{ $({icon_selector}).removeClass('{expand_icon}').addClass('{collapse_icon}'); }}, + onClosing: function() {{ $({icon_selector}).removeClass('{collapse_icon}').addClass('{expand_icon}'); }} }});") + # nolint end column(width = width, shiny::div(class = paste("ui segment raised", color), shiny::div(id = box_id, class = "ui accordion", - shiny::div(class = "title", style = "cursor: auto", label), + shiny::div(id = title_id, class = "title", style = "cursor: auto", label), shiny::div(class = "content active", shiny::div(...)) ) ), - if (collapsible) shiny::singleton(shiny::tags$script(paste0("$(document).ready(function() { ", js_script, " })"))) + if (collapsible) shiny::singleton( + shiny::tags$script(shiny::HTML(paste0("$(document).ready(function() {", js_script, " })"))) + ) ) } diff --git a/R/column.R b/R/column.R index 20f2ded..12db2cd 100644 --- a/R/column.R +++ b/R/column.R @@ -4,8 +4,8 @@ #' @param ... UI elements to include within the column. #' @return A column that can be passed to \code{\link[semantic.dashboard]{dashboardPage}} #' @export -column <- function(width, ...){ - if (!is.numeric(width) || (width < MIN_COLUMN_WIDTH) || (width > MAX_COLUMN_WIDTH)){ +column <- function(width, ...) { + if (!is.numeric(width) || (width < MIN_COLUMN_WIDTH) || (width > MAX_COLUMN_WIDTH)) { stop(paste("'width' must be between", MIN_COLUMN_WIDTH, "and", MAX_COLUMN_WIDTH)) } shiny::tags$div(class = paste(COLUMN_WIDTHS[width], "wide column"), ...) diff --git a/R/constants.R b/R/constants.R index 63efb04..7e903f0 100644 --- a/R/constants.R +++ b/R/constants.R @@ -1,12 +1,18 @@ -ALLOWED_COLORS <- c("", "red", "orange", "yellow", "olive", "green", "teal", - "blue", "violet", "purple", "pink", "brown", "grey", "black") +ALLOWED_COLORS <- c( + "", "red", "orange", "yellow", "olive", "green", "teal", + "blue", "violet", "purple", "pink", "brown", "grey", "black" +) ALLOWED_SIDEBAR_SIZES <- c("", "thin", "very thin", "wide", "very wide") ALLOWED_SIDEBAR_SIDES <- c("left", "right", "top", "bottom") ALLOWED_VALUEBOX_SIZES <- c("mini", "tiny", "small", "", "large", "huge") -ALLOWED_BOX_SIDES_NONRIBBON <- c("top", "bottom", "top left", "top right", "bottom left", "bottom right") +ALLOWED_BOX_SIDES_NONRIBBON <- c( + "top", "bottom", "top left", "top right", "bottom left", "bottom right" +) ALLOWED_BOX_SIDES_RIBBON <- c("top left", "top right") -COLUMN_WIDTHS <- c("", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", - "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen") +COLUMN_WIDTHS <- c( + "", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", + "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen" +) MIN_COLUMN_WIDTH <- 1 MAX_COLUMN_WIDTH <- 16 MIN_PROGRESS_VALUE <- 0 @@ -21,19 +27,27 @@ progress_bar_js <- "$('.progress').progress();" #' Semantic colors #' https://github.com/Semantic-Org/Semantic-UI/blob/master/src/themes/default/globals/site.variables #' @export -semantic_palette <- c("#A333C8", "#21BA45", "#2185D0", "#DB2828", "#F2711C", "#FBBD08", "#B5CC18", - "#00B5AD", "#6435C9", "#E03997", "#A5673F", "#767676", "#1B1C1D") -names(semantic_palette) <- c("purple", "green", "blue", "red", "orange", "yellow", "olive", "teal", - "violet", "pink", "brown", "grey", "black") +semantic_palette <- c( + "#A333C8", "#21BA45", "#2185D0", "#DB2828", "#F2711C", "#FBBD08", "#B5CC18", + "#00B5AD", "#6435C9", "#E03997", "#A5673F", "#767676", "#1B1C1D" +) +names(semantic_palette) <- c( + "purple", "green", "blue", "red", "orange", "yellow", "olive", "teal", + "violet", "pink", "brown", "grey", "black" +) #' Semantic light colors #' https://github.com/Semantic-Org/Semantic-UI/blob/master/src/themes/default/globals/site.variables #' @export -light_semantic_palette <- c("#DC73FF", "#2ECC40", "#54C8FF", "#FF695E", "#FF851B", "#FFE21F", - "#D9E778", "#6DFFFF", "#A291FB", "#FF8EDF", "#D67C1C", "#DCDDDE", - "#545454") +light_semantic_palette <- c( + "#DC73FF", "#2ECC40", "#54C8FF", "#FF695E", "#FF851B", "#FFE21F", + "#D9E778", "#6DFFFF", "#A291FB", "#FF8EDF", "#D67C1C", "#DCDDDE", + "#545454" +) -names(light_semantic_palette) <- c("lightPurple", "lightGreen", "lightBlue", "lightRed", - "lightOrange", "lightYellow", "lightOlive", "lightTeal", - "lightViolet", "lightPink", "lightBrown", "lightGrey", - "lightBlack") +names(light_semantic_palette) <- c( + "lightPurple", "lightGreen", "lightBlue", "lightRed", + "lightOrange", "lightYellow", "lightOlive", "lightTeal", + "lightViolet", "lightPink", "lightBrown", "lightGrey", + "lightBlack" +) diff --git a/R/deps.R b/R/deps.R index cd05f37..a0c1b9e 100644 --- a/R/deps.R +++ b/R/deps.R @@ -1,15 +1,17 @@ #' Get the semantic.dashboard dependencies #' -#' @description To add dependencies in the future follow the \code{\link[htmltools]{htmlDependency}} help. +#' @description To add dependencies in the future follow the \code{\link[htmltools]{htmlDependency}} +#' help. #' #' @return semantic.dashboard dependencies +#' @keywords internal get_dashboard_dependencies <- function() { list( htmlDependency( "semantic.dashboard", as.character(utils::packageVersion("semantic.dashboard")), c(file = system.file(package = "semantic.dashboard")), - script = "semantic.dashboard.min.js", + script = c("semantic.dashboard.min.js", "updateTabItems.js"), stylesheet = "semantic.dashboard.min.css" ) ) diff --git a/R/dropdown_menu.R b/R/dropdown_menu.R index 3460b33..69f576d 100644 --- a/R/dropdown_menu.R +++ b/R/dropdown_menu.R @@ -2,7 +2,7 @@ #' @description Create a dropdown menu with additional UI elements. #' @param ... UI elements to include within the dropdown menu. #' @param type Type of the displayed items. -#' @param icon Icon of the dropdown menu. If not specyfied created based on \code{type} agrument. +#' @param icon Icon of the dropdown menu. If not specified created based on \code{type} argument. #' @param show_counter If true circular label with counter is going to be shown for dropdown. #' @return A dropdown menu that can be passed to \code{\link[semantic.dashboard]{dashboardHeader}} #' @export @@ -31,7 +31,8 @@ dropdown_menu <- function(..., type = "messages", icon = NULL, show_counter = TR shiny::tags$script(progress_bar_js)) } -#' @describeIn dropdown_menu Create a dropdown menu (alias for \code{dropdown_menu} for compatibility with \code{shinydashboard}) +#' @describeIn dropdown_menu Create a dropdown menu (alias for \code{dropdown_menu} for +#' compatibility with \code{shinydashboard}) #' @export dropdownMenu <- dropdown_menu @@ -54,7 +55,8 @@ message_item <- function(from, message, ..., icon = "user") { ...) } -#' @describeIn message_item Create a message item (alias for \code{message_item} for compatibility with \code{shinydashboard}) +#' @describeIn message_item Create a message item (alias for \code{message_item} for compatibility +#' with \code{shinydashboard}) #' @export messageItem <- message_item @@ -69,19 +71,26 @@ messageItem <- message_item #' @export #' @examples #' taskItem("Project progress...", 50.777, color = "red") -task_item <- function(text, value, color = ""){ - if (!is.numeric(value) || (value < MIN_PROGRESS_VALUE) || (value > MAX_PROGRESS_VALUE)){ +task_item <- function(text, value, color = "") { + if (!is.numeric(value) || (value < MIN_PROGRESS_VALUE) || (value > MAX_PROGRESS_VALUE)) { warning(paste("'value' must be between", MIN_PROGRESS_VALUE, "and", MAX_PROGRESS_VALUE)) } verify_value_allowed("color", c("", ALLOWED_COLORS)) - shiny::tags$div(class = "item", style = "min-width: 200px;", - shiny::tags$div(class = paste("ui active progress", color), - `data-percent` = value, `data-total` = 100, - shiny::tags$div(class = "bar", shiny::tags$div(class = "progress")), - shiny::tags$div(class = "label", text))) + shiny::tags$div( + class = "item", + style = "min-width: 200px;", + shiny::tags$div( + class = paste("ui active progress", color), + `data-percent` = value, + `data-total` = 100, + shiny::tags$div(class = "bar", shiny::tags$div(class = "progress")), + shiny::tags$div(class = "label", text) + ) + ) } -#' @describeIn task_item Create a task item (alias for \code{taks_item} for compatibility with \code{shinydashboard}) +#' @describeIn task_item Create a task item (alias for \code{taks_item} for compatibility with +#' \code{shinydashboard}) #' @export taskItem <- task_item @@ -96,13 +105,14 @@ taskItem <- task_item #' @export #' @examples #' notificationItem("This is notification!", color = "red") -notification_item <- function(text, icon = "warning", color = ""){ +notification_item <- function(text, icon = "warning", color = "") { verify_value_allowed("color", c("", ALLOWED_COLORS)) shiny::tags$div(class = "item", shiny::tags$div(class = paste("ui label", color), shiny::tags$i(class = paste("small", icon, "icon")), text)) } -#' @describeIn notification_item Create a notification item (alias for \code{notification_item} for compatibility with \code{shinydashboard}) +#' @describeIn notification_item Create a notification item (alias for \code{notification_item} for +#' compatibility with \code{shinydashboard}) #' @export notificationItem <- notification_item diff --git a/R/dropdown_menu_output.R b/R/dropdown_menu_output.R index 94b0e39..bf52d4b 100644 --- a/R/dropdown_menu_output.R +++ b/R/dropdown_menu_output.R @@ -12,11 +12,12 @@ #' messageItem("Marek", "Another test!", icon = "warning", color = "red")) #' }) #' } -dropdown_menu_output <- function(outputId){ +dropdown_menu_output <- function(outputId) { shiny::uiOutput(outputId, class = "right icon menu") } -#' @describeIn dropdown_menu_output Create a dropdown menu output (alias for \code{dropdown_menu_output} for compatibility with \code{shinydashboard}) +#' @describeIn dropdown_menu_output Create a dropdown menu output (alias for \code{dropdown_menu +#' output} for compatibility with \code{shinydashboard}) #' @export dropdownMenuOutput <- dropdown_menu_output @@ -24,7 +25,8 @@ dropdownMenuOutput <- dropdown_menu_output #' @description Server-side function for dynamic dropdownMenu. #' @param expr dropdownMenu. #' @param env The environment in which to evaluate expr. -#' @param quoted Is expr a quoted expression (with \code{quote()})? This is useful if you want to save an expression in a variable. +#' @param quoted Is expr a quoted expression (with \code{quote()})? This is useful if you want to +#' save an expression in a variable. #' @return A dynamic dropdown menu that can be assigned to output. #' @export #' @examples @@ -36,11 +38,12 @@ dropdownMenuOutput <- dropdown_menu_output #' messageItem("Marek", "Another test!", icon = "warning", color = "red")) #' }) #' } -render_dropdown_menu <- function(expr, env = parent.frame(), quoted = FALSE){ +render_dropdown_menu <- function(expr, env = parent.frame(), quoted = FALSE) { fun <- shiny::exprToFunction(expr, env, quoted) shiny::renderUI(fun()) } -#' @describeIn render_dropdown_menu Create a dropdown menu output (alias for \code{render_dropdown_menu} for compatibility with \code{shinydashboard}) +#' @describeIn render_dropdown_menu Create a dropdown menu output (alias for \code{render_dropdown +#' menu} for compatibility with \code{shinydashboard}) #' @export renderDropdownMenu <- render_dropdown_menu diff --git a/R/menu_item.R b/R/menu_item.R index 3a761db..6b93d91 100644 --- a/R/menu_item.R +++ b/R/menu_item.R @@ -2,7 +2,8 @@ #' #' This creates an icon tag using Semantic UI styles. #' -#' @param type A name of an icon. Look at http://semantic-ui.com/elements/icon.html for all possibilities. +#' @param type A name of an icon. Look at http://semantic-ui.com/elements/icon.html for all +#' possibilities. #' @param ... Other arguments to be added as attributes of the tag (e.g. style, class etc.) #' #' @export @@ -14,6 +15,7 @@ icon <- function(type, ...) { #' Valid tab name should not containt dot character '.'. #' @param name Tab name to validate. +#' @keywords internal validate_tab_name <- function(name) { if (grepl(".", name, fixed = TRUE)) { stop("tabName must not have a '.' in it.") @@ -28,11 +30,18 @@ validate_tab_name <- function(name) { #' @param tabName Id of the tab. Not compatible with href. #' @param href A link address. Not compatible with tabName. #' @param newtab If href is supplied, should the link open in a new browser tab? +#' @param selected If TRUE, this menuItem will start selected. #' @return A menu item that can be passed \code{\link[semantic.dashboard]{sidebarMenu}} #' @export #' @examples #' menuItem(tabName = "plot_tab", text = "My plot", icon = icon("home")) -menu_item <- function(text, ..., icon = NULL, tabName = NULL, href = NULL, newtab = TRUE) { +menu_item <- function(text, + ..., + icon = NULL, + tabName = NULL, + href = NULL, + newtab = TRUE, + selected = FALSE) { sub_items <- list(...) if (!is.null(href) + (!is.null(tabName) + (length(sub_items) > 0) != 1)) { stop("Must have either href, tabName, or sub-items (contained in ...).") @@ -46,20 +55,28 @@ menu_item <- function(text, ..., icon = NULL, tabName = NULL, href = NULL, newta isTabItem <- TRUE data_tab <- paste0("shiny-tab-", tabName) href <- paste0("#", data_tab) - } - else if (is.null(href)) { + } else if (is.null(href)) { href <- "#" - } - else if (newtab) { - target <- "_blank" + } else if (newtab) { + target <- "_blank" } if (length(sub_items) == 0) { - shiny::tags$a(class = "item", href = href, icon, text, - `data-tab` = data_tab, - `data-toggle` = if (isTabItem) "tab", - `data-value` = if (!is.null(tabName)) tabName, - target = target) + shiny::tags$a( + class = "item", href = href, icon, text, + `data-tab` = data_tab, + `data-toggle` = if (isTabItem) "tab", + `data-value` = if (!is.null(tabName)) tabName, + target = target, + if (selected) shiny::singleton(shiny::tags$script(shiny::HTML(glue::glue(" + $(function() {{ + ['.dashboard-sidebar a', '.tab-content > div'].forEach(function(tag) {{ + $(`${{tag}}[data-tab]`).removeClass('active'); + $(`${{tag}}[data-tab=\"{data_tab}\"]`).addClass('active'); + }}) + }}) + ")))) + ) } else { shiny::tags$div(class = "item", shiny::tags$div(class = "header", text), @@ -68,29 +85,150 @@ menu_item <- function(text, ..., icon = NULL, tabName = NULL, href = NULL, newta } } -#' @describeIn menu_item Create a menu item (alias for \code{manu_item} for compatibility with \code{shinydashboard}) +#' @describeIn menu_item Create a menu item (alias for \code{menu_item} for compatibility with +#' \code{shinydashboard}) #' @export menuItem <- menu_item -#' @describeIn menu_item Create a menu item (alias for \code{manu_item} for compatibility with \code{shinydashboard}) +#' @describeIn menu_item Create a menu item (alias for \code{menu_item} for compatibility with +#' \code{shinydashboard}) #' @export menuSubItem <- menu_item #' Create a sidebar menu. #' @description Create a sidebar menu with menu items. -#' @param id The sidebar id class also used for update input on server side. Default is \code{uisidebar} #' @param ... Menu items. #' @return A sidebar menu that can be passed \code{\link[semantic.dashboard]{dashboardSidebar}} #' @export +#' @details +#' It's possible to set selected menu item by setting `selected = TRUE` in `menuItem`. #' @examples #' sidebarMenu( #' menuItem(tabName = "plot_tab", text = "My plot", icon = icon("home")), -#' menuItem(tabName = "table_tab", text = "My table", icon = icon("smile")) -#' ) -sidebar_menu <- function(..., id = "uisidebar") { - c(as.list(environment()), list(...)) +#' menuItem(tabName = "table_tab", text = "My table", icon = icon("smile"), selected = TRUE) +#' ) +sidebar_menu <- function(...) { + shiny::div(id = "uisidebar", list(...)) } -#' @describeIn sidebar_menu Create a sidebar menu (alias for \code{sidebar_menu} for compatibility with \code{shinydashboard}) +#' @describeIn sidebar_menu Create a sidebar menu (alias for \code{sidebar_menu} for compatibility +#' with \code{shinydashboard}) #' @export sidebarMenu <- sidebar_menu + +#' Change the selected tab on the client +#' @param session The session object passed to function given to shinyServer +#' @param tab The name of the tab that should be selected +#' @examples +#' if (interactive()) { +#' ui <- dashboardPage( +#' dashboardSidebar( +#' sidebarMenu( +#' menuItem("Tab 1", tabName = "tab1"), +#' menuItem("Tab 2", tabName = "tab2") +#' ) +#' ), +#' dashboardBody( +#' tabItems( +#' tabItem(tabName = "tab1", h2("Tab 1")), +#' tabItem(tabName = "tab2", h2("Tab 2")) +#' ) +#' ) +#' ) +#' +#' server <- function(input, output, session) { +#' update_tab_items(tab = "tab2") +#' } +#' +#' shinyApp(ui, server) +#' } +#' @export +update_tab_items <- function(session = shiny::getDefaultReactiveDomain(), tab) { + validate_session_object(session) # nolint: object_usage_linter + session$sendCustomMessage("update_tab", tab) +} + +#' @describeIn update_tab_items Change the selected item on the client (alias for +#' \code{update_tab_items} for compatibility with \code{shinydashboard}) +#' @export +updateTabItems <- update_tab_items + +#' Create a user panel +#' +#' @description This creates an user panel using Semantic UI styles. +#' +#' @param name Name of the user +#' @param subtitle Information to be displayed below the name (for example +#' if the user is online) +#' @param image Path to an image. This can be a relative link to an existing +#' `www/` directory, or an URL to an image +#' @param image_size CSS class to display the image, see Semantic documentation +#' for all sizes (goes from `mini` to `massive`) +#' +#' @return A div tag with the user panel +#' @export +#' +#' @examples +#' sidebarUserPanel( +#' "Some Name", +#' subtitle = shiny::a(href = "#", icon("circle"), "Online"), +#' # Image file should be in www/ subdir +#' # or a link to a image +#' image = "some_image_located_inside_www_dir.jpg", +#' image_size = "mini" +#' ) +#' +#' ui_user <- sidebarUserPanel( +#' "Jane Smith", +#' subtitle = shiny::a(href = "#", icon("circle"), "Online"), +#' # Image file should be in www/ subdir +#' # or a link to a image +#' image = base::system.file( +#' file.path('examples', "www", "jane_smith.jpg"), +#' package = "semantic.dashboard" +#' ), +#' image_size = "mini" +#' ) +#' +#' if (interactive()) { +#' ui <- dashboardPage( +#' dashboardHeader(), +#' dashboardSidebar( +#' ui_user, +#' sidebarMenu( +#' menuItem("Tab 1", tabName = "tab1"), +#' menuItem("Tab 2", tabName = "tab2") +#' ) +#' ), +#' body = dashboardBody( +#' tabItems( +#' tabItem(tabName = "tab1", h2("Tab 1")), +#' tabItem(tabName = "tab2", h2("Tab 2")) +#' ) +#' ) +#' ) +#' +#' server <- function(input, output, session) {} +#' shinyApp(ui, server) +#' } +sidebar_user_panel <- function(name, + subtitle = NULL, + image = NULL, + image_size = "tiny") { + shiny::div( + class = "user-panel", + if (!is.null(image)) { + shiny::img( + src = image, + class = glue::glue("ui {image_size} circular left floated image", + alt = "User Image") + ) + }, + p(name), subtitle + ) + } + +#' @describeIn sidebar_user_panel Create a sidebar user panel (alias for +#' \code{sidebar_user_panel} for compatibility with \code{shinydashboard}) +#' @export +sidebarUserPanel <- sidebar_user_panel diff --git a/R/semantic_dashboard.R b/R/semantic_dashboard.R index f8b4e48..89156df 100644 --- a/R/semantic_dashboard.R +++ b/R/semantic_dashboard.R @@ -4,21 +4,28 @@ #' @import htmltools #' @import glue #' @import checkmate +#' @keywords internal NULL #' Create a header of a dashboard. #' @description Create a header of a dashboard with other additional UI elements. -#' Hint: use \code{shiny::tagList()} if you want to add multiple elements in \code{left} / \code{center} or \code{right}. +#' Hint: use \code{shiny::tagList()} if you want to add multiple elements in +#' \code{left} / \code{center} or \code{right}. #' @param ... UI elements to include within the header. They will be displayed on the right side. -#' @param left UI element to put on the left of the header. It will be placed after (to the right) the title and menu button (if they exist). +#' @param left UI element to put on the left of the header. It will be placed after (to the right) +#' the title and menu button (if they exist). #' @param center UI element to put in the center of the header. -#' @param right UI element to put to the right of the header. It will be placed before elements defined in \code{...} (if there are any). -#' @param title Dashboard title to be displayed in the upper left corner. If NULL, will not display any title field. Use "" for an empty title. -#' @param titleWidth Title field width, one of \code{c(NULL, "very thin", "thin", "wide", "very wide")} +#' @param right UI element to put to the right of the header. It will be placed before elements +#' defined in \code{...} (if there are any). +#' @param title Dashboard title to be displayed in the upper left corner. If NULL, will not display +#' any title field. Use "" for an empty title. +#' @param titleWidth Title field width, one of \code{c(NULL, "very thin", "thin", "wide", +#' "very wide")} #' @param logo_align Where should logo be placed. One of \code{c("left", "center")} #' @param logo_path Path or URL of the logo to be shown in the header. -#' @param color Color of the sidebar / text / icons (depending on the value of `inverted` parameter. \ -#' One of \code{c("", "red", "orange", "yellow", "olive", "green", "teal", "blue", "violet", "purple", "pink", "brown", "grey", "black")} +#' @param color Color of the sidebar / text / icons (depending on the value of `inverted` parameter. +#' One of \code{c("", "red", "orange", "yellow", "olive", "green", "teal", "blue", "violet", +#' "purple", "pink", "brown", "grey", "black")} #' @param inverted If FALSE sidebar will be white and text will be colored. \ #' If TRUE text will be white and background will be colored. Default is \code{FALSE}. #' @param disable If \code{TRUE}, don't display the header. @@ -64,7 +71,10 @@ dashboard_header <- function(..., left = NULL, center = NULL, right = NULL, inverted_value <- get_inverted_class(inverted) title_span <- if (!is.null(title)) { - title_class <- paste(c("ui menu dashboard-title", titleWidth, inverted_value, color), collapse = " ") + title_class <- paste( + c("ui menu dashboard-title", titleWidth, inverted_value, color), + collapse = " " + ) shiny::span(title, class = title_class) } else { NULL @@ -72,7 +82,7 @@ dashboard_header <- function(..., left = NULL, center = NULL, right = NULL, logo <- if (logo_path != "") { shiny::tags$img( - class="logo", + class = "logo", src = logo_path ) } else { @@ -89,13 +99,19 @@ dashboard_header <- function(..., left = NULL, center = NULL, right = NULL, NULL } - logo_left <- if (logo_align == "left") { logo } - logo_center <- if (logo_align == "center") { logo } - logo_right <- if (logo_align == "right") { logo } + logo_left <- if (logo_align == "left") logo + logo_center <- if (logo_align == "center") logo + logo_right <- if (logo_align == "right") logo - left_content <- div(class="header-part header-part__left", title_span, menu_button, logo_left, left) - center_content <- div(class="header-part header-part__center", logo_center, center) - right_content <- div(class="header-part header-part__right", logo_right, right, ...) + left_content <- div( + class = "header-part header-part__left", + title_span, + menu_button, + logo_left, + left + ) + center_content <- div(class = "header-part header-part__center", logo_center, center) + right_content <- div(class = "header-part header-part__right", logo_right, right, ...) shiny::div( class = paste("ui top attached dashboard-header", inverted_value, color, "menu", class), @@ -106,28 +122,34 @@ dashboard_header <- function(..., left = NULL, center = NULL, right = NULL, } } -#' @describeIn dashboard_header Create a header of a dashboard (alias for \code{dashboard_header} for compatibility with \code{shinydashboard}) +#' @describeIn dashboard_header Create a header of a dashboard (alias for \code{dashboard_header} +#' for compatibility with \code{shinydashboard}) #' @export dashboardHeader <- dashboard_header #' Create a sidebar of a dashboard. -#' @description Create a pushable sidebar of a dashboard with menu items and other additional UI elements. +#' @description Create a pushable sidebar of a dashboard with menu items and other additional UI +#' elements. #' @param ... UI elements to include within the sidebar. #' @param side Placement of the sidebar. One of \code{c("left", "right", "top", "bottom")} #' @param size Size of the sidebar. One of \code{c("", "thin", "very thin", "wide", "very wide")} -#' @param color Color of the sidebar / text / icons (depending on the value of `inverted` parameter. \ -#' One of \code{c("", "red", "orange", "yellow", "olive", "green", "teal", "blue", "violet", "purple", "pink", "brown", "grey", "black")} +#' @param color Color of the sidebar / text / icons (depending on the value of `inverted` +#' parameter. One of \code{c("", "red", "orange", "yellow", "olive", "green", "teal", "blue", +#' "violet","purple", "pink", "brown", "grey", "black")} #' @param inverted If FALSE sidebar will be white and text will be colored. \ #' If TRUE text will be white and background will be colored. Default is \code{FALSE}. #' @param center Should label and icon be centerd on menu items. Default to \code{FALSE} #' @param visible Should sidebar be visible on start. Default to \code{TRUE} #' @param disable If \code{TRUE}, don't display the sidebar. -#' @param closable If \code{TRUE} allow close sidebar by clicking in the body. Default to \code{FALSE} +#' @param closable If \code{TRUE} allow close sidebar by clicking in the body. Default to +#' \code{FALSE} #' @param pushable If \code{TRUE} the menu button is active. Default to \code{TRUE} -#' @param overlay If \code{TRUE}, opened sidebar will cover the tab content. Otherwise it is displayed next to the content. -#' Relevant only for sidebar positioned on left or right. Default to \code{FALSE} -#' @param dim_page If \code{TRUE}, page content will be darkened when sidebr is open. Default to \code{FALSE} +#' @param overlay If \code{TRUE}, opened sidebar will cover the tab content. Otherwise it is +#' displayed next to the content. Relevant only for sidebar positioned on left or right. Default +#' to \code{FALSE} +#' @param dim_page If \code{TRUE}, page content will be darkened when sidebr is open. Default to +#' \code{FALSE} #' @param class CSS class to be applied to the container of \code{dashboardSidebar}. #' @return A sidebar that can be passed to \code{\link[semantic.dashboard]{dashboardPage}} #' @export @@ -159,12 +181,14 @@ dashboard_sidebar <- function(..., side = "left", size = "thin", color = "", inv if (disable || length(list(...)) < 1) { NULL } else { + arguments <- list(...) verify_value_allowed("side", ALLOWED_SIDEBAR_SIDES) verify_value_allowed("size", ALLOWED_SIDEBAR_SIZES) verify_value_allowed("color", ALLOWED_COLORS) display_type <- ifelse(center, "labeled icon", "") uncover_class <- ifelse(isTRUE(visible) & isFALSE(overlay), "uncover", "") + if (side %in% c("top", "bottom")) uncover_class <- "" overlay_class <- ifelse(isTRUE(visible) & isTRUE(overlay), "overlay", "") inverted_value <- get_inverted_class(inverted) @@ -173,19 +197,37 @@ dashboard_sidebar <- function(..., side = "left", size = "thin", color = "", inv overlay <- ifelse(overlay, quote(true), quote(false)) dim_page <- ifelse(dim_page, quote(true), quote(false)) - shiny::div(closable = closable, - id = ..1$id, - class = paste("dashboard-sidebar ui", size, side, color, ifelse(side %in% c("top", "bottom"), "", "vertical"), - display_type, ifelse(visible, "visible", ""), inverted_value, "menu sidebar", uncover_class, - overlay_class, class), - ..1[-1], - shiny::tags$script(glue("initialize_sidebar({closable}, {pushable}, {overlay}, {dim_page})")) - ) - + do.call( + shiny::div, + list( + closable = glue::glue("{closable}"), + id = arguments$id, + class = paste( + "dashboard-sidebar ui", + size, + side, + color, + ifelse(side %in% c("top", "bottom"), "", "vertical"), + display_type, + ifelse(visible, "visible", ""), + inverted_value, + "menu sidebar", + uncover_class, + overlay_class, + class + ), + arguments, + shiny::tags$script(glue::glue( + "initialize_sidebar({closable}, {pushable}, {overlay}, {dim_page})" + )), + shiny::tags$script(src = "src/updateTabItems.js") + ) + ) } } -#' @describeIn dashboard_sidebar Create a sidebar of a dashboard (alias for \code{dashboard_sidebar} for compatibility with \code{shinydashboard}) +#' @describeIn dashboard_sidebar Create a sidebar of a dashboard (alias for \code{dashboard_sidebar} +#' for compatibility with \code{shinydashboard}) #' @export dashboardSidebar <- dashboard_sidebar @@ -193,7 +235,8 @@ dashboardSidebar <- dashboard_sidebar #' Create a body of a dashboard. #' @description Create a body of a dashboard with tabs and other additional UI elements. #' @param ... UI elements to include within the body. -#' @param class CSS class to be applied to the container of \code{dashboardBody}. Note it's not the \code{} tag. +#' @param class CSS class to be applied to the container of \code{dashboardBody}. Note it's not the +#' \code{} tag. #' @return A tab that can be passed to \code{\link[semantic.dashboard]{dashboardPage}} #' @export #' @examples @@ -218,23 +261,26 @@ dashboardSidebar <- dashboard_sidebar #' #' shinyApp(ui, server) #' } -dashboard_body <- function(..., class = ""){ +dashboard_body <- function(..., class = "") { shiny::div(class = paste("ui grid pusher dashboard-body", class), ...) } -#' @describeIn dashboard_body Create a body of a dashboard (alias for \code{dashboard_body} for compatibility with \code{shinydashboard}) +#' @describeIn dashboard_body Create a body of a dashboard (alias for \code{dashboard_body} for +#' compatibility with \code{shinydashboard}) #' @export dashboardBody <- dashboard_body #' Create a dashboard. -#' @description Create a page with menu item sidebar and body containing tabs and other additional elements. +#' @description Create a page with menu item sidebar and body containing tabs and other additional +#' elements. #' @param header Header of a dashboard. #' @param sidebar Sidebar of a dashboard. #' @param body Body of a dashboard. #' @param title Title of a dashboard. #' @param margin If \code{TRUE}, margin to be applied to the whole dashboard. #' Defaults to \code{TRUE}. -#' @param theme Theme name or path. For possible options see \code{\link[shiny.semantic]{semanticPage}}. +#' @param theme Theme name or path. For possible options see +#' \code{\link[shiny.semantic]{semanticPage}}. #' @param class CSS class to be applied to the page container (\code{} tag). #' @param sidebar_and_body_container_class CSS class to be applied to the \code{div} containing #' \code{dashboardSidebar} and \code{dashboardBody}. @@ -267,20 +313,30 @@ dashboardBody <- dashboard_body #' } dashboard_page <- function(header, sidebar, body, title = "", suppress_bootstrap = TRUE, theme = NULL, - margin = TRUE, class = "", sidebar_and_body_container_class = "") { + margin = TRUE, class = "", sidebar_and_body_container_class = "") { # nolint: object_length_linter # TODO: Remove this line when it is added to semanticPage() if (is.null(sidebar)) header$children[[1]] <- NULL - sidebar_and_body <- div(class = paste("ui bottom attached segment pushable", sidebar_and_body_container_class), - sidebar, - body) + sidebar_and_body <- div( + class = paste("ui bottom attached segment pushable", sidebar_and_body_container_class), + sidebar, + body + ) margin_class <- ifelse(isFALSE(margin), "no-margin", "") class <- paste("dashboard-page", margin_class, class) - shiny.semantic::semanticPage(header, sidebar_and_body, get_dashboard_dependencies(), margin = "0", - title = title, theme = theme, suppress_bootstrap = suppress_bootstrap, - class = class) + shiny.semantic::semanticPage( + header, + sidebar_and_body, + get_dashboard_dependencies(), + margin = "0", + title = title, + theme = theme, + suppress_bootstrap = suppress_bootstrap, + class = class + ) } -#' @describeIn dashboard_page Create a dashboard (alias for \code{dashboard_page} for compatibility with \code{shinydashboard}) +#' @describeIn dashboard_page Create a dashboard (alias for \code{dashboard_page} for compatibility +#' with \code{shinydashboard}) #' @export dashboardPage <- dashboard_page diff --git a/R/sidebar_menu_output.R b/R/sidebar_menu_output.R index f562b06..3256cc0 100644 --- a/R/sidebar_menu_output.R +++ b/R/sidebar_menu_output.R @@ -3,11 +3,12 @@ #' @param outputId Id of the output. #' @return A sidebar menu that can be passed to \code{\link[semantic.dashboard]{dashboardSidebar}} #' @export -sidebar_menu_output <- function(outputId){ +sidebar_menu_output <- function(outputId) { shiny::uiOutput(outputId) } -#' @describeIn sidebar_menu_output Create a sidebar menu output (alias for \code{sidebar_menu_output} for compatibility with \code{shinydashboard}) +#' @describeIn sidebar_menu_output Create a sidebar menu output (alias for \code{sidebar_menu +#' output} for compatibility with \code{shinydashboard}) #' @export sidebarMenuOutput <- sidebar_menu_output @@ -16,11 +17,12 @@ sidebarMenuOutput <- sidebar_menu_output #' @param outputId Id of the output. #' @return A menu item that can be passed to \code{\link[semantic.dashboard]{sidebarMenu}} #' @export -menu_item_output <- function(outputId){ +menu_item_output <- function(outputId) { shiny::uiOutput(outputId) } -#' @describeIn menu_item_output Create a menu item output (alias for \code{menu_item_output} for compatibility with \code{shinydashboard}) +#' @describeIn menu_item_output Create a menu item output (alias for \code{menu_item_output} for +#' compatibility with \code{shinydashboard}) #' @export menuItemOutput <- menu_item_output @@ -28,14 +30,16 @@ menuItemOutput <- menu_item_output #' @description Server-side function for dynamic sidebarMenu. #' @param expr menu. #' @param env The environment in which to evaluate expr. -#' @param quoted Is expr a quoted expression (with \code{quote()})? This is useful if you want to save an expression in a variable. +#' @param quoted Is expr a quoted expression (with \code{quote()})? This is useful if you want to +#' save an expression in a variable. #' @return A dynamic menu that can be assigned to output. #' @export -render_menu <- function(expr, env = parent.frame(), quoted = FALSE){ +render_menu <- function(expr, env = parent.frame(), quoted = FALSE) { fun <- shiny::exprToFunction(expr, env, quoted) shiny::renderUI(fun()) } -#' @describeIn render_menu Create a menu output (alias for \code{render_menu} for compatibility with \code{shinydashboard}) +#' @describeIn render_menu Create a menu output (alias for \code{render_menu} for compatibility +#' with \code{shinydashboard}) #' @export renderMenu <- render_menu diff --git a/R/tab.R b/R/tab.R index c4b6232..0ba7340 100644 --- a/R/tab.R +++ b/R/tab.R @@ -3,45 +3,39 @@ #' Create a tab panel with additional UI elements. #' #' @param tabName Id of the tab. -#' @param fluid Controls whether tab width should be 100\% (TRUE) or limited by Foomantic UI breakpoints (FALSE). +#' @param fluid Controls whether tab width should be 100\% (TRUE) or limited by Foomantic UI +#' breakpoints (FALSE). #' @param ... UI elements to include within the tab. #' @return A tab that can be passed to \code{\link[semantic.dashboard]{dashboardBody}} #' @export #' @examples #' tab_item(tabName = "tab1", "Tab 1") -tab_item <- function(tabName, ..., fluid = TRUE){ +tab_item <- function(tabName, ..., fluid = TRUE) { data_tab <- paste0("shiny-tab-", tabName) shiny::div(role = "tabpanel", style = "height: 100%;", class = paste("ui", "tab tab-pane container", ifelse(fluid, "fluid", "")), id = data_tab, `data-tab` = data_tab, shiny::tags$div(class = "ui padded grid", ...)) } -#' @describeIn tab_item Create a tab (alias for \code{tab_item} for compatibility with \code{shinydashboard}) +#' @describeIn tab_item Create a tab (alias for \code{tab_item} for compatibility with +#' \code{shinydashboard}) #' @export tabItem <- tab_item #' Create a panel with tabs. #' @description Create a panel with tabs. #' @param ... Tabs. -#' @param selected Which tab should be active on start. #' @return A panel with tabs that can be passed to \code{\link[semantic.dashboard]{dashboardBody}} #' @export #' @examples #' tabItems( #' tabItem(tabName = "tab1", "Tab 1"), #' tabItem(tabName = "tab2", "Tab 2")) -tab_items <- function(..., selected = 1){ - tabs <- list(...) - if (round(selected) < 1 | round(selected) > length(tabs) | !is.numeric(selected)){ - warning("Wrong tabItem selected, switched to first one!") - selected_tab <- 1 - } else { - selected_tab <- selected - } - tabs[[selected_tab]]$attribs$class <- paste(tabs[[selected_tab]]$attribs$class, "active") - shiny::tags$div(class = "tab-content", tabs) +tab_items <- function(...) { + shiny::tags$div(class = "tab-content", list(...)) } -#' @describeIn tab_items Create a panel with tabs (alias for \code{tab_items} for compatibility with \code{shinydashboard}) +#' @describeIn tab_items Create a panel with tabs (alias for \code{tab_items} for compatibility +#' with \code{shinydashboard}) #' @export tabItems <- tab_items diff --git a/R/tab_box.R b/R/tab_box.R index 578bc95..552601c 100644 --- a/R/tab_box.R +++ b/R/tab_box.R @@ -22,10 +22,20 @@ #' )) tab_box <- function(tabs, title = NULL, color = "", ribbon = TRUE, title_side = "top right", collapsible = TRUE, width = 8, id = NULL, ...) { - box(shiny.semantic::tabset(tabs), title = title, color = color, ribbon = ribbon, title_side = title_side, - collapsible = collapsible, width = width, id = id, ...) + box( + shiny.semantic::tabset(tabs), + title = title, + color = color, + ribbon = ribbon, + title_side = title_side, + collapsible = collapsible, + width = width, + id = id, + ... + ) } -#' @describeIn tab_box Create a tab box (alias for \code{tab_box} for compatibility with \code{shinydashboard}) +#' @describeIn tab_box Create a tab box (alias for \code{tab_box} for compatibility with +#' \code{shinydashboard}) #' @export tabBox <- tab_box diff --git a/R/utils.R b/R/utils.R index ae73d25..727150b 100644 --- a/R/utils.R +++ b/R/utils.R @@ -1,7 +1,7 @@ # Verify that given variable is in the list of allowed values. verify_value_allowed <- function(variable, values) { var <- get(variable, envir = parent.frame()) - if (!(var %in% values)){ + if (!(var %in% values)) { warning(paste(paste0("'", variable, "'"), "argument should be one of:", paste0("'", values, "'", collapse = ", "))) @@ -15,7 +15,7 @@ get_inverted_class <- function(inverted) { # Interlace elements with dividers between each pair of elements. interlace_dividers <- function(elements) { - dividers <- lapply(1:length(elements), function(i) shiny::tags$div(class = "divider")) + dividers <- lapply(seq_along(elements), function(i) shiny::tags$div(class = "divider")) utils::head(c(rbind(elements, dividers)), -1) # Skips last divider with head. } @@ -23,3 +23,17 @@ interlace_dividers <- function(elements) { random_id_generator <- function(values = 0:9, id_length = 30) { paste0(sample(values, id_length, TRUE), collapse = "") } + +# Check that an object is a ShinySession object, and give an informative error. +# The default label is the caller function's name. +validate_session_object <- function(session, label = as.character(sys.call(sys.parent())[[1]])) { + if (missing(session) || + !inherits(session, c("ShinySession", "MockShinySession", "session_proxy"))) { + stop(call. = FALSE, + sprintf( + "`session` must be a 'ShinySession' object. Did you forget to pass `session` to `%s()`?", + label + ) + ) + } +} diff --git a/R/value_box.R b/R/value_box.R index 76b9866..444ead1 100644 --- a/R/value_box.R +++ b/R/value_box.R @@ -12,7 +12,7 @@ #' @export #' @examples #' valueBox("Unread Mail", 44, icon("mail"), color = "blue", width = 5, size = "tiny") -value_box <- function(subtitle, value, icon = NULL, color = "blue", width = 5, size = ""){ +value_box <- function(subtitle, value, icon = NULL, color = "blue", width = 5, size = "") { verify_value_allowed("color", ALLOWED_COLORS) verify_value_allowed("size", ALLOWED_VALUEBOX_SIZES) column(width = width, @@ -50,7 +50,7 @@ infoBox <- value_box #' width = 5) #' }) #' } -value_box_output <- function(outputId, width = 5){ +value_box_output <- function(outputId, width = 5) { column(width = width, shiny::uiOutput(outputId)) } @@ -83,7 +83,7 @@ infoBoxOutput <- value_box_output #' width = 5) #' }) #' } -render_value_box <- function(expr, env = parent.frame(), quoted = FALSE){ +render_value_box <- function(expr, env = parent.frame(), quoted = FALSE) { fun <- shiny::exprToFunction(expr, env, quoted) shiny::renderUI(fun()) } @@ -95,4 +95,3 @@ renderValueBox <- render_value_box #' @describeIn render_value_box Create a value box output (alias for \code{render_value_box}) #' @export renderInfoBox <- render_value_box - diff --git a/README.md b/README.md index 534dcbb..b09ecad 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,13 @@ -We are hiring! +# semantic.dashboard semantic.dashboard logo - +> _Quick, beautiful and customizable dashboard template for Shiny based on shiny.semantic and Fomantic UI._ -semantic.dashboard -================== - -![R-CMD-check](https://github.com/Appsilon/semantic.dashboard/workflows/R-CMD-check/badge.svg) + +[![R-CMD-check](https://github.com/Appsilon/semantic.dashboard/workflows/R-CMD-check/badge.svg)](https://github.com/Appsilon/semantic.dashboard/actions/workflows/main.yml) [![codecov](https://codecov.io/gh/Appsilon/semantic.dashboard/branch/master/graph/badge.svg)](https://codecov.io/gh/Appsilon/semantic.dashboard) [![cranlogs](https://cranlogs.r-pkg.org/badges/semantic.dashboard)](https://CRAN.R-project.org/package=semantic.dashboard) [![total](https://cranlogs.r-pkg.org/badges/grand-total/semantic.dashboard)](https://CRAN.R-project.org/package=semantic.dashboard) - -Dashboard with Semantic UI Support for Shiny. + Are you fed up with ordinary `shinydashboard` look? @@ -53,8 +50,7 @@ shinyApp(ui, server) `semantic.dashboard` offers basic functions for creating dashboard with Fomantic UI. -How to install? ---------------- +## How to install? Install `shiny.semantic` library first. [Here](https://github.com/Appsilon/shiny.semantic) you can find how. @@ -70,31 +66,18 @@ To install [previous version]() you can run: remotes::install_github("Appsilon/semantic.dashboard", ref = "0.1.0") -Example -------- +## Example You can find examples in the `examples/` folder of the [GitHub repository](https://github.com/Appsilon/semantic.dashboard). You can check [documentation](https://appsilon.github.io/semantic.dashboard/) for tutorials. -How to contribute? ------------------- +## How to contribute? If you want to contribute to this project please submit a regular PR, once you're done with new feature or bug fix. Please check `development/README.md` first! It contains useful information that will help you run your dev environment for `semantic.dashboard`. -Changes in documentation ------------------------- - -Both repository **README.md** file and an official documentation page -are generated with Rmarkdown, so if there is a need to update them, -please modify accordingly a **README.Rmd** file and use “Knit”. - -Documentation is rendered with `pkgdown`. Just run -`pkgdown::build_site()` after rendering new **README.md**. - -Troubleshooting ---------------- +## Troubleshooting We used the latest versions of dependencies for this library, so please update your R environment before installation. @@ -104,19 +87,20 @@ However, if you encounter any problems, try the following: 2. Installing specific dependent libraries versions - shiny.semantic -Future enhacements ------------------- +## Future enhacements - Release of a stable 1.0.0 version - Closer integration with shinydashboard -Appsilon --------- - +## Appsilon -Appsilon is the **Full Service Certified RStudio Partner**. Learn more -at [appsilon.com](https://appsilon.com). +Appsilon is a **Posit (formerly RStudio) Full Service Certified Partner**.
+Learn more at [appsilon.com](https://appsilon.com). + +Get in touch [opensource@appsilon.com](mailto:opensource@appsilon.com) + +Explore the [Rhinoverse](https://rhinoverse.dev) - a family of R packages built around [Rhino](https://appsilon.github.io/rhino/)! -Get in touch [dev@appsilon.com](dev@appsilon.com) +We are hiring! diff --git a/docs/404.html b/docs/404.html deleted file mode 100644 index 02301dc..0000000 --- a/docs/404.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - - -Page not found (404) • SHINY.SEMANTIC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - -
- -
-
- - -Content not found. Please use links in the navbar. - -
- - - -
- - - -
- - -
-

Site built with pkgdown 1.5.1.

-
- -
-
- - - - - - - - diff --git a/docs/CHANGELOG.html b/docs/CHANGELOG.html deleted file mode 100644 index 0b03632..0000000 --- a/docs/CHANGELOG.html +++ /dev/null @@ -1,297 +0,0 @@ - - - - - - - - -Change Log • SHINY.SEMANTIC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - -
- -
-
- - -
- -

All notable changes to this project will be documented in this file.

-

The format is based on Keep a Changelog.

-
-

-Unreleased -

-
-

-Added

-
-
-

-Changed

-
-
-

-Fixed

-
-
-

-Removed

-
-
-
-

-[0.2.0] -

-
-

-Added

-
    -
  • -title, titleWidth, left, center, right, show_menu_button and menu_button_label parameters for dashboardHeader -
  • -
  • -overlay and dim_page parameters for dashboardSidebar -
  • -
  • -margin param for dashboardPage -
  • -
  • -fluid param for tabItem -
  • -
  • -class param for dashboardPage, dashboardBody, dashboardSidebar and dashboardHeader -
  • -
  • -dashboardPage, dashboardBody, dashboardSidebar and dashboardHeader have now built-in CSS classes of syntax dashboard-<component> e.g. dashboard-page. Thanks to that it’s easy to write selectors for DOM nodes related to them
  • -
-
-
-

-Changed

-
    -
  • -

    Main content will shrink, not move when sidebar is opened and overlay = FALSE

    -

    Fixed

    -
  • -
  • Issues with layout responsiveness

  • -
  • Issues with sidebar position and overflow

  • -
-
-
-
-

-[0.1.5] - 2020-03-30

-
-

-Added

-
    -
  • option for collapsible icon
  • -
  • themes support
  • -
  • conditionPanel
  • -
  • logo in top panel
  • -
-
-
-

-Changed

-
    -
  • extended sidebar options
  • -
  • width values for semantic classes forces
  • -
  • README
  • -
-
-
-

-Fixed

-
    -
  • collapsible box
  • -
  • dashboard body without left margin
  • -
-
-
-
-

-0.1.0 - 2018-01-02

-
-

-Added

-
    -
  • box
  • -
  • sidebarMenu
  • -
  • dashboardBody
  • -
  • dashboardHeader
  • -
  • dashboardPage
  • -
  • dashboardSidebar
  • -
  • menuItem
  • -
  • renderValueBox
  • -
  • tabItem
  • -
  • tabItems
  • -
  • valueBox
  • -
  • valueBoxOutput
  • -
  • dropdownMenu
  • -
  • dropdownMenuOutput
  • -
  • infoBox
  • -
  • infoBoxOutput
  • -
  • messageItem
  • -
  • notificationItem
  • -
  • renderDropdownMenu
  • -
  • renderInfoBox
  • -
  • tabBox
  • -
  • taskItem
  • -
-
-
-
- -
- - - -
- - - -
- - -
-

Site built with pkgdown 1.5.1.

-
- -
-
- - - - - - - - diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html deleted file mode 100644 index 02c6e85..0000000 --- a/docs/LICENSE-text.html +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - - -License • SHINY.SEMANTIC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - -
- -
-
- - -
YEAR: 2016
-COPYRIGHT HOLDER: Appsilon Sp. z o.o.
-
-
- -
- - - -
- - - -
- - -
-

Site built with pkgdown 1.5.1.

-
- -
-
- - - - - - - - diff --git a/docs/articles/imgs/dash1.png b/docs/articles/imgs/dash1.png deleted file mode 100644 index fe8cc51..0000000 Binary files a/docs/articles/imgs/dash1.png and /dev/null differ diff --git a/docs/articles/index.html b/docs/articles/index.html deleted file mode 100644 index 3b06402..0000000 --- a/docs/articles/index.html +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - - - -Articles • SHINY.SEMANTIC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - -
- -
-
- - -
-

All tutorials

-

- -
-
Build your first semantic.dashboard
-
-
-
-
-
- - -
- - -
-

Site built with pkgdown 1.5.1.

-
- -
-
- - - - - - - - diff --git a/docs/articles/intro.html b/docs/articles/intro.html deleted file mode 100644 index 780838d..0000000 --- a/docs/articles/intro.html +++ /dev/null @@ -1,241 +0,0 @@ - - - - - - - -Build your first semantic.dashboard • SHINY.SEMANTIC - - - - - - - - - - -
-
- - - - -
-
- - - - -
-

-What is a dashboard?

-

R Shiny is an excellent tool for interactive data visualizations. However, fitting a large number of graphs onto just one Shiny page may prove to be a challenge. In our experience, virtually all projects with new KPIs being introduced along the way result in inadequate and not readable final reports.

-

Dashboards provide a solution. They allow the developer to intuitively structure their reports by breaking them down into sections, panels and tabs. This makes it much easier for the final user to navigate through the data.

-
-
-

-Why Semantic Dashboard?

-

Semantic Dashboard offers an alternative look of your dashboard based on the Fomantic UI. Historically, we built this package around Semantic UI library, but it got deprecated and now (since December 2019) we base on the well-supported and maintained community fork called Fomantic UI.

-

It relies and uses components from the mother package shiny.semantic.

-
-
-

-Semantic Dashboard

-

Basic dashboard structure is presented below.

-
library(shiny)
-library(semantic.dashboard)
-
-ui <- dashboardPage(
-  dashboardHeader(),
-  dashboardSidebar(),
-  dashboardBody()
-)
-
-server <- shinyServer(function(input, output, session) {
-
-})
-
-shinyApp(ui, server)
-

Each dashboardPage consists of three elements: header, sidebar, and body.

-
-

-Editing header

-

Here is one example of how to make header more interesting:

-
dashboardHeader(color = "blue", title = "Dashboard Demo", inverted = TRUE)
-

Now let’s add also a notification on the right:

-
  dashboardHeader(color = "blue", title = "Dashboard Demo", inverted = TRUE,
-                  dropdownMenu(type = "notifications",
-                               taskItem("Project progress...", 50.777, color = "red")))
-
-
-

-Editing Sidebar and Body

-

In the sidebar we can define the references to the subpages that will be displayed in the content. For example:

-
  dashboardSidebar(
-    size = "thin", color = "teal",
-    sidebarMenu(
-      menuItem(tabName = "main", "Main"),
-      menuItem(tabName = "extra", "Extra")
-    )
-  )
-

PRACTICE Try to add icons to the menuItem. The content of the app can be defined ike this. Note that we refer to exactly the same tabName as in the sidebar.

-
  dashboardBody(
-    tabItems(
-      selected = 1,
-      tabItem(
-        tabName = "main",
-        box(h1("main"), title = "A b c", width = 16, color = "orange")
-      ),
-      tabItem(
-        tabName = "extra",
-          h1("extra")
-      )
-    )
-  )
-

Note that we used box here with color set to orange. The list of all Fomantic color you may find here: semantic_palette.

-
-
-
-

-Full code

-

The effect and complete code for this example is presented below.

-

dashboard

-
library(shiny)
-library(semantic.dashboard)
-
-ui <- dashboardPage(
-  dashboardHeader(color = "blue", title = "Dashboard Demo", inverted = TRUE,
-                  dropdownMenu(type = "notifications",
-                               taskItem("Project progress...", 50.777, color = "red"))),
-  dashboardSidebar(
-    size = "thin", color = "teal",
-    sidebarMenu(
-      menuItem(tabName = "main", "Main"),
-      menuItem(tabName = "extra", "Extra")
-    )
-  ),
-  dashboardBody(
-    tabItems(
-      selected = 1,
-      tabItem(
-        tabName = "main",
-        box(h1("main"), title = "A b c", width = 16, color = "orange")
-      ),
-      tabItem(
-        tabName = "extra",
-          h1("extra")
-      )
-    )
-  )
-)
-
-server <- function(input, output, session) {}
-
-shinyApp(ui, server)
-
-
- - - -
- - - -
- -
-

Site built with pkgdown 1.5.1.

-
- -
-
- - - - - - diff --git a/docs/articles/intro_files/accessible-code-block-0.0.1/empty-anchor.js b/docs/articles/intro_files/accessible-code-block-0.0.1/empty-anchor.js deleted file mode 100644 index ca349fd..0000000 --- a/docs/articles/intro_files/accessible-code-block-0.0.1/empty-anchor.js +++ /dev/null @@ -1,15 +0,0 @@ -// Hide empty tag within highlighted CodeBlock for screen reader accessibility (see https://github.com/jgm/pandoc/issues/6352#issuecomment-626106786) --> -// v0.0.1 -// Written by JooYoung Seo (jooyoung@psu.edu) and Atsushi Yasumoto on June 1st, 2020. - -document.addEventListener('DOMContentLoaded', function() { - const codeList = document.getElementsByClassName("sourceCode"); - for (var i = 0; i < codeList.length; i++) { - var linkList = codeList[i].getElementsByTagName('a'); - for (var j = 0; j < linkList.length; j++) { - if (linkList[j].innerHTML === "") { - linkList[j].setAttribute('aria-hidden', 'true'); - } - } - } -}); diff --git a/docs/authors.html b/docs/authors.html deleted file mode 100644 index 75a563d..0000000 --- a/docs/authors.html +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - - - -Authors • SHINY.SEMANTIC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - -
- -
-
- - -
    -
  • -

    Filip Stachura. Author. -

    -
  • -
  • -

    Dominik Krzeminski. Maintainer. -

    -
  • -
  • -

    Krystian Igras. Author. -

    -
  • -
  • -

    Michał Maj. Contributor. -

    -
  • -
  • -

    Michał Drzazga. Contributor. -

    -
  • -
  • -

    Appsilon. Copyright holder. -

    -
  • -
- -
- -
- - - -
- - -
-

Site built with pkgdown 1.5.1.

-
- -
-
- - - - - - - - diff --git a/docs/bootstrap-toc.css b/docs/bootstrap-toc.css deleted file mode 100644 index 5a85941..0000000 --- a/docs/bootstrap-toc.css +++ /dev/null @@ -1,60 +0,0 @@ -/*! - * Bootstrap Table of Contents v0.4.1 (http://afeld.github.io/bootstrap-toc/) - * Copyright 2015 Aidan Feldman - * Licensed under MIT (https://github.com/afeld/bootstrap-toc/blob/gh-pages/LICENSE.md) */ - -/* modified from https://github.com/twbs/bootstrap/blob/94b4076dd2efba9af71f0b18d4ee4b163aa9e0dd/docs/assets/css/src/docs.css#L548-L601 */ - -/* All levels of nav */ -nav[data-toggle='toc'] .nav > li > a { - display: block; - padding: 4px 20px; - font-size: 13px; - font-weight: 500; - color: #767676; -} -nav[data-toggle='toc'] .nav > li > a:hover, -nav[data-toggle='toc'] .nav > li > a:focus { - padding-left: 19px; - color: #563d7c; - text-decoration: none; - background-color: transparent; - border-left: 1px solid #563d7c; -} -nav[data-toggle='toc'] .nav > .active > a, -nav[data-toggle='toc'] .nav > .active:hover > a, -nav[data-toggle='toc'] .nav > .active:focus > a { - padding-left: 18px; - font-weight: bold; - color: #563d7c; - background-color: transparent; - border-left: 2px solid #563d7c; -} - -/* Nav: second level (shown on .active) */ -nav[data-toggle='toc'] .nav .nav { - display: none; /* Hide by default, but at >768px, show it */ - padding-bottom: 10px; -} -nav[data-toggle='toc'] .nav .nav > li > a { - padding-top: 1px; - padding-bottom: 1px; - padding-left: 30px; - font-size: 12px; - font-weight: normal; -} -nav[data-toggle='toc'] .nav .nav > li > a:hover, -nav[data-toggle='toc'] .nav .nav > li > a:focus { - padding-left: 29px; -} -nav[data-toggle='toc'] .nav .nav > .active > a, -nav[data-toggle='toc'] .nav .nav > .active:hover > a, -nav[data-toggle='toc'] .nav .nav > .active:focus > a { - padding-left: 28px; - font-weight: 500; -} - -/* from https://github.com/twbs/bootstrap/blob/e38f066d8c203c3e032da0ff23cd2d6098ee2dd6/docs/assets/css/src/docs.css#L631-L634 */ -nav[data-toggle='toc'] .nav > .active > ul { - display: block; -} diff --git a/docs/bootstrap-toc.js b/docs/bootstrap-toc.js deleted file mode 100644 index 1cdd573..0000000 --- a/docs/bootstrap-toc.js +++ /dev/null @@ -1,159 +0,0 @@ -/*! - * Bootstrap Table of Contents v0.4.1 (http://afeld.github.io/bootstrap-toc/) - * Copyright 2015 Aidan Feldman - * Licensed under MIT (https://github.com/afeld/bootstrap-toc/blob/gh-pages/LICENSE.md) */ -(function() { - 'use strict'; - - window.Toc = { - helpers: { - // return all matching elements in the set, or their descendants - findOrFilter: function($el, selector) { - // http://danielnouri.org/notes/2011/03/14/a-jquery-find-that-also-finds-the-root-element/ - // http://stackoverflow.com/a/12731439/358804 - var $descendants = $el.find(selector); - return $el.filter(selector).add($descendants).filter(':not([data-toc-skip])'); - }, - - generateUniqueIdBase: function(el) { - var text = $(el).text(); - var anchor = text.trim().toLowerCase().replace(/[^A-Za-z0-9]+/g, '-'); - return anchor || el.tagName.toLowerCase(); - }, - - generateUniqueId: function(el) { - var anchorBase = this.generateUniqueIdBase(el); - for (var i = 0; ; i++) { - var anchor = anchorBase; - if (i > 0) { - // add suffix - anchor += '-' + i; - } - // check if ID already exists - if (!document.getElementById(anchor)) { - return anchor; - } - } - }, - - generateAnchor: function(el) { - if (el.id) { - return el.id; - } else { - var anchor = this.generateUniqueId(el); - el.id = anchor; - return anchor; - } - }, - - createNavList: function() { - return $(''); - }, - - createChildNavList: function($parent) { - var $childList = this.createNavList(); - $parent.append($childList); - return $childList; - }, - - generateNavEl: function(anchor, text) { - var $a = $(''); - $a.attr('href', '#' + anchor); - $a.text(text); - var $li = $('
  • '); - $li.append($a); - return $li; - }, - - generateNavItem: function(headingEl) { - var anchor = this.generateAnchor(headingEl); - var $heading = $(headingEl); - var text = $heading.data('toc-text') || $heading.text(); - return this.generateNavEl(anchor, text); - }, - - // Find the first heading level (`

    `, then `

    `, etc.) that has more than one element. Defaults to 1 (for `

    `). - getTopLevel: function($scope) { - for (var i = 1; i <= 6; i++) { - var $headings = this.findOrFilter($scope, 'h' + i); - if ($headings.length > 1) { - return i; - } - } - - return 1; - }, - - // returns the elements for the top level, and the next below it - getHeadings: function($scope, topLevel) { - var topSelector = 'h' + topLevel; - - var secondaryLevel = topLevel + 1; - var secondarySelector = 'h' + secondaryLevel; - - return this.findOrFilter($scope, topSelector + ',' + secondarySelector); - }, - - getNavLevel: function(el) { - return parseInt(el.tagName.charAt(1), 10); - }, - - populateNav: function($topContext, topLevel, $headings) { - var $context = $topContext; - var $prevNav; - - var helpers = this; - $headings.each(function(i, el) { - var $newNav = helpers.generateNavItem(el); - var navLevel = helpers.getNavLevel(el); - - // determine the proper $context - if (navLevel === topLevel) { - // use top level - $context = $topContext; - } else if ($prevNav && $context === $topContext) { - // create a new level of the tree and switch to it - $context = helpers.createChildNavList($prevNav); - } // else use the current $context - - $context.append($newNav); - - $prevNav = $newNav; - }); - }, - - parseOps: function(arg) { - var opts; - if (arg.jquery) { - opts = { - $nav: arg - }; - } else { - opts = arg; - } - opts.$scope = opts.$scope || $(document.body); - return opts; - } - }, - - // accepts a jQuery object, or an options object - init: function(opts) { - opts = this.helpers.parseOps(opts); - - // ensure that the data attribute is in place for styling - opts.$nav.attr('data-toggle', 'toc'); - - var $topContext = this.helpers.createChildNavList(opts.$nav); - var topLevel = this.helpers.getTopLevel(opts.$scope); - var $headings = this.helpers.getHeadings(opts.$scope, topLevel); - this.helpers.populateNav($topContext, topLevel, $headings); - } - }; - - $(function() { - $('nav[data-toggle="toc"]').each(function(i, el) { - var $nav = $(el); - Toc.init($nav); - }); - }); -})(); diff --git a/docs/docsearch.css b/docs/docsearch.css deleted file mode 100644 index e5f1fe1..0000000 --- a/docs/docsearch.css +++ /dev/null @@ -1,148 +0,0 @@ -/* Docsearch -------------------------------------------------------------- */ -/* - Source: https://github.com/algolia/docsearch/ - License: MIT -*/ - -.algolia-autocomplete { - display: block; - -webkit-box-flex: 1; - -ms-flex: 1; - flex: 1 -} - -.algolia-autocomplete .ds-dropdown-menu { - width: 100%; - min-width: none; - max-width: none; - padding: .75rem 0; - background-color: #fff; - background-clip: padding-box; - border: 1px solid rgba(0, 0, 0, .1); - box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .175); -} - -@media (min-width:768px) { - .algolia-autocomplete .ds-dropdown-menu { - width: 175% - } -} - -.algolia-autocomplete .ds-dropdown-menu::before { - display: none -} - -.algolia-autocomplete .ds-dropdown-menu [class^=ds-dataset-] { - padding: 0; - background-color: rgb(255,255,255); - border: 0; - max-height: 80vh; -} - -.algolia-autocomplete .ds-dropdown-menu .ds-suggestions { - margin-top: 0 -} - -.algolia-autocomplete .algolia-docsearch-suggestion { - padding: 0; - overflow: visible -} - -.algolia-autocomplete .algolia-docsearch-suggestion--category-header { - padding: .125rem 1rem; - margin-top: 0; - font-size: 1.3em; - font-weight: 500; - color: #00008B; - border-bottom: 0 -} - -.algolia-autocomplete .algolia-docsearch-suggestion--wrapper { - float: none; - padding-top: 0 -} - -.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column { - float: none; - width: auto; - padding: 0; - text-align: left -} - -.algolia-autocomplete .algolia-docsearch-suggestion--content { - float: none; - width: auto; - padding: 0 -} - -.algolia-autocomplete .algolia-docsearch-suggestion--content::before { - display: none -} - -.algolia-autocomplete .ds-suggestion:not(:first-child) .algolia-docsearch-suggestion--category-header { - padding-top: .75rem; - margin-top: .75rem; - border-top: 1px solid rgba(0, 0, 0, .1) -} - -.algolia-autocomplete .ds-suggestion .algolia-docsearch-suggestion--subcategory-column { - display: block; - padding: .1rem 1rem; - margin-bottom: 0.1; - font-size: 1.0em; - font-weight: 400 - /* display: none */ -} - -.algolia-autocomplete .algolia-docsearch-suggestion--title { - display: block; - padding: .25rem 1rem; - margin-bottom: 0; - font-size: 0.9em; - font-weight: 400 -} - -.algolia-autocomplete .algolia-docsearch-suggestion--text { - padding: 0 1rem .5rem; - margin-top: -.25rem; - font-size: 0.8em; - font-weight: 400; - line-height: 1.25 -} - -.algolia-autocomplete .algolia-docsearch-footer { - width: 110px; - height: 20px; - z-index: 3; - margin-top: 10.66667px; - float: right; - font-size: 0; - line-height: 0; -} - -.algolia-autocomplete .algolia-docsearch-footer--logo { - background-image: url("data:image/svg+xml;utf8,"); - background-repeat: no-repeat; - background-position: 50%; - background-size: 100%; - overflow: hidden; - text-indent: -9000px; - width: 100%; - height: 100%; - display: block; - transform: translate(-8px); -} - -.algolia-autocomplete .algolia-docsearch-suggestion--highlight { - color: #FF8C00; - background: rgba(232, 189, 54, 0.1) -} - - -.algolia-autocomplete .algolia-docsearch-suggestion--text .algolia-docsearch-suggestion--highlight { - box-shadow: inset 0 -2px 0 0 rgba(105, 105, 105, .5) -} - -.algolia-autocomplete .ds-suggestion.ds-cursor .algolia-docsearch-suggestion--content { - background-color: rgba(192, 192, 192, .15) -} diff --git a/docs/docsearch.js b/docs/docsearch.js deleted file mode 100644 index b35504c..0000000 --- a/docs/docsearch.js +++ /dev/null @@ -1,85 +0,0 @@ -$(function() { - - // register a handler to move the focus to the search bar - // upon pressing shift + "/" (i.e. "?") - $(document).on('keydown', function(e) { - if (e.shiftKey && e.keyCode == 191) { - e.preventDefault(); - $("#search-input").focus(); - } - }); - - $(document).ready(function() { - // do keyword highlighting - /* modified from https://jsfiddle.net/julmot/bL6bb5oo/ */ - var mark = function() { - - var referrer = document.URL ; - var paramKey = "q" ; - - if (referrer.indexOf("?") !== -1) { - var qs = referrer.substr(referrer.indexOf('?') + 1); - var qs_noanchor = qs.split('#')[0]; - var qsa = qs_noanchor.split('&'); - var keyword = ""; - - for (var i = 0; i < qsa.length; i++) { - var currentParam = qsa[i].split('='); - - if (currentParam.length !== 2) { - continue; - } - - if (currentParam[0] == paramKey) { - keyword = decodeURIComponent(currentParam[1].replace(/\+/g, "%20")); - } - } - - if (keyword !== "") { - $(".contents").unmark({ - done: function() { - $(".contents").mark(keyword); - } - }); - } - } - }; - - mark(); - }); -}); - -/* Search term highlighting ------------------------------*/ - -function matchedWords(hit) { - var words = []; - - var hierarchy = hit._highlightResult.hierarchy; - // loop to fetch from lvl0, lvl1, etc. - for (var idx in hierarchy) { - words = words.concat(hierarchy[idx].matchedWords); - } - - var content = hit._highlightResult.content; - if (content) { - words = words.concat(content.matchedWords); - } - - // return unique words - var words_uniq = [...new Set(words)]; - return words_uniq; -} - -function updateHitURL(hit) { - - var words = matchedWords(hit); - var url = ""; - - if (hit.anchor) { - url = hit.url_without_anchor + '?q=' + escape(words.join(" ")) + '#' + hit.anchor; - } else { - url = hit.url + '?q=' + escape(words.join(" ")); - } - - return url; -} diff --git a/docs/index.html b/docs/index.html deleted file mode 100644 index 8cd1023..0000000 --- a/docs/index.html +++ /dev/null @@ -1,252 +0,0 @@ - - - - - - - -Dashboard with Fomantic UI Support for Shiny • SHINY.SEMANTIC - - - - - - - - - - -
    -
    - - - - -
    -
    - - -

    -
    - -

    R-CMD-checkcodecov cranlogs total

    -

    Dashboard with Semantic UI Support for Shiny.

    -

    Are you fed up with ordinary shinydashboard look?

    -

    Give your app a new fresh look with Fomantic UI support.

    -
    library(shiny)
    -library(shinydashboard) # <-- Change this line to: library(semantic.dashboard)
    -
    -ui <- dashboardPage(
    -  dashboardHeader(title = "Basic dashboard"),
    -  dashboardSidebar(sidebarMenu(
    -      menuItem(tabName = "home", text = "Home", icon = icon("home")),
    -      menuItem(tabName = "another", text = "Another Tab", icon = icon("heart"))
    -  )),
    -  dashboardBody(
    -    fluidRow(
    -      box(plotOutput("plot1", height = 250)),
    -      box(
    -        title = "Controls",
    -        sliderInput("slider", "Number of observations:", 1, 100, 50)
    -      )
    -    )
    -  )
    -)
    -
    -server <- function(input, output) {
    -  set.seed(122)
    -  histdata <- rnorm(500)
    -  output$plot1 <- renderPlot({
    -    data <- histdata[seq_len(input$slider)]
    -    hist(data)
    -  })
    -}
    -
    -shinyApp(ui, server)
    -

    Semantic dashboards comparison

    -

    semantic.dashboard offers basic functions for creating dashboard with Fomantic UI.

    -
    -

    -How to install?

    -

    Install shiny.semantic library first. Here you can find how.

    -

    You can install a stable version semantic.dashboard from CRAN repository:

    -
    install.packages("semantic.dashboard")
    -

    The development version can be installed from GitHub using remotes.

    -
    remotes::install_github("Appsilon/semantic.dashboard")
    -

    To install previous version you can run:

    -
    remotes::install_github("Appsilon/semantic.dashboard", ref = "0.1.0")
    -
    -
    -

    -Example

    -

    You can find examples in the examples/ folder of the GitHub repository.

    -

    You can check documentation for tutorials.

    -
    -
    -

    -How to contribute?

    -

    If you want to contribute to this project please submit a regular PR, once you’re done with new feature or bug fix. Please check development/README.md first! It contains useful information that will help you run your dev environment for semantic.dashboard.

    -
    -
    -

    -Changes in documentation

    -

    Both repository README.md file and an official documentation page are generated with Rmarkdown, so if there is a need to update them, please modify accordingly a README.Rmd file and use “Knit”.

    -

    Documentation is rendered with pkgdown. Just run pkgdown::build_site() after rendering new README.md.

    -
    -
    -

    -Troubleshooting

    -

    We used the latest versions of dependencies for this library, so please update your R environment before installation.

    -

    However, if you encounter any problems, try the following:

    -
      -
    1. Up-to-date R language environment
    2. -
    3. Installing specific dependent libraries versions -
        -
      • shiny.semantic
      • -
      -
    4. -
    -
    -
    -

    -Future enhacements

    -
      -
    • Release of a stable 1.0.0 version
    • -
    • Closer integration with shinydashboard
    • -
    -
    -
    -

    -Appsilon

    -

    -

    Appsilon is the Full Service Certified RStudio Partner. Learn more at appsilon.com.

    -

    Get in touch dev@appsilon.com

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

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - diff --git a/docs/link.svg b/docs/link.svg deleted file mode 100644 index 88ad827..0000000 --- a/docs/link.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/docs/pkgdown.css b/docs/pkgdown.css deleted file mode 100644 index c01e592..0000000 --- a/docs/pkgdown.css +++ /dev/null @@ -1,367 +0,0 @@ -/* Sticky footer */ - -/** - * Basic idea: https://philipwalton.github.io/solved-by-flexbox/demos/sticky-footer/ - * Details: https://github.com/philipwalton/solved-by-flexbox/blob/master/assets/css/components/site.css - * - * .Site -> body > .container - * .Site-content -> body > .container .row - * .footer -> footer - * - * Key idea seems to be to ensure that .container and __all its parents__ - * have height set to 100% - * - */ - -html, body { - height: 100%; -} - -body { - position: relative; -} - -body > .container { - display: flex; - height: 100%; - flex-direction: column; -} - -body > .container .row { - flex: 1 0 auto; -} - -footer { - margin-top: 45px; - padding: 35px 0 36px; - border-top: 1px solid #e5e5e5; - color: #666; - display: flex; - flex-shrink: 0; -} -footer p { - margin-bottom: 0; -} -footer div { - flex: 1; -} -footer .pkgdown { - text-align: right; -} -footer p { - margin-bottom: 0; -} - -img.icon { - float: right; -} - -img { - max-width: 100%; -} - -/* Fix bug in bootstrap (only seen in firefox) */ -summary { - display: list-item; -} - -/* Typographic tweaking ---------------------------------*/ - -.contents .page-header { - margin-top: calc(-60px + 1em); -} - -dd { - margin-left: 3em; -} - -/* Section anchors ---------------------------------*/ - -a.anchor { - margin-left: -30px; - display:inline-block; - width: 30px; - height: 30px; - visibility: hidden; - - background-image: url(./link.svg); - background-repeat: no-repeat; - background-size: 20px 20px; - background-position: center center; -} - -.hasAnchor:hover a.anchor { - visibility: visible; -} - -@media (max-width: 767px) { - .hasAnchor:hover a.anchor { - visibility: hidden; - } -} - - -/* Fixes for fixed navbar --------------------------*/ - -.contents h1, .contents h2, .contents h3, .contents h4 { - padding-top: 60px; - margin-top: -40px; -} - -/* Navbar submenu --------------------------*/ - -.dropdown-submenu { - position: relative; -} - -.dropdown-submenu>.dropdown-menu { - top: 0; - left: 100%; - margin-top: -6px; - margin-left: -1px; - border-radius: 0 6px 6px 6px; -} - -.dropdown-submenu:hover>.dropdown-menu { - display: block; -} - -.dropdown-submenu>a:after { - display: block; - content: " "; - float: right; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; - border-width: 5px 0 5px 5px; - border-left-color: #cccccc; - margin-top: 5px; - margin-right: -10px; -} - -.dropdown-submenu:hover>a:after { - border-left-color: #ffffff; -} - -.dropdown-submenu.pull-left { - float: none; -} - -.dropdown-submenu.pull-left>.dropdown-menu { - left: -100%; - margin-left: 10px; - border-radius: 6px 0 6px 6px; -} - -/* Sidebar --------------------------*/ - -#pkgdown-sidebar { - margin-top: 30px; - position: -webkit-sticky; - position: sticky; - top: 70px; -} - -#pkgdown-sidebar h2 { - font-size: 1.5em; - margin-top: 1em; -} - -#pkgdown-sidebar h2:first-child { - margin-top: 0; -} - -#pkgdown-sidebar .list-unstyled li { - margin-bottom: 0.5em; -} - -/* bootstrap-toc tweaks ------------------------------------------------------*/ - -/* All levels of nav */ - -nav[data-toggle='toc'] .nav > li > a { - padding: 4px 20px 4px 6px; - font-size: 1.5rem; - font-weight: 400; - color: inherit; -} - -nav[data-toggle='toc'] .nav > li > a:hover, -nav[data-toggle='toc'] .nav > li > a:focus { - padding-left: 5px; - color: inherit; - border-left: 1px solid #878787; -} - -nav[data-toggle='toc'] .nav > .active > a, -nav[data-toggle='toc'] .nav > .active:hover > a, -nav[data-toggle='toc'] .nav > .active:focus > a { - padding-left: 5px; - font-size: 1.5rem; - font-weight: 400; - color: inherit; - border-left: 2px solid #878787; -} - -/* Nav: second level (shown on .active) */ - -nav[data-toggle='toc'] .nav .nav { - display: none; /* Hide by default, but at >768px, show it */ - padding-bottom: 10px; -} - -nav[data-toggle='toc'] .nav .nav > li > a { - padding-left: 16px; - font-size: 1.35rem; -} - -nav[data-toggle='toc'] .nav .nav > li > a:hover, -nav[data-toggle='toc'] .nav .nav > li > a:focus { - padding-left: 15px; -} - -nav[data-toggle='toc'] .nav .nav > .active > a, -nav[data-toggle='toc'] .nav .nav > .active:hover > a, -nav[data-toggle='toc'] .nav .nav > .active:focus > a { - padding-left: 15px; - font-weight: 500; - font-size: 1.35rem; -} - -/* orcid ------------------------------------------------------------------- */ - -.orcid { - font-size: 16px; - color: #A6CE39; - /* margins are required by official ORCID trademark and display guidelines */ - margin-left:4px; - margin-right:4px; - vertical-align: middle; -} - -/* Reference index & topics ----------------------------------------------- */ - -.ref-index th {font-weight: normal;} - -.ref-index td {vertical-align: top;} -.ref-index .icon {width: 40px;} -.ref-index .alias {width: 40%;} -.ref-index-icons .alias {width: calc(40% - 40px);} -.ref-index .title {width: 60%;} - -.ref-arguments th {text-align: right; padding-right: 10px;} -.ref-arguments th, .ref-arguments td {vertical-align: top;} -.ref-arguments .name {width: 20%;} -.ref-arguments .desc {width: 80%;} - -/* Nice scrolling for wide elements --------------------------------------- */ - -table { - display: block; - overflow: auto; -} - -/* Syntax highlighting ---------------------------------------------------- */ - -pre { - word-wrap: normal; - word-break: normal; - border: 1px solid #eee; -} - -pre, code { - background-color: #f8f8f8; - color: #333; -} - -pre code { - overflow: auto; - word-wrap: normal; - white-space: pre; -} - -pre .img { - margin: 5px 0; -} - -pre .img img { - background-color: #fff; - display: block; - height: auto; -} - -code a, pre a { - color: #375f84; -} - -a.sourceLine:hover { - text-decoration: none; -} - -.fl {color: #1514b5;} -.fu {color: #000000;} /* function */ -.ch,.st {color: #036a07;} /* string */ -.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;} - -/* Clipboard --------------------------*/ - -.hasCopyButton { - position: relative; -} - -.btn-copy-ex { - position: absolute; - right: 0; - top: 0; - visibility: hidden; -} - -.hasCopyButton:hover button.btn-copy-ex { - visibility: visible; -} - -/* headroom.js ------------------------ */ - -.headroom { - will-change: transform; - transition: transform 200ms linear; -} -.headroom--pinned { - transform: translateY(0%); -} -.headroom--unpinned { - transform: translateY(-100%); -} - -/* mark.js ----------------------------*/ - -mark { - background-color: rgba(255, 255, 51, 0.5); - border-bottom: 2px solid rgba(255, 153, 51, 0.3); - padding: 1px; -} - -/* vertical spacing after htmlwidgets */ -.html-widget { - margin-bottom: 10px; -} - -/* fontawesome ------------------------ */ - -.fab { - font-family: "Font Awesome 5 Brands" !important; -} - -/* don't display links in code chunks when printing */ -/* source: https://stackoverflow.com/a/10781533 */ -@media print { - code a:link:after, code a:visited:after { - content: ""; - } -} diff --git a/docs/pkgdown.js b/docs/pkgdown.js deleted file mode 100644 index 7e7048f..0000000 --- a/docs/pkgdown.js +++ /dev/null @@ -1,108 +0,0 @@ -/* http://gregfranko.com/blog/jquery-best-practices/ */ -(function($) { - $(function() { - - $('.navbar-fixed-top').headroom(); - - $('body').css('padding-top', $('.navbar').height() + 10); - $(window).resize(function(){ - $('body').css('padding-top', $('.navbar').height() + 10); - }); - - $('[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); - } - - for (var i = 0; i < haystack.length; i++) { - if (needle[i] != haystack[i]) - return(i); - } - - return(haystack.length); - } - - /* Clipboard --------------------------*/ - - function changeTooltipMessage(element, msg) { - var tooltipOriginalTitle=element.getAttribute('data-original-title'); - element.setAttribute('data-original-title', msg); - $(element).tooltip('show'); - element.setAttribute('data-original-title', tooltipOriginalTitle); - } - - if(ClipboardJS.isSupported()) { - $(document).ready(function() { - var copyButton = ""; - - $(".examples, div.sourceCode").addClass("hasCopyButton"); - - // Insert copy buttons: - $(copyButton).prependTo(".hasCopyButton"); - - // Initialize tooltips: - $('.btn-copy-ex').tooltip({container: 'body'}); - - // Initialize clipboard: - var clipboardBtnCopies = new ClipboardJS('[data-clipboard-copy]', { - text: function(trigger) { - return trigger.parentNode.textContent; - } - }); - - clipboardBtnCopies.on('success', function(e) { - changeTooltipMessage(e.trigger, 'Copied!'); - e.clearSelection(); - }); - - clipboardBtnCopies.on('error', function() { - changeTooltipMessage(e.trigger,'Press Ctrl+C or Command+C to copy'); - }); - }); - } -})(window.jQuery || window.$) diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml deleted file mode 100644 index 3e5dae0..0000000 --- a/docs/pkgdown.yml +++ /dev/null @@ -1,7 +0,0 @@ -pandoc: 2.7.3 -pkgdown: 1.5.1 -pkgdown_sha: ~ -articles: - intro: intro.html -last_built: 2021-01-15T12:33Z - diff --git a/docs/pull_request_template.html b/docs/pull_request_template.html deleted file mode 100644 index 70524f4..0000000 --- a/docs/pull_request_template.html +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - - -Title • SHINY.SEMANTIC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    - -

    Short description (with a reference to an issue).

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

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/box.html b/docs/reference/box.html deleted file mode 100644 index 2199ef4..0000000 --- a/docs/reference/box.html +++ /dev/null @@ -1,260 +0,0 @@ - - - - - - - - -Create a box. — box • SHINY.SEMANTIC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Create a box with additional UI elements.

    -
    - -
    box(
    -  ...,
    -  title = NULL,
    -  color = "",
    -  ribbon = TRUE,
    -  title_side = "top right",
    -  collapsible = TRUE,
    -  width = 8,
    -  id = NULL,
    -  collapse_icon = "minus",
    -  expand_icon = "plus"
    -)
    - -

    Arguments

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

    UI elements to include within the box.

    title

    Label of the box.

    color

    Color of the box. One of c("", "red", "orange", "yellow", -"olive", "green", "teal", "blue", "violet", "purple", "pink", "brown", "grey", "black")

    ribbon

    Should label be presented as ribbon.

    title_side

    Side of a label. One of c("top", "bottom", "top left", -"top right", "bottom left", "bottom right") if ribbon = FALSE, or one of -c("top left", "top right") if ribbon = TRUE

    collapsible

    Should minimize button be added to label.

    width

    Width of the box.

    id

    ID of the box.

    collapse_icon

    Icon class to be used for collapsing (when collapsible = TRUE).

    expand_icon

    Icon class to be used for expanding (when collapsible = TRUE).

    - -

    Value

    - -

    A box that can be passed to dashboardBody

    - -

    Examples

    -
    box(title = "Sample box", color = "blue", width = 11, - "This is a box content" -)
    #> <div class="eleven wide column"> -#> <div class="ui segment raised blue"> -#> <div id="box_645358447164415312856458594103" class="ui accordion"> -#> <div class="title" style="cursor: auto"> -#> <div class="ui top right ribbon label blue"> -#> <i class="minus icon" style="cursor: pointer;"></i> -#> Sample box -#> </div> -#> </div> -#> <div class="content active"> -#> <div>This is a box content</div> -#> </div> -#> </div> -#> </div> -#> <script>$(document).ready(function() { $('#box_645358447164415312856458594103').accordion({ -#> selector: { trigger: '.title .icon' }, -#> onOpening: function() { $('#box_645358447164415312856458594103').find('.label .icon').removeClass('plus').addClass('minus'); }, -#> onClosing: function() { $('#box_645358447164415312856458594103').find('.label .icon').removeClass('minus').addClass('plus'); } -#> }); })</script> -#> </div>
    -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/column.html b/docs/reference/column.html deleted file mode 100644 index ad93c0f..0000000 --- a/docs/reference/column.html +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - - - -Create a column. — column • SHINY.SEMANTIC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Create a column with additional UI elements.

    -
    - -
    column(width, ...)
    - -

    Arguments

    - - - - - - - - - - -
    width

    Width of the column. Between 1 and 16.

    ...

    UI elements to include within the column.

    - -

    Value

    - -

    A column that can be passed to dashboardPage

    - -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/dashboard_body.html b/docs/reference/dashboard_body.html deleted file mode 100644 index fd990c5..0000000 --- a/docs/reference/dashboard_body.html +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - - - -Create a body of a dashboard. — dashboard_body • SHINY.SEMANTIC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Create a body of a dashboard with tabs and other additional UI elements.

    -
    - -
    dashboard_body(..., class = "")
    -
    -dashboardBody(..., class = "")
    - -

    Arguments

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

    UI elements to include within the body.

    class

    CSS class to be applied to the container of dashboardBody. Note it's not the <body> tag.

    - -

    Value

    - -

    A tab that can be passed to dashboardPage

    -

    Functions

    - - -
      -
    • dashboardBody: Create a body of a dashboard (alias for dashboard_body for compatibility with shinydashboard)

    • -
    - -

    Examples

    -
    if(interactive()){ - - library(shiny) - library(semantic.dashboard) - - ui <- dashboardPage( - dashboardHeader(color = "blue"), - dashboardSidebar(side = "left", size = "thin", color = "teal", - sidebarMenu( - menuItem(tabName = "tab1", "Tab 1"), - menuItem(tabName = "tab2", "Tab 2"))), - dashboardBody(tabItems( - tabItem(tabName = "tab1", p("Tab 1")), - tabItem(tabName = "tab2", p("Tab 2")))) - ) - - server <- function(input, output) { - } - - shinyApp(ui, server) -}
    -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/dashboard_header.html b/docs/reference/dashboard_header.html deleted file mode 100644 index 0038d7e..0000000 --- a/docs/reference/dashboard_header.html +++ /dev/null @@ -1,303 +0,0 @@ - - - - - - - - -Create a header of a dashboard. — dashboard_header • SHINY.SEMANTIC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Create a header of a dashboard with other additional UI elements. - Hint: use shiny::tagList() if you want to add multiple elements in left / center or right.

    -
    - -
    dashboard_header(
    -  ...,
    -  left = NULL,
    -  center = NULL,
    -  right = NULL,
    -  title = NULL,
    -  titleWidth = "thin",
    -  logo_align = "center",
    -  logo_path = "",
    -  color = "",
    -  inverted = FALSE,
    -  disable = FALSE,
    -  show_menu_button = TRUE,
    -  menu_button_label = "Menu",
    -  class = ""
    -)
    -
    -dashboardHeader(
    -  ...,
    -  left = NULL,
    -  center = NULL,
    -  right = NULL,
    -  title = NULL,
    -  titleWidth = "thin",
    -  logo_align = "center",
    -  logo_path = "",
    -  color = "",
    -  inverted = FALSE,
    -  disable = FALSE,
    -  show_menu_button = TRUE,
    -  menu_button_label = "Menu",
    -  class = ""
    -)
    - -

    Arguments

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

    UI elements to include within the header. They will be displayed on the right side.

    left

    UI element to put on the left of the header. It will be placed after (to the right) the title and menu button (if they exist).

    center

    UI element to put in the center of the header.

    right

    UI element to put to the right of the header. It will be placed before elements defined in ... (if there are any).

    title

    Dashboard title to be displayed in the upper left corner. If NULL, will not display any title field. Use "" for an empty title.

    titleWidth

    Title field width, one of c(NULL, "very thin", "thin", "wide", "very wide")

    logo_align

    Where should logo be placed. One of c("left", "center")

    logo_path

    Path or URL of the logo to be shown in the header.

    color

    Color of the sidebar / text / icons (depending on the value of `inverted` parameter. \ -One of c("", "red", "orange", "yellow", "olive", "green", "teal", "blue", "violet", "purple", "pink", "brown", "grey", "black")

    inverted

    If FALSE sidebar will be white and text will be colored. \ -If TRUE text will be white and background will be colored. Default is FALSE.

    disable

    If TRUE, don't display the header.

    show_menu_button

    If FALSE, don't display the menu button. Default is TRUE.

    menu_button_label

    Text of the menu button. Default is "Menu".

    class

    CSS class to be applied to the container of dashboardHeader.

    - -

    Value

    - -

    A header that can be passed to dashboardPage

    -

    Functions

    - - -
      -
    • dashboardHeader: Create a header of a dashboard (alias for dashboard_header for compatibility with shinydashboard)

    • -
    - -

    Examples

    -
    if(interactive()) { - - library(shiny) - library(semantic.dashboard) - - ui <- dashboardPage( - dashboardHeader(color = "blue", inverted = TRUE), - dashboardSidebar(side = "left", size = "thin", color = "teal", - sidebarMenu( - menuItem(tabName = "tab1", "Tab 1"), - menuItem(tabName = "tab2", "Tab 2"))), - dashboardBody(tabItems( - tabItem(tabName = "tab1", p("Tab 1")), - tabItem(tabName = "tab2", p("Tab 2")))) - ) - - server <- function(input, output) { - } - - shinyApp(ui, server) -}
    -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/dashboard_page.html b/docs/reference/dashboard_page.html deleted file mode 100644 index 45bcd2c..0000000 --- a/docs/reference/dashboard_page.html +++ /dev/null @@ -1,273 +0,0 @@ - - - - - - - - -Create a dashboard. — dashboard_page • SHINY.SEMANTIC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Create a page with menu item sidebar and body containing tabs and other additional elements.

    -
    - -
    dashboard_page(
    -  header,
    -  sidebar,
    -  body,
    -  title = "",
    -  suppress_bootstrap = TRUE,
    -  theme = NULL,
    -  margin = TRUE,
    -  class = "",
    -  sidebar_and_body_container_class = ""
    -)
    -
    -dashboardPage(
    -  header,
    -  sidebar,
    -  body,
    -  title = "",
    -  suppress_bootstrap = TRUE,
    -  theme = NULL,
    -  margin = TRUE,
    -  class = "",
    -  sidebar_and_body_container_class = ""
    -)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    header

    Header of a dashboard.

    sidebar

    Sidebar of a dashboard.

    body

    Body of a dashboard.

    title

    Title of a dashboard.

    suppress_bootstrap

    There are some conflicts in CSS styles between -FomanticUI and Bootstrap. For the time being it's better to suppress Bootstrap. -If TRUE bootstrap dependency from shiny will be disabled.

    theme

    Theme name or path. For possible options see semanticPage.

    margin

    If TRUE, margin to be applied to the whole dashboard. -Defaults to TRUE.

    class

    CSS class to be applied to the page container (<body> tag).

    sidebar_and_body_container_class

    CSS class to be applied to the div containing -dashboardSidebar and dashboardBody.

    - -

    Value

    - -

    Dashboard.

    -

    Functions

    - - -
      -
    • dashboardPage: Create a dashboard (alias for dashboard_page for compatibility with shinydashboard)

    • -
    - -

    Examples

    -
    if(interactive()){ - - library(shiny) - library(semantic.dashboard) - - ui <- dashboardPage( - dashboardHeader(color = "blue"), - dashboardSidebar(side = "left", size = "thin", color = "teal", - sidebarMenu( - menuItem(tabName = "tab1", "Tab 1"), - menuItem(tabName = "tab2", "Tab 2"))), - dashboardBody(tabItems( - tabItem(tabName = "tab1", p("Tab 1")), - tabItem(tabName = "tab2", p("Tab 2")))) - ) - - server <- function(input, output) { - } - - shinyApp(ui, server) -}
    -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/dashboard_sidebar.html b/docs/reference/dashboard_sidebar.html deleted file mode 100644 index 8952e8a..0000000 --- a/docs/reference/dashboard_sidebar.html +++ /dev/null @@ -1,296 +0,0 @@ - - - - - - - - -Create a sidebar of a dashboard. — dashboard_sidebar • SHINY.SEMANTIC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Create a pushable sidebar of a dashboard with menu items and other additional UI elements.

    -
    - -
    dashboard_sidebar(
    -  ...,
    -  side = "left",
    -  size = "thin",
    -  color = "",
    -  inverted = FALSE,
    -  closable = FALSE,
    -  pushable = TRUE,
    -  center = FALSE,
    -  visible = TRUE,
    -  disable = FALSE,
    -  overlay = FALSE,
    -  dim_page = FALSE,
    -  class = ""
    -)
    -
    -dashboardSidebar(
    -  ...,
    -  side = "left",
    -  size = "thin",
    -  color = "",
    -  inverted = FALSE,
    -  closable = FALSE,
    -  pushable = TRUE,
    -  center = FALSE,
    -  visible = TRUE,
    -  disable = FALSE,
    -  overlay = FALSE,
    -  dim_page = FALSE,
    -  class = ""
    -)
    - -

    Arguments

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

    UI elements to include within the sidebar.

    side

    Placement of the sidebar. One of c("left", "right", "top", "bottom")

    size

    Size of the sidebar. One of c("", "thin", "very thin", "wide", "very wide")

    color

    Color of the sidebar / text / icons (depending on the value of `inverted` parameter. \ -One of c("", "red", "orange", "yellow", "olive", "green", "teal", "blue", "violet", "purple", "pink", "brown", "grey", "black")

    inverted

    If FALSE sidebar will be white and text will be colored. \ -If TRUE text will be white and background will be colored. Default is FALSE.

    closable

    If TRUE allow close sidebar by clicking in the body. Default to FALSE

    pushable

    If TRUE the menu button is active. Default to TRUE

    center

    Should label and icon be centerd on menu items. Default to FALSE

    visible

    Should sidebar be visible on start. Default to TRUE

    disable

    If TRUE, don't display the sidebar.

    overlay

    If TRUE, opened sidebar will cover the tab content. Otherwise it is displayed next to the content. -Relevant only for sidebar positioned on left or right. Default to FALSE

    dim_page

    If TRUE, page content will be darkened when sidebr is open. Default to FALSE

    class

    CSS class to be applied to the container of dashboardSidebar.

    - -

    Value

    - -

    A sidebar that can be passed to dashboardPage

    -

    Functions

    - - -
      -
    • dashboardSidebar: Create a sidebar of a dashboard (alias for dashboard_sidebar for compatibility with shinydashboard)

    • -
    - -

    Examples

    -
    if(interactive()){ - - library(shiny) - library(semantic.dashboard) - - ui <- dashboardPage( - dashboardHeader(color = "blue"), - dashboardSidebar(side = "left", size = "thin", color = "teal", - sidebarMenu( - menuItem(tabName = "tab1", "Tab 1"), - menuItem(tabName = "tab2", "Tab 2"))), - dashboardBody(tabItems( - tabItem(tabName = "tab1", p("Tab 1")), - tabItem(tabName = "tab2", p("Tab 2")))) - ) - - server <- function(input, output) { - } - - shinyApp(ui, server) -}
    -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/dropdown_menu.html b/docs/reference/dropdown_menu.html deleted file mode 100644 index 8dbf291..0000000 --- a/docs/reference/dropdown_menu.html +++ /dev/null @@ -1,237 +0,0 @@ - - - - - - - - -Create a dropdown menu. — dropdown_menu • SHINY.SEMANTIC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Create a dropdown menu with additional UI elements.

    -
    - -
    dropdown_menu(..., type = "messages", icon = NULL, show_counter = TRUE)
    -
    -dropdownMenu(..., type = "messages", icon = NULL, show_counter = TRUE)
    - -

    Arguments

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

    UI elements to include within the dropdown menu.

    type

    Type of the displayed items.

    icon

    Icon of the dropdown menu. If not specyfied created based on type agrument.

    show_counter

    If true circular label with counter is going to be shown for dropdown.

    - -

    Value

    - -

    A dropdown menu that can be passed to dashboardHeader

    -

    Functions

    - - -
      -
    • dropdownMenu: Create a dropdown menu (alias for dropdown_menu for compatibility with shinydashboard)

    • -
    - -

    Examples

    -
    dropdownMenu(icon = icon("warning sign"), taskItem("Project progress...", 50.777, color = "red"))
    #> <button class="ui icon top right inline item dropdown button" style="margin-right: 0"> -#> <i class="warning sign icon"></i> -#> <div class="ui circular mini label" style="">1</div> -#> <div class="menu"> -#> <div class="item" style="min-width: 200px;"> -#> <div class="ui active progress red" data-percent="50.777" data-total="100"> -#> <div class="bar"> -#> <div class="progress"></div> -#> </div> -#> <div class="label">Project progress...</div> -#> </div> -#> </div> -#> </div> -#> <script>$('.ui.dropdown').dropdown();</script> -#> <script>$('.progress').progress();</script> -#> </button>
    dropdownMenu(type = "notifications", notificationItem("This is notification!", color = "red"))
    #> <button class="ui icon top right inline item dropdown button" style="margin-right: 0"> -#> <i class="warning sign icon"></i> -#> <div class="ui circular mini label" style="">1</div> -#> <div class="menu"> -#> <div class="item"> -#> <div class="ui label red"> -#> <i class="small warning icon"></i> -#> This is notification! -#> </div> -#> </div> -#> </div> -#> <script>$('.ui.dropdown').dropdown();</script> -#> <script>$('.progress').progress();</script> -#> </button>
    -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/dropdown_menu_output.html b/docs/reference/dropdown_menu_output.html deleted file mode 100644 index ec688eb..0000000 --- a/docs/reference/dropdown_menu_output.html +++ /dev/null @@ -1,204 +0,0 @@ - - - - - - - - -Create a dropdown menu output. — dropdown_menu_output • SHINY.SEMANTIC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    UI-side function for dynamic dropdownMenu.

    -
    - -
    dropdown_menu_output(outputId)
    -
    -dropdownMenuOutput(outputId)
    - -

    Arguments

    - - - - - - -
    outputId

    Id of the output.

    - -

    Value

    - -

    A dropdown menu that can be passed to dashboardHeader

    -

    Functions

    - - -
      -
    • dropdownMenuOutput: Create a dropdown menu output (alias for dropdown_menu_output for compatibility with shinydashboard)

    • -
    - -

    Examples

    -
    if (FALSE) { -dropdownMenuOutput("dropdown") - -output$dropdown <- renderDropdownMenu({ - dropdownMenu(messageItem("Michał", "Test message", color = "teal"), - messageItem("Marek", "Another test!", icon = "warning", color = "red")) -}) -}
    -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/figures/compare.png b/docs/reference/figures/compare.png deleted file mode 100644 index f0b3355..0000000 Binary files a/docs/reference/figures/compare.png and /dev/null differ diff --git a/docs/reference/figures/hexsticker.png b/docs/reference/figures/hexsticker.png deleted file mode 100644 index 746f56c..0000000 Binary files a/docs/reference/figures/hexsticker.png and /dev/null differ diff --git a/docs/reference/get_dashboard_dependencies.html b/docs/reference/get_dashboard_dependencies.html deleted file mode 100644 index ab26e40..0000000 --- a/docs/reference/get_dashboard_dependencies.html +++ /dev/null @@ -1,179 +0,0 @@ - - - - - - - - -Get the semantic.dashboard dependencies — get_dashboard_dependencies • SHINY.SEMANTIC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    To add dependencies in the future follow the htmlDependency help.

    -
    - -
    get_dashboard_dependencies()
    - - -

    Value

    - -

    semantic.dashboard dependencies

    - -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/icon.html b/docs/reference/icon.html deleted file mode 100644 index 7c25fb6..0000000 --- a/docs/reference/icon.html +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - - - -Create Semantic UI icon tag (alias for <code>icon</code> for compatibility with <code>shinydashboard</code>) — icon • SHINY.SEMANTIC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    This creates an icon tag using Semantic UI styles.

    -
    - -
    icon(type, ...)
    - -

    Arguments

    - - - - - - - - - - -
    type

    A name of an icon. Look at http://semantic-ui.com/elements/icon.html for all possibilities.

    ...

    Other arguments to be added as attributes of the tag (e.g. style, class etc.)

    - - -

    Examples

    -
    icon("dog")
    #> <i class="dog icon"></i>
    -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/index.html b/docs/reference/index.html deleted file mode 100644 index 774c26c..0000000 --- a/docs/reference/index.html +++ /dev/null @@ -1,373 +0,0 @@ - - - - - - - - -Function reference • SHINY.SEMANTIC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    Dashboard skeleton

    -

    -
    -

    dashboard_body() dashboardBody()

    -

    Create a body of a dashboard.

    -

    dashboard_header() dashboardHeader()

    -

    Create a header of a dashboard.

    -

    dashboard_page() dashboardPage()

    -

    Create a dashboard.

    -

    dashboard_sidebar() dashboardSidebar()

    -

    Create a sidebar of a dashboard.

    -

    column()

    -

    Create a column.

    -

    box()

    -

    Create a box.

    -

    dropdown_menu() dropdownMenu()

    -

    Create a dropdown menu.

    -

    dropdown_menu_output() dropdownMenuOutput()

    -

    Create a dropdown menu output.

    -

    render_dropdown_menu() renderDropdownMenu()

    -

    Create a dropdown menu output.

    -

    Other UI elements

    -

    All functions that generate UI elements.

    -
    -

    value_box() valueBox() infoBox()

    -

    Create a valueBox.

    -

    value_box_output() valueBoxOutput() infoBoxOutput()

    -

    Create a value box output.

    -

    menu_item() menuItem() menuSubItem()

    -

    Create a menu item.

    -

    menu_item_output() menuItemOutput()

    -

    Create a menu item output.

    -

    message_item() messageItem()

    -

    Create a message item.

    -

    notification_item() notificationItem()

    -

    Create a notification item.

    -

    render_value_box() renderValueBox() renderInfoBox()

    -

    Create a value box output.

    -

    render_menu() renderMenu()

    -

    Create a menu output.

    -

    render_dropdown_menu() renderDropdownMenu()

    -

    Create a dropdown menu output.

    -

    sidebar_menu() sidebarMenu()

    -

    Create a sidebar menu.

    -

    sidebar_menu_output() sidebarMenuOutput()

    -

    Create a sidebar menu output.

    -

    tab_box() tabBox()

    -

    Create a tab box.

    -

    tab_item() tabItem()

    -

    Create a tab.

    -

    tab_items() tabItems()

    -

    Create a panel with tabs.

    -

    task_item() taskItem()

    -

    Create a task item.

    -

    Constants

    -

    They contain the supported values of certain inputs.

    -
    -

    light_semantic_palette

    -

    Semantic light colors -https://github.com/Semantic-Org/Semantic-UI/blob/master/src/themes/default/globals/site.variables

    -

    semantic_palette

    -

    Semantic colors -https://github.com/Semantic-Org/Semantic-UI/blob/master/src/themes/default/globals/site.variables

    -
    - - -
    - - -
    - - -
    -

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/light_semantic_palette.html b/docs/reference/light_semantic_palette.html deleted file mode 100644 index fd7143b..0000000 --- a/docs/reference/light_semantic_palette.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - - -Semantic light colors -https://github.com/Semantic-Org/Semantic-UI/blob/master/src/themes/default/globals/site.variables — light_semantic_palette • SHINY.SEMANTIC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Semantic light colors -https://github.com/Semantic-Org/Semantic-UI/blob/master/src/themes/default/globals/site.variables

    -
    - -
    light_semantic_palette
    - - -

    Format

    - -

    An object of class character of length 13.

    - -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/menu_item.html b/docs/reference/menu_item.html deleted file mode 100644 index 1790f49..0000000 --- a/docs/reference/menu_item.html +++ /dev/null @@ -1,223 +0,0 @@ - - - - - - - - -Create a menu item. — menu_item • SHINY.SEMANTIC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Create a menu item corresponding to a tab.

    -
    - -
    menu_item(text, ..., icon = NULL, tabName = NULL, href = NULL, newtab = TRUE)
    -
    -menuItem(text, ..., icon = NULL, tabName = NULL, href = NULL, newtab = TRUE)
    -
    -menuSubItem(text, ..., icon = NULL, tabName = NULL, href = NULL, newtab = TRUE)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    text

    Text to show for the menu item.

    ...

    This may consist of menuSubItems.

    icon

    Icon of the menu item. (Optional)

    tabName

    Id of the tab. Not compatible with href.

    href

    A link address. Not compatible with tabName.

    newtab

    If href is supplied, should the link open in a new browser tab?

    - -

    Value

    - -

    A menu item that can be passed sidebarMenu

    -

    Functions

    - - -
      -
    • menuItem: Create a menu item (alias for manu_item for compatibility with shinydashboard)

    • -
    • menuSubItem: Create a menu item (alias for manu_item for compatibility with shinydashboard)

    • -
    - -

    Examples

    -
    menuItem(tabName = "plot_tab", text = "My plot", icon = icon("home"))
    #> <a class="item" href="#shiny-tab-plot_tab" data-tab="shiny-tab-plot_tab" data-toggle="tab" data-value="plot_tab"> -#> <i class="home icon"></i> -#> My plot -#> </a>
    -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/menu_item_output.html b/docs/reference/menu_item_output.html deleted file mode 100644 index 984d414..0000000 --- a/docs/reference/menu_item_output.html +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - - -Create a menu item output. — menu_item_output • SHINY.SEMANTIC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    UI-side function for dynamic manuItem.

    -
    - -
    menu_item_output(outputId)
    -
    -menuItemOutput(outputId)
    - -

    Arguments

    - - - - - - -
    outputId

    Id of the output.

    - -

    Value

    - -

    A menu item that can be passed to sidebarMenu

    -

    Functions

    - - -
      -
    • menuItemOutput: Create a menu item output (alias for menu_item_output for compatibility with shinydashboard)

    • -
    - -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/message_item.html b/docs/reference/message_item.html deleted file mode 100644 index e356579..0000000 --- a/docs/reference/message_item.html +++ /dev/null @@ -1,215 +0,0 @@ - - - - - - - - -Create a message item. — message_item • SHINY.SEMANTIC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Create a message item.

    -
    - -
    message_item(from, message, ..., icon = "user")
    -
    -messageItem(from, message, ..., icon = "user")
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - -
    from

    Who the message is from.

    message

    Text of the message.

    ...

    Additional UI elements to include within the dropdown menu.

    icon

    Additional icon.

    - -

    Value

    - -

    A message item that can be passed to dropdownMenu

    -

    Functions

    - - -
      -
    • messageItem: Create a message item (alias for message_item for compatibility with shinydashboard)

    • -
    - -

    Examples

    -
    messageItem("Marek", "Another test!", icon = "warning")
    #> <a class="item"> -#> <span class="description">Another test!</span> -#> <span class="text"> -#> <i class="warning icon"></i> -#> Marek -#> </span> -#> </a>
    -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/notification_item.html b/docs/reference/notification_item.html deleted file mode 100644 index ee9cea9..0000000 --- a/docs/reference/notification_item.html +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - - -Create a notification item. — notification_item • SHINY.SEMANTIC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Create a notification item.

    -
    - -
    notification_item(text, icon = "warning", color = "")
    -
    -notificationItem(text, icon = "warning", color = "")
    - -

    Arguments

    - - - - - - - - - - - - - - -
    text

    Text of the notification.

    icon

    Additional icon.

    color

    Color of the notification item. One of -c("", "red", "orange", "yellow", "olive", "green", "teal", "blue", -"violet", "purple", "pink", "brown", "grey", "black")

    - -

    Value

    - -

    A notification item that can be passed to dropdownMenu

    -

    Functions

    - - -
      -
    • notificationItem: Create a notification item (alias for notification_item for compatibility with shinydashboard)

    • -
    - -

    Examples

    -
    notificationItem("This is notification!", color = "red")
    #> <div class="item"> -#> <div class="ui label red"> -#> <i class="small warning icon"></i> -#> This is notification! -#> </div> -#> </div>
    -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/render_dropdown_menu.html b/docs/reference/render_dropdown_menu.html deleted file mode 100644 index 1dab7e7..0000000 --- a/docs/reference/render_dropdown_menu.html +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - - -Create a dropdown menu output. — render_dropdown_menu • SHINY.SEMANTIC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Server-side function for dynamic dropdownMenu.

    -
    - -
    render_dropdown_menu(expr, env = parent.frame(), quoted = FALSE)
    -
    -renderDropdownMenu(expr, env = parent.frame(), quoted = FALSE)
    - -

    Arguments

    - - - - - - - - - - - - - - -
    expr

    dropdownMenu.

    env

    The environment in which to evaluate expr.

    quoted

    Is expr a quoted expression (with quote())? This is useful if you want to save an expression in a variable.

    - -

    Value

    - -

    A dynamic dropdown menu that can be assigned to output.

    -

    Functions

    - - -
      -
    • renderDropdownMenu: Create a dropdown menu output (alias for render_dropdown_menu for compatibility with shinydashboard)

    • -
    - -

    Examples

    -
    if (FALSE) { -dropdownMenuOutput("dropdown") - -output$dropdown <- renderDropdownMenu({ - dropdownMenu(messageItem("Michał", "Test message", color = "teal"), - messageItem("Marek", "Another test!", icon = "warning", color = "red")) -}) -}
    -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/render_menu.html b/docs/reference/render_menu.html deleted file mode 100644 index 76df4e1..0000000 --- a/docs/reference/render_menu.html +++ /dev/null @@ -1,203 +0,0 @@ - - - - - - - - -Create a menu output. — render_menu • SHINY.SEMANTIC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Server-side function for dynamic sidebarMenu.

    -
    - -
    render_menu(expr, env = parent.frame(), quoted = FALSE)
    -
    -renderMenu(expr, env = parent.frame(), quoted = FALSE)
    - -

    Arguments

    - - - - - - - - - - - - - - -
    expr

    menu.

    env

    The environment in which to evaluate expr.

    quoted

    Is expr a quoted expression (with quote())? This is useful if you want to save an expression in a variable.

    - -

    Value

    - -

    A dynamic menu that can be assigned to output.

    -

    Functions

    - - -
      -
    • renderMenu: Create a menu output (alias for render_menu for compatibility with shinydashboard)

    • -
    - -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/render_value_box.html b/docs/reference/render_value_box.html deleted file mode 100644 index 37ee400..0000000 --- a/docs/reference/render_value_box.html +++ /dev/null @@ -1,220 +0,0 @@ - - - - - - - - -Create a value box output. — render_value_box • SHINY.SEMANTIC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Server-side function for dynamic valueBox.

    -
    - -
    render_value_box(expr, env = parent.frame(), quoted = FALSE)
    -
    -renderValueBox(expr, env = parent.frame(), quoted = FALSE)
    -
    -renderInfoBox(expr, env = parent.frame(), quoted = FALSE)
    - -

    Arguments

    - - - - - - - - - - - - - - -
    expr

    ValueBox.

    env

    The environment in which to evaluate expr.

    quoted

    Is expr a quoted expression (with quote())? -This is useful if you want to save an expression in a variable.

    - -

    Value

    - -

    A dynamic valueBox that can be assigned to output.

    -

    Functions

    - - -
      -
    • renderValueBox: Create a value box output (alias for render_value_box)

    • -
    • renderInfoBox: Create a value box output (alias for render_value_box)

    • -
    - -

    Examples

    -
    if (FALSE) { -valueBoxOutput("value_box") - -output$value_box <- renderValueBox({ - valueBox( - value = 33.45, - subtitle = "Simple valuebox", - icon = icon("bar chart"), - color = "purple", - width = 5) -}) -}
    -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/semantic.dashboard.html b/docs/reference/semantic.dashboard.html deleted file mode 100644 index d3b57ba..0000000 --- a/docs/reference/semantic.dashboard.html +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - - - -semantic.dashboard — semantic.dashboard • SHINY.SEMANTIC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    semantic.dashboard

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

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/semantic_palette.html b/docs/reference/semantic_palette.html deleted file mode 100644 index 82214bf..0000000 --- a/docs/reference/semantic_palette.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - - -Semantic colors -https://github.com/Semantic-Org/Semantic-UI/blob/master/src/themes/default/globals/site.variables — semantic_palette • SHINY.SEMANTIC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Semantic colors -https://github.com/Semantic-Org/Semantic-UI/blob/master/src/themes/default/globals/site.variables

    -
    - -
    semantic_palette
    - - -

    Format

    - -

    An object of class character of length 13.

    - -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/sidebar_menu.html b/docs/reference/sidebar_menu.html deleted file mode 100644 index 4e23904..0000000 --- a/docs/reference/sidebar_menu.html +++ /dev/null @@ -1,218 +0,0 @@ - - - - - - - - -Create a sidebar menu. — sidebar_menu • SHINY.SEMANTIC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Create a sidebar menu with menu items.

    -
    - -
    sidebar_menu(..., id = "uisidebar")
    -
    -sidebarMenu(..., id = "uisidebar")
    - -

    Arguments

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

    Menu items.

    id

    The sidebar id class also used for update input on server side. Default is uisidebar

    - -

    Value

    - -

    A sidebar menu that can be passed dashboardSidebar

    -

    Functions

    - - -
      -
    • sidebarMenu: Create a sidebar menu (alias for sidebar_menu for compatibility with shinydashboard)

    • -
    - -

    Examples

    -
    sidebarMenu( - menuItem(tabName = "plot_tab", text = "My plot", icon = icon("home")), - menuItem(tabName = "table_tab", text = "My table", icon = icon("smile")) - )
    #> $id -#> [1] "uisidebar" -#> -#> [[2]] -#> <a class="item" href="#shiny-tab-plot_tab" data-tab="shiny-tab-plot_tab" data-toggle="tab" data-value="plot_tab"> -#> <i class="home icon"></i> -#> My plot -#> </a> -#> -#> [[3]] -#> <a class="item" href="#shiny-tab-table_tab" data-tab="shiny-tab-table_tab" data-toggle="tab" data-value="table_tab"> -#> <i class="smile icon"></i> -#> My table -#> </a> -#>
    -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/sidebar_menu_output.html b/docs/reference/sidebar_menu_output.html deleted file mode 100644 index 6373c73..0000000 --- a/docs/reference/sidebar_menu_output.html +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - - -Create a sidebar menu output. — sidebar_menu_output • SHINY.SEMANTIC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    UI-side function for dynamic sidebarMenu.

    -
    - -
    sidebar_menu_output(outputId)
    -
    -sidebarMenuOutput(outputId)
    - -

    Arguments

    - - - - - - -
    outputId

    Id of the output.

    - -

    Value

    - -

    A sidebar menu that can be passed to dashboardSidebar

    -

    Functions

    - - -
      -
    • sidebarMenuOutput: Create a sidebar menu output (alias for sidebar_menu_output for compatibility with shinydashboard)

    • -
    - -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/tab_box.html b/docs/reference/tab_box.html deleted file mode 100644 index 45362e6..0000000 --- a/docs/reference/tab_box.html +++ /dev/null @@ -1,282 +0,0 @@ - - - - - - - - -Create a tab box. — tab_box • SHINY.SEMANTIC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Create a tab box with additional UI elements.

    -
    - -
    tab_box(
    -  tabs,
    -  title = NULL,
    -  color = "",
    -  ribbon = TRUE,
    -  title_side = "top right",
    -  collapsible = TRUE,
    -  width = 8,
    -  id = NULL,
    -  ...
    -)
    -
    -tabBox(
    -  tabs,
    -  title = NULL,
    -  color = "",
    -  ribbon = TRUE,
    -  title_side = "top right",
    -  collapsible = TRUE,
    -  width = 8,
    -  id = NULL,
    -  ...
    -)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    tabs

    Tabs to include within the box.

    title

    Label of the box.

    color

    Color of the box. One of c("", "red", "orange", "yellow", -"olive", "green", "teal", "blue", "violet", "purple", "pink", "brown", "grey", "black")

    ribbon

    Should label be presented as ribbon.

    title_side

    Side of a label. One of c("top", "bottom", "top left", -"top right", "bottom left", "bottom right") if ribbon = FALSE, or one of -c("top left", "top right") if ribbon = TRUE

    collapsible

    Should minimize button be added to label.

    width

    Width of the box.

    id

    ID of the box.

    ...

    other elements of the box.

    - -

    Value

    - -

    A box that can be passed to dashboardBody

    -

    Functions

    - - -
      -
    • tabBox: Create a tab box (alias for tab_box for compatibility with shinydashboard)

    • -
    - -

    Examples

    -
    tabBox(title = "Sample tab box", color = "blue", width = 5, - tabs = list( - list(menu = "First Tab", content = "This is first tab"), - list(menu = "Second Tab", content = "This is second tab") - ))
    #> <div class="five wide column"> -#> <div class="ui segment raised blue"> -#> <div id="box_750512081470292169253906552817" class="ui accordion"> -#> <div class="title" style="cursor: auto"> -#> <div class="ui top right ribbon label blue"> -#> <i class="minus icon" style="cursor: pointer;"></i> -#> Sample tab box -#> </div> -#> </div> -#> <div class="content active"> -#> <div> -#> <div id="menu-fmmyucmrwtkdbirslsqj" class="ui menu sem top attached tabular"> -#> <a class="item active" data-tab="tab-aaglvijbfglzvnegslqe">First Tab</a> -#> <a class="item " data-tab="tab-qmfaamrewkadgwxbhisi">Second Tab</a> -#> </div> -#> <div class="ui tab bottom attached grid segment active" data-tab="tab-aaglvijbfglzvnegslqe">This is first tab</div> -#> <div class="ui tab bottom attached grid segment " data-tab="tab-qmfaamrewkadgwxbhisi">This is second tab</div> -#> </div> -#> </div> -#> </div> -#> </div> -#> <script>$(document).ready(function() { $('#box_750512081470292169253906552817').accordion({ -#> selector: { trigger: '.title .icon' }, -#> onOpening: function() { $('#box_750512081470292169253906552817').find('.label .icon').removeClass('plus').addClass('minus'); }, -#> onClosing: function() { $('#box_750512081470292169253906552817').find('.label .icon').removeClass('minus').addClass('plus'); } -#> }); })</script> -#> </div>
    -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/tab_item.html b/docs/reference/tab_item.html deleted file mode 100644 index 610abaf..0000000 --- a/docs/reference/tab_item.html +++ /dev/null @@ -1,192 +0,0 @@ - - - - - - - - -Create a tab. — tab_item • SHINY.SEMANTIC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -
    - -
    tab_item(tabName, ..., fluid = TRUE)
    -
    -tabItem(tabName, ..., fluid = TRUE)
    - -

    Arguments

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

    Id of the tab.

    ...

    UI elements to include within the tab.

    fluid

    Controls whether tab width should be 100

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

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/tab_items.html b/docs/reference/tab_items.html deleted file mode 100644 index 02a23f0..0000000 --- a/docs/reference/tab_items.html +++ /dev/null @@ -1,210 +0,0 @@ - - - - - - - - -Create a panel with tabs. — tab_items • SHINY.SEMANTIC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Create a panel with tabs.

    -
    - -
    tab_items(..., selected = 1)
    -
    -tabItems(..., selected = 1)
    - -

    Arguments

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

    Tabs.

    selected

    Which tab should be active on start.

    - -

    Value

    - -

    A panel with tabs that can be passed to dashboardBody

    -

    Functions

    - - -
      -
    • tabItems: Create a panel with tabs (alias for tab_items for compatibility with shinydashboard)

    • -
    - -

    Examples

    -
    tabItems( - tabItem(tabName = "tab1", "Tab 1"), - tabItem(tabName = "tab2", "Tab 2"))
    #> <div class="tab-content"> -#> <div role="tabpanel" style="height: 100%;" class="ui tab tab-pane container fluid active" id="shiny-tab-tab1" data-tab="shiny-tab-tab1"> -#> <div class="ui padded grid">Tab 1</div> -#> </div> -#> <div role="tabpanel" style="height: 100%;" class="ui tab tab-pane container fluid" id="shiny-tab-tab2" data-tab="shiny-tab-tab2"> -#> <div class="ui padded grid">Tab 2</div> -#> </div> -#> </div>
    -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/task_item.html b/docs/reference/task_item.html deleted file mode 100644 index 1565732..0000000 --- a/docs/reference/task_item.html +++ /dev/null @@ -1,214 +0,0 @@ - - - - - - - - -Create a task item. — task_item • SHINY.SEMANTIC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Create a task item.

    -
    - -
    task_item(text, value, color = "")
    -
    -taskItem(text, value, color = "")
    - -

    Arguments

    - - - - - - - - - - - - - - -
    text

    Progress bar label.

    value

    Progress bar value.

    color

    Color of the task item. One of c("", "red", "orange", -"yellow", "olive", "green", "teal", "blue", "violet", "purple", "pink", -"brown", "grey", "black")

    - -

    Value

    - -

    A task item that can be passed to dropdownMenu

    -

    Functions

    - - -
      -
    • taskItem: Create a task item (alias for taks_item for compatibility with shinydashboard)

    • -
    - -

    Examples

    -
    taskItem("Project progress...", 50.777, color = "red")
    #> <div class="item" style="min-width: 200px;"> -#> <div class="ui active progress red" data-percent="50.777" data-total="100"> -#> <div class="bar"> -#> <div class="progress"></div> -#> </div> -#> <div class="label">Project progress...</div> -#> </div> -#> </div>
    -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/validate_tab_name.html b/docs/reference/validate_tab_name.html deleted file mode 100644 index 37e3785..0000000 --- a/docs/reference/validate_tab_name.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - - -Valid tab name should not containt dot character '.'. — validate_tab_name • SHINY.SEMANTIC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Valid tab name should not containt dot character '.'.

    -
    - -
    validate_tab_name(name)
    - -

    Arguments

    - - - - - - -
    name

    Tab name to validate.

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

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/value_box.html b/docs/reference/value_box.html deleted file mode 100644 index d155ee6..0000000 --- a/docs/reference/value_box.html +++ /dev/null @@ -1,232 +0,0 @@ - - - - - - - - -Create a valueBox. — value_box • SHINY.SEMANTIC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Create a valueBox with additional UI elements.

    -
    - -
    value_box(subtitle, value, icon = NULL, color = "blue", width = 5, size = "")
    -
    -valueBox(subtitle, value, icon = NULL, color = "blue", width = 5, size = "")
    -
    -infoBox(subtitle, value, icon = NULL, color = "blue", width = 5, size = "")
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - - - - - - - - - -
    subtitle

    Label of the valueBox.

    value

    Value of the valueBox.

    icon

    Icon of the valueBox.

    color

    Color of the valueBox. One of c("", "red", "orange", "yellow", -"olive", "green", "teal", "blue", "violet", "purple", "pink", "brown", "grey", "black")

    width

    Width of the valueBox.

    size

    Size of value. One of c("mini", "tiny", "small", "", "large", "huge"). -Default is "".

    - -

    Value

    - -

    A valueBox that can be passed to dashboardBody

    -

    Functions

    - - -
      -
    • valueBox: Create a valueBox (alias for value_box)

    • -
    • infoBox: Create a valueBox (alias for value_box)

    • -
    - -

    Examples

    -
    valueBox("Unread Mail", 44, icon("mail"), color = "blue", width = 5, size = "tiny")
    #> <div class="five wide column"> -#> <div class="ui fluid card blue"> -#> <div class="ui statistic tiny"> -#> <div class="value"> -#> <i class="mail icon"></i> -#> 44 -#> </div> -#> <div class="label">Unread Mail</div> -#> </div> -#> </div> -#> </div>
    -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/value_box_output.html b/docs/reference/value_box_output.html deleted file mode 100644 index 0c7c653..0000000 --- a/docs/reference/value_box_output.html +++ /dev/null @@ -1,215 +0,0 @@ - - - - - - - - -Create a value box output. — value_box_output • SHINY.SEMANTIC - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    UI-side function for dynamic valueBox.

    -
    - -
    value_box_output(outputId, width = 5)
    -
    -valueBoxOutput(outputId, width = 5)
    -
    -infoBoxOutput(outputId, width = 5)
    - -

    Arguments

    - - - - - - - - - - -
    outputId

    Id of the output.

    width

    Width of the valueBox.

    - -

    Value

    - -

    A value box that can be passed to dashboardBody

    -

    Functions

    - - -
      -
    • valueBoxOutput: Create a valueBox output (alias for value_box_output)

    • -
    • infoBoxOutput: Create a valueBox output (alias for value_box_output)

    • -
    - -

    Examples

    -
    if (FALSE) { -valueBoxOutput("value_box") - -output$value_box <- renderValueBox({ - valueBox( - value = 33.45, - subtitle = "Simple valuebox", - icon = icon("bar chart"), - color = "purple", - width = 5) -}) -}
    -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.5.1.

    -
    - -
    -
    - - - - - - - - diff --git a/examples/app.R b/examples/app.R index 86268ec..f18b763 100644 --- a/examples/app.R +++ b/examples/app.R @@ -6,74 +6,124 @@ library(DT) ui <- dashboardPage( margin = TRUE, - dashboardHeader(logo_align = "center", - logo_path = "http://d2v95fjda94ghc.cloudfront.net/appsilon_logo.png", - dropdownMenuOutput("dropdown"), - title = "Appsilon", - titleWidth = "thin", - show_menu_button = TRUE, - dropdownMenu(type = "notifications", - taskItem("Project progress...", 50.777, color = "red")), - dropdownMenu(icon = icon("red warning sign"), - notificationItem("This is an important notification!", color = "red"))), - - dashboardSidebar(side = "left", - size = "thin", - overlay = FALSE, - pushable = TRUE, - visible = TRUE, - dim_page = FALSE, - closable = FALSE, - sidebarMenu( - menuItem(tabName = "plot_tab", text = "My plot", icon = icon("home")), - menuItem(tabName = "table_tab", text = "My table", icon = icon("smile")))), + dashboardHeader( + logo_align = "center", + logo_path = "https://avatars0.githubusercontent.com/u/6096772", + dropdownMenuOutput("dropdown"), + title = "Appsilon", + titleWidth = "thin", + show_menu_button = TRUE, + dropdownMenu( + type = "notifications", + taskItem("Project progress...", 50.777, color = "red") + ), + dropdownMenu( + icon = icon("red warning sign"), + notificationItem("This is an important notification!", color = "red") + ) + ), + dashboardSidebar( + side = "left", + size = "thin", + overlay = FALSE, + pushable = TRUE, + visible = TRUE, + dim_page = FALSE, + closable = FALSE, + sidebarMenu( + sidebarUserPanel( + "Jane Smith", + subtitle = shiny::a(href = "#", icon("circle"), "Online"), + # Original image is published with a free to use license. + # https://www.pexels.com/photo/3492736/ + image = "jane_smith.jpg", + image_size = "mini" + ), + menuItem(tabName = "plot_tab", text = "My plot", icon = icon("home")), + menuItem(tabName = "table_tab", text = "My table", icon = icon("smile")) + ) + ), dashboardBody( tabItems( - tabItem(tabName = "plot_tab", fluid = TRUE, - fluidRow( - valueBox("Unread Mail", 44, icon("mail"), color = "blue", width = 5)), - fluidRow( - box(title = "Sample box", color = "blue", width = 11, - selectInput(inputId = "variable1", choices = names(mtcars), - label = "Select first variable", selected = "mpg"), - selectInput(inputId = "variable2", choices = names(mtcars), - label = "Select second variable", selected = "cyl"), - plotlyOutput("mtcars_plot")), - tabBox(title = "Sample box", color = "blue", width = 5, - collapsible = FALSE, - tabs = list( - list(menu = "First Tab", content = "Some text..."), - list(menu = "Second Tab", content = plotlyOutput("mtcars_plot2")) - ))) - ), - tabItem(tabName = "table_tab", fluid = FALSE, - fluidRow( - valueBox("Unread Mail", 144, icon("mail"), color = "blue", width = 6, size = "small"), - valueBox("Spam", 20, icon("mail"), color = "red", width = 5, size = "small"), - valueBox("Readed Mail", 666, icon("mail"), color = "green", width = 5, size = "small") - ), - fluidRow( - box(title = "Classic box", color = "red", ribbon = FALSE, - title_side = "top left", width = 16, - dataTableOutput("mtcars_table") - ))))) + tabItem( + tabName = "plot_tab", fluid = TRUE, + fluidRow( + valueBox("Unread Mail", 44, icon("mail"), color = "blue", width = 5)), + fluidRow( + box( + title = "Sample box", color = "blue", width = 11, + selectInput( + inputId = "variable1", + choices = names(mtcars), + label = "Select first variable", + selected = "mpg" + ), + selectInput( + inputId = "variable2", + choices = names(mtcars), + label = "Select second variable", selected = "cyl" + ), + plotlyOutput("mtcars_plot") + ), + tabBox( + title = "Sample box", color = "blue", width = 5, + collapsible = FALSE, + tabs = list( + list(menu = "First Tab", content = "Some text..."), + list(menu = "Second Tab", content = plotlyOutput("mtcars_plot2")) + ) + ) + ) + ), + tabItem( + tabName = "table_tab", fluid = FALSE, + fluidRow( + valueBox("Unread Mail", 144, icon("mail"), color = "blue", width = 6, size = "small"), + valueBox("Spam", 20, icon("mail"), color = "red", width = 5, size = "small"), + valueBox("Readed Mail", 666, icon("mail"), color = "green", width = 5, size = "small") + ), + fluidRow( + box( + title = "Classic box", + color = "red", + ribbon = FALSE, + title_side = "top left", + width = 16, + dataTableOutput("mtcars_table") + ) + ) + ) + ) + ) ) server <- function(input, output) { - output$mtcars_plot <- renderPlotly(plot_ly(mtcars, x = ~ mtcars[ , input$variable1], - y = ~ mtcars[ , input$variable2], - type = "scatter", mode = "markers")) - output$mtcars_plot2 <- renderPlotly(plot_ly(mtcars, x = ~ mtcars[ , input$variable1], - y = ~ mtcars[ , input$variable2], - type = "scatter", mode = "markers")) + output$mtcars_plot <- renderPlotly( + plot_ly( + mtcars, x = ~ mtcars[ , input$variable1], + y = ~ mtcars[ ,input$variable2], + type = "scatter", + mode = "markers" + ) + ) + output$mtcars_plot2 <- renderPlotly( + plot_ly( + mtcars, x = ~ mtcars[ , input$variable1], + y = ~ mtcars[ , input$variable2], + type = "scatter", + mode = "markers" + ) + ) output$mtcars_table <- renderDataTable(mtcars) output$dropdown <- renderDropdownMenu({ - dropdownMenu(messageItem("User", "Test message", color = "teal", style = "min-width: 200px"), - messageItem("Users", "Test message", color = "teal", icon = "users"), - messageItem("See this", "Another test", icon = "warning", color = "red")) + dropdownMenu( + messageItem("User", "Test message", color = "teal", style = "min-width: 200px"), + messageItem("Users", "Test message", color = "teal", icon = "users"), + messageItem("See this", "Another test", icon = "warning", color = "red") + ) }) } diff --git a/examples/minimal/app_header_elements.R b/examples/minimal/app_header_elements.R index 7226efd..7e76754 100644 --- a/examples/minimal/app_header_elements.R +++ b/examples/minimal/app_header_elements.R @@ -4,7 +4,7 @@ library(semantic.dashboard) ui <- dashboardPage(margin = TRUE, dashboardHeader(title = "Sample app", titleWidth = "thin", - logo_path = "http://d2v95fjda94ghc.cloudfront.net/appsilon_logo.png", + logo_path = "https://avatars0.githubusercontent.com/u/6096772", logo_align = "center", show_menu_button = FALSE, left = tagList(h4("Header test", style="margin-left: 5px"), shiny::icon("check-circle")), diff --git a/examples/www/jane_smith.jpg b/examples/www/jane_smith.jpg new file mode 100644 index 0000000..5878fd9 Binary files /dev/null and b/examples/www/jane_smith.jpg differ diff --git a/inst/semantic.dashboard.css b/inst/semantic.dashboard.css index da9062c..0eaf834 100644 --- a/inst/semantic.dashboard.css +++ b/inst/semantic.dashboard.css @@ -259,3 +259,7 @@ body.no-margin .ui.top.menu.dashboard-header { border-top-width: 1px; } +.ui.sidebar .user-panel { + min-height: 65px; + padding: 13px 16px; +} diff --git a/inst/semantic.dashboard.js b/inst/semantic.dashboard.js index c333c4c..05d6af1 100644 --- a/inst/semantic.dashboard.js +++ b/inst/semantic.dashboard.js @@ -3,7 +3,7 @@ */ const initialize_sidebar = (closable, pushable, overlay, dimPage) => { transitionLeftRight = overlay ? 'overlay' : 'uncover'; - $(document).ready(function() { + $(document).on('shiny:sessioninitialized', function(event) { $('.ui.sidebar') .sidebar({ context: $('.bottom.segment'), diff --git a/inst/semantic.dashboard.min.css b/inst/semantic.dashboard.min.css index 8743e10..dcc9bdc 100644 --- a/inst/semantic.dashboard.min.css +++ b/inst/semantic.dashboard.min.css @@ -1,2 +1 @@ -body{min-height:unset !important;display:flex;flex-direction:column}body:not(.no-margin){padding:10px}body.no-margin>.ui.top.menu{border-top:0}body.no-margin>.ui.segment.pushable{border:0}body>.ui.segment.pushable.attached{display:flex;overflow:hidden;margin-bottom:0}body>.ui.segment.pushable>.pusher{overflow:auto;width:100%}.dashboard-body.ui.grid{margin:0}.dashboard-body.ui.grid .tab-content{padding-left:0;padding-right:0;width:100%}.ui.menu.dashboard-title{display:flex;justify-content:center;align-items:center;box-shadow:none;border-left-width:0;border-top-width:0;border-bottom-width:0;border-top-right-radius:0;border-bottom-right-radius:0;background:transparent}.dashboard-title.thin{width:150px}body.no-margin .dashboard-title.thin{width:calc(150px - 1px)}.dashboard-title{width:260px}body.no-margin .dashboard-title{width:calc(260px - 1px)}.dashboard-title.wide{width:350px}body.no-margin .dashboard-title.wide{width:calc(350px - 1px)}.dashboard-title[class*='very thin']{width:60px}body.no-margin .dashboard-title[class*='very thin']{width:calc(60px - 1px)}.dashboard-title[class*='very wide']{width:475px}body.no-margin .dashboard-title[class*='very wide']{width:calc(475px - 1px)}.ui.dashboard-title{background-color:rgba(255,255,255,0.9);color:rgba(0,0,0,0.87)}.ui.inverted.dashboard-title{color:rgba(255,255,255,0.9)}.ui.inverted.dashboard-title{background-color:#1B1C1D}.ui.inverted.red.dashboard-title{background-color:#DB2828}.ui.inverted.orange.dashboard-title{background-color:#F2711C}.ui.inverted.yellow.dashboard-title{background-color:#FBBD08}.ui.inverted.olive.dashboard-title{background-color:#B5CC18}.ui.inverted.green.dashboard-title{background-color:#21BA45}.ui.inverted.teal.dashboard-title{background-color:#00B5AD}.ui.inverted.blue.dashboard-title{background-color:#2185D0}.ui.inverted.violet.dashboard-title{background-color:#6435C9}.ui.inverted.purple.dashboard-title{background-color:#A333C8}.ui.inverted.pink.dashboard-title{background-color:#E03997}.ui.inverted.brown.dashboard-title{background-color:#A5673F}.ui.inverted.grey.dashboard-title{background-color:#767676}.ui.inverted.black.dashboard-title{background-color:#1B1C1D}.ui.top.menu.dashboard-header{justify-content:space-between}.ui.top.menu.dashboard-header h1,.ui.top.menu.dashboard-header h2,.ui.top.menu.dashboard-header h3,.ui.top.menu.dashboard-header h4,.ui.top.menu.dashboard-header h5,.ui.top.menu.dashboard-header h6{margin:0}.ui.top.menu.dashboard-header:after{content:none}.ui.top.menu.dashboard-header .logo{height:30px;margin:5px}.ui.top.menu.dashboard-header .header-part{display:flex;align-items:center}body.no-margin .ui.top.menu.dashboard-header{border-radius:0}.ui.sidebar ~ .pusher{transform:none !important;transition:margin-left .5s ease, margin-right .5s ease}.ui.sidebar.visible:not(.pushable):not(.overlay).left.thin+.pusher,.ui.sidebar.visible.uncover.pushable.left.thin+.pusher{margin-left:150px}.ui.sidebar.visible:not(.pushable):not(.overlay).left+.pusher,.ui.sidebar.visible.uncover.pushable.left+.pusher{margin-left:260px}.ui.sidebar.visible:not(.pushable):not(.overlay).left.wide+.pusher,.ui.sidebar.visible.uncover.pushable.left.wide+.pusher{margin-left:350px}.ui.sidebar.visible:not(.pushable):not(.overlay).left[class*='very thin']+.pusher,.ui.sidebar.visible.uncover.pushable.left[class*='very thin']+.pusher{margin-left:60px}.ui.sidebar.visible:not(.pushable):not(.overlay).left[class*='very wide']+.pusher,.ui.sidebar.visible.uncover.pushable.left[class*='very wide']+.pusher{margin-left:475px}.ui.sidebar.visible:not(.pushable):not(.overlay).right.thin+.pusher,.ui.sidebar.visible.uncover.pushable.right.thin+.pusher{margin-right:150px}.ui.sidebar.visible:not(.pushable):not(.overlay).right+.pusher,.ui.sidebar.visible.uncover.pushable.right+.pusher{margin-right:260px}.ui.sidebar.visible:not(.pushable):not(.overlay).right.wide+.pusher,.ui.sidebar.visible.uncover.pushable.right.wide+.pusher{margin-right:350px}.ui.sidebar.visible:not(.pushable):not(.overlay).right[class*='very thin']+.pusher,.ui.sidebar.visible.uncover.pushable.right[class*='very thin']+.pusher{margin-right:60px}.ui.sidebar.visible:not(.pushable):not(.overlay).right[class*='very wide']+.pusher,.ui.sidebar.visible.uncover.pushable.right[class*='very wide']+.pusher{margin-right:475px}.ui.sidebar.left{border-width:0;border-right-width:1px}.ui.sidebar.right{border-width:0;border-left-width:1px}.ui.sidebar.top{border-width:0;border-bottom-width:1px}.ui.sidebar.bottom{border-width:0;border-top-width:1px} - +body{min-height:unset !important;display:flex;flex-direction:column}body:not(.no-margin){padding:10px}body.no-margin>.ui.top.menu{border-top:0}body.no-margin>.ui.segment.pushable{border:0}body>.ui.segment.pushable.attached{display:flex;overflow:hidden;margin-bottom:0}body>.ui.segment.pushable>.pusher{overflow:auto;width:100%}.dashboard-body.ui.grid{margin:0}.dashboard-body.ui.grid .tab-content{padding-left:0;padding-right:0;width:100%}.ui.menu.dashboard-title{display:flex;justify-content:center;align-items:center;box-shadow:none;border-left-width:0;border-top-width:0;border-bottom-width:0;border-top-right-radius:0;border-bottom-right-radius:0;background:transparent}.dashboard-title.thin{width:150px}body.no-margin .dashboard-title.thin{width:calc(150px - 1px)}.dashboard-title{width:260px}body.no-margin .dashboard-title{width:calc(260px - 1px)}.dashboard-title.wide{width:350px}body.no-margin .dashboard-title.wide{width:calc(350px - 1px)}.dashboard-title[class*='very thin']{width:60px}body.no-margin .dashboard-title[class*='very thin']{width:calc(60px - 1px)}.dashboard-title[class*='very wide']{width:475px}body.no-margin .dashboard-title[class*='very wide']{width:calc(475px - 1px)}.ui.dashboard-title{background-color:rgba(255,255,255,0.9);color:rgba(0,0,0,0.87)}.ui.inverted.dashboard-title{color:rgba(255,255,255,0.9)}.ui.inverted.dashboard-title{background-color:#1B1C1D}.ui.inverted.red.dashboard-title{background-color:#DB2828}.ui.inverted.orange.dashboard-title{background-color:#F2711C}.ui.inverted.yellow.dashboard-title{background-color:#FBBD08}.ui.inverted.olive.dashboard-title{background-color:#B5CC18}.ui.inverted.green.dashboard-title{background-color:#21BA45}.ui.inverted.teal.dashboard-title{background-color:#00B5AD}.ui.inverted.blue.dashboard-title{background-color:#2185D0}.ui.inverted.violet.dashboard-title{background-color:#6435C9}.ui.inverted.purple.dashboard-title{background-color:#A333C8}.ui.inverted.pink.dashboard-title{background-color:#E03997}.ui.inverted.brown.dashboard-title{background-color:#A5673F}.ui.inverted.grey.dashboard-title{background-color:#767676}.ui.inverted.black.dashboard-title{background-color:#1B1C1D}.ui.top.menu.dashboard-header{justify-content:space-between}.ui.top.menu.dashboard-header h1,.ui.top.menu.dashboard-header h2,.ui.top.menu.dashboard-header h3,.ui.top.menu.dashboard-header h4,.ui.top.menu.dashboard-header h5,.ui.top.menu.dashboard-header h6{margin:0}.ui.top.menu.dashboard-header:after{content:none}.ui.top.menu.dashboard-header .logo{height:30px;margin:5px}.ui.top.menu.dashboard-header .header-part{display:flex;align-items:center}body.no-margin .ui.top.menu.dashboard-header{border-radius:0}.ui.sidebar~.pusher{transform:none !important;transition:margin-left .5s ease, margin-right .5s ease}.ui.sidebar.visible:not(.pushable):not(.overlay).left.thin+.pusher,.ui.sidebar.visible.uncover.pushable.left.thin+.pusher{margin-left:150px}.ui.sidebar.visible:not(.pushable):not(.overlay).left+.pusher,.ui.sidebar.visible.uncover.pushable.left+.pusher{margin-left:260px}.ui.sidebar.visible:not(.pushable):not(.overlay).left.wide+.pusher,.ui.sidebar.visible.uncover.pushable.left.wide+.pusher{margin-left:350px}.ui.sidebar.visible:not(.pushable):not(.overlay).left[class*='very thin']+.pusher,.ui.sidebar.visible.uncover.pushable.left[class*='very thin']+.pusher{margin-left:60px}.ui.sidebar.visible:not(.pushable):not(.overlay).left[class*='very wide']+.pusher,.ui.sidebar.visible.uncover.pushable.left[class*='very wide']+.pusher{margin-left:475px}.ui.sidebar.visible:not(.pushable):not(.overlay).right.thin+.pusher,.ui.sidebar.visible.uncover.pushable.right.thin+.pusher{margin-right:150px}.ui.sidebar.visible:not(.pushable):not(.overlay).right+.pusher,.ui.sidebar.visible.uncover.pushable.right+.pusher{margin-right:260px}.ui.sidebar.visible:not(.pushable):not(.overlay).right.wide+.pusher,.ui.sidebar.visible.uncover.pushable.right.wide+.pusher{margin-right:350px}.ui.sidebar.visible:not(.pushable):not(.overlay).right[class*='very thin']+.pusher,.ui.sidebar.visible.uncover.pushable.right[class*='very thin']+.pusher{margin-right:60px}.ui.sidebar.visible:not(.pushable):not(.overlay).right[class*='very wide']+.pusher,.ui.sidebar.visible.uncover.pushable.right[class*='very wide']+.pusher{margin-right:475px}.ui.sidebar.left{border-width:0;border-right-width:1px}.ui.sidebar.right{border-width:0;border-left-width:1px}.ui.sidebar.top{border-width:0;border-bottom-width:1px}.ui.sidebar.bottom{border-width:0;border-top-width:1px}.ui.sidebar .user-panel{min-height:65px;padding:13px 16px} diff --git a/inst/semantic.dashboard.min.js b/inst/semantic.dashboard.min.js index 81a0c97..1035d5f 100644 --- a/inst/semantic.dashboard.min.js +++ b/inst/semantic.dashboard.min.js @@ -1 +1 @@ -const initialize_sidebar=(t,i,e,n)=>{transitionLeftRight=e?"overlay":"uncover",$(document).ready((function(){let e;$(".ui.sidebar").sidebar({context:$(".bottom.segment"),closable:t,dimPage:n,defaultTransition:{computer:{left:transitionLeftRight,right:transitionLeftRight,top:"overlay",bottom:"overlay"},mobile:{left:transitionLeftRight,right:transitionLeftRight,top:"overlay",bottom:"overlay"}}}),$("#toggle_menu").click((function(){$(window).resize()})),i&&$(".ui.sidebar").sidebar("attach events","#toggle_menu"),$("#uisidebar .item").tab({onVisible:function(t){e&&$(this).trigger("hidden"),$(window).resize(),$(this).trigger("shown"),e=this,prefix="shiny-tab-",Shiny.setInputValue("uisidebar",this.id.substring(prefix.length),{priority:"event"})}})}))}; \ No newline at end of file +const initialize_sidebar=(i,t,e,n)=>{transitionLeftRight=e?"overlay":"uncover",$(document).on("shiny:sessioninitialized",(function(e){let o;$(".ui.sidebar").sidebar({context:$(".bottom.segment"),closable:i,dimPage:n,defaultTransition:{computer:{left:transitionLeftRight,right:transitionLeftRight,top:"overlay",bottom:"overlay"},mobile:{left:transitionLeftRight,right:transitionLeftRight,top:"overlay",bottom:"overlay"}}}),$("#toggle_menu").click((function(){$(window).resize()})),t&&$(".ui.sidebar").sidebar("attach events","#toggle_menu"),$("#uisidebar .item").tab({onVisible:function(i){o&&$(this).trigger("hidden"),$(window).resize(),$(this).trigger("shown"),o=this,prefix="shiny-tab-",Shiny.setInputValue("uisidebar",this.id.substring(prefix.length),{priority:"event"})}})}))}; \ No newline at end of file diff --git a/inst/updateTabItems.js b/inst/updateTabItems.js new file mode 100644 index 0000000..6fb382c --- /dev/null +++ b/inst/updateTabItems.js @@ -0,0 +1,6 @@ +/* update_tab_items */ +Shiny.addCustomMessageHandler('update_tab', + function(custom_tab) { + $(`#uisidebar [data-value='${custom_tab}']`).click(); + } +) diff --git a/man/dashboard_body.Rd b/man/dashboard_body.Rd index bc72d97..e1de383 100644 --- a/man/dashboard_body.Rd +++ b/man/dashboard_body.Rd @@ -12,7 +12,8 @@ dashboardBody(..., class = "") \arguments{ \item{...}{UI elements to include within the body.} -\item{class}{CSS class to be applied to the container of \code{dashboardBody}. Note it's not the \code{} tag.} +\item{class}{CSS class to be applied to the container of \code{dashboardBody}. Note it's not the +\code{} tag.} } \value{ A tab that can be passed to \code{\link[semantic.dashboard]{dashboardPage}} @@ -22,9 +23,10 @@ Create a body of a dashboard with tabs and other additional UI elements. } \section{Functions}{ \itemize{ -\item \code{dashboardBody}: Create a body of a dashboard (alias for \code{dashboard_body} for compatibility with \code{shinydashboard}) -}} +\item \code{dashboardBody()}: Create a body of a dashboard (alias for \code{dashboard_body} for +compatibility with \code{shinydashboard}) +}} \examples{ if(interactive()){ diff --git a/man/dashboard_header.Rd b/man/dashboard_header.Rd index 2a49d85..28ba5a3 100644 --- a/man/dashboard_header.Rd +++ b/man/dashboard_header.Rd @@ -42,22 +42,27 @@ dashboardHeader( \arguments{ \item{...}{UI elements to include within the header. They will be displayed on the right side.} -\item{left}{UI element to put on the left of the header. It will be placed after (to the right) the title and menu button (if they exist).} +\item{left}{UI element to put on the left of the header. It will be placed after (to the right) +the title and menu button (if they exist).} \item{center}{UI element to put in the center of the header.} -\item{right}{UI element to put to the right of the header. It will be placed before elements defined in \code{...} (if there are any).} +\item{right}{UI element to put to the right of the header. It will be placed before elements +defined in \code{...} (if there are any).} -\item{title}{Dashboard title to be displayed in the upper left corner. If NULL, will not display any title field. Use "" for an empty title.} +\item{title}{Dashboard title to be displayed in the upper left corner. If NULL, will not display +any title field. Use "" for an empty title.} -\item{titleWidth}{Title field width, one of \code{c(NULL, "very thin", "thin", "wide", "very wide")}} +\item{titleWidth}{Title field width, one of \code{c(NULL, "very thin", "thin", "wide", +"very wide")}} \item{logo_align}{Where should logo be placed. One of \code{c("left", "center")}} \item{logo_path}{Path or URL of the logo to be shown in the header.} -\item{color}{Color of the sidebar / text / icons (depending on the value of `inverted` parameter. \ -One of \code{c("", "red", "orange", "yellow", "olive", "green", "teal", "blue", "violet", "purple", "pink", "brown", "grey", "black")}} +\item{color}{Color of the sidebar / text / icons (depending on the value of `inverted` parameter. +One of \code{c("", "red", "orange", "yellow", "olive", "green", "teal", "blue", "violet", +"purple", "pink", "brown", "grey", "black")}} \item{inverted}{If FALSE sidebar will be white and text will be colored. \ If TRUE text will be white and background will be colored. Default is \code{FALSE}.} @@ -75,13 +80,15 @@ A header that can be passed to \code{\link[semantic.dashboard]{dashboardPage}} } \description{ Create a header of a dashboard with other additional UI elements. - Hint: use \code{shiny::tagList()} if you want to add multiple elements in \code{left} / \code{center} or \code{right}. + Hint: use \code{shiny::tagList()} if you want to add multiple elements in + \code{left} / \code{center} or \code{right}. } \section{Functions}{ \itemize{ -\item \code{dashboardHeader}: Create a header of a dashboard (alias for \code{dashboard_header} for compatibility with \code{shinydashboard}) -}} +\item \code{dashboardHeader()}: Create a header of a dashboard (alias for \code{dashboard_header} +for compatibility with \code{shinydashboard}) +}} \examples{ if(interactive()) { diff --git a/man/dashboard_page.Rd b/man/dashboard_page.Rd index 034b9bc..087a718 100644 --- a/man/dashboard_page.Rd +++ b/man/dashboard_page.Rd @@ -42,7 +42,8 @@ dashboardPage( FomanticUI and Bootstrap. For the time being it's better to suppress Bootstrap. If \code{TRUE} bootstrap dependency from \code{shiny} will be disabled.} -\item{theme}{Theme name or path. For possible options see \code{\link[shiny.semantic]{semanticPage}}.} +\item{theme}{Theme name or path. For possible options see +\code{\link[shiny.semantic]{semanticPage}}.} \item{margin}{If \code{TRUE}, margin to be applied to the whole dashboard. Defaults to \code{TRUE}.} @@ -56,13 +57,15 @@ Defaults to \code{TRUE}.} Dashboard. } \description{ -Create a page with menu item sidebar and body containing tabs and other additional elements. +Create a page with menu item sidebar and body containing tabs and other additional + elements. } \section{Functions}{ \itemize{ -\item \code{dashboardPage}: Create a dashboard (alias for \code{dashboard_page} for compatibility with \code{shinydashboard}) -}} +\item \code{dashboardPage()}: Create a dashboard (alias for \code{dashboard_page} for compatibility +with \code{shinydashboard}) +}} \examples{ if(interactive()){ diff --git a/man/dashboard_sidebar.Rd b/man/dashboard_sidebar.Rd index 24aab97..5498048 100644 --- a/man/dashboard_sidebar.Rd +++ b/man/dashboard_sidebar.Rd @@ -44,13 +44,15 @@ dashboardSidebar( \item{size}{Size of the sidebar. One of \code{c("", "thin", "very thin", "wide", "very wide")}} -\item{color}{Color of the sidebar / text / icons (depending on the value of `inverted` parameter. \ -One of \code{c("", "red", "orange", "yellow", "olive", "green", "teal", "blue", "violet", "purple", "pink", "brown", "grey", "black")}} +\item{color}{Color of the sidebar / text / icons (depending on the value of `inverted` +parameter. One of \code{c("", "red", "orange", "yellow", "olive", "green", "teal", "blue", +"violet","purple", "pink", "brown", "grey", "black")}} \item{inverted}{If FALSE sidebar will be white and text will be colored. \ If TRUE text will be white and background will be colored. Default is \code{FALSE}.} -\item{closable}{If \code{TRUE} allow close sidebar by clicking in the body. Default to \code{FALSE}} +\item{closable}{If \code{TRUE} allow close sidebar by clicking in the body. Default to +\code{FALSE}} \item{pushable}{If \code{TRUE} the menu button is active. Default to \code{TRUE}} @@ -60,10 +62,12 @@ If TRUE text will be white and background will be colored. Default is \code{FALS \item{disable}{If \code{TRUE}, don't display the sidebar.} -\item{overlay}{If \code{TRUE}, opened sidebar will cover the tab content. Otherwise it is displayed next to the content. -Relevant only for sidebar positioned on left or right. Default to \code{FALSE}} +\item{overlay}{If \code{TRUE}, opened sidebar will cover the tab content. Otherwise it is +displayed next to the content. Relevant only for sidebar positioned on left or right. Default +to \code{FALSE}} -\item{dim_page}{If \code{TRUE}, page content will be darkened when sidebr is open. Default to \code{FALSE}} +\item{dim_page}{If \code{TRUE}, page content will be darkened when sidebr is open. Default to +\code{FALSE}} \item{class}{CSS class to be applied to the container of \code{dashboardSidebar}.} } @@ -71,13 +75,15 @@ Relevant only for sidebar positioned on left or right. Default to \code{FALSE}} A sidebar that can be passed to \code{\link[semantic.dashboard]{dashboardPage}} } \description{ -Create a pushable sidebar of a dashboard with menu items and other additional UI elements. +Create a pushable sidebar of a dashboard with menu items and other additional UI + elements. } \section{Functions}{ \itemize{ -\item \code{dashboardSidebar}: Create a sidebar of a dashboard (alias for \code{dashboard_sidebar} for compatibility with \code{shinydashboard}) -}} +\item \code{dashboardSidebar()}: Create a sidebar of a dashboard (alias for \code{dashboard_sidebar} +for compatibility with \code{shinydashboard}) +}} \examples{ if(interactive()){ diff --git a/man/dropdown_menu.Rd b/man/dropdown_menu.Rd index 74689a6..2ded4bf 100644 --- a/man/dropdown_menu.Rd +++ b/man/dropdown_menu.Rd @@ -14,7 +14,7 @@ dropdownMenu(..., type = "messages", icon = NULL, show_counter = TRUE) \item{type}{Type of the displayed items.} -\item{icon}{Icon of the dropdown menu. If not specyfied created based on \code{type} agrument.} +\item{icon}{Icon of the dropdown menu. If not specified created based on \code{type} argument.} \item{show_counter}{If true circular label with counter is going to be shown for dropdown.} } @@ -26,9 +26,10 @@ Create a dropdown menu with additional UI elements. } \section{Functions}{ \itemize{ -\item \code{dropdownMenu}: Create a dropdown menu (alias for \code{dropdown_menu} for compatibility with \code{shinydashboard}) -}} +\item \code{dropdownMenu()}: Create a dropdown menu (alias for \code{dropdown_menu} for +compatibility with \code{shinydashboard}) +}} \examples{ dropdownMenu(icon = icon("warning sign"), taskItem("Project progress...", 50.777, color = "red")) dropdownMenu(type = "notifications", notificationItem("This is notification!", color = "red")) diff --git a/man/dropdown_menu_output.Rd b/man/dropdown_menu_output.Rd index c8679a4..8fb4dd3 100644 --- a/man/dropdown_menu_output.Rd +++ b/man/dropdown_menu_output.Rd @@ -20,9 +20,10 @@ UI-side function for dynamic dropdownMenu. } \section{Functions}{ \itemize{ -\item \code{dropdownMenuOutput}: Create a dropdown menu output (alias for \code{dropdown_menu_output} for compatibility with \code{shinydashboard}) -}} +\item \code{dropdownMenuOutput()}: Create a dropdown menu output (alias for \code{dropdown_menu +output} for compatibility with \code{shinydashboard}) +}} \examples{ \dontrun{ dropdownMenuOutput("dropdown") diff --git a/man/figures/hexsticker.png b/man/figures/hexsticker.png index 746f56c..d38e7cd 100644 Binary files a/man/figures/hexsticker.png and b/man/figures/hexsticker.png differ diff --git a/man/get_dashboard_dependencies.Rd b/man/get_dashboard_dependencies.Rd index 2a2cb88..e975cb0 100644 --- a/man/get_dashboard_dependencies.Rd +++ b/man/get_dashboard_dependencies.Rd @@ -10,5 +10,7 @@ get_dashboard_dependencies() semantic.dashboard dependencies } \description{ -To add dependencies in the future follow the \code{\link[htmltools]{htmlDependency}} help. +To add dependencies in the future follow the \code{\link[htmltools]{htmlDependency}} + help. } +\keyword{internal} diff --git a/man/icon.Rd b/man/icon.Rd index 3ce6de7..54df05b 100644 --- a/man/icon.Rd +++ b/man/icon.Rd @@ -7,7 +7,8 @@ icon(type, ...) } \arguments{ -\item{type}{A name of an icon. Look at http://semantic-ui.com/elements/icon.html for all possibilities.} +\item{type}{A name of an icon. Look at http://semantic-ui.com/elements/icon.html for all +possibilities.} \item{...}{Other arguments to be added as attributes of the tag (e.g. style, class etc.)} } diff --git a/man/menu_item.Rd b/man/menu_item.Rd index 3b92fc6..a668bd3 100644 --- a/man/menu_item.Rd +++ b/man/menu_item.Rd @@ -6,11 +6,35 @@ \alias{menuSubItem} \title{Create a menu item.} \usage{ -menu_item(text, ..., icon = NULL, tabName = NULL, href = NULL, newtab = TRUE) +menu_item( + text, + ..., + icon = NULL, + tabName = NULL, + href = NULL, + newtab = TRUE, + selected = FALSE +) -menuItem(text, ..., icon = NULL, tabName = NULL, href = NULL, newtab = TRUE) +menuItem( + text, + ..., + icon = NULL, + tabName = NULL, + href = NULL, + newtab = TRUE, + selected = FALSE +) -menuSubItem(text, ..., icon = NULL, tabName = NULL, href = NULL, newtab = TRUE) +menuSubItem( + text, + ..., + icon = NULL, + tabName = NULL, + href = NULL, + newtab = TRUE, + selected = FALSE +) } \arguments{ \item{text}{Text to show for the menu item.} @@ -24,6 +48,8 @@ menuSubItem(text, ..., icon = NULL, tabName = NULL, href = NULL, newtab = TRUE) \item{href}{A link address. Not compatible with tabName.} \item{newtab}{If href is supplied, should the link open in a new browser tab?} + +\item{selected}{If TRUE, this menuItem will start selected.} } \value{ A menu item that can be passed \code{\link[semantic.dashboard]{sidebarMenu}} @@ -33,11 +59,13 @@ Create a menu item corresponding to a tab. } \section{Functions}{ \itemize{ -\item \code{menuItem}: Create a menu item (alias for \code{manu_item} for compatibility with \code{shinydashboard}) +\item \code{menuItem()}: Create a menu item (alias for \code{menu_item} for compatibility with +\code{shinydashboard}) -\item \code{menuSubItem}: Create a menu item (alias for \code{manu_item} for compatibility with \code{shinydashboard}) -}} +\item \code{menuSubItem()}: Create a menu item (alias for \code{menu_item} for compatibility with +\code{shinydashboard}) +}} \examples{ menuItem(tabName = "plot_tab", text = "My plot", icon = icon("home")) } diff --git a/man/menu_item_output.Rd b/man/menu_item_output.Rd index a269a62..7e1ae8c 100644 --- a/man/menu_item_output.Rd +++ b/man/menu_item_output.Rd @@ -20,6 +20,7 @@ UI-side function for dynamic manuItem. } \section{Functions}{ \itemize{ -\item \code{menuItemOutput}: Create a menu item output (alias for \code{menu_item_output} for compatibility with \code{shinydashboard}) -}} +\item \code{menuItemOutput()}: Create a menu item output (alias for \code{menu_item_output} for +compatibility with \code{shinydashboard}) +}} diff --git a/man/message_item.Rd b/man/message_item.Rd index 4680710..99eb5d0 100644 --- a/man/message_item.Rd +++ b/man/message_item.Rd @@ -26,9 +26,10 @@ Create a message item. } \section{Functions}{ \itemize{ -\item \code{messageItem}: Create a message item (alias for \code{message_item} for compatibility with \code{shinydashboard}) -}} +\item \code{messageItem()}: Create a message item (alias for \code{message_item} for compatibility +with \code{shinydashboard}) +}} \examples{ messageItem("Marek", "Another test!", icon = "warning") } diff --git a/man/notification_item.Rd b/man/notification_item.Rd index b7c74ed..7379543 100644 --- a/man/notification_item.Rd +++ b/man/notification_item.Rd @@ -26,9 +26,10 @@ Create a notification item. } \section{Functions}{ \itemize{ -\item \code{notificationItem}: Create a notification item (alias for \code{notification_item} for compatibility with \code{shinydashboard}) -}} +\item \code{notificationItem()}: Create a notification item (alias for \code{notification_item} for +compatibility with \code{shinydashboard}) +}} \examples{ notificationItem("This is notification!", color = "red") } diff --git a/man/render_dropdown_menu.Rd b/man/render_dropdown_menu.Rd index a879f43..ee30c8a 100644 --- a/man/render_dropdown_menu.Rd +++ b/man/render_dropdown_menu.Rd @@ -14,7 +14,8 @@ renderDropdownMenu(expr, env = parent.frame(), quoted = FALSE) \item{env}{The environment in which to evaluate expr.} -\item{quoted}{Is expr a quoted expression (with \code{quote()})? This is useful if you want to save an expression in a variable.} +\item{quoted}{Is expr a quoted expression (with \code{quote()})? This is useful if you want to +save an expression in a variable.} } \value{ A dynamic dropdown menu that can be assigned to output. @@ -24,9 +25,10 @@ Server-side function for dynamic dropdownMenu. } \section{Functions}{ \itemize{ -\item \code{renderDropdownMenu}: Create a dropdown menu output (alias for \code{render_dropdown_menu} for compatibility with \code{shinydashboard}) -}} +\item \code{renderDropdownMenu()}: Create a dropdown menu output (alias for \code{render_dropdown +menu} for compatibility with \code{shinydashboard}) +}} \examples{ \dontrun{ dropdownMenuOutput("dropdown") diff --git a/man/render_menu.Rd b/man/render_menu.Rd index 49fdc7f..dd7093e 100644 --- a/man/render_menu.Rd +++ b/man/render_menu.Rd @@ -14,7 +14,8 @@ renderMenu(expr, env = parent.frame(), quoted = FALSE) \item{env}{The environment in which to evaluate expr.} -\item{quoted}{Is expr a quoted expression (with \code{quote()})? This is useful if you want to save an expression in a variable.} +\item{quoted}{Is expr a quoted expression (with \code{quote()})? This is useful if you want to +save an expression in a variable.} } \value{ A dynamic menu that can be assigned to output. @@ -24,6 +25,7 @@ Server-side function for dynamic sidebarMenu. } \section{Functions}{ \itemize{ -\item \code{renderMenu}: Create a menu output (alias for \code{render_menu} for compatibility with \code{shinydashboard}) -}} +\item \code{renderMenu()}: Create a menu output (alias for \code{render_menu} for compatibility +with \code{shinydashboard}) +}} diff --git a/man/render_value_box.Rd b/man/render_value_box.Rd index 8375a4a..202c98e 100644 --- a/man/render_value_box.Rd +++ b/man/render_value_box.Rd @@ -28,11 +28,11 @@ Server-side function for dynamic valueBox. } \section{Functions}{ \itemize{ -\item \code{renderValueBox}: Create a value box output (alias for \code{render_value_box}) +\item \code{renderValueBox()}: Create a value box output (alias for \code{render_value_box}) -\item \code{renderInfoBox}: Create a value box output (alias for \code{render_value_box}) -}} +\item \code{renderInfoBox()}: Create a value box output (alias for \code{render_value_box}) +}} \examples{ \dontrun{ valueBoxOutput("value_box") diff --git a/man/semantic.dashboard.Rd b/man/semantic.dashboard.Rd index 91726f9..eecaa1c 100644 --- a/man/semantic.dashboard.Rd +++ b/man/semantic.dashboard.Rd @@ -6,3 +6,4 @@ \description{ semantic.dashboard } +\keyword{internal} diff --git a/man/sidebar_menu.Rd b/man/sidebar_menu.Rd index 2225388..b96e5b6 100644 --- a/man/sidebar_menu.Rd +++ b/man/sidebar_menu.Rd @@ -5,14 +5,12 @@ \alias{sidebarMenu} \title{Create a sidebar menu.} \usage{ -sidebar_menu(..., id = "uisidebar") +sidebar_menu(...) -sidebarMenu(..., id = "uisidebar") +sidebarMenu(...) } \arguments{ \item{...}{Menu items.} - -\item{id}{The sidebar id class also used for update input on server side. Default is \code{uisidebar}} } \value{ A sidebar menu that can be passed \code{\link[semantic.dashboard]{dashboardSidebar}} @@ -20,14 +18,18 @@ A sidebar menu that can be passed \code{\link[semantic.dashboard]{dashboardSideb \description{ Create a sidebar menu with menu items. } +\details{ +It's possible to set selected menu item by setting `selected = TRUE` in `menuItem`. +} \section{Functions}{ \itemize{ -\item \code{sidebarMenu}: Create a sidebar menu (alias for \code{sidebar_menu} for compatibility with \code{shinydashboard}) -}} +\item \code{sidebarMenu()}: Create a sidebar menu (alias for \code{sidebar_menu} for compatibility +with \code{shinydashboard}) +}} \examples{ sidebarMenu( menuItem(tabName = "plot_tab", text = "My plot", icon = icon("home")), - menuItem(tabName = "table_tab", text = "My table", icon = icon("smile")) - ) + menuItem(tabName = "table_tab", text = "My table", icon = icon("smile"), selected = TRUE) +) } diff --git a/man/sidebar_menu_output.Rd b/man/sidebar_menu_output.Rd index 47de9fc..b550e6c 100644 --- a/man/sidebar_menu_output.Rd +++ b/man/sidebar_menu_output.Rd @@ -20,6 +20,7 @@ UI-side function for dynamic sidebarMenu. } \section{Functions}{ \itemize{ -\item \code{sidebarMenuOutput}: Create a sidebar menu output (alias for \code{sidebar_menu_output} for compatibility with \code{shinydashboard}) -}} +\item \code{sidebarMenuOutput()}: Create a sidebar menu output (alias for \code{sidebar_menu +output} for compatibility with \code{shinydashboard}) +}} diff --git a/man/sidebar_user_panel.Rd b/man/sidebar_user_panel.Rd new file mode 100644 index 0000000..6107903 --- /dev/null +++ b/man/sidebar_user_panel.Rd @@ -0,0 +1,79 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/menu_item.R +\name{sidebar_user_panel} +\alias{sidebar_user_panel} +\alias{sidebarUserPanel} +\title{Create a user panel} +\usage{ +sidebar_user_panel(name, subtitle = NULL, image = NULL, image_size = "tiny") + +sidebarUserPanel(name, subtitle = NULL, image = NULL, image_size = "tiny") +} +\arguments{ +\item{name}{Name of the user} + +\item{subtitle}{Information to be displayed below the name (for example +if the user is online)} + +\item{image}{Path to an image. This can be a relative link to an existing +`www/` directory, or an URL to an image} + +\item{image_size}{CSS class to display the image, see Semantic documentation +for all sizes (goes from `mini` to `massive`)} +} +\value{ +A div tag with the user panel +} +\description{ +This creates an user panel using Semantic UI styles. +} +\section{Functions}{ +\itemize{ +\item \code{sidebarUserPanel()}: Create a sidebar user panel (alias for +\code{sidebar_user_panel} for compatibility with \code{shinydashboard}) + +}} +\examples{ +sidebarUserPanel( + "Some Name", + subtitle = shiny::a(href = "#", icon("circle"), "Online"), + # Image file should be in www/ subdir + # or a link to a image + image = "some_image_located_inside_www_dir.jpg", + image_size = "mini" +) + +ui_user <- sidebarUserPanel( + "Jane Smith", + subtitle = shiny::a(href = "#", icon("circle"), "Online"), + # Image file should be in www/ subdir + # or a link to a image + image = base::system.file( + file.path('examples', "www", "jane_smith.jpg"), + package = "semantic.dashboard" + ), + image_size = "mini" +) + +if (interactive()) { + ui <- dashboardPage( + dashboardHeader(), + dashboardSidebar( + ui_user, + sidebarMenu( + menuItem("Tab 1", tabName = "tab1"), + menuItem("Tab 2", tabName = "tab2") + ) + ), + body = dashboardBody( + tabItems( + tabItem(tabName = "tab1", h2("Tab 1")), + tabItem(tabName = "tab2", h2("Tab 2")) + ) + ) + ) + + server <- function(input, output, session) {} + shinyApp(ui, server) +} +} diff --git a/man/tab_box.Rd b/man/tab_box.Rd index d99425b..13d74ff 100644 --- a/man/tab_box.Rd +++ b/man/tab_box.Rd @@ -59,9 +59,10 @@ Create a tab box with additional UI elements. } \section{Functions}{ \itemize{ -\item \code{tabBox}: Create a tab box (alias for \code{tab_box} for compatibility with \code{shinydashboard}) -}} +\item \code{tabBox()}: Create a tab box (alias for \code{tab_box} for compatibility with +\code{shinydashboard}) +}} \examples{ tabBox(title = "Sample tab box", color = "blue", width = 5, tabs = list( diff --git a/man/tab_item.Rd b/man/tab_item.Rd index 7613b11..96dd9cc 100644 --- a/man/tab_item.Rd +++ b/man/tab_item.Rd @@ -14,7 +14,8 @@ tabItem(tabName, ..., fluid = TRUE) \item{...}{UI elements to include within the tab.} -\item{fluid}{Controls whether tab width should be 100\% (TRUE) or limited by Foomantic UI breakpoints (FALSE).} +\item{fluid}{Controls whether tab width should be 100\% (TRUE) or limited by Foomantic UI +breakpoints (FALSE).} } \value{ A tab that can be passed to \code{\link[semantic.dashboard]{dashboardBody}} @@ -24,9 +25,10 @@ Create a tab panel with additional UI elements. } \section{Functions}{ \itemize{ -\item \code{tabItem}: Create a tab (alias for \code{tab_item} for compatibility with \code{shinydashboard}) -}} +\item \code{tabItem()}: Create a tab (alias for \code{tab_item} for compatibility with +\code{shinydashboard}) +}} \examples{ tab_item(tabName = "tab1", "Tab 1") } diff --git a/man/tab_items.Rd b/man/tab_items.Rd index 8514414..cccdc87 100644 --- a/man/tab_items.Rd +++ b/man/tab_items.Rd @@ -5,14 +5,12 @@ \alias{tabItems} \title{Create a panel with tabs.} \usage{ -tab_items(..., selected = 1) +tab_items(...) -tabItems(..., selected = 1) +tabItems(...) } \arguments{ \item{...}{Tabs.} - -\item{selected}{Which tab should be active on start.} } \value{ A panel with tabs that can be passed to \code{\link[semantic.dashboard]{dashboardBody}} @@ -22,9 +20,10 @@ Create a panel with tabs. } \section{Functions}{ \itemize{ -\item \code{tabItems}: Create a panel with tabs (alias for \code{tab_items} for compatibility with \code{shinydashboard}) -}} +\item \code{tabItems()}: Create a panel with tabs (alias for \code{tab_items} for compatibility +with \code{shinydashboard}) +}} \examples{ tabItems( tabItem(tabName = "tab1", "Tab 1"), diff --git a/man/task_item.Rd b/man/task_item.Rd index 9fb4b7e..60fe9b9 100644 --- a/man/task_item.Rd +++ b/man/task_item.Rd @@ -26,9 +26,10 @@ Create a task item. } \section{Functions}{ \itemize{ -\item \code{taskItem}: Create a task item (alias for \code{taks_item} for compatibility with \code{shinydashboard}) -}} +\item \code{taskItem()}: Create a task item (alias for \code{taks_item} for compatibility with +\code{shinydashboard}) +}} \examples{ taskItem("Project progress...", 50.777, color = "red") } diff --git a/man/update_tab_items.Rd b/man/update_tab_items.Rd new file mode 100644 index 0000000..875b2ef --- /dev/null +++ b/man/update_tab_items.Rd @@ -0,0 +1,49 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/menu_item.R +\name{update_tab_items} +\alias{update_tab_items} +\alias{updateTabItems} +\title{Change the selected tab on the client} +\usage{ +update_tab_items(session = shiny::getDefaultReactiveDomain(), tab) + +updateTabItems(session = shiny::getDefaultReactiveDomain(), tab) +} +\arguments{ +\item{session}{The session object passed to function given to shinyServer} + +\item{tab}{The name of the tab that should be selected} +} +\description{ +Change the selected tab on the client +} +\section{Functions}{ +\itemize{ +\item \code{updateTabItems()}: Change the selected item on the client (alias for +\code{update_tab_items} for compatibility with \code{shinydashboard}) + +}} +\examples{ +if (interactive()) { + ui <- dashboardPage( + dashboardSidebar( + sidebarMenu( + menuItem("Tab 1", tabName = "tab1"), + menuItem("Tab 2", tabName = "tab2") + ) + ), + dashboardBody( + tabItems( + tabItem(tabName = "tab1", h2("Tab 1")), + tabItem(tabName = "tab2", h2("Tab 2")) + ) + ) + ) + + server <- function(input, output, session) { + update_tab_items(tab = "tab2") + } + + shinyApp(ui, server) +} +} diff --git a/man/validate_tab_name.Rd b/man/validate_tab_name.Rd index 17eca2f..61aa3f8 100644 --- a/man/validate_tab_name.Rd +++ b/man/validate_tab_name.Rd @@ -12,3 +12,4 @@ validate_tab_name(name) \description{ Valid tab name should not containt dot character '.'. } +\keyword{internal} diff --git a/man/value_box.Rd b/man/value_box.Rd index de74d62..fcb6771 100644 --- a/man/value_box.Rd +++ b/man/value_box.Rd @@ -35,11 +35,11 @@ Create a valueBox with additional UI elements. } \section{Functions}{ \itemize{ -\item \code{valueBox}: Create a valueBox (alias for \code{value_box}) +\item \code{valueBox()}: Create a valueBox (alias for \code{value_box}) -\item \code{infoBox}: Create a valueBox (alias for \code{value_box}) -}} +\item \code{infoBox()}: Create a valueBox (alias for \code{value_box}) +}} \examples{ valueBox("Unread Mail", 44, icon("mail"), color = "blue", width = 5, size = "tiny") } diff --git a/man/value_box_output.Rd b/man/value_box_output.Rd index 1631b57..36147dd 100644 --- a/man/value_box_output.Rd +++ b/man/value_box_output.Rd @@ -25,11 +25,11 @@ UI-side function for dynamic valueBox. } \section{Functions}{ \itemize{ -\item \code{valueBoxOutput}: Create a valueBox output (alias for \code{value_box_output}) +\item \code{valueBoxOutput()}: Create a valueBox output (alias for \code{value_box_output}) -\item \code{infoBoxOutput}: Create a valueBox output (alias for \code{value_box_output}) -}} +\item \code{infoBoxOutput()}: Create a valueBox output (alias for \code{value_box_output}) +}} \examples{ \dontrun{ valueBoxOutput("value_box") diff --git a/_pkgdown.yml b/pkgdown/_pkgdown.yml similarity index 65% rename from _pkgdown.yml rename to pkgdown/_pkgdown.yml index 8709ff4..d5e1bec 100644 --- a/_pkgdown.yml +++ b/pkgdown/_pkgdown.yml @@ -1,10 +1,32 @@ -title: SHINY.SEMANTIC +title: semantic.dashboard template: - params: - bootswatch: yeti + bootstrap: 5 + bootswatch: pulse + bslib: + pkgdown-nav-height: 100px + includes: + in_header: | + + + + + + + +url: https://appsilon.github.io/semantic.dashboard/ navbar: - type: inverse + bg: primary left: - icon: fa-home href: index.html @@ -12,13 +34,13 @@ navbar: - icon: fa-university text: "Tutorials" href: articles/index.html - right: - icon: fa-file-code-o text: "Reference" href: reference/index.html - icon: fa-newspaper-o text: "Changes" href: CHANGELOG.html + right: - icon: fa-github fa-lg href: https://github.com/Appsilon/semantic.dashboard - icon: fa-twitter fa-lg @@ -52,6 +74,7 @@ reference: - title: Other UI elements desc: All functions that generate UI elements. contents: + - '`icon`' - '`infoBox`' - '`infoBoxOutput`' - '`menuItem`' @@ -73,6 +96,8 @@ reference: - '`sidebar_menu`' - '`sidebarMenuOutput`' - '`sidebar_menu_output`' + - '`sidebarUserPanel`' + - '`sidebar_user_panel`' - '`tabBox`' - '`tab_box`' - '`tabItem`' @@ -92,3 +117,7 @@ reference: contents: - '`light_semantic_palette`' - '`semantic_palette`' + +- title: Other + contents: + - '`update_tab_items`' diff --git a/pkgdown/extra.css b/pkgdown/extra.css new file mode 100644 index 0000000..f9827f7 --- /dev/null +++ b/pkgdown/extra.css @@ -0,0 +1,58 @@ +:root { + --primary-color: #4AB76C; +} + +.navbar { + background-color: var(--primary-color) !important; +} + + +#navbar > ul.navbar-nav > li.nav-item > a { + color: rgba(255, 255, 255, 0.55); +} + +.navbar-dark .navbar-nav .active > .nav-link { + background-color: var(--primary-color) !important; + color: #fff !important; +} + +.navbar-brand { + color: #fff !important; +} + +#navbar > ul.navbar-nav > li.nav-item a:hover { + background-color: var(--primary-color) !important; +} + +.navbar-dark input[type="search"] { + background-color: #fff !important; + color: #444 !important; +} + +nav .text-muted { + color: #d8d8d8 !important; +} + +a { + color: var(--primary-color); +} + +a:hover { + color: #2c2b2b; +} + +button.btn.btn-primary.btn-copy-ex { + background-color: var(--primary-color); + border-color: var(--primary-color); +} + +.home { + left: 0px; + position: absolute; + padding: 8px 30px; + color: rgba(255,255,255,0.55); +} + +.home:hover { + color: rgba(255,255,255,0.9); +} diff --git a/pkgdown/favicon/favicon-16x16.png b/pkgdown/favicon/favicon-16x16.png new file mode 100644 index 0000000..fd703e7 Binary files /dev/null and b/pkgdown/favicon/favicon-16x16.png differ diff --git a/pkgdown/favicon/favicon-32x32.png b/pkgdown/favicon/favicon-32x32.png new file mode 100644 index 0000000..59c6d2a Binary files /dev/null and b/pkgdown/favicon/favicon-32x32.png differ diff --git a/pkgdown/favicon/favicon.ico b/pkgdown/favicon/favicon.ico new file mode 100644 index 0000000..6982931 Binary files /dev/null and b/pkgdown/favicon/favicon.ico differ diff --git a/srcjs/sidebar.js b/srcjs/sidebar.js index c333c4c..05d6af1 100644 --- a/srcjs/sidebar.js +++ b/srcjs/sidebar.js @@ -3,7 +3,7 @@ */ const initialize_sidebar = (closable, pushable, overlay, dimPage) => { transitionLeftRight = overlay ? 'overlay' : 'uncover'; - $(document).ready(function() { + $(document).on('shiny:sessioninitialized', function(event) { $('.ui.sidebar') .sidebar({ context: $('.bottom.segment'), diff --git a/styles/generate_css.R b/styles/generate_css.R index f029363..534f0af 100644 --- a/styles/generate_css.R +++ b/styles/generate_css.R @@ -2,12 +2,12 @@ sass::sass( sass::sass_file("styles/main.scss"), options = sass::sass_options(output_style = "compressed"), output = "inst/semantic.dashboard.min.css", - cache_options = sass::sass_cache_options(FALSE) + cache = FALSE ) sass::sass( sass::sass_file("styles/main.scss"), options = sass::sass_options(output_style = "expanded"), output = "inst/semantic.dashboard.css", - cache_options = sass::sass_cache_options(FALSE) + cache = FALSE ) diff --git a/styles/layout/_sidebar.scss b/styles/layout/_sidebar.scss index 2c3e445..baa9637 100644 --- a/styles/layout/_sidebar.scss +++ b/styles/layout/_sidebar.scss @@ -24,3 +24,8 @@ $opposite-sides: ("left": "right", "right": "left", "top": "bottom", "bottom": " border-#{$opposide-side}-width: 1px; } } + +.ui.sidebar .user-panel{ + min-height: 65px; + padding: 13px 16px; +} diff --git a/tests/testthat/test-lintr.R b/tests/testthat/test-lintr.R deleted file mode 100644 index e13eef5..0000000 --- a/tests/testthat/test-lintr.R +++ /dev/null @@ -1,10 +0,0 @@ -context("lintr") - -test_that("lintr", { - print(getwd()) - lintr::expect_lint_free( - path = "../../00_pkg_src/semantic.dashboard", - relative_path = TRUE, - lintr::line_length_linter(150) - ) -}) diff --git a/tests/testthat/test-names.R b/tests/testthat/test-names.R index 06c0358..dc72b3c 100644 --- a/tests/testthat/test-names.R +++ b/tests/testthat/test-names.R @@ -2,11 +2,14 @@ library(semantic.dashboard) library(shinydashboard) context("Function names") -test_that("All functions from shinydashboard are implemented except functions known to be missing", { - to_be_implemented <- c("menuItemOutput", "menuSubItem", "renderMenu", "sidebarMenuOutput", - "sidebarSearchForm", "sidebarUserPanel", "updateTabItems") - not_implemented <- setdiff(setdiff(ls("package:shinydashboard"), ls("package:semantic.dashboard")), - to_be_implemented) +test_that("All functions from shinydashboard are implemented except functions known to be missing", { # nolint: line_length_linter + to_be_implemented <- c( + "menuItemOutput", "menuSubItem", "renderMenu", "sidebarMenuOutput", + "sidebarSearchForm", "updateTabItems" + ) + not_implemented <- setdiff( + setdiff(ls("package:shinydashboard"), ls("package:semantic.dashboard")), + to_be_implemented + ) expect_equal(length(not_implemented), 0) -} -) +}) diff --git a/tests/testthat/test-utils.R b/tests/testthat/test-utils.R index eaf179c..155b03b 100644 --- a/tests/testthat/test-utils.R +++ b/tests/testthat/test-utils.R @@ -31,3 +31,7 @@ test_that("test random_id_generator", { expect_true(nchar(random_id_generator(id_length = 3)) == 3) }) +test_that("validate_session_object", { + session <- character(1) + expect_error(validate_session_object(session)) +}) diff --git a/tests/testthat/test-value_box.R b/tests/testthat/test-value_box.R index 150b479..58691cd 100644 --- a/tests/testthat/test-value_box.R +++ b/tests/testthat/test-value_box.R @@ -75,4 +75,3 @@ test_that("equivalence of valueBoxOutput and infoBoxOutput", { expect_equal(si_str3, si_str2) expect_equal(si_str1, si_str3) }) - diff --git a/tools/package-lock.json b/tools/package-lock.json index aff25c6..ae91261 100644 --- a/tools/package-lock.json +++ b/tools/package-lock.json @@ -28,6 +28,55 @@ "js-tokens": "^4.0.0" } }, + "@jridgewell/gen-mapping": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "dev": true, + "requires": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "dev": true + }, + "@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "dev": true + }, + "@jridgewell/source-map": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz", + "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", + "dev": true, + "requires": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "dev": true + }, + "@jridgewell/trace-mapping": { + "version": "0.3.14", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.14.tgz", + "integrity": "sha512-bJWEfQ9lPTvm3SneWwRFVLzrh6nhjwqw7TUFFBEMzwvg7t7PCDenf2lDwqo4NQXzdpgBXyFgDWnQA+2vkruksQ==", + "dev": true, + "requires": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, "acorn": { "version": "7.4.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", @@ -734,13 +783,21 @@ "dev": true }, "copy-props": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/copy-props/-/copy-props-2.0.4.tgz", - "integrity": "sha512-7cjuUME+p+S3HZlbllgsn2CDwS+5eCCX16qBgNC4jgSTf49qR1VKy/Zhl400m0IQXl/bPGEVqncgUUMjrr4s8A==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/copy-props/-/copy-props-2.0.5.tgz", + "integrity": "sha512-XBlx8HSqrT0ObQwmSzM7WE5k8FxTV75h1DX1Z3n6NhQ/UYYAvInWYmG06vFt7hQZArE2fuO62aihiWIVQwh1sw==", "dev": true, "requires": { - "each-props": "^1.3.0", - "is-plain-object": "^2.0.1" + "each-props": "^1.3.2", + "is-plain-object": "^5.0.0" + }, + "dependencies": { + "is-plain-object": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", + "dev": true + } } }, "core-util-is": { @@ -788,9 +845,9 @@ "dev": true }, "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", + "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", "dev": true }, "deep-is": { @@ -1942,9 +1999,9 @@ } }, "hosted-git-info": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", - "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", "dev": true }, "iconv-lite": { @@ -2457,9 +2514,9 @@ } }, "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, "make-iterator": { @@ -2549,18 +2606,18 @@ "dev": true }, "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", "dev": true }, "mixin-deep": { @@ -3499,24 +3556,6 @@ "urix": "^0.1.0" } }, - "source-map-support": { - "version": "0.5.19", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", - "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, "source-map-url": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", @@ -3731,21 +3770,38 @@ } }, "terser": { - "version": "5.5.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.5.1.tgz", - "integrity": "sha512-6VGWZNVP2KTUcltUQJ25TtNjx/XgdDsBDKGt8nN0MpydU36LmbPPcMBd2kmtZNNGVVDLg44k7GKeHHj+4zPIBQ==", + "version": "5.14.2", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.14.2.tgz", + "integrity": "sha512-oL0rGeM/WFQCUd0y2QrWxYnq7tfSuKBiqTjRPWrRgB46WD/kiwHwF8T23z78H6Q6kGCuuHcPB+KULHRdxvVGQA==", "dev": true, "requires": { + "@jridgewell/source-map": "^0.3.2", + "acorn": "^8.5.0", "commander": "^2.20.0", - "source-map": "~0.7.2", - "source-map-support": "~0.5.19" + "source-map-support": "~0.5.20" }, "dependencies": { + "acorn": { + "version": "8.7.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", + "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==", + "dev": true + }, "source-map": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", - "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true + }, + "source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } } } }, @@ -4179,9 +4235,9 @@ "dev": true }, "yargs": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.1.tgz", - "integrity": "sha512-huO4Fr1f9PmiJJdll5kwoS2e4GqzGSsMT3PPMpOwoVkOK8ckqAewMTZyA6LXVQWflleb/Z8oPBEvNsMft0XE+g==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.2.tgz", + "integrity": "sha512-ZEjj/dQYQy0Zx0lgLMLR8QuaqTihnxirir7EwUHp1Axq4e3+k8jXU5K0VLbNvedv1f4EWtBonDIZm0NUr+jCcA==", "dev": true, "requires": { "camelcase": "^3.0.0", @@ -4196,13 +4252,13 @@ "string-width": "^1.0.2", "which-module": "^1.0.0", "y18n": "^3.2.1", - "yargs-parser": "5.0.0-security.0" + "yargs-parser": "^5.0.1" } }, "yargs-parser": { - "version": "5.0.0-security.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0-security.0.tgz", - "integrity": "sha512-T69y4Ps64LNesYxeYGYPvfoMTt/7y1XtfpIslUeK4um+9Hu7hlGoRtaDLvdXb7+/tfq4opVa2HRY5xGip022rQ==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.1.tgz", + "integrity": "sha512-wpav5XYiddjXxirPoCTUPbqM0PXvJ9hiBMvuJgInvo4/lAOTZzUprArw17q2O1P2+GHhbBr18/iQwjL5Z9BqfA==", "dev": true, "requires": { "camelcase": "^3.0.0", diff --git a/vignettes/intro.Rmd b/vignettes/intro.Rmd index 12e0b23..bdd18f1 100644 --- a/vignettes/intro.Rmd +++ b/vignettes/intro.Rmd @@ -28,9 +28,9 @@ Dashboards provide a solution. They allow the developer to intuitively structure # Why Semantic Dashboard? -Semantic Dashboard offers an alternative look of your dashboard based on the [Fomantic UI](fomantic-ui.com/). Historically, we built this package around *Semantic UI* +Semantic Dashboard offers an alternative look of your dashboard based on the [Fomantic UI](https://fomantic-ui.com/). Historically, we built this package around *Semantic UI* library, but it got deprecated and now (since December 2019) we base on the well-supported -and maintained community fork called [Fomantic UI](fomantic-ui.com/). +and maintained community fork called [Fomantic UI](https://fomantic-ui.com/). It relies and uses components from the mother package [shiny.semantic](https://github.com/Appsilon/shiny.semantic/).