@xplortech/apollo-core 1.0.0-beta.4 → 1.0.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/apollo-core/apollo-core.css +5841 -9
- package/dist/apollo-core/apollo-core.esm.js +125 -1
- package/dist/apollo-core/app-globals-0f993ce5.js +3 -0
- package/dist/apollo-core/css-shim-bbdf0cc6.js +4 -0
- package/dist/apollo-core/dom-1f98a75f.js +73 -0
- package/dist/apollo-core/index-5b4a209e.js +2938 -0
- package/dist/apollo-core/index-912d1a21.js +584 -0
- package/dist/apollo-core/index.esm.js +1 -0
- package/dist/apollo-core/p-25f84d39.entry.js +1 -0
- package/dist/apollo-core/{p-13e7d3ea.entry.js → p-50eb8239.entry.js} +1 -1
- package/dist/apollo-core/regular-133c23b5.js +16052 -0
- package/dist/apollo-core/shadow-css-67b66845.js +389 -0
- package/dist/apollo-core/xpl-application-shell.entry.js +60 -0
- package/dist/apollo-core/xpl-avatar.entry.js +19 -0
- package/dist/apollo-core/xpl-backdrop.entry.js +21 -0
- package/dist/apollo-core/xpl-badge.entry.js +17 -0
- package/dist/apollo-core/xpl-breadcrumb-item.entry.js +17 -0
- package/dist/apollo-core/xpl-breadcrumbs.entry.js +12 -0
- package/dist/apollo-core/xpl-button-row.entry.js +18 -0
- package/dist/apollo-core/xpl-button.entry.js +60 -0
- package/dist/apollo-core/xpl-checkbox.entry.js +25 -0
- package/dist/apollo-core/xpl-choicelist.entry.js +39 -0
- package/dist/apollo-core/xpl-content-area.entry.js +16 -0
- package/dist/apollo-core/xpl-divider.entry.js +14 -0
- package/dist/apollo-core/xpl-dropdown-group.entry.js +31 -0
- package/dist/apollo-core/xpl-dropdown-heading.entry.js +12 -0
- package/dist/apollo-core/xpl-dropdown-option.entry.js +61 -0
- package/dist/apollo-core/xpl-dropdown.entry.js +104 -0
- package/dist/apollo-core/xpl-grid-item.entry.js +21 -0
- package/dist/apollo-core/xpl-grid.entry.js +31 -0
- package/dist/apollo-core/xpl-input.entry.js +2547 -0
- package/dist/apollo-core/xpl-list.entry.js +57 -0
- package/dist/apollo-core/xpl-main-nav.entry.js +26 -0
- package/dist/apollo-core/xpl-nav-item.entry.js +26 -0
- package/dist/apollo-core/xpl-pagination.entry.js +72 -0
- package/dist/apollo-core/xpl-radio.entry.js +25 -0
- package/dist/apollo-core/xpl-secondary-nav.entry.js +12 -0
- package/dist/apollo-core/xpl-select.entry.js +662 -0
- package/dist/apollo-core/xpl-table.entry.js +91 -0
- package/dist/apollo-core/xpl-tag.entry.js +17 -0
- package/dist/apollo-core/xpl-toggle.entry.js +30 -0
- package/dist/apollo-core/xpl-utility-bar.entry.js +27 -0
- package/dist/cjs/apollo-core.cjs.js +112 -4
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/css-shim-a7379e2b.js +6 -0
- package/dist/cjs/dom-3e7d9c3b.js +75 -0
- package/dist/cjs/index-318d5fc7.js +586 -0
- package/dist/cjs/index-88e58962.js +2975 -0
- package/dist/cjs/index.cjs.js +1 -0
- package/dist/cjs/loader.cjs.js +18 -2
- package/dist/cjs/regular-503465f4.js +16054 -0
- package/dist/cjs/shadow-css-09555044.js +391 -0
- package/dist/cjs/xpl-application-shell.cjs.entry.js +8 -2
- package/dist/cjs/xpl-avatar.cjs.entry.js +23 -0
- package/dist/cjs/xpl-avatar_12.cjs.entry.js +6 -0
- package/dist/cjs/xpl-backdrop.cjs.entry.js +1 -1
- package/dist/cjs/xpl-badge.cjs.entry.js +21 -0
- package/dist/cjs/xpl-breadcrumb-item.cjs.entry.js +21 -0
- package/dist/cjs/xpl-breadcrumbs.cjs.entry.js +16 -0
- package/dist/cjs/xpl-button-row.cjs.entry.js +1 -1
- package/dist/cjs/xpl-button.cjs.entry.js +64 -0
- package/dist/cjs/xpl-checkbox.cjs.entry.js +29 -0
- package/dist/cjs/xpl-choicelist.cjs.entry.js +1 -1
- package/dist/cjs/xpl-content-area.cjs.entry.js +20 -0
- package/dist/cjs/xpl-divider.cjs.entry.js +1 -1
- package/dist/cjs/xpl-dropdown-group.cjs.entry.js +35 -0
- package/dist/cjs/xpl-dropdown-heading.cjs.entry.js +16 -0
- package/dist/cjs/xpl-dropdown-option.cjs.entry.js +65 -0
- package/dist/cjs/xpl-dropdown.cjs.entry.js +108 -0
- package/dist/cjs/xpl-grid-item.cjs.entry.js +1 -1
- package/dist/cjs/xpl-grid.cjs.entry.js +1 -1
- package/dist/cjs/xpl-input.cjs.entry.js +21 -4
- package/dist/cjs/xpl-list.cjs.entry.js +2 -2
- package/dist/cjs/xpl-main-nav.cjs.entry.js +1 -1
- package/dist/cjs/xpl-nav-item.cjs.entry.js +30 -0
- package/dist/cjs/xpl-pagination.cjs.entry.js +1 -1
- package/dist/cjs/xpl-radio.cjs.entry.js +29 -0
- package/dist/cjs/xpl-secondary-nav.cjs.entry.js +16 -0
- package/dist/cjs/xpl-select.cjs.entry.js +44 -3
- package/dist/cjs/xpl-table.cjs.entry.js +95 -0
- package/dist/cjs/xpl-tag.cjs.entry.js +21 -0
- package/dist/cjs/xpl-toggle.cjs.entry.js +3 -3
- package/dist/cjs/xpl-utility-bar.cjs.entry.js +31 -0
- package/dist/collection/components/xpl-application-shell/xpl-application-shell.js +31 -2
- package/dist/collection/components/xpl-utility-bar/xpl-utility-bar.js +27 -1
- package/dist/custom-elements/index.js +599 -4
- package/dist/esm/apollo-core.js +112 -4
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/css-shim-bbdf0cc6.js +4 -0
- package/dist/esm/dom-1f98a75f.js +73 -0
- package/dist/esm/index-5b4a209e.js +2938 -0
- package/dist/esm/index-912d1a21.js +584 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +18 -2
- package/dist/esm/regular-133c23b5.js +16052 -0
- package/dist/esm/shadow-css-67b66845.js +389 -0
- package/dist/esm/xpl-application-shell.entry.js +8 -2
- package/dist/esm/xpl-avatar.entry.js +19 -0
- package/dist/esm/xpl-avatar_12.entry.js +6 -0
- package/dist/esm/xpl-backdrop.entry.js +1 -1
- package/dist/esm/xpl-badge.entry.js +17 -0
- package/dist/esm/xpl-breadcrumb-item.entry.js +17 -0
- package/dist/esm/xpl-breadcrumbs.entry.js +12 -0
- package/dist/esm/xpl-button-row.entry.js +1 -1
- package/dist/esm/xpl-button.entry.js +60 -0
- package/dist/esm/xpl-checkbox.entry.js +25 -0
- package/dist/esm/xpl-choicelist.entry.js +1 -1
- package/dist/esm/xpl-content-area.entry.js +16 -0
- package/dist/esm/xpl-divider.entry.js +1 -1
- package/dist/esm/xpl-dropdown-group.entry.js +31 -0
- package/dist/esm/xpl-dropdown-heading.entry.js +12 -0
- package/dist/esm/xpl-dropdown-option.entry.js +61 -0
- package/dist/esm/xpl-dropdown.entry.js +104 -0
- package/dist/esm/xpl-grid-item.entry.js +1 -1
- package/dist/esm/xpl-grid.entry.js +1 -1
- package/dist/esm/xpl-input.entry.js +20 -3
- package/dist/esm/xpl-list.entry.js +2 -2
- package/dist/esm/xpl-main-nav.entry.js +1 -1
- package/dist/esm/xpl-nav-item.entry.js +26 -0
- package/dist/esm/xpl-pagination.entry.js +1 -1
- package/dist/esm/xpl-radio.entry.js +25 -0
- package/dist/esm/xpl-secondary-nav.entry.js +12 -0
- package/dist/esm/xpl-select.entry.js +43 -2
- package/dist/esm/xpl-table.entry.js +91 -0
- package/dist/esm/xpl-tag.entry.js +17 -0
- package/dist/esm/xpl-toggle.entry.js +2 -2
- package/dist/esm/xpl-utility-bar.entry.js +27 -0
- package/dist/stories/application-shell.stories.js +17 -8
- package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/application-shell.stories.d.ts +14 -5
- package/dist/types/components/xpl-application-shell/xpl-application-shell.d.ts +6 -1
- package/dist/types/components/xpl-utility-bar/xpl-utility-bar.d.ts +5 -0
- package/dist/types/components.d.ts +18 -0
- package/package.json +1 -1
- package/dist/apollo-core/p-97bdb450.entry.js +0 -1
- /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/avatar.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/backdrop.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/badge.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/breadcrumbs.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/button-row.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/button.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/checkbox.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/choicelist.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/content-area.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/divider.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/dropdown.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/grid.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/input.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/list.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/main-nav.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/pagination.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/radio.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/secondary-nav.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/select.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/table.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/tabs.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/toggle.stories.d.ts +0 -0
- /package/dist/types/Users/{fernandogelin/Projects/apollo-admin/packages → roc/Sites}/apollo/.stencil/stories/utility-bar.stories.d.ts +0 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { h, F as Fragment, r as registerInstance, e as Host } from './index-5b4a209e.js';
|
|
2
|
+
import './regular-133c23b5.js';
|
|
3
|
+
|
|
4
|
+
const ListItemCpt = ({ avatar, avatars, badges, href, title, subtext, metadata, }) => {
|
|
5
|
+
const hasRight = avatars || badges || subtext;
|
|
6
|
+
const inner = (h(Fragment, null, avatar &&
|
|
7
|
+
(avatar.slice(0, 1) === '/' || avatar.slice(0, 4) === 'http' ? (h("xpl-avatar", { src: avatar, name: title })) : (h("xpl-avatar", { name: title }, avatar))), h("div", { class: "xpl-list-item-content" }, h("div", { class: "xpl-list-left" }, h("div", null, h("h4", null, title), metadata && (h("ul", { class: "xpl-list-item-metadata" }, metadata.map((d) => {
|
|
8
|
+
if (typeof d === 'string') {
|
|
9
|
+
return h("li", null, d);
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
return (h("li", null, h("span", { class: `far fa-${d.icon}` }), ' ', d.text));
|
|
13
|
+
}
|
|
14
|
+
}))))), hasRight && (h("div", { class: "xpl-list-right" }, subtext && (h("div", { class: "xpl-list-item-subtext" }, subtext)), avatars && (h("div", { class: "xpl-avatar-group xpl-avatar-group--s" }, avatars.map((a) => (h("img", { src: a, alt: "" }))))), badges &&
|
|
15
|
+
badges.map((b) => {
|
|
16
|
+
if (typeof b === 'string') {
|
|
17
|
+
return h("xpl-badge", null, b);
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
return (h("xpl-badge", { dot: b.dot, variant: b.variant }, b.text));
|
|
21
|
+
}
|
|
22
|
+
}))))));
|
|
23
|
+
return href ? (h("a", { class: "xpl-list-item", href: href }, inner)) : (h("div", { class: "xpl-list-item" }, inner));
|
|
24
|
+
};
|
|
25
|
+
const XplList = class {
|
|
26
|
+
constructor(hostRef) {
|
|
27
|
+
registerInstance(this, hostRef);
|
|
28
|
+
/**
|
|
29
|
+
* `items` should be an array of objects with the following signature:
|
|
30
|
+
* {
|
|
31
|
+
* avatar?: string; // The URL of the avatar, or the placeholder initials (ex. "SPD").
|
|
32
|
+
* avatars?: string[]; // The URLs of multiple avatars to be displayed in a group on the right.
|
|
33
|
+
* badges?: string[] | { // An array of strings or badge-like objects to be displayed as badges
|
|
34
|
+
* dot?: boolean; // in a group on the right. See <xpl-badge> for more details.
|
|
35
|
+
* text: string;
|
|
36
|
+
* variant?: string;
|
|
37
|
+
* }[];
|
|
38
|
+
* href?: string; // A URL, if this list item is meant to link somewhere.
|
|
39
|
+
* title: string; // The text to be displayed for the list item.
|
|
40
|
+
* metadata?: string[] | { // An array of strings or strings with icons (reference the allowed
|
|
41
|
+
* icon: string; // Font Awesome icons) to be displayed as metadata below the title.
|
|
42
|
+
* text: string;
|
|
43
|
+
* }[];
|
|
44
|
+
* subtext?: string; // Subtext to be displayed on the right.
|
|
45
|
+
* }
|
|
46
|
+
*
|
|
47
|
+
* - Note that you should *only use one of* `avatars`, `badges`, or `subtext`, to avoid cluttering
|
|
48
|
+
* the right-hand side of the list item.
|
|
49
|
+
*/
|
|
50
|
+
this.items = [];
|
|
51
|
+
}
|
|
52
|
+
render() {
|
|
53
|
+
return (h(Host, null, this.items.map((item) => (h(ListItemCpt, Object.assign({}, item))))));
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export { XplList as xpl_list };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { r as registerInstance, f as createEvent, h, e as Host } from './index-5b4a209e.js';
|
|
2
|
+
|
|
3
|
+
const XplMainNav = class {
|
|
4
|
+
constructor(hostRef) {
|
|
5
|
+
registerInstance(this, hostRef);
|
|
6
|
+
this.navWidth = createEvent(this, "navWidth", 7);
|
|
7
|
+
/**
|
|
8
|
+
* @property {string} width - The width of the Main Nav.
|
|
9
|
+
*/
|
|
10
|
+
this.width = 'default';
|
|
11
|
+
}
|
|
12
|
+
navWidthHandler() {
|
|
13
|
+
this.navWidth.emit(this.width);
|
|
14
|
+
}
|
|
15
|
+
connectedCallback() {
|
|
16
|
+
this.navWidthHandler();
|
|
17
|
+
}
|
|
18
|
+
componentDidUpdate() {
|
|
19
|
+
this.navWidthHandler();
|
|
20
|
+
}
|
|
21
|
+
render() {
|
|
22
|
+
return (h(Host, { class: `xpl-main-nav xpl-main-nav--${this.width}`, "aria-label": "Sidebar" }, h("nav", null, h("header", { "aria-label": "Sidebar Header" }, h("slot", { name: "logo" }), h("slot", { name: "brand-name" })), h("div", { class: "xpl-main-nav__main_section" }, h("slot", { name: "navigation" })), h("footer", { class: "xpl-main-nav__footer", "aria-label": "Sidebar Footer" }, h("slot", { name: "footer" })))));
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export { XplMainNav as xpl_main_nav };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { r as registerInstance, f as createEvent, h, e as Host } from './index-5b4a209e.js';
|
|
2
|
+
|
|
3
|
+
const XplNavItem = class {
|
|
4
|
+
constructor(hostRef) {
|
|
5
|
+
registerInstance(this, hostRef);
|
|
6
|
+
this.navOpen = createEvent(this, "navOpen", 7);
|
|
7
|
+
/**
|
|
8
|
+
* @property {boolean} - Whether or not the item should control the main nav state on click
|
|
9
|
+
*/
|
|
10
|
+
this.navControl = false;
|
|
11
|
+
}
|
|
12
|
+
onNavToggle() {
|
|
13
|
+
if (window.innerWidth <= 640) {
|
|
14
|
+
this.navOpen.emit(false);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
render() {
|
|
18
|
+
return (h(Host, { class: "xpl-nav-item", role: "listitem", onClick: () => {
|
|
19
|
+
if (this.navControl) {
|
|
20
|
+
this.onNavToggle();
|
|
21
|
+
}
|
|
22
|
+
} }, h("slot", { name: "link" }, h("slot", { name: "icon" }), h("slot", null))));
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export { XplNavItem as xpl_nav_item };
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { r as registerInstance, f as createEvent, h, e as Host } from './index-5b4a209e.js';
|
|
2
|
+
|
|
3
|
+
const XplPagination = class {
|
|
4
|
+
constructor(hostRef) {
|
|
5
|
+
registerInstance(this, hostRef);
|
|
6
|
+
this.page = createEvent(this, "page", 7);
|
|
7
|
+
this.current = 1;
|
|
8
|
+
/**
|
|
9
|
+
* Private `_goto` method respects the `waitForCallback` prop --
|
|
10
|
+
* it will always emit the `page` event, but won't actually update
|
|
11
|
+
* the state of what the current page is, leaving that to the caller
|
|
12
|
+
* to update once (presumably) some other data has loaded.
|
|
13
|
+
*/
|
|
14
|
+
this._goto = (n) => {
|
|
15
|
+
this.page.emit(n);
|
|
16
|
+
if (!this.waitForCallback) {
|
|
17
|
+
this.current = n;
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
this.goPrev = () => {
|
|
21
|
+
if (this.current > 1)
|
|
22
|
+
this._goto(this.current - 1);
|
|
23
|
+
};
|
|
24
|
+
this.goNext = () => {
|
|
25
|
+
const numPages = Math.ceil(this.total / this.perPage);
|
|
26
|
+
if (this.current < numPages)
|
|
27
|
+
this._goto(this.current + 1);
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Calling `goto` with a page number (which should probably be
|
|
32
|
+
* taken from the `page` event) updates the pagination's state
|
|
33
|
+
* and re-renders it, showing the appropriate buttons given the current page.
|
|
34
|
+
* @param n
|
|
35
|
+
*/
|
|
36
|
+
async goto(n) {
|
|
37
|
+
this.current = n;
|
|
38
|
+
}
|
|
39
|
+
render() {
|
|
40
|
+
const numPages = Math.ceil(this.total / this.perPage);
|
|
41
|
+
let showing = [1];
|
|
42
|
+
if (numPages < 7)
|
|
43
|
+
showing = [1, 2, 3, 4, 5, 6];
|
|
44
|
+
if (this.current <= 3 || this.current >= numPages - 2) {
|
|
45
|
+
showing = [1, 2, 3, '...', numPages - 2, numPages - 1, numPages];
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
showing = [
|
|
49
|
+
1,
|
|
50
|
+
'...',
|
|
51
|
+
this.current - 1,
|
|
52
|
+
this.current,
|
|
53
|
+
this.current + 1,
|
|
54
|
+
'...',
|
|
55
|
+
numPages,
|
|
56
|
+
];
|
|
57
|
+
}
|
|
58
|
+
const showingFirst = (this.current - 1) * this.perPage + 1;
|
|
59
|
+
const showingLast = Math.min(showingFirst + this.perPage - 1, this.total);
|
|
60
|
+
return (h(Host, null, h("div", { class: "xpl-pagination" }, h("div", null, h("p", null, "Showing ", h("span", null, showingFirst), " to", ' ', h("span", null, showingLast), " of", ' ', h("span", null, this.total), " results")), h("div", null, h("nav", { "aria-label": "Pagination" }, h("button", { onClick: this.goPrev, class: "xpl-pagination-prev" }, h("span", null, "Previous"), h("svg", { viewBox: "0 0 20 20", "aria-hidden": "true" }, h("path", { "fill-rule": "evenodd", d: "M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z", "clip-rule": "evenodd" }))), showing.map((n) => {
|
|
61
|
+
if (n === '...') {
|
|
62
|
+
return (h("span", { class: "xpl-pagination-ellipsis" }, "..."));
|
|
63
|
+
}
|
|
64
|
+
if (n === this.current) {
|
|
65
|
+
return (h("button", { "aria-current": "page", class: "xpl-pagination-current" }, n));
|
|
66
|
+
}
|
|
67
|
+
return (h("button", { onClick: () => this._goto(n) }, n));
|
|
68
|
+
}), h("button", { onClick: this.goNext, class: "xpl-pagination-next" }, h("span", null, "Next"), h("svg", { viewBox: "0 0 20 20", "aria-hidden": "true" }, h("path", { "fill-rule": "evenodd", d: "M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z", "clip-rule": "evenodd" }))))))));
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export { XplPagination as xpl_pagination };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { r as registerInstance, f as createEvent, h, e as Host } from './index-5b4a209e.js';
|
|
2
|
+
import { v as v4 } from './index-912d1a21.js';
|
|
3
|
+
|
|
4
|
+
const XplRadio = class {
|
|
5
|
+
constructor(hostRef) {
|
|
6
|
+
registerInstance(this, hostRef);
|
|
7
|
+
this.radioChange = createEvent(this, "radioChange", 7);
|
|
8
|
+
this.id = v4();
|
|
9
|
+
}
|
|
10
|
+
render() {
|
|
11
|
+
return (h(Host, { class: {
|
|
12
|
+
'xpl-checkbox-radio-container': true,
|
|
13
|
+
styled: this.styled,
|
|
14
|
+
disabled: this.disabled,
|
|
15
|
+
} }, h("input", { class: "xpl-radio", type: "radio", checked: this.checked, disabled: this.disabled, id: this.id, name: this.name, required: this.required, value: this.value, onChange: () => this.radioChange.emit(true) }), h("label", { class: {
|
|
16
|
+
'xpl-label': true,
|
|
17
|
+
'xpl-label--disabled': this.disabled,
|
|
18
|
+
}, htmlFor: this.id }, h("slot", null), this.description && (h("small", { class: {
|
|
19
|
+
'xpl-description': true,
|
|
20
|
+
'xpl-description--disabled': this.disabled,
|
|
21
|
+
} }, this.description)))));
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export { XplRadio as xpl_radio };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { r as registerInstance, h, e as Host } from './index-5b4a209e.js';
|
|
2
|
+
|
|
3
|
+
const XplSecondaryNav = class {
|
|
4
|
+
constructor(hostRef) {
|
|
5
|
+
registerInstance(this, hostRef);
|
|
6
|
+
}
|
|
7
|
+
render() {
|
|
8
|
+
return (h(Host, { class: "xpl-secondary-nav" }, h("nav", { "aria-label": "Secondary Nav" }, h("slot", null))));
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export { XplSecondaryNav as xpl_secondary_nav };
|