Add Tom-Select lib

This commit is contained in:
jf-cbd
2025-11-13 10:48:06 +01:00
parent cef8fbc859
commit 7733f13d14
354 changed files with 53014 additions and 2 deletions

99
node_modules/tom-select/dist/scss/_dropdown.scss generated vendored Normal file
View File

@@ -0,0 +1,99 @@
.#{$select-ns}-dropdown {
position: absolute;
top: 100%;
left: 0;
width: 100%;
z-index: 10;
border: $select-dropdown-border;
background: $select-color-dropdown;
margin: 0.25rem 0 0;
border-top: 0 none;
box-sizing: border-box;
box-shadow: 0 1px 3px rgba(0, 0, 0, 10%);
border-radius: 0 0 $select-border-radius $select-border-radius;
[data-selectable] {
cursor: pointer;
overflow: hidden;
.highlight {
background: $select-color-highlight;
border-radius: 1px;
}
}
.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;
}
[data-selectable].option {
opacity: 1;
cursor: pointer;
}
.optgroup:first-child .optgroup-header {
border-top: 0 none;
}
.optgroup-header {
color: $select-color-optgroup-text;
background: $select-color-optgroup;
cursor: default;
}
.active {
background-color: $select-color-dropdown-item-active;
color: $select-color-dropdown-item-active-text;
&.create {
color: $select-color-dropdown-item-create-active-text;
}
}
.create {
color: $select-color-dropdown-item-create-text;
}
.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;
width: $select-spinner-size * .8;
height: $select-spinner-size * .8;
margin: $select-spinner-size * .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;
}
@keyframes lds-dual-ring {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
}
}
.#{$select-ns}-dropdown-content {
overflow: hidden auto;
max-height: $select-max-height-dropdown;
scroll-behavior: smooth;
}

113
node_modules/tom-select/dist/scss/_items.scss generated vendored Normal file
View File

@@ -0,0 +1,113 @@
.#{$select-ns}-control {
border: $select-border;
padding: $select-padding-y $select-padding-x;
width: 100%;
overflow: hidden;
position: relative;
z-index: 1;
box-sizing: border-box;
box-shadow: $select-shadow-input;
border-radius: $select-border-radius;
display: flex;
flex-wrap: wrap;
.#{$select-ns}-wrapper.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: $select-color-input-full;
}
.disabled &,
.disabled & * {
cursor: default !important;
}
.focus & {
box-shadow: $select-shadow-input-focus;
}
> * {
vertical-align: baseline;
display: inline-block;
}
.#{$select-ns}-wrapper.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: $select-color-item-active;
color: $select-color-item-active-text;
border: $select-width-item-border solid $select-color-item-active-border;
}
}
.#{$select-ns}-wrapper.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);
border: $select-width-item-border solid lighten(desaturate($select-color-item-border, 100%), $select-lighten-disabled-item-border);
}
}
> input {
flex: 1 1 auto;
min-width: 7rem;
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;
&::-ms-clear {
display: none;
}
&:focus { outline: none !important; }
}
.has-items & > input{
margin: $select-caret-margin !important;
}
&.rtl {
text-align: right;
&.single .#{$select-ns}-control:after {
left: $select-arrow-offset;
right: auto;
}
.#{$select-ns}-control > input {
margin: $select-caret-margin-rtl !important;
}
}
.disabled & {
opacity: $select-opacity-disabled;
background-color: $select-color-disabled;
}
// hide input, while retaining its focus, and maintain layout so users can still click on the space to bring the display back
// visibility:hidden can prevent the input from receiving focus
.input-hidden & > input {
opacity: 0;
position: absolute;
left: -10000px;
}
}

View File

@@ -0,0 +1,11 @@
.plugin-checkbox_options:not(.rtl) {
.option input {
margin-right: 0.5rem;
}
}
.plugin-checkbox_options.rtl {
.option input {
margin-left: 0.5rem;
}
}

View File

@@ -0,0 +1,33 @@
/* stylelint-disable function-name-case */
.plugin-clear_button {
--ts-pr-clear-button: 1em;
.clear-button{
opacity: 0;
position: absolute;
top: 50%;
transform: translateY(-50%);
right: calc(#{$select-padding-x} - #{$select-padding-item-x});
margin-right: 0 !important;
background: transparent !important;
transition: opacity 0.5s;
cursor: pointer;
}
&.form-select .clear-button,
&.single .clear-button {
@if variable-exists(select-padding-dropdown-item-x) {
right: Max(var(--ts-pr-caret), #{$select-padding-dropdown-item-x});
}
@else{
right: Max(var(--ts-pr-caret), calc(#{$select-padding-x} - #{$select-padding-item-x}));
}
}
&.focus.has-items .clear-button,
&:not(.disabled):hover.has-items .clear-button{
opacity: 1;
}
}

View File

@@ -0,0 +1,10 @@
.#{$select-ns}-wrapper.plugin-drag_drop {
.ts-dragging{
color:transparent !important;
}
.ts-dragging > * {
visibility:hidden !important;
}
}

View File

@@ -0,0 +1,24 @@
.#{$select-ns}-wrapper{
.dropdown-header {
position: relative;
padding: ($select-padding-dropdown-item-y * 2) $select-padding-dropdown-item-x;
border-bottom: 1px solid $select-color-border;
background: color-mix($select-color-dropdown, $select-color-border, 85%);
border-radius: $select-border-radius $select-border-radius 0 0;
}
.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;
}
.dropdown-header-close:hover {
color: darken($select-color-text, 25%);
}
}

View File

@@ -0,0 +1,43 @@
.plugin-dropdown_input{
&.focus.dropdown-active .#{$select-ns}-control{
box-shadow: none;
border: $select-border;
@if variable-exists(input-box-shadow) {
box-shadow: $input-box-shadow;
}
}
.dropdown-input {
border: 1px solid $select-color-border;
border-width: 0 0 1px;
display: block;
padding: $select-padding-y $select-padding-x;
box-shadow: $select-shadow-input;
width: 100%;
background: transparent;
}
&.focus .#{$select-ns}-dropdown .dropdown-input{
@if variable-exists(input-focus-border-color) {
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;
}
}
}
.items-placeholder{
border: 0 none !important;
box-shadow: none !important;
width: 100%;
}
&.has-items .items-placeholder,
&.dropdown-active .items-placeholder{
display: none !important;
}
}

View File

@@ -0,0 +1,15 @@
.#{$select-ns}-wrapper.plugin-input_autogrow{
&.has-items .#{$select-ns}-control > input {
min-width: 0;
}
&.has-items.focus .#{$select-ns}-control > input {
flex: none;
min-width: 4px;
&::placeholder {
color:transparent;
}
}
}

View File

@@ -0,0 +1,25 @@
.#{$select-ns}-dropdown.plugin-optgroup_columns {
.ts-dropdown-content{
display: flex;
}
.optgroup {
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;
}
.optgroup::before {
display: none;
}
.optgroup-header {
border-top: 0 none;
}
}

View File

@@ -0,0 +1,70 @@
.#{$select-ns}-wrapper.plugin-remove_button{
.item {
display: inline-flex;
align-items: center;
}
.item .remove {
color: inherit;
text-decoration: none;
vertical-align: middle;
display: inline-block;
padding: 0 $select-padding-item-x;
border-radius: 0 2px 2px 0;
box-sizing: border-box;
}
.item .remove:hover {
background: rgba(0, 0, 0, 5%);
}
&.disabled .item .remove:hover {
background: none;
}
.remove-single {
position: absolute;
right: 0;
top: 0;
font-size: 23px;
}
}
.#{$select-ns}-wrapper.plugin-remove_button:not(.rtl){
.item {
padding-right: 0 !important;
}
.item .remove {
border-left: 1px solid $select-color-item-border;
margin-left: $select-padding-item-x;
}
.item.active .remove {
border-left-color: $select-color-item-active-border;
}
&.disabled .item .remove {
border-left-color: lighten(desaturate($select-color-item-border, 100%), $select-lighten-disabled-item-border);
}
}
.#{$select-ns}-wrapper.plugin-remove_button.rtl {
.item {
padding-left: 0 !important;
}
.item .remove {
border-right: 1px solid $select-color-item-border;
margin-right: $select-padding-item-x;
}
.item.active .remove {
border-right-color: $select-color-item-active-border;
}
&.disabled .item .remove {
border-right-color: lighten(desaturate($select-color-item-border, 100%), $select-lighten-disabled-item-border);
}
}

View File

@@ -0,0 +1,213 @@
/**
* Tom Select Bootstrap 4
*/
// Import Bootstrap 4 functions and variables
$state-valid: map-get($form-validation-states,'valid') !default;
$state-invalid: map-get($form-validation-states,'invalid') !default;
$enable-shadows: true !default;
$select-font-family: inherit !default;
$select-font-size: inherit !default;
$select-line-height: $input-btn-line-height !default; // formerly line-height-computed
$select-color-text: gray("800") !default; // $gray-800
$select-color-highlight: rgba(255, 237, 40, 40%) !default;
$select-color-input: $input-bg !default;
$select-color-input-full: $input-bg !default;
$select-color-input-error: map-get($state-invalid,'color') !default;
$select-color-input-error-focus: darken($select-color-input-error, 10%) !default;
$select-color-disabled: $input-disabled-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-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-border: 1px solid $input-border-color !default;
$select-border-radius: $input-border-radius !default;
$select-width-item-border: 0 !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 "tom-select";
@include ts-caret;
.#{$select-ns}-wrapper.form-control,
.#{$select-ns}-wrapper.form-select {
padding:0 !important;
}
.#{$select-ns}-dropdown,
.#{$select-ns}-dropdown.form-control {
height: auto;
padding: 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, 17.5%);
}
.#{$select-ns}-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;
}
}
.#{$select-ns}-dropdown-content {
padding: 5px 0;
}
.#{$select-ns}-control {
min-height: $input-height;
@include box-shadow($input-box-shadow);
@include transition($input-transition);
display:flex;
align-items: center;
.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 .#{$select-ns}-control,
.was-validated .invalid .#{$select-ns}-control{
border-color: $select-color-input-error;
.focus & {
border-color: $select-color-input-error-focus;
box-shadow: 0 0 0 $input-focus-width rgba($select-color-input-error, .25);
}
}
.is-valid .#{$select-ns}-control {
$_color: map-get($state-valid,'color');
border-color: $_color;
.focus & {
border-color: $_color;
box-shadow: 0 0 0 $input-focus-width rgba($_color, .25);
}
}
.#{$select-ns}-wrapper {
.input-group-sm > &,
&.form-control-sm {
.#{$select-ns}-control {
min-height: $input-height-sm;
padding: 0 .75rem;
// padding: $input-padding-y-sm $input-padding-x-sm;
@include border-radius($input-border-radius-sm);
@include font-size($input-font-size-sm);
}
&.has-items .#{$select-ns}-control {
min-height: $input-height-sm !important;
font-size: $input-font-size-sm;
padding-bottom: 0;
}
}
.input-group-sm > &.multi.has-items,
&.form-control-sm.multi.has-items {
.#{$select-ns}-control {
// padding-top = ($input-height-sm - border-width - item-height) / 2;
// item-height = ($select-line-height * $input-font-size-sm) + ($select-padding-item-y * 2)
$border-and-padding: add($input-border-width,$select-padding-item-y) * 2;
$ts-select-padding-sm: calc( (#{$input-height-sm} - (#{$select-line-height} * #{$input-font-size-sm}) - #{$border-and-padding})/2);
padding-top: $ts-select-padding-sm !important;
}
}
&.multi {
&.has-items .#{$select-ns}-control {
padding-left: calc(#{$select-padding-x} - #{$select-padding-item-x});
--ts-pr-min: calc(#{$select-padding-x} - #{$select-padding-item-x});
}
.#{$select-ns}-control > div {
border-radius: calc(#{$select-border-radius} - 1px);
}
}
.input-group-lg > & >,
&.form-control-lg {
.#{$select-ns}-control {
min-height: $input-height-lg;
@include border-radius($input-border-radius-lg);
@include font-size($input-font-size-lg);
}
}
}
.form-control.#{$select-ns}-wrapper {
padding: 0;
height: auto;
border: none;
background: none;
border-radius: 0;
}
.input-group {
& > .#{$select-ns}-wrapper {
flex-grow: 1;
}
& > .#{$select-ns}-wrapper:not(:nth-child(2)) > .#{$select-ns}-control {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
& > .#{$select-ns}-wrapper:not(:last-child) > .#{$select-ns}-control {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
}

View File

@@ -0,0 +1,258 @@
/**
* Tom Select Bootstrap 5
*/
// Import Bootstrap 5 functions and variables
$state-valid: map-get($form-validation-states,'valid') !default;
$state-invalid: map-get($form-validation-states,'invalid') !default;
$enable-shadows: true !default;
$select-font-family: inherit !default;
$select-font-size: inherit !default;
$select-line-height: $input-btn-line-height !default; // formerly line-height-computed
$select-color-text: $gray-800 !default;
$select-color-highlight: rgba(255, 237, 40, 40%) !default;
$select-color-input: $input-bg !default;
$select-color-input-full: $input-bg !default;
$select-color-disabled: $input-disabled-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-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: color-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-border: 1px solid $input-border-color !default;
$select-border-radius: $input-border-radius !default;
$select-width-item-border: 0 !default;
$select-padding-x: $input-padding-x !default;
$select-padding-y: $input-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 "tom-select";
@mixin ts-form-validation-state-selector($state) {
$state-map: map-get($form-validation-states,$state);
.#{$select-ns}-wrapper.is-#{$state},
.was-validated .#{$state},
.was-validated :#{$state} + .#{$select-ns}-wrapper {
$color: map-get($state-map,'color');
$icon: map-get($state-map,'icon');
border-color: $color;
&:not(.single) {
background-image: escape-svg($icon);
background-position: right $input-height-inner-quarter center;
background-size: $input-height-inner-half $input-height-inner-half;
background-repeat: no-repeat;
}
&.single {
background-image: escape-svg($form-select-indicator), escape-svg($icon);
background-position: $form-select-bg-position, $form-select-feedback-icon-position;
background-size: $form-select-bg-size, $form-select-feedback-icon-size;
background-repeat: no-repeat;
}
&.focus .#{$select-ns}-control {
border-color: $color;
box-shadow: 0 0 $input-btn-focus-blur $input-focus-width rgba($color, $input-btn-focus-color-opacity);
}
}
}
.#{$select-ns}-dropdown,
.#{$select-ns}-dropdown.form-control,
.#{$select-ns}-dropdown.form-select {
height: auto;
padding: 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, 17.5%);
}
.#{$select-ns}-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;
}
}
.#{$select-ns}-dropdown-content {
padding: 5px 0;
}
.#{$select-ns}-control {
@include box-shadow($input-box-shadow);
@include transition($input-transition);
display:flex;
align-items: center;
.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;
}
}
.item {
display: flex;
align-items: center;
}
}
@include ts-form-validation-state-selector('invalid');
@include ts-form-validation-state-selector('valid');
.#{$select-ns}-wrapper {
min-height: $input-height;
display:flex;
.input-group-sm > &,
&.form-select-sm,
&.form-control-sm {
min-height: $input-height-sm;
.#{$select-ns}-control {
@include border-radius($input-border-radius-sm);
@include font-size($input-font-size-sm);
}
&.has-items .#{$select-ns}-control {
font-size: $input-font-size-sm;
padding-bottom: 0;
}
}
.input-group-sm > &.multi.has-items,
&.form-select-sm.multi.has-items,
&.form-control-sm.multi.has-items {
.#{$select-ns}-control {
// padding-top = ($input-height-sm - border-width - item-height) / 2;
// item-height = ($select-line-height * $input-font-size-sm) + ($select-padding-item-y * 2)
$border-and-padding: calc(($input-border-width + $select-padding-item-y) * 2);
$ts-select-padding-sm: calc((#{$input-height-sm} - (#{$select-line-height} * #{$input-font-size-sm}) - #{$border-and-padding})/2);
padding-top: $ts-select-padding-sm !important;
}
}
&.multi {
&.has-items .#{$select-ns}-control {
padding-left: calc(#{$select-padding-x} - #{$select-padding-item-x});
--ts-pr-min: calc(#{$select-padding-x} - #{$select-padding-item-x});
}
.#{$select-ns}-control > div {
border-radius: calc(#{$select-border-radius} - 1px);
}
}
.input-group-lg > &,
&.form-control-lg,
&.form-select-lg {
min-height: $input-height-lg;
.#{$select-ns}-control{
@include border-radius($input-border-radius-lg);
@include font-size($input-font-size-lg);
}
}
&:not(.form-control, .form-select) {
padding: 0;
border: none;
height: auto;
box-shadow: none;
background: none;
&.single .#{$select-ns}-control {
background-image: escape-svg($form-select-indicator);
background-repeat: no-repeat;
background-position: $form-select-bg-position;
background-size: $form-select-bg-size;
}
}
&.form-select,
&.single {
--ts-pr-caret: #{$form-select-indicator-padding};
}
&.form-control,
&.form-select {
padding:0 !important;
height: auto;
box-shadow: none;
display: flex;
.#{$select-ns}-control,
&.single.input-active .#{$select-ns}-control {
border: none !important;
}
&:not(.disabled) .#{$select-ns}-control,
&:not(.disabled).single.input-active .#{$select-ns}-control {
background: transparent !important; // let the background of .form-select show through
}
}
}
.input-group{
& > .#{$select-ns}-wrapper {
flex-grow: 1;
width: 1%;
}
& > .#{$select-ns}-wrapper:not(:nth-child(2)) > .#{$select-ns}-control {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
& > .#{$select-ns}-wrapper:not(:last-child) > .#{$select-ns}-control {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
}

