1 | import { r as registerInstance, h, g as getElement } from './core-bb3ac537.js';
|
2 |
|
3 | const App = class {
|
4 | constructor(hostRef) {
|
5 | registerInstance(this, hostRef);
|
6 | }
|
7 | render() {
|
8 | return [
|
9 | h("slot", { name: 'header' }),
|
10 | h("slot", { name: 'side-nav' }),
|
11 | h("main", null, h("ad-container", null, h("slot", null)))
|
12 | ];
|
13 | }
|
14 | static get style() { return "ad-app{display:block;font-size:.875rem;font-family:var(--anj-font-family);font-weight:400;line-height:1.5;outline:none;background-color:#fbfbfb;min-height:100%;padding:3rem 0 2rem;position:relative}ad-app,ad-app:after,ad-app:before{-webkit-box-sizing:border-box;box-sizing:border-box;outline:none}ad-app:active,ad-app :active,ad-app:focus,ad-app :focus{outline:none}ad-app[layout=fluid] ad-container{max-width:none}\@media (min-width:768px){ad-app main{margin-left:13rem;padding-left:1rem;padding-right:1rem}ad-app ad-nav[disabled]~main{margin-left:0}}ad-app main>ad-container{padding-bottom:1rem;padding-top:2rem}\@media (min-width:768px){ad-app main>ad-container{padding-left:2rem;padding-right:2rem}}"; }
|
15 | };
|
16 |
|
17 | const Container = class {
|
18 | constructor(hostRef) {
|
19 | registerInstance(this, hostRef);
|
20 | }
|
21 | static get style() { return ".sc-ad-container-h{display:block;margin-left:auto;margin-right:auto;max-width:1140px;padding-left:15px;padding-right:15px;width:100%}"; }
|
22 | };
|
23 |
|
24 | const Footer = class {
|
25 | constructor(hostRef) {
|
26 | registerInstance(this, hostRef);
|
27 | }
|
28 | render() {
|
29 | const year = new Date().getFullYear();
|
30 | return (h("div", null, "\u00A9 ", year, " Zuora"));
|
31 | }
|
32 | static get style() { return ".sc-ad-footer-h{display:block;font-size:.875rem;font-family:var(--anj-font-family);font-weight:400;line-height:1.5;outline:none;bottom:.5rem;color:var(--anj-neutral-dark);font-size:.75rem;left:50%;padding:1rem 1rem 0;position:absolute;text-align:center;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.sc-ad-footer-h, .sc-ad-footer-h:after, .sc-ad-footer-h:before{-webkit-box-sizing:border-box;box-sizing:border-box;outline:none}.sc-ad-footer-h:active, .sc-ad-footer-h .sc-ad-footer:active, .sc-ad-footer-h:focus, .sc-ad-footer-h .sc-ad-footer:focus{outline:none}\@media (min-width:768px){.sc-ad-footer-h{padding-left:2rem;padding-right:2rem}}"; }
|
33 | };
|
34 |
|
35 | const FrameworkSwitcher = class {
|
36 | constructor(hostRef) {
|
37 | registerInstance(this, hostRef);
|
38 | this.frameworks = ['js', 'angular', 'vue'];
|
39 | }
|
40 | switch(framework) {
|
41 | const current = this.getCurrent();
|
42 | if (framework !== current) {
|
43 | document.location.assign(document.location.toString().replace(current, framework));
|
44 | }
|
45 | }
|
46 | getCurrent() {
|
47 | return this.frameworks.find(f => document.location.pathname.includes(f));
|
48 | }
|
49 | render() {
|
50 | const current = this.getCurrent();
|
51 | return (h("anj-dropdown", null, h("anj-button", { context: "text", slot: "dropdown-toggle" }, "Framework"), this.frameworks.map(f => h("anj-dropdown-item", { active: f === current, onClick: () => this.switch(f) }, f))));
|
52 | }
|
53 | static get style() { return "ad-framework-switcher{display:block;font-size:.875rem;font-family:var(--anj-font-family);font-weight:400;line-height:1.5;outline:none;margin:-25px 0 0 -13px;width:50%}ad-framework-switcher,ad-framework-switcher:after,ad-framework-switcher:before{-webkit-box-sizing:border-box;box-sizing:border-box;outline:none}ad-framework-switcher:active,ad-framework-switcher :active,ad-framework-switcher:focus,ad-framework-switcher :focus{outline:none}ad-framework-switcher .anj-dropdown-item{text-transform:capitalize}ad-framework-switcher img{height:.875rem;margin-right:.25rem;position:relative;top:-2px}"; }
|
54 | };
|
55 |
|
56 | const Header = class {
|
57 | constructor(hostRef) {
|
58 | registerInstance(this, hostRef);
|
59 | }
|
60 | render() {
|
61 | const navStyle = {
|
62 | height: this.active ? `${this.element.querySelector('ul').clientHeight}px` : '0'
|
63 | };
|
64 | const toggleClass = this.active ? 'nav-toggle header-toggle active' : 'nav-toggle header-toggle';
|
65 | return [
|
66 | h("div", { class: "nav-left" }, h("slot", { name: "nav-toggle" }), h("slot", { name: "home" })),
|
67 | h("nav", { style: navStyle }, h("ul", { onClick: () => this.toggleNav(false) }, h("slot", null), this.github ?
|
68 | h("li", null, h("a", { href: this.github, target: "_blank" }, h("svg", { class: "nav-item-icon", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 499.36", focusable: "false" }, h("title", null, "GitHub"), h("path", { d: "M256 0C114.64 0 0 114.61 0 256c0 113.09 73.34 209 175.08 242.9 12.8 2.35 17.47-5.56 17.47-12.34 0-6.08-.22-22.18-.35-43.54-71.2 15.49-86.2-34.34-86.2-34.34-11.64-29.57-28.42-37.45-28.42-37.45-23.27-15.84 1.73-15.55 1.73-15.55 25.69 1.81 39.21 26.38 39.21 26.38 22.84 39.12 59.92 27.82 74.5 21.27 2.33-16.54 8.94-27.82 16.25-34.22-56.84-6.43-116.6-28.43-116.6-126.49 0-27.95 10-50.8 26.35-68.69-2.63-6.48-11.42-32.5 2.51-67.75 0 0 21.49-6.88 70.4 26.24a242.65 242.65 0 0 1 128.18 0c48.87-33.13 70.33-26.24 70.33-26.24 14 35.25 5.18 61.27 2.55 67.75 16.41 17.9 26.31 40.75 26.31 68.69 0 98.35-59.85 120-116.88 126.32 9.19 7.9 17.38 23.53 17.38 47.41 0 34.22-.31 61.83-.31 70.23 0 6.85 4.61 14.81 17.6 12.31C438.72 464.97 512 369.08 512 256.02 512 114.62 397.37 0 256 0z", fill: "currentColor", "fill-rule": "evenodd" })), "Github")) : '')),
|
69 | h("div", { class: "nav-right" }, this.version ? h("span", { class: "version-text" }, this.version) : '', h("span", { class: toggleClass, onClick: () => this.toggleNav() }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24" }, h("path", { fill: "currentColor", d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z" }))))
|
70 | ];
|
71 | }
|
72 | toggleNav(active) {
|
73 | this.active = active !== undefined ? active : !this.active;
|
74 | }
|
75 | get element() { return getElement(this); }
|
76 | static get style() { return "ad-header{-webkit-box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.12),0 1px 5px 0 rgba(0,0,0,.2);box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.12),0 1px 5px 0 rgba(0,0,0,.2);-ms-flex-align:center;align-items:center;background-color:var(--anj-primary-dark);display:-ms-flexbox;display:flex;-ms-flex-flow:row nowrap;flex-flow:row nowrap;font-size:1rem;-ms-flex-pack:justify;justify-content:space-between;left:0;letter-spacing:var(--anj-spacing-wide);min-height:3rem;right:0;padding:0 .75rem;position:fixed;top:0;z-index:1030}\@media (max-width:767.98px){ad-header.active nav{-webkit-box-shadow:0 1px 3px var(--anj-shadow);box-shadow:0 1px 3px var(--anj-shadow)}}ad-header a{color:var(--anj-border-dark);display:block;padding:.5rem .75rem;text-decoration:none;-webkit-transition:color .2s ease;transition:color .2s ease}ad-header a:focus,ad-header a:hover{color:var(--anj-background);text-decoration:none}ad-header a:active{text-decoration:none}ad-header a.active,ad-header a.active:focus,ad-header a.active:hover,ad-header a:active{color:var(--anj-light)}ad-header a .nav-item-icon{height:1rem;margin-right:.2rem;position:relative;top:-1px;width:1rem}ad-header a[slot=home]{color:var(--anj-light);font-size:1.25rem;font-weight:200;display:inline-block;padding-left:3rem;position:relative}ad-header a[slot=home] img{height:2.5rem;left:0;position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}ad-header .version-text{color:var(--anj-border-dark);display:none;font-size:.75rem;font-weight:200;letter-spacing:normal;opacity:.8}\@media (min-width:768px){ad-header .version-text{display:inline-block}}ad-header .nav-toggle{color:var(--anj-border-dark);cursor:pointer;display:inline-block;font-size:1.25rem;font-weight:600;-webkit-transition:color .2s ease;transition:color .2s ease}\@media (min-width:768px){ad-header .nav-toggle{display:none}}ad-header .nav-toggle.header-toggle{margin-right:-9px;-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}ad-header .nav-toggle:hover{color:var(--anj-light)}ad-header .nav-toggle.active,ad-header .nav-toggle:active,ad-header .nav-toggle[active]{color:var(--anj-background)}ad-header nav{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-preferred-size:auto;flex-basis:auto;-ms-flex-positive:1;flex-grow:1;margin-right:.75rem}\@media (max-width:767.98px){ad-header nav{background-color:var(--anj-primary);display:block;height:0;-ms-flex-preferred-size:100%;flex-basis:100%;left:0;margin-right:0;overflow:hidden;position:absolute;right:0;top:100%;-webkit-transition:height .5s ease;transition:height .5s ease}}\@media (min-width:768px){ad-header nav{height:inherit!important}}ad-header nav ul{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;list-style:none;margin:0;padding-bottom:.5rem;padding-left:0}\@media (min-width:768px){ad-header nav ul{-ms-flex-direction:row;flex-direction:row;margin-left:auto;margin-right:auto;padding-bottom:0}}"; }
|
77 | };
|
78 |
|
79 | const Nav = class {
|
80 | constructor(hostRef) {
|
81 | registerInstance(this, hostRef);
|
82 | }
|
83 | render() {
|
84 | return (h("nav", null, h("slot", null)));
|
85 | }
|
86 | static get style() { return "ad-nav{-webkit-box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.12),0 1px 5px 0 rgba(0,0,0,.2);box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.12),0 1px 5px 0 rgba(0,0,0,.2);background-color:#f8f8f8;border-right:1px solid var(--anj-border-dark);bottom:0;overflow-y:auto;position:fixed;top:3rem;width:13rem;z-index:1020}ad-nav[disabled]{display:none}\@media (max-width:767.98px){ad-nav{-webkit-box-shadow:none;box-shadow:none;-webkit-transform:translateX(-100%);transform:translateX(-100%);-webkit-transition:all .5s ease;transition:all .5s ease;z-index:1020}ad-nav[active]{-webkit-box-shadow:0 3px 7px var(--anj-shadow);box-shadow:0 3px 7px var(--anj-shadow);-webkit-transform:translateX(0);transform:translateX(0)}}ad-nav nav{padding:1rem 1.25rem 1rem 0}"; }
|
87 | };
|
88 |
|
89 | const NavItem = class {
|
90 | constructor(hostRef) {
|
91 | registerInstance(this, hostRef);
|
92 | }
|
93 | static get style() { return "ad-nav-item{display:block;margin-bottom:.5rem}ad-nav-item a{border-left:.25rem solid transparent;color:var(--anj-highlight-dark);display:block;padding-left:1rem;text-decoration:none;text-transform:capitalize;-webkit-transition:border-color .2s ease,color .2s ease;transition:border-color .2s ease,color .2s ease}ad-nav-item a.active,ad-nav-item a:focus,ad-nav-item a:hover{color:var(--anj-primary);text-decoration:none}ad-nav-item a.active{border-left:.25rem solid var(--anj-primary)}"; }
|
94 | };
|
95 |
|
96 | const NavToggle = class {
|
97 | constructor(hostRef) {
|
98 | registerInstance(this, hostRef);
|
99 | }
|
100 | render() {
|
101 | return (h("button", { class: "ad-nav-toggle", type: "button" }, h("svg", { "aria-label": "Menu", xmlns: "http://www.w3.org/2000/svg", width: "36", height: "36", viewBox: "0 0 36 36" }, h("path", { fill: "currentColor", d: "M4 27h28v-3H4v3zm0-8h28v-3H4v3zM4 8v3h28V8H4z" }))));
|
102 | }
|
103 | static get style() { return "ad-nav-toggle .ad-nav-toggle{background-color:transparent;border:0;color:var(--anj-border);margin-left:-3px;margin-right:.75rem;padding:0;position:relative;top:-.25rem;-webkit-transition:color .2s ease;transition:color .2s ease}ad-nav-toggle .ad-nav-toggle:focus{outline:none}ad-nav-toggle[active] .ad-nav-toggle{color:var(--anj-secondary)}ad-nav-toggle[disabled]{display:none!important}\@media (min-width:768px){ad-nav-toggle{display:none}}"; }
|
104 | };
|
105 |
|
106 | export { App as ad_app, Container as ad_container, Footer as ad_footer, FrameworkSwitcher as ad_framework_switcher, Header as ad_header, Nav as ad_nav, NavItem as ad_nav_item, NavToggle as ad_nav_toggle };
|