UNPKG

4.66 kBJavaScriptView Raw
1import { r as registerInstance, h } from './index-d4feb066.js';
2
3const tagCss = ".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:0.5rem}.tags .tag:not(:last-child){margin-right:0.5rem}.tags:last-child{margin-bottom:-0.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:0.25rem;margin-left:0.25rem}.tags.is-right{-ms-flex-pack:end;justify-content:flex-end}.tags.is-right .tag:not(:first-child){margin-left:0.5rem}.tags.is-right .tag:not(:last-child){margin-right:0}.tags.has-addons .tag{margin-right:0}.tags.has-addons .tag:not(:first-child){margin-left:0;border-top-left-radius:0;border-bottom-left-radius:0}.tags.has-addons .tag:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.tag:not(body){-ms-flex-align:center;align-items:center;background-color:whitesmoke;border-radius:4px;color:#4a4a4a;display:-ms-inline-flexbox;display:inline-flex;font-size:0.75rem;height:2em;-ms-flex-pack:center;justify-content:center;line-height:1.5;padding-left:0.75em;padding-right:0.75em;white-space:nowrap}.tag:not(body) .delete{margin-left:0.25rem;margin-right:-0.375rem}.tag:not(body).is-white{background-color:white;color:#0a0a0a}.tag:not(body).is-black{background-color:#0a0a0a;color:white}.tag:not(body).is-light{background-color:whitesmoke;color:rgba(0, 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-primary.is-light{background-color:#ebebff;color:#0a00f0}.tag:not(body).is-link{background-color:#5851ff;color:#fff}.tag:not(body).is-link.is-light{background-color:#ebebff;color:#0a00f0}.tag:not(body).is-info{background-color:#3298dc;color:#fff}.tag:not(body).is-info.is-light{background-color:#eef6fc;color:#1d72aa}.tag:not(body).is-success{background-color:#48c774;color:#fff}.tag:not(body).is-success.is-light{background-color:#effaf3;color:#257942}.tag:not(body).is-warning{background-color:#ffdd57;color:rgba(0, 0, 0, 0.7)}.tag:not(body).is-warning.is-light{background-color:#fffbeb;color:#947600}.tag:not(body).is-danger{background-color:#f14668;color:#fff}.tag:not(body).is-danger.is-light{background-color:#feecf0;color:#cc0f35}.tag:not(body).is-normal{font-size:0.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:-0.375em;margin-right:0.1875em}.tag:not(body) .icon:last-child:not(:first-child){margin-left:0.1875em;margin-right:-0.375em}.tag:not(body) .icon:first-child:last-child{margin-left:-0.375em;margin-right:-0.375em}.tag:not(body).is-delete{margin-left:1px;padding:0;position:relative;width:2em}.tag:not(body).is-delete::before,.tag:not(body).is-delete::after{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:hover,.tag:not(body).is-delete:focus{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:-0.375em;margin-right:0.1875em}bm-tag:first-child:not(:last-child):last-child:not(:first-child) .icon{margin-left:0.1875em;margin-right:-0.375em}bm-tag:first-child:not(:last-child):first-child:last-child .icon{margin-left:-0.375em;margin-right:-0.375em}";
4
5const Tag = class {
6 constructor(hostRef) {
7 registerInstance(this, hostRef);
8 /**
9 * Tag
10 */
11 this.tag = 'span';
12 }
13 render() {
14 const TagType = this.tag;
15 return (h(TagType, { class: {
16 tag: true,
17 [this.color]: Boolean(this.color),
18 [this.size]: Boolean(this.size),
19 [this.modifier]: Boolean(this.modifier),
20 } }, this.modifier !== 'is-delete' && h("slot", null)));
21 }
22};
23Tag.style = tagCss;
24
25export { Tag as bm_tag };