Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mcwv/notched-outline

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mcwv/notched-outline - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

7

dist/mcwv.notchedOutline.min.js

@@ -1,2 +0,2 @@

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.notchedOutline=e():(t.mcwv=t.mcwv||{},t.mcwv.notchedOutline=e())}(window,function(){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(o,r,function(e){return t[e]}.bind(null,r));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=51)}({2:function(t,e,n){"use strict";function o(t){return{version:"__VERSION__",install:e=>{Object.values(t).forEach(t=>e.component(t.name,t))},components:t}}n.d(e,"a",function(){return o})},51:function(t,e,n){n(91),t.exports=n(52)},52:function(t,e,n){},91:function(t,e,n){"use strict";n.r(e);var o=n(2),r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.notchedOutline=e():(t.mcwv=t.mcwv||{},t.mcwv.notchedOutline=e())}(window,function(){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(o,r,function(e){return t[e]}.bind(null,r));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=53)}({2:function(t,e,n){"use strict";function o(t){return{version:"__VERSION__",install:e=>{Object.values(t).forEach(t=>e.component(t.name,t))},components:t}}n.d(e,"a",function(){return o})},53:function(t,e,n){n(94),t.exports=n(54)},54:function(t,e,n){},94:function(t,e,n){"use strict";n.r(e);
/*! *****************************************************************************

@@ -15,3 +15,4 @@ Copyright (c) Microsoft Corporation. All rights reserved.

and limitations under the License.
***************************************************************************** */var i=function(){return(i=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};
***************************************************************************** */
var o=function(t,e){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};var r=function(){return(r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};
/**

@@ -39,3 +40,3 @@ * @license

*/
var s=function(){function t(t){void 0===t&&(t={}),this.adapter_=t}return Object.defineProperty(t,"cssClasses",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{}},enumerable:!0,configurable:!0}),t.prototype.init=function(){},t.prototype.destroy=function(){},t}(),c={NOTCH_ELEMENT_SELECTOR:".mdc-notched-outline__notch"},u={NOTCH_ELEMENT_PADDING:8},l={NO_LABEL:"mdc-notched-outline--no-label",OUTLINE_NOTCHED:"mdc-notched-outline--notched",OUTLINE_UPGRADED:"mdc-notched-outline--upgraded"},a=function(t){function e(n){return t.call(this,i({},e.defaultAdapter,n))||this}return function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),Object.defineProperty(e,"strings",{get:function(){return c},enumerable:!0,configurable:!0}),Object.defineProperty(e,"cssClasses",{get:function(){return l},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return u},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},setNotchWidthProperty:function(){},removeNotchWidthProperty:function(){}}},enumerable:!0,configurable:!0}),e.prototype.notch=function(t){var n=e.cssClasses.OUTLINE_NOTCHED;t>0&&(t+=u.NOTCH_ELEMENT_PADDING),this.adapter_.setNotchWidthProperty(t),this.adapter_.addClass(n)},e.prototype.closeNotch=function(){var t=e.cssClasses.OUTLINE_NOTCHED;this.adapter_.removeClass(t),this.adapter_.removeNotchWidthProperty()},e}(s),d={name:"mdc-notched-outline",data:()=>({outlinedClasses:{"mdc-notched-outline":!0},notchStyles:{}}),render(t){const e=t("div",{class:"mdc-notched-outline__notch",style:this.notchStyles},[this.$slots.default&&t("mdc-floating-label",{ref:"labelEl"},this.$slots.default)]);return t("div",{class:this.outlinedClasses},[t("div",{class:"mdc-notched-outline__leading"}),e,t("div",{class:"mdc-notched-outline__trailing"})])},mounted(){const{OUTLINE_UPGRADED:t,NO_LABEL:e}=a.cssClasses,n={addClass:t=>{this.$set(this.outlinedClasses,t,!0)},removeClass:t=>{this.$delete(this.outlinedClasses,t)},setNotchWidthProperty:t=>this.$set(this.notchStyles,"width",`${t}px`),removeNotchWidthProperty:()=>this.$delete(this.notchStyles,"width")};this.foundation=new a(n),this.foundation.init();const o=this.$slots.default?t:e;this.$set(this.outlinedClasses,o,!0)},beforeDestroy(){this.foundation.destroy()},methods:{notch(t){this.foundation.notch(t)},closeNotch(){this.foundation.closeNotch()},float(t){this.$refs.labelEl&&this.$refs.labelEl.float(t)},shake(t){this.$refs.labelEl&&this.$refs.labelEl.shake(t)},getWidth(){return this.$refs.labelEl.getWidth()}}};n.d(e,"mdcNotchedOutline",function(){return d});e.default=Object(o.a)({mdcNotchedOutline:d})}})});
var i=function(){function t(t){void 0===t&&(t={}),this.adapter_=t}return Object.defineProperty(t,"cssClasses",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{}},enumerable:!0,configurable:!0}),t.prototype.init=function(){},t.prototype.destroy=function(){},t}(),s={NOTCH_ELEMENT_SELECTOR:".mdc-notched-outline__notch"},c={NOTCH_ELEMENT_PADDING:8},u={NO_LABEL:"mdc-notched-outline--no-label",OUTLINE_NOTCHED:"mdc-notched-outline--notched",OUTLINE_UPGRADED:"mdc-notched-outline--upgraded"},l=function(t){function e(n){return t.call(this,r({},e.defaultAdapter,n))||this}return function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),Object.defineProperty(e,"strings",{get:function(){return s},enumerable:!0,configurable:!0}),Object.defineProperty(e,"cssClasses",{get:function(){return u},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return c},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},setNotchWidthProperty:function(){},removeNotchWidthProperty:function(){}}},enumerable:!0,configurable:!0}),e.prototype.notch=function(t){var n=e.cssClasses.OUTLINE_NOTCHED;t>0&&(t+=c.NOTCH_ELEMENT_PADDING),this.adapter_.setNotchWidthProperty(t),this.adapter_.addClass(n)},e.prototype.closeNotch=function(){var t=e.cssClasses.OUTLINE_NOTCHED;this.adapter_.removeClass(t),this.adapter_.removeNotchWidthProperty()},e}(i),a=n(2);n.d(e,"mdcNotchedOutline",function(){return d});const d={name:"mdc-notched-outline",data:()=>({outlinedClasses:{"mdc-notched-outline":!0},notchStyles:{}}),mounted(){const{OUTLINE_UPGRADED:t,NO_LABEL:e}=l.cssClasses,n={addClass:t=>{this.$set(this.outlinedClasses,t,!0)},removeClass:t=>{this.$delete(this.outlinedClasses,t)},setNotchWidthProperty:t=>this.$set(this.notchStyles,"width",`${t}px`),removeNotchWidthProperty:()=>this.$delete(this.notchStyles,"width")};this.foundation=new l(n),this.foundation.init();const o=this.$slots.default?t:e;this.$set(this.outlinedClasses,o,!0)},beforeDestroy(){this.foundation.destroy()},methods:{notch(t){this.foundation.notch(t)},closeNotch(){this.foundation.closeNotch()},float(t){this.$refs.labelEl&&this.$refs.labelEl.float(t)},shake(t){this.$refs.labelEl&&this.$refs.labelEl.shake(t)},getWidth(){return this.$refs.labelEl.getWidth()}},render(t){const{$scopedSlots:e}=this,n=t("div",{class:"mdc-notched-outline__notch",style:this.notchStyles},[e.default&&t("mdc-floating-label",{ref:"labelEl"},e.default())]);return t("div",{class:this.outlinedClasses},[t("div",{class:"mdc-notched-outline__leading"}),n,t("div",{class:"mdc-notched-outline__trailing"})])}};e.default=Object(a.a)({mdcNotchedOutline:d})}})});
//# sourceMappingURL=mcwv.notchedOutline.min.js.map

