Initial commit

This commit is contained in:
pasketti
2026-04-05 16:14:49 -04:00
commit ebee3a5534
14059 changed files with 2588797 additions and 0 deletions

21
node_modules/react-select/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2018 Jed Watson
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

427
node_modules/react-select/dist/react-select.css generated vendored Normal file
View File

@@ -0,0 +1,427 @@
/**
* React Select
* ============
* Created by Jed Watson and Joss Mackison for KeystoneJS, http://www.keystonejs.com/
* https://twitter.com/jedwatson https://twitter.com/jossmackison https://twitter.com/keystonejs
* MIT License: https://github.com/JedWatson/react-select
*/
.Select {
position: relative;
}
.Select input::-webkit-contacts-auto-fill-button,
.Select input::-webkit-credentials-auto-fill-button {
display: none !important;
}
.Select input::-ms-clear {
display: none !important;
}
.Select input::-ms-reveal {
display: none !important;
}
.Select,
.Select div,
.Select input,
.Select span {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.Select.is-disabled .Select-arrow-zone {
cursor: default;
pointer-events: none;
opacity: 0.35;
}
.Select.is-disabled > .Select-control {
background-color: #f9f9f9;
}
.Select.is-disabled > .Select-control:hover {
box-shadow: none;
}
.Select.is-open > .Select-control {
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
background: #fff;
border-color: #b3b3b3 #ccc #d9d9d9;
}
.Select.is-open > .Select-control .Select-arrow {
top: -2px;
border-color: transparent transparent #999;
border-width: 0 5px 5px;
}
.Select.is-searchable.is-open > .Select-control {
cursor: text;
}
.Select.is-searchable.is-focused:not(.is-open) > .Select-control {
cursor: text;
}
.Select.is-focused > .Select-control {
background: #fff;
}
.Select.is-focused:not(.is-open) > .Select-control {
border-color: #007eff;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 0 3px rgba(0, 126, 255, 0.1);
background: #fff;
}
.Select.has-value.is-clearable.Select--single > .Select-control .Select-value {
padding-right: 42px;
}
.Select.has-value.Select--single > .Select-control .Select-value .Select-value-label,
.Select.has-value.is-pseudo-focused.Select--single > .Select-control .Select-value .Select-value-label {
color: #333;
}
.Select.has-value.Select--single > .Select-control .Select-value a.Select-value-label,
.Select.has-value.is-pseudo-focused.Select--single > .Select-control .Select-value a.Select-value-label {
cursor: pointer;
text-decoration: none;
}
.Select.has-value.Select--single > .Select-control .Select-value a.Select-value-label:hover,
.Select.has-value.is-pseudo-focused.Select--single > .Select-control .Select-value a.Select-value-label:hover,
.Select.has-value.Select--single > .Select-control .Select-value a.Select-value-label:focus,
.Select.has-value.is-pseudo-focused.Select--single > .Select-control .Select-value a.Select-value-label:focus {
color: #007eff;
outline: none;
text-decoration: underline;
}
.Select.has-value.Select--single > .Select-control .Select-value a.Select-value-label:focus,
.Select.has-value.is-pseudo-focused.Select--single > .Select-control .Select-value a.Select-value-label:focus {
background: #fff;
}
.Select.has-value.is-pseudo-focused .Select-input {
opacity: 0;
}
.Select.is-open .Select-arrow,
.Select .Select-arrow-zone:hover > .Select-arrow {
border-top-color: #666;
}
.Select.Select--rtl {
direction: rtl;
text-align: right;
}
.Select-control {
background-color: #fff;
border-color: #d9d9d9 #ccc #b3b3b3;
border-radius: 4px;
border: 1px solid #ccc;
color: #333;
cursor: default;
display: table;
border-spacing: 0;
border-collapse: separate;
height: 36px;
outline: none;
overflow: hidden;
position: relative;
width: 100%;
}
.Select-control:hover {
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}
.Select-control .Select-input:focus {
outline: none;
background: #fff;
}
.Select-placeholder,
.Select--single > .Select-control .Select-value {
bottom: 0;
color: #aaa;
left: 0;
line-height: 34px;
padding-left: 10px;
padding-right: 10px;
position: absolute;
right: 0;
top: 0;
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.Select-input {
height: 34px;
padding-left: 10px;
padding-right: 10px;
vertical-align: middle;
}
.Select-input > input {
width: 100%;
background: none transparent;
border: 0 none;
box-shadow: none;
cursor: default;
display: inline-block;
font-family: inherit;
font-size: inherit;
margin: 0;
outline: none;
line-height: 17px;
/* For IE 8 compatibility */
padding: 8px 0 12px;
/* For IE 8 compatibility */
-webkit-appearance: none;
}
.is-focused .Select-input > input {
cursor: text;
}
.has-value.is-pseudo-focused .Select-input {
opacity: 0;
}
.Select-control:not(.is-searchable) > .Select-input {
outline: none;
}
.Select-loading-zone {
cursor: pointer;
display: table-cell;
position: relative;
text-align: center;
vertical-align: middle;
width: 16px;
}
.Select-loading {
-webkit-animation: Select-animation-spin 400ms infinite linear;
-o-animation: Select-animation-spin 400ms infinite linear;
animation: Select-animation-spin 400ms infinite linear;
width: 16px;
height: 16px;
box-sizing: border-box;
border-radius: 50%;
border: 2px solid #ccc;
border-right-color: #333;
display: inline-block;
position: relative;
vertical-align: middle;
}
.Select-clear-zone {
-webkit-animation: Select-animation-fadeIn 200ms;
-o-animation: Select-animation-fadeIn 200ms;
animation: Select-animation-fadeIn 200ms;
color: #999;
cursor: pointer;
display: table-cell;
position: relative;
text-align: center;
vertical-align: middle;
width: 17px;
}
.Select-clear-zone:hover {
color: #D0021B;
}
.Select-clear {
display: inline-block;
font-size: 18px;
line-height: 1;
}
.Select--multi .Select-clear-zone {
width: 17px;
}
.Select-arrow-zone {
cursor: pointer;
display: table-cell;
position: relative;
text-align: center;
vertical-align: middle;
width: 25px;
padding-right: 5px;
}
.Select--rtl .Select-arrow-zone {
padding-right: 0;
padding-left: 5px;
}
.Select-arrow {
border-color: #999 transparent transparent;
border-style: solid;
border-width: 5px 5px 2.5px;
display: inline-block;
height: 0;
width: 0;
position: relative;
}
.Select-control > *:last-child {
padding-right: 5px;
}
.Select--multi .Select-multi-value-wrapper {
display: inline-block;
}
.Select .Select-aria-only {
position: absolute;
display: inline-block;
height: 1px;
width: 1px;
margin: -1px;
clip: rect(0, 0, 0, 0);
overflow: hidden;
float: left;
}
@-webkit-keyframes Select-animation-fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes Select-animation-fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.Select-menu-outer {
border-bottom-right-radius: 4px;
border-bottom-left-radius: 4px;
background-color: #fff;
border: 1px solid #ccc;
border-top-color: #e6e6e6;
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
box-sizing: border-box;
margin-top: -1px;
max-height: 200px;
position: absolute;
left: 0;
top: 100%;
width: 100%;
z-index: 1;
-webkit-overflow-scrolling: touch;
}
.Select-menu {
max-height: 198px;
overflow-y: auto;
}
.Select-option {
box-sizing: border-box;
background-color: #fff;
color: #666666;
cursor: pointer;
display: block;
padding: 8px 10px;
}
.Select-option:last-child {
border-bottom-right-radius: 4px;
border-bottom-left-radius: 4px;
}
.Select-option.is-selected {
background-color: #f5faff;
/* Fallback color for IE 8 */
background-color: rgba(0, 126, 255, 0.04);
color: #333;
}
.Select-option.is-focused {
background-color: #ebf5ff;
/* Fallback color for IE 8 */
background-color: rgba(0, 126, 255, 0.08);
color: #333;
}
.Select-option.is-disabled {
color: #cccccc;
cursor: default;
}
.Select-noresults {
box-sizing: border-box;
color: #999999;
cursor: default;
display: block;
padding: 8px 10px;
}
.Select--multi .Select-input {
vertical-align: middle;
margin-left: 10px;
padding: 0;
}
.Select--multi.Select--rtl .Select-input {
margin-left: 0;
margin-right: 10px;
}
.Select--multi.has-value .Select-input {
margin-left: 5px;
}
.Select--multi .Select-value {
background-color: #ebf5ff;
/* Fallback color for IE 8 */
background-color: rgba(0, 126, 255, 0.08);
border-radius: 2px;
border: 1px solid #c2e0ff;
/* Fallback color for IE 8 */
border: 1px solid rgba(0, 126, 255, 0.24);
color: #007eff;
display: inline-block;
font-size: 0.9em;
line-height: 1.4;
margin-left: 5px;
margin-top: 5px;
vertical-align: top;
}
.Select--multi .Select-value-icon,
.Select--multi .Select-value-label {
display: inline-block;
vertical-align: middle;
}
.Select--multi .Select-value-label {
border-bottom-right-radius: 2px;
border-top-right-radius: 2px;
cursor: default;
padding: 2px 5px;
}
.Select--multi a.Select-value-label {
color: #007eff;
cursor: pointer;
text-decoration: none;
}
.Select--multi a.Select-value-label:hover {
text-decoration: underline;
}
.Select--multi .Select-value-icon {
cursor: pointer;
border-bottom-left-radius: 2px;
border-top-left-radius: 2px;
border-right: 1px solid #c2e0ff;
/* Fallback color for IE 8 */
border-right: 1px solid rgba(0, 126, 255, 0.24);
padding: 1px 5px 3px;
}
.Select--multi .Select-value-icon:hover,
.Select--multi .Select-value-icon:focus {
background-color: #d8eafd;
/* Fallback color for IE 8 */
background-color: rgba(0, 113, 230, 0.08);
color: #0071e6;
}
.Select--multi .Select-value-icon:active {
background-color: #c2e0ff;
/* Fallback color for IE 8 */
background-color: rgba(0, 126, 255, 0.24);
}
.Select--multi.Select--rtl .Select-value {
margin-left: 0;
margin-right: 5px;
}
.Select--multi.Select--rtl .Select-value-icon {
border-right: none;
border-left: 1px solid #c2e0ff;
/* Fallback color for IE 8 */
border-left: 1px solid rgba(0, 126, 255, 0.24);
}
.Select--multi.is-disabled .Select-value {
background-color: #fcfcfc;
border: 1px solid #e3e3e3;
color: #333;
}
.Select--multi.is-disabled .Select-value-icon {
cursor: not-allowed;
border-right: 1px solid #e3e3e3;
}
.Select--multi.is-disabled .Select-value-icon:hover,
.Select--multi.is-disabled .Select-value-icon:focus,
.Select--multi.is-disabled .Select-value-icon:active {
background-color: #fcfcfc;
}
@keyframes Select-animation-spin {
to {
transform: rotate(1turn);
}
}
@-webkit-keyframes Select-animation-spin {
to {
-webkit-transform: rotate(1turn);
}
}

2671
node_modules/react-select/dist/react-select.es.js generated vendored Normal file

File diff suppressed because one or more lines are too long

2682
node_modules/react-select/dist/react-select.js generated vendored Normal file

File diff suppressed because one or more lines are too long

1
node_modules/react-select/dist/react-select.min.css generated vendored Normal file

File diff suppressed because one or more lines are too long

1
node_modules/react-select/dist/react-select.min.js generated vendored Normal file

File diff suppressed because one or more lines are too long

322
node_modules/react-select/less/control.less generated vendored Normal file
View File

@@ -0,0 +1,322 @@
//
// Control
// ------------------------------
// Mixins
// focused styles
.Select-focus-state(@color) {
border-color: @color;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 0 3px fade(@color, 10%);
background: @select-input-bg-focus;
}
// "classic" focused styles: maintain for legacy
.Select-focus-state-classic() {
border-color: @select-input-border-focus lighten(@select-input-border-focus, 5%) lighten(@select-input-border-focus, 5%);
box-shadow: @select-input-box-shadow-focus;
background: @select-input-bg-focus;
}
// base
.Select {
position: relative;
// disable some browser-specific behaviours that break the input
input::-webkit-contacts-auto-fill-button,
input::-webkit-credentials-auto-fill-button {
display: none !important;
}
input::-ms-clear {
display: none !important;
}
input::-ms-reveal {
display: none !important;
}
// preferred box model
&,
& div,
& input,
& span {
.box-sizing(border-box);
}
// handle disabled state
&.is-disabled {
.Select-arrow-zone {
cursor: default;
pointer-events: none;
opacity: 0.35;
}
> .Select-control {
background-color: @select-input-bg-disabled;
&:hover {
box-shadow: none;
}
}
}
&.is-open > .Select-control {
.border-bottom-radius( 0 );
background: @select-input-bg;
border-color: darken(@select-input-border-color, 10%) @select-input-border-color lighten(@select-input-border-color, 5%);
// flip the arrow so its pointing up when the menu is open
.Select-arrow {
top: -2px;
border-color: transparent transparent @select-arrow-color;
border-width: 0 @select-arrow-width @select-arrow-width;
}
}
&.is-searchable {
&.is-open > .Select-control {
cursor: text;
}
&.is-focused:not(.is-open) > .Select-control {
cursor: text;
}
}
&.is-focused > .Select-control {
background: @select-input-bg-focus;
}
&.is-focused:not(.is-open) > .Select-control {
.Select-focus-state(@select-input-border-focus);
}
&.has-value.is-clearable.Select--single > .Select-control .Select-value {
padding-right: (@select-clear-width + @select-arrow-width * 5);
}
&.has-value.Select--single > .Select-control .Select-value,
&.has-value.is-pseudo-focused.Select--single > .Select-control .Select-value {
.Select-value-label {
color: @select-text-color;
}
a.Select-value-label {
cursor: pointer;
text-decoration: none;
&:hover,
&:focus {
color: @select-link-hover-color;
outline: none;
text-decoration: underline;
}
&:focus {
background: @select-input-bg-focus;
}
}
}
// fake-hide the input when the control is pseudo-focused
&.has-value.is-pseudo-focused .Select-input {
opacity: 0;
}
&.is-open .Select-arrow,
.Select-arrow-zone:hover > .Select-arrow {
border-top-color: @select-arrow-color-hover;
}
&.Select--rtl {
direction: rtl;
text-align: right;
}
}
// base
.Select-control {
background-color: @select-input-bg;
border-color: lighten(@select-input-border-color, 5%) @select-input-border-color darken(@select-input-border-color, 10%);
border-radius: @select-input-border-radius;
border: @select-input-border-width solid @select-input-border-color;
color: @select-text-color;
cursor: default;
display: table;
border-spacing: 0;
border-collapse: separate;
height: @select-input-height;
outline: none;
overflow: hidden;
position: relative;
width: 100%;
&:hover {
box-shadow: @select-input-hover-box-shadow;
}
.Select-input:focus {
outline: none;
background: @select-input-bg-focus;
}
}
// placeholder
.Select-placeholder,
.Select--single > .Select-control .Select-value {
bottom: 0;
color: @select-input-placeholder;
left: 0;
line-height: @select-input-internal-height;
padding-left: @select-padding-horizontal;
padding-right: @select-padding-horizontal;
position: absolute;
right: 0;
top: 0;
// crop text
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
// the <input> element users type in
.Select-input {
// inherits `display: inline-block` from "react-input-autosize"
height: @select-input-internal-height;
padding-left: @select-padding-horizontal;
padding-right: @select-padding-horizontal;
vertical-align: middle;
> input {
width: 100%;
background: none transparent;
border: 0 none;
box-shadow: none;
cursor: default;
display: inline-block;
font-family: inherit;
font-size: inherit;
// height: @select-input-internal-height;
margin: 0;
outline: none;
// padding: 0;
line-height: 17px; /* For IE 8 compatibility */
padding: ((@select-input-internal-height - 14) / 2 - 2) 0 ((@select-input-internal-height - 14) / 2 + 2); /* For IE 8 compatibility */
-webkit-appearance: none;
.is-focused & {
cursor: text;
}
}
}
// fake-hide the input when the control is pseudo-focused
.has-value.is-pseudo-focused .Select-input {
opacity: 0;
}
// fake input
.Select-control:not(.is-searchable) > .Select-input {
outline: none;
}
// loading indicator
.Select-loading-zone {
cursor: pointer;
display: table-cell;
position: relative;
text-align: center;
vertical-align: middle;
width: @select-loading-size;
}
.Select-loading {
.Select-spinner(@select-loading-size, @select-loading-color-bg, @select-loading-color);
vertical-align: middle;
}
// the little cross that clears the field
.Select-clear-zone {
.animation( Select-animation-fadeIn 200ms );
color: @select-clear-color;
cursor: pointer;
display: table-cell;
position: relative;
text-align: center;
vertical-align: middle;
width: @select-clear-width;
&:hover {
color: @select-clear-hover-color;
}
}
.Select-clear {
display: inline-block;
font-size: @select-clear-size;
line-height: 1;
}
.Select--multi .Select-clear-zone {
width: @select-clear-width;
}
// arrow indicator
.Select-arrow-zone {
cursor: pointer;
display: table-cell;
position: relative;
text-align: center;
vertical-align: middle;
width: (@select-arrow-width * 5);
padding-right: @select-arrow-width;
.Select--rtl & {
padding-right: 0;
padding-left: @select-arrow-width;
}
}
.Select-arrow {
border-color: @select-arrow-color transparent transparent;
border-style: solid;
border-width: @select-arrow-width @select-arrow-width (@select-arrow-width / 2);
display: inline-block;
height: 0;
width: 0;
position: relative;
}
.Select-control > *:last-child {
padding-right: @select-right-padding;
}
.Select--multi .Select-multi-value-wrapper {
display: inline-block;
}
.Select .Select-aria-only {
position: absolute;
display: inline-block;
height: 1px;
width: 1px;
margin: -1px;
clip: rect(0,0,0,0);
overflow: hidden;
float: left;
}
// Animation
// ------------------------------
// fade in
@-webkit-keyframes Select-animation-fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
@keyframes Select-animation-fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}

1
node_modules/react-select/less/default.less generated vendored Normal file
View File

@@ -0,0 +1 @@
@import "select.less";

80
node_modules/react-select/less/menu.less generated vendored Normal file
View File

@@ -0,0 +1,80 @@
//
// Select Menu
// ------------------------------
// wrapper around the menu
.Select-menu-outer {
// Unfortunately, having both border-radius and allows scrolling using overflow defined on the same
// element forces the browser to repaint on scroll. However, if these definitions are split into an
// outer and an inner element, the browser is able to optimize the scrolling behavior and does not
// have to repaint on scroll.
.border-bottom-radius( @select-input-border-radius );
background-color: @select-input-bg;
border: 1px solid @select-input-border-color;
border-top-color: mix(@select-input-bg, @select-input-border-color, 50%);
box-shadow: @select-menu-box-shadow;
box-sizing: border-box;
margin-top: -1px;
max-height: @select-menu-max-height;
position: absolute;
left: 0;
top: 100%;
width: 100%;
z-index: @select-menu-zindex;
-webkit-overflow-scrolling: touch;
}
// wrapper
.Select-menu {
max-height: (@select-menu-max-height - 2px);
overflow-y: auto;
}
// options
.Select-option {
box-sizing: border-box;
background-color: @select-option-bg;
color: @select-option-color;
cursor: pointer;
display: block;
padding: @select-padding-vertical @select-padding-horizontal;
&:last-child {
.border-bottom-radius( @select-input-border-radius );
}
&.is-selected {
background-color: @select-option-selected-bg-fb; /* Fallback color for IE 8 */
background-color: @select-option-selected-bg;
color: @select-option-selected-color;
}
&.is-focused {
background-color: @select-option-focused-bg-fb; /* Fallback color for IE 8 */
background-color: @select-option-focused-bg;
color: @select-option-focused-color;
}
&.is-disabled {
color: @select-option-disabled-color;
cursor: default;
}
}
// no results
.Select-noresults {
box-sizing: border-box;
color: @select-noresults-color;
cursor: default;
display: block;
padding: @select-padding-vertical @select-padding-horizontal;
}

56
node_modules/react-select/less/mixins.less generated vendored Normal file
View File

@@ -0,0 +1,56 @@
//
// Mixins
// ------------------------------
// Utilities
.size(@width; @height) {
width: @width;
height: @height;
}
.square(@size) {
.size(@size; @size);
}
.border-top-radius(@radius) {
border-top-right-radius: @radius;
border-top-left-radius: @radius;
}
.border-right-radius(@radius) {
border-bottom-right-radius: @radius;
border-top-right-radius: @radius;
}
.border-bottom-radius(@radius) {
border-bottom-right-radius: @radius;
border-bottom-left-radius: @radius;
}
.border-left-radius(@radius) {
border-bottom-left-radius: @radius;
border-top-left-radius: @radius;
}
// Vendor Prefixes
.animation(@animation) {
-webkit-animation: @animation;
-o-animation: @animation;
animation: @animation;
}
.box-sizing(@boxmodel) {
-webkit-box-sizing: @boxmodel;
-moz-box-sizing: @boxmodel;
box-sizing: @boxmodel;
}
.rotate(@degrees) {
-webkit-transform: rotate(@degrees);
-ms-transform: rotate(@degrees); // IE9 only
-o-transform: rotate(@degrees);
transform: rotate(@degrees);
}
.transform(@transform) {
-webkit-transform: @transform;
-moz-transform: @transform;
-ms-transform: @transform;
transform: @transform;
}

117
node_modules/react-select/less/multi.less generated vendored Normal file
View File

@@ -0,0 +1,117 @@
//
// Multi-Select
// ------------------------------
// Base
.Select--multi {
// add margin to the input element
.Select-input {
vertical-align: middle;
// border: 1px solid transparent;
margin-left: @select-padding-horizontal;
padding: 0;
}
&.Select--rtl .Select-input {
margin-left: 0;
margin-right: @select-padding-horizontal;
}
// reduce margin once there is value
&.has-value .Select-input {
margin-left: @select-item-gutter;
}
// Items
.Select-value {
background-color: @select-item-bg-fb; /* Fallback color for IE 8 */
background-color: @select-item-bg;
border-radius: @select-item-border-radius;
border: 1px solid @select-item-border-color-fb; /* Fallback color for IE 8 */
border: 1px solid @select-item-border-color;
color: @select-item-color;
display: inline-block;
font-size: @select-item-font-size;
line-height: 1.4;
margin-left: @select-item-gutter;
margin-top: @select-item-gutter;
vertical-align: top;
}
// common
.Select-value-icon,
.Select-value-label {
display: inline-block;
vertical-align: middle;
}
// label
.Select-value-label {
.border-right-radius( @select-item-border-radius );
cursor: default;
padding: @select-item-padding-vertical @select-item-padding-horizontal;
}
a.Select-value-label {
color: @select-item-color;
cursor: pointer;
text-decoration: none;
&:hover {
text-decoration: underline;
}
}
// icon
.Select-value-icon {
cursor: pointer;
.border-left-radius( @select-item-border-radius );
border-right: 1px solid @select-item-border-color-fb; /* Fallback color for IE 8 */
border-right: 1px solid @select-item-border-color;
// move the baseline up by 1px
padding: (@select-item-padding-vertical - 1) @select-item-padding-horizontal (@select-item-padding-vertical + 1);
&:hover,
&:focus {
background-color: @select-item-hover-bg-fb; /* Fallback color for IE 8 */
background-color: @select-item-hover-bg;
color: @select-item-hover-color;
}
&:active {
background-color: @select-item-border-color-fb; /* Fallback color for IE 8 */
background-color: @select-item-border-color;
}
}
&.Select--rtl {
.Select-value {
margin-left: 0;
margin-right: @select-item-gutter;
}
.Select-value-icon {
border-right: none;
border-left: 1px solid @select-item-border-color-fb; /* Fallback color for IE 8 */
border-left: 1px solid @select-item-border-color;
}
}
}
.Select--multi.is-disabled {
.Select-value {
background-color: @select-item-disabled-bg;
border: 1px solid @select-item-disabled-border-color;
color: @select-item-disabled-color;
}
// icon
.Select-value-icon {
cursor: not-allowed;
border-right: 1px solid @select-item-disabled-border-color;
&:hover,
&:focus,
&:active {
background-color: @select-item-disabled-bg;
}
}
}

95
node_modules/react-select/less/select.less generated vendored Normal file
View File

@@ -0,0 +1,95 @@
/**
* React Select
* ============
* Created by Jed Watson and Joss Mackison for KeystoneJS, http://www.keystonejs.com/
* https://twitter.com/jedwatson https://twitter.com/jossmackison https://twitter.com/keystonejs
* MIT License: https://github.com/JedWatson/react-select
*/
// Variables
// ------------------------------
// common
@select-primary-color: #007eff;
// control options
@select-input-bg: #fff;
@select-input-bg-disabled: #f9f9f9;
@select-input-bg-focus: @select-input-bg;
@select-input-border-color: #ccc;
@select-input-border-radius: 4px;
@select-input-border-focus: @select-primary-color;
@select-input-box-shadow-focus: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 0 5px -1px fade(@select-input-border-focus, 50%);
@select-input-border-width: 1px;
@select-input-height: 36px;
@select-input-internal-height: (@select-input-height - (@select-input-border-width * 2));
@select-input-placeholder: #aaa;
@select-text-color: #333;
@select-link-hover-color: @select-input-border-focus;
@select-input-hover-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
@select-padding-vertical: 8px;
@select-padding-horizontal: 10px;
// menu options
@select-menu-zindex: 1;
@select-menu-max-height: 200px;
@select-menu-box-shadow: @select-input-hover-box-shadow;
@select-option-color: lighten(@select-text-color, 20%);
@select-option-bg: @select-input-bg;
@select-option-focused-color: @select-text-color;
@select-option-focused-bg: fade(@select-primary-color, 8%);
@select-option-focused-bg-fb: mix(@select-primary-color, @select-option-bg, 8%); // Fallback color for IE 8
@select-option-selected-color: @select-text-color;
@select-option-selected-bg: fade(@select-primary-color, 4%);
@select-option-selected-bg-fb: mix(@select-primary-color, @select-option-bg, 4%); // Fallback color for IE 8
@select-option-disabled-color: lighten(@select-text-color, 60%);
@select-noresults-color: lighten(@select-text-color, 40%);
// clear "x" button
@select-clear-size: floor((@select-input-height / 2));
@select-clear-color: #999;
@select-clear-hover-color: #D0021B; // red
@select-clear-width: (@select-input-internal-height / 2);
// arrow indicator
@select-arrow-color: #999;
@select-arrow-color-hover: #666;
@select-arrow-width: 5px;
// loading indicator
@select-loading-size: 16px;
@select-loading-color: @select-text-color;
@select-loading-color-bg: @select-input-border-color;
@select-right-padding: 5px;
// multi-select item
@select-item-font-size: .9em;
@select-item-bg: fade(@select-primary-color, 8%);
@select-item-bg-fb: mix(@select-primary-color, @select-input-bg, 8%); // Fallback color for IE 8
@select-item-color: @select-primary-color;
@select-item-border-color: fade(@select-primary-color, 24%);
@select-item-border-color-fb: mix(@select-primary-color, @select-input-bg, 24%); // Fallback color for IE 8
@select-item-hover-color: darken(@select-item-color, 5%);
@select-item-hover-bg: darken(@select-item-bg, 5%);
@select-item-hover-bg-fb: mix(darken(@select-primary-color, 5%), @select-item-bg-fb, 8%); // Fallback color for IE 8
@select-item-disabled-color: #333;
@select-item-disabled-bg: #fcfcfc;
@select-item-disabled-border-color: darken(@select-item-disabled-bg, 10%);
@select-item-border-radius: 2px;
@select-item-gutter: 5px;
@select-item-padding-horizontal: 5px;
@select-item-padding-vertical: 2px;
// imports
@import "control.less";
@import "menu.less";
@import "mixins.less";
@import "multi.less";
@import "spinner.less";

22
node_modules/react-select/less/spinner.less generated vendored Normal file
View File

@@ -0,0 +1,22 @@
//
// Spinner
// ------------------------------
.Select-spinner(@size, @orbit, @satellite) {
.animation( Select-animation-spin 400ms infinite linear );
.square(@size);
box-sizing: border-box;
border-radius: 50%;
border: floor((@size / 8)) solid @orbit;
border-right-color: @satellite;
display: inline-block;
position: relative;
}
@keyframes Select-animation-spin {
to { transform: rotate(1turn); }
}
@-webkit-keyframes Select-animation-spin {
to { -webkit-transform: rotate(1turn); }
}

271
node_modules/react-select/lib/Async.js generated vendored Normal file
View File

@@ -0,0 +1,271 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _propTypes = require('prop-types');
var _propTypes2 = _interopRequireDefault(_propTypes);
var _react = require('react');
var _react2 = _interopRequireDefault(_react);
var _Select = require('./Select');
var _Select2 = _interopRequireDefault(_Select);
var _stripDiacritics = require('./utils/stripDiacritics');
var _stripDiacritics2 = _interopRequireDefault(_stripDiacritics);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var propTypes = {
autoload: _propTypes2.default.bool.isRequired, // automatically call the `loadOptions` prop on-mount; defaults to true
cache: _propTypes2.default.any, // object to use to cache results; set to null/false to disable caching
children: _propTypes2.default.func.isRequired, // Child function responsible for creating the inner Select component; (props: Object): PropTypes.element
ignoreAccents: _propTypes2.default.bool, // strip diacritics when filtering; defaults to true
ignoreCase: _propTypes2.default.bool, // perform case-insensitive filtering; defaults to true
loadOptions: _propTypes2.default.func.isRequired, // callback to load options asynchronously; (inputValue: string, callback: Function): ?Promise
loadingPlaceholder: _propTypes2.default.oneOfType([// replaces the placeholder while options are loading
_propTypes2.default.string, _propTypes2.default.node]),
multi: _propTypes2.default.bool, // multi-value input
noResultsText: _propTypes2.default.oneOfType([// field noResultsText, displayed when no options come back from the server
_propTypes2.default.string, _propTypes2.default.node]),
onChange: _propTypes2.default.func, // onChange handler: function (newValue) {}
onInputChange: _propTypes2.default.func, // optional for keeping track of what is being typed
options: _propTypes2.default.array.isRequired, // array of options
placeholder: _propTypes2.default.oneOfType([// field placeholder, displayed when there's no value (shared with Select)
_propTypes2.default.string, _propTypes2.default.node]),
searchPromptText: _propTypes2.default.oneOfType([// label to prompt for search input
_propTypes2.default.string, _propTypes2.default.node]),
value: _propTypes2.default.any // initial field value
};
var defaultCache = {};
var defaultChildren = function defaultChildren(props) {
return _react2.default.createElement(_Select2.default, props);
};
var defaultProps = {
autoload: true,
cache: defaultCache,
children: defaultChildren,
ignoreAccents: true,
ignoreCase: true,
loadingPlaceholder: 'Loading...',
options: [],
searchPromptText: 'Type to search'
};
var Async = function (_Component) {
_inherits(Async, _Component);
function Async(props, context) {
_classCallCheck(this, Async);
var _this = _possibleConstructorReturn(this, (Async.__proto__ || Object.getPrototypeOf(Async)).call(this, props, context));
_this._cache = props.cache === defaultCache ? {} : props.cache;
_this.state = {
inputValue: '',
isLoading: false,
options: props.options
};
_this.onInputChange = _this.onInputChange.bind(_this);
return _this;
}
_createClass(Async, [{
key: 'componentDidMount',
value: function componentDidMount() {
var autoload = this.props.autoload;
if (autoload) {
this.loadOptions('');
}
}
}, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
if (nextProps.options !== this.props.options) {
this.setState({
options: nextProps.options
});
}
}
}, {
key: 'componentWillUnmount',
value: function componentWillUnmount() {
this._callback = null;
}
}, {
key: 'loadOptions',
value: function loadOptions(inputValue) {
var _this2 = this;
var loadOptions = this.props.loadOptions;
var cache = this._cache;
if (cache && Object.prototype.hasOwnProperty.call(cache, inputValue)) {
this._callback = null;
this.setState({
isLoading: false,
options: cache[inputValue]
});
return;
}
var callback = function callback(error, data) {
var options = data && data.options || [];
if (cache) {
cache[inputValue] = options;
}
if (callback === _this2._callback) {
_this2._callback = null;
_this2.setState({
isLoading: false,
options: options
});
}
};
// Ignore all but the most recent request
this._callback = callback;
var promise = loadOptions(inputValue, callback);
if (promise) {
promise.then(function (data) {
return callback(null, data);
}, function (error) {
return callback(error);
});
}
if (this._callback && !this.state.isLoading) {
this.setState({
isLoading: true
});
}
}
}, {
key: 'onInputChange',
value: function onInputChange(inputValue) {
var _props = this.props,
ignoreAccents = _props.ignoreAccents,
ignoreCase = _props.ignoreCase,
onInputChange = _props.onInputChange;
var newInputValue = inputValue;
if (onInputChange) {
var value = onInputChange(newInputValue);
// Note: != used deliberately here to catch undefined and null
if (value != null && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) !== 'object') {
newInputValue = '' + value;
}
}
var transformedInputValue = newInputValue;
if (ignoreAccents) {
transformedInputValue = (0, _stripDiacritics2.default)(transformedInputValue);
}
if (ignoreCase) {
transformedInputValue = transformedInputValue.toLowerCase();
}
this.setState({ inputValue: newInputValue });
this.loadOptions(transformedInputValue);
// Return new input value, but without applying toLowerCase() to avoid modifying the user's view case of the input while typing.
return newInputValue;
}
}, {
key: 'noResultsText',
value: function noResultsText() {
var _props2 = this.props,
loadingPlaceholder = _props2.loadingPlaceholder,
noResultsText = _props2.noResultsText,
searchPromptText = _props2.searchPromptText;
var _state = this.state,
inputValue = _state.inputValue,
isLoading = _state.isLoading;
if (isLoading) {
return loadingPlaceholder;
}
if (inputValue && noResultsText) {
return noResultsText;
}
return searchPromptText;
}
}, {
key: 'focus',
value: function focus() {
this.select.focus();
}
}, {
key: 'render',
value: function render() {
var _this3 = this;
var _props3 = this.props,
children = _props3.children,
loadingPlaceholder = _props3.loadingPlaceholder,
placeholder = _props3.placeholder;
var _state2 = this.state,
isLoading = _state2.isLoading,
options = _state2.options;
var props = {
noResultsText: this.noResultsText(),
placeholder: isLoading ? loadingPlaceholder : placeholder,
options: isLoading && loadingPlaceholder ? [] : options,
ref: function ref(_ref) {
return _this3.select = _ref;
}
};
return children(_extends({}, this.props, props, {
isLoading: isLoading,
onInputChange: this.onInputChange
}));
}
}]);
return Async;
}(_react.Component);
exports.default = Async;
Async.propTypes = propTypes;
Async.defaultProps = defaultProps;

