Skip to content

Commit

Permalink
Updated @simonwep/pickr to 1.9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
pvictor committed Nov 13, 2024
1 parent 15d4dcb commit fb4fcb0
Show file tree
Hide file tree
Showing 8 changed files with 66 additions and 55 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ shinyWidgets 0.8.8

* `knobInput()` and `switchInput()` are softly deprecated, since the JavaScript libraries used by those widgets are no longer actively maintained.
* Updated virtual-select to 1.0.46 (fix focus issue), see https://github.com/sa-si-dev/virtual-select/releases.
* Updated @simonwep/pickr to 1.9.1, see https://github.com/simonwep/pickr/releases.


shinyWidgets 0.8.7
Expand Down
10 changes: 10 additions & 0 deletions R/color-pickr.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@

html_dependency_pickr <- function() {
htmlDependency(
name = "colorpickr",
version = "1.9.1",
src = c(file = "packer"),
package = "shinyWidgets",
script = "colorpickr.js"
)
}

#' @title Color Pickr
#'
#' @description A widget to pick color with different themes and options.
Expand Down
23 changes: 0 additions & 23 deletions R/dependencies.R
Original file line number Diff line number Diff line change
Expand Up @@ -487,29 +487,6 @@ html_dependency_stati <- function() {
}


html_dependency_pickr <- function() {
# htmlDependency(
# name = "pickr",
# version = "1.6.0",
# src = list(href = "shinyWidgets/pickr-1.6.0", file = "assets/pickr-1.6.0"),
# package = "shinyWidgets",
# script = "js/pickr.min.js",
# stylesheet = c(
# "css/classic.min.css",
# "css/monolith.min.css",
# "css/nano.min.css"
# ),
# head = "<style>.pickr-color.disabled{cursor:not-allowed;}</style>",
# all_files = FALSE
# )
htmlDependency(
name = "colorpickr",
version = "1.6.0",
src = c(file = "packer"),
package = "shinyWidgets",
script = "colorpickr.js"
)
}



Expand Down
18 changes: 15 additions & 3 deletions examples/pickr-color.R
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,25 @@ server <- function(input, output, session) {

output$res21 <- renderPrint(input$id21)
observeEvent(input$red, {
updateColorPickr(session, "id21", "firebrick")
updateColorPickr(
session, "id21",
label = "firebrick",
value = "firebrick"
)
})
observeEvent(input$green, {
updateColorPickr(session, "id21", "forestgreen")
updateColorPickr(
session, "id21",
label = "forestgreen",
value = "forestgreen"
)
})
observeEvent(input$blue, {
updateColorPickr(session, "id21", "steelblue")
updateColorPickr(
session, "id21",
label = "steelblue",
value = "steelblue"
)
})

output$res22 <- renderPrint(input$id22)
Expand Down
3 changes: 1 addition & 2 deletions inst/packer/colorpickr.js

Large diffs are not rendered by default.

18 changes: 15 additions & 3 deletions man/colorPickr.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 23 additions & 23 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"homepage": "https://github.com/dreamRs/shinyWidgets#readme",
"devDependencies": {
"@simonwep/pickr": "^1.6.0",
"@simonwep/pickr": "^1.9.1",
"@widgetjs/tree": "^1.8.3",
"air-datepicker": "^3.5.3",
"autonumeric": "^4.6.0",
Expand Down

0 comments on commit fb4fcb0

Please sign in to comment.