@@ -0,4 +1,90 @@

import MDCnotchedOutlineFoundation from '@material/notched-outline/foundation';
import { BasePlugin } from '@mcwv/base';
import mdcNotchedOutline from './mdc-notched-outline.js';
const mdcNotchedOutline = {
name: 'mdc-notched-outline',
data() {
return {
outlinedClasses: { 'mdc-notched-outline': true },
notchStyles: {},
};
},
mounted() {
const {
OUTLINE_UPGRADED,
NO_LABEL,
} = MDCnotchedOutlineFoundation.cssClasses;
const adapter = {
addClass: className => {
this.$set(this.outlinedClasses, className, true);
},
removeClass: className => {
this.$delete(this.outlinedClasses, className);
},
setNotchWidthProperty: width =>
this.$set(this.notchStyles, 'width', `${width}px`),
removeNotchWidthProperty: () => this.$delete(this.notchStyles, 'width'),
};
this.foundation = new MDCnotchedOutlineFoundation(adapter);
this.foundation.init();
const key = this.$slots.default ? OUTLINE_UPGRADED : NO_LABEL;
this.$set(this.outlinedClasses, key, true);
},
beforeDestroy() {
this.foundation.destroy();
},
methods: {
notch(notchWidth) {
this.foundation.notch(notchWidth);
},
closeNotch() {
this.foundation.closeNotch();
},
float(shouldFloat) {
this.$refs.labelEl && this.$refs.labelEl.float(shouldFloat);
},
shake(shouldShake) {
this.$refs.labelEl && this.$refs.labelEl.shake(shouldShake);
},
getWidth() {
return this.$refs.labelEl.getWidth();
},
},
render(createElement) {
const { $scopedSlots: scopedSlots } = this;
const notchEl = createElement(
'div',
{
class: 'mdc-notched-outline__notch',
style: this.notchStyles,
},
[
scopedSlots.default &&
createElement(
'mdc-floating-label',
{ ref: 'labelEl' },
scopedSlots.default(),
),
],
);
return createElement('div', { class: this.outlinedClasses }, [
createElement('div', { class: 'mdc-notched-outline__leading' }),
notchEl,
createElement('div', { class: 'mdc-notched-outline__trailing' }),
]);
},
};
export { mdcNotchedOutline };

@@ -5,0 +91,0 @@

{
"name": "@mcwv/notched-outline",
"description": "The Vue Material Adapter for the web notched-outline component",
"version": "0.3.0",
"version": "0.4.0",
"license": "MIT",

@@ -20,5 +20,5 @@ "main": "dist/mcwv.notchedOutline.min.js",

"@material/notched-outline": "^1.1.1",
"@mcwv/base": "^0.3.0"
"@mcwv/base": "^0.4.0"
},
"gitHead": "e5d6ff92c9c2f8986eca1182382939bdaeabef4d"
"gitHead": "18ce29b68e90ce14bdc0f9e9e579904a9968cfd2"
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc