@xplortech/apollo-core 2.4.2 → 2.5.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/.typings/apollo-components.html-data.json +1011 -3481
- package/build/style.css +7 -7
- package/dist/apollo-core/apollo-core.css +1 -1
- package/dist/apollo-core/apollo-core.esm.js +1 -1
- package/dist/apollo-core/{p-8c1f73ea.entry.js → p-0e1877a2.entry.js} +1 -1
- package/dist/apollo-core/{p-94209785.entry.js → p-1c2e4034.entry.js} +1 -1
- package/dist/apollo-core/p-77f0fd4a.entry.js +1 -0
- package/dist/apollo-core/p-7c22b842.entry.js +1 -0
- package/dist/apollo-core/p-7d245bf0.entry.js +1 -0
- package/dist/apollo-core/{p-b1f4604d.entry.js → p-f4c2626d.entry.js} +1 -1
- package/dist/cjs/xpl-avatar_41.cjs.entry.js +11732 -1165
- package/dist/cjs/xpl-dynamic-table-cell.cjs.entry.js +2 -2
- package/dist/cjs/xpl-dynamic-table-row.cjs.entry.js +2 -2
- package/dist/cjs/xpl-dynamic-table.cjs.entry.js +1 -1
- package/dist/cjs/xpl-grid-item.cjs.entry.js +1 -1
- package/dist/cjs/xpl-grid.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/xpl-data-card/xpl-data-card.js +11 -25
- package/dist/collection/components/xpl-divider/xpl-divider.js +1 -1
- package/dist/collection/components/xpl-dropdown/dropdown.stories.js +4 -0
- package/dist/collection/components/xpl-dropdown/xpl-dropdown-group/xpl-dropdown-group.js +1 -1
- package/dist/collection/components/xpl-dropdown/xpl-dropdown-heading/xpl-dropdown-heading.js +1 -1
- package/dist/collection/components/xpl-dropdown/xpl-dropdown-option/xpl-dropdown-option.js +2 -2
- package/dist/collection/components/xpl-dropdown/xpl-dropdown.js +2 -2
- package/dist/collection/components/xpl-dynamic-table/dynamic-table.stories.js +4 -0
- package/dist/collection/components/xpl-dynamic-table/xpl-dynamic-table.js +1 -1
- package/dist/collection/components/xpl-dynamic-table-cell/xpl-dynamic-table-cell.js +2 -2
- package/dist/collection/components/xpl-dynamic-table-row/xpl-dynamic-table-row.js +2 -2
- package/dist/collection/components/xpl-grid/xpl-grid.js +1 -1
- package/dist/collection/components/xpl-grid-item/xpl-grid-item.js +1 -1
- package/dist/collection/components/xpl-header-accordion/header-accordion.stories.js +4 -0
- package/dist/collection/components/xpl-header-accordion/xpl-header-accordion.js +1 -1
- package/dist/collection/components/xpl-icon/icon-types.js +1 -0
- package/dist/collection/components/xpl-icon/icons.stories.js +47 -12
- package/dist/collection/components/xpl-icon/xpl-icon.js +13 -15
- package/dist/collection/components/xpl-input/input.stories.js +4 -0
- package/dist/collection/components/xpl-input/xpl-input-color/xpl-input-color.js +3 -3
- package/dist/collection/components/xpl-input/xpl-input.js +5 -4
- package/dist/collection/components/xpl-list/list.stories.js +4 -0
- package/dist/collection/components/xpl-progress/progress.stories.js +4 -0
- package/dist/collection/components/xpl-radio/radio.stories.js +4 -0
- package/dist/collection/components/xpl-select/select.stories.js +4 -0
- package/dist/collection/components/xpl-select/xpl-select.js +13 -19
- package/dist/collection/components/xpl-skeleton/skeleton.stories.js +4 -0
- package/dist/collection/components/xpl-slideout/slideout.stories.js +6 -0
- package/dist/collection/components/xpl-table/table.stories.js +4 -0
- package/dist/collection/components/xpl-table-header/table-header.stories.js +4 -0
- package/dist/collection/components/xpl-table-header-cell/table-header-cell.stories.js +4 -0
- package/dist/collection/components/xpl-table-header-cell/xpl-table-header-cell.js +5 -15
- package/dist/collection/components/xpl-tabs/tabs.stories.js +4 -0
- package/dist/collection/components/xpl-toast/toast.stories.js +4 -0
- package/dist/collection/components/xpl-toggle/toggle.stories.js +4 -0
- package/dist/collection/components/xpl-tooltip/tooltip.stories.js +4 -0
- package/dist/components/xpl-data-card.js +1 -1
- package/dist/components/xpl-divider2.js +1 -1
- package/dist/components/xpl-dropdown-group2.js +1 -1
- package/dist/components/xpl-dropdown-heading2.js +1 -1
- package/dist/components/xpl-dropdown-option2.js +1 -1
- package/dist/components/xpl-dropdown2.js +1 -1
- package/dist/components/xpl-dynamic-table-cell.js +1 -1
- package/dist/components/xpl-dynamic-table-row.js +1 -1
- package/dist/components/xpl-dynamic-table.js +1 -1
- package/dist/components/xpl-grid-item.js +1 -1
- package/dist/components/xpl-grid.js +1 -1
- package/dist/components/xpl-header-accordion.js +1 -1
- package/dist/components/xpl-icon2.js +1 -6
- package/dist/components/xpl-input2.js +1 -1
- package/dist/components/xpl-select2.js +1 -1
- package/dist/docs/xpl-accordion/readme.md +62 -0
- package/dist/docs/xpl-application-shell/readme.md +33 -0
- package/dist/docs/xpl-avatar/readme.md +35 -0
- package/dist/docs/xpl-backdrop/readme.md +34 -0
- package/dist/docs/xpl-badge/readme.md +29 -0
- package/dist/docs/xpl-breadcrumbs/xpl-breadcrumb-item/readme.md +19 -0
- package/dist/docs/xpl-breadcrumbs/xpl-breadcrumbs/readme.md +22 -0
- package/dist/docs/xpl-button/readme.md +44 -0
- package/dist/docs/xpl-button-row/readme.md +41 -0
- package/dist/docs/xpl-calendar/readme.md +48 -0
- package/dist/docs/xpl-checkbox/readme.md +47 -0
- package/dist/docs/xpl-choicelist/readme.md +43 -0
- package/dist/docs/xpl-content-area/readme.md +17 -0
- package/dist/docs/xpl-dashboard/readme.md +10 -0
- package/dist/docs/xpl-data-card/readme.md +54 -0
- package/dist/docs/xpl-divider/readme.md +30 -0
- package/dist/docs/xpl-dropdown/readme.md +80 -0
- package/dist/docs/xpl-dropdown/xpl-dropdown-group/readme.md +39 -0
- package/dist/docs/xpl-dropdown/xpl-dropdown-heading/readme.md +30 -0
- package/dist/docs/xpl-dropdown/xpl-dropdown-option/readme.md +36 -0
- package/dist/docs/xpl-dynamic-table/readme.md +19 -0
- package/dist/docs/xpl-dynamic-table-cell/readme.md +18 -0
- package/dist/docs/xpl-dynamic-table-row/readme.md +19 -0
- package/dist/docs/xpl-grid/readme.md +10 -0
- package/dist/docs/xpl-grid-item/readme.md +20 -0
- package/dist/docs/xpl-header-accordion/readme.md +39 -0
- package/dist/docs/xpl-icon/readme.md +80 -0
- package/dist/docs/xpl-input/readme.md +90 -0
- package/dist/docs/xpl-input/xpl-input-color/readme.md +61 -0
- package/dist/docs/xpl-input/xpl-input-date/readme.md +56 -0
- package/dist/docs/xpl-input/xpl-input-file/readme.md +79 -0
- package/dist/docs/xpl-input/xpl-input-time/readme.md +69 -0
- package/dist/docs/xpl-large-card/readme.md +40 -0
- package/dist/docs/xpl-list/readme.md +34 -0
- package/dist/docs/xpl-main-nav/readme.md +28 -0
- package/dist/docs/xpl-modal/readme.md +55 -0
- package/dist/docs/xpl-nav-item/readme.md +24 -0
- package/dist/docs/xpl-pagination/readme.md +52 -0
- package/dist/docs/xpl-popover/readme.md +48 -0
- package/dist/docs/xpl-progress/readme.md +22 -0
- package/dist/docs/xpl-radio/readme.md +43 -0
- package/dist/docs/xpl-secondary-nav/readme.md +10 -0
- package/dist/docs/xpl-select/readme.md +88 -0
- package/dist/docs/xpl-skeleton/readme.md +31 -0
- package/dist/docs/xpl-slideout/readme.md +46 -0
- package/dist/docs/xpl-tab/readme.md +25 -0
- package/dist/docs/xpl-tab-panel/readme.md +18 -0
- package/dist/docs/xpl-table/readme.md +46 -0
- package/dist/docs/xpl-table-header/readme.md +13 -0
- package/dist/docs/xpl-table-header-cell/readme.md +47 -0
- package/dist/docs/xpl-tabs/readme.md +54 -0
- package/dist/docs/xpl-tag/readme.md +30 -0
- package/dist/docs/xpl-toast/readme.md +42 -0
- package/dist/docs/xpl-toggle/readme.md +23 -0
- package/dist/docs/xpl-toolbar/readme.md +18 -0
- package/dist/docs/xpl-tooltip/readme.md +35 -0
- package/dist/docs/xpl-utility-bar/readme.md +55 -0
- package/dist/esm/xpl-avatar_41.entry.js +11732 -1165
- package/dist/esm/xpl-dynamic-table-cell.entry.js +2 -2
- package/dist/esm/xpl-dynamic-table-row.entry.js +2 -2
- package/dist/esm/xpl-dynamic-table.entry.js +1 -1
- package/dist/esm/xpl-grid-item.entry.js +1 -1
- package/dist/esm/xpl-grid.entry.js +1 -1
- package/dist/types/components/xpl-data-card/xpl-data-card.d.ts +2 -3
- package/dist/types/components/xpl-dynamic-table/dynamic-table.stories.d.ts +4 -0
- package/dist/types/components/xpl-header-accordion/header-accordion.stories.d.ts +4 -0
- package/dist/types/components/xpl-icon/icon-types.d.ts +2 -0
- package/dist/types/components/xpl-icon/xpl-icon.d.ts +1 -3
- package/dist/types/components/xpl-input/input.stories.d.ts +4 -0
- package/dist/types/components/xpl-list/list.stories.d.ts +4 -0
- package/dist/types/components/xpl-progress/progress.stories.d.ts +4 -0
- package/dist/types/components/xpl-radio/radio.stories.d.ts +4 -0
- package/dist/types/components/xpl-select/select.stories.d.ts +4 -0
- package/dist/types/components/xpl-select/xpl-select.d.ts +1 -3
- package/dist/types/components/xpl-slideout/slideout.stories.d.ts +6 -0
- package/dist/types/components/xpl-table/table.stories.d.ts +4 -0
- package/dist/types/components/xpl-table-header/table-header.stories.d.ts +4 -0
- package/dist/types/components/xpl-table-header-cell/table-header-cell.stories.d.ts +4 -0
- package/dist/types/components/xpl-table-header-cell/xpl-table-header-cell.d.ts +1 -2
- package/dist/types/components/xpl-tabs/tabs.stories.d.ts +4 -0
- package/dist/types/components/xpl-toast/toast.stories.d.ts +4 -0
- package/dist/types/components/xpl-toggle/toggle.stories.d.ts +4 -0
- package/dist/types/components/xpl-tooltip/tooltip.stories.d.ts +4 -0
- package/dist/types/components.d.ts +24 -28
- package/package.json +7 -4
- package/dist/apollo-core/p-23ef2717.entry.js +0 -6
- package/dist/apollo-core/p-31461db7.entry.js +0 -1
- package/dist/apollo-core/p-7f8e5cd0.entry.js +0 -1
|
@@ -23,9 +23,9 @@ const XplDynamicTableCell = class {
|
|
|
23
23
|
}
|
|
24
24
|
render() {
|
|
25
25
|
const colIndex = Array.from(this.el.parentElement.children).indexOf(this.el) + 1;
|
|
26
|
-
return (index.h(index.Host, { key: '
|
|
26
|
+
return (index.h(index.Host, { key: '639f0a42ea0189fb4c269de1b76c5491729f868c', role: "gridcell", "aria-colindex": colIndex, class: "xpl-dynamic-table-cell", ref: (el) => {
|
|
27
27
|
this.hostElement = el;
|
|
28
|
-
} }, index.h("slot", { key: '
|
|
28
|
+
} }, index.h("slot", { key: '29864a738aa7d5e9498195ce0d22bb8d78e39989' })));
|
|
29
29
|
}
|
|
30
30
|
get el() { return index.getElement(this); }
|
|
31
31
|
};
|
|
@@ -28,9 +28,9 @@ const XplDynamicTableRow = class {
|
|
|
28
28
|
const classList = `xpl-dynamic-table-row
|
|
29
29
|
${this.isDisabled ? 'disabled' : ''}
|
|
30
30
|
${this.selected ? 'selected' : ''}`;
|
|
31
|
-
return (index.h(index.Host, { key: '
|
|
31
|
+
return (index.h(index.Host, { key: '4969ae6223aa4f6604d20e657d390d8ec43eb9bd', role: "row", class: classList, ref: (el) => {
|
|
32
32
|
this.hostElement = el;
|
|
33
|
-
} }, index.h("slot", { key: '
|
|
33
|
+
} }, index.h("slot", { key: '244d34612847408ddb9e0d718b1e5916b7e24b2d' })));
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
|
|
@@ -56,7 +56,7 @@ const XplDynamicTable = class {
|
|
|
56
56
|
this.updateColumnCount();
|
|
57
57
|
}
|
|
58
58
|
render() {
|
|
59
|
-
return (index.h("div", { key: '
|
|
59
|
+
return (index.h("div", { key: 'f49634b51fd6fb49bcb75cc4247f683ff99d6b99', role: "grid", class: "xpl-dynamic-table", "aria-colcount": this.colCount }, index.h("slot", { key: 'e5cd66e212a41ce26dfaccae634ab7ee22ba9910', name: "header" }), index.h("slot", { key: '07e1fbec46f08e46f728340291510992d21f71a4', name: "body" })));
|
|
60
60
|
}
|
|
61
61
|
get el() { return index.getElement(this); }
|
|
62
62
|
};
|
|
@@ -16,7 +16,7 @@ const XplGridItem = class {
|
|
|
16
16
|
className += ` xpl-grid-item-sm-${this.sm}`;
|
|
17
17
|
className += ` xpl-grid-item-md-${this.md}`;
|
|
18
18
|
className += ` xpl-grid-item-lg-${this.lg}`;
|
|
19
|
-
return (index.h(index.Host, { key: '
|
|
19
|
+
return (index.h(index.Host, { key: '4a3a254b51eae0907baf74c383b0d2b60017b69b', class: className }, index.h("slot", { key: 'b23f50ff733b9f3009eda4a3569a28b0636e76f4' })));
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
22
|
|
|
@@ -28,7 +28,7 @@ const XplGrid = class {
|
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
30
|
render() {
|
|
31
|
-
return index.h(index.Host, { key: '
|
|
31
|
+
return index.h(index.Host, { key: 'b7adecdd36342641869726ffa094578c1272dc1e', class: "xpl-grid" });
|
|
32
32
|
}
|
|
33
33
|
get container() { return index.getElement(this); }
|
|
34
34
|
};
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
"components/xpl-choicelist/xpl-choicelist.js",
|
|
15
15
|
"components/xpl-content-area/xpl-content-area.js",
|
|
16
16
|
"components/xpl-dashboard/xpl-dashboard.js",
|
|
17
|
-
"components/xpl-icon/xpl-icon.js",
|
|
18
17
|
"components/xpl-data-card/xpl-data-card.js",
|
|
19
18
|
"components/xpl-divider/xpl-divider.js",
|
|
20
19
|
"components/xpl-dropdown/xpl-dropdown.js",
|
|
@@ -27,6 +26,7 @@
|
|
|
27
26
|
"components/xpl-grid/xpl-grid.js",
|
|
28
27
|
"components/xpl-grid-item/xpl-grid-item.js",
|
|
29
28
|
"components/xpl-header-accordion/xpl-header-accordion.js",
|
|
29
|
+
"components/xpl-icon/xpl-icon.js",
|
|
30
30
|
"components/xpl-input/xpl-input.js",
|
|
31
31
|
"components/xpl-input/xpl-input-color/xpl-input-color.js",
|
|
32
32
|
"components/xpl-input/xpl-input-date/xpl-input-date.js",
|
|
@@ -31,8 +31,8 @@ export class XplDataCard {
|
|
|
31
31
|
: this.smallStatVariant === 'negative'
|
|
32
32
|
? 'arrow-down-right'
|
|
33
33
|
: 'dash';
|
|
34
|
-
return (h(Host, { key: '
|
|
35
|
-
(this.tooltipTextSmallStat ? (h("xpl-tooltip", { text: this.tooltipTextSmallStat }, h("div", { class: "xpl-data-card-stat xpl-data-card-stat--small" }, h("xpl-icon", { icon: this.smallStatIcon, size: 16 }), this.smallStat))) : (h("div", { class: "xpl-data-card-stat xpl-data-card-stat--small" }, h("xpl-icon", { icon: this.smallStatIcon, size: 16 }), this.smallStat)))), !!this.detail && h("span", { key: '
|
|
34
|
+
return (h(Host, { key: 'd8e5d213c87a8d5270f34d6bd60a698e04dd852f', role: "group", class: `xpl-data-card ${this.link ? 'xpl-data-card__link' : ''}`, tabindex: "0" }, h("dt", { key: '3cd7a7ef77c90e6caefdfa0a7eccc132c07871a2', class: headerClasses }, h("header", { key: '7f85f31d60d7022ec75c3d3b164391e11059662b' }, !!this.leadingIcon && this.icon && (h("span", { key: '192e6c0dc871185a7f2845a14c38b1dc6ad04702', class: `xpl-data-card__icon--${this.variant}` }, h("xpl-icon", { key: '9d289a6db0fed0787a2c5cd5de6c57e92203a3fd', icon: this.icon, "background-color": bgColorHue, size: 20 }))), h("slot", { key: 'f1b56a29e648ba29e7f4b0c0493c8e27d410d843', name: "title" }, this.name)), this.link && (h("span", { key: '92b7cab6af5ca4f0664902ea359b3dfb7568e5b6', class: "xpl-data-card__header-arrow" }, h("xpl-icon", { key: '1326fdb0659191f1c2ff7fbb137eed5c4d5c4155', icon: "chevron-right", size: 16 })))), h("dd", { key: 'fce45e8e2d908a7d23e95a76cc0bc2334cd729b1', class: "xpl-data-card__body" }, h("div", { key: '1341065e9f0cbd91b82d239a87aa9818f237334b', class: "xpl-data-card__left" }, h("span", { key: '0dff4e467f439d991f3da594507e0e4310bdecee', class: "xpl-data-card-stat xpl-data-card-stat--long" }, this.stat), this.tooltipTextStat ? (h("xpl-tooltip", { text: this.tooltipTextStat }, h("div", { class: "xpl-data-card-stat xpl-data-card-stat--short" }, this.shortStat ? this.shortStat : this.stat))) : (h("div", { class: "xpl-data-card-stat xpl-data-card-stat--short" }, h("abbr", { title: this.stat }, this.shortStat ? this.shortStat : this.stat))), this.smallStatVariant ? (this.tooltipTextSmallStat ? (h("xpl-tooltip", { text: this.tooltipTextSmallStat }, h("div", { class: `xpl-data-card-stat xpl-data-card-stat--small ${this.smallStatVariant}` }, h("xpl-icon", { icon: smallStatIcon, size: 16 }), this.smallStat))) : (h("div", { class: `xpl-data-card-stat xpl-data-card-stat--small ${this.smallStatVariant}` }, h("xpl-icon", { icon: smallStatIcon, size: 16 }), this.smallStat))) : (this.smallStatIcon &&
|
|
35
|
+
(this.tooltipTextSmallStat ? (h("xpl-tooltip", { text: this.tooltipTextSmallStat }, h("div", { class: "xpl-data-card-stat xpl-data-card-stat--small" }, h("xpl-icon", { icon: this.smallStatIcon, size: 16 }), this.smallStat))) : (h("div", { class: "xpl-data-card-stat xpl-data-card-stat--small" }, h("xpl-icon", { icon: this.smallStatIcon, size: 16 }), this.smallStat)))), !!this.detail && h("span", { key: 'cb5fd1c7897ac6bce5de93082f1ca333e826d53d', class: "xpl-data-card__detail" }, this.detail)), hasContentSlot && (h("div", { key: '83f568edc52ec6a2e0a5b63544e2849dde91318e', class: "xpl-data-card__right" }, h("slot", { key: 'a27fd65217f4817051ba955890582bafb6050f97', name: contentSlot }))))));
|
|
36
36
|
}
|
|
37
37
|
static get is() { return "xpl-data-card"; }
|
|
38
38
|
static get properties() {
|
|
@@ -156,22 +156,15 @@ export class XplDataCard {
|
|
|
156
156
|
"type": "string",
|
|
157
157
|
"mutable": false,
|
|
158
158
|
"complexType": {
|
|
159
|
-
"original": "
|
|
160
|
-
"resolved": "
|
|
161
|
-
"references": {
|
|
162
|
-
"IconName": {
|
|
163
|
-
"location": "import",
|
|
164
|
-
"path": "../xpl-icon/xpl-icon",
|
|
165
|
-
"id": "src/components/components/xpl-icon/xpl-icon.tsx::IconName",
|
|
166
|
-
"referenceLocation": "IconName"
|
|
167
|
-
}
|
|
168
|
-
}
|
|
159
|
+
"original": "string",
|
|
160
|
+
"resolved": "string",
|
|
161
|
+
"references": {}
|
|
169
162
|
},
|
|
170
163
|
"required": false,
|
|
171
164
|
"optional": true,
|
|
172
165
|
"docs": {
|
|
173
166
|
"tags": [],
|
|
174
|
-
"text": "An optional icon leading the header.\nUses <xpl-icon /> components and should reinforce the understanding of the smallStat metric shown."
|
|
167
|
+
"text": "An optional icon leading the header.\nUses <xpl-icon /> components and should reinforce the understanding of the smallStat metric shown.\n\nSee [xpl-icon available icons](../xpl-icon/ICONS.md) for valid icon names."
|
|
175
168
|
},
|
|
176
169
|
"getter": false,
|
|
177
170
|
"setter": false,
|
|
@@ -201,22 +194,15 @@ export class XplDataCard {
|
|
|
201
194
|
"type": "string",
|
|
202
195
|
"mutable": false,
|
|
203
196
|
"complexType": {
|
|
204
|
-
"original": "
|
|
205
|
-
"resolved": "
|
|
206
|
-
"references": {
|
|
207
|
-
"IconName": {
|
|
208
|
-
"location": "import",
|
|
209
|
-
"path": "../xpl-icon/xpl-icon",
|
|
210
|
-
"id": "src/components/components/xpl-icon/xpl-icon.tsx::IconName",
|
|
211
|
-
"referenceLocation": "IconName"
|
|
212
|
-
}
|
|
213
|
-
}
|
|
197
|
+
"original": "string",
|
|
198
|
+
"resolved": "string",
|
|
199
|
+
"references": {}
|
|
214
200
|
},
|
|
215
201
|
"required": false,
|
|
216
202
|
"optional": true,
|
|
217
203
|
"docs": {
|
|
218
204
|
"tags": [],
|
|
219
|
-
"text": "An optional icon leading the small stat.\nUses <xpl-icon> components and should reinforce the understanding of the smallStat metric shown."
|
|
205
|
+
"text": "An optional icon leading the small stat.\nUses <xpl-icon> components and should reinforce the understanding of the smallStat metric shown.\n\nSee [xpl-icon available icons](../xpl-icon/ICONS.md) for valid icon names."
|
|
220
206
|
},
|
|
221
207
|
"getter": false,
|
|
222
208
|
"setter": false,
|
|
@@ -254,7 +240,7 @@ export class XplDataCard {
|
|
|
254
240
|
"optional": true,
|
|
255
241
|
"docs": {
|
|
256
242
|
"tags": [],
|
|
257
|
-
"text": "set a variant that changes the color of the small stat based on the following rules:\n
|
|
243
|
+
"text": "set a variant that changes the color of the small stat based on the following rules:\n\n If trend is positive and greater than 0.5% color is green and up-right arrow is used\n\n If the trend is between -0.5% and 0.5% then its neutral the color is gray\n\n If the trend is negative less than -0.5% the color is red and down right arrow is used"
|
|
258
244
|
},
|
|
259
245
|
"getter": false,
|
|
260
246
|
"setter": false,
|
|
@@ -3,7 +3,7 @@ export class XplDivider {
|
|
|
3
3
|
render() {
|
|
4
4
|
let className = 'xpl-divider';
|
|
5
5
|
className += ` xpl-divider--${this.tier}`;
|
|
6
|
-
return (h(Host, { key: '
|
|
6
|
+
return (h(Host, { key: '8f8b9899bfc602454687020e4547ba98e6c87cf4', class: className }, h("span", { key: 'd64ecfd54eb6ca33a05e271c52a7df5960f9c0df' }, h("slot", { key: '5e62ba9c682428dab560f67603343d9332bc02a5' }))));
|
|
7
7
|
}
|
|
8
8
|
static get is() { return "xpl-divider"; }
|
|
9
9
|
static get properties() {
|
|
@@ -76,6 +76,10 @@ Simple.parameters = {
|
|
|
76
76
|
'web-component': {
|
|
77
77
|
render: Simple(Simple.args),
|
|
78
78
|
},
|
|
79
|
+
design: {
|
|
80
|
+
type: 'figma',
|
|
81
|
+
url: 'https://www.figma.com/design/MjjYek73MFnHmVNdm45Sd1/Apollo-Web?node-id=21057-7882&p=f&t=vVY2x58f7oPprNSr-11',
|
|
82
|
+
},
|
|
79
83
|
};
|
|
80
84
|
export const SimpleWithChildren = ({ closeOnSelect, isOpen: open, mode, selectOnFocus, }) => {
|
|
81
85
|
const attributes = {
|
|
@@ -20,7 +20,7 @@ export class XplDropdownGroup {
|
|
|
20
20
|
var { groupName: optsGroupName } = _a, properties = __rest(_a, ["groupName"]);
|
|
21
21
|
return optsGroupName ? (h("xpl-dropdown-group", Object.assign({ label: optsGroupName }, properties))) : (h("xpl-dropdown-option", Object.assign({}, properties)));
|
|
22
22
|
});
|
|
23
|
-
return (h(Host, { key: '
|
|
23
|
+
return (h(Host, { key: 'e1bd6d56ea5501e48d8f7fba91af32fbc223d343', role: "group", "aria-label": groupName }, h("li", { key: '543d3350cce47b4e96f78c6a411877110a27c842', class: "xpl-dropdown-list-item" }, h("xpl-dropdown-heading", { key: '85b5c8675bb3b2eecdb0dc3ffbf09dc9bd824ceb', label: groupName }), h("ul", { key: '9dfcd1a43cca4fd431b052e438743d24f872f248', class: "xpl-dropdown-list" }, mappedOptions || h("slot", { key: 'd5d7d5d03bfde4306f1a8d861f7f2308eaac2bf6', name: "options" })))));
|
|
24
24
|
}
|
|
25
25
|
static get is() { return "xpl-dropdown-group"; }
|
|
26
26
|
static get properties() {
|
package/dist/collection/components/xpl-dropdown/xpl-dropdown-heading/xpl-dropdown-heading.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
2
|
export class XplDropdownHeading {
|
|
3
3
|
render() {
|
|
4
|
-
return (h(Host, { key: '
|
|
4
|
+
return (h(Host, { key: '41de08a2e945b9d6412264a44a04dd65bc125276', class: { 'xpl-dropdown-heading': true }, role: "presentation" }, h("span", { key: '15b526b8a4ec46059d8edd3aed61c82d6bc79d64' }, this.label || h("slot", { key: '5b8c05d504e56c2852fa8439b15012c73552c190', name: "heading" }))));
|
|
5
5
|
}
|
|
6
6
|
static get is() { return "xpl-dropdown-heading"; }
|
|
7
7
|
static get properties() {
|
|
@@ -43,11 +43,11 @@ export class XplDropdownOption {
|
|
|
43
43
|
}
|
|
44
44
|
render() {
|
|
45
45
|
const { label, isSelected, isDisabled, value, subtitle } = this;
|
|
46
|
-
return (h(Host, { key: '
|
|
46
|
+
return (h(Host, { key: '5065b45c91f2e8c385c70726b4624b62e609dc61', class: {
|
|
47
47
|
'xpl-dropdown-option': true,
|
|
48
48
|
'xpl-dropdown-option--disabled': isDisabled,
|
|
49
49
|
'xpl-dropdown-option--selected': isSelected,
|
|
50
|
-
}, role: "option", "aria-checked": isSelected, "aria-disabled": isDisabled, "aria-selected": isSelected, value: value }, h("li", { key: '
|
|
50
|
+
}, role: "option", "aria-checked": isSelected, "aria-disabled": isDisabled, "aria-selected": isSelected, value: value }, h("li", { key: '3a9493d1f0e2f9eff727f001d08c65477372e58b', class: "xpl-dropdown-list-item" }, label || h("slot", { key: 'fbebc2fd7f45d9abf4a2be0b306d92b3de8cb090', name: "option" }), subtitle && h("span", { key: '987104f21b1843e7350bbd4d8607fcdb1a580131', class: "xpl-dropdown-list-item__subtitle" }, subtitle))));
|
|
51
51
|
}
|
|
52
52
|
static get is() { return "xpl-dropdown-option"; }
|
|
53
53
|
static get properties() {
|
|
@@ -166,12 +166,12 @@ export class XplDropdown {
|
|
|
166
166
|
var { groupName, options: opts, subtitle } = _a, properties = __rest(_a, ["groupName", "options", "subtitle"]);
|
|
167
167
|
return groupName ? (h("xpl-dropdown-group", Object.assign({ groupName: groupName, options: opts }, properties))) : (h("xpl-dropdown-option", Object.assign({ subtitle: subtitle }, properties)));
|
|
168
168
|
});
|
|
169
|
-
return (h(Host, { key: '
|
|
169
|
+
return (h(Host, { key: '82f0becf57013a4f830e7c4aa56e3653b5eb43c5', "aria-expanded": isOpen, class: {
|
|
170
170
|
'xpl-dropdown': true,
|
|
171
171
|
'xpl-dropdown--multi': mode === 'multi',
|
|
172
172
|
'xpl-dropdown--open': isOpen,
|
|
173
173
|
'xpl-dropdown--anchor-to-trigger': this.anchorToTrigger,
|
|
174
|
-
}, role: "listbox" }, h("ul", { key: '
|
|
174
|
+
}, role: "listbox" }, h("ul", { key: '59c584beb1e538c2dff25039e8513de5865a80f1', class: "xpl-dropdown-list" }, mappedOptions || h("slot", { key: 'ff121c50de1a809031ea8be1d271b65946c2fa9a', name: "options" }))));
|
|
175
175
|
}
|
|
176
176
|
static get is() { return "xpl-dropdown"; }
|
|
177
177
|
static get properties() {
|
|
@@ -51,7 +51,7 @@ export class XplDynamicTable {
|
|
|
51
51
|
this.updateColumnCount();
|
|
52
52
|
}
|
|
53
53
|
render() {
|
|
54
|
-
return (h("div", { key: '
|
|
54
|
+
return (h("div", { key: 'f49634b51fd6fb49bcb75cc4247f683ff99d6b99', role: "grid", class: "xpl-dynamic-table", "aria-colcount": this.colCount }, h("slot", { key: 'e5cd66e212a41ce26dfaccae634ab7ee22ba9910', name: "header" }), h("slot", { key: '07e1fbec46f08e46f728340291510992d21f71a4', name: "body" })));
|
|
55
55
|
}
|
|
56
56
|
static get is() { return "xpl-dynamic-table"; }
|
|
57
57
|
static get states() {
|
|
@@ -19,9 +19,9 @@ export class XplDynamicTableCell {
|
|
|
19
19
|
}
|
|
20
20
|
render() {
|
|
21
21
|
const colIndex = Array.from(this.el.parentElement.children).indexOf(this.el) + 1;
|
|
22
|
-
return (h(Host, { key: '
|
|
22
|
+
return (h(Host, { key: '639f0a42ea0189fb4c269de1b76c5491729f868c', role: "gridcell", "aria-colindex": colIndex, class: "xpl-dynamic-table-cell", ref: (el) => {
|
|
23
23
|
this.hostElement = el;
|
|
24
|
-
} }, h("slot", { key: '
|
|
24
|
+
} }, h("slot", { key: '29864a738aa7d5e9498195ce0d22bb8d78e39989' })));
|
|
25
25
|
}
|
|
26
26
|
static get is() { return "xpl-dynamic-table-cell"; }
|
|
27
27
|
static get properties() {
|
|
@@ -24,9 +24,9 @@ export class XplDynamicTableRow {
|
|
|
24
24
|
const classList = `xpl-dynamic-table-row
|
|
25
25
|
${this.isDisabled ? 'disabled' : ''}
|
|
26
26
|
${this.selected ? 'selected' : ''}`;
|
|
27
|
-
return (h(Host, { key: '
|
|
27
|
+
return (h(Host, { key: '4969ae6223aa4f6604d20e657d390d8ec43eb9bd', role: "row", class: classList, ref: (el) => {
|
|
28
28
|
this.hostElement = el;
|
|
29
|
-
} }, h("slot", { key: '
|
|
29
|
+
} }, h("slot", { key: '244d34612847408ddb9e0d718b1e5916b7e24b2d' })));
|
|
30
30
|
}
|
|
31
31
|
static get is() { return "xpl-dynamic-table-row"; }
|
|
32
32
|
static get properties() {
|
|
@@ -22,7 +22,7 @@ export class XplGrid {
|
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
24
|
render() {
|
|
25
|
-
return h(Host, { key: '
|
|
25
|
+
return h(Host, { key: 'b7adecdd36342641869726ffa094578c1272dc1e', class: "xpl-grid" });
|
|
26
26
|
}
|
|
27
27
|
static get is() { return "xpl-grid"; }
|
|
28
28
|
static get elementRef() { return "container"; }
|
|
@@ -12,7 +12,7 @@ export class XplGridItem {
|
|
|
12
12
|
className += ` xpl-grid-item-sm-${this.sm}`;
|
|
13
13
|
className += ` xpl-grid-item-md-${this.md}`;
|
|
14
14
|
className += ` xpl-grid-item-lg-${this.lg}`;
|
|
15
|
-
return (h(Host, { key: '
|
|
15
|
+
return (h(Host, { key: '4a3a254b51eae0907baf74c383b0d2b60017b69b', class: className }, h("slot", { key: 'b23f50ff733b9f3009eda4a3569a28b0636e76f4' })));
|
|
16
16
|
}
|
|
17
17
|
static get is() { return "xpl-grid-item"; }
|
|
18
18
|
static get properties() {
|
|
@@ -68,7 +68,7 @@ export class XplHeaderAccordion {
|
|
|
68
68
|
this.applyBorderRadiusToLastRow();
|
|
69
69
|
}
|
|
70
70
|
render() {
|
|
71
|
-
return (h(Host, { key: '
|
|
71
|
+
return (h(Host, { key: '36101a7c73fddd9944c96ed15dd6570b20ae031d', class: "xpl-header-accordion" }, h("div", { key: 'a58005a8bafb5d56e73c6a78dc4f88a8285ee8fa', class: `header-accordion header-accordion--${this.expanded ? 'expanded' : 'collapsed'}` }, this.hasCheckbox && (h("xpl-checkbox", { key: '6e96eb7c2670ac82a0f6b088a93fd09127338328', class: "xpl-header-accordion__parent-checkbox", checked: this.parentChecked, disabled: this.disabled, indeterminate: this.parentIndeterminate, onCheckboxChange: (event) => this.handleParentCheckboxChange(event.detail) })), h("button", { key: '097ecde99648e1ab397a2b65becdf525e03c21c4', "aria-expanded": this.expanded, "aria-controls": this.contentId, class: "toggle-area", onClick: this.toggleAccordion, type: "button" }, h("slot", { key: '002e4645b7df25d7725e6f9860c815fe3977fa62', name: "title" }), h("xpl-icon", { key: '04492dda041fabc3deeb4031cab2d2ebeae1f766', size: 16, icon: "chevron-down", class: this.expanded && 'rotate' }))), h("div", { key: '310457718b09b0481040c83dc73327251be308cd', id: this.contentId, role: "region", class: !this.expanded ? 'content--hidden' : 'content--shown' }, h("slot", { key: 'c13229b1538cae02a449bf00483174824de17f3a', name: "content" }))));
|
|
72
72
|
}
|
|
73
73
|
static get is() { return "xpl-header-accordion"; }
|
|
74
74
|
static get properties() {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,16 @@
|
|
|
1
|
-
import
|
|
1
|
+
import apolloIcons from "@xplortech/apollo-icons";
|
|
2
|
+
const iconNames = Object.keys(apolloIcons);
|
|
3
|
+
const allTags = new Set();
|
|
4
|
+
iconNames.forEach((name) => {
|
|
5
|
+
var _a;
|
|
6
|
+
const keywords = ((_a = apolloIcons[name]) === null || _a === void 0 ? void 0 : _a.keywords) || [];
|
|
7
|
+
keywords.forEach((keyword) => allTags.add(keyword));
|
|
8
|
+
});
|
|
9
|
+
const tagToIconsMap = {};
|
|
10
|
+
allTags.forEach((tag) => {
|
|
11
|
+
const iconsWithTag = apolloIcons.getIconsByTag(tag);
|
|
12
|
+
tagToIconsMap[tag] = iconsWithTag.map((icon) => icon.symbol);
|
|
13
|
+
});
|
|
2
14
|
export default {
|
|
3
15
|
title: 'Components/Icons',
|
|
4
16
|
argTypes: {
|
|
@@ -11,30 +23,53 @@ export default {
|
|
|
11
23
|
},
|
|
12
24
|
};
|
|
13
25
|
export const Icons = ({ size, color }) => `
|
|
14
|
-
<xpl-input placeholder="Search icons..." id="icon-search"></xpl-input>
|
|
26
|
+
<xpl-input placeholder="Search icons by name or tag..." id="icon-search"></xpl-input>
|
|
15
27
|
<script>
|
|
16
28
|
const iconSearch = document.getElementById('icon-search');
|
|
29
|
+
// Tag-to-icons mapping built using getIconsByTag from @xplortech/apollo-icons
|
|
30
|
+
const tagToIconsMap = ${JSON.stringify(tagToIconsMap)};
|
|
31
|
+
|
|
32
|
+
// Helper function to get icons matching a tag (mirrors getIconsByTag behavior)
|
|
33
|
+
function getIconsByTag(tag) {
|
|
34
|
+
const searchTag = tag.toLowerCase();
|
|
35
|
+
const matchingIcons = new Set();
|
|
36
|
+
Object.entries(tagToIconsMap).forEach(([tagKey, icons]) => {
|
|
37
|
+
if (tagKey.toLowerCase().includes(searchTag)) {
|
|
38
|
+
icons.forEach(icon => matchingIcons.add(icon));
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
return Array.from(matchingIcons);
|
|
42
|
+
}
|
|
43
|
+
|
|
17
44
|
iconSearch.addEventListener('inputEvent', (event) => {
|
|
18
|
-
const search = event.detail;
|
|
19
|
-
const filteredIcons = ${JSON.stringify(Object.keys(data))}.filter(icon => icon.includes(search));
|
|
45
|
+
const search = event.detail.toLowerCase();
|
|
20
46
|
const items = document.querySelectorAll('#where-icons-go .item-container');
|
|
21
47
|
const noSearchResults = document.querySelector('.no-search-results');
|
|
48
|
+
let visibleCount = 0;
|
|
49
|
+
|
|
50
|
+
// Get icons that match by tag using getIconsByTag
|
|
51
|
+
const iconsMatchingTag = getIconsByTag(search);
|
|
52
|
+
|
|
22
53
|
items.forEach(item => {
|
|
23
|
-
|
|
54
|
+
const iconName = item.querySelector('.icon-name').textContent;
|
|
55
|
+
|
|
56
|
+
// Match by icon name or by tag (using getIconsByTag results)
|
|
57
|
+
const matchesName = iconName.toLowerCase().includes(search);
|
|
58
|
+
const matchesTag = iconsMatchingTag.includes(iconName);
|
|
59
|
+
|
|
60
|
+
if (matchesName || matchesTag) {
|
|
24
61
|
item.style.display = 'block';
|
|
62
|
+
visibleCount++;
|
|
25
63
|
} else {
|
|
26
64
|
item.style.display = 'none';
|
|
27
65
|
}
|
|
28
66
|
});
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
} else {
|
|
32
|
-
noSearchResults.style.display = 'none';
|
|
33
|
-
}
|
|
67
|
+
|
|
68
|
+
noSearchResults.style.display = visibleCount === 0 ? 'block' : 'none';
|
|
34
69
|
});
|
|
35
70
|
</script>
|
|
36
71
|
<div class="where-icons-go" id="where-icons-go" style="color: ${color};">
|
|
37
|
-
${
|
|
72
|
+
${iconNames
|
|
38
73
|
.map((icon) => `<div class="item-container">
|
|
39
74
|
<xpl-tooltip text="Click to copy" >
|
|
40
75
|
<div class="item" onclick="navigator.clipboard.writeText('<xpl-icon icon="${icon}"></xpl-icon>')">
|
|
@@ -69,7 +104,7 @@ Icon.argTypes = {
|
|
|
69
104
|
type: { name: 'string', required: true },
|
|
70
105
|
},
|
|
71
106
|
icon: {
|
|
72
|
-
options:
|
|
107
|
+
options: iconNames,
|
|
73
108
|
control: {
|
|
74
109
|
type: 'select',
|
|
75
110
|
},
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
|
-
import
|
|
2
|
+
import apolloIcons from "@xplortech/apollo-icons";
|
|
3
3
|
export class XplIcon {
|
|
4
4
|
render() {
|
|
5
|
+
var _a;
|
|
5
6
|
let options = {};
|
|
6
7
|
if (this.size !== undefined) {
|
|
7
8
|
if (typeof this.size === 'number') {
|
|
@@ -15,10 +16,10 @@ export class XplIcon {
|
|
|
15
16
|
let wrapperClasses = 'xpl-icon__wrapper ';
|
|
16
17
|
if (this.backgroundColor)
|
|
17
18
|
wrapperClasses += `xpl-icon__wrapper--with-background xpl-icon__wrapper--with-background--${this.backgroundColor}`;
|
|
18
|
-
return (h(Host, { key: '
|
|
19
|
+
return (h(Host, { key: '485fe60cec37994f94402756a16f068176b1cbbb' }, h("figure", { key: '9767c5743a3520c36f7733b7f1bf92847af78eb2', class: wrapperClasses }, h("span", { key: 'f11637a97e7a0d1a28572743d8facd78c0b902fc', "aria-label": this.icon, role: "img", class: "xpl-icon", style: {
|
|
19
20
|
width: `${options.width}px`,
|
|
20
21
|
height: `${options.height}px`,
|
|
21
|
-
}, innerHTML:
|
|
22
|
+
}, innerHTML: (_a = apolloIcons.getIcon(this.icon)) === null || _a === void 0 ? void 0 : _a.toSVG(options) }), h("figcaption", { key: '5293e424f6ef17fc99e7ffad8615861b1ac0443d' }, this.icon, " icon"))));
|
|
22
23
|
}
|
|
23
24
|
static get is() { return "xpl-icon"; }
|
|
24
25
|
static get originalStyleUrls() {
|
|
@@ -37,21 +38,18 @@ export class XplIcon {
|
|
|
37
38
|
"type": "string",
|
|
38
39
|
"mutable": false,
|
|
39
40
|
"complexType": {
|
|
40
|
-
"original": "
|
|
41
|
-
"resolved": "
|
|
42
|
-
"references": {
|
|
43
|
-
"IconName": {
|
|
44
|
-
"location": "local",
|
|
45
|
-
"path": "/home/runner/work/apollo/apollo/packages/apollo-core/src/components/components/xpl-icon/xpl-icon.tsx",
|
|
46
|
-
"id": "src/components/components/xpl-icon/xpl-icon.tsx::IconName"
|
|
47
|
-
}
|
|
48
|
-
}
|
|
41
|
+
"original": "string",
|
|
42
|
+
"resolved": "string",
|
|
43
|
+
"references": {}
|
|
49
44
|
},
|
|
50
|
-
"required":
|
|
45
|
+
"required": true,
|
|
51
46
|
"optional": false,
|
|
52
47
|
"docs": {
|
|
53
|
-
"tags": [
|
|
54
|
-
|
|
48
|
+
"tags": [{
|
|
49
|
+
"name": "property",
|
|
50
|
+
"text": "{string}\n\nSee [available icons](./ICONS.md) for the complete list,\nor view the [Storybook icon gallery](?path=/story/components-icons--icons)."
|
|
51
|
+
}],
|
|
52
|
+
"text": "Name of icon."
|
|
55
53
|
},
|
|
56
54
|
"getter": false,
|
|
57
55
|
"setter": false,
|
|
@@ -109,6 +109,10 @@ Input.parameters = {
|
|
|
109
109
|
return output;
|
|
110
110
|
})(Input.args),
|
|
111
111
|
},
|
|
112
|
+
design: {
|
|
113
|
+
type: 'figma',
|
|
114
|
+
url: 'https://www.figma.com/design/MjjYek73MFnHmVNdm45Sd1/Apollo-Web?node-id=16215-5412&p=f&t=vVY2x58f7oPprNSr-11',
|
|
115
|
+
},
|
|
112
116
|
};
|
|
113
117
|
export const Multiline = ({ label, description, disabled, error, errorMessage, maxCharacterCount, }) => {
|
|
114
118
|
let attrs = ' multiline';
|
|
@@ -193,13 +193,13 @@ export class XplInputColor {
|
|
|
193
193
|
top: `${y}px`,
|
|
194
194
|
background: `rgb(${r}, ${g}, ${b})`,
|
|
195
195
|
};
|
|
196
|
-
return (h(Host, { key: '
|
|
196
|
+
return (h(Host, { key: '89789ef1ae21c4c555f67fd1a09159765eb1ef9e', class: "xpl-input-color" }, h("xpl-popover", { key: '2eececd5d3592e0111bc507892eb7f7cd8bad8e6', disabled: this.disabled, display: "menu" }, h("div", { key: '56d4a7bb25c3cdeb09d38d2fa986fe7595c453c0', slot: "trigger" }, h("div", { key: 'e49c0143d634a99cc547ead6af263716a28dd9ff', class: {
|
|
197
197
|
'xpl-input-color__display': true,
|
|
198
198
|
'xpl-input-color__display--disabled': this.disabled,
|
|
199
199
|
'xpl-input-color__display--error': !!this.hasErrorState,
|
|
200
|
-
} }, h("span", { key: '
|
|
200
|
+
} }, h("span", { key: 'e65efc371fab736e640f375446c22340f801b8a2', class: "xpl-input-color__color", style: {
|
|
201
201
|
background: objectToStringColor(this.colorValues),
|
|
202
|
-
} }), this.colorValues.hex ? (h("span", { class: "xpl-input-color__value" }, objectToStringColor(this.colorValues))) : (h("span", { class: "xpl-input-color__placeholder" }, this.placeholder)), this.eyeDropperSupported && !this.hideEyeDropper && (h("xpl-icon", { key: '
|
|
202
|
+
} }), this.colorValues.hex ? (h("span", { class: "xpl-input-color__value" }, objectToStringColor(this.colorValues))) : (h("span", { class: "xpl-input-color__placeholder" }, this.placeholder)), this.eyeDropperSupported && !this.hideEyeDropper && (h("xpl-icon", { key: 'b71aa6dd82c16ac328da186920e04b2992341317', size: 20, icon: "eye-dropper", class: "xpl-input-color__icon", onClick: (e) => {
|
|
203
203
|
e.stopPropagation();
|
|
204
204
|
this.openEyeDropper();
|
|
205
205
|
} })))), h("div", { key: '8e6add90e733d299cea94559dcbc29dd4e64d9cd', class: "xpl-input-color__menu" }, h("div", { key: 'a488c9b7ef3ff0cabbbb4bf5a631f209034a2539', class: "xpl-input-color__sl-grid", ref: (el) => {
|
|
@@ -66,9 +66,10 @@ export class XplInput {
|
|
|
66
66
|
render() {
|
|
67
67
|
var _a;
|
|
68
68
|
let hasError = false;
|
|
69
|
-
if (this.error
|
|
69
|
+
if (this.error) {
|
|
70
70
|
hasError = true;
|
|
71
|
-
|
|
71
|
+
}
|
|
72
|
+
else if (this.multiline &&
|
|
72
73
|
this.maxCharacterCount !== undefined &&
|
|
73
74
|
this.characterCount > this.maxCharacterCount) {
|
|
74
75
|
hasError = true;
|
|
@@ -77,13 +78,13 @@ export class XplInput {
|
|
|
77
78
|
if (type === 'password' && this.passwordVisible) {
|
|
78
79
|
type = 'text';
|
|
79
80
|
}
|
|
80
|
-
return (h(Host, { key: '
|
|
81
|
+
return (h(Host, { key: 'c682985a3d592f9f9902a16013a5d00f40ce5e44', class: {
|
|
81
82
|
'xpl-input': true,
|
|
82
83
|
'xpl-input--disabled': this.disabled,
|
|
83
84
|
'xpl-input--error': hasError,
|
|
84
85
|
'xpl-input--readonly': this.readonly,
|
|
85
86
|
[`xpl-input--${this.type}`]: true,
|
|
86
|
-
} }, this.label && (h("label", { key: '
|
|
87
|
+
} }, this.label && (h("label", { key: '21d863221e85a255f3dc5e662139b7abc0e72907', class: "xpl-input-label", htmlFor: this._id }, this.label, this.description && h("small", { key: '25d078a667c8b9cbf4d1b5d1f412c3d0e736013a' }, this.description))), this.renderInput(), ((_a = this.error) === null || _a === void 0 ? void 0 : _a.length) > 0 && (h("label", { key: '7e13c1fc18496bdf50cdb2a239c113c182b83f18', class: "xpl-input-error", htmlFor: this._id }, h("xpl-icon", { key: '900d641cfcd94d9f6cc85ba34e1e211448c203df', icon: "alert-circle", size: 16 }), h("span", { key: '74f7868861f5c262038bee3de2faeecc46b2454d' }, this.error)))));
|
|
87
88
|
}
|
|
88
89
|
static get is() { return "xpl-input"; }
|
|
89
90
|
static get properties() {
|
|
@@ -145,4 +145,8 @@ document.getElementById("list-id").items = [
|
|
|
145
145
|
render: ((_) => {
|
|
146
146
|
})(List.args),
|
|
147
147
|
},
|
|
148
|
+
design: {
|
|
149
|
+
type: 'figma',
|
|
150
|
+
url: 'https://www.figma.com/design/MjjYek73MFnHmVNdm45Sd1/Apollo-Web?node-id=16296-10660&p=f&t=vVY2x58f7oPprNSr-11',
|
|
151
|
+
},
|
|
148
152
|
};
|