View File

@@ -0,0 +1,89 @@
$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;
$select-shadow-input: inset 0 1px 1px rgba(0, 0, 0, 10%) !default;
$select-shadow-input-focus: inset 0 1px 2px rgba(0, 0, 0, 15%) !default;
@import "tom-select";
@include ts-caret;
.#{$select-ns}-wrapper {
display:flex;
min-height:$select-line-height + ($select-padding-y*2) + ($select-border-width *2);
&.multi {
&.has-items .#{$select-ns}-control {
$padding-x: $select-padding-x - 3px;
padding-left: $padding-x;
--ts-pr-min: $padding-x;
}
.#{$select-ns}-control {
[data-value] {
text-shadow: 0 1px 0 rgba(0, 51, 83, 30%);
border-radius: 3px;
@include selectize-vertical-gradient(#1da7ee, #178ee9);
box-shadow: 0 1px 0 rgba(0, 0, 0, 20%),inset 0 1px rgba(255, 255, 255, 3%);
&.active {
@include selectize-vertical-gradient(#008fd8, #0075cf);
}
}
}
&.disabled .#{$select-ns}-control [data-value] {
color: #999;
text-shadow: none;
background: none;
box-shadow: none;
&, .remove {
border-color: #e6e6e6;
}
.remove {
background: none;
}
}
}
&.single {
.#{$select-ns}-control {
box-shadow: 0 1px 0 rgba(0, 0, 0, 5%), inset 0 1px 0 rgba(255, 255, 255, 80%);
@include selectize-vertical-gradient(#fefefe, #f2f2f2);
}
}
}
.#{$select-ns}-wrapper.single .#{$select-ns}-control, .#{$select-ns}-dropdown.single {
border-color: #b8b8b8;
}
.#{$select-ns}-control {
.dropdown-active & {
border-radius: $select-border-radius $select-border-radius 0 0;
}
}
.#{$select-ns}-dropdown {
.optgroup-header {
padding-top: $select-padding-dropdown-item-y + 2px;
font-weight: bold;
font-size: 0.85em;
}
.optgroup {
border-top: 1px solid $select-color-dropdown-border-top;
&:first-child {
border-top: 0 none;
}
}
}

