@square/maker
Version:
Maker Design System by Square
1 lines • 1.69 kB
Source Map (JSON)
{"version":3,"file":"styles.css","mappings":"AAsEA,gBAIA,sCACA,YAJA,2BACA,SACA,UAGA,qBACA","sources":["webpack://@square/maker/./src/components/Divider/src/Divider.vue"],"sourcesContent":["<template>\n\t<div\n\t\t:class=\"$s.Divider\"\n\t\t:style=\"styles\"\n\t\tv-bind=\"$attrs\"\n\t\tv-on=\"$listeners\"\n\t/>\n</template>\n\n<script>\nimport { MThemeKey, defaultTheme, resolveThemeableProps } from '@square/maker/components/Theme';\nimport cssValidator from '@square/maker/utils/css-validator';\n\n/**\n * @inheritAttrs div\n * @inheritListeners div\n */\nexport default {\n\tinject: {\n\t\ttheme: {\n\t\t\tdefault: defaultTheme(),\n\t\t\tfrom: MThemeKey,\n\t\t},\n\t},\n\n\tinheritAttrs: false,\n\n\tprops: {\n\t\t/**\n\t\t * pattern defined at theme level\n\t\t */\n\t\tpattern: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\t\t/**\n\t\t * Size (height) of the divider\n\t\t */\n\t\tsize: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t\tvalidator: cssValidator('height'),\n\t\t},\n\t\t/**\n\t\t * Color of the divider\n\t\t */\n\t\tcolor: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t\tvalidator: cssValidator('color'),\n\t\t},\n\t},\n\n\tcomputed: {\n\t\t...resolveThemeableProps('divider', [\n\t\t\t'pattern',\n\t\t\t'color',\n\t\t\t'size',\n\t\t]),\n\t\tstyles() {\n\t\t\treturn {\n\t\t\t\t'--divider-color': this.resolvedColor,\n\t\t\t\t'--divider-size': this.resolvedSize,\n\t\t\t};\n\t\t},\n\t},\n};\n</script>\n\n<style module=\"$s\">\n.Divider {\n\theight: var(--divider-size);\n\tmargin: 0;\n\tpadding: 0;\n\tbackground-color: var(--divider-color);\n\tborder: none;\n\ttransition: height 0.5s;\n}\n</style>\n"],"names":[],"sourceRoot":""}