Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

VLabel.js 2.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. 'use strict';
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. 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; }; // Styles
  6. // Mixins
  7. // Helpers
  8. require('../../../src/stylus/components/_labels.styl');
  9. var _colorable = require('../../mixins/colorable');
  10. var _colorable2 = _interopRequireDefault(_colorable);
  11. var _themeable = require('../../mixins/themeable');
  12. var _themeable2 = _interopRequireDefault(_themeable);
  13. var _mixins = require('../../util/mixins');
  14. var _mixins2 = _interopRequireDefault(_mixins);
  15. var _helpers = require('../../util/helpers');
  16. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  17. /* @vue/component */
  18. exports.default = (0, _mixins2.default)(_themeable2.default).extend({
  19. name: 'v-label',
  20. functional: true,
  21. props: {
  22. absolute: Boolean,
  23. color: {
  24. type: String,
  25. default: 'primary'
  26. },
  27. disabled: Boolean,
  28. focused: Boolean,
  29. for: String,
  30. left: {
  31. type: [Number, String],
  32. default: 0
  33. },
  34. right: {
  35. type: [Number, String],
  36. default: 'auto'
  37. },
  38. value: Boolean
  39. },
  40. render: function render(h, ctx) {
  41. var children = ctx.children,
  42. listeners = ctx.listeners,
  43. props = ctx.props;
  44. var data = {
  45. staticClass: 'v-label',
  46. 'class': _extends({
  47. 'v-label--active': props.value,
  48. 'v-label--is-disabled': props.disabled
  49. }, (0, _themeable.functionalThemeClasses)(ctx)),
  50. attrs: {
  51. for: props.for,
  52. 'aria-hidden': !props.for
  53. },
  54. on: listeners,
  55. style: {
  56. left: (0, _helpers.convertToUnit)(props.left),
  57. right: (0, _helpers.convertToUnit)(props.right),
  58. position: props.absolute ? 'absolute' : 'relative'
  59. }
  60. };
  61. return h('label', _colorable2.default.options.methods.setTextColor(props.focused && props.color, data), children);
  62. }
  63. });
  64. //# sourceMappingURL=VLabel.js.map