UNPKG

4.02 kBJavaScriptView Raw
1import { r as registerInstance, h, H as Host } from './index-c5baf484.js';
2var tabsCss = ".tabs{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.tabs:not(:last-child){margin-bottom:1.5rem}.tabs{-webkit-overflow-scrolling:touch;-ms-flex-align:stretch;align-items:stretch;display:-ms-flexbox;display:flex;font-size:1rem;-ms-flex-pack:justify;justify-content:space-between;overflow:hidden;overflow-x:auto;white-space:nowrap}.tabs a{-ms-flex-align:center;align-items:center;border-bottom-color:#dbdbdb;border-bottom-style:solid;border-bottom-width:1px;color:#4a4a4a;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;margin-bottom:-1px;padding:0.5em 1em;vertical-align:top}.tabs a:hover{border-bottom-color:#363636;color:#363636}.tabs li{display:block}.tabs li.is-active a{border-bottom-color:#3273dc;color:#3273dc}.tabs ul{-ms-flex-align:center;align-items:center;border-bottom-color:#dbdbdb;border-bottom-style:solid;border-bottom-width:1px;display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0;-ms-flex-pack:start;justify-content:flex-start}.tabs ul.is-left{padding-right:0.75em}.tabs ul.is-center{-ms-flex:none;flex:none;-ms-flex-pack:center;justify-content:center;padding-left:0.75em;padding-right:0.75em}.tabs ul.is-right{-ms-flex-pack:end;justify-content:flex-end;padding-left:0.75em}.tabs .icon:first-child{margin-right:0.5em}.tabs .icon:last-child{margin-left:0.5em}.tabs.is-centered ul{-ms-flex-pack:center;justify-content:center}.tabs.is-right ul{-ms-flex-pack:end;justify-content:flex-end}.tabs.is-boxed a{border:1px solid transparent;border-radius:4px 4px 0 0}.tabs.is-boxed a:hover{background-color:whitesmoke;border-bottom-color:#dbdbdb}.tabs.is-boxed li.is-active a{background-color:white;border-color:#dbdbdb;border-bottom-color:transparent !important}.tabs.is-fullwidth li{-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0}.tabs.is-toggle a{border-color:#dbdbdb;border-style:solid;border-width:1px;margin-bottom:0;position:relative}.tabs.is-toggle a:hover{background-color:whitesmoke;border-color:#b5b5b5;z-index:2}.tabs.is-toggle li+li{margin-left:-1px}.tabs.is-toggle li:first-child a{border-top-left-radius:4px;border-bottom-left-radius:4px}.tabs.is-toggle li:last-child a{border-top-right-radius:4px;border-bottom-right-radius:4px}.tabs.is-toggle li.is-active a{background-color:#3273dc;border-color:#3273dc;color:#fff;z-index:1}.tabs.is-toggle ul{border-bottom:none}.tabs.is-toggle.is-toggle-rounded li:first-child a{border-bottom-left-radius:290486px;border-top-left-radius:290486px;padding-left:1.25em}.tabs.is-toggle.is-toggle-rounded li:last-child a{border-bottom-right-radius:290486px;border-top-right-radius:290486px;padding-right:1.25em}.tabs.is-small{font-size:0.75rem}.tabs.is-medium{font-size:1.25rem}.tabs.is-large{font-size:1.5rem}bm-tabs bm-icon:first-child .icon{margin-right:0.5em}bm-tabs bm-icon:last-child .icon{margin-left:0.5em}";
3var Tabs = /** @class */ (function () {
4 function Tabs(hostRef) {
5 registerInstance(this, hostRef);
6 /**
7 * CSS Classes
8 */
9 this.class = '';
10 /**
11 * Rounded
12 */
13 this.isRounded = false;
14 /**
15 * Full width
16 */
17 this.isFullwidth = false;
18 }
19 Tabs.prototype.render = function () {
20 var _a;
21 return (h(Host, null, h("div", { class: (_a = {
22 tabs: true
23 },
24 _a[this.size] = Boolean(this.size),
25 _a[this.alignment] = Boolean(this.alignment),
26 _a[this.tabStyle] = Boolean(this.tabStyle),
27 _a['is-fullwidth'] = this.isFullwidth,
28 _a['is-toggle-rounded'] = this.isRounded && this.tabStyle === 'is-toggle',
29 _a[this.class] = Boolean(this.class),
30 _a) }, h("slot", null))));
31 };
32 return Tabs;
33}());
34Tabs.style = tabsCss;
35export { Tabs as bm_tabs };