@xplortech/apollo-core 0.5.2 → 1.0.0-beta.0
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/build/style.css +758 -383
- package/dist/apollo-core/apollo-core.css +4 -4
- package/dist/apollo-core/apollo-core.esm.js +1 -1
- package/dist/apollo-core/{p-5854d1e4.entry.js → p-09b2f746.entry.js} +1 -1
- package/dist/apollo-core/p-0bc956c6.entry.js +1 -0
- package/dist/apollo-core/p-1b1e7207.entry.js +1 -0
- package/dist/apollo-core/{p-f167aa05.entry.js → p-20389bb6.entry.js} +1 -1
- package/dist/apollo-core/{p-ee2f4422.entry.js → p-25983fde.entry.js} +1 -1
- package/dist/apollo-core/{p-128a0240.entry.js → p-4a348764.entry.js} +1 -1
- package/dist/apollo-core/{p-eb63b401.entry.js → p-4e2b69e8.entry.js} +1 -1
- package/dist/apollo-core/{p-97cd1f73.entry.js → p-84bf6b2d.entry.js} +1 -1
- package/dist/apollo-core/{p-611536d8.entry.js → p-880c0359.entry.js} +1 -1
- package/dist/apollo-core/p-8e47a5be.entry.js +1 -0
- package/dist/apollo-core/p-93958292.entry.js +1 -0
- package/dist/apollo-core/p-93c27db5.entry.js +1 -0
- package/dist/apollo-core/{p-0b2c612e.entry.js → p-b2327e2c.entry.js} +1 -1
- package/dist/apollo-core/p-c55b5d9c.entry.js +1 -0
- package/dist/apollo-core/p-e369d7af.entry.js +1 -0
- package/dist/apollo-core/p-e60ecaef.entry.js +1 -0
- package/dist/apollo-core/p-f929c958.js +1 -0
- package/dist/cjs/apollo-core.cjs.js +2 -2
- package/dist/cjs/{index-944adb2e.js → index-54ba5804.js} +14 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/xpl-application-shell.cjs.entry.js +58 -0
- package/dist/cjs/xpl-avatar_12.cjs.entry.js +299 -0
- package/dist/cjs/xpl-backdrop.cjs.entry.js +25 -0
- package/dist/cjs/xpl-button-row.cjs.entry.js +2 -4
- package/dist/cjs/xpl-choicelist.cjs.entry.js +21 -14
- package/dist/cjs/xpl-divider.cjs.entry.js +2 -2
- package/dist/cjs/xpl-dropdown-group_3.cjs.entry.js +104 -0
- package/dist/cjs/xpl-dropdown_2.cjs.entry.js +123 -0
- package/dist/cjs/xpl-grid-item.cjs.entry.js +2 -2
- package/dist/cjs/xpl-grid.cjs.entry.js +12 -12
- package/dist/cjs/xpl-input.cjs.entry.js +33 -26
- package/dist/cjs/xpl-list.cjs.entry.js +17 -19
- package/dist/cjs/xpl-main-nav.cjs.entry.js +30 -0
- package/dist/cjs/xpl-pagination.cjs.entry.js +8 -8
- package/dist/cjs/xpl-select.cjs.entry.js +87 -85
- package/dist/cjs/xpl-toggle.cjs.entry.js +13 -13
- package/dist/collection/collection-manifest.json +4 -0
- package/dist/collection/components/xpl-application-shell/xpl-application-shell.js +11 -7
- package/dist/collection/components/xpl-avatar/xpl-avatar.js +7 -7
- package/dist/collection/components/xpl-backdrop/xpl-backdrop.js +1 -1
- package/dist/collection/components/xpl-badge/xpl-badge.js +5 -5
- package/dist/collection/components/xpl-breadcrumbs/xpl-breadcrumb-item/xpl-breadcrumb-item.js +0 -2
- package/dist/collection/components/xpl-breadcrumbs/xpl-breadcrumbs/xpl-breadcrumbs.js +0 -2
- package/dist/collection/components/xpl-button/xpl-button.js +79 -82
- package/dist/collection/components/xpl-button-row/xpl-button-row.js +7 -9
- package/dist/collection/components/xpl-checkbox/xpl-checkbox.js +11 -11
- package/dist/collection/components/xpl-choicelist/xpl-choicelist.js +22 -15
- package/dist/collection/components/xpl-content-area/xpl-content-area.js +5 -5
- package/dist/collection/components/xpl-divider/xpl-divider.js +1 -1
- package/dist/collection/components/xpl-dropdown/xpl-dropdown-group/xpl-dropdown-group.js +66 -0
- package/dist/collection/components/xpl-dropdown/xpl-dropdown-heading/xpl-dropdown-heading.js +27 -0
- package/dist/collection/components/xpl-dropdown/xpl-dropdown-option/xpl-dropdown-option.js +110 -0
- package/dist/collection/components/xpl-dropdown/xpl-dropdown.js +259 -31
- package/dist/collection/components/xpl-grid/xpl-grid.js +11 -11
- package/dist/collection/components/xpl-grid-item/xpl-grid-item.js +1 -1
- package/dist/collection/components/xpl-input/xpl-input.js +49 -42
- package/dist/collection/components/xpl-list/xpl-list.js +24 -26
- package/dist/collection/components/xpl-main-nav/xpl-main-nav.js +3 -3
- package/dist/collection/components/xpl-nav-item/xpl-nav-item.js +59 -2
- package/dist/collection/components/xpl-pagination/xpl-pagination.js +11 -10
- package/dist/collection/components/xpl-radio/xpl-radio.js +11 -11
- package/dist/collection/components/xpl-select/xpl-select.js +97 -64
- package/dist/collection/components/xpl-table/xpl-table.js +18 -12
- package/dist/collection/components/xpl-toggle/xpl-toggle.js +16 -16
- package/dist/collection/components/xpl-utility-bar/xpl-utility-bar.js +4 -8
- package/dist/custom-elements/index.d.ts +24 -0
- package/dist/custom-elements/index.js +18936 -18694
- package/dist/esm/apollo-core.js +2 -2
- package/dist/esm/{index-899dba3b.js → index-3df6db84.js} +14 -0
- package/dist/esm/loader.js +2 -2
- package/dist/esm/xpl-application-shell.entry.js +54 -0
- package/dist/esm/xpl-avatar_12.entry.js +284 -0
- package/dist/esm/xpl-backdrop.entry.js +21 -0
- package/dist/esm/xpl-button-row.entry.js +2 -4
- package/dist/esm/xpl-choicelist.entry.js +21 -14
- package/dist/esm/xpl-divider.entry.js +2 -2
- package/dist/esm/xpl-dropdown-group_3.entry.js +98 -0
- package/dist/esm/xpl-dropdown_2.entry.js +118 -0
- package/dist/esm/xpl-grid-item.entry.js +2 -2
- package/dist/esm/xpl-grid.entry.js +12 -12
- package/dist/esm/xpl-input.entry.js +33 -26
- package/dist/esm/xpl-list.entry.js +17 -19
- package/dist/esm/xpl-main-nav.entry.js +26 -0
- package/dist/esm/xpl-pagination.entry.js +8 -8
- package/dist/esm/xpl-select.entry.js +87 -85
- package/dist/esm/xpl-toggle.entry.js +13 -13
- package/dist/stories/application-shell.stories.js +31 -30
- package/dist/stories/avatar.stories.js +38 -38
- package/dist/stories/backdrop.stories.js +3 -3
- package/dist/stories/badge.stories.js +16 -16
- package/dist/stories/breadcrumbs.stories.js +18 -16
- package/dist/stories/button-row.stories.js +18 -14
- package/dist/stories/button.stories.js +69 -57
- package/dist/stories/checkbox.stories.js +21 -19
- package/dist/stories/choicelist.stories.js +19 -19
- package/dist/stories/content-area.stories.js +6 -6
- package/dist/stories/divider.stories.js +7 -7
- package/dist/stories/dropdown.stories.js +377 -0
- package/dist/stories/grid.stories.js +19 -19
- package/dist/stories/input.stories.js +93 -77
- package/dist/stories/list.stories.js +72 -52
- package/dist/stories/main-nav.stories.js +8 -8
- package/dist/stories/radio.stories.js +18 -16
- package/dist/stories/secondary-nav.stories.js +5 -5
- package/dist/stories/select.stories.js +54 -46
- package/dist/stories/table.stories.js +29 -29
- package/dist/stories/toggle.stories.js +30 -26
- package/dist/stories/utility-bar.stories.js +4 -4
- package/dist/types/Users/fernandogelin/Projects/apollo/.stencil/stories/application-shell.stories.d.ts +4 -4
- package/dist/types/Users/fernandogelin/Projects/apollo/.stencil/stories/avatar.stories.d.ts +1 -1
- package/dist/types/Users/fernandogelin/Projects/apollo/.stencil/stories/backdrop.stories.d.ts +1 -1
- package/dist/types/Users/fernandogelin/Projects/apollo/.stencil/stories/badge.stories.d.ts +1 -1
- package/dist/types/Users/fernandogelin/Projects/apollo/.stencil/stories/breadcrumbs.stories.d.ts +1 -1
- package/dist/types/Users/fernandogelin/Projects/apollo/.stencil/stories/button-row.stories.d.ts +1 -1
- package/dist/types/Users/fernandogelin/Projects/apollo/.stencil/stories/button.stories.d.ts +19 -10
- package/dist/types/Users/fernandogelin/Projects/apollo/.stencil/stories/checkbox.stories.d.ts +2 -2
- package/dist/types/Users/fernandogelin/Projects/apollo/.stencil/stories/choicelist.stories.d.ts +1 -1
- package/dist/types/Users/fernandogelin/Projects/apollo/.stencil/stories/content-area.stories.d.ts +1 -1
- package/dist/types/Users/fernandogelin/Projects/apollo/.stencil/stories/divider.stories.d.ts +1 -1
- package/dist/types/Users/fernandogelin/Projects/apollo/.stencil/stories/dropdown.stories.d.ts +134 -0
- package/dist/types/Users/fernandogelin/Projects/apollo/.stencil/stories/grid.stories.d.ts +1 -1
- package/dist/types/Users/fernandogelin/Projects/apollo/.stencil/stories/input.stories.d.ts +5 -5
- package/dist/types/Users/fernandogelin/Projects/apollo/.stencil/stories/list.stories.d.ts +1 -1
- package/dist/types/Users/fernandogelin/Projects/apollo/.stencil/stories/main-nav.stories.d.ts +1 -1
- package/dist/types/Users/fernandogelin/Projects/apollo/.stencil/stories/radio.stories.d.ts +1 -1
- package/dist/types/Users/fernandogelin/Projects/apollo/.stencil/stories/secondary-nav.stories.d.ts +1 -1
- package/dist/types/Users/fernandogelin/Projects/apollo/.stencil/stories/select.stories.d.ts +2 -2
- package/dist/types/Users/fernandogelin/Projects/apollo/.stencil/stories/table.stories.d.ts +1 -1
- package/dist/types/Users/fernandogelin/Projects/apollo/.stencil/stories/toggle.stories.d.ts +2 -2
- package/dist/types/components/xpl-application-shell/xpl-application-shell.d.ts +2 -2
- package/dist/types/components/xpl-avatar/xpl-avatar.d.ts +3 -3
- package/dist/types/components/xpl-badge/xpl-badge.d.ts +1 -1
- package/dist/types/components/xpl-button/xpl-button.d.ts +32 -8
- package/dist/types/components/xpl-button-row/xpl-button-row.d.ts +3 -3
- package/dist/types/components/xpl-checkbox/xpl-checkbox.d.ts +1 -1
- package/dist/types/components/xpl-content-area/xpl-content-area.d.ts +3 -3
- package/dist/types/components/xpl-dropdown/xpl-dropdown-group/xpl-dropdown-group.d.ts +7 -0
- package/dist/types/components/xpl-dropdown/xpl-dropdown-heading/xpl-dropdown-heading.d.ts +5 -0
- package/dist/types/components/xpl-input/xpl-input.d.ts +4 -4
- package/dist/types/components/xpl-list/xpl-list.d.ts +2 -2
- package/dist/types/components/xpl-main-nav/xpl-main-nav.d.ts +1 -1
- package/dist/types/components/xpl-nav-item/xpl-nav-item.d.ts +10 -0
- package/dist/types/components/xpl-pagination/xpl-pagination.d.ts +1 -1
- package/dist/types/components/xpl-radio/xpl-radio.d.ts +1 -1
- package/dist/types/components/xpl-select/xpl-select.d.ts +6 -2
- package/dist/types/components/xpl-table/xpl-table.d.ts +1 -1
- package/dist/types/components/xpl-toggle/xpl-toggle.d.ts +1 -1
- package/dist/types/components.d.ts +264 -40
- package/package.json +10 -4
- package/dist/apollo-core/p-0203d4e8.entry.js +0 -1
- package/dist/apollo-core/p-30003b15.entry.js +0 -1
- package/dist/apollo-core/p-4e56a2ca.entry.js +0 -1
- package/dist/apollo-core/p-7c9fee7e.entry.js +0 -1
- package/dist/apollo-core/p-8b6633c7.js +0 -1
- package/dist/apollo-core/p-9c5ca308.entry.js +0 -1
- package/dist/apollo-core/p-bd4a7e3c.entry.js +0 -1
- package/dist/apollo-core/p-dab8e7a1.entry.js +0 -1
- package/dist/cjs/xpl-application-shell_11.cjs.entry.js +0 -230
- package/dist/cjs/xpl-badge.cjs.entry.js +0 -21
- package/dist/cjs/xpl-checkbox_2.cjs.entry.js +0 -51
- package/dist/cjs/xpl-table.cjs.entry.js +0 -89
- package/dist/cjs/xpl-tag.cjs.entry.js +0 -21
- package/dist/esm/xpl-application-shell_11.entry.js +0 -216
- package/dist/esm/xpl-badge.entry.js +0 -17
- package/dist/esm/xpl-checkbox_2.entry.js +0 -46
- package/dist/esm/xpl-table.entry.js +0 -85
- package/dist/esm/xpl-tag.entry.js +0 -17
- package/dist/types/components/xpl-choicelist/choice.d.ts +0 -6
- package/dist/types/components/xpl-dropdown/dropdownchoice.d.ts +0 -6
- package/dist/types/components/xpl-dropdown/xpl-dropdown.d.ts +0 -10
- package/dist/types/components/xpl-list/listitem.d.ts +0 -16
package/dist/esm/apollo-core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-3df6db84.js';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
4
|
Stencil Client Patch Browser v2.8.0 | MIT Licensed | https://stenciljs.com
|
|
@@ -13,5 +13,5 @@ const patchBrowser = () => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
patchBrowser().then(options => {
|
|
16
|
-
return bootstrapLazy([["xpl-
|
|
16
|
+
return bootstrapLazy([["xpl-select",[[0,"xpl-select",{"choices":[16],"description":[1],"disabled":[4],"error":[1],"label":[1],"mode":[1],"placeholder":[1],"truncate":[4],"active":[32],"id":[32],"keepFocus":[32],"selected":[32],"value":[32],"displayValue":[32],"visibleChoices":[32]}]]],["xpl-application-shell",[[4,"xpl-application-shell",{"withSubnav":[4,"with-subnav"],"withUtility":[4,"with-utility"],"navWidth":[1,"nav-width"],"navOpen":[32]},[[0,"navOpen","navToggleHandler"],[0,"navWidth","navWithHandler"],[9,"resize","onWindowResize"]]]]],["xpl-avatar_12",[[4,"xpl-breadcrumb-item"],[4,"xpl-breadcrumbs"],[4,"xpl-content-area",{"size":[1]}],[4,"xpl-nav-item",{"navControl":[4,"nav-control"]}],[4,"xpl-secondary-nav"],[0,"xpl-table",{"columns":[16],"data":[16],"freeze":[4],"multiselect":[4],"striped":[4],"areAllSelected":[32],"rowData":[32],"hasScrolled":[32],"selected":[32]}],[4,"xpl-utility-bar",{"navControl":[4,"nav-control"],"open":[32]}],[4,"xpl-avatar",{"color":[1],"disabled":[4],"href":[1],"name":[1],"size":[1],"src":[1],"status":[1],"target":[1]}],[4,"xpl-badge",{"dot":[4],"variant":[1]}],[4,"xpl-button",{"disabled":[4],"link":[4],"iconOnly":[4,"icon-only"],"name":[1],"size":[1],"type":[1],"value":[1],"variant":[1],"state":[1]}],[4,"xpl-checkbox",{"checked":[4],"description":[1],"disabled":[4],"indeterminate":[4],"name":[1],"required":[4],"styled":[4],"value":[1],"id":[32]}],[4,"xpl-radio",{"checked":[4],"description":[1],"disabled":[4],"name":[1],"required":[4],"styled":[4],"value":[1],"id":[32]}]]],["xpl-choicelist",[[0,"xpl-choicelist",{"choices":[16],"description":[1],"heading":[1],"multi":[4],"name":[1],"styled":[4],"selected":[32]}]]],["xpl-list",[[0,"xpl-list",{"items":[16]}]]],["xpl-button-row",[[0,"xpl-button-row",{"primary":[1],"secondary":[1],"tertiary":[1]}]]],["xpl-divider",[[4,"xpl-divider",{"tier":[2]}]]],["xpl-grid",[[0,"xpl-grid"]]],["xpl-grid-item",[[4,"xpl-grid-item",{"xs":[2],"sm":[2],"md":[2],"lg":[2]}]]],["xpl-input",[[0,"xpl-input",{"_id":[1],"autocomplete":[1],"dateFormat":[1,"date-format"],"description":[1],"disabled":[4],"error":[1],"label":[1],"max":[8],"maxCharacterCount":[2,"max-character-count"],"min":[8],"mode":[1],"multiline":[4],"name":[1],"placeholder":[1],"post":[1],"pre":[1],"readonly":[4],"required":[4],"step":[2],"type":[1],"value":[1],"characterCount":[32],"passwordVisible":[32]}]]],["xpl-main-nav",[[4,"xpl-main-nav",{"width":[1]}]]],["xpl-pagination",[[0,"xpl-pagination",{"total":[2],"perPage":[2,"per-page"],"waitForCallback":[4,"wait-for-callback"],"current":[32],"goto":[64]}]]],["xpl-toggle",[[0,"xpl-toggle",{"checked":[4],"description":[1],"disabled":[4],"heading":[1],"label":[1],"name":[1],"variant":[1],"id":[32]}]]],["xpl-backdrop",[[0,"xpl-backdrop",{"relative":[4]}]]],["xpl-dropdown-group_3",[[4,"xpl-dropdown-group",{"groupName":[1,"label"],"options":[16]}],[4,"xpl-dropdown-heading",{"label":[1]}],[4,"xpl-dropdown-option",{"isDisabled":[516,"disabled"],"label":[1],"isSelected":[1540,"selected"]}]]],["xpl-dropdown_2",[[4,"xpl-dropdown",{"isOpen":[1540,"open"],"closeOnSelect":[4,"close-on-select"],"mode":[1],"options":[16],"selectOnFocus":[4,"select-on-focus"],"triggerId":[1,"trigger-id"],"update":[16],"handleSelect":[64]}],[4,"xpl-tag"]]]], options);
|
|
17
17
|
});
|
|
@@ -853,6 +853,10 @@ const renderVdom = (hostRef, renderFnResults) => {
|
|
|
853
853
|
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
854
854
|
const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
|
|
855
855
|
hostTagName = hostElm.tagName;
|
|
856
|
+
if (cmpMeta.$attrsToReflect$) {
|
|
857
|
+
rootVnode.$attrs$ = rootVnode.$attrs$ || {};
|
|
858
|
+
cmpMeta.$attrsToReflect$.map(([propName, attribute]) => (rootVnode.$attrs$[attribute] = hostElm[propName]));
|
|
859
|
+
}
|
|
856
860
|
rootVnode.$tag$ = null;
|
|
857
861
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
858
862
|
hostRef.$vnode$ = rootVnode;
|
|
@@ -1260,6 +1264,9 @@ const proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1260
1264
|
.map(([propName, m]) => {
|
|
1261
1265
|
const attrName = m[1] || propName;
|
|
1262
1266
|
attrNameToPropName.set(attrName, propName);
|
|
1267
|
+
if (m[0] & 512 /* ReflectAttr */) {
|
|
1268
|
+
cmpMeta.$attrsToReflect$.push([propName, attrName]);
|
|
1269
|
+
}
|
|
1263
1270
|
return attrName;
|
|
1264
1271
|
});
|
|
1265
1272
|
}
|
|
@@ -1403,12 +1410,16 @@ const setContentReference = (elm) => {
|
|
|
1403
1410
|
const disconnectedCallback = (elm) => {
|
|
1404
1411
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1405
1412
|
const hostRef = getHostRef(elm);
|
|
1413
|
+
const instance = hostRef.$lazyInstance$ ;
|
|
1406
1414
|
{
|
|
1407
1415
|
if (hostRef.$rmListeners$) {
|
|
1408
1416
|
hostRef.$rmListeners$.map((rmListener) => rmListener());
|
|
1409
1417
|
hostRef.$rmListeners$ = undefined;
|
|
1410
1418
|
}
|
|
1411
1419
|
}
|
|
1420
|
+
{
|
|
1421
|
+
safeCall(instance, 'disconnectedCallback');
|
|
1422
|
+
}
|
|
1412
1423
|
}
|
|
1413
1424
|
};
|
|
1414
1425
|
const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
@@ -1437,6 +1448,9 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1437
1448
|
{
|
|
1438
1449
|
cmpMeta.$listeners$ = compactMeta[3];
|
|
1439
1450
|
}
|
|
1451
|
+
{
|
|
1452
|
+
cmpMeta.$attrsToReflect$ = [];
|
|
1453
|
+
}
|
|
1440
1454
|
const tagName = cmpMeta.$tagName$;
|
|
1441
1455
|
const HostElement = class extends HTMLElement {
|
|
1442
1456
|
// StencilLazyHost
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-3df6db84.js';
|
|
2
2
|
|
|
3
3
|
/*
|
|
4
4
|
Stencil Client Patch Esm v2.8.0 | MIT Licensed | https://stenciljs.com
|
|
@@ -10,7 +10,7 @@ const patchEsm = () => {
|
|
|
10
10
|
const defineCustomElements = (win, options) => {
|
|
11
11
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
12
12
|
return patchEsm().then(() => {
|
|
13
|
-
return bootstrapLazy([["xpl-
|
|
13
|
+
return bootstrapLazy([["xpl-select",[[0,"xpl-select",{"choices":[16],"description":[1],"disabled":[4],"error":[1],"label":[1],"mode":[1],"placeholder":[1],"truncate":[4],"active":[32],"id":[32],"keepFocus":[32],"selected":[32],"value":[32],"displayValue":[32],"visibleChoices":[32]}]]],["xpl-application-shell",[[4,"xpl-application-shell",{"withSubnav":[4,"with-subnav"],"withUtility":[4,"with-utility"],"navWidth":[1,"nav-width"],"navOpen":[32]},[[0,"navOpen","navToggleHandler"],[0,"navWidth","navWithHandler"],[9,"resize","onWindowResize"]]]]],["xpl-avatar_12",[[4,"xpl-breadcrumb-item"],[4,"xpl-breadcrumbs"],[4,"xpl-content-area",{"size":[1]}],[4,"xpl-nav-item",{"navControl":[4,"nav-control"]}],[4,"xpl-secondary-nav"],[0,"xpl-table",{"columns":[16],"data":[16],"freeze":[4],"multiselect":[4],"striped":[4],"areAllSelected":[32],"rowData":[32],"hasScrolled":[32],"selected":[32]}],[4,"xpl-utility-bar",{"navControl":[4,"nav-control"],"open":[32]}],[4,"xpl-avatar",{"color":[1],"disabled":[4],"href":[1],"name":[1],"size":[1],"src":[1],"status":[1],"target":[1]}],[4,"xpl-badge",{"dot":[4],"variant":[1]}],[4,"xpl-button",{"disabled":[4],"link":[4],"iconOnly":[4,"icon-only"],"name":[1],"size":[1],"type":[1],"value":[1],"variant":[1],"state":[1]}],[4,"xpl-checkbox",{"checked":[4],"description":[1],"disabled":[4],"indeterminate":[4],"name":[1],"required":[4],"styled":[4],"value":[1],"id":[32]}],[4,"xpl-radio",{"checked":[4],"description":[1],"disabled":[4],"name":[1],"required":[4],"styled":[4],"value":[1],"id":[32]}]]],["xpl-choicelist",[[0,"xpl-choicelist",{"choices":[16],"description":[1],"heading":[1],"multi":[4],"name":[1],"styled":[4],"selected":[32]}]]],["xpl-list",[[0,"xpl-list",{"items":[16]}]]],["xpl-button-row",[[0,"xpl-button-row",{"primary":[1],"secondary":[1],"tertiary":[1]}]]],["xpl-divider",[[4,"xpl-divider",{"tier":[2]}]]],["xpl-grid",[[0,"xpl-grid"]]],["xpl-grid-item",[[4,"xpl-grid-item",{"xs":[2],"sm":[2],"md":[2],"lg":[2]}]]],["xpl-input",[[0,"xpl-input",{"_id":[1],"autocomplete":[1],"dateFormat":[1,"date-format"],"description":[1],"disabled":[4],"error":[1],"label":[1],"max":[8],"maxCharacterCount":[2,"max-character-count"],"min":[8],"mode":[1],"multiline":[4],"name":[1],"placeholder":[1],"post":[1],"pre":[1],"readonly":[4],"required":[4],"step":[2],"type":[1],"value":[1],"characterCount":[32],"passwordVisible":[32]}]]],["xpl-main-nav",[[4,"xpl-main-nav",{"width":[1]}]]],["xpl-pagination",[[0,"xpl-pagination",{"total":[2],"perPage":[2,"per-page"],"waitForCallback":[4,"wait-for-callback"],"current":[32],"goto":[64]}]]],["xpl-toggle",[[0,"xpl-toggle",{"checked":[4],"description":[1],"disabled":[4],"heading":[1],"label":[1],"name":[1],"variant":[1],"id":[32]}]]],["xpl-backdrop",[[0,"xpl-backdrop",{"relative":[4]}]]],["xpl-dropdown-group_3",[[4,"xpl-dropdown-group",{"groupName":[1,"label"],"options":[16]}],[4,"xpl-dropdown-heading",{"label":[1]}],[4,"xpl-dropdown-option",{"isDisabled":[516,"disabled"],"label":[1],"isSelected":[1540,"selected"]}]]],["xpl-dropdown_2",[[4,"xpl-dropdown",{"isOpen":[1540,"open"],"closeOnSelect":[4,"close-on-select"],"mode":[1],"options":[16],"selectOnFocus":[4,"select-on-focus"],"triggerId":[1,"trigger-id"],"update":[16],"handleSelect":[64]}],[4,"xpl-tag"]]]], options);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-3df6db84.js';
|
|
2
|
+
|
|
3
|
+
const XplApplicationShell = class {
|
|
4
|
+
constructor(hostRef) {
|
|
5
|
+
registerInstance(this, hostRef);
|
|
6
|
+
/**
|
|
7
|
+
* @property {boolean} - Whether or not the Grid should have space for a secondary (sub) navigation bar
|
|
8
|
+
*/
|
|
9
|
+
this.withSubnav = false;
|
|
10
|
+
/**
|
|
11
|
+
* @property {boolean} - Whether or not the Grid should have space for a utility bar
|
|
12
|
+
*/
|
|
13
|
+
this.withUtility = true;
|
|
14
|
+
/**
|
|
15
|
+
* @property {string} - The width of the main navigation bar, can be passed or updated when nav-width event is emitted.
|
|
16
|
+
*/
|
|
17
|
+
this.navWidth = 'default';
|
|
18
|
+
/**
|
|
19
|
+
* @state {boolean} - Whether or not the main nav is open, updates when the nav-open envent is emitted.
|
|
20
|
+
*/
|
|
21
|
+
this.navOpen = true;
|
|
22
|
+
}
|
|
23
|
+
closeNavOnMobile() {
|
|
24
|
+
if (window.innerWidth <= 640) {
|
|
25
|
+
this.navOpen = false;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
navToggleHandler() {
|
|
29
|
+
this.navOpen = !this.navOpen;
|
|
30
|
+
}
|
|
31
|
+
navWithHandler(event) {
|
|
32
|
+
this.navWidth = event.detail;
|
|
33
|
+
}
|
|
34
|
+
onWindowResize() {
|
|
35
|
+
this.closeNavOnMobile();
|
|
36
|
+
}
|
|
37
|
+
connectedCallback() {
|
|
38
|
+
this.closeNavOnMobile();
|
|
39
|
+
}
|
|
40
|
+
render() {
|
|
41
|
+
let applicationShellClasses = 'xpl-application-shell';
|
|
42
|
+
if (this.withUtility)
|
|
43
|
+
applicationShellClasses += ' xpl-application-shell--with_utility';
|
|
44
|
+
let navClasses = 'xpl-application-shell__nav';
|
|
45
|
+
navClasses += this.navOpen
|
|
46
|
+
? ` xpl-application-shell__nav--${this.navWidth}--open`
|
|
47
|
+
: ` xpl-application-shell__nav--${this.navWidth}`;
|
|
48
|
+
return (h(Host, { class: applicationShellClasses }, h("div", { class: navClasses }, h("slot", { name: "nav" })), h("div", { class: "xpl-application-shell__subnav" }, h("slot", { name: "subnav" })), h("div", { class: "xpl-application-shell__utility" }, h("slot", { name: "utility" })), h("div", { class: "xpl-application-shell__content" }, h("slot", { name: "content" })), h("xpl-backdrop", { onClick: () => this.navToggleHandler(), class: {
|
|
49
|
+
'xpl-application-shell__backdrop--open': this.navOpen,
|
|
50
|
+
}, relative: true })));
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export { XplApplicationShell as xpl_application_shell };
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
import { r as registerInstance, h, H as Host, c as createEvent } from './index-3df6db84.js';
|
|
2
|
+
import { v as v4 } from './v4-929670b7.js';
|
|
3
|
+
|
|
4
|
+
const XplAvatar = class {
|
|
5
|
+
constructor(hostRef) {
|
|
6
|
+
registerInstance(this, hostRef);
|
|
7
|
+
this.disabled = false;
|
|
8
|
+
}
|
|
9
|
+
render() {
|
|
10
|
+
let className = 'xpl-avatar';
|
|
11
|
+
if (this.size)
|
|
12
|
+
className += ` xpl-avatar--${this.size}`;
|
|
13
|
+
if (this.color)
|
|
14
|
+
className += ` xpl-avatar--${this.color}`;
|
|
15
|
+
const inner = (h("div", null, this.src ? (h("img", { alt: this.name, src: this.src })) : (h("div", { class: "xpl-avatar__placeholder" }, h("slot", null))), this.status && (h("div", { class: `xpl-avatar__dot--${this.status}` }))));
|
|
16
|
+
return (h(Host, null, this.href && !this.disabled ? (h("a", { href: this.href, class: className, target: this.target }, inner)) : this.href && this.disabled ? (h("div", { class: className + ' xpl-avatar--disabled' }, inner)) : (h("div", { class: className }, inner))));
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const XplBadge = class {
|
|
21
|
+
constructor(hostRef) {
|
|
22
|
+
registerInstance(this, hostRef);
|
|
23
|
+
}
|
|
24
|
+
render() {
|
|
25
|
+
let className = 'xpl-badge';
|
|
26
|
+
if (this.dot)
|
|
27
|
+
className += ' xpl-badge--dot';
|
|
28
|
+
if (this.variant)
|
|
29
|
+
className += ' xpl-badge--' + this.variant;
|
|
30
|
+
return (h(Host, null, h("div", { class: className }, h("slot", null))));
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const XplBreadcrumbItem = class {
|
|
35
|
+
constructor(hostRef) {
|
|
36
|
+
registerInstance(this, hostRef);
|
|
37
|
+
// This is temporary as we still don't have a xpl-icon component. When that's created we should update this code.
|
|
38
|
+
this.chevron = `<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="chevron-right" class="svg-inline--fa fa-chevron-right fa-w-10" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">
|
|
39
|
+
<path fill="currentColor" d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"></path>
|
|
40
|
+
</svg>
|
|
41
|
+
`;
|
|
42
|
+
}
|
|
43
|
+
render() {
|
|
44
|
+
return (h(Host, { class: "xpl-breadcrumb-item", role: "listitem" }, h("li", { role: "none" }, h("slot", null)), h("span", { innerHTML: `${this.chevron}` })));
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
const XplBreadcrumbs = class {
|
|
49
|
+
constructor(hostRef) {
|
|
50
|
+
registerInstance(this, hostRef);
|
|
51
|
+
}
|
|
52
|
+
render() {
|
|
53
|
+
return (h(Host, null, h("nav", { class: "xpl-breadcrumbs", "aria-label": "Breadcrumb" }, h("ol", { role: "list" }, h("slot", null)))));
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
const XplButton = class {
|
|
58
|
+
constructor(hostRef) {
|
|
59
|
+
registerInstance(this, hostRef);
|
|
60
|
+
/**
|
|
61
|
+
* @property {"default" | "sm" | "xs"} - button size
|
|
62
|
+
*/
|
|
63
|
+
this.size = 'default';
|
|
64
|
+
/**
|
|
65
|
+
* @property {"primary" | "secondary" | "subtle"} - button variant
|
|
66
|
+
*/
|
|
67
|
+
this.variant = 'primary';
|
|
68
|
+
/**
|
|
69
|
+
* @property {"neutral" | "warning" | "success"} - button state (color) neutral=purple, success=green, warning=red
|
|
70
|
+
*/
|
|
71
|
+
this.state = 'neutral';
|
|
72
|
+
}
|
|
73
|
+
render() {
|
|
74
|
+
let className = `xpl-button
|
|
75
|
+
xpl-button--${this.size}
|
|
76
|
+
xpl-button--${this.state}
|
|
77
|
+
xpl-button--${this.variant}`;
|
|
78
|
+
if (this.iconOnly)
|
|
79
|
+
className += ' xpl-button--icon-only';
|
|
80
|
+
if (this.link && this.disabled)
|
|
81
|
+
className += ' xpl-button--link-disabled';
|
|
82
|
+
return (h(Host, { class: className },
|
|
83
|
+
/**
|
|
84
|
+
* Conditionally render either an <slot> or <button> element
|
|
85
|
+
* depending on if there's an `link` or not
|
|
86
|
+
*/
|
|
87
|
+
this.link ? (h("slot", null)) : (h("button", { disabled: this.disabled, name: this.name, type: this.type, value: this.value }, h("slot", null)))));
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
const XplCheckbox = class {
|
|
92
|
+
constructor(hostRef) {
|
|
93
|
+
registerInstance(this, hostRef);
|
|
94
|
+
this.checkboxChange = createEvent(this, "checkboxChange", 7);
|
|
95
|
+
this.id = v4();
|
|
96
|
+
}
|
|
97
|
+
render() {
|
|
98
|
+
return (h(Host, { class: {
|
|
99
|
+
'xpl-checkbox-radio-container': true,
|
|
100
|
+
styled: this.styled,
|
|
101
|
+
disabled: this.disabled,
|
|
102
|
+
} }, h("input", { class: "xpl-checkbox", type: "checkbox", checked: this.checked, disabled: this.disabled, id: this.id, indeterminate: this.indeterminate, onChange: () => this.checkboxChange.emit(this.input.checked), name: this.name, ref: (el) => (this.input = el), required: this.required, value: this.value }), h("label", { class: {
|
|
103
|
+
'xpl-label': true,
|
|
104
|
+
'xpl-label--disabled': this.disabled,
|
|
105
|
+
}, htmlFor: this.id }, h("slot", null), this.description && (h("small", { class: {
|
|
106
|
+
'xpl-description': true,
|
|
107
|
+
'xpl-description--disabled': this.disabled,
|
|
108
|
+
} }, this.description)))));
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
const XplContentArea = class {
|
|
113
|
+
constructor(hostRef) {
|
|
114
|
+
registerInstance(this, hostRef);
|
|
115
|
+
/**
|
|
116
|
+
* @property {string} size - The content-area size.
|
|
117
|
+
*/
|
|
118
|
+
this.size = 'wide';
|
|
119
|
+
}
|
|
120
|
+
render() {
|
|
121
|
+
return (h(Host, null, h("main", { class: `xpl-content-area-wrapper xpl-content-area-wrapper__${this.size}` }, h("div", { class: "xpl-content-area" }, h("slot", null)))));
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
const XplNavItem = class {
|
|
126
|
+
constructor(hostRef) {
|
|
127
|
+
registerInstance(this, hostRef);
|
|
128
|
+
this.navOpen = createEvent(this, "navOpen", 7);
|
|
129
|
+
/**
|
|
130
|
+
* @property {boolean} - Whether or not the item should control the main nav state on click
|
|
131
|
+
*/
|
|
132
|
+
this.navControl = false;
|
|
133
|
+
}
|
|
134
|
+
onNavToggle() {
|
|
135
|
+
if (window.innerWidth <= 640) {
|
|
136
|
+
this.navOpen.emit(false);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
render() {
|
|
140
|
+
return (h(Host, { class: "xpl-nav-item", role: "listitem", onClick: () => {
|
|
141
|
+
if (this.navControl) {
|
|
142
|
+
this.onNavToggle();
|
|
143
|
+
}
|
|
144
|
+
} }, h("slot", { name: "link" }, h("slot", { name: "icon" }), h("slot", null))));
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
const XplRadio = class {
|
|
149
|
+
constructor(hostRef) {
|
|
150
|
+
registerInstance(this, hostRef);
|
|
151
|
+
this.radioChange = createEvent(this, "radioChange", 7);
|
|
152
|
+
this.id = v4();
|
|
153
|
+
}
|
|
154
|
+
render() {
|
|
155
|
+
return (h(Host, { class: {
|
|
156
|
+
'xpl-checkbox-radio-container': true,
|
|
157
|
+
styled: this.styled,
|
|
158
|
+
disabled: this.disabled,
|
|
159
|
+
} }, 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: {
|
|
160
|
+
'xpl-label': true,
|
|
161
|
+
'xpl-label--disabled': this.disabled,
|
|
162
|
+
}, htmlFor: this.id }, h("slot", null), this.description && (h("small", { class: {
|
|
163
|
+
'xpl-description': true,
|
|
164
|
+
'xpl-description--disabled': this.disabled,
|
|
165
|
+
} }, this.description)))));
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
const XplSecondaryNav = class {
|
|
170
|
+
constructor(hostRef) {
|
|
171
|
+
registerInstance(this, hostRef);
|
|
172
|
+
}
|
|
173
|
+
render() {
|
|
174
|
+
return (h(Host, { class: "xpl-secondary-nav" }, h("nav", { "aria-label": "Secondary Nav" }, h("slot", null))));
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
const XplTable = class {
|
|
179
|
+
constructor(hostRef) {
|
|
180
|
+
registerInstance(this, hostRef);
|
|
181
|
+
this.tableSelect = createEvent(this, "tableSelect", 7);
|
|
182
|
+
this.areAllSelected = false;
|
|
183
|
+
this.hasScrolled = false;
|
|
184
|
+
this.selectAll = (e) => {
|
|
185
|
+
const { target } = e;
|
|
186
|
+
if (!(target instanceof HTMLInputElement))
|
|
187
|
+
return;
|
|
188
|
+
const { checked } = target;
|
|
189
|
+
this.areAllSelected = checked;
|
|
190
|
+
this.selected = this.selected.map(() => checked);
|
|
191
|
+
this.onChange();
|
|
192
|
+
};
|
|
193
|
+
this.selectOne = (e, i) => {
|
|
194
|
+
const { target } = e;
|
|
195
|
+
if (!(target instanceof HTMLInputElement))
|
|
196
|
+
return;
|
|
197
|
+
const { checked } = target;
|
|
198
|
+
this.areAllSelected = false;
|
|
199
|
+
this.selected = this.selected.map((v, _i) => (_i === i ? checked : v));
|
|
200
|
+
this.onChange();
|
|
201
|
+
};
|
|
202
|
+
this.onChange = () => {
|
|
203
|
+
this.tableSelect.emit({
|
|
204
|
+
selected: this.selected,
|
|
205
|
+
areAllSelected: this.areAllSelected,
|
|
206
|
+
});
|
|
207
|
+
};
|
|
208
|
+
this.onScroll = () => {
|
|
209
|
+
this.hasScrolled = this.container.scrollLeft > 0;
|
|
210
|
+
};
|
|
211
|
+
/**
|
|
212
|
+
* TODO: Need to figure out how this interplays with data
|
|
213
|
+
* received from an API/server
|
|
214
|
+
*/
|
|
215
|
+
this.sortBy = (col, ascending = true) => {
|
|
216
|
+
this.rowData.sort((a, b) => {
|
|
217
|
+
const A = a[col];
|
|
218
|
+
const B = b[col];
|
|
219
|
+
if (typeof A === 'number' && typeof B === 'number') {
|
|
220
|
+
const f = ascending ? 1 : -1;
|
|
221
|
+
return A > B ? f : -f;
|
|
222
|
+
}
|
|
223
|
+
return -1;
|
|
224
|
+
});
|
|
225
|
+
this.rowData = Array.from(this.rowData);
|
|
226
|
+
this.render();
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
componentWillLoad() {
|
|
230
|
+
this.areAllSelected = false;
|
|
231
|
+
this.rowData = this.data !== undefined ? Array.from(this.data) : [];
|
|
232
|
+
this.selected = new Array(this.rowData.length).fill(false);
|
|
233
|
+
}
|
|
234
|
+
render() {
|
|
235
|
+
let className = 'xpl-table';
|
|
236
|
+
if (this.striped)
|
|
237
|
+
className += ' xpl-table--striped';
|
|
238
|
+
if (this.freeze)
|
|
239
|
+
className += ' xpl-table--freeze';
|
|
240
|
+
if (this.hasScrolled)
|
|
241
|
+
className += ' xpl-table--has-scrolled';
|
|
242
|
+
return (h(Host, null, h("div", { class: "xpl-table-container", onScroll: this.onScroll, ref: (el) => (this.container = el) }, h("table", { class: className }, this.columns && (h("thead", null, this.columns.map((column, i) => {
|
|
243
|
+
return (h("th", null, this.multiselect && i === 0 ? (h("label", { htmlFor: "__xpl-table-th" }, h("input", { checked: this.areAllSelected, id: "__xpl-table-th",
|
|
244
|
+
// appear indeterminate when at least one but not all
|
|
245
|
+
// are selected
|
|
246
|
+
indeterminate: !this
|
|
247
|
+
.areAllSelected &&
|
|
248
|
+
this.selected.some((a) => a), onChange: (e) => {
|
|
249
|
+
this.selectAll(e);
|
|
250
|
+
}, type: "checkbox" }), column)) : (column)));
|
|
251
|
+
}))), h("tbody", null, this.rowData.map((row, rowNum) => {
|
|
252
|
+
return (h("tr", { class: this.selected &&
|
|
253
|
+
this.selected[rowNum]
|
|
254
|
+
? 'xpl-table-row-selected'
|
|
255
|
+
: '' }, row.map((cell, i) => {
|
|
256
|
+
return (h("td", null, this.multiselect &&
|
|
257
|
+
i === 0 ? (h("label", { htmlFor: '__xpl-table-row-' +
|
|
258
|
+
rowNum }, h("input", { id: '__xpl-table-row-' +
|
|
259
|
+
rowNum, checked: this
|
|
260
|
+
.selected[rowNum], type: "checkbox", onChange: (e) => this.selectOne(e, rowNum) }), h("div", { innerHTML: cell }))) : (h("div", { innerHTML: cell }))));
|
|
261
|
+
})));
|
|
262
|
+
}))))));
|
|
263
|
+
}
|
|
264
|
+
};
|
|
265
|
+
|
|
266
|
+
const XplUtilityBar = class {
|
|
267
|
+
constructor(hostRef) {
|
|
268
|
+
registerInstance(this, hostRef);
|
|
269
|
+
this.navOpen = createEvent(this, "navOpen", 7);
|
|
270
|
+
this.open = true;
|
|
271
|
+
this.bars = `
|
|
272
|
+
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="bars" class="svg-inline--fa fa-bars fa-w-14 xpl-utility-nav__bars" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"></path></svg>
|
|
273
|
+
`;
|
|
274
|
+
}
|
|
275
|
+
onNavToggle() {
|
|
276
|
+
this.open = !this.open;
|
|
277
|
+
this.navOpen.emit(this.open);
|
|
278
|
+
}
|
|
279
|
+
render() {
|
|
280
|
+
return (h(Host, null, h("nav", { "aria-label": "utility navigation bar", class: "xpl-utility-bar" }, this.navControl ? (h("div", null, h("button", { onClick: () => this.onNavToggle(), innerHTML: `${this.bars}` }), h("slot", { name: "aside" }))) : (h("slot", { name: "aside" })), h("slot", { name: "main" }))));
|
|
281
|
+
}
|
|
282
|
+
};
|
|
283
|
+
|
|
284
|
+
export { XplAvatar as xpl_avatar, XplBadge as xpl_badge, XplBreadcrumbItem as xpl_breadcrumb_item, XplBreadcrumbs as xpl_breadcrumbs, XplButton as xpl_button, XplCheckbox as xpl_checkbox, XplContentArea as xpl_content_area, XplNavItem as xpl_nav_item, XplRadio as xpl_radio, XplSecondaryNav as xpl_secondary_nav, XplTable as xpl_table, XplUtilityBar as xpl_utility_bar };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-3df6db84.js';
|
|
2
|
+
|
|
3
|
+
const XplBackdrop = class {
|
|
4
|
+
constructor(hostRef) {
|
|
5
|
+
registerInstance(this, hostRef);
|
|
6
|
+
/**
|
|
7
|
+
* @property {boolean} - When true, backdrop will have relative position. This is useful when the backdrop doesn't cover the whole view area.
|
|
8
|
+
* If false, the position will be fixed and cover the whole view area.
|
|
9
|
+
*/
|
|
10
|
+
this.relative = false;
|
|
11
|
+
}
|
|
12
|
+
render() {
|
|
13
|
+
return (h(Host, { class: {
|
|
14
|
+
'xpl-backdrop': true,
|
|
15
|
+
'xpl-backdrop--fixed': !this.relative,
|
|
16
|
+
'xpl-backdrop--relative': this.relative,
|
|
17
|
+
}, "aria-hidden": "true" }));
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { XplBackdrop as xpl_backdrop };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-3df6db84.js';
|
|
2
2
|
|
|
3
3
|
const XplButtonRow = class {
|
|
4
4
|
constructor(hostRef) {
|
|
@@ -11,9 +11,7 @@ const XplButtonRow = class {
|
|
|
11
11
|
this.onTertiary = () => this.clickTertiary.emit();
|
|
12
12
|
}
|
|
13
13
|
render() {
|
|
14
|
-
return (h(Host, { class: "xpl-button-row" }, h("div", { class: "xpl-button-row-inner" }, h("div", { class: "xpl-button-row__left" }, this.secondary &&
|
|
15
|
-
h("xpl-button", { variant: "secondary", type: "button", onClick: this.onSecondary }, this.secondary)), h("div", { class: "xpl-button-row__right" }, this.tertiary && h("xpl-button", { variant: "subtle", type: "button", onClick: this.onTertiary }, this.tertiary), this.secondary &&
|
|
16
|
-
h("xpl-button", { variant: "secondary", type: "button", onClick: this.onSecondary }, this.secondary), this.primary && h("xpl-button", { class: "xpl-button-row__primary", onClick: this.onPrimary }, this.primary)))));
|
|
14
|
+
return (h(Host, { class: "xpl-button-row" }, h("div", { class: "xpl-button-row-inner" }, h("div", { class: "xpl-button-row__left" }, this.secondary && (h("xpl-button", { variant: "secondary", type: "button", onClick: this.onSecondary }, this.secondary))), h("div", { class: "xpl-button-row__right" }, this.tertiary && (h("xpl-button", { variant: "subtle", type: "button", onClick: this.onTertiary }, this.tertiary)), this.secondary && (h("xpl-button", { variant: "secondary", type: "button", onClick: this.onSecondary }, this.secondary)), this.primary && (h("xpl-button", { class: "xpl-button-row__primary", onClick: this.onPrimary }, this.primary))))));
|
|
17
15
|
}
|
|
18
16
|
};
|
|
19
17
|
|
|
@@ -1,30 +1,37 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-3df6db84.js';
|
|
2
2
|
|
|
3
3
|
const XplChoicelist = class {
|
|
4
4
|
constructor(hostRef) {
|
|
5
5
|
registerInstance(this, hostRef);
|
|
6
6
|
}
|
|
7
7
|
componentWillLoad() {
|
|
8
|
-
this.selected =
|
|
8
|
+
this.selected =
|
|
9
|
+
this.choices !== undefined &&
|
|
10
|
+
this.choices !== null &&
|
|
11
|
+
this.choices.length > 0
|
|
12
|
+
? this.choices.map(() => false)
|
|
13
|
+
: [];
|
|
9
14
|
}
|
|
10
15
|
render() {
|
|
11
|
-
let className =
|
|
16
|
+
let className = 'xpl-choicelist';
|
|
12
17
|
if (this.styled)
|
|
13
|
-
className +=
|
|
14
|
-
return (h(Host, { class: "xpl-choicelist-container" }, this.heading !== undefined ||
|
|
18
|
+
className += ' xpl-choicelist--styled';
|
|
19
|
+
return (h(Host, { class: "xpl-choicelist-container" }, this.heading !== undefined ||
|
|
20
|
+
this.description !== undefined ? (h("div", { class: "xpl-choicelist-heading" }, this.heading && h("h3", null, this.heading), this.description && h("p", null, this.description))) : null, this.choices && (h("ul", { class: className }, this.choices.map(({ children, description, label }, i) => {
|
|
15
21
|
const inner = this.multi ? (h("xpl-checkbox", { description: description, name: this.name, onCheckboxChange: (e) => {
|
|
16
22
|
const { detail } = e;
|
|
17
|
-
this.selected = this.selected.map((v, j) => i === j ? detail : v);
|
|
23
|
+
this.selected = this.selected.map((v, j) => (i === j ? detail : v));
|
|
18
24
|
} }, label)) : (h("xpl-radio", { description: description, name: this.name, onRadioChange: () => {
|
|
19
|
-
|
|
20
|
-
// @ts-expect-error
|
|
21
|
-
this.selected = this.selected.map((v, j) => i === j);
|
|
25
|
+
this.selected = this.selected.map((_, j) => i === j);
|
|
22
26
|
} }, label));
|
|
23
|
-
let className = this.styled && this.selected[i]
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
let className = this.styled && this.selected[i]
|
|
28
|
+
? 'selected'
|
|
29
|
+
: '';
|
|
30
|
+
return (h("li", { class: className }, inner, children && (h("ul", null, children.map((child) => {
|
|
31
|
+
const childInner = this
|
|
32
|
+
.multi ? (h("xpl-checkbox", { description: child.description }, child.label)) : (h("xpl-radio", { description: child.description }, child.label));
|
|
33
|
+
return (h("li", null, childInner));
|
|
34
|
+
})))));
|
|
28
35
|
})))));
|
|
29
36
|
}
|
|
30
37
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-3df6db84.js';
|
|
2
2
|
|
|
3
3
|
const XplDivider = class {
|
|
4
4
|
constructor(hostRef) {
|
|
5
5
|
registerInstance(this, hostRef);
|
|
6
6
|
}
|
|
7
7
|
render() {
|
|
8
|
-
let className =
|
|
8
|
+
let className = 'xpl-divider';
|
|
9
9
|
className += ` xpl-divider--${this.tier}`;
|
|
10
10
|
return (h(Host, { class: className }, h("span", null, h("slot", null))));
|
|
11
11
|
}
|