179
node_modules/tom-select/dist/scss/tom-select.scss generated vendored Normal file
View File

@@ -0,0 +1,179 @@
/**
* tom-select.css (v2.4.3)
* Copyright (c) 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.
*
*/
// base styles
$select-ns: 'ts' !default;
$select-font-family: inherit !default;
$select-font-size: 13px !default;
$select-line-height: 18px !default;
$select-color-text: #303030 !default;
$select-color-border: #d0d0d0 !default;
$select-color-highlight: rgba(125, 168, 208, 20%) !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(red($select-color-text), green($select-color-text), blue($select-color-text), 50%) !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;
$select-shadow-input: none !default;
$select-shadow-input-focus: none !default;
$select-border-width: 1px !default;
$select-border: $select-border-width solid $select-color-border !default;
$select-dropdown-border: 1px solid $select-color-dropdown-border !default;
$select-border-radius: 3px !default;
$select-width-item-border: 0 !default;
$select-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;
$select-arrow-size: 5px !default;
$select-arrow-color: #808080 !default;
$select-arrow-offset: 15px !default;
$select-caret-margin: 0 4px !default;
$select-caret-margin-rtl: 0 4px 0 -2px !default;
$select-spinner-size: 30px !default;
$select-spinner-border-size: 5px !default;
$select-spinner-border-color: $select-color-border !default;
@import 'items';
@import 'dropdown';
@import "./plugins/drag_drop.scss";
@import "./plugins/checkbox_options.scss";
@import "./plugins/clear_button.scss";
@import "./plugins/dropdown_header.scss";
@import "./plugins/dropdown_input.scss";
@import "./plugins/input_autogrow.scss";
@import "./plugins/optgroup_columns.scss";
@import "./plugins/remove_button.scss";
:root {
--ts-pr-clear-button: 0px;
--ts-pr-caret: 0px;
--ts-pr-min: .75rem;
}
@mixin selectize-vertical-gradient($color-top, $color-bottom) {
background-color: color-mix($color-top, $color-bottom, 60%);
background-image: linear-gradient(to bottom, $color-top, $color-bottom);
background-repeat: repeat-x;
}
.#{$select-ns}-wrapper.single {
.#{$select-ns}-control {
&, input {
cursor: pointer;
}
}
}
.#{$select-ns}-control:not(.rtl) {
padding-right: max( var(--ts-pr-min), calc( var(--ts-pr-clear-button) + var(--ts-pr-caret)) ) !important;
}
.#{$select-ns}-control.rtl {
padding-left: max( var(--ts-pr-min), calc( var(--ts-pr-clear-button) + var(--ts-pr-caret)) ) !important;
}
@mixin ts-caret() {
.#{$select-ns}-wrapper.single {
.#{$select-ns}-control {
--ts-pr-caret: 2rem;
&::after {
content: ' ';
display: block;
position: absolute;
top: 50%;
margin-top: round(-0.5 * $select-arrow-size);
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(.rtl)::after {
right: $select-arrow-offset;
}
&.rtl::after {
left: $select-arrow-offset;
}
}
&.dropdown-active .#{$select-ns}-control::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;
}
&.input-active .#{$select-ns}-control,
&.input-active .#{$select-ns}-control input {
cursor: text;
}
}
}
.#{$select-ns}-wrapper {
position: relative;
}
.#{$select-ns}-dropdown,
.#{$select-ns}-control,
.#{$select-ns}-control input {
color: $select-color-text;
font-family: $select-font-family;
font-size: $select-font-size;
line-height: $select-line-height;
}
.#{$select-ns}-control,
.#{$select-ns}-wrapper.single.input-active .#{$select-ns}-control {
background: $select-color-input;
cursor: text;
}
.ts-hidden-accessible {
border: 0 !important;
clip: rect(0 0 0 0) !important;
clip-path: inset(50%) !important;
overflow: hidden !important;
padding: 0 !important;
position: absolute !important;
width: 1px !important;
white-space: nowrap !important;
}