Compare commits

...

16 Commits

Author SHA1 Message Date
Winston Chang
a18e72ba74 Rename build to build2 2023-11-16 13:05:38 -06:00
Winston Chang
ef58b0110b REmove yarn engine 2023-11-16 13:00:46 -06:00
Winston Chang
8352e5456b Remove prepare step 2023-11-16 12:54:05 -06:00
wch
9573d7181e yarn build (GitHub Actions) 2023-09-22 20:18:40 +00:00
Winston Chang
558903bb25 Remove babel from build toolchain 2023-09-22 14:55:18 -05:00
Carson Sievert
a6fc6bf8cb Update to the development version of selectize.js (#3897)
Co-authored-by: cpsievert <cpsievert@users.noreply.github.com>
2023-09-14 19:02:31 -05:00
Carson Sievert
eddc3047d4 Fix regression in updateSelectizeInput() (#3890)
Co-authored-by: cpsievert <cpsievert@users.noreply.github.com>
2023-09-08 16:48:48 -05:00
Carson Sievert
6db17d4f67 Ensure Sass variables are defined for Bootstrap 3 Sass (#3892) 2023-09-08 10:39:25 -05:00
Winston Chang
d21f9493fb Update fileInput help page (#3886)
Co-authored-by: wch <wch@users.noreply.github.com>
2023-09-01 15:27:28 -05:00
Carson Sievert
e87f942e89 Update Shiny's CSS to respect BS5's dark color mode (#3882)
Co-authored-by: cpsievert <cpsievert@users.noreply.github.com>
2023-08-28 15:11:01 -05:00
Carson Sievert
1eb9ed7345 Upgrade to selectize.js 0.15.2 (#3875)
Co-authored-by: Garrick Aden-Buie <garrick@adenbuie.com>
Co-authored-by: cpsievert <cpsievert@users.noreply.github.com>
2023-08-28 14:59:43 -05:00
Carson Sievert
9d923d079a fileInput()'s button shouldn't have top-right or bottom-right border-radius (#3879) 2023-08-24 09:07:11 -05:00
Carson Sievert
b054e45402 Update staticimports (#3872) 2023-08-15 11:40:19 -05:00
Carson Sievert
8b1d30aefe use_dev_version() (#3871)
Co-authored-by: cpsievert <cpsievert@users.noreply.github.com>
2023-08-14 12:53:12 -05:00
Carson
ab87a0708d use_dev_version() 2023-08-14 09:56:22 -05:00
Carson Sievert
0b97ee1ecc 1.7.5 release candidate (#3867)
Co-authored-by: cpsievert <cpsievert@users.noreply.github.com>
2023-08-14 09:49:46 -05:00
66 changed files with 4945 additions and 18101 deletions

View File

@@ -26,7 +26,6 @@
^\.vscode$
^\.madgerc$
^\.prettierrc\.yml$
^babel\.config\.json$
^jest\.config\.js$
^package\.json$
^tsconfig\.json$

View File

@@ -7,3 +7,4 @@ plugins:
spec: "@yarnpkg/plugin-interactive-tools"
yarnPath: .yarn/releases/yarn-3.2.3.cjs
checksumBehavior: update

View File

@@ -1,19 +1,19 @@
Package: shiny
Type: Package
Title: Web Application Framework for R
Version: 1.7.4.9003
Version: 1.7.5.9000
Authors@R: c(
person("Winston", "Chang", role = c("aut", "cre"), email = "winston@rstudio.com", comment = c(ORCID = "0000-0002-1576-2126")),
person("Joe", "Cheng", role = "aut", email = "joe@rstudio.com"),
person("JJ", "Allaire", role = "aut", email = "jj@rstudio.com"),
person("Carson", "Sievert", role = "aut", email = "carson@rstudio.com", comment = c(ORCID = "0000-0002-4958-2844")),
person("Barret", "Schloerke", role = "aut", email = "barret@rstudio.com", comment = c(ORCID = "0000-0001-9986-114X")),
person("Yihui", "Xie", role = "aut", email = "yihui@rstudio.com"),
person("Jeff", "Allen", role = "aut", email = "jeff@rstudio.com"),
person("Jonathan", "McPherson", role = "aut", email = "jonathan@rstudio.com"),
person("Winston", "Chang", role = c("aut", "cre"), email = "winston@posit.co", comment = c(ORCID = "0000-0002-1576-2126")),
person("Joe", "Cheng", role = "aut", email = "joe@posit.co"),
person("JJ", "Allaire", role = "aut", email = "jj@posit.co"),
person("Carson", "Sievert", role = "aut", email = "carson@posit.co", comment = c(ORCID = "0000-0002-4958-2844")),
person("Barret", "Schloerke", role = "aut", email = "barret@posit.co", comment = c(ORCID = "0000-0001-9986-114X")),
person("Yihui", "Xie", role = "aut", email = "yihui@posit.co"),
person("Jeff", "Allen", role = "aut"),
person("Jonathan", "McPherson", role = "aut", email = "jonathan@posit.co"),
person("Alan", "Dipert", role = "aut"),
person("Barbara", "Borges", role = "aut"),
person(family = "RStudio", role = "cph"),
person("Posit Software, PBC", role = c("cph", "fnd")),
person(family = "jQuery Foundation", role = "cph",
comment = "jQuery library and jQuery UI library"),
person(family = "jQuery contributors", role = c("ctb", "cph"),

33
NEWS.md
View File

@@ -1,32 +1,41 @@
# shiny 1.7.4.9002
# shiny (development version)
## Full changelog
## New features and improvements
### Breaking changes
* Updated `selectizeInput()`'s selectize.js dependency from v0.12.4 to v0.15.2. In addition to many bug fixes and improvements, this update also adds several new [plugin options](https://selectize.dev/docs/demos/plugins). (#3875)
### New features and improvements
* Shiny's CSS styling for things like `showNotification()`, `withProgress()`, `inputPanel()`, etc., now looks better with `{bslib}`'s upcoming CSS-only dark mode. (#3882)
* Closed #789: Dynamic UI is now rendered asynchronously, thanks in part to the newly exported `Shiny.renderDependenciesAsync()`, `Shiny.renderHtmlAsync()`, and `Shiny.renderContentAsync()`. Importantly, this means `<script>` tags are now loaded asynchronously (the old way used `XMLHttpRequest`, which is synchronous). In addition, `Shiny` now manages a queue of async tasks (exposed via `Shiny.shinyapp.taskQueue`) so that order of execution is preserved. (#3666)
## Bug fixes
* `fileInput()` no longer has unwanted round corners applied to the `buttonLabel`. (#3879)
# shiny 1.7.5
## Possibly breaking changes
* For `reactiveValues()` objects, whenever the `$names()` or `$values()` methods are called, the keys are now returned in the order that they were inserted. (#3774)
* `Map` objects are now initialized at load time instead of build time. This avoids potential problems that could arise from storing `fastmap` objects into the built Shiny package. (#3775)
* The value provided to `options(shiny.json.digits)` is now interpreted as number of _digits after the decimal_ instead of _significant digits_. To treat the value as significant digits, wrap it in `I()` (e.g., `options(shiny.json.digits = I(4))`). This new default behavior not only helps with reducing digits in testing snapshots, but is also more consistent with `{jsonlite}`'s default behavior. (#3819)
* Allow for `shiny:::toJSON()` to respect if `digits=` has class `"AsIs"` which represents if `use_signif=` is `TRUE` or `FALSE`. This is useful for testing to keep the digits smaller. For example, setting `options(shiny.json.digits = 4)` will save 4 digits after the decimal, rather than the default of `I(16)` which will save 16 significant digits. (#3819)
## New features and improvements
* Closed #789: Dynamic UI is now rendered asynchronously, thanks in part to the newly exported `Shiny.renderDependenciesAsync()`, `Shiny.renderHtmlAsync()`, and `Shiny.renderContentAsync()`. Importantly, this means `<script>` tags are now loaded asynchronously (the old way used `XMLHttpRequest`, which is synchronous). In addition, `Shiny` now manages a queue of async tasks (exposed via `Shiny.shinyapp.taskQueue`) so that order of execution is preserved. (#3666)
* Fixes #3840: `updateSliderInput()` now warns when attempting to set invalid `min`, `max`, or `value` values. Sending an invalid update message to an input no longer causes other update messages to fail. (#3843)
* `sliderInput()` now has a larger target area for clicking or tapping on the slider handle or range. (#3859)
* Closed #2956: Component authors can now prevent Shiny from creating an input binding on specific elements by adding the `data-shiny-no-bind-input` attribute to the element. The attribute may have any or no value; its presence will prevent binding. This feature is primarily useful for input component authors who want to use standard HTML input elements without causing Shiny to create an input binding for them. Additionally, Shiny now adds custom classes to its inputs. For example, `checkboxInput()` now has a `shiny-input-checkbox` class. These custom classes may be utilized in future updates to Shiny's input binding logic. (#3861)
* Slider inputs created with `sliderInput()` now have a larger target area for clicking or tapping on the slider line or the slider bar. (#3859)
* `Map` objects are now initialized at load time instead of build time. This avoids potential problems that could arise from storing `fastmap` objects into the built Shiny package. (#3775)
### Bug fixes
## Bug fixes
* Fixed #3771: Sometimes the error `ion.rangeSlider.min.js: i.stopPropagation is not a function` would appear in the JavaScript console. (#3772)
* Fixed #3833: When `width` is provided to `textAreaInput()`, we now correctly set the width of the `<textarea>` element. (#3838)
* Fixes #3840: `updateSliderInput()` now warns when attempting to set invalid `min`, `max`, or `value` values. Sending an invalid update message to an input no longer causes other update messages to fail. (#3843)
# shiny 1.7.4.1

View File

@@ -2,8 +2,13 @@
#'
#' Create a file upload control that can be used to upload one or more files.
#'
#' Whenever a file upload completes, the corresponding input variable is set
#' to a dataframe. See the `Server value` section.
#' Whenever a file upload completes, the corresponding input variable is set to
#' a dataframe. See the `Server value` section.
#'
#' Each time files are uploaded, they are written to a new random subdirectory
#' inside of R's process-level temporary directory. The Shiny user session keeps
#' track of all uploads in the session, and when the session ends, Shiny deletes
#' all of the subdirectories where files where uploaded to.
#'
#' @family input elements
#'
@@ -11,21 +16,21 @@
#' @param multiple Whether the user should be allowed to select and upload
#' multiple files at once. **Does not work on older browsers, including
#' Internet Explorer 9 and earlier.**
#' @param accept A character vector of "unique file type specifiers" which
#' gives the browser a hint as to the type of file the server expects.
#' Many browsers use this prevent the user from selecting an invalid file.
#' @param accept A character vector of "unique file type specifiers" which gives
#' the browser a hint as to the type of file the server expects. Many browsers
#' use this prevent the user from selecting an invalid file.
#'
#' A unique file type specifier can be:
#' * A case insensitive extension like `.csv` or `.rds`.
#' * A valid MIME type, like `text/plain` or `application/pdf`
#' * One of `audio/*`, `video/*`, or `image/*` meaning any audio, video,
#' or image type, respectively.
#' or image type, respectively.
#' @param buttonLabel The label used on the button. Can be text or an HTML tag
#' object.
#' @param placeholder The text to show before a file has been uploaded.
#' @param capture What source to use for capturing image, audio or video data.
#' This attribute facilitates user access to a device's media capture
#' mechanism, such as a camera, or microphone, from within a file upload
#' This attribute facilitates user access to a device's media capture
#' mechanism, such as a camera, or microphone, from within a file upload
#' control.
#'
#' A value of `user` indicates that the user-facing camera and/or microphone
@@ -67,7 +72,9 @@
#' }
#'
#' @section Server value:
#' A `data.frame` that contains one row for each selected file, and following columns:
#'
#' A `data.frame` that contains one row for each selected file, and following
#' columns:
#' \describe{
#' \item{`name`}{The filename provided by the web browser. This is
#' **not** the path to read to get at the actual data that was uploaded

View File

@@ -4,7 +4,7 @@
#' from a list of values.
#'
#' By default, `selectInput()` and `selectizeInput()` use the JavaScript library
#' \pkg{selectize.js} (<https://selectize.dev/) instead of
#' \pkg{selectize.js} (<https://selectize.dev/>) instead of
#' the basic select input element. To use the standard HTML select input
#' element, use `selectInput()` with `selectize=FALSE`.
#'

View File

@@ -48,9 +48,9 @@ Map <- R6Class(
)
)
as.list.Map <- function(map) {
map$values()
as.list.Map <- function(x, ...) {
x$values()
}
length.Map <- function(map) {
map$size()
length.Map <- function(x) {
x$size()
}

View File

@@ -90,8 +90,9 @@ getShinyOption <- function(name, default = NULL) {
#' \item{shiny.jquery.version (defaults to `3`)}{The major version of jQuery to use.
#' Currently only values of `3` or `1` are supported. If `1`, then jQuery 1.12.4 is used. If `3`,
#' then jQuery `r version_jquery` is used.}
#' \item{shiny.json.digits (defaults to `16`)}{The number of digits to use when converting
#' numbers to JSON format to send to the client web browser.}
#' \item{shiny.json.digits (defaults to `I(16)`)}{Max number of digits to use when converting
#' numbers to JSON format to send to the client web browser. Use [I()] to specify significant digits.
#' Use `NA` for max precision.}
#' \item{shiny.launch.browser (defaults to `interactive()`)}{A boolean which controls the default behavior
#' when an app is run. See [runApp()] for more information.}
#' \item{shiny.mathjax.url (defaults to `"https://mathjax.rstudio.com/latest/MathJax.js"`)}{

View File

@@ -34,3 +34,11 @@ NULL
# since we call require(shiny) as part of loading the app.
#' @import methods
NULL
# For usethis::use_release_issue()
release_bullets <- function() {
c(
"Update static imports: `staticimports::import()`"
)
}

View File

@@ -42,9 +42,19 @@ get_package_version <- function(pkg) {
is_installed <- function(pkg, version = NULL) {
installed <- isNamespaceLoaded(pkg) || nzchar(system_file_cached(package = pkg))
if (is.null(version)) {
return(installed)
}
if (!is.character(version) && !inherits(version, "numeric_version")) {
# Avoid https://bugs.r-project.org/show_bug.cgi?id=18548
alert <- if (identical(Sys.getenv("TESTTHAT"), "true")) stop else warning
alert("`version` must be a character string or a `package_version` or `numeric_version` object.")
version <- numeric_version(sprintf("%0.9g", version))
}
installed && isTRUE(get_package_version(pkg) >= version)
}

View File

@@ -1,2 +1,2 @@
# Generated by tools/updateSelectize.R; do not edit by hand
version_selectize <- "0.12.4"
version_selectize <- "0.15.2"

View File

@@ -47,7 +47,7 @@ For help with learning fundamental Shiny programming concepts, check out the [Ma
## Join the conversation
If you want to chat about Shiny, meet other developers, or help us decide what to work on next, [join us on Discord](https://discord.gg/yMGCamUMnS).
If you want to chat about Shiny, meet other developers, or help us decide what to work on next, [join us on Discord](https://discord.com/invite/yMGCamUMnS).
## Getting Help

View File

@@ -1,15 +0,0 @@
{
"presets": [
"@babel/preset-typescript",
[
"@babel/preset-env",
{
"useBuiltIns": "usage",
"corejs": "3.12"
}
]
],
"ignore":[
"node_modules/core-js"
]
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
Selectize.define("selectize-plugin-a11y",function(c){var t=this,l=13;typeof t.accessibility=="undefined"&&(t.accessibility={}),t.accessibility.helpers={randomId:function(e){for(var r="",s=e||10,i="abcdefghijklmnopqrstuvwxyz0123456789",n=i.length,a=0;a<s;a++)r+=i[Math.floor(n*Math.random())];return r}},t.accessibility.liveRegion={$region:"",speak:function(e){var r=$("<div></div>");r.text(e),this.$region.html(r)},domListener:function(){var e=new MutationObserver(function(r){r.forEach(function(s){var i=$(s.target);if(i.hasClass("items"))if(i.hasClass("dropdown-active")){t.$control_input.attr("aria-expanded","true");for(var n=t.$dropdown_content[0].children,a=0;a<n.length;a++){var o=n[a].attributes;o.role||n[a].setAttribute("role","option"),o.id||n[a].setAttribute("id",t.accessibility.helpers.randomId())}}else t.$control_input.attr("aria-expanded","false"),t.$control_input.removeAttr("aria-activedescendant");else i.hasClass("active")&&i.attr("data-value")&&(t.$control_input.attr("aria-activedescendant",i.attr("id")),t.accessibility.liveRegion.speak(i.text(),500))})});e.observe(t.$dropdown[0],{attributes:!0,attributeFilter:["class"],subtree:!0,attributeOldValue:!0}),e.observe(t.$control[0],{attributes:!0,attributeFilter:["class"]}),e.observe(t.$control_input[0],{attributes:!0,attributeFilter:["value"]})},setAttributes:function(){this.$region.attr({"aria-live":"assertive",role:"log","aria-relevant":"additions","aria-atomic":"true"})},setStyles:function(){this.$region.css({position:"absolute",width:"1px",height:"1px","margin-top":"-1px",clip:"rect(1px, 1px, 1px, 1px)",overflow:"hidden"})},init:function(){this.$region=$("<div>"),this.setAttributes(),this.setStyles(),$("body").append(this.$region),this.domListener()}},this.setup=function(){var e=t.setup;return function(){e.apply(this,arguments);var r=t.accessibility.helpers.randomId(),s=t.accessibility.helpers.randomId();t.$control.on("keydown",function(i){i.keyCode===l&&(t.settings.openOnFocus?(t.settings.openOnFocus=!1,t.focus(),setTimeout(function(){t.settings.openOnFocus=!0},0)):t.focus())}),t.$control_input.attr({role:"combobox","aria-expanded":"false",haspopup:"listbox","aria-owns":s,"aria-label":t.$wrapper.closest("[data-accessibility-selectize-label]").attr("data-accessibility-selectize-label")}),t.$dropdown_content.attr({role:"listbox",id:s}),t.accessibility.liveRegion.init()}}(),this.destroy=function(){var e=t.destroy;return function(){return t.accessibility.liveRegion.$region.remove(),e.apply(this,arguments)}}()});
Selectize.define("selectize-plugin-a11y",function(c){var t=this,l=13;typeof t.accessibility>"u"&&(t.accessibility={}),t.accessibility.helpers={randomId:function(e){for(var r="",s=e||10,i="abcdefghijklmnopqrstuvwxyz0123456789",n=i.length,a=0;a<s;a++)r+=i[Math.floor(n*Math.random())];return r}},t.accessibility.liveRegion={$region:"",speak:function(e){var r=$("<div></div>");r.text(e),this.$region.html(r)},domListener:function(){var e=new MutationObserver(function(r){r.forEach(function(s){var i=$(s.target);if(i.hasClass("items"))if(i.hasClass("dropdown-active")){t.$control_input.attr("aria-expanded","true");for(var n=t.$dropdown_content[0].children,a=0;a<n.length;a++){var o=n[a].attributes;o.role||n[a].setAttribute("role","option"),o.id||n[a].setAttribute("id",t.accessibility.helpers.randomId())}}else t.$control_input.attr("aria-expanded","false"),t.$control_input.removeAttr("aria-activedescendant");else i.hasClass("active")&&i.attr("data-value")&&(t.$control_input.attr("aria-activedescendant",i.attr("id")),t.accessibility.liveRegion.speak(i.text(),500))})});e.observe(t.$dropdown[0],{attributes:!0,attributeFilter:["class"],subtree:!0,attributeOldValue:!0}),e.observe(t.$control[0],{attributes:!0,attributeFilter:["class"]}),e.observe(t.$control_input[0],{attributes:!0,attributeFilter:["value"]})},setAttributes:function(){this.$region.attr({"aria-live":"assertive",role:"log","aria-relevant":"additions","aria-atomic":"true"})},setStyles:function(){this.$region.css({position:"absolute",width:"1px",height:"1px","margin-top":"-1px",clip:"rect(1px, 1px, 1px, 1px)",overflow:"hidden"})},init:function(){this.$region=$("<div>"),this.setAttributes(),this.setStyles(),$("body").append(this.$region),this.domListener()}},this.setup=function(){var e=t.setup;return function(){e.apply(this,arguments);var r=t.accessibility.helpers.randomId(),s=t.accessibility.helpers.randomId();t.$control.on("keydown",function(i){i.keyCode===l&&(t.settings.openOnFocus?(t.settings.openOnFocus=!1,t.focus(),setTimeout(function(){t.settings.openOnFocus=!0},0)):t.focus())}),t.$control_input.attr({role:"combobox","aria-expanded":"false",haspopup:"listbox","aria-owns":s,"aria-label":t.$wrapper.closest("[data-accessibility-selectize-label]").attr("data-accessibility-selectize-label")}),t.$dropdown_content.attr({role:"listbox",id:s}),t.accessibility.liveRegion.init()}}(),this.destroy=function(){var e=t.destroy;return function(){return t.accessibility.liveRegion.$region.remove(),e.apply(this,arguments)}}()});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,16 @@
.#{selectize}-dropdown.plugin-auto_position.#{$selectize}-position-top {
border-top: 1px solid $select-color-border;
border-bottom: 0 none;
border-radius: 3px 3px 0 0;
box-shadow: 0 -6px 12px rgba(var(--bs-body-color-rgb, 0,0,0), .18);
}
.#{selectize}-control.plugin-auto_position .#{selectize}-input.#{$selectize}-position-top.dropdown-active {
border-radius: 0 0 3px 3px;
border-top: 0 none;
&::before {
top: 0;
bottom: unset;
}
}

View File

@@ -0,0 +1,29 @@
.#{$selectize}-control.plugin-clear_button {
.clear {
text-decoration: none;
display: flex;
position: absolute;
height: 100%;
width: 25px;
top: 0;
right: calc(#{$select-padding-x} - #{$select-padding-item-x});
color: var(--bs-body-color, black);
opacity: 0.4;
font-weight: bold;
border: none;
cursor: pointer;
z-index: 1;
font-size: 21px;
justify-content: center;
align-items: center;
}
.clear:hover {
opacity: 1;
}
&.single .clear {
right: calc(#{$select-padding-x} - #{$select-padding-item-x} + 1.5rem);
}
}

View File

@@ -1,16 +1,19 @@
.selectize-control.plugin-drag_drop {
&.multi > .selectize-input > div.ui-sortable-placeholder {
visibility: visible !important;
background: #f2f2f2 !important;
background: rgba(0,0,0,0.06) !important;
border: 0 none !important;
@include selectize-box-shadow(inset 0 0 12px 4px #fff);
.#{$selectize}-control.plugin-drag_drop {
&.multi > .#{$selectize}-input.dragging {
overflow: visible;
}
&.multi > .#{$selectize}-input > div.ui-sortable-placeholder {
visibility: visible !important;
background: #f2f2f2 !important;
background: rgba(0, 0, 0, 0.06) !important;
border: 0 none !important;
box-shadow: inset 0 0 12px 4px #fff;
}
.ui-sortable-placeholder::after {
content: '!';
visibility: hidden;
content: "!";
visibility: hidden;
}
.ui-sortable-helper {
@include selectize-box-shadow(0 2px 5px rgba(0,0,0,0.2));
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
}
}

View File

@@ -1,20 +1,24 @@
.selectize-dropdown-header {
position: relative;
padding: $selectize-padding-dropdown-item-y $selectize-padding-dropdown-item-x;
border-bottom: 1px solid $selectize-color-border;
background: mix($selectize-color-dropdown, $selectize-color-border, 85%);
@include selectize-border-radius($selectize-border-radius $selectize-border-radius 0 0);
.#{$selectize}-dropdown.plugin-dropdown_header {
.#{$selectize}-dropdown-header {
position: relative;
padding: ($select-padding-dropdown-item-y * 2)
$select-padding-dropdown-item-x;
border-bottom: 1px solid $select-color-border;
background: RGBA($select-color-dropdown, 0.15);
border-radius: $select-border-radius $select-border-radius 0 0;
}
.#{$selectize}-dropdown-header-close {
position: absolute;
right: $select-padding-dropdown-item-x;
top: 50%;
color: $select-color-text;
opacity: 0.4;
margin-top: -12px;
line-height: 20px;
font-size: 20px !important;
text-decoration: none;
}
.#{$selectize}-dropdown-header-close:hover {
color: RGB($select-color-rgb);
}
}
.selectize-dropdown-header-close {
position: absolute;
right: $selectize-padding-dropdown-item-x;
top: 50%;
color: $selectize-color-text;
opacity: 0.4;
margin-top: -12px;
line-height: 20px;
font-size: 20px !important;
}
.selectize-dropdown-header-close:hover {
color: darken($selectize-color-text, 25%);
}

View File

@@ -1,17 +1,22 @@
.selectize-dropdown.plugin-optgroup_columns {
.#{$selectize}-dropdown.plugin-optgroup_columns {
.#{$selectize}-dropdown-content {
display: flex;
}
.optgroup {
border-right: 1px solid #f2f2f2;
border-top: 0 none;
float: left;
@include selectize-box-sizing(border-box);
border-right: 1px solid #f2f2f2;
border-top: 0 none;
flex-grow: 1;
flex-basis: 0;
min-width: 0;
}
.optgroup:last-child {
border-right: 0 none;
border-right: 0 none;
}
.optgroup:before {
display: none;
display: none;
}
.optgroup-header {
border-top: 0 none;
border-top: 0 none;
}
}
}

View File

@@ -1,43 +1,38 @@
.selectize-control.plugin-remove_button {
[data-value] {
position: relative;
padding-right: 24px !important;
.#{$selectize}-control.plugin-remove_button {
.item {
display: inline-flex;
align-items: center;
padding-right: 0 !important;
}
[data-value] .remove {
z-index: 1; /* fixes ie bug (see #392) */
position: absolute;
top: 0;
right: 0;
bottom: 0;
width: 17px;
text-align: center;
font-weight: bold;
font-size: 12px;
color: inherit;
text-decoration: none;
vertical-align: middle;
display: inline-block;
padding: $selectize-padding-item-y 0 0 0;
border-left: 1px solid $selectize-color-item-border;
@include selectize-border-radius(0 2px 2px 0);
@include selectize-box-sizing(border-box);
.item .remove {
color: inherit;
text-decoration: none;
vertical-align: middle;
display: inline-block;
padding: $select-padding-item-y $select-padding-item-x;
border-left: 1px solid $select-color-item-border;
border-radius: 0 2px 2px 0;
box-sizing: border-box;
margin-left: $select-padding-item-x;
}
[data-value] .remove:hover {
background: rgba(0,0,0,0.05);
.item .remove:hover {
background: rgba(0, 0, 0, 0.05);
}
[data-value].active .remove {
border-left-color: $selectize-color-item-active-border;
.item.active .remove {
border-left-color: $select-color-item-active-border;
}
.disabled [data-value] .remove:hover {
background: none;
.disabled .item .remove:hover {
background: none;
}
.disabled [data-value] .remove {
border-left-color: lighten(desaturate($selectize-color-item-border, 100%), $selectize-lighten-disabled-item-border);
}
.remove-single {
position: absolute;
right: 0;
top: 0;
font-size: 23px;
.disabled .item .remove {
border-left-color: lighten(
desaturate($select-color-item-border, 100%),
$select-lighten-disabled-item-border
);
}
}

View File

@@ -1,158 +1,136 @@
/**
* selectize.bootstrap3.css (v0.12.3) - Bootstrap 3 Theme
* Copyright (c) 20132015 Brian Reavis & contributors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the License at:
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
* ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*
* @author Brian Reavis <brian@thirdroute.com>
*/
$selectize-font-family: inherit !default;
$selectize-font-size: inherit !default;
$selectize-line-height: $line-height-computed !default;
$select-font-family: inherit;
$select-font-size: inherit;
$select-line-height: $line-height-computed;
$selectize-color-text: $input-color !default;
$selectize-color-highlight: rgba(255,237,40,0.4) !default;
$selectize-color-input: $input-bg !default;
$selectize-color-input-full: $input-bg !default;
$selectize-color-input-error: $state-danger-text !default;
$selectize-color-input-error-focus: darken($selectize-color-input-error, 10%) !default;
$selectize-color-disabled: $input-bg !default;
$selectize-color-item: mix($selectize-color-input, $selectize-color-text, 90%) !default;
$selectize-color-item-border: rgba(black, 0) !default;
$selectize-color-item-active: $component-active-bg !default;
$selectize-color-item-active-text: color-contrast($selectize-color-item-active) !default;
$selectize-color-item-active-border: rgba(black, 0) !default;
$selectize-color-optgroup: $dropdown-bg !default;
$selectize-color-optgroup-text: $dropdown-header-color !default;
$selectize-color-optgroup-border: $dropdown-divider-bg !default;
$selectize-color-dropdown: $dropdown-bg !default;
$selectize-color-dropdown-text: $dropdown-link-color !default;
$selectize-color-dropdown-border-top: mix($input-border, $input-bg, 0.8) !default;
$selectize-color-dropdown-item-active: $dropdown-link-hover-bg !default;
$selectize-color-dropdown-item-active-text: $dropdown-link-hover-color !default;
$selectize-color-dropdown-item-create-active-text: $dropdown-link-hover-color !default;
$selectize-opacity-disabled: 0.5 !default;
$selectize-shadow-input: none !default;
$selectize-shadow-input-focus: inset 0 1px 2px rgba(black, 0.15) !default;
$selectize-shadow-input-error: inset 0 1px 1px rgba(black, .075) !default;
$selectize-shadow-input-error-focus: inset 0 1px 1px rgba(black, .075), 0 0 6px lighten($selectize-color-input-error, 20%) !default;
$selectize-border: 1px solid $input-border !default;
$selectize-border-radius: $input-border-radius !default;
$select-color-text: $text-color;
$select-color-highlight: rgba(255, 237, 40, 0.4);
$select-color-input: $input-bg;
$select-color-input-full: $input-bg;
$select-color-input-error: $state-danger-text;
$select-color-input-error-focus: darken($select-color-input-error, 10%);
$select-color-disabled: $input-bg;
$select-color-item: RGBA($select-color-text, 0.1);
$select-color-item-border: rgba(0, 0, 0, 0);
$select-color-item-active: $component-active-bg;
$select-color-item-active-text: color-contrast($select-color-item-active);
$select-color-item-active-border: rgba(0, 0, 0, 0);
$select-color-optgroup: $dropdown-bg;
$select-color-optgroup-text: $dropdown-header-color;
$select-color-optgroup-border: $dropdown-divider-bg;
$select-color-dropdown: $dropdown-bg;
$select-color-dropdown-border-top: mix($input-border, $input-bg, 80%);
$select-color-dropdown-item-active: $dropdown-link-hover-bg;
$select-color-dropdown-item-active-text: $dropdown-link-hover-color;
$select-color-dropdown-item-create-active-text: $dropdown-link-hover-color;
$select-opacity-disabled: 0.5;
$select-shadow-input: none;
$select-shadow-input-focus: inset 0 1px 2px rgba(0, 0, 0, 0.15);
$select-shadow-input-error: inset 0 1px 1px rgba(0, 0, 0, 0.075);
$select-shadow-input-error-focus: inset 0 1px 1px rgba(0, 0, 0, 0.075),
0 0 6px lighten($select-color-input-error, 20%);
$select-border: 1px solid $input-border;
$select-border-radius: $input-border-radius;
$selectize-width-item-border: 0 !default;
$selectize-padding-x: $padding-base-horizontal !default;
$selectize-padding-y: $padding-base-vertical !default;
$selectize-padding-dropdown-item-x: $padding-base-horizontal !default;
$selectize-padding-dropdown-item-y: 3px !default;
$selectize-padding-item-x: 3px !default;
$selectize-padding-item-y: 1px !default;
$selectize-margin-item-x: 3px !default;
$selectize-margin-item-y: 3px !default;
$selectize-caret-margin: 0 !default;
$select-width-item-border: 0px;
$select-padding-x: $padding-base-horizontal;
$select-padding-y: $padding-base-vertical;
$select-padding-dropdown-item-x: $padding-base-horizontal;
$select-padding-dropdown-item-y: 3px;
$select-padding-item-x: 5px;
$select-padding-item-y: 1px;
$select-margin-item-x: 3px;
$select-margin-item-y: 3px;
$selectize-arrow-size: 5px !default;
$selectize-arrow-color: $selectize-color-text !default;
$selectize-arrow-offset: $selectize-padding-x + 5px !default;
$select-arrow-size: 5px;
$select-arrow-color: $select-color-text;
$select-arrow-offset: $select-padding-x + 5px;
@import "selectize";
//Import Plugins
@import "plugins/drag_drop";
@import "plugins/dropdown_header";
@import "plugins/optgroup_columns";
@import "plugins/remove_button";
.selectize-dropdown, .selectize-dropdown.form-control {
height: auto;
padding: 0;
margin: 2px 0 0 0;
z-index: $zindex-dropdown;
background: $selectize-color-dropdown;
color: $selectize-color-dropdown-text;
border: 1px solid $dropdown-fallback-border;
border: 1px solid $dropdown-border;
@include selectize-border-radius ($border-radius-base);
@include selectize-box-shadow (0 6px 12px rgba(black, .175));
.#{$selectize}-dropdown,
.#{$selectize}-dropdown.form-control {
height: auto;
padding: 0;
margin: 2px 0 0 0;
z-index: $zindex-dropdown;
background: $select-color-dropdown;
border: 1px solid $dropdown-fallback-border;
border: 1px solid $dropdown-border;
border-radius: $border-radius-base;
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
}
.selectize-dropdown {
.optgroup-header {
font-size: $font-size-small;
line-height: $line-height-base;
}
.optgroup:first-child:before {
display: none;
}
.optgroup:before {
content: ' ';
display: block;
@include nav-divider;
margin-left: $selectize-padding-dropdown-item-x * -1;
margin-right: $selectize-padding-dropdown-item-x * -1;
}
.#{$selectize}-dropdown {
.optgroup-header {
font-size: $font-size-small;
line-height: $line-height-base;
}
.optgroup:first-child:before {
display: none;
}
.optgroup:before {
content: " ";
display: block;
@include nav-divider();
margin-left: $select-padding-dropdown-item-x * -1;
margin-right: $select-padding-dropdown-item-x * -1;
}
}
.selectize-dropdown-content {
padding: 5px 0;
.#{$selectize}-dropdown-content {
padding: 5px 0;
}
.selectize-dropdown-header {
padding: $selectize-padding-dropdown-item-y * 2 $selectize-padding-dropdown-item-x;
.#{$selectize}-dropdown-emptyoptionlabel {
text-align: center;
}
.selectize-input {
min-height: $input-height-base;
.#{$selectize}-input {
min-height: $input-height-base;
&.dropdown-active {
@include selectize-border-radius ($selectize-border-radius);
&.dropdown-active {
border-radius: $select-border-radius;
}
&.dropdown-active::before {
display: none;
}
&.focus {
$color: $input-border-focus;
$color-rgba: rgba(red($color), green($color), blue($color), 0.6);
border-color: $color;
outline: 0;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px $color-rgba;
}
}
.has-error .#{$selectize}-input {
border-color: $select-color-input-error;
box-shadow: $select-shadow-input-error;
&:focus {
border-color: $select-color-input-error-focus;
box-shadow: $select-shadow-input-error-focus;
}
}
.#{$selectize}-control {
&.multi {
.#{$selectize}-input.has-items {
padding-left: $select-padding-x - $select-padding-item-x;
padding-right: $select-padding-x - $select-padding-item-x;
}
&.dropdown-active::before {
display: none;
}
&.focus {
$color: $input-border-focus;
$color-rgba: rgba(red($color), green($color), blue($color), .6);
border-color: $color;
outline: 0;
@include selectize-box-shadow ("inset 0 1px 1px rgba(black, .075), 0 0 8px #{$color-rgba}");
.#{$selectize}-input > div {
border-radius: $select-border-radius - 1px;
}
}
}
.has-error .selectize-input {
border-color: $selectize-color-input-error;
@include selectize-box-shadow ($selectize-shadow-input-error);
&:focus {
border-color: $selectize-color-input-error-focus;
@include selectize-box-shadow ($selectize-shadow-input-error-focus);
}
}
.selectize-control {
&.multi {
.selectize-input.has-items {
padding-left: $selectize-padding-x - $selectize-padding-item-x;
padding-right: $selectize-padding-x - $selectize-padding-item-x;
}
.selectize-input > div {
@include selectize-border-radius ($selectize-border-radius - 1px);
}
}
}
.form-control.selectize-control {
padding: 0;
height: auto;
border: none;
background: none;
@include selectize-box-shadow (none);
@include selectize-border-radius (0);
.form-control.#{$selectize}-control {
padding: 0;
height: auto;
border: none;
background: none;
box-shadow: none;
border-radius: 0;
}

View File

@@ -1,118 +1,112 @@
/**
* Selectize bootstrap 4
*/
//Import Boostrap 4 functions and variables
$enable-shadows: true !default;
$selectize-font-family: inherit !default;
$selectize-font-size: inherit !default;
$selectize-line-height: $input-btn-line-height !default; //formerly line-height-computed
$select-font-family: inherit !default;
$select-font-size: inherit !default;
$select-line-height: $input-btn-line-height !default; //formerly line-height-computed
$selectize-color-text: $input-color !default;
$selectize-color-highlight: rgba(255,237,40,0.4) !default;
$selectize-color-input: $input-bg !default;
$selectize-color-input-full: $input-bg !default;
$selectize-color-input-error: $danger !default;
$selectize-color-input-error-focus: darken($selectize-color-input-error, 10%) !default;
$selectize-color-disabled: $input-bg !default;
$selectize-color-item: mix($selectize-color-input, $selectize-color-text, 90%) !default;
$selectize-color-item-border: $input-border-color !default;
$selectize-color-item-active: $component-active-bg !default;
$selectize-color-item-active-text: color-contrast($selectize-color-item-active) !default;
$selectize-color-item-active-border: rgba(0,0,0,0) !default;
$selectize-color-optgroup: $dropdown-bg !default;
$selectize-color-optgroup-text: $dropdown-header-color !default;
$selectize-color-optgroup-border: $dropdown-divider-bg !default;
$selectize-color-dropdown: $dropdown-bg !default;
$selectize-color-dropdown-text: $dropdown-link-color !default;
$selectize-color-dropdown-border-top: mix($input-border-color, $input-bg, 0.8) !default;
$selectize-color-dropdown-item-active: $dropdown-link-hover-bg !default;
$selectize-color-dropdown-item-active-text: $dropdown-link-hover-color !default;
$selectize-color-dropdown-item-create-active-text: $dropdown-link-hover-color !default;
$selectize-opacity-disabled: 0.5 !default;
$selectize-shadow-input: none !default;
$selectize-shadow-input-focus: inset 0 1px 2px rgba(0,0,0,0.15) !default;
$selectize-shadow-input-error: inset 0 1px 1px rgba(0, 0, 0, .075) !default;
$selectize-shadow-input-error-focus: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px lighten($selectize-color-input-error, 20%) !default;
$selectize-border: 1px solid $input-border-color !default;
$selectize-border-radius: $input-border-radius !default;
$select-color-text: gray("800") !default; //$gray-800
$select-color-highlight: rgba(255, 237, 40, 0.4) !default;
$select-color-input: $input-bg !default;
$select-color-input-full: $input-bg !default;
$select-color-input-error: theme-color("danger") !default;
$select-color-input-error-focus: darken(
$select-color-input-error,
10%
) !default;
$select-color-disabled: $input-bg !default;
$select-color-item: RGBA($select-color-text, 0.1) !default;
$select-color-item-border: $border-color !default;
$select-color-item-active: $component-active-bg !default;
$select-color-item-active-text: color-contrast($select-color-item-active) !default;
$select-color-item-active-border: rgba(0, 0, 0, 0) !default;
$select-color-optgroup: $dropdown-bg !default;
$select-color-optgroup-text: $dropdown-header-color !default;
$select-color-optgroup-border: $dropdown-divider-bg !default;
$select-color-dropdown: $dropdown-bg !default;
$select-color-dropdown-border-top: mix(
$input-border-color,
$input-bg,
80%
) !default;
$select-color-dropdown-item-active: $dropdown-link-hover-bg !default;
$select-color-dropdown-item-active-text: $dropdown-link-hover-color !default;
$select-color-dropdown-item-create-active-text: $dropdown-link-hover-color !default;
$select-opacity-disabled: 0.5 !default;
$select-shadow-input: none !default;
$select-shadow-input-focus: inset 0 1px 2px rgba(0, 0, 0, 0.15) !default;
$select-shadow-input-error: inset 0 1px 1px rgba(0, 0, 0, 0.075) !default;
$select-shadow-input-error-focus: inset 0 1px 1px rgba(0, 0, 0, 0.075),
0 0 6px lighten($select-color-input-error, 20%) !default;
$select-border: 1px solid $input-border-color !default;
$select-border-radius: $input-border-radius !default;
$selectize-width-item-border: 0px !default;
$selectize-padding-x: $input-btn-padding-x !default;
$selectize-padding-y: $input-btn-padding-y !default;
$selectize-padding-dropdown-item-x: $input-btn-padding-x !default;
$selectize-padding-dropdown-item-y: 3px !default;
$selectize-padding-item-x: 3px !default;
$selectize-padding-item-y: 1px !default;
$selectize-margin-item-x: 3px !default;
$selectize-margin-item-y: 3px !default;
$selectize-caret-margin: 0 !default;
$selectize-arrow-size: 5px !default;
$selectize-arrow-color: $selectize-color-text !default;
$selectize-arrow-offset: calc(#{$selectize-padding-x} + 5px) !default;
$select-width-item-border: 0px !default;
$select-padding-x: $input-btn-padding-x !default;
$select-padding-y: $input-btn-padding-y !default;
$select-padding-dropdown-item-x: $input-btn-padding-x !default;
$select-padding-dropdown-item-y: 3px !default;
$select-padding-item-x: 5px !default;
$select-padding-item-y: 1px !default;
$select-margin-item-x: 3px !default;
$select-margin-item-y: 3px !default;
$select-arrow-size: 5px !default;
$select-arrow-color: $select-color-text !default;
$select-arrow-offset: calc(#{$select-padding-x} + 5px) !default;
@import "selectize";
//Import Plugins
@import "plugins/drag_drop";
@import "plugins/dropdown_header";
@import "plugins/optgroup_columns";
@import "plugins/remove_button";
.selectize-dropdown, .selectize-dropdown.form-control {
.#{$selectize}-dropdown,
.#{$selectize}-dropdown.form-control {
height: auto;
padding: 0;
margin: 2px 0 0 0;
z-index: $zindex-dropdown;
background: $selectize-color-dropdown;
color: $selectize-color-dropdown-text;
background: $select-color-dropdown;
border: 1px solid $dropdown-border-color; //$dropdown-fallback-border
@include selectize-border-radius($border-radius);
@include selectize-box-shadow(0 6px 12px rgba(0,0,0,.175));
border-radius: $border-radius;
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
}
.selectize-dropdown {
.#{$selectize}-dropdown {
.optgroup-header {
font-size: $font-size-sm;
line-height: $line-height-base;
font-size: $font-size-sm;
line-height: $line-height-base;
}
.optgroup:first-child:before {
display: none;
display: none;
}
.optgroup:before {
content: ' ';
display: block;
height: 0;
margin: $dropdown-divider-margin-y 0;
overflow: hidden;
border-top: 1px solid $dropdown-divider-bg;
margin-left: $selectize-padding-dropdown-item-x * -1;
margin-right: $selectize-padding-dropdown-item-x * -1;
content: " ";
display: block;
height: 0;
margin: $dropdown-divider-margin-y 0;
overflow: hidden;
border-top: 1px solid $dropdown-divider-bg;
margin-left: $select-padding-dropdown-item-x * -1;
margin-right: $select-padding-dropdown-item-x * -1;
}
.create {
padding-left: $selectize-padding-dropdown-item-x;
padding-left: $select-padding-dropdown-item-x;
}
}
.selectize-dropdown-content {
.#{$selectize}-dropdown-content {
padding: 5px 0;
}
.selectize-dropdown-header {
padding: $selectize-padding-dropdown-item-y * 2 $selectize-padding-dropdown-item-x;
.#{$selectize}-dropdown-emptyoptionlabel {
text-align: center;
}
.selectize-input {
.#{$selectize}-input {
min-height: $input-height;
@include box-shadow($input-box-shadow);
@include transition($input-transition);
&.dropdown-active {
@include selectize-border-radius($selectize-border-radius);
border-radius: $select-border-radius;
}
&.dropdown-active::before {
display: none;
@@ -128,22 +122,21 @@ $selectize-arrow-offset: calc(#{$selectize-padding-x} + 5px) !default;
}
}
.is-invalid .selectize-input {
border-color: $selectize-color-input-error;
@include selectize-box-shadow($selectize-shadow-input-error);
.is-invalid .#{$selectize}-input {
border-color: $select-color-input-error;
box-shadow: $select-shadow-input-error;
&:focus {
border-color: $selectize-color-input-error-focus;
// @include selectize-box-shadow(none)
@include selectize-box-shadow($selectize-shadow-input-error-focus);
border-color: $select-color-input-error-focus;
box-shadow: $select-shadow-input-error-focus;
}
}
.selectize-control {
&.form-control-sm{
.selectize-input.has-items{
.#{$selectize}-control {
&.form-control-sm {
.#{$selectize}-input.has-items {
min-height: $input-height-sm !important;
height: $input-height-sm !important;
height: $input-height-sm;
padding: $input-padding-y-sm $input-padding-x-sm !important;
font-size: $input-font-size-sm;
line-height: $input-line-height-sm;
@@ -151,26 +144,53 @@ $selectize-arrow-offset: calc(#{$selectize-padding-x} + 5px) !default;
}
&.multi {
.selectize-input.has-items {
padding-left: calc(#{$selectize-padding-x} - #{$selectize-padding-item-x});
padding-right: calc(#{$selectize-padding-x} - #{$selectize-padding-item-x});
}
.selectize-input > div {
@include selectize-border-radius(calc(#{$selectize-border-radius} - 1px));
}
.#{$selectize}-input.has-items {
height: auto;
padding-left: calc(#{$select-padding-x} - #{$select-padding-item-x});
padding-right: calc(#{$select-padding-x} - #{$select-padding-item-x});
}
.#{$selectize}-input > div {
border-radius: calc(#{$select-border-radius} - 1px);
}
}
}
.form-control.selectize-control {
.form-control.#{$selectize}-control {
padding: 0;
height: auto;
border: none;
background: none;
@include selectize-box-shadow(none);
@include selectize-border-radius(0);
box-shadow: none;
border-radius: 0;
}
.input-group .selectize-input {
overflow: unset;
@include selectize-border-radius(0 $selectize-border-radius $selectize-border-radius 0);
.input-group .#{$selectize}-control:not(:last-child) {
.#{$selectize}-input{
overflow: unset;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
}
.input-group .#{$selectize}-control:not(:first-child) {
.#{$selectize}-input{
overflow: unset;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
}
// .input-group .#{$selectize}-input {
// overflow: unset;
// border-radius: 0 $select-border-radius $select-border-radius 0;
// }
.#{selectize}-dropdown.plugin-auto_position.#{$selectize}-position-top {
border-top: $select-border!important;
border-bottom: $select-border!important;
border-radius: $select-border-radius!important;
}
.#{selectize}-control.plugin-auto_position .#{selectize}-input.#{$selectize}-position-top.dropdown-active {
border-radius: $select-border-radius!important;
border-top: $select-border!important;
}

View File

@@ -1,3 +1,200 @@
$input-line-height-sm: $form-select-line-height !default;
@import 'selectize.bootstrap4';
.selectize-control{padding:0;}
$enable-shadows: true !default;
$select-font-family: if($input-btn-font-family, $input-btn-font-family, inherit) !default;
$select-font-size: $input-btn-font-size !default;
$select-line-height: $input-btn-line-height !default; //formerly line-height-computed
$select-color-rgb: var(--bs-emphasis-color-rgb, 0, 0, 0) !default;
$select-color-text: RGBA($select-color-rgb, 0.83) !default;
$select-color-highlight: rgba(255, 237, 40, 0.4) !default;
$select-color-input: $input-bg !default;
$select-color-input-full: $input-bg !default;
$select-color-input-error: $danger !default;
$select-color-input-error-focus: darken(
$select-color-input-error,
10%
) !default;
$select-color-disabled: $input-bg !default;
$select-color-item: RGBA($select-color-rgb, 0.05) !default;
$select-color-item-border: $border-color !default;
$select-color-item-active: $component-active-bg !default;
$select-color-item-active-text: color-contrast($select-color-item-active) !default;
$select-color-item-active-border: rgba(0, 0, 0, 0) !default;
$select-color-optgroup: $dropdown-bg !default;
$select-color-optgroup-text: $dropdown-header-color !default;
$select-color-optgroup-border: $dropdown-divider-bg !default;
$select-color-dropdown: $dropdown-bg !default;
$select-color-dropdown-border-top: rgba($input-border-color, 0.8) !default;
$select-color-dropdown-item-active: $dropdown-link-hover-bg !default;
$select-color-dropdown-item-active-text: $dropdown-link-hover-color !default;
$select-color-dropdown-item-create-active-text: $dropdown-link-hover-color !default;
$select-opacity-disabled: 0.5 !default;
$select-shadow-input: none !default;
$select-shadow-input-focus: inset 0 1px 2px rgba(0, 0, 0, 0.15) !default;
$select-shadow-input-error: inset 0 1px 1px rgba(0, 0, 0, 0.075) !default;
$select-shadow-input-error-focus: inset 0 1px 1px rgba(0, 0, 0, 0.075),
0 0 6px lighten($select-color-input-error, 20%) !default;
$select-border: 1px solid $input-border-color !default;
$select-border-radius: $input-border-radius !default;
$select-width-item-border: 0px !default;
$select-padding-x: $input-btn-padding-x !default;
$select-padding-y: $input-btn-padding-y !default;
$select-padding-dropdown-item-x: $input-btn-padding-x !default;
$select-padding-dropdown-item-y: 3px !default;
$select-padding-item-x: 5px !default;
$select-padding-item-y: 1px !default;
$select-margin-item-x: 3px !default;
$select-margin-item-y: 3px !default;
$select-arrow-size: 5px !default;
$select-arrow-color: $select-color-text !default;
$select-arrow-offset: calc(#{$select-padding-x} + 5px) !default;
@import "selectize";
.#{$selectize}-dropdown,
.#{$selectize}-dropdown.form-control {
height: auto;
padding: 0;
margin: 2px 0 0 0;
z-index: $zindex-dropdown;
background: $select-color-dropdown;
border: 1px solid $dropdown-border-color; //$dropdown-fallback-border
border-radius: $border-radius;
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
}
.#{$selectize}-dropdown {
.optgroup-header {
font-size: $font-size-sm;
line-height: $line-height-base;
}
.optgroup:first-child:before {
display: none;
}
.optgroup:before {
content: " ";
display: block;
height: 0;
margin: $dropdown-divider-margin-y 0;
overflow: hidden;
border-top: 1px solid $dropdown-divider-bg;
margin-left: $select-padding-dropdown-item-x * -1;
margin-right: $select-padding-dropdown-item-x * -1;
}
.create {
padding-left: $select-padding-dropdown-item-x;
}
}
.#{$selectize}-dropdown-content {
padding: 5px 0;
}
.#{$selectize}-dropdown-emptyoptionlabel {
text-align: center;
}
.#{$selectize}-input {
min-height: $input-height;
@include box-shadow($input-box-shadow);
@include transition($input-transition);
&.dropdown-active {
border-radius: $select-border-radius;
}
&.dropdown-active::before {
display: none;
}
&.focus {
border-color: $input-focus-border-color;
outline: 0;
@if $enable-shadows {
box-shadow: $input-box-shadow, $input-focus-box-shadow;
} @else {
box-shadow: $input-focus-box-shadow;
}
}
}
.is-invalid .#{$selectize}-input {
border-color: $select-color-input-error;
box-shadow: $select-shadow-input-error;
&:focus {
border-color: $select-color-input-error-focus;
box-shadow: $select-shadow-input-error-focus;
}
}
.#{$selectize}-control {
&.form-control-sm {
.#{$selectize}-input {
min-height: $input-height-sm !important;
height: $input-height-sm;
padding: $input-padding-y-sm $input-padding-x-sm !important;
font-size: $input-font-size-sm;
line-height: $line-height-sm;
}
}
&.multi {
.#{$selectize}-input {
height: auto;
padding-left: calc(#{$select-padding-x} - #{$select-padding-item-x});
padding-right: calc(#{$select-padding-x} - #{$select-padding-item-x});
}
.#{$selectize}-input > div {
border-radius: calc(#{$select-border-radius} - 1px);
}
}
}
.form-select.#{$selectize}-control,
.form-control.#{$selectize}-control {
padding: 0;
height: auto;
border: none;
background: none;
box-shadow: none;
border-radius: 0;
}
.input-group>.input-group-append>.btn, .input-group>.form-control:not(:first-child) {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
.input-group>.input-group-prepend>.btn {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
.input-group .#{$selectize}-control:not(:last-child) {
.#{$selectize}-input{
overflow: unset;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
}
.input-group .#{$selectize}-control:not(:first-child) {
.#{$selectize}-input{
overflow: unset;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
}
.#{selectize}-dropdown.plugin-auto_position.#{$selectize}-position-top {
border-top: $select-border!important;
border-bottom: $select-border!important;
border-radius: $select-border-radius!important;
}
.#{selectize}-control.plugin-auto_position .#{selectize}-input.#{$selectize}-position-top.dropdown-active {
border-radius: $select-border-radius!important;
border-top: $select-border!important;
}

View File

@@ -1,84 +1,71 @@
/**
* selectize.default.css (v$$version) - Default Theme
* Copyright (c) 20132015 Brian Reavis & contributors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
* file except in compliance with the License. You may obtain a copy of the License at:
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
* ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*
* $author Brian Reavis <brian$thirdroute.com>
*/
$select-color-item: #1da7ee;
$select-color-item-text: #fff;
$select-color-item-active-text: #fff;
$select-color-item-border: #0073bb;
$select-color-item-active: #92c836;
$select-color-item-active-border: #00578d;
$select-width-item-border: 1px;
@import "selectize";
@import "selectize.scss";
$selectize-color-item: #1da7ee;
$selectize-color-item-text: #fff;
$selectize-color-item-active-text: #fff;
$selectize-color-item-border: #0073bb;
$selectize-color-item-active: #92c836;
$selectize-color-item-active-border: #00578d;
$selectize-width-item-border: 1px;
$selectize-caret-margin: 0 1px;
.selectize-control {
.#{$selectize}-control {
&.multi {
.selectize-input {
&.has-items {
$padding-x: $selectize-padding-x - 3px;
padding-left: $padding-x;
padding-right: $padding-x;
}
&.disabled [data-value] {
color: #999;
text-shadow: none;
background: none;
@include selectize-box-shadow(none);
.#{$selectize}-input {
&.has-items {
$padding-x: $select-padding-x - 3px;
padding-left: $padding-x;
padding-right: $padding-x;
}
&.disabled [data-value] {
color: #999;
text-shadow: none;
background: none;
box-shadow: none;
&, .remove {
border-color: #e6e6e6;
}
.remove {
background: none;
}
}
[data-value] {
text-shadow: 0 1px 0 rgba(0,51,83,0.3);
@include selectize-border-radius(3px);
@include selectize-vertical-gradient(#1da7ee, #178ee9);
@include selectize-box-shadow(#{"0 1px 0 rgba(0,0,0,0.2),inset 0 1px rgba(255,255,255,0.03)"});
&.active {
@include selectize-vertical-gradient(#008fd8, #0075cf);
}
}
}
&,
.remove {
border-color: #e6e6e6;
}
.remove {
background: none;
}
}
[data-value] {
text-shadow: 0 1px 0 rgba(0, 51, 83, 0.3);
border-radius: 3px;
@include selectize-vertical-gradient(#1da7ee, #178ee9);
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2),
inset 0 1px rgba(255, 255, 255, 0.03);
&.active {
@include selectize-vertical-gradient(#008fd8, #0075cf);
}
}
}
}
&.single {
.selectize-input {
@include selectize-box-shadow(#{"0 1px 0 rgba(0,0,0,0.05), inset 0 1px 0 rgba(255,255,255,0.8)"});
@include selectize-vertical-gradient(#fefefe, #f2f2f2);
}
.#{$selectize}-input {
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05),
inset 0 1px 0 rgba(255, 255, 255, 0.8);
@include selectize-vertical-gradient(#fefefe, #f2f2f2);
}
}
}
.selectize-control.single .selectize-input, .selectize-dropdown.single {
.#{$selectize}-control.single .#{$selectize}-input,
.#{$selectize}-dropdown.single {
border-color: #b8b8b8;
}
.selectize-dropdown {
.#{$selectize}-dropdown {
.optgroup-header {
padding-top: $selectize-padding-dropdown-item-y + 2px;
font-weight: bold;
font-size: 0.85em;
padding-top: $select-padding-dropdown-item-y + 2px;
font-weight: bold;
font-size: 0.85em;
}
.optgroup {
border-top: 1px solid $selectize-color-dropdown-border-top;
&:first-child {
border-top: 0 none;
}
border-top: 1px solid $select-color-dropdown-border-top;
&:first-child {
border-top: 0 none;
}
}
}
}

View File

@@ -1,300 +1,364 @@
@use "sass:math";
// base styles
$selectize: "selectize" !default;
$select-font-family: inherit !default;
$select-font-smoothing: inherit !default;
$select-font-size: 13px !default;
$select-line-height: 18px !default;
$selectize-font-family: inherit !default;
$selectize-font-smoothing: inherit !default;
$selectize-font-size: 13px !default;
$selectize-line-height: 18px !default;
$select-color-rgb: 0,0,0 !default;
$select-color-text: RGBA($select-color-rgb, 0.83) !default;
$select-color-border: #d0d0d0 !default;
$select-color-highlight: rgba(125, 168, 208, 0.2) !default;
$select-color-input: #fff !default;
$select-color-input-full: $select-color-input !default;
$select-color-disabled: #fafafa !default;
$select-color-item: #f2f2f2 !default;
$select-color-item-text: $select-color-text !default;
$select-color-item-border: #d0d0d0 !default;
$select-color-item-active: #e8e8e8 !default;
$select-color-item-active-text: $select-color-text !default;
$select-color-item-active-border: #cacaca !default;
$select-color-dropdown: #fff !default;
$select-color-dropdown-border: $select-color-border !default;
$select-color-dropdown-border-top: #f0f0f0 !default;
$select-color-dropdown-item-active: #f5fafd !default;
$select-color-dropdown-item-active-text: #495c68 !default;
$select-color-dropdown-item-create-text: RGBA($select-color-rgb, 0.5) !default;
$select-color-dropdown-item-create-active-text: $select-color-dropdown-item-active-text !default;
$select-color-optgroup: $select-color-dropdown !default;
$select-color-optgroup-text: $select-color-text !default;
$select-lighten-disabled-item: 30% !default;
$select-lighten-disabled-item-text: 30% !default;
$select-lighten-disabled-item-border: 30% !default;
$select-opacity-disabled: 0.5 !default;
$selectize-color-text: #303030 !default;
$selectize-color-border: #d0d0d0 !default;
$selectize-color-highlight: rgba(125,168,208,0.2) !default;
$selectize-color-input: #fff !default;
$selectize-color-input-full: $selectize-color-input !default;
$selectize-color-disabled: #fafafa !default;
$selectize-color-item: #f2f2f2 !default;
$selectize-color-item-text: $selectize-color-text !default;
$selectize-color-item-border: #d0d0d0 !default;
$selectize-color-item-active: #e8e8e8 !default;
$selectize-color-item-active-text: $selectize-color-text !default;
$selectize-color-item-active-border: #cacaca !default;
$selectize-color-dropdown: #fff !default;
$selectize-color-dropdown-border: $selectize-color-border !default;
$selectize-color-dropdown-border-top: #f0f0f0 !default;
$selectize-color-dropdown-item-active: #f5fafd !default;
$selectize-color-dropdown-item-active-text: #495c68 !default;
$selectize-color-dropdown-item-create-text: rgba(red($selectize-color-text), green($selectize-color-text), blue($selectize-color-text), 0.5) !default;
$selectize-color-dropdown-item-create-active-text: $selectize-color-dropdown-item-active-text !default;
$selectize-color-optgroup: $selectize-color-dropdown !default;
$selectize-color-optgroup-text: $selectize-color-text !default;
$selectize-lighten-disabled-item: 30% !default;
$selectize-lighten-disabled-item-text: 30% !default;
$selectize-lighten-disabled-item-border: 30% !default;
$selectize-opacity-disabled: 0.5 !default;
$select-shadow-input: inset 0 1px 1px rgba(0, 0, 0, 0.1) !default;
$select-shadow-input-focus: inset 0 1px 2px rgba(0, 0, 0, 0.15) !default;
$select-border: 1px solid $select-color-border !default;
$select-dropdown-border: 1px solid $select-color-dropdown-border !default;
$select-border-radius: 3px !default;
$selectize-shadow-input: inset 0 1px 1px rgba(0,0,0,0.1) !default;
$selectize-shadow-input-focus: inset 0 1px 2px rgba(0,0,0,0.15) !default;
$selectize-border: 1px solid $selectize-color-border !default;
$selectize-dropdown-border: 1px solid $selectize-color-dropdown-border !default;
$selectize-border-radius: 3px !default;
$select-width-item-border: 0px !default;
$select-max-height-dropdown: 200px !default;
$selectize-width-item-border: 0 !default;
$selectize-max-height-dropdown: 200px !default;
$select-padding-x: 8px !default;
$select-padding-y: 8px !default;
$select-padding-item-x: 6px !default;
$select-padding-item-y: 2px !default;
$select-padding-dropdown-item-x: $select-padding-x !default;
$select-padding-dropdown-item-y: 5px !default;
$select-margin-item-x: 3px !default;
$select-margin-item-y: 3px !default;
$selectize-padding-x: 8px !default;
$selectize-padding-y: 8px !default;
$selectize-padding-item-x: 6px !default;
$selectize-padding-item-y: 2px !default;
$selectize-padding-dropdown-item-x: $selectize-padding-x !default;
$selectize-padding-dropdown-item-y: 5px !default;
$selectize-margin-item-x: 3px !default;
$selectize-margin-item-y: 3px !default;
$select-arrow-size: 5px !default;
$select-arrow-color: #808080 !default;
$select-arrow-offset: 15px !default;
$selectize-arrow-size: 5px !default;
$selectize-arrow-color: #808080 !default;
$selectize-arrow-offset: 15px !default;
$select-caret-margin: 0 0px !default;
$select-caret-margin-rtl: 0 4px 0 -2px !default;
$selectize-caret-margin: 0 2px 0 0 !default;
$selectize-caret-margin-rtl: 0 4px 0 -2px !default;
$select-spinner-size: 30px;
$select-spinner-border-size: 5px;
$select-spinner-border-color: $select-color-border;
@mixin selectize-border-radius($radii){
@if mixin-exists("border-radius") {
@include border-radius($radii)
} @else {
border-radius: $radii;
}
}
@mixin selectize-unselectable(){
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
@mixin selectize-box-shadow($shadow){
-webkit-box-shadow: $shadow;
box-shadow: $shadow;
}
@mixin selectize-box-sizing($type: border-box){
-webkit-box-sizing: $type;
-moz-box-sizing: $type;
box-sizing: $type;
}
@mixin selectize-vertical-gradient($color-top, $color-bottom){
@mixin selectize-vertical-gradient($color-top, $color-bottom) {
background-color: mix($color-top, $color-bottom, 60%);
background-image: -moz-linear-gradient(top, $color-top, $color-bottom); // FF 3.6+
background-image: -webkit-gradient(linear, 0 0, 0 100%, from($color-top), to($color-bottom)); // Safari 4+, Chrome 2+
background-image: -webkit-linear-gradient(top, $color-top, $color-bottom); // Safari 5.1+, Chrome 10+
background-image: -o-linear-gradient(top, $color-top, $color-bottom); // Opera 11.10
background-image: linear-gradient(to bottom, $color-top, $color-bottom); // Standard, IE10
background-image: linear-gradient(to bottom, $color-top, $color-bottom);
background-repeat: repeat-x;
//filter: e(%("progid:DXImageTransform.Microsoft@include gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb($color-top),argb($color-bottom))); // IE9 and down
}
.selectize-control {
@import "plugins/drag_drop.scss";
@import "plugins/dropdown_header.scss";
@import "plugins/optgroup_columns.scss";
@import "plugins/remove_button.scss";
@import "plugins/clear_button.scss";
@import "plugins/auto_position.scss";
.#{$selectize}-control {
position: relative;
}
.selectize-dropdown, .selectize-input, .selectize-input input {
color: $selectize-color-text;
font-family: $selectize-font-family;
font-size: $selectize-font-size;
line-height: $selectize-line-height;
-webkit-font-smoothing: $selectize-font-smoothing;
.#{$selectize}-dropdown,
.#{$selectize}-input,
.#{$selectize}-input input {
color: $select-color-text;
font-family: $select-font-family;
font-size: $select-font-size;
line-height: $select-line-height;
font-smoothing: $select-font-smoothing;
}
.selectize-input, .selectize-control.single .selectize-input.input-active {
background: $selectize-color-input;
.#{$selectize}-input,
.#{$selectize}-control.single .#{$selectize}-input.input-active {
background: $select-color-input;
cursor: text;
display: inline-block;
}
.selectize-input {
border: $selectize-border;
padding: $selectize-padding-y $selectize-padding-x;
.#{$selectize}-input {
border: $select-border;
padding: $select-padding-y $select-padding-x;
display: inline-block;
width: 100%;
overflow: hidden;
// overflow: hidden;
position: relative;
z-index: 1;
@include selectize-box-sizing(border-box);
@include selectize-box-shadow($selectize-shadow-input);
@include selectize-border-radius($selectize-border-radius);
box-sizing: border-box;
box-shadow: $select-shadow-input;
border-radius: $select-border-radius;
.selectize-control.multi &.has-items {
$padding-x: $selectize-padding-x;
$padding-top: calc(#{$selectize-padding-y} - #{$selectize-padding-item-y} - #{$selectize-width-item-border});
$padding-bottom: calc(#{$selectize-padding-y} - #{$selectize-padding-item-y} - #{$selectize-margin-item-y} - #{$selectize-width-item-border});
padding: $padding-top $padding-x $padding-bottom;
.#{$selectize}-control.multi &.has-items {
$padding-x: $select-padding-x;
$padding-top: calc(
#{$select-padding-y} - #{$select-padding-item-y} - #{$select-width-item-border}
);
$padding-bottom: calc(
#{$select-padding-y} - #{$select-padding-item-y} - #{$select-margin-item-y} -
#{$select-width-item-border}
);
padding: $padding-top $padding-x $padding-bottom;
}
&.full {
background-color: $selectize-color-input-full;
background-color: $select-color-input-full;
}
&.disabled, &.disabled * {
cursor: default !important;
&.disabled,
&.disabled * {
cursor: default !important;
}
&.focus {
@include selectize-box-shadow($selectize-shadow-input-focus);
box-shadow: $select-shadow-input-focus;
}
&.dropdown-active {
@include selectize-border-radius($selectize-border-radius $selectize-border-radius 0 0);
border-radius: $select-border-radius $select-border-radius 0 0;
}
> * {
vertical-align: baseline;
display: -moz-inline-stack;
display: inline-block;
zoom: 1;
*display: inline;
vertical-align: baseline;
display: inline-block;
zoom: 1;
}
.selectize-control.multi & > div {
cursor: pointer;
margin: 0 $selectize-margin-item-x $selectize-margin-item-y 0;
padding: $selectize-padding-item-y $selectize-padding-item-x;
background: $selectize-color-item;
color: $selectize-color-item-text;
border: $selectize-width-item-border solid $selectize-color-item-border;
.#{$selectize}-control.multi & > div {
cursor: pointer;
margin: 0 $select-margin-item-x $select-margin-item-y 0;
padding: $select-padding-item-y $select-padding-item-x;
background: $select-color-item;
color: $select-color-item-text;
border: $select-width-item-border solid $select-color-item-border;
&.active {
background: $selectize-color-item-active;
color: $selectize-color-item-active-text;
border: $selectize-width-item-border solid $selectize-color-item-active-border;
}
&.active {
background: $select-color-item-active;
color: $select-color-item-active-text;
border: $select-width-item-border solid $select-color-item-active-border;
}
}
.selectize-control.multi &.disabled > div {
&, &.active {
color: lighten(desaturate($selectize-color-item-text, 100%), $selectize-lighten-disabled-item-text);
background: lighten(desaturate($selectize-color-item, 100%), $selectize-lighten-disabled-item);
border: $selectize-width-item-border solid lighten(desaturate($selectize-color-item-border, 100%), $selectize-lighten-disabled-item-border);
}
.#{$selectize}-control.multi &.disabled > div {
&,
&.active {
color: lighten(gray, $select-lighten-disabled-item-text);
background: lighten(gray, $select-lighten-disabled-item);
border: $select-width-item-border solid
lighten(gray, $select-lighten-disabled-item-border);
}
}
> input {
&::-ms-clear {
display: none;
}
display: inline-block !important;
padding: 0 !important;
min-height: 0 !important;
max-height: none !important;
max-width: 100% !important;
margin: $selectize-caret-margin !important;
text-indent: 0 !important;
border: 0 none !important;
background: none !important;
line-height: inherit !important;
-webkit-user-select: auto !important;
@include selectize-box-shadow(none);
&:focus { outline: none !important; }
&::-ms-clear {
display: none;
}
display: inline-block !important;
padding: 0 !important;
min-height: 0 !important;
max-height: none !important;
max-width: 100% !important;
margin: 0 !important;
text-indent: 0 !important;
border: 0 none !important;
background: none !important;
line-height: inherit !important;
user-select: auto !important;
box-shadow: none !important;
&:focus {
outline: none !important;
}
&[placeholder] {
box-sizing: initial;
}
}
&.has-items > input {
margin: $select-caret-margin !important;
}
}
.selectize-input::after {
content: ' ';
.#{$selectize}-input::after {
content: " ";
display: block;
clear: left;
}
.selectize-input.dropdown-active::before {
content: ' ';
.#{$selectize}-input.dropdown-active::before {
content: " ";
display: block;
position: absolute;
background: $selectize-color-dropdown-border-top;
background: $select-color-dropdown-border-top;
height: 1px;
bottom: 0;
left: 0;
right: 0;
}
.selectize-dropdown {
.#{$selectize}-dropdown {
position: absolute;
top: 100%;
left: 0;
width: 100%;
z-index: 10;
border: $selectize-dropdown-border;
background: $selectize-color-dropdown;
border: $select-dropdown-border;
background: $select-color-dropdown;
margin: -1px 0 0 0;
border-top: 0 none;
@include selectize-box-sizing(border-box);
@include selectize-box-shadow(0 1px 3px rgba(0,0,0,0.1));
@include selectize-border-radius(0 0 $selectize-border-radius $selectize-border-radius);
box-sizing: border-box;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
border-radius: 0 0 $select-border-radius $select-border-radius;
[data-selectable] {
cursor: pointer;
overflow: hidden;
.highlight {
background: $selectize-color-highlight;
@include selectize-border-radius(1px);
}
cursor: pointer;
overflow: hidden;
.highlight {
background: $select-color-highlight;
border-radius: 1px;
}
}
.option, .optgroup-header {
padding: $selectize-padding-dropdown-item-y $selectize-padding-dropdown-item-x;
.option,
.optgroup-header,
.no-results,
.create {
padding: $select-padding-dropdown-item-y $select-padding-dropdown-item-x;
}
.option, [data-disabled], [data-disabled] [data-selectable].option {
cursor: inherit;
opacity: 0.5;
.option,
[data-disabled],
[data-disabled] [data-selectable].option {
cursor: inherit;
opacity: 0.5;
}
[data-selectable].option {
opacity: 1;
opacity: 1;
cursor: pointer;
}
.optgroup:first-child .optgroup-header {
border-top: 0 none;
border-top: 0 none;
}
.optgroup-header {
color: $selectize-color-optgroup-text;
background: $selectize-color-optgroup;
cursor: default;
color: $select-color-optgroup-text;
background: $select-color-optgroup;
cursor: default;
}
.active {
background-color: $selectize-color-dropdown-item-active;
color: $selectize-color-dropdown-item-active-text;
&.create {
color: $selectize-color-dropdown-item-create-active-text;
}
background-color: $select-color-item-active;
color: $select-color-item-active-text;
&.create {
color: $select-color-dropdown-item-create-active-text;
}
}
.selected {
background-color: $select-color-item-active;
color: $select-color-item-active-text;
}
.create {
color: $selectize-color-dropdown-item-create-text;
color: $select-color-dropdown-item-create-text;
}
.active:not(.selected) {
background: $select-color-dropdown-item-active;
color: $select-color-dropdown-item-active-text;
}
}
.selectize-dropdown-content {
.#{$selectize}-dropdown-content {
overflow-y: auto;
overflow-x: hidden;
max-height: $selectize-max-height-dropdown;
-webkit-overflow-scrolling: touch;
max-height: $select-max-height-dropdown;
overflow-scrolling: touch;
}
.selectize-control.single .selectize-input {
&, input { cursor: pointer; }
&.input-active, &.input-active input { cursor: text; }
.#{$selectize}-dropdown-emptyoptionlabel {
text-align: center;
}
.#{$selectize}-dropdown .spinner {
display: inline-block;
width: $select-spinner-size;
height: $select-spinner-size;
margin: $select-padding-dropdown-item-y $select-padding-dropdown-item-x;
&:after {
content: ' ';
display: block;
position: absolute;
top: 50%;
right: $selectize-arrow-offset;
margin-top: round((-1 * $selectize-arrow-size / 2));
width: 0;
height: 0;
border-style: solid;
border-width: $selectize-arrow-size $selectize-arrow-size 0 $selectize-arrow-size;
border-color: $selectize-arrow-color transparent transparent transparent;
content: " ";
display: block;
width: $select-spinner-size * 0.8;
height: $select-spinner-size * 0.8;
margin: $select-spinner-size * 0.1;
border-radius: 50%;
border: $select-spinner-border-size solid $select-spinner-border-color;
border-color: $select-spinner-border-color transparent
$select-spinner-border-color transparent;
animation: lds-dual-ring 1.2s linear infinite;
}
&.dropdown-active:after {
margin-top: $selectize-arrow-size * -0.8;
border-width: 0 $selectize-arrow-size $selectize-arrow-size $selectize-arrow-size;
border-color: transparent transparent $selectize-arrow-color transparent;
@keyframes lds-dual-ring {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
}
.selectize-control.rtl {
&.single .selectize-input:after {
left: $selectize-arrow-offset;
right: auto;
.#{$selectize}-control.single .#{$selectize}-input {
&,
input {
cursor: pointer;
}
.selectize-input > input {
margin: $selectize-caret-margin-rtl !important;
&.input-active,
&.input-active input:not(:read-only) {
cursor: text;
}
&:not(.no-arrow):after {
content: " ";
display: block;
position: absolute;
top: 50%;
right: $select-arrow-offset;
margin-top: round(divide(-1 * $select-arrow-size, 2));
width: 0;
height: 0;
border-style: solid;
border-width: $select-arrow-size $select-arrow-size 0 $select-arrow-size;
border-color: $select-arrow-color transparent transparent transparent;
}
&:not(.no-arrow).dropdown-active:after {
margin-top: $select-arrow-size * -0.8;
border-width: 0 $select-arrow-size $select-arrow-size $select-arrow-size;
border-color: transparent transparent $select-arrow-color transparent;
}
}
.selectize-control .selectize-input.disabled {
opacity: $selectize-opacity-disabled;
background-color: $selectize-color-disabled;
.#{$selectize}-control.rtl {
text-align: right;
&.single .#{$selectize}-input:after {
left: $select-arrow-offset;
right: auto;
}
.#{$selectize}-input > input {
margin: $select-caret-margin-rtl !important;
}
}
.#{$selectize}-control .#{$selectize}-input.disabled {
opacity: $select-opacity-disabled;
background-color: $select-color-disabled;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,2 +1,2 @@
/*! shiny 1.7.4.9003 | (c) 2012-2023 RStudio, PBC. | License: GPL-3 | file LICENSE */
/*! shiny 1.7.5.9000 | (c) 2012-2023 RStudio, PBC. | License: GPL-3 | file LICENSE */
#showcase-well{border-radius:0}.shiny-code{background-color:#fff;margin-bottom:0}.shiny-code code{font-family:Menlo,Consolas,Courier New,monospace}.shiny-code-container{margin-top:20px;clear:both}.shiny-code-container h3{display:inline;margin-right:15px}.showcase-header{font-size:16px;font-weight:400}.showcase-code-link{text-align:right;padding:15px}#showcase-app-container{vertical-align:top}#showcase-code-tabs{margin-right:15px}#showcase-code-tabs pre{border:none;line-height:1em}#showcase-code-tabs .nav,#showcase-code-tabs ul{margin-bottom:0}#showcase-code-tabs .tab-content{border-style:solid;border-color:#e5e5e5;border-width:0px 1px 1px 1px;overflow:auto;border-bottom-right-radius:4px;border-bottom-left-radius:4px}#showcase-app-code{width:100%}#showcase-code-position-toggle{float:right}#showcase-sxs-code{padding-top:20px;vertical-align:top}.showcase-code-license{display:block;text-align:right}#showcase-code-content pre{background-color:#fff}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,3 +1,3 @@
/*! shiny 1.7.4.9003 | (c) 2012-2023 RStudio, PBC. | License: GPL-3 | file LICENSE */
"use strict";(function(){var a=eval;window.addEventListener("message",function(i){var e=i.data;e.code&&a(e.code)});})();
/*! shiny 1.7.5.9000 | (c) 2012-2023 RStudio, PBC. | License: GPL-3 | file LICENSE */
"use strict";(()=>{var t=eval;window.addEventListener("message",function(a){let e=a.data;e.code&&t(e.code)});})();
//# sourceMappingURL=shiny-testmode.js.map

View File

@@ -1,7 +1,7 @@
{
"version": 3,
"sources": ["../../../srcts/src/utils/eval.ts", "../../../srcts/extras/shiny-testmode.ts"],
"sourcesContent": ["//esbuild.github.io/content-types/#direct-eval\n//tl/dr;\n// * Direct usage of `eval(\"x\")` is bad with bundled code.\n// * Instead, use indirect calls to `eval` such as `indirectEval(\"x\")`\n// * Even just renaming the function works well enough.\n// > This is known as \"indirect eval\" because eval is not being called directly, and so does not trigger the grammatical special case for direct eval in the JavaScript VM. You can call indirect eval using any syntax at all except for an expression of the exact form eval('x'). For example, var eval2 = eval; eval2('x') and [eval][0]('x') and window.eval('x') are all indirect eval calls.\n// > When you use indirect eval, the code is evaluated in the global scope instead of in the inline scope of the caller.\n\nvar indirectEval = eval;\nexport { indirectEval };", "/* eslint-disable unicorn/filename-case */\nimport { indirectEval } from \"../src/utils/eval\";\n\n// Listen for messages from parent frame. This file is only added when the\n// shiny.testmode option is TRUE.\nwindow.addEventListener(\"message\", function (e) {\n var message = e.data;\n if (message.code) indirectEval(message.code);\n});"],
"mappings": ";yBAQA,IAAIA,EAAe,KCHnB,OAAO,iBAAiB,UAAW,SAAUC,EAAG,CAC9C,IAAIC,EAAUD,EAAE,KACZC,EAAQ,MAAMC,EAAaD,EAAQ,IAAI,CAC7C,CAAC",
"sourcesContent": ["//esbuild.github.io/content-types/#direct-eval\n//tl/dr;\n// * Direct usage of `eval(\"x\")` is bad with bundled code.\n// * Instead, use indirect calls to `eval` such as `indirectEval(\"x\")`\n// * Even just renaming the function works well enough.\n// > This is known as \"indirect eval\" because eval is not being called directly, and so does not trigger the grammatical special case for direct eval in the JavaScript VM. You can call indirect eval using any syntax at all except for an expression of the exact form eval('x'). For example, var eval2 = eval; eval2('x') and [eval][0]('x') and window.eval('x') are all indirect eval calls.\n// > When you use indirect eval, the code is evaluated in the global scope instead of in the inline scope of the caller.\n\nconst indirectEval = eval;\n\nexport { indirectEval };\n", "/* eslint-disable unicorn/filename-case */\nimport { indirectEval } from \"../src/utils/eval\";\n\n// Listen for messages from parent frame. This file is only added when the\n// shiny.testmode option is TRUE.\nwindow.addEventListener(\"message\", function (e: { data: { code: string } }) {\n const message = e.data;\n\n if (message.code) indirectEval(message.code);\n});\n"],
"mappings": ";mBAQA,IAAMA,EAAe,KCHrB,OAAO,iBAAiB,UAAW,SAAUC,EAA+B,CAC1E,IAAMC,EAAUD,EAAE,KAEdC,EAAQ,MAAMC,EAAaD,EAAQ,IAAI,CAC7C,CAAC",
"names": ["indirectEval", "e", "message", "indirectEval"]
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,43 +1,46 @@
$bg: $body-bg !default;
$prefix: bs- !default; // BS5 CSS variable prefix
$fg: null !default;
$theme-colors: null !default;
@if variable-exists('text-color') {
$fg: $text-color !default; // BS3
$theme-colors: ("primary": $brand-primary, "info": $brand-info, "warning": $brand-warning, "danger": $brand-danger) !default;
} @else {
$fg: $body-color !default; // BS4
}
// No $border-width, $border-color, or $border-radius in BS3
// For BS3, which doesn't have these Sass variables (but has other, similar ones)
$border-width: 1px !default;
$border-color: mix($bg, $fg, 70%) !default;
$border-radius: $border-radius-base !default;
$border-color: mix($body-bg, $text-color, 70%) !default;
$primary: $brand-primary !default;
$info: $brand-info !default;
$warning: $brand-warning !default;
$danger: $brand-danger !default;
$shiny-disconnected-bg: mix($bg, $fg, 58%) !default;
$shiny-table-na: mix($bg, $fg, 54%) !default;
$shiny-error-validated-color: mix($bg, $fg, 50%) !default;
// TODO: what should this be? mix of primary and bg?
$shiny-progress-text-bg-color: #eef8ff !default;
$shiny-input-panel-bg: mix($bg, $fg, 96%) !default;
$shiny-input-panel-border: $border-width solid $border-color !default;
// No rgb CSS vars available in BS3-4
$primary-rgb: var(--#{$prefix}primary-rgb, red($primary),green($primary),blue($primary)) !default;
$info-rgb: var(--#{$prefix}info-rgb, red($info), green($info), blue($info)) !default;
$warning-rgb: var(--#{$prefix}warning-rgb, red($warning), green($warning), blue($warning)) !default;
$danger-rgb: var(--#{$prefix}danger-rgb, red($danger), green($danger), blue($danger)) !default;
$shiny-emphasis-color-rgb: var(--#{$prefix}emphasis-color-rgb, 0,0,0) !default;
$shiny-disconnected-bg: RGBA($shiny-emphasis-color-rgb, 0.42) !default;
$shiny-table-na: RGBA($shiny-emphasis-color-rgb, 0.46) !default;
$shiny-error-validated-color: RGBA($shiny-emphasis-color-rgb, 0.5) !default;
$shiny-progress-text-bg-color: RGBA($primary-rgb, 0.05) !default;
$shiny-input-panel-bg: RGBA($shiny-emphasis-color-rgb, 0.04) !default;
$shiny-input-panel-border: $border-width solid var(--#{$prefix}border-color, $border-color) !default;
$shiny-input-panel-border-radius: $border-radius !default;
$shiny-text-output-border-radius: $border-radius !default;
$notification-bg-color: mix($bg, $fg, 90%) !default;
$notification-color: $fg !default;
$notification-border: $border-width solid $border-color !default;
$notification-bg-color: RGBA($shiny-emphasis-color-rgb, 0.05) !default;
$notification-color: $shiny-emphasis-color-rgb !default;
$notification-border: $border-width solid var(--#{$prefix}border-color, $border-color) !default;
$notification-border-radius: $border-radius !default;
$notification-message-bg: mix($bg, map-get($theme-colors, "info"), 90%) !default;
$notification-message-color: mix($fg, map-get($theme-colors, "info"), 10%) !default;
$notification-message-border: $border-width solid mix($bg, map-get($theme-colors, "info"), 53%) !default;
$notification-warning-bg: mix($bg, map-get($theme-colors, "warning"), 90%) !default;
$notification-warning-color: mix($fg, map-get($theme-colors, "warning"), 10%) !default;
$notification-warning-border: $border-width solid mix($bg, map-get($theme-colors, "warning"), 71%) !default;
$notification-error-bg: mix($bg, map-get($theme-colors, "danger"), 90%) !default;
$notification-error-color: mix($fg, map-get($theme-colors, "danger"), 10%) !default;
$notification-error-border: $border-width solid mix($bg, map-get($theme-colors, "danger"), 79%) !default;
$notification-close-color: mix($bg, $fg, 20%) !default;
$notification-close-hover-color: $fg !default;
$notification-content-action-color: map-get($theme-colors, "primary") !default;
$notification-message-bg: RGBA($info-rgb, 0.05) !default;
$notification-message-color: RGBA($info-rgb, 1) !default;
$notification-message-border: $border-width solid RGBA($info-rgb, 0.5) !default;
$notification-warning-bg: RGBA($warning-rgb, 0.05) !default;
$notification-warning-color: RGBA($warning-rgb, 0.9) !default;
$notification-warning-border: $border-width solid RGBA($warning-rgb, 0.3) !default;
$notification-error-bg: RGBA($danger-rgb, 0.05) !default;
$notification-error-color: RGBA($danger-rgb, 0.9) !default;
$notification-error-border: $border-width solid RGBA($warning-rgb, 0.2) !default;
$notification-close-color: RGBA($shiny-emphasis-color-rgb, 0.8) !default;
$notification-close-hover-color: RGB($shiny-emphasis-color-rgb) !default;
$notification-content-action-color: RGB($primary-rgb) !default;
$datepicker-disabled-color: $dropdown-link-disabled-color !default;
// I don't think BS3 has a file input box shadow setting

View File

@@ -184,6 +184,12 @@ pre.shiny-text-output {
}
}
// fileInput()'s button should never have a top-right or bottom-right border-radius
.btn-file {
border-top-right-radius: 0 !important;
border-bottom-right-radius: 0 !important;
}
/* Make sure the filename doesn't extend past the bounds of the container */
.shiny-input-container input[type=file] {
overflow: hidden;
@@ -307,11 +313,6 @@ pre.shiny-text-output {
zoom: 1.0000001;
}
/* consistency with bootstrap.css for selectize.js */
.selectize-control {
margin-bottom: 10px;
}
.shiny-frame {
border: none;
}

View File

@@ -24,9 +24,9 @@ fileInput(
multiple files at once. \strong{Does not work on older browsers, including
Internet Explorer 9 and earlier.}}
\item{accept}{A character vector of "unique file type specifiers" which
gives the browser a hint as to the type of file the server expects.
Many browsers use this prevent the user from selecting an invalid file.
\item{accept}{A character vector of "unique file type specifiers" which gives
the browser a hint as to the type of file the server expects. Many browsers
use this prevent the user from selecting an invalid file.
A unique file type specifier can be:
\itemize{
@@ -61,12 +61,19 @@ still photos only, also use \code{accept="image/*"}. For video only, use
Create a file upload control that can be used to upload one or more files.
}
\details{
Whenever a file upload completes, the corresponding input variable is set
to a dataframe. See the \verb{Server value} section.
Whenever a file upload completes, the corresponding input variable is set to
a dataframe. See the \verb{Server value} section.
Each time files are uploaded, they are written to a new random subdirectory
inside of R's process-level temporary directory. The Shiny user session keeps
track of all uploads in the session, and when the session ends, Shiny deletes
all of the subdirectories where files where uploaded to.
}
\section{Server value}{
A \code{data.frame} that contains one row for each selected file, and following columns:
A \code{data.frame} that contains one row for each selected file, and following
columns:
\describe{
\item{\code{name}}{The filename provided by the web browser. This is
\strong{not} the path to read to get at the actual data that was uploaded

View File

@@ -62,7 +62,7 @@ from a list of values.
}
\details{
By default, \code{selectInput()} and \code{selectizeInput()} use the JavaScript library
\pkg{selectize.js} (<https://selectize.dev/) instead of
\pkg{selectize.js} (\url{https://selectize.dev/}) instead of
the basic select input element. To use the standard HTML select input
element, use \code{selectInput()} with \code{selectize=FALSE}.

View File

@@ -69,8 +69,9 @@ be done 100\% correctly.}
\item{shiny.jquery.version (defaults to \code{3})}{The major version of jQuery to use.
Currently only values of \code{3} or \code{1} are supported. If \code{1}, then jQuery 1.12.4 is used. If \code{3},
then jQuery 3.6.0 is used.}
\item{shiny.json.digits (defaults to \code{16})}{The number of digits to use when converting
numbers to JSON format to send to the client web browser.}
\item{shiny.json.digits (defaults to \code{I(16)})}{Max number of digits to use when converting
numbers to JSON format to send to the client web browser. Use \code{\link[=I]{I()}} to specify significant digits.
Use \code{NA} for max precision.}
\item{shiny.launch.browser (defaults to \code{interactive()})}{A boolean which controls the default behavior
when an app is run. See \code{\link[=runApp]{runApp()}} for more information.}
\item{shiny.mathjax.url (defaults to \code{"https://mathjax.rstudio.com/latest/MathJax.js"})}{

View File

@@ -3,7 +3,7 @@
"homepage": "https://shiny.rstudio.com",
"repository": "github:rstudio/shiny",
"name": "@types/rstudio-shiny",
"version": "1.7.4-alpha.9003",
"version": "1.7.5-alpha.9000",
"license": "GPL-3.0-only",
"main": "",
"browser": "",
@@ -15,8 +15,7 @@
"srcts/types/**/*.d.ts"
],
"engines": {
"node": ">= 14",
"yarn": ">= 1.22"
"node": ">= 14"
},
"dependencies": {
"@types/bootstrap": "3.4.0",
@@ -33,6 +32,7 @@
"@babel/preset-typescript": "^7.13.0",
"@babel/runtime": "^7.14.0",
"@deanc/esbuild-plugin-postcss": "^1.0.2",
"@selectize/selectize": "https://github.com/selectize/selectize.js.git#e3f2e0b4aa251375bc21b5fcd8ca7d374a921f08",
"@testing-library/dom": "^7.31.0",
"@testing-library/jest-dom": "^5.12.0",
"@testing-library/user-event": "^13.1.9",
@@ -49,7 +49,6 @@
"caniuse-lite": "^1.0.30001312",
"core-js": "^3.13.0",
"esbuild": "^0.15.10",
"esbuild-plugin-babel": "https://github.com/schloerke/esbuild-plugin-babel#patch-2",
"esbuild-plugin-globals": "^0.1.1",
"esbuild-plugin-sass": "^1.0.1",
"eslint": "^8.24.0",
@@ -76,9 +75,8 @@
"util-inspect": "https://github.com/deecewan/browser-util-inspect#c0b4350df4378ffd743e8c36dd3898ce3992823e"
},
"scripts": {
"prepare": "node --eval \"1+1; // help yarn users not install the whole repo; https://github.com/yarnpkg/yarn/issues/2822#issuecomment-847360267\"",
"watch": "yarn run build_shiny --watch",
"build": "yarn run build_shiny && yarn run bundle_extras && yarn run bundle_external_libs",
"build2": "yarn run build_shiny && yarn run bundle_extras && yarn run bundle_external_libs",
"build_shiny": "yarn run checks && yarn run bundle_shiny",
"bundle_shiny": "ts-node srcts/build/shiny.ts",
"bundle_external_libs": "ts-node srcts/build/external_libs.ts",

View File

@@ -1,12 +1,28 @@
# Revdeps
## Failed to check (5)
## Failed to check (21)
|package |version |error |warning |note |
|:----------|:-------|:-----|:-------|:----|
|ctsem |3.6.0 |1 | | |
|NA |? | | | |
|NA |? | | | |
|NA |? | | | |
|ctsem |3.7.6 |1 | | |
|disk.frame |0.8.2 |1 | | |
|diveR |? | | | |
|NA |? | | | |
|NA |? | | | |
|grandR |? | | | |
|NA |? | | | |
|NA |? | | | |
|NA |? | | | |
|NA |? | | | |
|NA |? | | | |
|loon.shiny |? | | | |
|NA |? | | | |
|SSVS |? | | | |
|NA |? | | | |
|RQuantLib |0.4.18 |1 | | |
|rstanarm |2.21.4 |1 | | |
|NA |? | | | |
|NA |? | | | |

View File

@@ -1,15 +1,18 @@
## revdepcheck results
We checked 1039 reverse dependencies (1038 from CRAN + 1 from Bioconductor), comparing R CMD check results across CRAN and dev versions of this package.
We checked 1145 reverse dependencies (1131 from CRAN + 14 from Bioconductor), comparing R CMD check results across CRAN and dev versions of this package.
* We saw 0 new problems
* We failed to check 4 packages
* We failed to check 7 packages
Issues with CRAN packages are summarised below.
### Failed to check
* ctsem (NA)
* disk.frame (NA)
* diveR (NA)
* grandR (NA)
* loon.shiny (NA)
* SSVS (NA)
* RQuantLib (NA)
* rstanarm (NA)

View File

@@ -150,12 +150,6 @@ All config files are located in the root folder to avoid opening two separate VS
* Used by `prettier` to know how to adjust code when a file is saved in VSCode or within `eslint`'s linting process.
* `yarnrc.yml`
* Notifies `yarn` to use `yarn` v2, install `./node_modules` folder for `esbuild`, and any CLI plugins.
* `babel.config.json`
* Used within `babel` transpilation of TypeScript -> JavaScript -> polyfilled JavaScript.
* Noteable options set:
* `"useBuiltIns": "usage"` - `core-js` polyfills are only added as they are _used_.
* `"corejs": "3.9"` - This number should match the installed `core-js` number.
* `"ignore":["node_modules/core-js"]` - The `core-js` library is directly ignored to [avoid being processed by `babel`](https://github.com/zloirock/core-js/issues/743#issuecomment-571983318).
* `jest.config.js`
* Used to configure [`jest` testing](https://jestjs.io/)
* `package.json`
@@ -168,7 +162,6 @@ All config files are located in the root folder to avoid opening two separate VS
* `tsconfig.json` -
* TypeScript config file
* Notable options set:
* `target: ES5` - Compile to es5, so babel has an easier job.
* `preserveConstEnums: false` - Do no preserve enum values into the final code. (If true, produces bloat / unused code)
* `isolatedModules: true` & `esModuleInterop: true` - Requested by `esbuild`. This [allows for `esbuild`](https://esbuild.github.io/content-types/#typescript) to safely compile the files in parallel

View File

@@ -14,10 +14,6 @@ import { basename } from "path";
// @ts-ignore; Type definitions are not found. This occurs when `strict: true` in tsconfig.json
import readcontrol from "readcontrol";
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore; Type definitions are not found. This occurs when `strict: true` in tsconfig.json
import babelPlugin from "esbuild-plugin-babel";
const outDir = "./inst/www/shared/";
type ShinyDesc = { version: string; package: string; license: string };
@@ -79,7 +75,7 @@ async function build(
return esbuildBuild({
incremental: incremental,
watch: watch,
target: "es5",
target: "es2020",
preserveSymlinks: true,
...opts,
}).then((x) => {
@@ -88,4 +84,4 @@ async function build(
});
}
export { outDir, build, shinyDesc, banner, babelPlugin };
export { outDir, build, shinyDesc, banner };

View File

@@ -5,13 +5,12 @@
// - TypeScript -----------------------------------------------------------
import { banner, build, outDir, babelPlugin } from "./_build";
import { banner, build, outDir } from "./_build";
build({
bundle: true,
sourcemap: true,
minify: true,
plugins: [babelPlugin()],
banner: banner,
entryPoints: [
"srcts/extras/shiny-autoreload.ts",

View File

@@ -3,7 +3,7 @@
// yarn build
// ```
import { banner, build, outDir, shinyDesc, babelPlugin } from "./_build";
import { banner, build, outDir, shinyDesc } from "./_build";
import globalsPlugin from "esbuild-plugin-globals";
import type { BuildOptions } from "esbuild";
import { verifyJqueryImport } from "./_jquery";
@@ -18,7 +18,6 @@ const opts: BuildOptions = {
//// Loaded dynamically. MUST use `window.strftime` within code
// strftime: "window.strftime",
}),
babelPlugin(),
],
define: {
// eslint-disable-next-line @typescript-eslint/naming-convention

View File

@@ -2,6 +2,7 @@ import $ from "jquery";
import { InputBinding } from "./inputBinding";
import { $escape, hasDefinedProperty, updateLabel } from "../../utils";
import { indirectEval } from "../../utils/eval";
import { shinyBindAll, shinyUnbindAll } from "../../shiny/initedMethods";
import type { NotUndefined } from "../../utils/extraTypes";
type SelectHTMLElement = HTMLSelectElement & { nonempty: boolean };
@@ -283,15 +284,32 @@ class SelectInputBinding extends InputBinding {
// @ts-expect-error; Need to type `options` keys to know exactly which values are accessed.
options[x] = indirectEval("(" + options[x] + ")");
});
let control = $el.selectize(options)[0].selectize as SelectizeInfo;
// .selectize() does not really update settings; must destroy and rebuild
let control = this._newSelectize($el, options);
// .selectize() does not really update settings; must destroy and rebuild
if (update) {
const settings = $.extend(control.settings, options);
control.destroy();
control = $el.selectize(settings)[0].selectize as SelectizeInfo;
control = this._newSelectize($el, settings);
}
return control;
}
protected _newSelectize(
$el: JQuery<HTMLSelectElement>,
options: SelectizeOptions
): SelectizeInfo {
// Starting with selectize v0.15.2, $el.selectize() can prune the <select>
// element from the DOM, meaning that if we're already bound to it, we'll
// lose the binding. So if we are bound, unbind first, then rebind after.
// (Note this is quite similar to how Shiny.renderContent() works.)
const binding = $el.data("shiny-input-binding");
if (binding) shinyUnbindAll($el.parent());
const control = $el.selectize(options)[0].selectize as SelectizeInfo;
if (binding) shinyBindAll($el.parent());
return control;
}
}

View File

@@ -34,6 +34,7 @@ declare class SelectInputBinding extends InputBinding {
unsubscribe(el: HTMLElement): void;
initialize(el: SelectHTMLElement): void;
protected _selectize(el: SelectHTMLElement, update?: boolean): SelectizeInfo | undefined;
protected _newSelectize($el: JQuery<HTMLSelectElement>, options: SelectizeOptions): SelectizeInfo;
}
export { SelectInputBinding };
export type { SelectInputReceiveMessageData };

View File

@@ -1,91 +0,0 @@
diff --git a/inst/www/shared/selectize/scss/selectize.bootstrap3.scss b/inst/www/shared/selectize/scss/selectize.bootstrap3.scss
index 81d018a8..88d042db 100644
--- a/inst/www/shared/selectize/scss/selectize.bootstrap3.scss
+++ b/inst/www/shared/selectize/scss/selectize.bootstrap3.scss
@@ -18,22 +18,23 @@ $selectize-font-family: inherit !default;
$selectize-font-size: inherit !default;
$selectize-line-height: $line-height-computed !default;
-$selectize-color-text: $text-color !default;
+$selectize-color-text: $input-color !default;
$selectize-color-highlight: rgba(255,237,40,0.4) !default;
$selectize-color-input: $input-bg !default;
$selectize-color-input-full: $input-bg !default;
$selectize-color-input-error: $state-danger-text !default;
$selectize-color-input-error-focus: darken($selectize-color-input-error, 10%) !default;
$selectize-color-disabled: $input-bg !default;
-$selectize-color-item: #efefef !default;
+$selectize-color-item: mix($selectize-color-input, $selectize-color-text, 90%) !default;
$selectize-color-item-border: rgba(black, 0) !default;
$selectize-color-item-active: $component-active-bg !default;
-$selectize-color-item-active-text: #fff !default;
+$selectize-color-item-active-text: $component-active-color !default;
$selectize-color-item-active-border: rgba(black, 0) !default;
$selectize-color-optgroup: $dropdown-bg !default;
$selectize-color-optgroup-text: $dropdown-header-color !default;
$selectize-color-optgroup-border: $dropdown-divider-bg !default;
$selectize-color-dropdown: $dropdown-bg !default;
+$selectize-color-dropdown-text: $dropdown-link-color !default;
$selectize-color-dropdown-border-top: mix($input-border, $input-bg, 0.8) !default;
$selectize-color-dropdown-item-active: $dropdown-link-hover-bg !default;
$selectize-color-dropdown-item-active-text: $dropdown-link-hover-color !default;
@@ -63,12 +64,19 @@ $selectize-arrow-offset: $selectize-padding-x + 5px !default;
@import "selectize";
+//Import Plugins
+@import "plugins/drag_drop";
+@import "plugins/dropdown_header";
+@import "plugins/optgroup_columns";
+@import "plugins/remove_button";
+
.selectize-dropdown, .selectize-dropdown.form-control {
height: auto;
padding: 0;
margin: 2px 0 0 0;
z-index: $zindex-dropdown;
background: $selectize-color-dropdown;
+ color: $selectize-color-dropdown-text;
border: 1px solid $dropdown-fallback-border;
border: 1px solid $dropdown-border;
@include selectize-border-radius ($border-radius-base);
diff --git a/inst/www/shared/selectize/scss/selectize.bootstrap4.scss b/inst/www/shared/selectize/scss/selectize.bootstrap4.scss
index 5eca2f3d..c8502847 100644
--- a/inst/www/shared/selectize/scss/selectize.bootstrap4.scss
+++ b/inst/www/shared/selectize/scss/selectize.bootstrap4.scss
@@ -9,22 +9,23 @@ $selectize-font-family: inherit !default;
$selectize-font-size: inherit !default;
$selectize-line-height: $input-btn-line-height !default; //formerly line-height-computed
-$selectize-color-text: gray("800") !default; //$gray-800
+$selectize-color-text: $input-color !default;
$selectize-color-highlight: rgba(255,237,40,0.4) !default;
$selectize-color-input: $input-bg !default;
$selectize-color-input-full: $input-bg !default;
$selectize-color-input-error: theme-color("danger") !default;
$selectize-color-input-error-focus: darken($selectize-color-input-error, 10%) !default;
$selectize-color-disabled: $input-bg !default;
-$selectize-color-item: #efefef !default;
-$selectize-color-item-border: #999 !default;
+$selectize-color-item: mix($selectize-color-input, $selectize-color-text, 90%) !default;
+$selectize-color-item-border: $input-border-color !default;
$selectize-color-item-active: $component-active-bg !default;
-$selectize-color-item-active-text: #fff !default;
+$selectize-color-item-active-text: $component-active-color !default;
$selectize-color-item-active-border: rgba(0,0,0,0) !default;
$selectize-color-optgroup: $dropdown-bg !default;
$selectize-color-optgroup-text: $dropdown-header-color !default;
$selectize-color-optgroup-border: $dropdown-divider-bg !default;
$selectize-color-dropdown: $dropdown-bg !default;
+$selectize-color-dropdown-text: $dropdown-link-color !default;
$selectize-color-dropdown-border-top: mix($input-border-color, $input-bg, 0.8) !default;
$selectize-color-dropdown-item-active: $dropdown-link-hover-bg !default;
$selectize-color-dropdown-item-active-text: $dropdown-link-hover-color !default;
@@ -67,6 +68,7 @@ $selectize-arrow-offset: calc(#{$selectize-padding-x} + 5px) !default;
margin: 2px 0 0 0;
z-index: $zindex-dropdown;
background: $selectize-color-dropdown;
+ color: $selectize-color-dropdown-text;
border: 1px solid $dropdown-border-color; //$dropdown-fallback-border
@include selectize-border-radius($border-radius);
@include selectize-box-shadow(0 6px 12px rgba(0,0,0,.175));

View File

@@ -0,0 +1,39 @@
diff --git a/inst/www/shared/selectize/scss/plugins/auto_position.scss b/inst/www/shared/selectize/scss/plugins/auto_position.scss
index 89c5cf008..01bd45cf6 100644
--- a/inst/www/shared/selectize/scss/plugins/auto_position.scss
+++ b/inst/www/shared/selectize/scss/plugins/auto_position.scss
@@ -2,7 +2,7 @@
border-top: 1px solid $select-color-border;
border-bottom: 0 none;
border-radius: 3px 3px 0 0;
- box-shadow: 0 -6px 12px rgb(0 0 0 / 18%);
+ box-shadow: 0 -6px 12px rgba(var(--bs-body-color-rgb, 0,0,0), .18);
}
.#{selectize}-control.plugin-auto_position .#{selectize}-input.#{$selectize}-position-top.dropdown-active {
diff --git a/inst/www/shared/selectize/scss/plugins/clear_button.scss b/inst/www/shared/selectize/scss/plugins/clear_button.scss
index 4f0d1d815..566ffd281 100644
--- a/inst/www/shared/selectize/scss/plugins/clear_button.scss
+++ b/inst/www/shared/selectize/scss/plugins/clear_button.scss
@@ -7,7 +7,7 @@
width: 25px;
top: 0;
right: calc(#{$select-padding-x} - #{$select-padding-item-x});
- color: rgba(0, 0, 0);
+ color: var(--bs-body-color, black);
opacity: 0.4;
font-weight: bold;
border: none;
diff --git a/inst/www/shared/selectize/scss/selectize.scss b/inst/www/shared/selectize/scss/selectize.scss
index aec43bb43..30619ba9b 100644
--- a/inst/www/shared/selectize/scss/selectize.scss
+++ b/inst/www/shared/selectize/scss/selectize.scss
@@ -346,7 +346,7 @@ $select-spinner-border-color: $select-color-border;
position: absolute;
top: 50%;
right: $select-arrow-offset;
- margin-top: round(math.div(-1 * $select-arrow-size, 2));
+ margin-top: round(divide(-1 * $select-arrow-size, 2));
width: 0;
height: 0;
border-style: solid;

View File

@@ -1,19 +0,0 @@
diff --git a/inst/www/shared/selectize/scss/selectize.scss b/inst/www/shared/selectize/scss/selectize.scss
index 240e3895..c20f529c 100644
--- a/inst/www/shared/selectize/scss/selectize.scss
+++ b/inst/www/shared/selectize/scss/selectize.scss
@@ -57,9 +57,11 @@ $selectize-caret-margin: 0 2px 0 0 !default;
$selectize-caret-margin-rtl: 0 4px 0 -2px !default;
@mixin selectize-border-radius($radii){
- -webkit-border-radius: $radii;
- -moz-border-radius: $radii;
- border-radius: $radii;
+ @if mixin-exists("border-radius") {
+ @include border-radius($radii)
+ } @else {
+ border-radius: $radii;
+ }
}
@mixin selectize-unselectable(){
-webkit-user-select: none;

View File

@@ -0,0 +1,39 @@
diff --git a/inst/www/shared/selectize/scss/selectize.bootstrap3.scss b/inst/www/shared/selectize/scss/selectize.bootstrap3.scss
index 9f5ea2aea..cd4e21777 100644
--- a/inst/www/shared/selectize/scss/selectize.bootstrap3.scss
+++ b/inst/www/shared/selectize/scss/selectize.bootstrap3.scss
@@ -13,7 +13,7 @@ $select-color-disabled: $input-bg;
$select-color-item: #efefef;
$select-color-item-border: rgba(0, 0, 0, 0);
$select-color-item-active: $component-active-bg;
-$select-color-item-active-text: #fff;
+$select-color-item-active-text: color-contrast($select-color-item-active);
$select-color-item-active-border: rgba(0, 0, 0, 0);
$select-color-optgroup: $dropdown-bg;
$select-color-optgroup-text: $dropdown-header-color;
diff --git a/inst/www/shared/selectize/scss/selectize.bootstrap4.scss b/inst/www/shared/selectize/scss/selectize.bootstrap4.scss
index 6518010b6..b8c35f14b 100644
--- a/inst/www/shared/selectize/scss/selectize.bootstrap4.scss
+++ b/inst/www/shared/selectize/scss/selectize.bootstrap4.scss
@@ -17,7 +17,7 @@ $select-color-disabled: $input-bg !default;
$select-color-item: #efefef !default;
$select-color-item-border: $border-color !default;
$select-color-item-active: $component-active-bg !default;
-$select-color-item-active-text: #fff !default;
+$select-color-item-active-text: color-contrast($select-color-item-active) !default;
$select-color-item-active-border: rgba(0, 0, 0, 0) !default;
$select-color-optgroup: $dropdown-bg !default;
$select-color-optgroup-text: $dropdown-header-color !default;
diff --git a/inst/www/shared/selectize/scss/selectize.bootstrap5.scss b/inst/www/shared/selectize/scss/selectize.bootstrap5.scss
index c2f09fffc..4d991532d 100644
--- a/inst/www/shared/selectize/scss/selectize.bootstrap5.scss
+++ b/inst/www/shared/selectize/scss/selectize.bootstrap5.scss
@@ -17,7 +17,7 @@ $select-color-disabled: $input-bg !default;
$select-color-item: #efefef !default;
$select-color-item-border: $border-color !default;
$select-color-item-active: $component-active-bg !default;
-$select-color-item-active-text: #fff !default;
+$select-color-item-active-text: color-contrast($select-color-item-active) !default;
$select-color-item-active-border: rgba(0, 0, 0, 0) !default;
$select-color-optgroup: $dropdown-bg !default;
$select-color-optgroup-text: $dropdown-header-color !default;

View File

@@ -1,26 +0,0 @@
diff --git a/inst/www/shared/selectize/scss/selectize.bootstrap3.scss b/inst/www/shared/selectize/scss/selectize.bootstrap3.scss
index 9f6c0398..2eb30361 100644
--- a/inst/www/shared/selectize/scss/selectize.bootstrap3.scss
+++ b/inst/www/shared/selectize/scss/selectize.bootstrap3.scss
@@ -28,7 +28,7 @@ $selectize-color-disabled: $input-bg !default;
$selectize-color-item: mix($selectize-color-input, $selectize-color-text, 90%) !default;
$selectize-color-item-border: rgba(black, 0) !default;
$selectize-color-item-active: $component-active-bg !default;
-$selectize-color-item-active-text: $component-active-color !default;
+$selectize-color-item-active-text: color-contrast($selectize-color-item-active) !default;
$selectize-color-item-active-border: rgba(black, 0) !default;
$selectize-color-optgroup: $dropdown-bg !default;
$selectize-color-optgroup-text: $dropdown-header-color !default;
diff --git a/inst/www/shared/selectize/scss/selectize.bootstrap4.scss b/inst/www/shared/selectize/scss/selectize.bootstrap4.scss
index 44dae201..689b38ef 100644
--- a/inst/www/shared/selectize/scss/selectize.bootstrap4.scss
+++ b/inst/www/shared/selectize/scss/selectize.bootstrap4.scss
@@ -19,7 +19,7 @@ $selectize-color-disabled: $input-bg !default;
$selectize-color-item: mix($selectize-color-input, $selectize-color-text, 90%) !default;
$selectize-color-item-border: $input-border-color !default;
$selectize-color-item-active: $component-active-bg !default;
-$selectize-color-item-active-text: $component-active-color !default;
+$selectize-color-item-active-text: color-contrast($selectize-color-item-active) !default;
$selectize-color-item-active-border: rgba(0,0,0,0) !default;
$selectize-color-optgroup: $dropdown-bg !default;
$selectize-color-optgroup-text: $dropdown-header-color !default;

View File

@@ -0,0 +1,26 @@
diff --git a/inst/www/shared/selectize/scss/selectize.bootstrap3.scss b/inst/www/shared/selectize/scss/selectize.bootstrap3.scss
index 7f847b39b..8bd94d42a 100644
--- a/inst/www/shared/selectize/scss/selectize.bootstrap3.scss
+++ b/inst/www/shared/selectize/scss/selectize.bootstrap3.scss
@@ -10,7 +10,7 @@ $select-color-input-full: $input-bg;
$select-color-input-error: $state-danger-text;
$select-color-input-error-focus: darken($select-color-input-error, 10%);
$select-color-disabled: $input-bg;
-$select-color-item: #efefef;
+$select-color-item: RGBA($select-color-text, 0.1);
$select-color-item-border: rgba(0, 0, 0, 0);
$select-color-item-active: $component-active-bg;
$select-color-item-active-text: color-contrast($select-color-item-active);
diff --git a/inst/www/shared/selectize/scss/selectize.bootstrap4.scss b/inst/www/shared/selectize/scss/selectize.bootstrap4.scss
index a797a62da..624ab9138 100644
--- a/inst/www/shared/selectize/scss/selectize.bootstrap4.scss
+++ b/inst/www/shared/selectize/scss/selectize.bootstrap4.scss
@@ -14,7 +14,7 @@ $select-color-input-error-focus: darken(
10%
) !default;
$select-color-disabled: $input-bg !default;
-$select-color-item: #efefef !default;
+$select-color-item: RGBA($select-color-text, 0.1) !default;
$select-color-item-border: $border-color !default;
$select-color-item-active: $component-active-bg !default;
$select-color-item-active-text: color-contrast($select-color-item-active) !default;

View File

@@ -0,0 +1,14 @@
diff --git a/inst/www/shared/selectize/scss/selectize.bootstrap5.scss b/inst/www/shared/selectize/scss/selectize.bootstrap5.scss
index 4d991532d..bf15610d8 100644
--- a/inst/www/shared/selectize/scss/selectize.bootstrap5.scss
+++ b/inst/www/shared/selectize/scss/selectize.bootstrap5.scss
@@ -1,7 +1,7 @@
$enable-shadows: true !default;
-$select-font-family: inherit !default;
-$select-font-size: inherit !default;
+$select-font-family: if($input-btn-font-family, $input-btn-font-family, inherit) !default;
+$select-font-size: $input-btn-font-size !default;
$select-line-height: $input-btn-line-height !default; //formerly line-height-computed
$select-color-text: $gray-800 !default; //$gray-800

View File

@@ -1,13 +0,0 @@
diff --git a/inst/www/shared/selectize/scss/selectize.bootstrap4.scss b/inst/www/shared/selectize/scss/selectize.bootstrap4.scss
index 44dae201..03b4f491 100644
--- a/inst/www/shared/selectize/scss/selectize.bootstrap4.scss
+++ b/inst/www/shared/selectize/scss/selectize.bootstrap4.scss
@@ -13,7 +13,7 @@ $selectize-color-text: $input-color !default;
$selectize-color-highlight: rgba(255,237,40,0.4) !default;
$selectize-color-input: $input-bg !default;
$selectize-color-input-full: $input-bg !default;
-$selectize-color-input-error: theme-color("danger") !default;
+$selectize-color-input-error: $danger !default;
$selectize-color-input-error-focus: darken($selectize-color-input-error, 10%) !default;
$selectize-color-disabled: $input-bg !default;
$selectize-color-item: mix($selectize-color-input, $selectize-color-text, 90%) !default;

View File

@@ -0,0 +1,112 @@
diff --git a/inst/www/shared/selectize/scss/plugins/dropdown_header.scss b/inst/www/shared/selectize/scss/plugins/dropdown_header.scss
index 90846cd12..c60d9f326 100644
--- a/inst/www/shared/selectize/scss/plugins/dropdown_header.scss
+++ b/inst/www/shared/selectize/scss/plugins/dropdown_header.scss
@@ -4,7 +4,7 @@
padding: ($select-padding-dropdown-item-y * 2)
$select-padding-dropdown-item-x;
border-bottom: 1px solid $select-color-border;
- background: mix($select-color-dropdown, $select-color-border, 85%);
+ background: RGBA($select-color-dropdown, 0.15);
border-radius: $select-border-radius $select-border-radius 0 0;
}
.#{$selectize}-dropdown-header-close {
@@ -19,6 +19,6 @@
text-decoration: none;
}
.#{$selectize}-dropdown-header-close:hover {
- color: darken($select-color-text, 25%);
+ color: RGB($select-color-rgb);
}
}
diff --git a/inst/www/shared/selectize/scss/selectize.bootstrap5.scss b/inst/www/shared/selectize/scss/selectize.bootstrap5.scss
index 4d991532d..39b27a81e 100644
--- a/inst/www/shared/selectize/scss/selectize.bootstrap5.scss
+++ b/inst/www/shared/selectize/scss/selectize.bootstrap5.scss
@@ -23,11 +23,7 @@ $select-color-optgroup: $dropdown-bg !default;
$select-color-optgroup-text: $dropdown-header-color !default;
$select-color-optgroup-border: $dropdown-divider-bg !default;
$select-color-dropdown: $dropdown-bg !default;
-$select-color-dropdown-border-top: mix(
- $input-border-color,
- $input-bg,
- 80%
-) !default;
+$select-color-dropdown-border-top: rgba($input-border-color, 0.8) !default;
$select-color-dropdown-item-active: $dropdown-link-hover-bg !default;
$select-color-dropdown-item-active-text: $dropdown-link-hover-color !default;
$select-color-dropdown-item-create-active-text: $dropdown-link-hover-color !default;
diff --git a/inst/www/shared/selectize/scss/selectize.bootstrap5.scss b/inst/www/shared/selectize/scss/selectize.bootstrap5.scss
index 44fff4ae4..8364d3123 100644
--- a/inst/www/shared/selectize/scss/selectize.bootstrap5.scss
+++ b/inst/www/shared/selectize/scss/selectize.bootstrap5.scss
@@ -4,7 +4,8 @@ $select-font-family: if($input-btn-font-family, $input-btn-font-family, inherit) !default;
$select-font-size: $input-btn-font-size !default;
$select-line-height: $input-btn-line-height !default; //formerly line-height-computed
-$select-color-text: $gray-800 !default; //$gray-800
+$select-color-rgb: var(--bs-emphasis-color-rgb, 0, 0, 0) !default;
+$select-color-text: RGBA($select-color-rgb, 0.83) !default;
$select-color-highlight: rgba(255, 237, 40, 0.4) !default;
$select-color-input: $input-bg !default;
$select-color-input-full: $input-bg !default;
@@ -14,7 +15,7 @@ $select-color-input-error-focus: darken(
10%
) !default;
$select-color-disabled: $input-bg !default;
-$select-color-item: #efefef !default;
+$select-color-item: RGBA($select-color-rgb, 0.05) !default;
$select-color-item-border: $border-color !default;
$select-color-item-active: $component-active-bg !default;
$select-color-item-active-text: color-contrast($select-color-item-active) !default;
diff --git a/inst/www/shared/selectize/scss/selectize.scss b/inst/www/shared/selectize/scss/selectize.scss
index 321c8802b..53d09878b 100644
--- a/inst/www/shared/selectize/scss/selectize.scss
+++ b/inst/www/shared/selectize/scss/selectize.scss
@@ -7,7 +7,8 @@ $select-font-smoothing: inherit !default;
$select-font-size: 13px !default;
$select-line-height: 18px !default;
-$select-color-text: #303030 !default;
+$select-color-rgb: 0,0,0 !default;
+$select-color-text: RGBA($select-color-rgb, 0.83) !default;
$select-color-border: #d0d0d0 !default;
$select-color-highlight: rgba(125, 168, 208, 0.2) !default;
$select-color-input: #fff !default;
@@ -24,12 +25,7 @@ $select-color-dropdown-border: $select-color-border !default;
$select-color-dropdown-border-top: #f0f0f0 !default;
$select-color-dropdown-item-active: #f5fafd !default;
$select-color-dropdown-item-active-text: #495c68 !default;
-$select-color-dropdown-item-create-text: rgba(
- red($select-color-text),
- green($select-color-text),
- blue($select-color-text),
- 0.5
-) !default;
+$select-color-dropdown-item-create-text: RGBA($select-color-rgb, 0.5) !default;
$select-color-dropdown-item-create-active-text: $select-color-dropdown-item-active-text !default;
$select-color-optgroup: $select-color-dropdown !default;
$select-color-optgroup-text: $select-color-text !default;
@@ -161,19 +157,10 @@ $select-spinner-border-color: $select-color-border;
.#{$selectize}-control.multi &.disabled > div {
&,
&.active {
- color: lighten(
- desaturate($select-color-item-text, 100%),
- $select-lighten-disabled-item-text
- );
- background: lighten(
- desaturate($select-color-item, 100%),
- $select-lighten-disabled-item
- );
+ color: lighten(gray, $select-lighten-disabled-item-text);
+ background: lighten(gray, $select-lighten-disabled-item);
border: $select-width-item-border solid
- lighten(
- desaturate($select-color-item-border, 100%),
- $select-lighten-disabled-item-border
- );
+ lighten(gray, $select-lighten-disabled-item-border);
}
}
> input {

View File

@@ -1,38 +1,59 @@
#!/usr/bin/env Rscript
library(rprojroot)
library(withr)
## -----------------------------------------------------------------
## First, download the main selectize.js and css
## -----------------------------------------------------------------
version <- "0.12.4"
types_version <- "0.12.34"
if (!identical(getwd(), find_package_root_file())) {
stop("This script must be run from the top directory of the shiny package")
}
dest_dir <- find_package_root_file("inst/www/shared/selectize")
tag <- paste0("v", version)
dest_file <- file.path(tempdir(), paste0("selectize.js-", version, ".zip"))
url <- sprintf("https://github.com/selectize/selectize.js/archive/%s.zip", tag)
if (Sys.which("yarn") == "") {
stop("The yarn CLI must be installed and in your PATH")
}
download.file(url, dest_file)
unzipped <- tempdir()
unzip(dest_file, exdir = unzipped)
system("yarn install")
unlink(dest_dir, recursive = TRUE)
node_dir <- find_package_root_file("node_modules/@selectize/selectize/dist")
inst_dir <- find_package_root_file("inst/www/shared/selectize")
dir.create(file.path(dest_dir, "js"), recursive = TRUE)
unlink(inst_dir, recursive = TRUE)
dir.create(file.path(inst_dir, "js"), recursive = TRUE)
file.copy(
file.path(unzipped, paste0("selectize.js-", version), "dist", "js", "standalone", "selectize.min.js"),
file.path(dest_dir, "js"),
file.path(node_dir, "js", "selectize.min.js"),
file.path(inst_dir, "js"),
overwrite = TRUE
)
dir.create(file.path(dest_dir, "css"), recursive = TRUE)
dir.create(file.path(inst_dir, "css"), recursive = TRUE)
file.copy(
file.path(unzipped, paste0("selectize.js-", version), "dist", "css", "selectize.bootstrap3.css"),
file.path(dest_dir, "css"),
file.path(node_dir, "css", "selectize.bootstrap3.css"),
file.path(inst_dir, "css"),
overwrite = TRUE
)
dir.create(file.path(inst_dir, "scss"), recursive = TRUE)
file.copy(
file.path(node_dir, "scss"),
inst_dir,
overwrite = TRUE,
recursive = TRUE
)
sanitize_scss <- function(f) {
txt <- readLines(f)
# Remove the unnecessary imports of Bootstrap from scss files
txt <- txt[!grepl('@import\\s+"lib/bootstrap', txt)]
writeLines(txt, f)
}
lapply(
dir(file.path(inst_dir, "scss"), full.names = TRUE, recursive = TRUE),
sanitize_scss
)
## -----------------------------------------------------------------
## Second, download accessibility plugin
## -----------------------------------------------------------------
@@ -45,69 +66,13 @@ download.file(url, dest_file)
unzipped <- tempdir()
unzip(dest_file, exdir = unzipped)
dir.create(file.path(dest_dir, "accessibility", "js"), recursive = TRUE)
dir.create(file.path(inst_dir, "accessibility", "js"), recursive = TRUE)
file.copy(
file.path(unzipped, paste0("selectize-plugin-a11y-", ally_version), "selectize-plugin-a11y.js"),
file.path(dest_dir, "accessibility", "js"),
file.path(inst_dir, "accessibility", "js"),
overwrite = TRUE
)
tmpdir <- tempdir()
## -----------------------------------------------------------------
## Third, download Bootstrap 4 SASS port of selectize less
## This is using a specific sha because this hasn't been included in an official release
## https://github.com/papakay/selectize-bootstrap-4-style/pull/19
## -----------------------------------------------------------------
bs4_sass_version <- "5013be4e97a14bef47bc8badcc78e6762815ef38"
zip_src <- sprintf("https://github.com/papakay/selectize-bootstrap-4-style/archive/%s.zip", bs4_sass_version)
zip_target <- file.path(tmpdir, "select-bs4.zip")
download.file(zip_src, zip_target)
unzip(zip_target, exdir = dirname(zip_target))
target <- find_package_root_file("inst/www/shared/selectize/scss")
unlink(target, recursive = TRUE)
dir.create(target)
file.rename(
file.path(tmpdir, sprintf("selectize-bootstrap-4-style-%s/src/selectize", bs4_sass_version)),
target
)
# Remove the unnecessary imports of Bootstrap
scss_file <- find_package_root_file("inst/www/shared/selectize/scss/selectize.bootstrap4.scss")
scss <- readLines(scss_file)
scss <- scss[!grepl('@import\\s+"\\.\\./bootstrap', scss)]
writeLines(scss, scss_file)
# Support Bootstrap 5 as well
# https://github.com/selectize/selectize.js/issues/1584
writeLines(
c(
"$input-line-height-sm: $form-select-line-height !default;",
"@import 'selectize.bootstrap4';",
".selectize-control{padding:0;}"
),
file.path(target, "selectize.bootstrap5.scss")
)
## -----------------------------------------------------------------
## Fourth, download Bootstrap 3 SASS port
## https://github.com/herschel666/selectize-scss
## Note that the base selectize.scss, as well as the plugins, are identical
## to the BS4 port, so we only need the selectize.bootstrap3.scss file
## -----------------------------------------------------------------
bs3_sass_version <- "0.10.1"
zip_src <- sprintf("https://github.com/herschel666/selectize-scss/archive/v%s.zip", bs3_sass_version)
zip_target <- file.path(tmpdir, "select-bs3.zip")
download.file(zip_src, zip_target)
unzip(zip_target, exdir = dirname(zip_target))
target <- find_package_root_file("inst/www/shared/selectize/scss/selectize.bootstrap3.scss")
file.rename(
file.path(tmpdir, sprintf("selectize-scss-%s/src/selectize.bootstrap3.scss", bs3_sass_version)),
target
)
# =============================================================================
# Apply patches
@@ -122,7 +87,7 @@ for (patch in list.files(patch_dir, full.names = TRUE)) {
tryCatch(
{
message(sprintf("Applying %s", basename(patch)))
withr::with_dir(find_package_root_file(), system(sprintf("git apply %s", patch)))
with_dir(find_package_root_file(), system(sprintf("git apply %s --reject", patch)))
},
error = function(e) {
quit(save = "no", status = 1)
@@ -133,27 +98,17 @@ for (patch in list.files(patch_dir, full.names = TRUE)) {
# =============================================================================
# Add versions to files
# =============================================================================
pkg_json <- jsonlite::fromJSON(file.path(node_dir, "../package.json"))
writeLines(
c(
"# Generated by tools/updateSelectize.R; do not edit by hand",
sprintf('version_selectize <- "%s"', version)
sprintf('version_selectize <- "%s"', pkg_json$version)
),
rprojroot::find_package_root_file("R", "version_selectize.R")
find_package_root_file("R", "version_selectize.R")
)
# Update TypeScript installation
withr::with_dir(
rprojroot::find_package_root_file(),
{
exit_code <- system(paste0("yarn add --dev selectize@", version))
if (exit_code != 0) stop("yarn could not install selectize")
exit_code <- system(paste0("yarn add @types/selectize@", types_version))
if (exit_code != 0) stop("yarn could not install @types/selectize")
}
)
# =============================================================================
# Generate minified js
# =============================================================================
withr::with_dir(find_package_root_file("srcts"), system("yarn build"))
with_dir(find_package_root_file("srcts"), system("yarn build"))

View File

@@ -1828,6 +1828,19 @@ __metadata:
languageName: node
linkType: hard
"@selectize/selectize@https://github.com/selectize/selectize.js.git#e3f2e0b4aa251375bc21b5fcd8ca7d374a921f08":
version: 0.15.2
resolution: "@selectize/selectize@https://github.com/selectize/selectize.js.git#commit=e3f2e0b4aa251375bc21b5fcd8ca7d374a921f08"
peerDependencies:
jquery: ^1.7.0 || ^2 || ^3
jquery-ui: ^1.13.2
peerDependenciesMeta:
jquery-ui:
optional: true
checksum: ba260ba5804c16b1455ff79f9d00ce860e12ae36e29d7a5f702da6b384c9454497421b8e06fe683d10fac53e2dc6ec008da4fa129a153cbbfe5396e027eb4247
languageName: node
linkType: hard
"@sinclair/typebox@npm:^0.25.16":
version: 0.25.24
resolution: "@sinclair/typebox@npm:0.25.24"
@@ -2184,6 +2197,7 @@ __metadata:
"@babel/preset-typescript": ^7.13.0
"@babel/runtime": ^7.14.0
"@deanc/esbuild-plugin-postcss": ^1.0.2
"@selectize/selectize": "https://github.com/selectize/selectize.js.git#e3f2e0b4aa251375bc21b5fcd8ca7d374a921f08"
"@testing-library/dom": ^7.31.0
"@testing-library/jest-dom": ^5.12.0
"@testing-library/user-event": ^13.1.9
@@ -2206,7 +2220,6 @@ __metadata:
caniuse-lite: ^1.0.30001312
core-js: ^3.13.0
esbuild: ^0.15.10
esbuild-plugin-babel: "https://github.com/schloerke/esbuild-plugin-babel#patch-2"
esbuild-plugin-globals: ^0.1.1
esbuild-plugin-sass: ^1.0.1
eslint: ^8.24.0
@@ -4210,15 +4223,6 @@ __metadata:
languageName: node
linkType: hard
"esbuild-plugin-babel@https://github.com/schloerke/esbuild-plugin-babel#patch-2":
version: 0.2.3
resolution: "esbuild-plugin-babel@https://github.com/schloerke/esbuild-plugin-babel.git#commit=40106e72776cf4e2e4da8e52926632ceed378da0"
peerDependencies:
"@babel/core": ^7.0.0
checksum: c89e123bc1944efcee5628ea6d8cb878384a4de5c19b4b598b660c03dd6429dd11e9120b5cbf54722331c69cb3bc25183b63ef1c28174ed44787228a44a58684
languageName: node
linkType: hard
"esbuild-plugin-globals@npm:^0.1.1":
version: 0.1.1
resolution: "esbuild-plugin-globals@npm:0.1.1"