mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-11-28 03:47:34 +00:00
add bower components to third party
This commit is contained in:
8
third_party/ui/bower_components/angular-material/modules/js/switch/bower.json
vendored
Normal file
8
third_party/ui/bower_components/angular-material/modules/js/switch/bower.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"name": "angular-material-switch",
|
||||
"version": "0.7.0-rc3",
|
||||
"dependencies": {
|
||||
"angular-material-core": "0.7.0-rc3",
|
||||
"angular-material-checkbox": "0.7.0-rc3"
|
||||
}
|
||||
}
|
||||
29
third_party/ui/bower_components/angular-material/modules/js/switch/switch-default-theme.css
vendored
Normal file
29
third_party/ui/bower_components/angular-material/modules/js/switch/switch-default-theme.css
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
/*!
|
||||
* Angular Material Design
|
||||
* https://github.com/angular/material
|
||||
* @license MIT
|
||||
* v0.7.0-rc3
|
||||
*/
|
||||
md-switch.md-THEME_NAME-theme .md-thumb {
|
||||
background-color: '{{background-50}}'; }
|
||||
md-switch.md-THEME_NAME-theme .md-bar {
|
||||
background-color: '{{background-500}}'; }
|
||||
md-switch.md-THEME_NAME-theme.md-checked .md-thumb {
|
||||
background-color: '{{primary-color}}'; }
|
||||
md-switch.md-THEME_NAME-theme.md-checked .md-bar {
|
||||
background-color: '{{primary-color-0.5}}'; }
|
||||
md-switch.md-THEME_NAME-theme.md-checked.md-accent .md-thumb {
|
||||
background-color: '{{accent-color}}'; }
|
||||
md-switch.md-THEME_NAME-theme.md-checked.md-accent .md-bar {
|
||||
background-color: '{{accent-color-0.5}}'; }
|
||||
md-switch.md-THEME_NAME-theme.md-checked.md-warn .md-thumb {
|
||||
background-color: '{{warn-color}}'; }
|
||||
md-switch.md-THEME_NAME-theme.md-checked.md-warn .md-bar {
|
||||
background-color: '{{warn-color-0.5}}'; }
|
||||
md-switch.md-THEME_NAME-theme[disabled] .md-thumb {
|
||||
background-color: '{{background-400}}'; }
|
||||
md-switch.md-THEME_NAME-theme[disabled] .md-bar {
|
||||
background-color: '{{foreground-4}}'; }
|
||||
md-switch.md-THEME_NAME-theme:focus .md-label:not(:empty) {
|
||||
border-color: '{{foreground-1}}';
|
||||
border-style: dotted; }
|
||||
@@ -0,0 +1,6 @@
|
||||
/*!
|
||||
* Angular Material Design
|
||||
* https://github.com/angular/material
|
||||
* @license MIT
|
||||
* v0.7.0-rc3
|
||||
*/md-switch.md-THEME_NAME-theme .md-thumb{background-color:'{{background-50}}'}md-switch.md-THEME_NAME-theme .md-bar{background-color:'{{background-500}}'}md-switch.md-THEME_NAME-theme.md-checked .md-thumb{background-color:'{{primary-color}}'}md-switch.md-THEME_NAME-theme.md-checked .md-bar{background-color:'{{primary-color-0.5}}'}md-switch.md-THEME_NAME-theme.md-checked.md-accent .md-thumb{background-color:'{{accent-color}}'}md-switch.md-THEME_NAME-theme.md-checked.md-accent .md-bar{background-color:'{{accent-color-0.5}}'}md-switch.md-THEME_NAME-theme.md-checked.md-warn .md-thumb{background-color:'{{warn-color}}'}md-switch.md-THEME_NAME-theme.md-checked.md-warn .md-bar{background-color:'{{warn-color-0.5}}'}md-switch.md-THEME_NAME-theme[disabled] .md-thumb{background-color:'{{background-400}}'}md-switch.md-THEME_NAME-theme[disabled] .md-bar{background-color:'{{foreground-4}}'}md-switch.md-THEME_NAME-theme:focus .md-label:not(:empty){border-color:'{{foreground-1}}';border-style:dotted}
|
||||
77
third_party/ui/bower_components/angular-material/modules/js/switch/switch.css
vendored
Normal file
77
third_party/ui/bower_components/angular-material/modules/js/switch/switch.css
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
/*!
|
||||
* Angular Material Design
|
||||
* https://github.com/angular/material
|
||||
* @license MIT
|
||||
* v0.7.0-rc3
|
||||
*/
|
||||
md-switch {
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-align: center;
|
||||
-webkit-align-items: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center; }
|
||||
md-switch .md-container {
|
||||
cursor: -webkit-grab;
|
||||
cursor: grab;
|
||||
width: 36px;
|
||||
height: 24px;
|
||||
position: relative;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
margin-right: 8px; }
|
||||
md-switch:not([disabled]) .md-dragging, md-switch:not([disabled]).md-dragging .md-container {
|
||||
cursor: -webkit-grabbing;
|
||||
cursor: grabbing; }
|
||||
md-switch .md-label {
|
||||
border-color: transparent;
|
||||
border-width: 1px; }
|
||||
md-switch .md-bar {
|
||||
left: 1px;
|
||||
width: 34px;
|
||||
top: 5px;
|
||||
height: 14px;
|
||||
border-radius: 8px;
|
||||
position: absolute; }
|
||||
md-switch .md-thumb-container {
|
||||
top: 2px;
|
||||
left: 0;
|
||||
width: 16px;
|
||||
position: absolute;
|
||||
-webkit-transform: translate3d(0, 0, 0);
|
||||
transform: translate3d(0, 0, 0);
|
||||
z-index: 1; }
|
||||
md-switch.md-checked .md-thumb-container {
|
||||
-webkit-transform: translate3d(100%, 0, 0);
|
||||
transform: translate3d(100%, 0, 0); }
|
||||
md-switch .md-thumb {
|
||||
position: absolute;
|
||||
margin: 0;
|
||||
left: 0;
|
||||
top: 0;
|
||||
outline: none;
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
border-radius: 50%;
|
||||
box-shadow: 0px 2px 5px 0 rgba(0, 0, 0, 0.26); }
|
||||
md-switch .md-thumb .md-ripple-container {
|
||||
position: absolute;
|
||||
display: block;
|
||||
width: auto;
|
||||
height: auto;
|
||||
left: -20px;
|
||||
top: -20px;
|
||||
right: -20px;
|
||||
bottom: -20px; }
|
||||
md-switch:not(.md-dragging) .md-bar, md-switch:not(.md-dragging) .md-thumb-container, md-switch:not(.md-dragging) .md-thumb {
|
||||
-webkit-transition: all 0.5s cubic-bezier(0.35, 0, 0.25, 1);
|
||||
transition: all 0.5s cubic-bezier(0.35, 0, 0.25, 1);
|
||||
-webkit-transition-property: -webkit-transform, background-color;
|
||||
transition-property: transform, background-color; }
|
||||
md-switch:not(.md-dragging) .md-bar, md-switch:not(.md-dragging) .md-thumb {
|
||||
-webkit-transition-delay: 0.05s;
|
||||
transition-delay: 0.05s; }
|
||||
144
third_party/ui/bower_components/angular-material/modules/js/switch/switch.js
vendored
Normal file
144
third_party/ui/bower_components/angular-material/modules/js/switch/switch.js
vendored
Normal file
@@ -0,0 +1,144 @@
|
||||
/*!
|
||||
* Angular Material Design
|
||||
* https://github.com/angular/material
|
||||
* @license MIT
|
||||
* v0.7.0-rc3
|
||||
*/
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @ngdoc module
|
||||
* @name material.components.switch
|
||||
*/
|
||||
|
||||
angular.module('material.components.switch', [
|
||||
'material.core',
|
||||
'material.components.checkbox'
|
||||
])
|
||||
.directive('mdSwitch', MdSwitch);
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @ngdoc directive
|
||||
* @module material.components.switch
|
||||
* @name mdSwitch
|
||||
* @restrict E
|
||||
*
|
||||
* The switch directive is used very much like the normal [angular checkbox](https://docs.angularjs.org/api/ng/input/input%5Bcheckbox%5D).
|
||||
*
|
||||
* @param {string} ng-model Assignable angular expression to data-bind to.
|
||||
* @param {string=} name Property name of the form under which the control is published.
|
||||
* @param {expression=} ng-true-value The value to which the expression should be set when selected.
|
||||
* @param {expression=} ng-false-value The value to which the expression should be set when not selected.
|
||||
* @param {string=} ng-change Angular expression to be executed when input changes due to user interaction with the input element.
|
||||
* @param {boolean=} md-no-ink Use of attribute indicates use of ripple ink effects.
|
||||
* @param {string=} aria-label Publish the button label used by screen-readers for accessibility. Defaults to the switch's text.
|
||||
*
|
||||
* @usage
|
||||
* <hljs lang="html">
|
||||
* <md-switch ng-model="isActive" aria-label="Finished?">
|
||||
* Finished ?
|
||||
* </md-switch>
|
||||
*
|
||||
* <md-switch md-no-ink ng-model="hasInk" aria-label="No Ink Effects">
|
||||
* No Ink Effects
|
||||
* </md-switch>
|
||||
*
|
||||
* <md-switch ng-disabled="true" ng-model="isDisabled" aria-label="Disabled">
|
||||
* Disabled
|
||||
* </md-switch>
|
||||
*
|
||||
* </hljs>
|
||||
*/
|
||||
function MdSwitch(mdCheckboxDirective, $mdTheming, $mdUtil, $document, $mdConstant, $parse, $$rAF) {
|
||||
var checkboxDirective = mdCheckboxDirective[0];
|
||||
|
||||
return {
|
||||
restrict: 'E',
|
||||
transclude: true,
|
||||
template:
|
||||
'<div class="md-container">' +
|
||||
'<div class="md-bar"></div>' +
|
||||
'<div class="md-thumb-container">' +
|
||||
'<div class="md-thumb" md-ink-ripple md-ink-ripple-checkbox></div>' +
|
||||
'</div>'+
|
||||
'</div>' +
|
||||
'<div ng-transclude class="md-label">' +
|
||||
'</div>',
|
||||
require: '?ngModel',
|
||||
compile: compile
|
||||
};
|
||||
|
||||
function compile(element, attr) {
|
||||
var checkboxLink = checkboxDirective.compile(element, attr);
|
||||
// no transition on initial load
|
||||
element.addClass('md-dragging');
|
||||
|
||||
return function (scope, element, attr, ngModel) {
|
||||
ngModel = ngModel || $mdUtil.fakeNgModel();
|
||||
var disabledGetter = $parse(attr.ngDisabled);
|
||||
var thumbContainer = angular.element(element[0].querySelector('.md-thumb-container'));
|
||||
var switchContainer = angular.element(element[0].querySelector('.md-container'));
|
||||
|
||||
// no transition on initial load
|
||||
$$rAF(function() {
|
||||
element.removeClass('md-dragging');
|
||||
});
|
||||
|
||||
// Tell the checkbox we don't want a click listener.
|
||||
// Our drag listener tells us everything, using more granular events.
|
||||
attr.mdNoClick = true;
|
||||
checkboxLink(scope, element, attr, ngModel);
|
||||
|
||||
$mdUtil.attachDragBehavior(scope, switchContainer);
|
||||
|
||||
// These events are triggered by setup drag
|
||||
switchContainer.on('$md.dragstart', onDragStart)
|
||||
.on('$md.drag', onDrag)
|
||||
.on('$md.dragend', onDragEnd);
|
||||
|
||||
function onDragStart(ev, drag) {
|
||||
// Don't go if ng-disabled===true
|
||||
if (disabledGetter(scope)) return ev.preventDefault();
|
||||
|
||||
drag.width = thumbContainer.prop('offsetWidth');
|
||||
element.addClass('md-dragging');
|
||||
}
|
||||
function onDrag(ev, drag) {
|
||||
var percent = drag.distance / drag.width;
|
||||
|
||||
//if checked, start from right. else, start from left
|
||||
var translate = ngModel.$viewValue ? 1 - percent : -percent;
|
||||
// Make sure the switch stays inside its bounds, 0-1%
|
||||
translate = Math.max(0, Math.min(1, translate));
|
||||
|
||||
thumbContainer.css($mdConstant.CSS.TRANSFORM, 'translate3d(' + (100*translate) + '%,0,0)');
|
||||
drag.translate = translate;
|
||||
}
|
||||
function onDragEnd(ev, drag) {
|
||||
if (disabledGetter(scope)) return false;
|
||||
|
||||
element.removeClass('md-dragging');
|
||||
thumbContainer.css($mdConstant.CSS.TRANSFORM, '');
|
||||
|
||||
// We changed if there is no distance (this is a click a click),
|
||||
// or if the drag distance is >50% of the total.
|
||||
var isChanged = Math.abs(drag.distance || 0) < 2 ||
|
||||
(ngModel.$viewValue ? drag.translate < 0.5 : drag.translate > 0.5);
|
||||
if (isChanged) {
|
||||
scope.$apply(function() {
|
||||
ngModel.$setViewValue(!ngModel.$viewValue);
|
||||
ngModel.$render();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
MdSwitch.$inject = ["mdCheckboxDirective", "$mdTheming", "$mdUtil", "$document", "$mdConstant", "$parse", "$$rAF"];
|
||||
|
||||
})();
|
||||
6
third_party/ui/bower_components/angular-material/modules/js/switch/switch.min.css
vendored
Normal file
6
third_party/ui/bower_components/angular-material/modules/js/switch/switch.min.css
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
/*!
|
||||
* Angular Material Design
|
||||
* https://github.com/angular/material
|
||||
* @license MIT
|
||||
* v0.7.0-rc3
|
||||
*/md-switch{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}md-switch .md-container{cursor:-webkit-grab;cursor:grab;width:36px;height:24px;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin-right:8px}md-switch:not([disabled]) .md-dragging,md-switch:not([disabled]).md-dragging .md-container{cursor:-webkit-grabbing;cursor:grabbing}md-switch .md-label{border-color:transparent;border-width:1px}md-switch .md-bar{left:1px;width:34px;top:5px;height:14px;border-radius:8px;position:absolute}md-switch .md-thumb-container{top:2px;left:0;width:16px;position:absolute;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);z-index:1}md-switch.md-checked .md-thumb-container{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}md-switch .md-thumb{position:absolute;margin:0;left:0;top:0;outline:0;height:20px;width:20px;border-radius:50%;box-shadow:0 2px 5px 0 rgba(0,0,0,.26)}md-switch .md-thumb .md-ripple-container{position:absolute;display:block;width:auto;height:auto;left:-20px;top:-20px;right:-20px;bottom:-20px}md-switch:not(.md-dragging) .md-bar,md-switch:not(.md-dragging) .md-thumb,md-switch:not(.md-dragging) .md-thumb-container{-webkit-transition:all .5s cubic-bezier(0.35,0,.25,1);transition:all .5s cubic-bezier(0.35,0,.25,1);-webkit-transition-property:-webkit-transform,background-color;transition-property:transform,background-color}md-switch:not(.md-dragging) .md-bar,md-switch:not(.md-dragging) .md-thumb{-webkit-transition-delay:.05s;transition-delay:.05s}
|
||||
7
third_party/ui/bower_components/angular-material/modules/js/switch/switch.min.js
vendored
Normal file
7
third_party/ui/bower_components/angular-material/modules/js/switch/switch.min.js
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
/*!
|
||||
* Angular Material Design
|
||||
* https://github.com/angular/material
|
||||
* @license MIT
|
||||
* v0.7.0-rc3
|
||||
*/
|
||||
!function(){"use strict";function e(e,a,t,n,i,r,d){function c(e,a){var n=l.compile(e,a);return e.addClass("md-dragging"),function(e,a,c,l){function s(t,n){return u(e)?t.preventDefault():(n.width=v.prop("offsetWidth"),a.addClass("md-dragging"),void 0)}function m(e,a){var t=a.distance/a.width,n=l.$viewValue?1-t:-t;n=Math.max(0,Math.min(1,n)),v.css(i.CSS.TRANSFORM,"translate3d("+100*n+"%,0,0)"),a.translate=n}function o(t,n){if(u(e))return!1;a.removeClass("md-dragging"),v.css(i.CSS.TRANSFORM,"");var r=Math.abs(n.distance||0)<2||(l.$viewValue?n.translate<.5:n.translate>.5);r&&e.$apply(function(){l.$setViewValue(!l.$viewValue),l.$render()})}l=l||t.fakeNgModel();var u=r(c.ngDisabled),v=angular.element(a[0].querySelector(".md-thumb-container")),g=angular.element(a[0].querySelector(".md-container"));d(function(){a.removeClass("md-dragging")}),c.mdNoClick=!0,n(e,a,c,l),t.attachDragBehavior(e,g),g.on("$md.dragstart",s).on("$md.drag",m).on("$md.dragend",o)}}var l=e[0];return{restrict:"E",transclude:!0,template:'<div class="md-container"><div class="md-bar"></div><div class="md-thumb-container"><div class="md-thumb" md-ink-ripple md-ink-ripple-checkbox></div></div></div><div ng-transclude class="md-label"></div>',require:"?ngModel",compile:c}}angular.module("material.components.switch",["material.core","material.components.checkbox"]).directive("mdSwitch",e),e.$inject=["mdCheckboxDirective","$mdTheming","$mdUtil","$document","$mdConstant","$parse","$$rAF"]}();
|
||||
Reference in New Issue
Block a user