UNPKG

4.38 kBJavaScriptView Raw
1import { r as registerInstance, h } from './core-98b1cff0.js';
2var Tag = /** @class */ (function () {
3 function Tag(hostRef) {
4 registerInstance(this, hostRef);
5 /**
6 * Tag
7 */
8 this.tag = 'span';
9 }
10 Tag.prototype.render = function () {
11 var _a;
12 var TagType = this.tag;
13 return (h(TagType, { class: (_a = {
14 tag: true
15 },
16 _a[this.color] = Boolean(this.color),
17 _a[this.size] = Boolean(this.size),
18 _a[this.modifier] = Boolean(this.modifier),
19 _a[this.class] = Boolean(this.class),
20 _a) }, this.modifier !== 'is-delete' && h("slot", null)));
21 };
22 Object.defineProperty(Tag, "style", {
23 get: function () { return ".tags{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:start;justify-content:flex-start}.tags .tag{margin-bottom:.5rem}.tags .tag:not(:last-child){margin-right:.5rem}.tags:last-child{margin-bottom:-.5rem}.tags:not(:last-child){margin-bottom:1rem}.tags.are-medium .tag:not(.is-normal):not(.is-large){font-size:1rem}.tags.are-large .tag:not(.is-normal):not(.is-medium){font-size:1.25rem}.tags.is-centered{-ms-flex-pack:center;justify-content:center}.tags.is-centered .tag{margin-right:.25rem;margin-left:.25rem}.tags.is-right{-ms-flex-pack:end;justify-content:flex-end}.tags.is-right .tag:not(:first-child){margin-left:.5rem}.tags.has-addons .tag,.tags.is-right .tag:not(:last-child){margin-right:0}.tags.has-addons .tag:not(:first-child){margin-left:0;border-bottom-left-radius:0;border-top-left-radius:0}.tags.has-addons .tag:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.tag:not(body){-ms-flex-align:center;align-items:center;background-color:#f5f5f5;border-radius:4px;color:#4a4a4a;display:-ms-inline-flexbox;display:inline-flex;font-size:.75rem;height:2em;-ms-flex-pack:center;justify-content:center;line-height:1.5;padding-left:.75em;padding-right:.75em;white-space:nowrap}.tag:not(body) .delete{margin-left:.25rem;margin-right:-.375rem}.tag:not(body).is-white{background-color:#fff;color:#0a0a0a}.tag:not(body).is-black{background-color:#0a0a0a;color:#fff}.tag:not(body).is-light{background-color:#f5f5f5;color:rgba(0,0,0,.7)}.tag:not(body).is-dark{background-color:#363636;color:#fff}.tag:not(body).is-primary{background-color:#5851ff;color:#fff}.tag:not(body).is-info{background-color:#3298dc;color:#fff}.tag:not(body).is-success{background-color:#48c774;color:#fff}.tag:not(body).is-warning{background-color:#ffdd57;color:rgba(0,0,0,.7)}.tag:not(body).is-danger{background-color:#f14668;color:#fff}.tag:not(body).is-normal{font-size:.75rem}.tag:not(body).is-medium{font-size:1rem}.tag:not(body).is-large{font-size:1.25rem}.tag:not(body) .icon:first-child:not(:last-child){margin-left:-.375em;margin-right:.1875em}.tag:not(body) .icon:last-child:not(:first-child){margin-left:.1875em;margin-right:-.375em}.tag:not(body) .icon:first-child:last-child{margin-left:-.375em;margin-right:-.375em}.tag:not(body).is-delete{margin-left:1px;padding:0;position:relative;width:2em}.tag:not(body).is-delete:after,.tag:not(body).is-delete:before{background-color:currentColor;content:\"\";display:block;left:50%;position:absolute;top:50%;-webkit-transform:translateX(-50%) translateY(-50%) rotate(45deg);-ms-transform:translateX(-50%) translateY(-50%) rotate(45deg);transform:translateX(-50%) translateY(-50%) rotate(45deg);-webkit-transform-origin:center center;-ms-transform-origin:center center;transform-origin:center center}.tag:not(body).is-delete:before{height:1px;width:50%}.tag:not(body).is-delete:after{height:50%;width:1px}.tag:not(body).is-delete:focus,.tag:not(body).is-delete:hover{background-color:#e8e8e8}.tag:not(body).is-delete:active{background-color:#dbdbdb}.tag:not(body).is-rounded{border-radius:290486px}a.tag:hover{text-decoration:underline}bm-tag:first-child:not(:last-child) .icon{margin-left:-.375em;margin-right:.1875em}bm-tag:first-child:not(:last-child):last-child:not(:first-child) .icon{margin-left:.1875em;margin-right:-.375em}bm-tag:first-child:not(:last-child):first-child:last-child .icon{margin-left:-.375em;margin-right:-.375em}"; },
24 enumerable: true,
25 configurable: true
26 });
27 return Tag;
28}());
29export { Tag as bm_tag };