@haiilo/catalyst 1.1.0 → 1.1.1
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/catalyst/catalyst.esm.js +1 -1
- package/dist/catalyst/p-a4d0b054.entry.js +10 -0
- package/dist/catalyst/p-a4d0b054.entry.js.map +1 -0
- package/dist/cjs/cat-alert_23.cjs.entry.js +35 -23
- package/dist/cjs/cat-alert_23.cjs.entry.js.map +1 -1
- package/dist/collection/components/cat-alert/cat-alert.js +8 -8
- package/dist/collection/components/cat-alert/cat-alert.js.map +1 -1
- package/dist/collection/components/cat-avatar/cat-avatar.css +8 -8
- package/dist/collection/components/cat-badge/cat-badge.css +20 -26
- package/dist/collection/components/cat-badge/cat-badge.js +9 -12
- package/dist/collection/components/cat-badge/cat-badge.js.map +1 -1
- package/dist/collection/components/cat-card/cat-card.js +2 -3
- package/dist/collection/components/cat-card/cat-card.js.map +1 -1
- package/dist/collection/components/cat-select/cat-select.css +5 -0
- package/dist/collection/components/cat-select/cat-select.js +6 -1
- package/dist/collection/components/cat-select/cat-select.js.map +1 -1
- package/dist/collection/components/cat-select-demo/cat-select-demo.js +5 -5
- package/dist/collection/components/cat-select-demo/cat-select-demo.js.map +1 -1
- package/dist/collection/utils/setDefault.js +9 -0
- package/dist/collection/utils/setDefault.js.map +1 -0
- package/dist/components/cat-alert.js +7 -7
- package/dist/components/cat-alert.js.map +1 -1
- package/dist/components/cat-avatar2.js +1 -1
- package/dist/components/cat-avatar2.js.map +1 -1
- package/dist/components/cat-badge.js +9 -9
- package/dist/components/cat-badge.js.map +1 -1
- package/dist/components/cat-card.js +2 -2
- package/dist/components/cat-card.js.map +1 -1
- package/dist/components/cat-select-demo.js +3 -3
- package/dist/components/cat-select-demo.js.map +1 -1
- package/dist/components/cat-select2.js +7 -2
- package/dist/components/cat-select2.js.map +1 -1
- package/dist/components/setDefault.js +12 -0
- package/dist/components/setDefault.js.map +1 -0
- package/dist/esm/cat-alert_23.entry.js +35 -23
- package/dist/esm/cat-alert_23.entry.js.map +1 -1
- package/dist/types/components/cat-alert/cat-alert.d.ts +1 -2
- package/dist/types/components/cat-badge/cat-badge.d.ts +2 -2
- package/dist/types/components/cat-select/cat-select.d.ts +2 -0
- package/dist/types/utils/setDefault.d.ts +6 -0
- package/package.json +2 -2
- package/dist/catalyst/p-78b3fc17.entry.js +0 -10
- package/dist/catalyst/p-78b3fc17.entry.js.map +0 -1
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, g as getElement, c as createEvent } from './index-df195301.js';
|
|
2
2
|
import { l as loglevel, a as CatIconRegistry, C as CatI18nRegistry, N as NotificationsService } from './cat-notification-8bcf6fa2.js';
|
|
3
3
|
|
|
4
|
+
function setAttributeDefault(host, attr, value) {
|
|
5
|
+
if (!host.hostElement.hasAttribute(attr) && value != null) {
|
|
6
|
+
host.hostElement.setAttribute(attr, String(value));
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
function setPropertyDefault(host, prop) {
|
|
10
|
+
setAttributeDefault(host, String(prop), host[prop]);
|
|
11
|
+
}
|
|
12
|
+
|
|
4
13
|
const catAlertCss = ":host{display:flex;gap:0.5rem;padding:1.25rem;border-radius:0.5rem;margin-bottom:1rem}:host([hidden]){display:none}:host(:focus-visible){outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.content{align-self:center}::slotted(:last-child){margin-bottom:0 !important}:host([color=primary]){background-color:rgba(var(--cat-primary-bg, 32, 127, 138), 0.1)}:host([color=primary]) cat-icon{color:#207f8a}:host([color=secondary]){background-color:rgba(105, 118, 135, 0.1)}:host([color=secondary]) cat-icon{color:#697687}:host([color=success]){background-color:rgba(0, 132, 88, 0.1)}:host([color=success]) cat-icon{color:#008458}:host([color=warning]){background-color:rgba(255, 206, 128, 0.1)}:host([color=warning]) cat-icon{color:#ebb663}:host([color=danger]){background-color:rgba(217, 52, 13, 0.1)}:host([color=danger]) cat-icon{color:#d9340d}";
|
|
5
14
|
|
|
6
15
|
const CatAlert = class {
|
|
@@ -29,14 +38,13 @@ const CatAlert = class {
|
|
|
29
38
|
*/
|
|
30
39
|
this.noIcon = false;
|
|
31
40
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
return this.hostElement.getAttribute('tabindex') || '0';
|
|
41
|
+
connectedCallback() {
|
|
42
|
+
setAttributeDefault(this, 'tabindex', 0);
|
|
43
|
+
setAttributeDefault(this, 'role', this.mapRole.get(this.color));
|
|
44
|
+
setPropertyDefault(this, 'color');
|
|
37
45
|
}
|
|
38
|
-
|
|
39
|
-
return this.
|
|
46
|
+
render() {
|
|
47
|
+
return (h(Host, null, !this.noIcon && h("cat-icon", { size: "l", icon: this.icon ? this.icon : this.mapIcon.get(this.color) }), h("div", { class: "content" }, h("slot", null))));
|
|
40
48
|
}
|
|
41
49
|
get hostElement() { return getElement(this); }
|
|
42
50
|
};
|
|
@@ -57,7 +65,7 @@ const loadImg = (src) => {
|
|
|
57
65
|
});
|
|
58
66
|
};
|
|
59
67
|
|
|
60
|
-
const catAvatarCss = ":host{display:
|
|
68
|
+
const catAvatarCss = ":host{display:contents}:host([hidden]){display:none}.avatar{display:inline-flex;align-items:center;justify-content:center;border-radius:0.25rem;text-decoration:inherit;color:var(--cat-avatar-fill, white);background-color:var(--cat-avatar-bg, #697687);background-size:cover;background-position:center;white-space:nowrap;overflow:hidden;vertical-align:middle;-webkit-user-select:none;-ms-user-select:none;user-select:none;}.avatar:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.avatar-round{border-radius:50%}.avatar-xs{width:var(--cat-avatar-size, 1.5rem);height:var(--cat-avatar-size, 1.5rem);line-height:var(--cat-avatar-size, 1.5rem);font-size:var(--cat-avatar-font-size, 0.75rem)}.avatar-s{width:var(--cat-avatar-size, 2rem);height:var(--cat-avatar-size, 2rem);line-height:var(--cat-avatar-size, 2rem);font-size:var(--cat-avatar-font-size, 0.875rem)}.avatar-m{width:var(--cat-avatar-size, 2.5rem);height:var(--cat-avatar-size, 2.5rem);line-height:var(--cat-avatar-size, 2.5rem);font-size:var(--cat-avatar-font-size, 0.9375rem)}.avatar-l{width:var(--cat-avatar-size, 3rem);height:var(--cat-avatar-size, 3rem);line-height:var(--cat-avatar-size, 3rem);font-size:var(--cat-avatar-font-size, 1.125rem)}.avatar-xl{width:var(--cat-avatar-size, 3.5rem);height:var(--cat-avatar-size, 3.5rem);line-height:var(--cat-avatar-size, 3.5rem);font-size:var(--cat-avatar-font-size, 1.25rem)}";
|
|
61
69
|
|
|
62
70
|
const CatAvatar = class {
|
|
63
71
|
constructor(hostRef) {
|
|
@@ -127,7 +135,7 @@ const CatAvatar = class {
|
|
|
127
135
|
};
|
|
128
136
|
CatAvatar.style = catAvatarCss;
|
|
129
137
|
|
|
130
|
-
const catBadgeCss = ":host{display:inline-
|
|
138
|
+
const catBadgeCss = ":host([hidden]){display:none}:host{display:inline-flex;max-width:100%;vertical-align:baseline;align-items:center;justify-content:center;border-radius:0.125rem;text-decoration:none;line-height:1}:host slot{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}:host([round]){border-radius:10rem}:host([variant=filled]){background-color:rgb(var(--bg));color:rgb(var(--fill));font-weight:600;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:greyscale}:host([variant=outlined]){background-color:white;box-shadow:inset 0 0 0 1px rgba(var(--border), 0.2);color:rgb(var(--text))}:host([color=primary]){--bg:var(--cat-primary-bg, 32, 127, 138);--fill:var(--cat-primary-fill, 255, 255, 255);--text:var(--cat-primary-text, 32, 127, 138);--border:var(--cat-primary-text, 32, 127, 138)}:host([color=secondary]){--bg:105, 118, 135;--fill:255, 255, 255;--text:0, 0, 0;--border:105, 118, 135}:host([color=success]){--bg:0, 132, 88;--fill:255, 255, 255;--text:0, 132, 88;--border:0, 132, 88}:host([color=warning]){--bg:255, 206, 128;--fill:0, 0, 0;--text:159, 97, 0;--border:159, 97, 0}:host([color=danger]){--bg:217, 52, 13;--fill:255, 255, 255;--text:217, 52, 13;--border:217, 52, 13}:host([size=xs]){height:1rem;min-width:1rem;font-size:0.75rem;padding:0 0.25rem}:host([size=s]){height:1.5rem;min-width:1.5rem;font-size:0.75rem;padding:0 0.5rem}:host([size=m]){height:2rem;min-width:2rem;font-size:0.875rem;padding:0 0.75rem}:host([size=l]){height:2.5rem;min-width:2.5rem;font-size:0.9375rem;padding:0 1rem}:host([size=xl]){height:3rem;min-width:3rem;font-size:1.125rem;padding:0 1rem}:host([pulse][variant=filled]){animation:1.5s ease 0s infinite normal none running pulse}:host([pulse][variant=outlined]){animation:1.5s ease 0s infinite normal none running pulse-outlined}@keyframes pulse{0%{box-shadow:0 0 0 0 rgb(var(--bg))}70%{box-shadow:transparent 0 0 0 0.5rem}100%{box-shadow:transparent 0 0 0 0}}@keyframes pulse-outlined{0%{box-shadow:0 0 0 0 rgb(var(--bg)), inset 0 0 0 1px rgba(var(--border), 0.2)}70%{box-shadow:transparent 0 0 0 0.5rem, inset 0 0 0 1px rgba(var(--border), 0.2)}100%{box-shadow:transparent 0 0 0 0, inset 0 0 0 1px rgba(var(--border), 0.2)}}";
|
|
131
139
|
|
|
132
140
|
const CatBadge = class {
|
|
133
141
|
constructor(hostRef) {
|
|
@@ -153,16 +161,15 @@ const CatBadge = class {
|
|
|
153
161
|
*/
|
|
154
162
|
this.pulse = false;
|
|
155
163
|
}
|
|
164
|
+
connectedCallback() {
|
|
165
|
+
setPropertyDefault(this, 'variant');
|
|
166
|
+
setPropertyDefault(this, 'color');
|
|
167
|
+
setPropertyDefault(this, 'size');
|
|
168
|
+
}
|
|
156
169
|
render() {
|
|
157
|
-
return
|
|
158
|
-
badge: true,
|
|
159
|
-
'badge-round': this.round,
|
|
160
|
-
'badge-pulse': this.pulse,
|
|
161
|
-
[`badge-${this.variant}`]: Boolean(this.variant),
|
|
162
|
-
[`badge-${this.color}`]: Boolean(this.color),
|
|
163
|
-
[`badge-${this.size}`]: Boolean(this.size)
|
|
164
|
-
} }, h("slot", null)));
|
|
170
|
+
return h("slot", null);
|
|
165
171
|
}
|
|
172
|
+
get hostElement() { return getElement(this); }
|
|
166
173
|
};
|
|
167
174
|
CatBadge.style = catBadgeCss;
|
|
168
175
|
|
|
@@ -465,7 +472,7 @@ const CatCard = class {
|
|
|
465
472
|
registerInstance(this, hostRef);
|
|
466
473
|
}
|
|
467
474
|
render() {
|
|
468
|
-
return
|
|
475
|
+
return h("slot", null);
|
|
469
476
|
}
|
|
470
477
|
};
|
|
471
478
|
CatCard.style = catCardCss;
|
|
@@ -5221,7 +5228,7 @@ var autosizeInput = function (element, options) {
|
|
|
5221
5228
|
}
|
|
5222
5229
|
};
|
|
5223
5230
|
|
|
5224
|
-
const catSelectCss = ".hint-section{display:flex;gap:0.5rem;flex-direction:column}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){font-size:0.875rem;line-height:1rem;font-weight:var(--cat-font-weight-body, 400);margin:0 !important}:host-context(.cat-error) .hint-section{color:#d9340d}:host{display:flex;flex-direction:column;gap:0.5rem;position:relative;margin-bottom:1rem}:host([hidden]){display:none}label{align-self:flex-start}label.hidden{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.input-optional{margin-left:0.25rem;font-size:0.75rem;line-height:1rem;font-weight:var(--cat-font-weight-body, 400);color:rgb(var(--cat-font-color-muted, 105, 118, 135))}.select-wrapper{display:flex;align-items:flex-start;background:white;border-radius:0.25rem;box-shadow:0 0 0 1px #d7dbe0;transition:box-shadow 0.13s linear;padding:0.25rem}.select-wrapper:not(.select-disabled):hover{box-shadow:0 0 0 2px #d7dbe0}.select-wrapper:not(.select-disabled):focus-within{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255))}:host(.cat-error) .select-wrapper{box-shadow:0 0 0 1px #d9340d}:host(.cat-error) .select-wrapper:not(.input-disabled):hover{box-shadow:0 0 0 2px #d9340d}.select-disabled{background:#f8f8fb;cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 105, 118, 135));pointer-events:none}.select-wrapper-inner{display:flex;flex:1 1 auto;flex-wrap:wrap;align-items:center;gap:0.25rem;min-width:0}.select-wrapper-inner>cat-avatar{padding-left:0.25rem}.select-wrapper-inner cat-avatar{--cat-avatar-size:1.25rem}.select-input{font:inherit;background:none;border:none;outline:none;padding:0.375rem 0.5rem;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.select-disabled .select-input{cursor:inherit}.select-pills{display:contents}.pill{display:inline-flex;align-items:center;gap:0.5rem;padding:0.25rem 0.5rem;background:#f2f4f7;border-radius:0.125rem;white-space:nowrap;min-width:0}.pill>span{overflow:hidden;text-overflow:ellipsis}.pill>cat-button{margin-right:-0.25rem;margin-left:-0.25rem}.select-btn{transition:transform 0.13s linear}.select-btn::part(button){outline:none}cat-spinner{padding:0.375rem}.select-btn-open{transform:rotate(180deg)}.select-dropdown{position:absolute;right:0;background:white;display:none;overflow:auto;box-shadow:0 1px 4px 0 rgba(16, 29, 48, 0.2);border-radius:0.25rem;z-index:100}.select-options-wrapper{max-height:16rem;width:100%}.select-empty{margin:1rem 0;padding:0 1.25rem}.select-options{list-style-type:none;margin:0;padding:0.5rem 0}.select-options cat-checkbox,.select-options .select-option-single{margin:0;padding:0.5rem 1rem}.select-option-inner{display:flex;gap:0.5rem;--cat-avatar-size:1.25rem}.select-option-single{cursor:pointer}.select-input-transparent-caret{caret-color:transparent}.select-option-empty,.select-option-loading{padding:0.5rem 1rem}.select-option:hover{background-color:rgba(105, 118, 135, 0.05)}.select-option-active{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:-2px}.select-option-label{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}.select-option-description{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;color:rgb(var(--cat-font-color-muted, 105, 118, 135))}";
|
|
5231
|
+
const catSelectCss = ".hint-section{display:flex;gap:0.5rem;flex-direction:column}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){font-size:0.875rem;line-height:1rem;font-weight:var(--cat-font-weight-body, 400);margin:0 !important}:host-context(.cat-error) .hint-section{color:#d9340d}:host{display:flex;flex-direction:column;gap:0.5rem;position:relative;margin-bottom:1rem}:host([hidden]){display:none}label{align-self:flex-start}label.hidden{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.input-optional{margin-left:0.25rem;font-size:0.75rem;line-height:1rem;font-weight:var(--cat-font-weight-body, 400);color:rgb(var(--cat-font-color-muted, 105, 118, 135))}.select-wrapper{display:flex;align-items:flex-start;background:white;border-radius:0.25rem;box-shadow:0 0 0 1px #d7dbe0;transition:box-shadow 0.13s linear;padding:0.25rem}.select-wrapper:not(.select-disabled):hover{box-shadow:0 0 0 2px #d7dbe0}.select-wrapper:not(.select-disabled):focus-within{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255))}:host(.cat-error) .select-wrapper{box-shadow:0 0 0 1px #d9340d}:host(.cat-error) .select-wrapper:not(.input-disabled):hover{box-shadow:0 0 0 2px #d9340d}.select-disabled{background:#f8f8fb;cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 105, 118, 135));pointer-events:none}.select-wrapper-inner{display:flex;flex:1 1 auto;flex-wrap:wrap;align-items:center;gap:0.25rem;min-width:0}.select-wrapper-inner>cat-avatar{padding-left:0.25rem}.select-wrapper-inner cat-avatar{--cat-avatar-size:1.25rem}.select-input{font:inherit;background:none;border:none;outline:none;padding:0.375rem 0.5rem;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.select-disabled .select-input{cursor:inherit}.select-pills{display:contents}.pill{display:inline-flex;align-items:center;gap:0.5rem;padding:0.25rem 0.5rem;background:#f2f4f7;border-radius:0.125rem;white-space:nowrap;min-width:0}.pill>span{overflow:hidden;text-overflow:ellipsis;flex:1 1 0%}.pill>cat-button{margin-right:-0.25rem;margin-left:-0.25rem}.select-btn{transition:transform 0.13s linear}.select-btn::part(button){outline:none}cat-spinner{padding:0.375rem}.select-btn-open{transform:rotate(180deg)}.select-dropdown{position:absolute;right:0;background:white;display:none;overflow:auto;box-shadow:0 1px 4px 0 rgba(16, 29, 48, 0.2);border-radius:0.25rem;z-index:100}.select-options-wrapper{max-height:16rem;width:100%}.select-empty{margin:1rem 0;padding:0 1.25rem}.select-options{list-style-type:none;margin:0;padding:0.5rem 0}.select-options cat-checkbox,.select-options .select-option-single{margin:0;padding:0.5rem 1rem}.select-option-inner{display:flex;gap:0.5rem;--cat-avatar-size:1.25rem}.select-option-text{flex:1 1 0%}.select-option-single{cursor:pointer}.select-input-transparent-caret{caret-color:transparent}.select-option-empty,.select-option-loading{padding:0.5rem 1rem}.select-option:hover{background-color:rgba(105, 118, 135, 0.05)}.select-option-active{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:-2px}.select-option-label{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}.select-option-description{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;color:rgb(var(--cat-font-color-muted, 105, 118, 135))}";
|
|
5225
5232
|
|
|
5226
5233
|
const INIT_STATE = {
|
|
5227
5234
|
term: '',
|
|
@@ -5396,6 +5403,11 @@ const CatSelect = class {
|
|
|
5396
5403
|
if (this.state.activeSelectionIndex >= 0) {
|
|
5397
5404
|
this.deselect(this.state.selection[this.state.activeSelectionIndex].item.id);
|
|
5398
5405
|
}
|
|
5406
|
+
else if (this.state.selection.length) {
|
|
5407
|
+
const selectionClone = [...this.state.selection];
|
|
5408
|
+
selectionClone.pop();
|
|
5409
|
+
this.patchState({ selection: selectionClone });
|
|
5410
|
+
}
|
|
5399
5411
|
}
|
|
5400
5412
|
}
|
|
5401
5413
|
else if (event.key === 'Tab') {
|
|
@@ -5450,7 +5462,7 @@ const CatSelect = class {
|
|
|
5450
5462
|
.subscribe(items => {
|
|
5451
5463
|
var _a;
|
|
5452
5464
|
const options = items === null || items === void 0 ? void 0 : items.map(item => ({
|
|
5453
|
-
item,
|
|
5465
|
+
item: Object.assign(Object.assign({}, item), { id: this.connectorSafe.customId ? this.connectorSafe.customId(item) : item.id }),
|
|
5454
5466
|
render: this.connectorSafe.render(item)
|
|
5455
5467
|
}));
|
|
5456
5468
|
if (this.tags &&
|
|
@@ -5866,7 +5878,7 @@ const CatSelectTest = class {
|
|
|
5866
5878
|
}
|
|
5867
5879
|
})
|
|
5868
5880
|
});
|
|
5869
|
-
(_c = this.multipleSelectTagging) === null || _c === void 0 ? void 0 : _c.connect(this.countryConnector);
|
|
5881
|
+
(_c = this.multipleSelectTagging) === null || _c === void 0 ? void 0 : _c.connect(Object.assign(Object.assign({}, this.countryConnector), { customId: (item) => item.country }));
|
|
5870
5882
|
(_d = this.singleSelect) === null || _d === void 0 ? void 0 : _d.connect({
|
|
5871
5883
|
resolve: (ids) => {
|
|
5872
5884
|
console.info(`Resolving data... (${ids.join(', ')})`);
|
|
@@ -5897,11 +5909,11 @@ const CatSelectTest = class {
|
|
|
5897
5909
|
description: user.desc
|
|
5898
5910
|
})
|
|
5899
5911
|
});
|
|
5900
|
-
(_e = this.singleSelectAvatar) === null || _e === void 0 ? void 0 : _e.connect(this.countryConnector);
|
|
5912
|
+
(_e = this.singleSelectAvatar) === null || _e === void 0 ? void 0 : _e.connect(Object.assign(Object.assign({}, this.countryConnector), { customId: (item) => item.country }));
|
|
5901
5913
|
(_f = this.singleSelectTagging) === null || _f === void 0 ? void 0 : _f.connect(this.countryConnector);
|
|
5902
5914
|
}
|
|
5903
5915
|
render() {
|
|
5904
|
-
return (h(Host, { style: { display: 'flex', flexDirection: 'column' } }, h("cat-select", { label: "Multiple Select", hint: "This is a hint!", ref: el => (this.multipleSelect = el), value: ['1'], placeholder: "Hello World", onCatBlur: e => console.log('Multiple blur', e), multiple: true, clearable: true }, h("span", { slot: "hint" }, "Searching for \"no\" -", '>', " no options are returned!")), h("cat-select", { label: "Multiple with img", ref: el => (this.multipleSelectAvatar = el), value: ['1'], placeholder: "Hello World", multiple: true, clearable: true }), h("cat-select", { label: "Multiple with tagging support", hint: "This is a hint!", ref: el => (this.multipleSelectTagging = el), value: { ids: ['1'], tags: ['Test'] }, placeholder: "Select country", onCatChange: () => { var _a; return console.log((_a = this.multipleSelectTagging) === null || _a === void 0 ? void 0 : _a.value); }, multiple: true, tags: true, clearable: true }), h("cat-select", { label: "Single Select", hint: "This is a hint!", ref: el => (this.singleSelect = el), placeholder: "Search for a country or capital", onCatBlur: e => console.log('Single blur', e), clearable: true }), h("cat-select", { label: "Single with img", ref: el => (this.singleSelectAvatar = el), value: '1', placeholder: "Search for a country or capital", clearable: true }), h("cat-select", { label: "Single with tagging support", ref: el => (this.singleSelectTagging = el), value: { id: '1', tag: '' }, placeholder: "Search for a country or capital", onCatChange: () => { var _a; return console.log('Single', (_a = this.singleSelectTagging) === null || _a === void 0 ? void 0 : _a.value); }, tagHint: "new country", tags: true, clearable: true })));
|
|
5916
|
+
return (h(Host, { style: { display: 'flex', flexDirection: 'column' } }, h("cat-select", { label: "Multiple Select", hint: "This is a hint!", ref: el => (this.multipleSelect = el), value: ['1'], placeholder: "Hello World", onCatChange: () => { var _a; return console.log((_a = this.multipleSelect) === null || _a === void 0 ? void 0 : _a.value); }, onCatBlur: e => console.log('Multiple blur', e), multiple: true, clearable: true }, h("span", { slot: "hint" }, "Searching for \"no\" -", '>', " no options are returned!")), h("cat-select", { label: "Multiple with img", ref: el => (this.multipleSelectAvatar = el), value: ['1'], placeholder: "Hello World", multiple: true, clearable: true }), h("cat-select", { label: "Multiple with tagging support", hint: "This is a hint!", ref: el => (this.multipleSelectTagging = el), value: { ids: ['1'], tags: ['Test', 'Albania'] }, placeholder: "Select country", onCatChange: () => { var _a; return console.log((_a = this.multipleSelectTagging) === null || _a === void 0 ? void 0 : _a.value); }, multiple: true, tags: true, clearable: true }), h("cat-select", { label: "Single Select", hint: "This is a hint!", ref: el => (this.singleSelect = el), placeholder: "Search for a country or capital", onCatBlur: e => console.log('Single blur', e), clearable: true }), h("cat-select", { label: "Single with img", ref: el => (this.singleSelectAvatar = el), value: '1', onCatChange: () => { var _a; return console.log((_a = this.singleSelectAvatar) === null || _a === void 0 ? void 0 : _a.value); }, placeholder: "Search for a country or capital", clearable: true }), h("cat-select", { label: "Single with tagging support", ref: el => (this.singleSelectTagging = el), value: { id: '1', tag: '' }, placeholder: "Search for a country or capital", onCatChange: () => { var _a; return console.log('Single', (_a = this.singleSelectTagging) === null || _a === void 0 ? void 0 : _a.value); }, tagHint: "new country", tags: true, clearable: true })));
|
|
5905
5917
|
}
|
|
5906
5918
|
get countryConnector() {
|
|
5907
5919
|
return {
|