Skip to content

Commit 437a304

Browse files
committed
Updated gulp pipelines, fix sass deprecations in libs
1 parent f5d714a commit 437a304

18 files changed

+4709
-155
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ The available options are [documented here](https://selectize.dev/docs.html).
8989

9090
When issuing a pull request:
9191

92-
- please **do not include/commit changes in the `dist/` folder** to avoid
92+
- please **do not include/commit changes in the `dist/` or `lib/` folders** to avoid
9393
merge conflicts. A good way to include the right files is to use
9494
`git gui` or `git add` when committing to select the files you want to
9595
add to your commit.

dist/css/selectize.bootstrap3.css

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/selectize.bootstrap4.css

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/selectize.bootstrap5.css

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/selectize.css

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/css/selectize.default.css

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js/selectize.js

+28-20
Original file line numberDiff line numberDiff line change
@@ -1317,6 +1317,13 @@ $.extend(Selectize.prototype, {
13171317
$control_input.attr('placeholder', settings.placeholder);
13181318
}
13191319

1320+
// to have an identical rendering to a simple select (usefull for mobile device and do not open keyboard)
1321+
if (!self.settings.search) {
1322+
$control_input.attr('readonly', true);
1323+
$control_input.attr('inputmode', 'none');
1324+
$control.css('cursor', 'pointer');
1325+
}
1326+
13201327
// if splitOn was not passed in, construct it from the delimiter to allow pasting universally
13211328
if (!self.settings.splitOn && self.settings.delimiter) {
13221329
var delimiterEscaped = self.settings.delimiter.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
@@ -3661,26 +3668,27 @@ Selectize.defaults = {
36613668
},
36623669
normalize: false,
36633670
ignoreOnDropwdownHeight: 'img, i',
3664-
/*
3665-
load : null, // function(query, callback) { ... }
3666-
score : null, // function(search) { ... }
3667-
formatValueToKey : null, // function(key) { ... }
3668-
onInitialize : null, // function() { ... }
3669-
onChange : null, // function(value) { ... }
3670-
onItemAdd : null, // function(value, $item) { ... }
3671-
onItemRemove : null, // function(value, $item) { ... }
3672-
onClear : null, // function() { ... }
3673-
onOptionAdd : null, // function(value, data) { ... }
3674-
onOptionRemove : null, // function(value) { ... }
3675-
onOptionClear : null, // function() { ... }
3676-
onOptionGroupAdd : null, // function(id, data) { ... }
3677-
onOptionGroupRemove : null, // function(id) { ... }
3678-
onOptionGroupClear : null, // function() { ... }
3679-
onDropdownOpen : null, // function($dropdown) { ... }
3680-
onDropdownClose : null, // function($dropdown) { ... }
3681-
onType : null, // function(str) { ... }
3682-
onDelete : null, // function(values) { ... }
3683-
*/
3671+
search: true,
3672+
/*
3673+
load : null, // function(query, callback) { ... }
3674+
score : null, // function(search) { ... }
3675+
formatValueToKey : null, // function(key) { ... }
3676+
onInitialize : null, // function() { ... }
3677+
onChange : null, // function(value) { ... }
3678+
onItemAdd : null, // function(value, $item) { ... }
3679+
onItemRemove : null, // function(value, $item) { ... }
3680+
onClear : null, // function() { ... }
3681+
onOptionAdd : null, // function(value, data) { ... }
3682+
onOptionRemove : null, // function(value) { ... }
3683+
onOptionClear : null, // function() { ... }
3684+
onOptionGroupAdd : null, // function(id, data) { ... }
3685+
onOptionGroupRemove : null, // function(id) { ... }
3686+
onOptionGroupClear : null, // function() { ... }
3687+
onDropdownOpen : null, // function($dropdown) { ... }
3688+
onDropdownClose : null, // function($dropdown) { ... }
3689+
onType : null, // function(str) { ... }
3690+
onDelete : null, // function(values) { ... }
3691+
*/
36843692

36853693
render: {
36863694
/*

dist/js/selectize.min.js

+4,473-2
Large diffs are not rendered by default.

dist/lib/bootstrap4/_images.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
}
3333

3434
.figure-img {
35-
margin-bottom: $spacer / 2;
35+
margin-bottom: calc($spacer /2);
3636
line-height: 1;
3737
}
3838

dist/lib/bootstrap4/_variables.scss

+7-7
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ $h4-font-size: $font-size-base * 1.5 !default;
299299
$h5-font-size: $font-size-base * 1.25 !default;
300300
$h6-font-size: $font-size-base !default;
301301

302-
$headings-margin-bottom: $spacer / 2 !default;
302+
$headings-margin-bottom: calc($spacer /2) !default;
303303
$headings-font-family: null !default;
304304
$headings-font-weight: 500 !default;
305305
$headings-line-height: 1.2 !default;
@@ -495,7 +495,7 @@ $input-height-border: $input-border-width * 2 !default;
495495

496496
$input-height-inner: add($input-line-height * 1em, $input-padding-y * 2) !default;
497497
$input-height-inner-half: add($input-line-height * .5em, $input-padding-y) !default;
498-
$input-height-inner-quarter: add($input-line-height * .25em, $input-padding-y / 2) !default;
498+
$input-height-inner-quarter: add($input-line-height * .25em, calc($input-padding-y / 2)) !default;
499499

500500
$input-height: add($input-line-height * 1em, add($input-padding-y * 2, $input-height-border, false)) !default;
501501
$input-height-sm: add($input-line-height-sm * 1em, add($input-padding-y-sm * 2, $input-height-border, false)) !default;
@@ -565,7 +565,7 @@ $custom-radio-indicator-border-radius: 50% !default;
565565
$custom-radio-indicator-icon-checked: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='-4 -4 8 8'><circle r='3' fill='#{$custom-control-indicator-checked-color}'/></svg>") !default;
566566

567567
$custom-switch-width: $custom-control-indicator-size * 1.75 !default;
568-
$custom-switch-indicator-border-radius: $custom-control-indicator-size / 2 !default;
568+
$custom-switch-indicator-border-radius: calc($custom-control-indicator-size / 2) !default;
569569
$custom-switch-indicator-size: subtract($custom-control-indicator-size, $custom-control-indicator-border-width * 4) !default;
570570

571571
$custom-select-padding-y: $input-padding-y !default;
@@ -710,12 +710,12 @@ $nav-pills-link-active-color: $component-active-color !default;
710710
$nav-pills-link-active-bg: $component-active-bg !default;
711711

712712
$nav-divider-color: $gray-200 !default;
713-
$nav-divider-margin-y: $spacer / 2 !default;
713+
$nav-divider-margin-y: calc($spacer /2) !default;
714714

715715

716716
// Navbar
717717

718-
$navbar-padding-y: $spacer / 2 !default;
718+
$navbar-padding-y: calc($spacer /2) !default;
719719
$navbar-padding-x: $spacer !default;
720720

721721
$navbar-nav-link-padding-x: .5rem !default;
@@ -724,7 +724,7 @@ $navbar-brand-font-size: $font-size-lg !default;
724724
// Compute the navbar-brand padding-y so the navbar-brand will have the same height as navbar-text and nav-link
725725
$nav-link-height: $font-size-base * $line-height-base + $nav-link-padding-y * 2 !default;
726726
$navbar-brand-height: $navbar-brand-font-size * $line-height-base !default;
727-
$navbar-brand-padding-y: ($nav-link-height - $navbar-brand-height) / 2 !default;
727+
$navbar-brand-padding-y: calc(($nav-link-height - $navbar-brand-height)) !default;
728728

729729
$navbar-toggler-padding-y: .25rem !default;
730730
$navbar-toggler-padding-x: .75rem !default;
@@ -844,7 +844,7 @@ $card-bg: $white !default;
844844

845845
$card-img-overlay-padding: 1.25rem !default;
846846

847-
$card-group-margin: $grid-gutter-width / 2 !default;
847+
$card-group-margin: calc($grid-gutter-width / 2) !default;
848848
$card-deck-margin: $card-group-margin !default;
849849

850850
$card-columns-count: 3 !default;

dist/lib/bootstrap4/vendor/_rfs.scss

+4-4
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,18 @@ $rfs-base-font-size-unit: unit($rfs-base-font-size);
4646
$rfs-base-font-size: $rfs-base-font-size / ($rfs-base-font-size * 0 + 1);
4747
}
4848
@else if $rfs-base-font-size-unit == "rem" {
49-
$rfs-base-font-size: $rfs-base-font-size / ($rfs-base-font-size * 0 + 1 / $rfs-rem-value);
49+
$rfs-base-font-size: calc($rfs-base-font-size / ($rfs-base-font-size * 0 + calc(1px / $rfs-rem-value)));
5050
}
5151

5252
// Cache $rfs-breakpoint unit to prevent multiple calls
5353
$rfs-breakpoint-unit-cache: unit($rfs-breakpoint);
5454

5555
// Remove unit from $rfs-breakpoint for calculations
5656
@if $rfs-breakpoint-unit-cache == "px" {
57-
$rfs-breakpoint: $rfs-breakpoint / ($rfs-breakpoint * 0 + 1);
57+
$rfs-breakpoint: calc($rfs-breakpoint / ($rfs-breakpoint * 0 + 1px));
5858
}
5959
@else if $rfs-breakpoint-unit-cache == "rem" or $rfs-breakpoint-unit-cache == "em" {
60-
$rfs-breakpoint: $rfs-breakpoint / ($rfs-breakpoint * 0 + 1 / $rfs-rem-value);
60+
$rfs-breakpoint: $rfs-breakpoint / ($rfs-breakpoint * 0 + calc(1 / $rfs-rem-value));
6161
}
6262

6363
// Responsive font-size mixin
@@ -82,7 +82,7 @@ $rfs-breakpoint-unit-cache: unit($rfs-breakpoint);
8282
$fs: $fs / ($fs * 0 + 1);
8383
}
8484
@else if $fs-unit == "rem" {
85-
$fs: $fs / ($fs * 0 + 1 / $rfs-rem-value);
85+
$fs: $fs / ($fs * 0 + calc(1 / $rfs-rem-value));
8686
}
8787

8888
// Set default font-size

dist/scss/selectize.scss

+13-3
Original file line numberDiff line numberDiff line change
@@ -270,15 +270,25 @@ $select-spinner-border-color: $select-color-border;
270270
cursor: default;
271271
}
272272
.active {
273-
background-color: $select-color-dropdown-item-active;
274-
color: $select-color-dropdown-item-active-text;
273+
background-color: $select-color-item-active;
274+
color: $select-color-item-active-text;
275275
&.create {
276276
color: $select-color-dropdown-item-create-active-text;
277277
}
278278
}
279+
280+
.selected {
281+
background-color: $select-color-item-active;
282+
color: $select-color-item-active-text;
283+
}
279284
.create {
280285
color: $select-color-dropdown-item-create-text;
281286
}
287+
288+
.active:not(.selected) {
289+
background: $select-color-dropdown-item-active;
290+
color: $select-color-dropdown-item-active-text;
291+
}
282292
}
283293

284294
.#{$selectize}-dropdown-content {
@@ -326,7 +336,7 @@ $select-spinner-border-color: $select-color-border;
326336
cursor: pointer;
327337
}
328338
&.input-active,
329-
&.input-active input {
339+
&.input-active input:not(:read-only) {
330340
cursor: text;
331341
}
332342

0 commit comments

Comments
 (0)