@triptease/tt-navbar 0.0.61 → 0.0.64
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/test/tt-navbar.test.js +1 -1
- package/dist/test/tt-navbar.test.js.map +1 -1
- package/dist/web/Config.js +1 -1
- package/dist/web/Routes.js +1 -1
- package/dist/web/TtNavbar.js +229 -150
- package/dist/web/TtNavbar.js.map +4 -4
- package/dist/web/getInitialNavbarState.js +1 -1
- package/dist/web/global.d.js +1 -1
- package/dist/web/index.js +229 -150
- package/dist/web/index.js.map +4 -4
- package/dist/web/styles.js +1 -1
- package/dist/web/triptease-logo.js +1 -1
- package/dist/web/tt-navbar.js +229 -150
- package/dist/web/tt-navbar.js.map +4 -4
- package/dist/web/urlMappings.js +1 -1
- package/package.json +2 -2
- package/test/tt-navbar.test.ts +3 -2
package/dist/web/global.d.js
CHANGED
package/dist/web/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @triptease/tt-navbar v0.0.
|
|
2
|
+
* @triptease/tt-navbar v0.0.64
|
|
3
3
|
*/
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -686,6 +686,11 @@ var t4 = class extends e8 {
|
|
|
686
686
|
t4.directiveName = "unsafeSVG", t4.resultType = 2;
|
|
687
687
|
var o8 = e7(t4);
|
|
688
688
|
|
|
689
|
+
// node_modules/@triptease/icons/dist/src/icons/alert.js
|
|
690
|
+
var alert = `<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
691
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M10 20C15.5228 20 20 15.5228 20 10C20 4.47715 15.5228 0 10 0C4.47715 0 0 4.47715 0 10C0 15.5228 4.47715 20 10 20ZM9.25 5.75C9.25 5.33579 9.58579 5 10 5C10.4142 5 10.75 5.33579 10.75 5.75V11.25C10.75 11.6642 10.4142 12 10 12C9.58579 12 9.25 11.6642 9.25 11.25V5.75ZM10.75 13.75C10.75 14.1642 10.4142 14.5 10 14.5C9.58579 14.5 9.25 14.1642 9.25 13.75C9.25 13.3358 9.58579 13 10 13C10.4142 13 10.75 13.3358 10.75 13.75Z" fill="#3B353B"/>
|
|
692
|
+
</svg>`;
|
|
693
|
+
|
|
689
694
|
// node_modules/@triptease/icons/dist/src/icons/campaigns.js
|
|
690
695
|
var campaigns = `<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
|
|
691
696
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.75 11C13.75 9.47056 14.1646 8.11984 14.7956 7.17338C15.1658 6.61803 15.5905 6.22612 16.0341 5.99602L17.0795 5.75165C17.8298 5.78274 18.5916 6.25415 19.2044 7.17338C19.8354 8.11984 20.25 9.47056 20.25 11C20.25 12.5294 19.8354 13.8802 19.2044 14.8266C18.5916 15.7458 17.8298 16.2173 17.0794 16.2484L16.0341 16.004C15.5905 15.7739 15.1659 15.382 14.7956 14.8266C14.1646 13.8802 13.75 12.5294 13.75 11ZM12.25 11C12.25 9.3468 12.6627 7.80949 13.373 6.61808L5.48783 8.46138C4.46994 8.69932 3.75 9.60698 3.75 10.6523V11.3477C3.75 12.393 4.46994 13.3007 5.48783 13.5386L13.373 15.3819C12.6627 14.1905 12.25 12.6532 12.25 11ZM5.14639 7.00075L15.5263 4.57427C15.9817 4.36663 16.4756 4.25 17 4.25C18.4334 4.25 19.6392 5.12146 20.4525 6.34133C21.2692 7.56645 21.75 9.21573 21.75 11C21.75 12.7843 21.2692 14.4335 20.4525 15.6587C19.6392 16.8785 18.4334 17.75 17 17.75C16.4756 17.75 15.9817 17.6334 15.5263 17.4257L11.75 16.5429V17.5C11.75 19.2949 10.2949 20.75 8.5 20.75C6.70507 20.75 5.25 19.2949 5.25 17.5V15.0235L5.14639 14.9992C3.4499 14.6027 2.25 13.0899 2.25 11.3477V10.6523C2.25 8.91009 3.4499 7.39734 5.14639 7.00075ZM6.75 15.3741V17.5C6.75 18.4665 7.5335 19.25 8.5 19.25C9.4665 19.25 10.25 18.4665 10.25 17.5V16.1923L6.75 15.3741Z" />
|
|
@@ -865,20 +870,6 @@ var i6 = e7(class extends i5 {
|
|
|
865
870
|
}
|
|
866
871
|
});
|
|
867
872
|
|
|
868
|
-
// node_modules/@triptease/tt-combobox/node_modules/@triptease/icons/dist/src/icons/chevron-down.js
|
|
869
|
-
var chevronDown2 = `
|
|
870
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="currentColor" class="bi bi-chevron-down chevron-down"
|
|
871
|
-
viewBox="0 0 16 16" role="presentation">
|
|
872
|
-
<path fill-rule="evenodd"
|
|
873
|
-
d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"
|
|
874
|
-
stroke="currentColor"/>
|
|
875
|
-
</svg>`;
|
|
876
|
-
|
|
877
|
-
// node_modules/@triptease/tt-combobox/node_modules/@triptease/icons/dist/src/icons/alert.js
|
|
878
|
-
var alert2 = `<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
879
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M10 20C15.5228 20 20 15.5228 20 10C20 4.47715 15.5228 0 10 0C4.47715 0 0 4.47715 0 10C0 15.5228 4.47715 20 10 20ZM9.25 5.75C9.25 5.33579 9.58579 5 10 5C10.4142 5 10.75 5.33579 10.75 5.75V11.25C10.75 11.6642 10.4142 12 10 12C9.58579 12 9.25 11.6642 9.25 11.25V5.75ZM10.75 13.75C10.75 14.1642 10.4142 14.5 10 14.5C9.58579 14.5 9.25 14.1642 9.25 13.75C9.25 13.3358 9.58579 13 10 13C10.4142 13 10.75 13.3358 10.75 13.75Z" fill="#3B353B"/>
|
|
880
|
-
</svg>`;
|
|
881
|
-
|
|
882
873
|
// node_modules/@triptease/tt-combobox/dist/src/styles.js
|
|
883
874
|
var styles = i`
|
|
884
875
|
:host {
|
|
@@ -1042,56 +1033,39 @@ var styles = i`
|
|
|
1042
1033
|
overflow-y: auto;
|
|
1043
1034
|
|
|
1044
1035
|
|
|
1045
|
-
|
|
1046
|
-
display:
|
|
1047
|
-
|
|
1048
|
-
box-sizing: border-box;
|
|
1049
|
-
text-align: left;
|
|
1050
|
-
text-overflow: ellipsis;
|
|
1051
|
-
text-wrap: nowrap;
|
|
1052
|
-
align-items: center;
|
|
1053
|
-
gap: 0.25rem;
|
|
1054
|
-
max-width: 100%;
|
|
1055
|
-
width: 100%;
|
|
1056
|
-
overflow-y: visible;
|
|
1057
|
-
flex: 1;
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
input[type="checkbox"] {
|
|
1061
|
-
width: var(--checkbox-size, var(--space-scale-2));
|
|
1062
|
-
aspect-ratio: 1;
|
|
1063
|
-
flex: 0 0 auto;
|
|
1064
|
-
}
|
|
1036
|
+
.no-results {
|
|
1037
|
+
display: none;
|
|
1038
|
+
}
|
|
1065
1039
|
|
|
1066
|
-
|
|
1067
|
-
|
|
1040
|
+
&:not(:has(tt-option:not([hidden], .select-all))) {
|
|
1041
|
+
.no-results {
|
|
1042
|
+
display: flex;
|
|
1043
|
+
padding: 0.5rem;
|
|
1044
|
+
box-sizing: border-box;
|
|
1045
|
+
text-align: left;
|
|
1068
1046
|
text-overflow: ellipsis;
|
|
1069
|
-
|
|
1047
|
+
text-wrap: nowrap;
|
|
1048
|
+
align-items: center;
|
|
1049
|
+
gap: 0.25rem;
|
|
1050
|
+
max-width: 100%;
|
|
1051
|
+
width: 100%;
|
|
1052
|
+
overflow-y: visible;
|
|
1070
1053
|
flex: 1;
|
|
1071
|
-
line-height: 1.1;
|
|
1072
|
-
}
|
|
1073
|
-
|
|
1074
|
-
&.no-results {
|
|
1075
|
-
display: none;
|
|
1076
|
-
}
|
|
1077
1054
|
|
|
1078
|
-
&[aria-hidden="true"] {
|
|
1079
|
-
visibility: hidden;
|
|
1080
|
-
display: none;
|
|
1081
|
-
}
|
|
1082
|
-
}
|
|
1083
1055
|
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1056
|
+
span {
|
|
1057
|
+
overflow: hidden;
|
|
1058
|
+
text-overflow: ellipsis;
|
|
1059
|
+
white-space: nowrap;
|
|
1060
|
+
flex: 1;
|
|
1061
|
+
line-height: 1.1;
|
|
1062
|
+
}
|
|
1087
1063
|
}
|
|
1088
1064
|
|
|
1089
1065
|
.select-all {
|
|
1090
1066
|
display: none;
|
|
1091
1067
|
}
|
|
1092
1068
|
}
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
1069
|
}
|
|
1096
1070
|
|
|
1097
1071
|
[role="combobox"][aria-expanded="true"] ~ [role="listbox"][data-open-upward] {
|
|
@@ -1105,50 +1079,10 @@ var styles = i`
|
|
|
1105
1079
|
aspect-ratio: 1;
|
|
1106
1080
|
}
|
|
1107
1081
|
|
|
1108
|
-
|
|
1082
|
+
tt-option.select-all::part(option) {
|
|
1109
1083
|
border-bottom: 1px solid var(--color-border-300);
|
|
1110
1084
|
}
|
|
1111
1085
|
|
|
1112
|
-
[aria-multiselectable="false"] [role="option"][aria-selected="true"] {
|
|
1113
|
-
color: var(--tt-combobox-option-selected-color, var(--color-primary-400));
|
|
1114
|
-
font-weight: var(--font-weight-medium);
|
|
1115
|
-
}
|
|
1116
|
-
|
|
1117
|
-
[role="option"]:is(:hover, [data-active="true"]) {
|
|
1118
|
-
background-color: var(--tt-combobox-option-background-color-hover, inherit);
|
|
1119
|
-
color: var(--tt-combobox-option-color-hover, inherit);
|
|
1120
|
-
|
|
1121
|
-
&:first-child {
|
|
1122
|
-
border-top-left-radius: var(--border-radius);
|
|
1123
|
-
border-top-right-radius: var(--border-radius);
|
|
1124
|
-
}
|
|
1125
|
-
|
|
1126
|
-
&:last-child {
|
|
1127
|
-
border-bottom-left-radius: var(--border-radius);
|
|
1128
|
-
border-bottom-right-radius: var(--border-radius);
|
|
1129
|
-
}
|
|
1130
|
-
}
|
|
1131
|
-
|
|
1132
|
-
[role="option"]:hover {
|
|
1133
|
-
cursor: pointer;
|
|
1134
|
-
}
|
|
1135
|
-
|
|
1136
|
-
[role="option"][aria-disabled="true"] {
|
|
1137
|
-
pointer-events: none;
|
|
1138
|
-
opacity: 0.5;
|
|
1139
|
-
}
|
|
1140
|
-
|
|
1141
|
-
[role="listbox"][aria-multiselectable="true"] [role="option"] input[type="checkbox"] {
|
|
1142
|
-
accent-color: var(--color-primary-400);
|
|
1143
|
-
width: var(--checkbox-size, var(--space-scale-2));
|
|
1144
|
-
aspect-ratio: 1;
|
|
1145
|
-
pointer-events: none;
|
|
1146
|
-
}
|
|
1147
|
-
|
|
1148
|
-
[role="listbox"][aria-multiselectable="true"] [role="option"][aria-disabled="true"] input[type="checkbox"] {
|
|
1149
|
-
pointer-events: none;
|
|
1150
|
-
}
|
|
1151
|
-
|
|
1152
1086
|
label {
|
|
1153
1087
|
font-size: var(--tt-combobox-label-font-size, inherit);
|
|
1154
1088
|
color: var(--tt-combobox-label-color, inherit);
|
|
@@ -1157,7 +1091,6 @@ var styles = i`
|
|
|
1157
1091
|
&[data-hidden] {
|
|
1158
1092
|
display: none;
|
|
1159
1093
|
}
|
|
1160
|
-
|
|
1161
1094
|
}
|
|
1162
1095
|
`;
|
|
1163
1096
|
|
|
@@ -1167,7 +1100,13 @@ var TtCombobox = class extends i4 {
|
|
|
1167
1100
|
return this.internals.form;
|
|
1168
1101
|
}
|
|
1169
1102
|
get _isAllSelected() {
|
|
1170
|
-
return Array.from(this.
|
|
1103
|
+
return Boolean(this._visibleOptionsNotSelectAll.length) && Array.from(this._visibleOptionsNotSelectAll).every((option) => this.value.includes(option.value));
|
|
1104
|
+
}
|
|
1105
|
+
get _selectedVisibleOptions() {
|
|
1106
|
+
return Array.from(this._visibleOptions).filter((option) => this.value.includes(option.value));
|
|
1107
|
+
}
|
|
1108
|
+
get _selectedOptions() {
|
|
1109
|
+
return Array.from(this._visibleOptionsNotSelectAll).filter((option) => this.value.includes(option.value));
|
|
1171
1110
|
}
|
|
1172
1111
|
constructor() {
|
|
1173
1112
|
super();
|
|
@@ -1193,7 +1132,7 @@ var TtCombobox = class extends i4 {
|
|
|
1193
1132
|
});
|
|
1194
1133
|
this._valueChanged = () => {
|
|
1195
1134
|
this._selectableOptions.forEach((option) => {
|
|
1196
|
-
if (this.value.includes(option.
|
|
1135
|
+
if (this.value.includes(option.value)) {
|
|
1197
1136
|
this._checkOption(option);
|
|
1198
1137
|
} else {
|
|
1199
1138
|
this._uncheckOption(option);
|
|
@@ -1210,14 +1149,14 @@ var TtCombobox = class extends i4 {
|
|
|
1210
1149
|
event.preventDefault();
|
|
1211
1150
|
event.stopPropagation();
|
|
1212
1151
|
if (this._filter !== "" && this._isAllSelected) {
|
|
1213
|
-
const selectedVisibleValues =
|
|
1152
|
+
const selectedVisibleValues = this._selectedVisibleOptions.map((option) => option.value);
|
|
1214
1153
|
this.value = this.value.filter((value) => !selectedVisibleValues.includes(value));
|
|
1215
1154
|
} else if (this._filter !== "") {
|
|
1216
|
-
this.value = Array.from(/* @__PURE__ */ new Set([...this.value, ...Array.from(this._selectableVisibleOptions).map((option) => option.
|
|
1155
|
+
this.value = Array.from(/* @__PURE__ */ new Set([...this.value, ...Array.from(this._selectableVisibleOptions).map((option) => option.value)]));
|
|
1217
1156
|
} else if (this.value.length === this._selectableOptions.length) {
|
|
1218
1157
|
this.value = [];
|
|
1219
1158
|
} else {
|
|
1220
|
-
this.value = Array.from(this._selectableOptions).map((option) => option.
|
|
1159
|
+
this.value = Array.from(this._selectableOptions).map((option) => option.value);
|
|
1221
1160
|
}
|
|
1222
1161
|
};
|
|
1223
1162
|
this._renderSelectAll = () => {
|
|
@@ -1228,25 +1167,23 @@ var TtCombobox = class extends i4 {
|
|
|
1228
1167
|
const active = this._getActiveOptionId() === id;
|
|
1229
1168
|
const selected = this._isAllSelected;
|
|
1230
1169
|
return x`
|
|
1231
|
-
<
|
|
1170
|
+
<tt-option
|
|
1171
|
+
id="${id}"
|
|
1232
1172
|
class="select-all"
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
data-active=${active}
|
|
1173
|
+
?selected=${selected}
|
|
1174
|
+
?active=${active}
|
|
1175
|
+
include-checkbox
|
|
1237
1176
|
@click="${this._selectAll}"
|
|
1238
|
-
|
|
1239
|
-
data-value="select-all"
|
|
1177
|
+
exportparts="option, checkbox"
|
|
1240
1178
|
part="option"
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
</li>`;
|
|
1179
|
+
value="select-all"
|
|
1180
|
+
>Select all</tt-option>
|
|
1181
|
+
`;
|
|
1245
1182
|
};
|
|
1246
1183
|
this._renderChevron = () => x`
|
|
1247
1184
|
<button type="button" aria-label="Expand" @click="${this._onChevronClick}" aria-expanded="${this._expanded}"
|
|
1248
1185
|
aria-controls="${this.id}-list" tabindex="-1" ?disabled=${this.disabled} part="arrow">
|
|
1249
|
-
${o8(
|
|
1186
|
+
${o8(chevronDown)}
|
|
1250
1187
|
</button>
|
|
1251
1188
|
`;
|
|
1252
1189
|
this.internals = this.attachInternals();
|
|
@@ -1286,7 +1223,8 @@ var TtCombobox = class extends i4 {
|
|
|
1286
1223
|
}
|
|
1287
1224
|
if (changedProperties.has("options")) {
|
|
1288
1225
|
this.updateComplete.then(() => {
|
|
1289
|
-
|
|
1226
|
+
const selectedAssignedOptions = Array.from(this.options).filter((option) => option.selected);
|
|
1227
|
+
this.value = Array.from(/* @__PURE__ */ new Set([...this.value, ...selectedAssignedOptions.map((option) => option.value)]));
|
|
1290
1228
|
this._listenForOptionChange();
|
|
1291
1229
|
});
|
|
1292
1230
|
}
|
|
@@ -1294,7 +1232,7 @@ var TtCombobox = class extends i4 {
|
|
|
1294
1232
|
}
|
|
1295
1233
|
_reportValidity() {
|
|
1296
1234
|
if (this.required && !this.value.length) {
|
|
1297
|
-
const errorMessage = this.multiselect ? "Please select at least one option" : "Please select an option";
|
|
1235
|
+
const errorMessage = this.multiselect ? "Please select at least one tt-option" : "Please select an tt-option";
|
|
1298
1236
|
this.internals.setValidity({
|
|
1299
1237
|
valueMissing: true
|
|
1300
1238
|
}, errorMessage, this._comboboxInput);
|
|
@@ -1391,7 +1329,9 @@ var TtCombobox = class extends i4 {
|
|
|
1391
1329
|
event.preventDefault();
|
|
1392
1330
|
event.stopPropagation();
|
|
1393
1331
|
const option = event.currentTarget;
|
|
1394
|
-
|
|
1332
|
+
if (option.disabled)
|
|
1333
|
+
return;
|
|
1334
|
+
const selectedValue = option.value;
|
|
1395
1335
|
if (this.multiselect) {
|
|
1396
1336
|
if (this.value.includes(selectedValue)) {
|
|
1397
1337
|
this.value = this.value.filter((value) => value !== selectedValue);
|
|
@@ -1405,7 +1345,7 @@ var TtCombobox = class extends i4 {
|
|
|
1405
1345
|
}
|
|
1406
1346
|
_onInput(event) {
|
|
1407
1347
|
const input = event.target;
|
|
1408
|
-
const filter2 = input.value
|
|
1348
|
+
const filter2 = input.value;
|
|
1409
1349
|
if (filter2 !== "" && !this._expanded) {
|
|
1410
1350
|
this._expanded = true;
|
|
1411
1351
|
}
|
|
@@ -1429,11 +1369,11 @@ var TtCombobox = class extends i4 {
|
|
|
1429
1369
|
if (this.disabled) {
|
|
1430
1370
|
return "Disabled";
|
|
1431
1371
|
}
|
|
1432
|
-
if (!this.
|
|
1372
|
+
if (!this.value.length) {
|
|
1433
1373
|
return "No options selected";
|
|
1434
1374
|
}
|
|
1435
|
-
if (this.
|
|
1436
|
-
return this.
|
|
1375
|
+
if (this.value.length === 1) {
|
|
1376
|
+
return Array.from(this._selectableVisibleOptions).find((option) => option.value === this.value[0])?.textContent?.trim();
|
|
1437
1377
|
}
|
|
1438
1378
|
if (this._isAllSelected) {
|
|
1439
1379
|
return this.selectAllPlaceholder || "All options selected";
|
|
@@ -1468,28 +1408,24 @@ var TtCombobox = class extends i4 {
|
|
|
1468
1408
|
/>`;
|
|
1469
1409
|
}
|
|
1470
1410
|
_renderOption(option) {
|
|
1471
|
-
const hidden = Boolean(this._filter !== "" && !option.value.toLowerCase().includes(this._filter) && !option.innerText.toLowerCase().includes(this._filter) || option.hidden);
|
|
1411
|
+
const hidden = Boolean(this._filter !== "" && !option.value.toLowerCase().includes(this._filter.toLowerCase()) && !option.innerText.toLowerCase().includes(this._filter.toLowerCase()) || option.hidden);
|
|
1472
1412
|
const id = `${this.id}-option-${option.value}`;
|
|
1473
1413
|
const active = this._getActiveOptionId() === id;
|
|
1474
|
-
const selected =
|
|
1414
|
+
const selected = this.value.includes(option.value);
|
|
1475
1415
|
return x`
|
|
1476
|
-
<
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1416
|
+
<tt-option
|
|
1417
|
+
id="${id}"
|
|
1418
|
+
value="${option.value}"
|
|
1419
|
+
?selected=${selected}
|
|
1420
|
+
?disabled=${option.disabled}
|
|
1421
|
+
?active=${active}
|
|
1422
|
+
?include-checkbox=${this.multiselect}
|
|
1423
|
+
?hidden=${hidden}
|
|
1481
1424
|
@click="${this._onClickOption}"
|
|
1482
|
-
@mousedown="${(event) => event.preventDefault()}"
|
|
1483
|
-
data-value="${option.value}"
|
|
1484
|
-
aria-disabled=${option.disabled}
|
|
1485
|
-
aria-hidden=${hidden || E}
|
|
1486
|
-
data-deselectable=${!option.selected}
|
|
1487
|
-
part="option"
|
|
1488
1425
|
>
|
|
1489
|
-
${
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
</li>`;
|
|
1426
|
+
${o7(option.innerHTML)}
|
|
1427
|
+
</tt-option>
|
|
1428
|
+
`;
|
|
1493
1429
|
}
|
|
1494
1430
|
_hasErrorContent() {
|
|
1495
1431
|
return this.errorElements?.length > 0;
|
|
@@ -1519,7 +1455,7 @@ var TtCombobox = class extends i4 {
|
|
|
1519
1455
|
<slot name="option" @slotchange=${() => this.requestUpdate("options")}></slot>
|
|
1520
1456
|
<div class="errormessage" id="error-msg-${this.id}" role="alert" aria-atomic="true"
|
|
1521
1457
|
?data-hidden="${!this._hasErrorContent()}" part="error">
|
|
1522
|
-
${o8(
|
|
1458
|
+
${o8(alert)}
|
|
1523
1459
|
<slot name="error"></slot>
|
|
1524
1460
|
</div>
|
|
1525
1461
|
`;
|
|
@@ -1577,26 +1513,23 @@ __decorate([
|
|
|
1577
1513
|
o6({ slot: "option", selector: "option" })
|
|
1578
1514
|
], TtCombobox.prototype, "options", void 0);
|
|
1579
1515
|
__decorate([
|
|
1580
|
-
o6({ slot: "option", selector: "option:not([disabled])" })
|
|
1516
|
+
o6({ slot: "option", selector: "tt-option:not([disabled])" })
|
|
1581
1517
|
], TtCombobox.prototype, "activeOptions", void 0);
|
|
1582
1518
|
__decorate([
|
|
1583
1519
|
o6({ slot: "error" })
|
|
1584
1520
|
], TtCombobox.prototype, "errorElements", void 0);
|
|
1585
1521
|
__decorate([
|
|
1586
|
-
r6(
|
|
1522
|
+
r6("tt-option:not([hidden], [disabled])")
|
|
1587
1523
|
], TtCombobox.prototype, "_visibleOptions", void 0);
|
|
1588
1524
|
__decorate([
|
|
1589
|
-
r6(
|
|
1525
|
+
r6("tt-option:not([hidden], .select-all")
|
|
1526
|
+
], TtCombobox.prototype, "_visibleOptionsNotSelectAll", void 0);
|
|
1527
|
+
__decorate([
|
|
1528
|
+
r6("tt-option:not([disabled], .select-all)")
|
|
1590
1529
|
], TtCombobox.prototype, "_selectableOptions", void 0);
|
|
1591
1530
|
__decorate([
|
|
1592
|
-
r6(
|
|
1531
|
+
r6("tt-option:not([disabled], [hidden], .select-all)")
|
|
1593
1532
|
], TtCombobox.prototype, "_selectableVisibleOptions", void 0);
|
|
1594
|
-
__decorate([
|
|
1595
|
-
r6('li[role="option"]:not([data-value="select-all"])[aria-selected="true"]')
|
|
1596
|
-
], TtCombobox.prototype, "_selectedOptions", void 0);
|
|
1597
|
-
__decorate([
|
|
1598
|
-
r6('li[role="option"]:not([data-value="select-all"], [aria-hidden="true"])[aria-selected="true"]')
|
|
1599
|
-
], TtCombobox.prototype, "_selectedVisibleOptions", void 0);
|
|
1600
1533
|
__decorate([
|
|
1601
1534
|
e5('input[role="combobox"]')
|
|
1602
1535
|
], TtCombobox.prototype, "_comboboxInput", void 0);
|
|
@@ -1607,6 +1540,152 @@ __decorate([
|
|
|
1607
1540
|
n4({ type: Array, attribute: "value" })
|
|
1608
1541
|
], TtCombobox.prototype, "value", void 0);
|
|
1609
1542
|
|
|
1543
|
+
// node_modules/@triptease/tt-combobox/dist/src/tt-option/styles.js
|
|
1544
|
+
var styles2 = i`
|
|
1545
|
+
li {
|
|
1546
|
+
cursor: pointer;
|
|
1547
|
+
display: flex;
|
|
1548
|
+
padding: 0.5rem;
|
|
1549
|
+
box-sizing: border-box;
|
|
1550
|
+
text-align: left;
|
|
1551
|
+
text-overflow: ellipsis;
|
|
1552
|
+
text-wrap: nowrap;
|
|
1553
|
+
align-items: center;
|
|
1554
|
+
gap: 0.25rem;
|
|
1555
|
+
max-width: 100%;
|
|
1556
|
+
width: 100%;
|
|
1557
|
+
overflow-y: visible;
|
|
1558
|
+
flex: 1;
|
|
1559
|
+
|
|
1560
|
+
input[type="checkbox"] {
|
|
1561
|
+
width: var(--checkbox-size, var(--space-scale-2));
|
|
1562
|
+
aspect-ratio: 1;
|
|
1563
|
+
flex: 0 0 auto;
|
|
1564
|
+
accent-color: var(--color-primary-400);
|
|
1565
|
+
pointer-events: none;
|
|
1566
|
+
}
|
|
1567
|
+
|
|
1568
|
+
span {
|
|
1569
|
+
overflow: hidden;
|
|
1570
|
+
text-overflow: ellipsis;
|
|
1571
|
+
white-space: nowrap;
|
|
1572
|
+
flex: 1;
|
|
1573
|
+
line-height: 1.1;
|
|
1574
|
+
}
|
|
1575
|
+
|
|
1576
|
+
&[aria-hidden="true"] {
|
|
1577
|
+
visibility: hidden;
|
|
1578
|
+
display: none;
|
|
1579
|
+
}
|
|
1580
|
+
|
|
1581
|
+
&[aria-disabled="true"] {
|
|
1582
|
+
pointer-events: none;
|
|
1583
|
+
opacity: 0.5;
|
|
1584
|
+
}
|
|
1585
|
+
|
|
1586
|
+
&[aria-selected="true"]:not(:has(input[type="checkbox"])) {
|
|
1587
|
+
color: var(--tt-combobox-option-selected-color, var(--color-primary-400));
|
|
1588
|
+
font-weight: var(--font-weight-medium);
|
|
1589
|
+
}
|
|
1590
|
+
}
|
|
1591
|
+
|
|
1592
|
+
:host([active]), :host(:hover) {
|
|
1593
|
+
li {
|
|
1594
|
+
background-color: var(--tt-combobox-option-background-color-hover, var(--color-surface-300));
|
|
1595
|
+
color: var(--tt-combobox-option-color-hover, inherit);
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1598
|
+
&:first-child li {
|
|
1599
|
+
border-top-left-radius: var(--border-radius);
|
|
1600
|
+
border-top-right-radius: var(--border-radius);
|
|
1601
|
+
}
|
|
1602
|
+
|
|
1603
|
+
&:last-child li {
|
|
1604
|
+
border-bottom-left-radius: var(--border-radius);
|
|
1605
|
+
border-bottom-right-radius: var(--border-radius);
|
|
1606
|
+
}
|
|
1607
|
+
}
|
|
1608
|
+
|
|
1609
|
+
:host([disabled]) {
|
|
1610
|
+
pointer-events: none;
|
|
1611
|
+
}
|
|
1612
|
+
`;
|
|
1613
|
+
|
|
1614
|
+
// node_modules/@triptease/tt-combobox/dist/src/tt-option/TtOption.js
|
|
1615
|
+
var TtOption = class extends i4 {
|
|
1616
|
+
constructor() {
|
|
1617
|
+
super(...arguments);
|
|
1618
|
+
this.disabled = false;
|
|
1619
|
+
this.selected = false;
|
|
1620
|
+
this.active = false;
|
|
1621
|
+
this.value = "";
|
|
1622
|
+
this.includeCheckbox = false;
|
|
1623
|
+
this._onClick = (event) => {
|
|
1624
|
+
if (this.disabled) {
|
|
1625
|
+
event.preventDefault();
|
|
1626
|
+
event.stopImmediatePropagation();
|
|
1627
|
+
event.stopPropagation();
|
|
1628
|
+
}
|
|
1629
|
+
};
|
|
1630
|
+
}
|
|
1631
|
+
connectedCallback() {
|
|
1632
|
+
super.connectedCallback();
|
|
1633
|
+
this.addEventListener("click", this._onClick);
|
|
1634
|
+
}
|
|
1635
|
+
disconnectedCallback() {
|
|
1636
|
+
super.disconnectedCallback();
|
|
1637
|
+
this.removeEventListener("click", this._onClick);
|
|
1638
|
+
}
|
|
1639
|
+
render() {
|
|
1640
|
+
return x`
|
|
1641
|
+
<li
|
|
1642
|
+
role="option"
|
|
1643
|
+
aria-selected="${this.selected}"
|
|
1644
|
+
aria-disabled="${this.disabled}"
|
|
1645
|
+
?aria-hidden="${this.hidden}"
|
|
1646
|
+
data-active="${this.active}"
|
|
1647
|
+
data-value="${this.value}"
|
|
1648
|
+
@click="${this._onClick}"
|
|
1649
|
+
@mousedown="${(event) => event.preventDefault()}"
|
|
1650
|
+
part="option"
|
|
1651
|
+
>
|
|
1652
|
+
${this.includeCheckbox ? x`<input type="checkbox" ?checked=${this.selected}
|
|
1653
|
+
role="presentation" tabindex="-1" part="checkbox">` : E}
|
|
1654
|
+
<span>
|
|
1655
|
+
<slot></slot>
|
|
1656
|
+
</span>
|
|
1657
|
+
</li>
|
|
1658
|
+
`;
|
|
1659
|
+
}
|
|
1660
|
+
};
|
|
1661
|
+
TtOption.styles = styles2;
|
|
1662
|
+
TtOption.shadowRootOptions = {
|
|
1663
|
+
...i4.shadowRootOptions,
|
|
1664
|
+
delegatesFocus: true
|
|
1665
|
+
};
|
|
1666
|
+
__decorate([
|
|
1667
|
+
n4({ type: Boolean })
|
|
1668
|
+
], TtOption.prototype, "disabled", void 0);
|
|
1669
|
+
__decorate([
|
|
1670
|
+
n4({ type: Boolean })
|
|
1671
|
+
], TtOption.prototype, "selected", void 0);
|
|
1672
|
+
__decorate([
|
|
1673
|
+
n4({ type: Boolean })
|
|
1674
|
+
], TtOption.prototype, "active", void 0);
|
|
1675
|
+
__decorate([
|
|
1676
|
+
n4({ type: String })
|
|
1677
|
+
], TtOption.prototype, "value", void 0);
|
|
1678
|
+
__decorate([
|
|
1679
|
+
n4({ type: Boolean, attribute: "include-checkbox" })
|
|
1680
|
+
], TtOption.prototype, "includeCheckbox", void 0);
|
|
1681
|
+
|
|
1682
|
+
// node_modules/@triptease/tt-combobox/dist/src/tt-option/tt-option.js
|
|
1683
|
+
if (typeof window !== "undefined") {
|
|
1684
|
+
if (!window.customElements.get("tt-option")) {
|
|
1685
|
+
window.customElements.define("tt-option", TtOption);
|
|
1686
|
+
}
|
|
1687
|
+
}
|
|
1688
|
+
|
|
1610
1689
|
// node_modules/@triptease/tt-combobox/dist/src/tt-combobox.js
|
|
1611
1690
|
if (typeof window !== "undefined") {
|
|
1612
1691
|
if (!window.customElements.get("tt-combobox")) {
|
|
@@ -1627,7 +1706,7 @@ var visuallyHiddenCss = i`
|
|
|
1627
1706
|
clip-path: inset(50%);
|
|
1628
1707
|
white-space: nowrap;
|
|
1629
1708
|
`;
|
|
1630
|
-
var
|
|
1709
|
+
var styles3 = i`
|
|
1631
1710
|
:host {
|
|
1632
1711
|
--nav-bar-width: 260px;
|
|
1633
1712
|
|
|
@@ -2341,7 +2420,7 @@ var TtNavbar = class extends i4 {
|
|
|
2341
2420
|
`;
|
|
2342
2421
|
}
|
|
2343
2422
|
};
|
|
2344
|
-
TtNavbar.styles =
|
|
2423
|
+
TtNavbar.styles = styles3;
|
|
2345
2424
|
__decorateClass([
|
|
2346
2425
|
n4({ type: Function })
|
|
2347
2426
|
], TtNavbar.prototype, "navigate", 2);
|