105
node_modules/react-select/lib/AsyncCreatable.js generated vendored Normal file
View File

@@ -0,0 +1,105 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _propTypes = require('prop-types');
var _propTypes2 = _interopRequireDefault(_propTypes);
var _react = require('react');
var _react2 = _interopRequireDefault(_react);
var _Async = require('./Async');
var _Async2 = _interopRequireDefault(_Async);
var _Creatable = require('./Creatable');
var _Creatable2 = _interopRequireDefault(_Creatable);
var _Select = require('./Select');
var _Select2 = _interopRequireDefault(_Select);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var AsyncCreatableSelect = function (_React$Component) {
_inherits(AsyncCreatableSelect, _React$Component);
function AsyncCreatableSelect() {
_classCallCheck(this, AsyncCreatableSelect);
return _possibleConstructorReturn(this, (AsyncCreatableSelect.__proto__ || Object.getPrototypeOf(AsyncCreatableSelect)).apply(this, arguments));
}
_createClass(AsyncCreatableSelect, [{
key: 'focus',
value: function focus() {
this.select.focus();
}
}, {
key: 'render',
value: function render() {
var _this2 = this;
return _react2.default.createElement(
_Async2.default,
this.props,
function (_ref) {
var ref = _ref.ref,
asyncProps = _objectWithoutProperties(_ref, ['ref']);
var asyncRef = ref;
return _react2.default.createElement(
_Creatable2.default,
asyncProps,
function (_ref2) {
var ref = _ref2.ref,
creatableProps = _objectWithoutProperties(_ref2, ['ref']);
var creatableRef = ref;
return _this2.props.children(_extends({}, creatableProps, {
ref: function ref(select) {
creatableRef(select);
asyncRef(select);
_this2.select = select;
}
}));
}
);
}
);
}
}]);
return AsyncCreatableSelect;
}(_react2.default.Component);
var defaultChildren = function defaultChildren(props) {
return _react2.default.createElement(_Select2.default, props);
};
AsyncCreatableSelect.propTypes = {
children: _propTypes2.default.func.isRequired // Child function responsible for creating the inner Select component; (props: Object): PropTypes.element
};
AsyncCreatableSelect.defaultProps = {
children: defaultChildren
};
exports.default = AsyncCreatableSelect;

383
node_modules/react-select/lib/Creatable.js generated vendored Normal file
View File

@@ -0,0 +1,383 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _propTypes = require('prop-types');
var _propTypes2 = _interopRequireDefault(_propTypes);
var _react = require('react');
var _react2 = _interopRequireDefault(_react);
var _defaultFilterOptions = require('./utils/defaultFilterOptions');
var _defaultFilterOptions2 = _interopRequireDefault(_defaultFilterOptions);
var _defaultMenuRenderer = require('./utils/defaultMenuRenderer');
var _defaultMenuRenderer2 = _interopRequireDefault(_defaultMenuRenderer);
var _Select = require('./Select');
var _Select2 = _interopRequireDefault(_Select);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var CreatableSelect = function (_React$Component) {
_inherits(CreatableSelect, _React$Component);
function CreatableSelect(props, context) {
_classCallCheck(this, CreatableSelect);
var _this = _possibleConstructorReturn(this, (CreatableSelect.__proto__ || Object.getPrototypeOf(CreatableSelect)).call(this, props, context));
_this.filterOptions = _this.filterOptions.bind(_this);
_this.menuRenderer = _this.menuRenderer.bind(_this);
_this.onInputKeyDown = _this.onInputKeyDown.bind(_this);
_this.onInputChange = _this.onInputChange.bind(_this);
_this.onOptionSelect = _this.onOptionSelect.bind(_this);
return _this;
}
_createClass(CreatableSelect, [{
key: 'createNewOption',
value: function createNewOption() {
var _props = this.props,
isValidNewOption = _props.isValidNewOption,
newOptionCreator = _props.newOptionCreator,
onNewOptionClick = _props.onNewOptionClick,
_props$options = _props.options,
options = _props$options === undefined ? [] : _props$options;
if (isValidNewOption({ label: this.inputValue })) {
var option = newOptionCreator({ label: this.inputValue, labelKey: this.labelKey, valueKey: this.valueKey });
var _isOptionUnique = this.isOptionUnique({ option: option, options: options });
// Don't add the same option twice.
if (_isOptionUnique) {
if (onNewOptionClick) {
onNewOptionClick(option);
} else {
options.unshift(option);
this.select.selectValue(option);
}
}
}
}
}, {
key: 'filterOptions',
value: function filterOptions() {
var _props2 = this.props,
filterOptions = _props2.filterOptions,
isValidNewOption = _props2.isValidNewOption,
promptTextCreator = _props2.promptTextCreator,
showNewOptionAtTop = _props2.showNewOptionAtTop;
// TRICKY Check currently selected options as well.
// Don't display a create-prompt for a value that's selected.
// This covers async edge-cases where a newly-created Option isn't yet in the async-loaded array.
var excludeOptions = (arguments.length <= 2 ? undefined : arguments[2]) || [];
var filteredOptions = filterOptions.apply(undefined, arguments) || [];
if (isValidNewOption({ label: this.inputValue })) {
var _newOptionCreator = this.props.newOptionCreator;
var option = _newOptionCreator({
label: this.inputValue,
labelKey: this.labelKey,
valueKey: this.valueKey
});
// TRICKY Compare to all options (not just filtered options) in case option has already been selected).
// For multi-selects, this would remove it from the filtered list.
var _isOptionUnique2 = this.isOptionUnique({
option: option,
options: excludeOptions.concat(filteredOptions)
});
if (_isOptionUnique2) {
var prompt = promptTextCreator(this.inputValue);
this._createPlaceholderOption = _newOptionCreator({
label: prompt,
labelKey: this.labelKey,
valueKey: this.valueKey
});
if (showNewOptionAtTop) {
filteredOptions.unshift(this._createPlaceholderOption);
} else {
filteredOptions.push(this._createPlaceholderOption);
}
}
}
return filteredOptions;
}
}, {
key: 'isOptionUnique',
value: function isOptionUnique(_ref) {
var option = _ref.option,
options = _ref.options;
var isOptionUnique = this.props.isOptionUnique;
options = options || this.props.options;
return isOptionUnique({
labelKey: this.labelKey,
option: option,
options: options,
valueKey: this.valueKey
});
}
}, {
key: 'menuRenderer',
value: function menuRenderer(params) {
var menuRenderer = this.props.menuRenderer;
return menuRenderer(_extends({}, params, {
onSelect: this.onOptionSelect,
selectValue: this.onOptionSelect
}));
}
}, {
key: 'onInputChange',
value: function onInputChange(input) {
var onInputChange = this.props.onInputChange;
// This value may be needed in between Select mounts (when this.select is null)
this.inputValue = input;
if (onInputChange) {
this.inputValue = onInputChange(input);
}
return this.inputValue;
}
}, {
key: 'onInputKeyDown',
value: function onInputKeyDown(event) {
var _props3 = this.props,
shouldKeyDownEventCreateNewOption = _props3.shouldKeyDownEventCreateNewOption,
onInputKeyDown = _props3.onInputKeyDown;
var focusedOption = this.select.getFocusedOption();
if (focusedOption && focusedOption === this._createPlaceholderOption && shouldKeyDownEventCreateNewOption(event)) {
this.createNewOption();
// Prevent decorated Select from doing anything additional with this keyDown event
event.preventDefault();
} else if (onInputKeyDown) {
onInputKeyDown(event);
}
}
}, {
key: 'onOptionSelect',
value: function onOptionSelect(option) {
if (option === this._createPlaceholderOption) {
this.createNewOption();
} else {
this.select.selectValue(option);
}
}
}, {
key: 'focus',
value: function focus() {
this.select.focus();
}
}, {
key: 'render',
value: function render() {
var _this2 = this;
var _props4 = this.props,
refProp = _props4.ref,
restProps = _objectWithoutProperties(_props4, ['ref']);
var children = this.props.children;
// We can't use destructuring default values to set the children,
// because it won't apply work if `children` is null. A falsy check is
// more reliable in real world use-cases.
if (!children) {
children = defaultChildren;
}
var props = _extends({}, restProps, {
allowCreate: true,
filterOptions: this.filterOptions,
menuRenderer: this.menuRenderer,
onInputChange: this.onInputChange,
onInputKeyDown: this.onInputKeyDown,
ref: function ref(_ref2) {
_this2.select = _ref2;
// These values may be needed in between Select mounts (when this.select is null)
if (_ref2) {
_this2.labelKey = _ref2.props.labelKey;
_this2.valueKey = _ref2.props.valueKey;
}
if (refProp) {
refProp(_ref2);
}
}
});
return children(props);
}
}]);
return CreatableSelect;
}(_react2.default.Component);
var defaultChildren = function defaultChildren(props) {
return _react2.default.createElement(_Select2.default, props);
};
var isOptionUnique = function isOptionUnique(_ref3) {
var option = _ref3.option,
options = _ref3.options,
labelKey = _ref3.labelKey,
valueKey = _ref3.valueKey;
if (!options || !options.length) {
return true;
}
return options.filter(function (existingOption) {
return existingOption[labelKey] === option[labelKey] || existingOption[valueKey] === option[valueKey];
}).length === 0;
};
var isValidNewOption = function isValidNewOption(_ref4) {
var label = _ref4.label;
return !!label;
};
var newOptionCreator = function newOptionCreator(_ref5) {
var label = _ref5.label,
labelKey = _ref5.labelKey,
valueKey = _ref5.valueKey;
var option = {};
option[valueKey] = label;
option[labelKey] = label;
option.className = 'Select-create-option-placeholder';
return option;
};
var promptTextCreator = function promptTextCreator(label) {
return 'Create option "' + label + '"';
};
var shouldKeyDownEventCreateNewOption = function shouldKeyDownEventCreateNewOption(_ref6) {
var keyCode = _ref6.keyCode;
switch (keyCode) {
case 9: // TAB
case 13: // ENTER
case 188:
// COMMA
return true;
default:
return false;
}
};
// Default prop methods
CreatableSelect.isOptionUnique = isOptionUnique;
CreatableSelect.isValidNewOption = isValidNewOption;
CreatableSelect.newOptionCreator = newOptionCreator;
CreatableSelect.promptTextCreator = promptTextCreator;
CreatableSelect.shouldKeyDownEventCreateNewOption = shouldKeyDownEventCreateNewOption;
CreatableSelect.defaultProps = {
filterOptions: _defaultFilterOptions2.default,
isOptionUnique: isOptionUnique,
isValidNewOption: isValidNewOption,
menuRenderer: _defaultMenuRenderer2.default,
newOptionCreator: newOptionCreator,
promptTextCreator: promptTextCreator,
shouldKeyDownEventCreateNewOption: shouldKeyDownEventCreateNewOption,
showNewOptionAtTop: true
};
CreatableSelect.propTypes = {
// Child function responsible for creating the inner Select component
// This component can be used to compose HOCs (eg Creatable and Async)
// (props: Object): PropTypes.element
children: _propTypes2.default.func,
// See Select.propTypes.filterOptions
filterOptions: _propTypes2.default.any,
// Searches for any matching option within the set of options.
// This function prevents duplicate options from being created.
// ({ option: Object, options: Array, labelKey: string, valueKey: string }): boolean
isOptionUnique: _propTypes2.default.func,
// Determines if the current input text represents a valid option.
// ({ label: string }): boolean
isValidNewOption: _propTypes2.default.func,
// See Select.propTypes.menuRenderer
menuRenderer: _propTypes2.default.any,
// Factory to create new option.
// ({ label: string, labelKey: string, valueKey: string }): Object
newOptionCreator: _propTypes2.default.func,
// input change handler: function (inputValue) {}
onInputChange: _propTypes2.default.func,
// input keyDown handler: function (event) {}
onInputKeyDown: _propTypes2.default.func,
// new option click handler: function (option) {}
onNewOptionClick: _propTypes2.default.func,
// See Select.propTypes.options
options: _propTypes2.default.array,
// Creates prompt/placeholder option text.
// (filterText: string): string
promptTextCreator: _propTypes2.default.func,
ref: _propTypes2.default.func,
// Decides if a keyDown event (eg its `keyCode`) should result in the creation of a new option.
shouldKeyDownEventCreateNewOption: _propTypes2.default.func,
// Where to show prompt/placeholder option text.
// true: new option prompt at top of list (default)
// false: new option prompt at bottom of list
showNewOptionAtTop: _propTypes2.default.bool
};
exports.default = CreatableSelect;

148
node_modules/react-select/lib/Option.js generated vendored Normal file
View File

@@ -0,0 +1,148 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _classnames = require('classnames');
var _classnames2 = _interopRequireDefault(_classnames);
var _propTypes = require('prop-types');
var _propTypes2 = _interopRequireDefault(_propTypes);
var _react = require('react');
var _react2 = _interopRequireDefault(_react);
var _blockEvent = require('./utils/blockEvent');
var _blockEvent2 = _interopRequireDefault(_blockEvent);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var Option = function (_React$Component) {
_inherits(Option, _React$Component);
function Option(props) {
_classCallCheck(this, Option);
var _this = _possibleConstructorReturn(this, (Option.__proto__ || Object.getPrototypeOf(Option)).call(this, props));
_this.handleMouseDown = _this.handleMouseDown.bind(_this);
_this.handleMouseEnter = _this.handleMouseEnter.bind(_this);
_this.handleMouseMove = _this.handleMouseMove.bind(_this);
_this.handleTouchStart = _this.handleTouchStart.bind(_this);
_this.handleTouchEnd = _this.handleTouchEnd.bind(_this);
_this.handleTouchMove = _this.handleTouchMove.bind(_this);
_this.onFocus = _this.onFocus.bind(_this);
return _this;
}
_createClass(Option, [{
key: 'handleMouseDown',
value: function handleMouseDown(event) {
event.preventDefault();
event.stopPropagation();
this.props.onSelect(this.props.option, event);
}
}, {
key: 'handleMouseEnter',
value: function handleMouseEnter(event) {
this.onFocus(event);
}
}, {
key: 'handleMouseMove',
value: function handleMouseMove(event) {
this.onFocus(event);
}
}, {
key: 'handleTouchEnd',
value: function handleTouchEnd(event) {
// Check if the view is being dragged, In this case
// we don't want to fire the click event (because the user only wants to scroll)
if (this.dragging) return;
this.handleMouseDown(event);
}
}, {
key: 'handleTouchMove',
value: function handleTouchMove() {
// Set a flag that the view is being dragged
this.dragging = true;
}
}, {
key: 'handleTouchStart',
value: function handleTouchStart() {
// Set a flag that the view is not being dragged
this.dragging = false;
}
}, {
key: 'onFocus',
value: function onFocus(event) {
if (!this.props.isFocused) {
this.props.onFocus(this.props.option, event);
}
}
}, {
key: 'render',
value: function render() {
var _props = this.props,
option = _props.option,
instancePrefix = _props.instancePrefix,
optionIndex = _props.optionIndex;
var className = (0, _classnames2.default)(this.props.className, option.className);
return option.disabled ? _react2.default.createElement(
'div',
{ className: className,
onMouseDown: _blockEvent2.default,
onClick: _blockEvent2.default },
this.props.children
) : _react2.default.createElement(
'div',
{ className: className,
style: option.style,
role: 'option',
'aria-label': option.label,
onMouseDown: this.handleMouseDown,
onMouseEnter: this.handleMouseEnter,
onMouseMove: this.handleMouseMove,
onTouchStart: this.handleTouchStart,
onTouchMove: this.handleTouchMove,
onTouchEnd: this.handleTouchEnd,
id: instancePrefix + '-option-' + optionIndex,
title: option.title },
this.props.children
);
}
}]);
return Option;
}(_react2.default.Component);
Option.propTypes = {
children: _propTypes2.default.node,
className: _propTypes2.default.string, // className (based on mouse position)
instancePrefix: _propTypes2.default.string.isRequired, // unique prefix for the ids (used for aria)
isDisabled: _propTypes2.default.bool, // the option is disabled
isFocused: _propTypes2.default.bool, // the option is focused
isSelected: _propTypes2.default.bool, // the option is selected
onFocus: _propTypes2.default.func, // method to handle mouseEnter on option element
onSelect: _propTypes2.default.func, // method to handle click on option element
onUnfocus: _propTypes2.default.func, // method to handle mouseLeave on option element
option: _propTypes2.default.object.isRequired, // object that is base for that option
optionIndex: _propTypes2.default.number // index of the option, used to generate unique ids for aria
};
exports.default = Option;

1458
node_modules/react-select/lib/Select.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

145
node_modules/react-select/lib/Value.js generated vendored Normal file
View File

@@ -0,0 +1,145 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _classnames = require('classnames');
var _classnames2 = _interopRequireDefault(_classnames);
var _propTypes = require('prop-types');
var _propTypes2 = _interopRequireDefault(_propTypes);
var _react = require('react');
var _react2 = _interopRequireDefault(_react);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var Value = function (_React$Component) {
_inherits(Value, _React$Component);
function Value(props) {
_classCallCheck(this, Value);
var _this = _possibleConstructorReturn(this, (Value.__proto__ || Object.getPrototypeOf(Value)).call(this, props));
_this.handleMouseDown = _this.handleMouseDown.bind(_this);
_this.onRemove = _this.onRemove.bind(_this);
_this.handleTouchEndRemove = _this.handleTouchEndRemove.bind(_this);
_this.handleTouchMove = _this.handleTouchMove.bind(_this);
_this.handleTouchStart = _this.handleTouchStart.bind(_this);
return _this;
}
_createClass(Value, [{
key: 'handleMouseDown',
value: function handleMouseDown(event) {
if (event.type === 'mousedown' && event.button !== 0) {
return;
}
if (this.props.onClick) {
event.stopPropagation();
this.props.onClick(this.props.value, event);
return;
}
if (this.props.value.href) {
event.stopPropagation();
}
}
}, {
key: 'onRemove',
value: function onRemove(event) {
event.preventDefault();
event.stopPropagation();
this.props.onRemove(this.props.value);
}
}, {
key: 'handleTouchEndRemove',
value: function handleTouchEndRemove(event) {
// Check if the view is being dragged, In this case
// we don't want to fire the click event (because the user only wants to scroll)
if (this.dragging) return;
// Fire the mouse events
this.onRemove(event);
}
}, {
key: 'handleTouchMove',
value: function handleTouchMove() {
// Set a flag that the view is being dragged
this.dragging = true;
}
}, {
key: 'handleTouchStart',
value: function handleTouchStart() {
// Set a flag that the view is not being dragged
this.dragging = false;
}
}, {
key: 'renderRemoveIcon',
value: function renderRemoveIcon() {
if (this.props.disabled || !this.props.onRemove) return;
return _react2.default.createElement(
'span',
{ className: 'Select-value-icon',
'aria-hidden': 'true',
onMouseDown: this.onRemove,
onTouchEnd: this.handleTouchEndRemove,
onTouchStart: this.handleTouchStart,
onTouchMove: this.handleTouchMove },
'\xD7'
);
}
}, {
key: 'renderLabel',
value: function renderLabel() {
var className = 'Select-value-label';
return this.props.onClick || this.props.value.href ? _react2.default.createElement(
'a',
{ className: className, href: this.props.value.href, target: this.props.value.target, onMouseDown: this.handleMouseDown, onTouchEnd: this.handleMouseDown },
this.props.children
) : _react2.default.createElement(
'span',
{ className: className, role: 'option', 'aria-selected': 'true', id: this.props.id },
this.props.children
);
}
}, {
key: 'render',
value: function render() {
return _react2.default.createElement(
'div',
{ className: (0, _classnames2.default)('Select-value', this.props.value.disabled ? 'Select-value-disabled' : '', this.props.value.className),
style: this.props.value.style,
title: this.props.value.title
},
this.renderRemoveIcon(),
this.renderLabel()
);
}
}]);
return Value;
}(_react2.default.Component);
Value.propTypes = {
children: _propTypes2.default.node,
disabled: _propTypes2.default.bool, // disabled prop passed to ReactSelect
id: _propTypes2.default.string, // Unique id for the value - used for aria
onClick: _propTypes2.default.func, // method to handle click on value label
onRemove: _propTypes2.default.func, // method to handle removal of the value
value: _propTypes2.default.object.isRequired // the option object for this value
};
exports.default = Value;

65
node_modules/react-select/lib/index.js generated vendored Normal file
View File

@@ -0,0 +1,65 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.defaultFilterOptions = exports.defaultClearRenderer = exports.defaultArrowRenderer = exports.defaultMenuRenderer = exports.Option = exports.Value = exports.Creatable = exports.AsyncCreatable = exports.Async = undefined;
var _Select = require('./Select');
var _Select2 = _interopRequireDefault(_Select);
var _Async = require('./Async');
var _Async2 = _interopRequireDefault(_Async);
var _AsyncCreatable = require('./AsyncCreatable');
var _AsyncCreatable2 = _interopRequireDefault(_AsyncCreatable);
var _Creatable = require('./Creatable');
var _Creatable2 = _interopRequireDefault(_Creatable);
var _Value = require('./Value');
var _Value2 = _interopRequireDefault(_Value);
var _Option = require('./Option');
var _Option2 = _interopRequireDefault(_Option);
var _defaultMenuRenderer = require('./utils/defaultMenuRenderer');
var _defaultMenuRenderer2 = _interopRequireDefault(_defaultMenuRenderer);
var _defaultArrowRenderer = require('./utils/defaultArrowRenderer');
var _defaultArrowRenderer2 = _interopRequireDefault(_defaultArrowRenderer);
var _defaultClearRenderer = require('./utils/defaultClearRenderer');
var _defaultClearRenderer2 = _interopRequireDefault(_defaultClearRenderer);
var _defaultFilterOptions = require('./utils/defaultFilterOptions');
var _defaultFilterOptions2 = _interopRequireDefault(_defaultFilterOptions);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
_Select2.default.Async = _Async2.default;
_Select2.default.AsyncCreatable = _AsyncCreatable2.default;
_Select2.default.Creatable = _Creatable2.default;
_Select2.default.Value = _Value2.default;
_Select2.default.Option = _Option2.default;
exports.default = _Select2.default;
exports.Async = _Async2.default;
exports.AsyncCreatable = _AsyncCreatable2.default;
exports.Creatable = _Creatable2.default;
exports.Value = _Value2.default;
exports.Option = _Option2.default;
exports.defaultMenuRenderer = _defaultMenuRenderer2.default;
exports.defaultArrowRenderer = _defaultArrowRenderer2.default;
exports.defaultClearRenderer = _defaultClearRenderer2.default;
exports.defaultFilterOptions = _defaultFilterOptions2.default;

18
node_modules/react-select/lib/utils/blockEvent.js generated vendored Normal file
View File

@@ -0,0 +1,18 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = function (event) {
event.preventDefault();
event.stopPropagation();
if (event.target.tagName !== 'A' || !('href' in event.target)) {
return;
}
if (event.target.target) {
window.open(event.target.href, event.target.target);
} else {
window.location.href = event.target.href;
}
};

View File

@@ -0,0 +1,30 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _react = require('react');
var _react2 = _interopRequireDefault(_react);
var _propTypes = require('prop-types');
var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var arrowRenderer = function arrowRenderer(_ref) {
var onMouseDown = _ref.onMouseDown;
return _react2.default.createElement('span', {
className: 'Select-arrow',
onMouseDown: onMouseDown
});
};
arrowRenderer.propTypes = {
onMouseDown: _propTypes2.default.func
};
exports.default = arrowRenderer;

View File

@@ -0,0 +1,20 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _react = require('react');
var _react2 = _interopRequireDefault(_react);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var clearRenderer = function clearRenderer() {
return _react2.default.createElement('span', {
className: 'Select-clear',
dangerouslySetInnerHTML: { __html: '&times;' }
});
};
exports.default = clearRenderer;

View File

@@ -0,0 +1,69 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _stripDiacritics = require('./stripDiacritics');
var _stripDiacritics2 = _interopRequireDefault(_stripDiacritics);
var _trim = require('./trim');
var _trim2 = _interopRequireDefault(_trim);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var isValid = function isValid(value) {
return typeof value !== 'undefined' && value !== null && value !== '';
};
var filterOptions = function filterOptions(options, filterValue, excludeOptions, props) {
if (props.ignoreAccents) {
filterValue = (0, _stripDiacritics2.default)(filterValue);
}
if (props.ignoreCase) {
filterValue = filterValue.toLowerCase();
}
if (props.trimFilter) {
filterValue = (0, _trim2.default)(filterValue);
}
if (excludeOptions) excludeOptions = excludeOptions.map(function (i) {
return i[props.valueKey];
});
return options.filter(function (option) {
if (excludeOptions && excludeOptions.indexOf(option[props.valueKey]) > -1) return false;
if (props.filterOption) return props.filterOption.call(undefined, option, filterValue);
if (!filterValue) return true;
var value = option[props.valueKey];
var label = option[props.labelKey];
var hasValue = isValid(value);
var hasLabel = isValid(label);
if (!hasValue && !hasLabel) {
return false;
}
var valueTest = hasValue ? String(value) : null;
var labelTest = hasLabel ? String(label) : null;
if (props.ignoreAccents) {
if (valueTest && props.matchProp !== 'label') valueTest = (0, _stripDiacritics2.default)(valueTest);
if (labelTest && props.matchProp !== 'value') labelTest = (0, _stripDiacritics2.default)(labelTest);
}
if (props.ignoreCase) {
if (valueTest && props.matchProp !== 'label') valueTest = valueTest.toLowerCase();
if (labelTest && props.matchProp !== 'value') labelTest = labelTest.toLowerCase();
}
return props.matchPos === 'start' ? valueTest && props.matchProp !== 'label' && valueTest.substr(0, filterValue.length) === filterValue || labelTest && props.matchProp !== 'value' && labelTest.substr(0, filterValue.length) === filterValue : valueTest && props.matchProp !== 'label' && valueTest.indexOf(filterValue) >= 0 || labelTest && props.matchProp !== 'value' && labelTest.indexOf(filterValue) >= 0;
});
};
exports.default = filterOptions;

View File

@@ -0,0 +1,96 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _classnames = require('classnames');
var _classnames2 = _interopRequireDefault(_classnames);
var _propTypes = require('prop-types');
var _propTypes2 = _interopRequireDefault(_propTypes);
var _react = require('react');
var _react2 = _interopRequireDefault(_react);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var menuRenderer = function menuRenderer(_ref) {
var focusedOption = _ref.focusedOption,
focusOption = _ref.focusOption,
inputValue = _ref.inputValue,
instancePrefix = _ref.instancePrefix,
onFocus = _ref.onFocus,
onOptionRef = _ref.onOptionRef,
onSelect = _ref.onSelect,
optionClassName = _ref.optionClassName,
optionComponent = _ref.optionComponent,
optionRenderer = _ref.optionRenderer,
options = _ref.options,
removeValue = _ref.removeValue,
selectValue = _ref.selectValue,
valueArray = _ref.valueArray,
valueKey = _ref.valueKey;
var Option = optionComponent;
return options.map(function (option, i) {
var isSelected = valueArray && valueArray.some(function (x) {
return x[valueKey] === option[valueKey];
});
var isFocused = option === focusedOption;
var optionClass = (0, _classnames2.default)(optionClassName, {
'Select-option': true,
'is-selected': isSelected,
'is-focused': isFocused,
'is-disabled': option.disabled
});
return _react2.default.createElement(
Option,
{
className: optionClass,
focusOption: focusOption,
inputValue: inputValue,
instancePrefix: instancePrefix,
isDisabled: option.disabled,
isFocused: isFocused,
isSelected: isSelected,
key: 'option-' + i + '-' + option[valueKey],
onFocus: onFocus,
onSelect: onSelect,
option: option,
optionIndex: i,
ref: function ref(_ref2) {
onOptionRef(_ref2, isFocused);
},
removeValue: removeValue,
selectValue: selectValue
},
optionRenderer(option, i, inputValue)
);
});
};
menuRenderer.propTypes = {
focusOption: _propTypes2.default.func,
focusedOption: _propTypes2.default.object,
inputValue: _propTypes2.default.string,
instancePrefix: _propTypes2.default.string,
onFocus: _propTypes2.default.func,
onOptionRef: _propTypes2.default.func,
onSelect: _propTypes2.default.func,
optionClassName: _propTypes2.default.string,
optionComponent: _propTypes2.default.func,
optionRenderer: _propTypes2.default.func,
options: _propTypes2.default.array,
removeValue: _propTypes2.default.func,
selectValue: _propTypes2.default.func,
valueArray: _propTypes2.default.array,
valueKey: _propTypes2.default.string
};
exports.default = menuRenderer;

15
node_modules/react-select/lib/utils/stripDiacritics.js generated vendored Normal file

File diff suppressed because one or more lines are too long

10
node_modules/react-select/lib/utils/trim.js generated vendored Normal file
View File

@@ -0,0 +1,10 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var trim = function trim(str) {
return str.replace(/^\s+|\s+$/g, '');
};
exports.default = trim;

90
node_modules/react-select/package.json generated vendored Normal file
View File

@@ -0,0 +1,90 @@
{
"name": "react-select",
"version": "1.3.0",
"description": "A Select control built with and for ReactJS",
"main": "lib/index.js",
"jsnext:main": "dist/react-select.es.js",
"module": "dist/react-select.es.js",
"style": "dist/react-select.min.css",
"author": "Jed Watson",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/JedWatson/react-select.git"
},
"dependencies": {
"classnames": "^2.2.4",
"prop-types": "^15.5.8",
"react-input-autosize": "^2.1.2"
},
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-core": "^6.26.0",
"babel-loader": "^7.1.1",
"babel-plugin-external-helpers": "^6.22.0",
"babel-plugin-istanbul": "^4.1.4",
"babel-plugin-transform-react-remove-prop-types": "^0.4.8",
"babel-preset-env": "^1.6.1",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-0": "^6.24.1",
"babel-register": "^6.26.0",
"chai": "^4.1.2",
"coveralls": "^2.11.12",
"create-react-class": "^15.5.2",
"cross-env": "^5.0.5",
"css-loader": "^0.28.7",
"eslint": "^4.6.1",
"eslint-plugin-react": "^7.3.0",
"extract-text-webpack-plugin": "^3.0.0",
"gh-pages": "^1.1.0",
"html-loader": "^0.5.1",
"html-webpack-plugin": "^2.30.1",
"husky": "^0.14.3",
"isomorphic-fetch": "^2.2.1",
"istanbul": "^0.4.5",
"jsdom": "^9.12.0",
"less": "^2.7.2",
"less-loader": "^4.0.5",
"less-plugin-clean-css": "^1.5.1",
"lint-staged": "^4.3.0",
"mocha": "^3.0.2",
"nps": "^5.7.1",
"nps-utils": "^1.3.0",
"nyc": "^11.1.0",
"react": "^15.5.0",
"react-addons-shallow-compare": "^15.5.0",
"react-dom": "^15.5.0",
"react-gravatar": "^2.4.5",
"react-highlight-words": "^0.8.1",
"react-test-renderer": "^15.6.1",
"react-virtualized": "^9.9.0",
"react-virtualized-select": "^3.1.0",
"rollup": "^0.49.2",
"rollup-plugin-babel": "^3.0.2",
"rollup-plugin-commonjs": "^8.2.0",
"rollup-plugin-node-resolve": "^3.0.0",
"rollup-plugin-uglify": "^2.0.1",
"sinon": "^3.2.1",
"style-loader": "^0.18.2",
"uglify-es": "^3.0.28",
"unexpected": "^10.35.0",
"unexpected-dom": "^4.0.0",
"unexpected-react": "^4.1.0",
"unexpected-sinon": "^10.4.0",
"webpack": "^3.5.5",
"webpack-dev-server": "^2.7.1"
},
"peerDependencies": {
"react": "^0.14.9 || ^15.3.0 || ^16.0.0-rc || ^16.0",
"react-dom": "^0.14.9 || ^15.3.0 || ^16.0.0-rc || ^16.0"
},
"files": [
"dist",
"less",
"lib",
"scss"
],
"lint-staged": {
"*.js": "eslint"
}
}

5
node_modules/react-select/scss/components.scss generated vendored Normal file
View File

@@ -0,0 +1,5 @@
@import "control";
@import "menu";
@import "mixins";
@import "multi";
@import "spinner";

304
node_modules/react-select/scss/control.scss generated vendored Normal file
View File

@@ -0,0 +1,304 @@
//
// Control
// ------------------------------
@import 'spinner';
@import 'mixins';
.Select {
position: relative;
// disable some browser-specific behaviours that break the input
input::-webkit-contacts-auto-fill-button,
input::-webkit-credentials-auto-fill-button {
display: none !important;
}
input::-ms-clear {
display: none !important;
}
input::-ms-reveal {
display: none !important;
}
// preferred box model
&,
& div,
& input,
& span {
@include box-sizing(border-box);
}
// handle disabled state
&.is-disabled {
.Select-arrow-zone {
cursor: default;
pointer-events: none;
}
> .Select-control {
background-color: $select-input-bg-disabled;
&:hover {
box-shadow: none;
}
}
}
&.is-searchable {
&.is-open > .Select-control {
cursor: text;
}
&.is-focused:not(.is-open) > .Select-control {
cursor: text;
}
}
&.is-open > .Select-control {
@include border-bottom-radius( 0 );
background: $select-input-bg;
border-color: darken($select-input-border-color, 10%) $select-input-border-color lighten($select-input-border-color, 5%);
// flip the arrow so its pointing up when the menu is open
.Select-arrow {
top: -2px;
border-color: transparent transparent $select-arrow-color;
border-width: 0 $select-arrow-width $select-arrow-width;
}
}
&.is-focused > .Select-control {
background: $select-input-bg-focus;
}
&.is-focused:not(.is-open) > .Select-control {
border-color: $select-input-border-focus lighten($select-input-border-focus, 5%) lighten($select-input-border-focus, 5%);
box-shadow: $select-input-box-shadow-focus;
}
&.has-value.is-clearable.Select--single > .Select-control .Select-value {
padding-right: ($select-clear-width + $select-arrow-width * 5);
}
&.has-value.Select--single > .Select-control .Select-value,
&.has-value.is-pseudo-focused.Select--single > .Select-control .Select-value {
.Select-value-label {
color: $select-text-color;
}
a.Select-value-label {
cursor: pointer;
text-decoration: none;
&:hover,
&:focus {
color: $select-link-hover-color;
outline: none;
text-decoration: underline;
}
&:focus {
background: $select-input-bg-focus;
}
}
}
// fake-hide the input when the control is pseudo-focused
&.has-value.is-pseudo-focused .Select-input {
opacity: 0;
}
&.is-open .Select-arrow,
.Select-arrow-zone:hover > .Select-arrow {
border-top-color: $select-arrow-color-hover;
}
&.Select--rtl {
direction: rtl;
text-align: right;
}
}
// base
.Select-control {
background-color: $select-input-bg;
border-color: lighten($select-input-border-color, 5%) $select-input-border-color darken($select-input-border-color, 10%);
border-radius: $select-input-border-radius;
border: $select-input-border-width solid $select-input-border-color;
color: $select-text-color;
cursor: default;
display: table;
border-spacing: 0;
border-collapse: separate;
height: $select-input-height;
outline: none;
overflow: hidden;
position: relative;
width: 100%;
&:hover {
box-shadow: $select-input-hover-box-shadow;
}
.Select-input:focus {
outline: none;
background: $select-input-bg-focus;
}
}
// placeholder
.Select-placeholder,
.Select--single > .Select-control .Select-value {
bottom: 0;
color: $select-input-placeholder;
left: 0;
line-height: $select-input-internal-height;
padding-left: $select-padding-horizontal;
padding-right: $select-padding-horizontal;
position: absolute;
right: 0;
top: 0;
// crop text
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
// the <input> element users type in
.Select-input {
// inherits `display: inline-block` from "react-input-autosize"
height: $select-input-internal-height;
padding-left: $select-padding-horizontal;
padding-right: $select-padding-horizontal;
vertical-align: middle;
> input {
width: 100%;
background: none transparent;
border: 0 none;
box-shadow: none;
cursor: default;
display: inline-block;
font-family: inherit;
font-size: inherit;
// height: $select-input-internal-height;
margin: 0;
outline: none;
// padding: 0;
line-height: 17px; /* For IE 8 compatibility */
padding: (($select-input-internal-height - 14) / 2 - 2) 0 (($select-input-internal-height - 14) / 2 + 2); /* For IE 8 compatibility */
-webkit-appearance: none;
.is-focused & {
cursor: text;
}
}
}
// fake input
.Select-control:not(.is-searchable) > .Select-input {
outline: none;
}
// loading indicator
.Select-loading-zone {
cursor: pointer;
display: table-cell;
position: relative;
text-align: center;
vertical-align: middle;
width: $select-loading-size;
}
.Select-loading {
@include Select-spinner($select-loading-size, $select-loading-color-bg, $select-loading-color);
vertical-align: middle;
}
// the little cross that clears the field
.Select-clear-zone {
@include animation( Select-animation-fadeIn 200ms );
color: $select-clear-color;
cursor: pointer;
display: table-cell;
position: relative;
text-align: center;
vertical-align: middle;
width: $select-clear-width;
&:hover {
color: $select-clear-hover-color;
}
}
.Select-clear {
display: inline-block;
font-size: $select-clear-size;
line-height: 1;
}
.Select--multi .Select-clear-zone {
width: $select-clear-width;
}
.Select--multi .Select-multi-value-wrapper {
display: inline-block;
}
.Select .Select-aria-only {
position: absolute;
display: inline-block;
height: 1px;
width: 1px;
margin: -1px;
clip: rect(0,0,0,0);
overflow: hidden;
float: left;
}
// arrow indicator
.Select-arrow-zone {
cursor: pointer;
display: table-cell;
position: relative;
text-align: center;
vertical-align: middle;
width: ($select-arrow-width * 5);
padding-right: $select-arrow-width;
.Select--rtl & {
padding-right: 0;
padding-left: $select-arrow-width;
}
}
.Select-arrow {
border-color: $select-arrow-color transparent transparent;
border-style: solid;
border-width: $select-arrow-width $select-arrow-width ($select-arrow-width / 2);
display: inline-block;
height: 0;
width: 0;
position: relative;
}
// Animation
// ------------------------------
// fade in
@-webkit-keyframes Select-animation-fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
@keyframes Select-animation-fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}

6
node_modules/react-select/scss/default.scss generated vendored Normal file
View File

@@ -0,0 +1,6 @@
@import "select";
@import "control";
@import "menu";
@import "mixins";
@import "multi";
@import "spinner";

78
node_modules/react-select/scss/menu.scss generated vendored Normal file
View File

@@ -0,0 +1,78 @@
//
// Select Menu
// ------------------------------
// wrapper around the menu
.Select-menu-outer {
// Unfortunately, having both border-radius and allows scrolling using overflow defined on the same
// element forces the browser to repaint on scroll. However, if these definitions are split into an
// outer and an inner element, the browser is able to optimize the scrolling behavior and does not
// have to repaint on scroll.
@include border-bottom-radius( $select-input-border-radius );
background-color: $select-input-bg;
border: 1px solid $select-input-border-color;
border-top-color: mix($select-input-bg, $select-input-border-color, 50%);
box-shadow: $select-menu-box-shadow;
box-sizing: border-box;
margin-top: -1px;
max-height: $select-menu-max-height;
position: absolute;
left: 0;
top: 100%;
width: 100%;
z-index: $select-menu-zindex;
-webkit-overflow-scrolling: touch;
}
// wrapper
.Select-menu {
max-height: ($select-menu-max-height - 2px);
overflow-y: auto;
}
// options
.Select-option {
box-sizing: border-box;
background-color: $select-option-bg;
color: $select-option-color;
cursor: pointer;
display: block;
padding: $select-padding-vertical $select-padding-horizontal;
&:last-child {
@include border-bottom-radius( $select-input-border-radius );
}
&.is-selected {
background-color: $select-option-selected-bg;
color: $select-option-selected-color;
}
&.is-focused {
background-color: $select-option-focused-bg;
color: $select-option-focused-color;
}
&.is-disabled {
color: $select-option-disabled-color;
cursor: default;
}
}
// no results
.Select-noresults {
box-sizing: border-box;
color: $select-noresults-color;
cursor: default;
display: block;
padding: $select-padding-vertical $select-padding-horizontal;
}

52
node_modules/react-select/scss/mixins.scss generated vendored Normal file
View File

@@ -0,0 +1,52 @@
//
// Mixins
// ------------------------------
// Utilities
@mixin size($width, $height)
{
width: $width;
height: $height;
}
@mixin square($size)
{
@include size($size, $size);
}
@mixin border-top-radius($radius)
{
border-top-right-radius: $radius;
border-top-left-radius: $radius;
}
@mixin border-right-radius($radius)
{
border-bottom-right-radius: $radius;
border-top-right-radius: $radius;
}
@mixin border-bottom-radius($radius)
{
border-bottom-right-radius: $radius;
border-bottom-left-radius: $radius;
}
@mixin border-left-radius($radius)
{
border-bottom-left-radius: $radius;
border-top-left-radius: $radius;
}
// Vendor Prefixes
@mixin animation($animation)
{
-webkit-animation: $animation;
-o-animation: $animation;
animation: $animation;
}
@mixin box-sizing($boxmodel)
{
-webkit-box-sizing: $boxmodel;
-moz-box-sizing: $boxmodel;
box-sizing: $boxmodel;
}

111
node_modules/react-select/scss/multi.scss generated vendored Normal file
View File

@@ -0,0 +1,111 @@
//
// Multi-Select
// ------------------------------
// Base
.Select--multi {
// add margin to the input element
.Select-input {
vertical-align: middle;
// border: 1px solid transparent;
margin-left: $select-padding-horizontal;
padding: 0;
}
&.Select--rtl .Select-input {
margin-left: 0;
margin-right: $select-padding-horizontal;
}
// reduce margin once there is value
&.has-value .Select-input {
margin-left: $select-item-gutter;
}
// Items
.Select-value {
background-color: $select-item-bg;
border-radius: $select-item-border-radius;
border: 1px solid $select-item-border-color;
color: $select-item-color;
display: inline-block;
font-size: $select-item-font-size;
margin-left: $select-item-gutter;
margin-top: $select-item-gutter;
vertical-align: top;
}
// common
.Select-value-icon,
.Select-value-label {
display: inline-block;
vertical-align: middle;
}
// label
.Select-value-label {
@include border-right-radius( $select-item-border-radius );
cursor: default;
padding: $select-item-padding-vertical $select-item-padding-horizontal;
}
a.Select-value-label {
color: $select-item-color;
cursor: pointer;
text-decoration: none;
&:hover {
text-decoration: underline;
}
}
// icon
.Select-value-icon {
cursor: pointer;
@include border-left-radius( $select-item-border-radius );
border-right: 1px solid $select-item-border-color;
// move the baseline up by 1px
padding: ($select-item-padding-vertical - 1) $select-item-padding-horizontal ($select-item-padding-vertical + 1);
&:hover,
&:focus {
background-color: $select-item-hover-bg;
color: $select-item-hover-color;
}
&:active {
background-color: $select-item-border-color;
}
}
&.Select--rtl {
.Select-value {
margin-left: 0;
margin-right: $select-item-gutter;
}
.Select-value-icon {
border-right: none;
border-left: 1px solid $select-item-border-color;
}
}
}
.Select--multi.is-disabled {
.Select-value {
background-color: $select-item-disabled-bg;
border: 1px solid $select-item-disabled-border-color;
color: $select-item-disabled-color;
}
// icon
.Select-value-icon {
cursor: not-allowed;
border-right: 1px solid $select-item-disabled-border-color;
&:hover,
&:focus,
&:active {
background-color: $select-item-disabled-bg;
}
}
}

75
node_modules/react-select/scss/select.scss generated vendored Normal file
View File

@@ -0,0 +1,75 @@
/**
* React Select
* ============
* Created by Jed Watson and Joss Mackison for KeystoneJS, http://www.keystonejs.com/
* https://twitter.com/jedwatson https://twitter.com/jossmackison https://twitter.com/keystonejs
* MIT License: https://github.com/JedWatson/react-select
*/
// Variables
// ------------------------------
// control options
$select-input-bg: #fff !default;
$select-input-bg-disabled: #f9f9f9 !default;
$select-input-bg-focus: $select-input-bg !default;
$select-input-border-color: #ccc !default;
$select-input-border-radius: 4px !default;
$select-input-border-focus: #08c !default; // blue
$select-input-box-shadow-focus: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 0 5px -1px fade($select-input-border-focus, 50%) !default;
$select-input-border-width: 1px !default;
$select-input-height: 36px !default;
$select-input-internal-height: ($select-input-height - ($select-input-border-width * 2)) !default;
$select-input-placeholder: #aaa !default;
$select-text-color: #333 !default;
$select-link-hover-color: $select-input-border-focus !default;
$select-input-hover-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06) !default;
$select-padding-vertical: 8px !default;
$select-padding-horizontal: 10px !default;
// menu options
$select-menu-zindex: 1000 !default;
$select-menu-max-height: 200px !default;
$select-menu-box-shadow: $select-input-hover-box-shadow !default;
$select-option-color: lighten($select-text-color, 20%) !default;
$select-option-bg: $select-input-bg !default;
$select-option-focused-color: $select-text-color !default;
$select-option-focused-bg: #f2f9fc !default; // pale blue
$select-option-selected-color: $select-text-color !default;
$select-option-selected-bg: #f5faff !default; // lightest blue
$select-option-disabled-color: lighten($select-text-color, 60%) !default;
$select-noresults-color: lighten($select-text-color, 40%) !default;
// clear "x" button
$select-clear-size: floor(($select-input-height / 2)) !default;
$select-clear-color: #999 !default;
$select-clear-hover-color: #D0021B !default; // red
$select-clear-width: ($select-input-internal-height / 2) !default;
// arrow indicator
$select-arrow-color: #999 !default;
$select-arrow-color-hover: #666 !default;
$select-arrow-width: 5px !default;
// loading indicator
$select-loading-size: 16px !default;
$select-loading-color: $select-text-color !default;
$select-loading-color-bg: $select-input-border-color !default;
// multi-select item
$select-item-border-radius: 2px !default;
$select-item-gutter: 5px !default;
$select-item-padding-vertical: 2px !default;
$select-item-padding-horizontal: 5px !default;
$select-item-font-size: .9em !default;
$select-item-color: #08c !default; // pale blue
$select-item-bg: #f2f9fc !default;
$select-item-border-color: darken($select-item-bg, 10%) !default;
$select-item-hover-color: darken($select-item-color, 5%) !default; // pale blue
$select-item-hover-bg: darken($select-item-bg, 5%) !default;
$select-item-disabled-color: #333 !default;
$select-item-disabled-bg: #fcfcfc !default;
$select-item-disabled-border-color: darken($select-item-disabled-bg, 10%) !default;

24
node_modules/react-select/scss/spinner.scss generated vendored Normal file
View File

@@ -0,0 +1,24 @@
//
// Spinner
// ------------------------------
@import 'mixins';
@mixin Select-spinner($size, $orbit, $satellite)
{
@include animation( Select-animation-spin 400ms infinite linear );
@include square($size);
box-sizing: border-box;
border-radius: 50%;
border: floor(($size / 8)) solid $orbit;
border-right-color: $satellite;
display: inline-block;
position: relative;
}
@keyframes Select-animation-spin {
to { transform: rotate(1turn); }
}
@-webkit-keyframes Select-animation-spin {
to { -webkit-transform: rotate(1turn); }
}