Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion R/accordion.R
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ accordion <- function(..., id = NULL, open = NULL, multiple = TRUE, class = NULL
height = validateCssUnit(height)
),
!!!attrs,
!!!children
!!!children,
component_dependencies()
)

tag <- tag_require(tag, version = 5, caller = "accordion()")
Expand Down
3 changes: 2 additions & 1 deletion R/card.R
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ card <- function(..., full_screen = FALSE, height = NULL, max_height = NULL, min
!!!attribs,
!!!children,
if (full_screen) full_screen_toggle(),
card_init_js()
card_init_js(),
component_dependencies()
)

tag <- bindFillRole(tag, container = TRUE, item = fill)
Expand Down
3 changes: 2 additions & 1 deletion R/input-switch.R
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ input_checkbox <- function(id, label, class = "bslib-input-checkbox", value = FA
tags$span(label),
class = "form-check-label",
`for` = id
)
),
component_dependencies()
)
)
}
6 changes: 4 additions & 2 deletions R/layout.R
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ layout_column_wrap <- function(
gap = validateCssUnit(gap)
),
!!!attribs,
children
children,
component_dependencies()
)

tag <- bindFillRole(tag, item = fill)
Expand Down Expand Up @@ -220,7 +221,8 @@ layout_columns <- function(
),
!!!row_heights_css_vars(row_heights),
!!!attribs,
!!!children
!!!children,
component_dependencies()
)

tag <- bindFillRole(tag, item = fill)
Expand Down
2 changes: 1 addition & 1 deletion R/nav-items.R
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ is_nav_item <- function(x) {
#' @describeIn nav-items Adding spacing between nav items.
#' @export
nav_spacer <- function() {
div(class = "bslib-nav-spacer")
div(class = "bslib-nav-spacer", component_dependencies())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one seems a little out of place to be getting the complete bundle. Not that I object entirely but I'd also be in favor of pulling out the nav spacer dependency to stand on its own.

}

is_nav_spacer <- function(x) {
Expand Down
3 changes: 2 additions & 1 deletion R/sidebar.R
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,8 @@ layout_sidebar <- function(
"--bslib-sidebar-max-height-mobile" = max_height_mobile
),
!!!contents,
sidebar_init_js()
sidebar_init_js(),
component_dependencies()
)

res <- bindFillRole(res, item = fill)
Expand Down
4 changes: 3 additions & 1 deletion R/utils-deps.R
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,7 @@ component_dependency_sass_ <- function(theme) {


web_component <- function(tagName, ...) {
htmltools::tag(tagName, rlang::list2(...))
deps <- component_dependencies()
args <- c(deps, rlang::list2(...))
htmltools::tag(tagName, args)
}