@abgov/react-components 4.0.0-alpha.129 → 4.0.0-alpha.130
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/package.json +1 -1
- package/react-components.esm.js +124 -84
- package/react-components.umd.js +124 -84
package/package.json
CHANGED
package/react-components.esm.js
CHANGED
|
@@ -6725,16 +6725,16 @@ customElements.define("goa-divider", Divider);
|
|
|
6725
6725
|
|
|
6726
6726
|
function get_each_context_1(ctx, list, i) {
|
|
6727
6727
|
const child_ctx = ctx.slice();
|
|
6728
|
-
child_ctx[
|
|
6729
|
-
child_ctx[
|
|
6728
|
+
child_ctx[50] = list[i];
|
|
6729
|
+
child_ctx[54] = i;
|
|
6730
6730
|
return child_ctx;
|
|
6731
6731
|
}
|
|
6732
6732
|
|
|
6733
6733
|
function get_each_context$4(ctx, list, i) {
|
|
6734
6734
|
const child_ctx = ctx.slice();
|
|
6735
|
-
child_ctx[
|
|
6735
|
+
child_ctx[50] = list[i];
|
|
6736
6736
|
return child_ctx;
|
|
6737
|
-
} // (
|
|
6737
|
+
} // (270:2) {:else}
|
|
6738
6738
|
|
|
6739
6739
|
|
|
6740
6740
|
function create_else_block$5(ctx) {
|
|
@@ -6760,7 +6760,7 @@ function create_else_block$5(ctx) {
|
|
|
6760
6760
|
|
|
6761
6761
|
const get_key = ctx =>
|
|
6762
6762
|
/*index*/
|
|
6763
|
-
ctx[
|
|
6763
|
+
ctx[54];
|
|
6764
6764
|
|
|
6765
6765
|
for (let i = 0; i < each_value_1.length; i += 1) {
|
|
6766
6766
|
let child_ctx = get_each_context_1(ctx, each_value_1, i);
|
|
@@ -6825,9 +6825,15 @@ function create_else_block$5(ctx) {
|
|
|
6825
6825
|
attr(ul, "data-testid", "dropdown-menu");
|
|
6826
6826
|
attr(ul, "tabindex", "0");
|
|
6827
6827
|
attr(ul, "class", "dropdown-list");
|
|
6828
|
-
attr(ul, "style", ul_style_value = `
|
|
6828
|
+
attr(ul, "style", ul_style_value = `
|
|
6829
|
+
overflow-y: auto;
|
|
6830
|
+
max-height: ${
|
|
6829
6831
|
/*maxheight*/
|
|
6830
|
-
ctx[3]}
|
|
6832
|
+
ctx[3]};
|
|
6833
|
+
--bottom: ${
|
|
6834
|
+
/*_dropdownMenuPos*/
|
|
6835
|
+
ctx[20]};
|
|
6836
|
+
`);
|
|
6831
6837
|
toggle_class(ul, "dropdown-active",
|
|
6832
6838
|
/*_isMenuVisible*/
|
|
6833
6839
|
ctx[17]);
|
|
@@ -6848,12 +6854,12 @@ function create_else_block$5(ctx) {
|
|
|
6848
6854
|
/*ul_binding*/
|
|
6849
6855
|
|
|
6850
6856
|
|
|
6851
|
-
ctx[
|
|
6857
|
+
ctx[34](ul);
|
|
6852
6858
|
|
|
6853
6859
|
if (!mounted) {
|
|
6854
6860
|
dispose = listen(goa_input, "click",
|
|
6855
6861
|
/*showMenu*/
|
|
6856
|
-
ctx[
|
|
6862
|
+
ctx[25]);
|
|
6857
6863
|
mounted = true;
|
|
6858
6864
|
}
|
|
6859
6865
|
},
|
|
@@ -6950,7 +6956,7 @@ function create_else_block$5(ctx) {
|
|
|
6950
6956
|
|
|
6951
6957
|
if (dirty[0] &
|
|
6952
6958
|
/*_options, _values, _highlightedIndex, onSelect*/
|
|
6953
|
-
|
|
6959
|
+
134516736) {
|
|
6954
6960
|
each_value_1 =
|
|
6955
6961
|
/*_options*/
|
|
6956
6962
|
ctx[12];
|
|
@@ -6966,10 +6972,16 @@ function create_else_block$5(ctx) {
|
|
|
6966
6972
|
}
|
|
6967
6973
|
|
|
6968
6974
|
if (dirty[0] &
|
|
6975
|
+
/*maxheight, _dropdownMenuPos*/
|
|
6976
|
+
1048584 && ul_style_value !== (ul_style_value = `
|
|
6977
|
+
overflow-y: auto;
|
|
6978
|
+
max-height: ${
|
|
6969
6979
|
/*maxheight*/
|
|
6970
|
-
|
|
6971
|
-
|
|
6972
|
-
|
|
6980
|
+
ctx[3]};
|
|
6981
|
+
--bottom: ${
|
|
6982
|
+
/*_dropdownMenuPos*/
|
|
6983
|
+
ctx[20]};
|
|
6984
|
+
`)) {
|
|
6973
6985
|
attr(ul, "style", ul_style_value);
|
|
6974
6986
|
}
|
|
6975
6987
|
|
|
@@ -6997,13 +7009,13 @@ function create_else_block$5(ctx) {
|
|
|
6997
7009
|
/*ul_binding*/
|
|
6998
7010
|
|
|
6999
7011
|
|
|
7000
|
-
ctx[
|
|
7012
|
+
ctx[34](null);
|
|
7001
7013
|
mounted = false;
|
|
7002
7014
|
dispose();
|
|
7003
7015
|
}
|
|
7004
7016
|
|
|
7005
7017
|
};
|
|
7006
|
-
} // (
|
|
7018
|
+
} // (251:2) {#if _native}
|
|
7007
7019
|
|
|
7008
7020
|
|
|
7009
7021
|
function create_if_block$f(ctx) {
|
|
@@ -7032,7 +7044,7 @@ function create_if_block$f(ctx) {
|
|
|
7032
7044
|
|
|
7033
7045
|
select.disabled =
|
|
7034
7046
|
/*_disabled*/
|
|
7035
|
-
ctx[
|
|
7047
|
+
ctx[23];
|
|
7036
7048
|
attr(select, "aria-label", select_aria_label_value =
|
|
7037
7049
|
/*arialabel*/
|
|
7038
7050
|
ctx[1] ||
|
|
@@ -7040,7 +7052,7 @@ function create_if_block$f(ctx) {
|
|
|
7040
7052
|
ctx[0]);
|
|
7041
7053
|
toggle_class(select, "error",
|
|
7042
7054
|
/*_error*/
|
|
7043
|
-
ctx[
|
|
7055
|
+
ctx[24]);
|
|
7044
7056
|
},
|
|
7045
7057
|
|
|
7046
7058
|
m(target, anchor) {
|
|
@@ -7053,12 +7065,12 @@ function create_if_block$f(ctx) {
|
|
|
7053
7065
|
/*select_binding*/
|
|
7054
7066
|
|
|
7055
7067
|
|
|
7056
|
-
ctx[
|
|
7068
|
+
ctx[32](select);
|
|
7057
7069
|
|
|
7058
7070
|
if (!mounted) {
|
|
7059
7071
|
dispose = listen(select, "change",
|
|
7060
7072
|
/*onNativeSelect*/
|
|
7061
|
-
ctx[
|
|
7073
|
+
ctx[28]);
|
|
7062
7074
|
mounted = true;
|
|
7063
7075
|
}
|
|
7064
7076
|
},
|
|
@@ -7093,10 +7105,10 @@ function create_if_block$f(ctx) {
|
|
|
7093
7105
|
|
|
7094
7106
|
if (dirty[0] &
|
|
7095
7107
|
/*_disabled*/
|
|
7096
|
-
|
|
7108
|
+
8388608) {
|
|
7097
7109
|
select.disabled =
|
|
7098
7110
|
/*_disabled*/
|
|
7099
|
-
ctx[
|
|
7111
|
+
ctx[23];
|
|
7100
7112
|
}
|
|
7101
7113
|
|
|
7102
7114
|
if (dirty[0] &
|
|
@@ -7111,10 +7123,10 @@ function create_if_block$f(ctx) {
|
|
|
7111
7123
|
|
|
7112
7124
|
if (dirty[0] &
|
|
7113
7125
|
/*_error*/
|
|
7114
|
-
|
|
7126
|
+
16777216) {
|
|
7115
7127
|
toggle_class(select, "error",
|
|
7116
7128
|
/*_error*/
|
|
7117
|
-
ctx[
|
|
7129
|
+
ctx[24]);
|
|
7118
7130
|
}
|
|
7119
7131
|
},
|
|
7120
7132
|
|
|
@@ -7123,18 +7135,19 @@ function create_if_block$f(ctx) {
|
|
|
7123
7135
|
destroy_each(each_blocks, detaching);
|
|
7124
7136
|
/*select_binding*/
|
|
7125
7137
|
|
|
7126
|
-
ctx[
|
|
7138
|
+
ctx[32](null);
|
|
7127
7139
|
mounted = false;
|
|
7128
7140
|
dispose();
|
|
7129
7141
|
}
|
|
7130
7142
|
|
|
7131
7143
|
};
|
|
7132
|
-
} // (
|
|
7144
|
+
} // (271:4) {#if _isMenuVisible}
|
|
7133
7145
|
|
|
7134
7146
|
|
|
7135
7147
|
function create_if_block_1$7(ctx) {
|
|
7136
7148
|
let div;
|
|
7137
7149
|
let div_data_testid_value;
|
|
7150
|
+
let noscroll_action;
|
|
7138
7151
|
let mounted;
|
|
7139
7152
|
let dispose;
|
|
7140
7153
|
return {
|
|
@@ -7150,9 +7163,13 @@ function create_if_block_1$7(ctx) {
|
|
|
7150
7163
|
insert(target, div, anchor);
|
|
7151
7164
|
|
|
7152
7165
|
if (!mounted) {
|
|
7153
|
-
dispose = listen(div, "click",
|
|
7166
|
+
dispose = [listen(div, "click",
|
|
7154
7167
|
/*closeMenu*/
|
|
7155
|
-
ctx[
|
|
7168
|
+
ctx[26]), action_destroyer(noscroll_action = noscroll.call(null, div, {
|
|
7169
|
+
enable:
|
|
7170
|
+
/*_isMenuVisible*/
|
|
7171
|
+
ctx[17]
|
|
7172
|
+
}))];
|
|
7156
7173
|
mounted = true;
|
|
7157
7174
|
}
|
|
7158
7175
|
},
|
|
@@ -7165,25 +7182,33 @@ function create_if_block_1$7(ctx) {
|
|
|
7165
7182
|
ctx[0]}-dropdown-background`)) {
|
|
7166
7183
|
attr(div, "data-testid", div_data_testid_value);
|
|
7167
7184
|
}
|
|
7185
|
+
|
|
7186
|
+
if (noscroll_action && is_function(noscroll_action.update) && dirty[0] &
|
|
7187
|
+
/*_isMenuVisible*/
|
|
7188
|
+
131072) noscroll_action.update.call(null, {
|
|
7189
|
+
enable:
|
|
7190
|
+
/*_isMenuVisible*/
|
|
7191
|
+
ctx[17]
|
|
7192
|
+
});
|
|
7168
7193
|
},
|
|
7169
7194
|
|
|
7170
7195
|
d(detaching) {
|
|
7171
7196
|
if (detaching) detach(div);
|
|
7172
7197
|
mounted = false;
|
|
7173
|
-
dispose
|
|
7198
|
+
run_all(dispose);
|
|
7174
7199
|
}
|
|
7175
7200
|
|
|
7176
7201
|
};
|
|
7177
|
-
} // (
|
|
7202
|
+
} // (319:6) {#each _options as option, index (index)}
|
|
7178
7203
|
|
|
7179
7204
|
|
|
7180
7205
|
function create_each_block_1(key_1, ctx) {
|
|
7181
7206
|
let li;
|
|
7182
7207
|
let t0_value = (
|
|
7183
7208
|
/*option*/
|
|
7184
|
-
ctx[
|
|
7209
|
+
ctx[50].label ||
|
|
7185
7210
|
/*option*/
|
|
7186
|
-
ctx[
|
|
7211
|
+
ctx[50].value) + "";
|
|
7187
7212
|
let t0;
|
|
7188
7213
|
let t1;
|
|
7189
7214
|
let li_id_value;
|
|
@@ -7199,9 +7224,9 @@ function create_each_block_1(key_1, ctx) {
|
|
|
7199
7224
|
function click_handler() {
|
|
7200
7225
|
return (
|
|
7201
7226
|
/*click_handler*/
|
|
7202
|
-
ctx[
|
|
7227
|
+
ctx[33](
|
|
7203
7228
|
/*option*/
|
|
7204
|
-
ctx[
|
|
7229
|
+
ctx[50])
|
|
7205
7230
|
);
|
|
7206
7231
|
}
|
|
7207
7232
|
|
|
@@ -7215,40 +7240,40 @@ function create_each_block_1(key_1, ctx) {
|
|
|
7215
7240
|
t1 = space();
|
|
7216
7241
|
attr(li, "id", li_id_value =
|
|
7217
7242
|
/*option*/
|
|
7218
|
-
ctx[
|
|
7243
|
+
ctx[50].label);
|
|
7219
7244
|
attr(li, "role", "option");
|
|
7220
7245
|
attr(li, "aria-label", li_aria_label_value =
|
|
7221
7246
|
/*option*/
|
|
7222
|
-
ctx[
|
|
7247
|
+
ctx[50].label ||
|
|
7223
7248
|
/*option*/
|
|
7224
|
-
ctx[
|
|
7249
|
+
ctx[50].value);
|
|
7225
7250
|
attr(li, "aria-selected", li_aria_selected_value =
|
|
7226
7251
|
/*_values*/
|
|
7227
7252
|
ctx[15].includes(
|
|
7228
7253
|
/*option*/
|
|
7229
|
-
ctx[
|
|
7254
|
+
ctx[50].value) ? "true" : "false");
|
|
7230
7255
|
attr(li, "class", "dropdown-item");
|
|
7231
7256
|
attr(li, "data-testid", li_data_testid_value = `dropdown-item-${
|
|
7232
7257
|
/*option*/
|
|
7233
|
-
ctx[
|
|
7258
|
+
ctx[50].value}`);
|
|
7234
7259
|
attr(li, "data-index", li_data_index_value =
|
|
7235
7260
|
/*index*/
|
|
7236
|
-
ctx[
|
|
7261
|
+
ctx[54]);
|
|
7237
7262
|
attr(li, "data-value", li_data_value_value =
|
|
7238
7263
|
/*option*/
|
|
7239
|
-
ctx[
|
|
7264
|
+
ctx[50].value);
|
|
7240
7265
|
attr(li, "style", li_style_value = `display: ${"block"}`);
|
|
7241
7266
|
toggle_class(li, "dropdown-item--disabled", false);
|
|
7242
7267
|
toggle_class(li, "dropdown-item--tabbed",
|
|
7243
7268
|
/*index*/
|
|
7244
|
-
ctx[
|
|
7269
|
+
ctx[54] ===
|
|
7245
7270
|
/*_highlightedIndex*/
|
|
7246
7271
|
ctx[18]);
|
|
7247
7272
|
toggle_class(li, "dropdown-item--selected",
|
|
7248
7273
|
/*_values*/
|
|
7249
7274
|
ctx[15].includes(
|
|
7250
7275
|
/*option*/
|
|
7251
|
-
ctx[
|
|
7276
|
+
ctx[50].value));
|
|
7252
7277
|
this.first = li;
|
|
7253
7278
|
},
|
|
7254
7279
|
|
|
@@ -7269,15 +7294,15 @@ function create_each_block_1(key_1, ctx) {
|
|
|
7269
7294
|
/*_options*/
|
|
7270
7295
|
4096 && t0_value !== (t0_value = (
|
|
7271
7296
|
/*option*/
|
|
7272
|
-
ctx[
|
|
7297
|
+
ctx[50].label ||
|
|
7273
7298
|
/*option*/
|
|
7274
|
-
ctx[
|
|
7299
|
+
ctx[50].value) + "")) set_data(t0, t0_value);
|
|
7275
7300
|
|
|
7276
7301
|
if (dirty[0] &
|
|
7277
7302
|
/*_options*/
|
|
7278
7303
|
4096 && li_id_value !== (li_id_value =
|
|
7279
7304
|
/*option*/
|
|
7280
|
-
ctx[
|
|
7305
|
+
ctx[50].label)) {
|
|
7281
7306
|
attr(li, "id", li_id_value);
|
|
7282
7307
|
}
|
|
7283
7308
|
|
|
@@ -7285,9 +7310,9 @@ function create_each_block_1(key_1, ctx) {
|
|
|
7285
7310
|
/*_options*/
|
|
7286
7311
|
4096 && li_aria_label_value !== (li_aria_label_value =
|
|
7287
7312
|
/*option*/
|
|
7288
|
-
ctx[
|
|
7313
|
+
ctx[50].label ||
|
|
7289
7314
|
/*option*/
|
|
7290
|
-
ctx[
|
|
7315
|
+
ctx[50].value)) {
|
|
7291
7316
|
attr(li, "aria-label", li_aria_label_value);
|
|
7292
7317
|
}
|
|
7293
7318
|
|
|
@@ -7297,7 +7322,7 @@ function create_each_block_1(key_1, ctx) {
|
|
|
7297
7322
|
/*_values*/
|
|
7298
7323
|
ctx[15].includes(
|
|
7299
7324
|
/*option*/
|
|
7300
|
-
ctx[
|
|
7325
|
+
ctx[50].value) ? "true" : "false")) {
|
|
7301
7326
|
attr(li, "aria-selected", li_aria_selected_value);
|
|
7302
7327
|
}
|
|
7303
7328
|
|
|
@@ -7305,7 +7330,7 @@ function create_each_block_1(key_1, ctx) {
|
|
|
7305
7330
|
/*_options*/
|
|
7306
7331
|
4096 && li_data_testid_value !== (li_data_testid_value = `dropdown-item-${
|
|
7307
7332
|
/*option*/
|
|
7308
|
-
ctx[
|
|
7333
|
+
ctx[50].value}`)) {
|
|
7309
7334
|
attr(li, "data-testid", li_data_testid_value);
|
|
7310
7335
|
}
|
|
7311
7336
|
|
|
@@ -7313,7 +7338,7 @@ function create_each_block_1(key_1, ctx) {
|
|
|
7313
7338
|
/*_options*/
|
|
7314
7339
|
4096 && li_data_index_value !== (li_data_index_value =
|
|
7315
7340
|
/*index*/
|
|
7316
|
-
ctx[
|
|
7341
|
+
ctx[54])) {
|
|
7317
7342
|
attr(li, "data-index", li_data_index_value);
|
|
7318
7343
|
}
|
|
7319
7344
|
|
|
@@ -7321,7 +7346,7 @@ function create_each_block_1(key_1, ctx) {
|
|
|
7321
7346
|
/*_options*/
|
|
7322
7347
|
4096 && li_data_value_value !== (li_data_value_value =
|
|
7323
7348
|
/*option*/
|
|
7324
|
-
ctx[
|
|
7349
|
+
ctx[50].value)) {
|
|
7325
7350
|
attr(li, "data-value", li_data_value_value);
|
|
7326
7351
|
}
|
|
7327
7352
|
|
|
@@ -7330,7 +7355,7 @@ function create_each_block_1(key_1, ctx) {
|
|
|
7330
7355
|
266240) {
|
|
7331
7356
|
toggle_class(li, "dropdown-item--tabbed",
|
|
7332
7357
|
/*index*/
|
|
7333
|
-
ctx[
|
|
7358
|
+
ctx[54] ===
|
|
7334
7359
|
/*_highlightedIndex*/
|
|
7335
7360
|
ctx[18]);
|
|
7336
7361
|
}
|
|
@@ -7342,7 +7367,7 @@ function create_each_block_1(key_1, ctx) {
|
|
|
7342
7367
|
/*_values*/
|
|
7343
7368
|
ctx[15].includes(
|
|
7344
7369
|
/*option*/
|
|
7345
|
-
ctx[
|
|
7370
|
+
ctx[50].value));
|
|
7346
7371
|
}
|
|
7347
7372
|
},
|
|
7348
7373
|
|
|
@@ -7353,14 +7378,14 @@ function create_each_block_1(key_1, ctx) {
|
|
|
7353
7378
|
}
|
|
7354
7379
|
|
|
7355
7380
|
};
|
|
7356
|
-
} // (
|
|
7381
|
+
} // (260:6) {#each _options as option}
|
|
7357
7382
|
|
|
7358
7383
|
|
|
7359
7384
|
function create_each_block$4(ctx) {
|
|
7360
7385
|
let option;
|
|
7361
7386
|
let t0_value =
|
|
7362
7387
|
/*option*/
|
|
7363
|
-
ctx[
|
|
7388
|
+
ctx[50].label + "";
|
|
7364
7389
|
let t0;
|
|
7365
7390
|
let t1;
|
|
7366
7391
|
let option_selected_value;
|
|
@@ -7373,14 +7398,14 @@ function create_each_block$4(ctx) {
|
|
|
7373
7398
|
t1 = space();
|
|
7374
7399
|
option.selected = option_selected_value =
|
|
7375
7400
|
/*option*/
|
|
7376
|
-
ctx[
|
|
7401
|
+
ctx[50].selected;
|
|
7377
7402
|
option.__value = option_value_value =
|
|
7378
7403
|
/*option*/
|
|
7379
|
-
ctx[
|
|
7404
|
+
ctx[50].value;
|
|
7380
7405
|
option.value = option.__value;
|
|
7381
7406
|
attr(option, "aria-label", option_aria_label_value =
|
|
7382
7407
|
/*option*/
|
|
7383
|
-
ctx[
|
|
7408
|
+
ctx[50].label);
|
|
7384
7409
|
},
|
|
7385
7410
|
|
|
7386
7411
|
m(target, anchor) {
|
|
@@ -7394,13 +7419,13 @@ function create_each_block$4(ctx) {
|
|
|
7394
7419
|
/*_options*/
|
|
7395
7420
|
4096 && t0_value !== (t0_value =
|
|
7396
7421
|
/*option*/
|
|
7397
|
-
ctx[
|
|
7422
|
+
ctx[50].label + "")) set_data(t0, t0_value);
|
|
7398
7423
|
|
|
7399
7424
|
if (dirty[0] &
|
|
7400
7425
|
/*_options*/
|
|
7401
7426
|
4096 && option_selected_value !== (option_selected_value =
|
|
7402
7427
|
/*option*/
|
|
7403
|
-
ctx[
|
|
7428
|
+
ctx[50].selected)) {
|
|
7404
7429
|
option.selected = option_selected_value;
|
|
7405
7430
|
}
|
|
7406
7431
|
|
|
@@ -7408,7 +7433,7 @@ function create_each_block$4(ctx) {
|
|
|
7408
7433
|
/*_options*/
|
|
7409
7434
|
4096 && option_value_value !== (option_value_value =
|
|
7410
7435
|
/*option*/
|
|
7411
|
-
ctx[
|
|
7436
|
+
ctx[50].value)) {
|
|
7412
7437
|
option.__value = option_value_value;
|
|
7413
7438
|
option.value = option.__value;
|
|
7414
7439
|
}
|
|
@@ -7417,7 +7442,7 @@ function create_each_block$4(ctx) {
|
|
|
7417
7442
|
/*_options*/
|
|
7418
7443
|
4096 && option_aria_label_value !== (option_aria_label_value =
|
|
7419
7444
|
/*option*/
|
|
7420
|
-
ctx[
|
|
7445
|
+
ctx[50].label)) {
|
|
7421
7446
|
attr(option, "aria-label", option_aria_label_value);
|
|
7422
7447
|
}
|
|
7423
7448
|
},
|
|
@@ -7478,7 +7503,7 @@ function create_fragment$v(ctx) {
|
|
|
7478
7503
|
if_block.m(div, null);
|
|
7479
7504
|
/*div_binding*/
|
|
7480
7505
|
|
|
7481
|
-
ctx[
|
|
7506
|
+
ctx[35](div);
|
|
7482
7507
|
},
|
|
7483
7508
|
|
|
7484
7509
|
p(ctx, dirty) {
|
|
@@ -7540,7 +7565,7 @@ function create_fragment$v(ctx) {
|
|
|
7540
7565
|
if_block.d();
|
|
7541
7566
|
/*div_binding*/
|
|
7542
7567
|
|
|
7543
|
-
ctx[
|
|
7568
|
+
ctx[35](null);
|
|
7544
7569
|
}
|
|
7545
7570
|
|
|
7546
7571
|
};
|
|
@@ -7623,6 +7648,8 @@ function instance$s($$self, $$props, $$invalidate) {
|
|
|
7623
7648
|
|
|
7624
7649
|
let _computedWidth;
|
|
7625
7650
|
|
|
7651
|
+
let _dropdownMenuPos = "auto";
|
|
7652
|
+
|
|
7626
7653
|
let _el;
|
|
7627
7654
|
|
|
7628
7655
|
let _menuEl;
|
|
@@ -7725,6 +7752,8 @@ function instance$s($$self, $$props, $$invalidate) {
|
|
|
7725
7752
|
|
|
7726
7753
|
|
|
7727
7754
|
_menuEl.addEventListener("mouseover", onHighlight);
|
|
7755
|
+
|
|
7756
|
+
setDropdownMenuPosition();
|
|
7728
7757
|
}
|
|
7729
7758
|
|
|
7730
7759
|
function closeMenu() {
|
|
@@ -7734,6 +7763,17 @@ function instance$s($$self, $$props, $$invalidate) {
|
|
|
7734
7763
|
|
|
7735
7764
|
setHighlightedIndexToSelected();
|
|
7736
7765
|
$$invalidate(17, _isMenuVisible = false);
|
|
7766
|
+
$$invalidate(20, _dropdownMenuPos = "auto");
|
|
7767
|
+
}
|
|
7768
|
+
|
|
7769
|
+
function setDropdownMenuPosition() {
|
|
7770
|
+
const dropdownRect = _el.getBoundingClientRect();
|
|
7771
|
+
|
|
7772
|
+
const menuRect = _menuEl.getBoundingClientRect();
|
|
7773
|
+
|
|
7774
|
+
if (window.innerHeight - dropdownRect.top < dropdownRect.height + menuRect.height) {
|
|
7775
|
+
$$invalidate(20, _dropdownMenuPos = menuRect.top - dropdownRect.top + 'px');
|
|
7776
|
+
}
|
|
7737
7777
|
}
|
|
7738
7778
|
|
|
7739
7779
|
function setHighlightedIndexToSelected() {
|
|
@@ -7849,8 +7889,8 @@ function instance$s($$self, $$props, $$invalidate) {
|
|
|
7849
7889
|
function select_binding($$value) {
|
|
7850
7890
|
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
7851
7891
|
_selectEl = $$value;
|
|
7852
|
-
$$invalidate(
|
|
7853
|
-
((($$invalidate(12, _options), $$invalidate(13, _el)), $$invalidate(
|
|
7892
|
+
$$invalidate(22, _selectEl);
|
|
7893
|
+
((($$invalidate(12, _options), $$invalidate(13, _el)), $$invalidate(29, value)), $$invalidate(14, _native)), $$invalidate(31, native);
|
|
7854
7894
|
});
|
|
7855
7895
|
}
|
|
7856
7896
|
|
|
@@ -7859,7 +7899,7 @@ function instance$s($$self, $$props, $$invalidate) {
|
|
|
7859
7899
|
function ul_binding($$value) {
|
|
7860
7900
|
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
7861
7901
|
_menuEl = $$value;
|
|
7862
|
-
$$invalidate(
|
|
7902
|
+
$$invalidate(21, _menuEl);
|
|
7863
7903
|
});
|
|
7864
7904
|
}
|
|
7865
7905
|
|
|
@@ -7873,15 +7913,15 @@ function instance$s($$self, $$props, $$invalidate) {
|
|
|
7873
7913
|
$$self.$$set = $$props => {
|
|
7874
7914
|
if ('name' in $$props) $$invalidate(0, name = $$props.name);
|
|
7875
7915
|
if ('arialabel' in $$props) $$invalidate(1, arialabel = $$props.arialabel);
|
|
7876
|
-
if ('value' in $$props) $$invalidate(
|
|
7916
|
+
if ('value' in $$props) $$invalidate(29, value = $$props.value);
|
|
7877
7917
|
if ('leadingicon' in $$props) $$invalidate(2, leadingicon = $$props.leadingicon);
|
|
7878
7918
|
if ('maxheight' in $$props) $$invalidate(3, maxheight = $$props.maxheight);
|
|
7879
7919
|
if ('placeholder' in $$props) $$invalidate(4, placeholder = $$props.placeholder);
|
|
7880
7920
|
if ('width' in $$props) $$invalidate(5, width = $$props.width);
|
|
7881
7921
|
if ('disabled' in $$props) $$invalidate(6, disabled = $$props.disabled);
|
|
7882
7922
|
if ('error' in $$props) $$invalidate(7, error = $$props.error);
|
|
7883
|
-
if ('multiselect' in $$props) $$invalidate(
|
|
7884
|
-
if ('native' in $$props) $$invalidate(
|
|
7923
|
+
if ('multiselect' in $$props) $$invalidate(30, multiselect = $$props.multiselect);
|
|
7924
|
+
if ('native' in $$props) $$invalidate(31, native = $$props.native);
|
|
7885
7925
|
if ('mt' in $$props) $$invalidate(8, mt = $$props.mt);
|
|
7886
7926
|
if ('mr' in $$props) $$invalidate(9, mr = $$props.mr);
|
|
7887
7927
|
if ('mb' in $$props) $$invalidate(10, mb = $$props.mb);
|
|
@@ -7892,30 +7932,30 @@ function instance$s($$self, $$props, $$invalidate) {
|
|
|
7892
7932
|
if ($$self.$$.dirty[0] &
|
|
7893
7933
|
/*disabled*/
|
|
7894
7934
|
64) {
|
|
7895
|
-
$$invalidate(
|
|
7935
|
+
$$invalidate(23, _disabled = toBoolean(disabled));
|
|
7896
7936
|
}
|
|
7897
7937
|
|
|
7898
7938
|
if ($$self.$$.dirty[0] &
|
|
7899
7939
|
/*error*/
|
|
7900
7940
|
128) {
|
|
7901
|
-
$$invalidate(
|
|
7941
|
+
$$invalidate(24, _error = toBoolean(error));
|
|
7902
7942
|
}
|
|
7903
7943
|
|
|
7904
7944
|
if ($$self.$$.dirty[0] &
|
|
7905
7945
|
/*multiselect*/
|
|
7906
|
-
|
|
7946
|
+
1073741824) {
|
|
7907
7947
|
_multiselect = toBoolean(multiselect);
|
|
7908
7948
|
}
|
|
7909
7949
|
|
|
7910
|
-
if ($$self.$$.dirty[
|
|
7950
|
+
if ($$self.$$.dirty[1] &
|
|
7911
7951
|
/*native*/
|
|
7912
|
-
|
|
7952
|
+
1) {
|
|
7913
7953
|
$$invalidate(14, _native = toBoolean(native));
|
|
7914
7954
|
}
|
|
7915
7955
|
|
|
7916
7956
|
if ($$self.$$.dirty[0] &
|
|
7917
7957
|
/*_el, value, _native, _options*/
|
|
7918
|
-
|
|
7958
|
+
536899584) {
|
|
7919
7959
|
{
|
|
7920
7960
|
if (_el) {
|
|
7921
7961
|
$$invalidate(15, _values = parseValues(value));
|
|
@@ -7931,13 +7971,13 @@ function instance$s($$self, $$props, $$invalidate) {
|
|
|
7931
7971
|
}
|
|
7932
7972
|
};
|
|
7933
7973
|
|
|
7934
|
-
return [name, arialabel, leadingicon, maxheight, placeholder, width, disabled, error, mt, mr, mb, ml, _options, _el, _native, _values, _selectedLabel, _isMenuVisible, _highlightedIndex, _computedWidth, _menuEl, _selectEl, _disabled, _error, showMenu, closeMenu, onSelect, onNativeSelect, value, multiselect, native, select_binding, click_handler, ul_binding, div_binding];
|
|
7974
|
+
return [name, arialabel, leadingicon, maxheight, placeholder, width, disabled, error, mt, mr, mb, ml, _options, _el, _native, _values, _selectedLabel, _isMenuVisible, _highlightedIndex, _computedWidth, _dropdownMenuPos, _menuEl, _selectEl, _disabled, _error, showMenu, closeMenu, onSelect, onNativeSelect, value, multiselect, native, select_binding, click_handler, ul_binding, div_binding];
|
|
7935
7975
|
}
|
|
7936
7976
|
|
|
7937
7977
|
class Dropdown extends SvelteElement {
|
|
7938
7978
|
constructor(options) {
|
|
7939
7979
|
super();
|
|
7940
|
-
this.shadowRoot.innerHTML = `<style>:host{box-sizing:border-box;font-family:var(--goa-font-family-sans)}.dropdown{position:relative;cursor:pointer;display:inline-block;width:100%}@media(min-width: 640px){.dropdown{width:var(--width)}}.dropdown-background{cursor:default;position:fixed;z-index:98;inset:0}.dropdown-list{position:absolute;left:0;right:0;padding:0;margin:0;margin-top:3px;list-style-type:none;background:var(--goa-color-greyscale-white);border-radius:var(--goa-border-radius-m);outline:none;box-shadow:var(--shadow-1);z-index:99;scroll-behavior:smooth;scrollbar-width:thin;display:none}.dropdown-active{display:block}.dropdown-list::-webkit-scrollbar{width:6px}.dropdown-list::-webkit-scrollbar-track{background:#f1f1f1}.dropdown-list::-webkit-scrollbar-thumb{background:#888}.dropdown-list::-webkit-scrollbar-thumb:hover{background:#555}.dropdown-item{margin:0;padding:0.5rem;cursor:pointer;color:var(--goa-color-greyscale-black);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dropdown-item--tabbed{background:var(--goa-color-greyscale-100);color:var(--goa-color-interactive-hover)}.dropdown-item--disabled{opacity:0.5;cursor:default}.dropdown-item--disabled:hover{cursor:default;color:var(--goa-color-greyscale-700)}.dropdown-item--selected{background:var(--goa-color-interactive-default);color:var(--goa-color-greyscale-white)}.dropdown-item--tabbed.dropdown-item--selected,.dropdown-item--selected:hover{background:var(--goa-color-interactive-hover);color:var(--goa-color-greyscale-white)}.dropdown-native{border:1px solid var(--goa-color-greyscale-700);border-radius:var(--goa-border-radius-m);background-color:var(--goa-color-greyscale-white);transition:box-shadow 0.1s ease-in}.dropdown-native:has(select:disabled){background-color:var(--goa-color-greyscale-100);border-color:var(--goa-color-greyscale-200);box-shadow:none;color:var(--goa-color-text-secondary);cursor:default}.dropdown-native:has(select.error){border:2px solid var(--goa-color-interactive-error)}.dropdown-native:hover{border-color:var(--goa-color-interactive-hover);box-shadow:0 0 0 var(--goa-border-width-m) var(--goa-color-interactive-hover)}select{border:none;background-color:transparent;color:var(--goa-color-text-default);font-size:var(--goa-font-size-4);appearance:none;padding:calc(var(--goa-space-xs) + 2px);padding-left:0.5rem;padding-right:3rem;outline:none;width:100%}.dropdown-native::after{content:"";position:absolute;right:0.6rem;top:0.6rem;pointer-events:none;width:1.5rem;height:1.5rem;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path fill='none' stroke='%23333333' stroke-linecap='round' stroke-linejoin='round' stroke-width='48' d='M112 184l144 144 144-144' /%3E%3C/svg%3E");background-repeat:none}.dropdown-native:focus-within{box-shadow:0 0 0 3px var(--goa-color-interactive-focus)}</style>`;
|
|
7980
|
+
this.shadowRoot.innerHTML = `<style>:host{box-sizing:border-box;font-family:var(--goa-font-family-sans)}.dropdown{position:relative;cursor:pointer;display:inline-block;width:100%}@media(min-width: 640px){.dropdown{width:var(--width)}}.dropdown-background{cursor:default;position:fixed;z-index:98;inset:0}.dropdown-list{position:absolute;left:0;right:0;padding:0;margin:0;margin-top:3px;list-style-type:none;background:var(--goa-color-greyscale-white);border-radius:var(--goa-border-radius-m);outline:none;box-shadow:var(--shadow-1);z-index:99;bottom:var(--bottom);scroll-behavior:smooth;scrollbar-width:thin;display:none}.dropdown-active{display:block}.dropdown-list::-webkit-scrollbar{width:6px}.dropdown-list::-webkit-scrollbar-track{background:#f1f1f1}.dropdown-list::-webkit-scrollbar-thumb{background:#888}.dropdown-list::-webkit-scrollbar-thumb:hover{background:#555}.dropdown-item{margin:0;padding:0.5rem;cursor:pointer;color:var(--goa-color-greyscale-black);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dropdown-item--tabbed{background:var(--goa-color-greyscale-100);color:var(--goa-color-interactive-hover)}.dropdown-item--disabled{opacity:0.5;cursor:default}.dropdown-item--disabled:hover{cursor:default;color:var(--goa-color-greyscale-700)}.dropdown-item--selected{background:var(--goa-color-interactive-default);color:var(--goa-color-greyscale-white)}.dropdown-item--tabbed.dropdown-item--selected,.dropdown-item--selected:hover{background:var(--goa-color-interactive-hover);color:var(--goa-color-greyscale-white)}.dropdown-native{border:1px solid var(--goa-color-greyscale-700);border-radius:var(--goa-border-radius-m);background-color:var(--goa-color-greyscale-white);transition:box-shadow 0.1s ease-in}.dropdown-native:has(select:disabled){background-color:var(--goa-color-greyscale-100);border-color:var(--goa-color-greyscale-200);box-shadow:none;color:var(--goa-color-text-secondary);cursor:default}.dropdown-native:has(select.error){border:2px solid var(--goa-color-interactive-error)}.dropdown-native:hover{border-color:var(--goa-color-interactive-hover);box-shadow:0 0 0 var(--goa-border-width-m) var(--goa-color-interactive-hover)}select{border:none;background-color:transparent;color:var(--goa-color-text-default);font-size:var(--goa-font-size-4);appearance:none;padding:calc(var(--goa-space-xs) + 2px);padding-left:0.5rem;padding-right:3rem;outline:none;width:100%}.dropdown-native::after{content:"";position:absolute;right:0.6rem;top:0.6rem;pointer-events:none;width:1.5rem;height:1.5rem;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path fill='none' stroke='%23333333' stroke-linecap='round' stroke-linejoin='round' stroke-width='48' d='M112 184l144 144 144-144' /%3E%3C/svg%3E");background-repeat:none}.dropdown-native:focus-within{box-shadow:0 0 0 3px var(--goa-color-interactive-focus)}</style>`;
|
|
7941
7981
|
init(this, {
|
|
7942
7982
|
target: this.shadowRoot,
|
|
7943
7983
|
props: attribute_to_object(this.attributes),
|
|
@@ -7945,15 +7985,15 @@ class Dropdown extends SvelteElement {
|
|
|
7945
7985
|
}, instance$s, create_fragment$v, safe_not_equal, {
|
|
7946
7986
|
name: 0,
|
|
7947
7987
|
arialabel: 1,
|
|
7948
|
-
value:
|
|
7988
|
+
value: 29,
|
|
7949
7989
|
leadingicon: 2,
|
|
7950
7990
|
maxheight: 3,
|
|
7951
7991
|
placeholder: 4,
|
|
7952
7992
|
width: 5,
|
|
7953
7993
|
disabled: 6,
|
|
7954
7994
|
error: 7,
|
|
7955
|
-
multiselect:
|
|
7956
|
-
native:
|
|
7995
|
+
multiselect: 30,
|
|
7996
|
+
native: 31,
|
|
7957
7997
|
mt: 8,
|
|
7958
7998
|
mr: 9,
|
|
7959
7999
|
mb: 10,
|
|
@@ -7999,7 +8039,7 @@ class Dropdown extends SvelteElement {
|
|
|
7999
8039
|
}
|
|
8000
8040
|
|
|
8001
8041
|
get value() {
|
|
8002
|
-
return this.$$.ctx[
|
|
8042
|
+
return this.$$.ctx[29];
|
|
8003
8043
|
}
|
|
8004
8044
|
|
|
8005
8045
|
set value(value) {
|
|
@@ -8076,7 +8116,7 @@ class Dropdown extends SvelteElement {
|
|
|
8076
8116
|
}
|
|
8077
8117
|
|
|
8078
8118
|
get multiselect() {
|
|
8079
|
-
return this.$$.ctx[
|
|
8119
|
+
return this.$$.ctx[30];
|
|
8080
8120
|
}
|
|
8081
8121
|
|
|
8082
8122
|
set multiselect(multiselect) {
|
|
@@ -8087,7 +8127,7 @@ class Dropdown extends SvelteElement {
|
|
|
8087
8127
|
}
|
|
8088
8128
|
|
|
8089
8129
|
get native() {
|
|
8090
|
-
return this.$$.ctx[
|
|
8130
|
+
return this.$$.ctx[31];
|
|
8091
8131
|
}
|
|
8092
8132
|
|
|
8093
8133
|
set native(native) {
|
package/react-components.umd.js
CHANGED
|
@@ -6767,16 +6767,16 @@
|
|
|
6767
6767
|
|
|
6768
6768
|
function get_each_context_1(ctx, list, i) {
|
|
6769
6769
|
const child_ctx = ctx.slice();
|
|
6770
|
-
child_ctx[
|
|
6771
|
-
child_ctx[
|
|
6770
|
+
child_ctx[50] = list[i];
|
|
6771
|
+
child_ctx[54] = i;
|
|
6772
6772
|
return child_ctx;
|
|
6773
6773
|
}
|
|
6774
6774
|
|
|
6775
6775
|
function get_each_context$4(ctx, list, i) {
|
|
6776
6776
|
const child_ctx = ctx.slice();
|
|
6777
|
-
child_ctx[
|
|
6777
|
+
child_ctx[50] = list[i];
|
|
6778
6778
|
return child_ctx;
|
|
6779
|
-
} // (
|
|
6779
|
+
} // (270:2) {:else}
|
|
6780
6780
|
|
|
6781
6781
|
|
|
6782
6782
|
function create_else_block$5(ctx) {
|
|
@@ -6802,7 +6802,7 @@
|
|
|
6802
6802
|
|
|
6803
6803
|
const get_key = ctx =>
|
|
6804
6804
|
/*index*/
|
|
6805
|
-
ctx[
|
|
6805
|
+
ctx[54];
|
|
6806
6806
|
|
|
6807
6807
|
for (let i = 0; i < each_value_1.length; i += 1) {
|
|
6808
6808
|
let child_ctx = get_each_context_1(ctx, each_value_1, i);
|
|
@@ -6867,9 +6867,15 @@
|
|
|
6867
6867
|
attr(ul, "data-testid", "dropdown-menu");
|
|
6868
6868
|
attr(ul, "tabindex", "0");
|
|
6869
6869
|
attr(ul, "class", "dropdown-list");
|
|
6870
|
-
attr(ul, "style", ul_style_value = `
|
|
6870
|
+
attr(ul, "style", ul_style_value = `
|
|
6871
|
+
overflow-y: auto;
|
|
6872
|
+
max-height: ${
|
|
6871
6873
|
/*maxheight*/
|
|
6872
|
-
ctx[3]}
|
|
6874
|
+
ctx[3]};
|
|
6875
|
+
--bottom: ${
|
|
6876
|
+
/*_dropdownMenuPos*/
|
|
6877
|
+
ctx[20]};
|
|
6878
|
+
`);
|
|
6873
6879
|
toggle_class(ul, "dropdown-active",
|
|
6874
6880
|
/*_isMenuVisible*/
|
|
6875
6881
|
ctx[17]);
|
|
@@ -6890,12 +6896,12 @@
|
|
|
6890
6896
|
/*ul_binding*/
|
|
6891
6897
|
|
|
6892
6898
|
|
|
6893
|
-
ctx[
|
|
6899
|
+
ctx[34](ul);
|
|
6894
6900
|
|
|
6895
6901
|
if (!mounted) {
|
|
6896
6902
|
dispose = listen(goa_input, "click",
|
|
6897
6903
|
/*showMenu*/
|
|
6898
|
-
ctx[
|
|
6904
|
+
ctx[25]);
|
|
6899
6905
|
mounted = true;
|
|
6900
6906
|
}
|
|
6901
6907
|
},
|
|
@@ -6992,7 +6998,7 @@
|
|
|
6992
6998
|
|
|
6993
6999
|
if (dirty[0] &
|
|
6994
7000
|
/*_options, _values, _highlightedIndex, onSelect*/
|
|
6995
|
-
|
|
7001
|
+
134516736) {
|
|
6996
7002
|
each_value_1 =
|
|
6997
7003
|
/*_options*/
|
|
6998
7004
|
ctx[12];
|
|
@@ -7008,10 +7014,16 @@
|
|
|
7008
7014
|
}
|
|
7009
7015
|
|
|
7010
7016
|
if (dirty[0] &
|
|
7011
|
-
/*maxheight*/
|
|
7012
|
-
|
|
7017
|
+
/*maxheight, _dropdownMenuPos*/
|
|
7018
|
+
1048584 && ul_style_value !== (ul_style_value = `
|
|
7019
|
+
overflow-y: auto;
|
|
7020
|
+
max-height: ${
|
|
7013
7021
|
/*maxheight*/
|
|
7014
|
-
ctx[3]}
|
|
7022
|
+
ctx[3]};
|
|
7023
|
+
--bottom: ${
|
|
7024
|
+
/*_dropdownMenuPos*/
|
|
7025
|
+
ctx[20]};
|
|
7026
|
+
`)) {
|
|
7015
7027
|
attr(ul, "style", ul_style_value);
|
|
7016
7028
|
}
|
|
7017
7029
|
|
|
@@ -7039,13 +7051,13 @@
|
|
|
7039
7051
|
/*ul_binding*/
|
|
7040
7052
|
|
|
7041
7053
|
|
|
7042
|
-
ctx[
|
|
7054
|
+
ctx[34](null);
|
|
7043
7055
|
mounted = false;
|
|
7044
7056
|
dispose();
|
|
7045
7057
|
}
|
|
7046
7058
|
|
|
7047
7059
|
};
|
|
7048
|
-
} // (
|
|
7060
|
+
} // (251:2) {#if _native}
|
|
7049
7061
|
|
|
7050
7062
|
|
|
7051
7063
|
function create_if_block$f(ctx) {
|
|
@@ -7074,7 +7086,7 @@
|
|
|
7074
7086
|
|
|
7075
7087
|
select.disabled =
|
|
7076
7088
|
/*_disabled*/
|
|
7077
|
-
ctx[
|
|
7089
|
+
ctx[23];
|
|
7078
7090
|
attr(select, "aria-label", select_aria_label_value =
|
|
7079
7091
|
/*arialabel*/
|
|
7080
7092
|
ctx[1] ||
|
|
@@ -7082,7 +7094,7 @@
|
|
|
7082
7094
|
ctx[0]);
|
|
7083
7095
|
toggle_class(select, "error",
|
|
7084
7096
|
/*_error*/
|
|
7085
|
-
ctx[
|
|
7097
|
+
ctx[24]);
|
|
7086
7098
|
},
|
|
7087
7099
|
|
|
7088
7100
|
m(target, anchor) {
|
|
@@ -7095,12 +7107,12 @@
|
|
|
7095
7107
|
/*select_binding*/
|
|
7096
7108
|
|
|
7097
7109
|
|
|
7098
|
-
ctx[
|
|
7110
|
+
ctx[32](select);
|
|
7099
7111
|
|
|
7100
7112
|
if (!mounted) {
|
|
7101
7113
|
dispose = listen(select, "change",
|
|
7102
7114
|
/*onNativeSelect*/
|
|
7103
|
-
ctx[
|
|
7115
|
+
ctx[28]);
|
|
7104
7116
|
mounted = true;
|
|
7105
7117
|
}
|
|
7106
7118
|
},
|
|
@@ -7135,10 +7147,10 @@
|
|
|
7135
7147
|
|
|
7136
7148
|
if (dirty[0] &
|
|
7137
7149
|
/*_disabled*/
|
|
7138
|
-
|
|
7150
|
+
8388608) {
|
|
7139
7151
|
select.disabled =
|
|
7140
7152
|
/*_disabled*/
|
|
7141
|
-
ctx[
|
|
7153
|
+
ctx[23];
|
|
7142
7154
|
}
|
|
7143
7155
|
|
|
7144
7156
|
if (dirty[0] &
|
|
@@ -7153,10 +7165,10 @@
|
|
|
7153
7165
|
|
|
7154
7166
|
if (dirty[0] &
|
|
7155
7167
|
/*_error*/
|
|
7156
|
-
|
|
7168
|
+
16777216) {
|
|
7157
7169
|
toggle_class(select, "error",
|
|
7158
7170
|
/*_error*/
|
|
7159
|
-
ctx[
|
|
7171
|
+
ctx[24]);
|
|
7160
7172
|
}
|
|
7161
7173
|
},
|
|
7162
7174
|
|
|
@@ -7165,18 +7177,19 @@
|
|
|
7165
7177
|
destroy_each(each_blocks, detaching);
|
|
7166
7178
|
/*select_binding*/
|
|
7167
7179
|
|
|
7168
|
-
ctx[
|
|
7180
|
+
ctx[32](null);
|
|
7169
7181
|
mounted = false;
|
|
7170
7182
|
dispose();
|
|
7171
7183
|
}
|
|
7172
7184
|
|
|
7173
7185
|
};
|
|
7174
|
-
} // (
|
|
7186
|
+
} // (271:4) {#if _isMenuVisible}
|
|
7175
7187
|
|
|
7176
7188
|
|
|
7177
7189
|
function create_if_block_1$7(ctx) {
|
|
7178
7190
|
let div;
|
|
7179
7191
|
let div_data_testid_value;
|
|
7192
|
+
let noscroll_action;
|
|
7180
7193
|
let mounted;
|
|
7181
7194
|
let dispose;
|
|
7182
7195
|
return {
|
|
@@ -7192,9 +7205,13 @@
|
|
|
7192
7205
|
insert(target, div, anchor);
|
|
7193
7206
|
|
|
7194
7207
|
if (!mounted) {
|
|
7195
|
-
dispose = listen(div, "click",
|
|
7208
|
+
dispose = [listen(div, "click",
|
|
7196
7209
|
/*closeMenu*/
|
|
7197
|
-
ctx[
|
|
7210
|
+
ctx[26]), action_destroyer(noscroll_action = noscroll.call(null, div, {
|
|
7211
|
+
enable:
|
|
7212
|
+
/*_isMenuVisible*/
|
|
7213
|
+
ctx[17]
|
|
7214
|
+
}))];
|
|
7198
7215
|
mounted = true;
|
|
7199
7216
|
}
|
|
7200
7217
|
},
|
|
@@ -7207,25 +7224,33 @@
|
|
|
7207
7224
|
ctx[0]}-dropdown-background`)) {
|
|
7208
7225
|
attr(div, "data-testid", div_data_testid_value);
|
|
7209
7226
|
}
|
|
7227
|
+
|
|
7228
|
+
if (noscroll_action && is_function(noscroll_action.update) && dirty[0] &
|
|
7229
|
+
/*_isMenuVisible*/
|
|
7230
|
+
131072) noscroll_action.update.call(null, {
|
|
7231
|
+
enable:
|
|
7232
|
+
/*_isMenuVisible*/
|
|
7233
|
+
ctx[17]
|
|
7234
|
+
});
|
|
7210
7235
|
},
|
|
7211
7236
|
|
|
7212
7237
|
d(detaching) {
|
|
7213
7238
|
if (detaching) detach(div);
|
|
7214
7239
|
mounted = false;
|
|
7215
|
-
dispose
|
|
7240
|
+
run_all(dispose);
|
|
7216
7241
|
}
|
|
7217
7242
|
|
|
7218
7243
|
};
|
|
7219
|
-
} // (
|
|
7244
|
+
} // (319:6) {#each _options as option, index (index)}
|
|
7220
7245
|
|
|
7221
7246
|
|
|
7222
7247
|
function create_each_block_1(key_1, ctx) {
|
|
7223
7248
|
let li;
|
|
7224
7249
|
let t0_value = (
|
|
7225
7250
|
/*option*/
|
|
7226
|
-
ctx[
|
|
7251
|
+
ctx[50].label ||
|
|
7227
7252
|
/*option*/
|
|
7228
|
-
ctx[
|
|
7253
|
+
ctx[50].value) + "";
|
|
7229
7254
|
let t0;
|
|
7230
7255
|
let t1;
|
|
7231
7256
|
let li_id_value;
|
|
@@ -7241,9 +7266,9 @@
|
|
|
7241
7266
|
function click_handler() {
|
|
7242
7267
|
return (
|
|
7243
7268
|
/*click_handler*/
|
|
7244
|
-
ctx[
|
|
7269
|
+
ctx[33](
|
|
7245
7270
|
/*option*/
|
|
7246
|
-
ctx[
|
|
7271
|
+
ctx[50])
|
|
7247
7272
|
);
|
|
7248
7273
|
}
|
|
7249
7274
|
|
|
@@ -7257,40 +7282,40 @@
|
|
|
7257
7282
|
t1 = space();
|
|
7258
7283
|
attr(li, "id", li_id_value =
|
|
7259
7284
|
/*option*/
|
|
7260
|
-
ctx[
|
|
7285
|
+
ctx[50].label);
|
|
7261
7286
|
attr(li, "role", "option");
|
|
7262
7287
|
attr(li, "aria-label", li_aria_label_value =
|
|
7263
7288
|
/*option*/
|
|
7264
|
-
ctx[
|
|
7289
|
+
ctx[50].label ||
|
|
7265
7290
|
/*option*/
|
|
7266
|
-
ctx[
|
|
7291
|
+
ctx[50].value);
|
|
7267
7292
|
attr(li, "aria-selected", li_aria_selected_value =
|
|
7268
7293
|
/*_values*/
|
|
7269
7294
|
ctx[15].includes(
|
|
7270
7295
|
/*option*/
|
|
7271
|
-
ctx[
|
|
7296
|
+
ctx[50].value) ? "true" : "false");
|
|
7272
7297
|
attr(li, "class", "dropdown-item");
|
|
7273
7298
|
attr(li, "data-testid", li_data_testid_value = `dropdown-item-${
|
|
7274
7299
|
/*option*/
|
|
7275
|
-
ctx[
|
|
7300
|
+
ctx[50].value}`);
|
|
7276
7301
|
attr(li, "data-index", li_data_index_value =
|
|
7277
7302
|
/*index*/
|
|
7278
|
-
ctx[
|
|
7303
|
+
ctx[54]);
|
|
7279
7304
|
attr(li, "data-value", li_data_value_value =
|
|
7280
7305
|
/*option*/
|
|
7281
|
-
ctx[
|
|
7306
|
+
ctx[50].value);
|
|
7282
7307
|
attr(li, "style", li_style_value = `display: ${"block"}`);
|
|
7283
7308
|
toggle_class(li, "dropdown-item--disabled", false);
|
|
7284
7309
|
toggle_class(li, "dropdown-item--tabbed",
|
|
7285
7310
|
/*index*/
|
|
7286
|
-
ctx[
|
|
7311
|
+
ctx[54] ===
|
|
7287
7312
|
/*_highlightedIndex*/
|
|
7288
7313
|
ctx[18]);
|
|
7289
7314
|
toggle_class(li, "dropdown-item--selected",
|
|
7290
7315
|
/*_values*/
|
|
7291
7316
|
ctx[15].includes(
|
|
7292
7317
|
/*option*/
|
|
7293
|
-
ctx[
|
|
7318
|
+
ctx[50].value));
|
|
7294
7319
|
this.first = li;
|
|
7295
7320
|
},
|
|
7296
7321
|
|
|
@@ -7311,15 +7336,15 @@
|
|
|
7311
7336
|
/*_options*/
|
|
7312
7337
|
4096 && t0_value !== (t0_value = (
|
|
7313
7338
|
/*option*/
|
|
7314
|
-
ctx[
|
|
7339
|
+
ctx[50].label ||
|
|
7315
7340
|
/*option*/
|
|
7316
|
-
ctx[
|
|
7341
|
+
ctx[50].value) + "")) set_data(t0, t0_value);
|
|
7317
7342
|
|
|
7318
7343
|
if (dirty[0] &
|
|
7319
7344
|
/*_options*/
|
|
7320
7345
|
4096 && li_id_value !== (li_id_value =
|
|
7321
7346
|
/*option*/
|
|
7322
|
-
ctx[
|
|
7347
|
+
ctx[50].label)) {
|
|
7323
7348
|
attr(li, "id", li_id_value);
|
|
7324
7349
|
}
|
|
7325
7350
|
|
|
@@ -7327,9 +7352,9 @@
|
|
|
7327
7352
|
/*_options*/
|
|
7328
7353
|
4096 && li_aria_label_value !== (li_aria_label_value =
|
|
7329
7354
|
/*option*/
|
|
7330
|
-
ctx[
|
|
7355
|
+
ctx[50].label ||
|
|
7331
7356
|
/*option*/
|
|
7332
|
-
ctx[
|
|
7357
|
+
ctx[50].value)) {
|
|
7333
7358
|
attr(li, "aria-label", li_aria_label_value);
|
|
7334
7359
|
}
|
|
7335
7360
|
|
|
@@ -7339,7 +7364,7 @@
|
|
|
7339
7364
|
/*_values*/
|
|
7340
7365
|
ctx[15].includes(
|
|
7341
7366
|
/*option*/
|
|
7342
|
-
ctx[
|
|
7367
|
+
ctx[50].value) ? "true" : "false")) {
|
|
7343
7368
|
attr(li, "aria-selected", li_aria_selected_value);
|
|
7344
7369
|
}
|
|
7345
7370
|
|
|
@@ -7347,7 +7372,7 @@
|
|
|
7347
7372
|
/*_options*/
|
|
7348
7373
|
4096 && li_data_testid_value !== (li_data_testid_value = `dropdown-item-${
|
|
7349
7374
|
/*option*/
|
|
7350
|
-
ctx[
|
|
7375
|
+
ctx[50].value}`)) {
|
|
7351
7376
|
attr(li, "data-testid", li_data_testid_value);
|
|
7352
7377
|
}
|
|
7353
7378
|
|
|
@@ -7355,7 +7380,7 @@
|
|
|
7355
7380
|
/*_options*/
|
|
7356
7381
|
4096 && li_data_index_value !== (li_data_index_value =
|
|
7357
7382
|
/*index*/
|
|
7358
|
-
ctx[
|
|
7383
|
+
ctx[54])) {
|
|
7359
7384
|
attr(li, "data-index", li_data_index_value);
|
|
7360
7385
|
}
|
|
7361
7386
|
|
|
@@ -7363,7 +7388,7 @@
|
|
|
7363
7388
|
/*_options*/
|
|
7364
7389
|
4096 && li_data_value_value !== (li_data_value_value =
|
|
7365
7390
|
/*option*/
|
|
7366
|
-
ctx[
|
|
7391
|
+
ctx[50].value)) {
|
|
7367
7392
|
attr(li, "data-value", li_data_value_value);
|
|
7368
7393
|
}
|
|
7369
7394
|
|
|
@@ -7372,7 +7397,7 @@
|
|
|
7372
7397
|
266240) {
|
|
7373
7398
|
toggle_class(li, "dropdown-item--tabbed",
|
|
7374
7399
|
/*index*/
|
|
7375
|
-
ctx[
|
|
7400
|
+
ctx[54] ===
|
|
7376
7401
|
/*_highlightedIndex*/
|
|
7377
7402
|
ctx[18]);
|
|
7378
7403
|
}
|
|
@@ -7384,7 +7409,7 @@
|
|
|
7384
7409
|
/*_values*/
|
|
7385
7410
|
ctx[15].includes(
|
|
7386
7411
|
/*option*/
|
|
7387
|
-
ctx[
|
|
7412
|
+
ctx[50].value));
|
|
7388
7413
|
}
|
|
7389
7414
|
},
|
|
7390
7415
|
|
|
@@ -7395,14 +7420,14 @@
|
|
|
7395
7420
|
}
|
|
7396
7421
|
|
|
7397
7422
|
};
|
|
7398
|
-
} // (
|
|
7423
|
+
} // (260:6) {#each _options as option}
|
|
7399
7424
|
|
|
7400
7425
|
|
|
7401
7426
|
function create_each_block$4(ctx) {
|
|
7402
7427
|
let option;
|
|
7403
7428
|
let t0_value =
|
|
7404
7429
|
/*option*/
|
|
7405
|
-
ctx[
|
|
7430
|
+
ctx[50].label + "";
|
|
7406
7431
|
let t0;
|
|
7407
7432
|
let t1;
|
|
7408
7433
|
let option_selected_value;
|
|
@@ -7415,14 +7440,14 @@
|
|
|
7415
7440
|
t1 = space();
|
|
7416
7441
|
option.selected = option_selected_value =
|
|
7417
7442
|
/*option*/
|
|
7418
|
-
ctx[
|
|
7443
|
+
ctx[50].selected;
|
|
7419
7444
|
option.__value = option_value_value =
|
|
7420
7445
|
/*option*/
|
|
7421
|
-
ctx[
|
|
7446
|
+
ctx[50].value;
|
|
7422
7447
|
option.value = option.__value;
|
|
7423
7448
|
attr(option, "aria-label", option_aria_label_value =
|
|
7424
7449
|
/*option*/
|
|
7425
|
-
ctx[
|
|
7450
|
+
ctx[50].label);
|
|
7426
7451
|
},
|
|
7427
7452
|
|
|
7428
7453
|
m(target, anchor) {
|
|
@@ -7436,13 +7461,13 @@
|
|
|
7436
7461
|
/*_options*/
|
|
7437
7462
|
4096 && t0_value !== (t0_value =
|
|
7438
7463
|
/*option*/
|
|
7439
|
-
ctx[
|
|
7464
|
+
ctx[50].label + "")) set_data(t0, t0_value);
|
|
7440
7465
|
|
|
7441
7466
|
if (dirty[0] &
|
|
7442
7467
|
/*_options*/
|
|
7443
7468
|
4096 && option_selected_value !== (option_selected_value =
|
|
7444
7469
|
/*option*/
|
|
7445
|
-
ctx[
|
|
7470
|
+
ctx[50].selected)) {
|
|
7446
7471
|
option.selected = option_selected_value;
|
|
7447
7472
|
}
|
|
7448
7473
|
|
|
@@ -7450,7 +7475,7 @@
|
|
|
7450
7475
|
/*_options*/
|
|
7451
7476
|
4096 && option_value_value !== (option_value_value =
|
|
7452
7477
|
/*option*/
|
|
7453
|
-
ctx[
|
|
7478
|
+
ctx[50].value)) {
|
|
7454
7479
|
option.__value = option_value_value;
|
|
7455
7480
|
option.value = option.__value;
|
|
7456
7481
|
}
|
|
@@ -7459,7 +7484,7 @@
|
|
|
7459
7484
|
/*_options*/
|
|
7460
7485
|
4096 && option_aria_label_value !== (option_aria_label_value =
|
|
7461
7486
|
/*option*/
|
|
7462
|
-
ctx[
|
|
7487
|
+
ctx[50].label)) {
|
|
7463
7488
|
attr(option, "aria-label", option_aria_label_value);
|
|
7464
7489
|
}
|
|
7465
7490
|
},
|
|
@@ -7520,7 +7545,7 @@
|
|
|
7520
7545
|
if_block.m(div, null);
|
|
7521
7546
|
/*div_binding*/
|
|
7522
7547
|
|
|
7523
|
-
ctx[
|
|
7548
|
+
ctx[35](div);
|
|
7524
7549
|
},
|
|
7525
7550
|
|
|
7526
7551
|
p(ctx, dirty) {
|
|
@@ -7582,7 +7607,7 @@
|
|
|
7582
7607
|
if_block.d();
|
|
7583
7608
|
/*div_binding*/
|
|
7584
7609
|
|
|
7585
|
-
ctx[
|
|
7610
|
+
ctx[35](null);
|
|
7586
7611
|
}
|
|
7587
7612
|
|
|
7588
7613
|
};
|
|
@@ -7615,6 +7640,8 @@
|
|
|
7615
7640
|
|
|
7616
7641
|
|
|
7617
7642
|
_menuEl.addEventListener("mouseover", onHighlight);
|
|
7643
|
+
|
|
7644
|
+
setDropdownMenuPosition();
|
|
7618
7645
|
});
|
|
7619
7646
|
});
|
|
7620
7647
|
|
|
@@ -7680,6 +7707,8 @@
|
|
|
7680
7707
|
|
|
7681
7708
|
let _computedWidth;
|
|
7682
7709
|
|
|
7710
|
+
let _dropdownMenuPos = "auto";
|
|
7711
|
+
|
|
7683
7712
|
let _el;
|
|
7684
7713
|
|
|
7685
7714
|
let _menuEl;
|
|
@@ -7778,6 +7807,17 @@
|
|
|
7778
7807
|
|
|
7779
7808
|
setHighlightedIndexToSelected();
|
|
7780
7809
|
$$invalidate(17, _isMenuVisible = false);
|
|
7810
|
+
$$invalidate(20, _dropdownMenuPos = "auto");
|
|
7811
|
+
}
|
|
7812
|
+
|
|
7813
|
+
function setDropdownMenuPosition() {
|
|
7814
|
+
const dropdownRect = _el.getBoundingClientRect();
|
|
7815
|
+
|
|
7816
|
+
const menuRect = _menuEl.getBoundingClientRect();
|
|
7817
|
+
|
|
7818
|
+
if (window.innerHeight - dropdownRect.top < dropdownRect.height + menuRect.height) {
|
|
7819
|
+
$$invalidate(20, _dropdownMenuPos = menuRect.top - dropdownRect.top + 'px');
|
|
7820
|
+
}
|
|
7781
7821
|
}
|
|
7782
7822
|
|
|
7783
7823
|
function setHighlightedIndexToSelected() {
|
|
@@ -7893,8 +7933,8 @@
|
|
|
7893
7933
|
function select_binding($$value) {
|
|
7894
7934
|
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
7895
7935
|
_selectEl = $$value;
|
|
7896
|
-
$$invalidate(
|
|
7897
|
-
((($$invalidate(12, _options), $$invalidate(13, _el)), $$invalidate(
|
|
7936
|
+
$$invalidate(22, _selectEl);
|
|
7937
|
+
((($$invalidate(12, _options), $$invalidate(13, _el)), $$invalidate(29, value)), $$invalidate(14, _native)), $$invalidate(31, native);
|
|
7898
7938
|
});
|
|
7899
7939
|
}
|
|
7900
7940
|
|
|
@@ -7903,7 +7943,7 @@
|
|
|
7903
7943
|
function ul_binding($$value) {
|
|
7904
7944
|
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
7905
7945
|
_menuEl = $$value;
|
|
7906
|
-
$$invalidate(
|
|
7946
|
+
$$invalidate(21, _menuEl);
|
|
7907
7947
|
});
|
|
7908
7948
|
}
|
|
7909
7949
|
|
|
@@ -7917,15 +7957,15 @@
|
|
|
7917
7957
|
$$self.$$set = $$props => {
|
|
7918
7958
|
if ('name' in $$props) $$invalidate(0, name = $$props.name);
|
|
7919
7959
|
if ('arialabel' in $$props) $$invalidate(1, arialabel = $$props.arialabel);
|
|
7920
|
-
if ('value' in $$props) $$invalidate(
|
|
7960
|
+
if ('value' in $$props) $$invalidate(29, value = $$props.value);
|
|
7921
7961
|
if ('leadingicon' in $$props) $$invalidate(2, leadingicon = $$props.leadingicon);
|
|
7922
7962
|
if ('maxheight' in $$props) $$invalidate(3, maxheight = $$props.maxheight);
|
|
7923
7963
|
if ('placeholder' in $$props) $$invalidate(4, placeholder = $$props.placeholder);
|
|
7924
7964
|
if ('width' in $$props) $$invalidate(5, width = $$props.width);
|
|
7925
7965
|
if ('disabled' in $$props) $$invalidate(6, disabled = $$props.disabled);
|
|
7926
7966
|
if ('error' in $$props) $$invalidate(7, error = $$props.error);
|
|
7927
|
-
if ('multiselect' in $$props) $$invalidate(
|
|
7928
|
-
if ('native' in $$props) $$invalidate(
|
|
7967
|
+
if ('multiselect' in $$props) $$invalidate(30, multiselect = $$props.multiselect);
|
|
7968
|
+
if ('native' in $$props) $$invalidate(31, native = $$props.native);
|
|
7929
7969
|
if ('mt' in $$props) $$invalidate(8, mt = $$props.mt);
|
|
7930
7970
|
if ('mr' in $$props) $$invalidate(9, mr = $$props.mr);
|
|
7931
7971
|
if ('mb' in $$props) $$invalidate(10, mb = $$props.mb);
|
|
@@ -7936,30 +7976,30 @@
|
|
|
7936
7976
|
if ($$self.$$.dirty[0] &
|
|
7937
7977
|
/*disabled*/
|
|
7938
7978
|
64) {
|
|
7939
|
-
$$invalidate(
|
|
7979
|
+
$$invalidate(23, _disabled = toBoolean(disabled));
|
|
7940
7980
|
}
|
|
7941
7981
|
|
|
7942
7982
|
if ($$self.$$.dirty[0] &
|
|
7943
7983
|
/*error*/
|
|
7944
7984
|
128) {
|
|
7945
|
-
$$invalidate(
|
|
7985
|
+
$$invalidate(24, _error = toBoolean(error));
|
|
7946
7986
|
}
|
|
7947
7987
|
|
|
7948
7988
|
if ($$self.$$.dirty[0] &
|
|
7949
7989
|
/*multiselect*/
|
|
7950
|
-
|
|
7990
|
+
1073741824) {
|
|
7951
7991
|
_multiselect = toBoolean(multiselect);
|
|
7952
7992
|
}
|
|
7953
7993
|
|
|
7954
|
-
if ($$self.$$.dirty[
|
|
7994
|
+
if ($$self.$$.dirty[1] &
|
|
7955
7995
|
/*native*/
|
|
7956
|
-
|
|
7996
|
+
1) {
|
|
7957
7997
|
$$invalidate(14, _native = toBoolean(native));
|
|
7958
7998
|
}
|
|
7959
7999
|
|
|
7960
8000
|
if ($$self.$$.dirty[0] &
|
|
7961
8001
|
/*_el, value, _native, _options*/
|
|
7962
|
-
|
|
8002
|
+
536899584) {
|
|
7963
8003
|
{
|
|
7964
8004
|
if (_el) {
|
|
7965
8005
|
$$invalidate(15, _values = parseValues(value));
|
|
@@ -7975,13 +8015,13 @@
|
|
|
7975
8015
|
}
|
|
7976
8016
|
};
|
|
7977
8017
|
|
|
7978
|
-
return [name, arialabel, leadingicon, maxheight, placeholder, width, disabled, error, mt, mr, mb, ml, _options, _el, _native, _values, _selectedLabel, _isMenuVisible, _highlightedIndex, _computedWidth, _menuEl, _selectEl, _disabled, _error, showMenu, closeMenu, onSelect, onNativeSelect, value, multiselect, native, select_binding, click_handler, ul_binding, div_binding];
|
|
8018
|
+
return [name, arialabel, leadingicon, maxheight, placeholder, width, disabled, error, mt, mr, mb, ml, _options, _el, _native, _values, _selectedLabel, _isMenuVisible, _highlightedIndex, _computedWidth, _dropdownMenuPos, _menuEl, _selectEl, _disabled, _error, showMenu, closeMenu, onSelect, onNativeSelect, value, multiselect, native, select_binding, click_handler, ul_binding, div_binding];
|
|
7979
8019
|
}
|
|
7980
8020
|
|
|
7981
8021
|
class Dropdown extends SvelteElement {
|
|
7982
8022
|
constructor(options) {
|
|
7983
8023
|
super();
|
|
7984
|
-
this.shadowRoot.innerHTML = `<style>:host{box-sizing:border-box;font-family:var(--goa-font-family-sans)}.dropdown{position:relative;cursor:pointer;display:inline-block;width:100%}@media(min-width: 640px){.dropdown{width:var(--width)}}.dropdown-background{cursor:default;position:fixed;z-index:98;inset:0}.dropdown-list{position:absolute;left:0;right:0;padding:0;margin:0;margin-top:3px;list-style-type:none;background:var(--goa-color-greyscale-white);border-radius:var(--goa-border-radius-m);outline:none;box-shadow:var(--shadow-1);z-index:99;scroll-behavior:smooth;scrollbar-width:thin;display:none}.dropdown-active{display:block}.dropdown-list::-webkit-scrollbar{width:6px}.dropdown-list::-webkit-scrollbar-track{background:#f1f1f1}.dropdown-list::-webkit-scrollbar-thumb{background:#888}.dropdown-list::-webkit-scrollbar-thumb:hover{background:#555}.dropdown-item{margin:0;padding:0.5rem;cursor:pointer;color:var(--goa-color-greyscale-black);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dropdown-item--tabbed{background:var(--goa-color-greyscale-100);color:var(--goa-color-interactive-hover)}.dropdown-item--disabled{opacity:0.5;cursor:default}.dropdown-item--disabled:hover{cursor:default;color:var(--goa-color-greyscale-700)}.dropdown-item--selected{background:var(--goa-color-interactive-default);color:var(--goa-color-greyscale-white)}.dropdown-item--tabbed.dropdown-item--selected,.dropdown-item--selected:hover{background:var(--goa-color-interactive-hover);color:var(--goa-color-greyscale-white)}.dropdown-native{border:1px solid var(--goa-color-greyscale-700);border-radius:var(--goa-border-radius-m);background-color:var(--goa-color-greyscale-white);transition:box-shadow 0.1s ease-in}.dropdown-native:has(select:disabled){background-color:var(--goa-color-greyscale-100);border-color:var(--goa-color-greyscale-200);box-shadow:none;color:var(--goa-color-text-secondary);cursor:default}.dropdown-native:has(select.error){border:2px solid var(--goa-color-interactive-error)}.dropdown-native:hover{border-color:var(--goa-color-interactive-hover);box-shadow:0 0 0 var(--goa-border-width-m) var(--goa-color-interactive-hover)}select{border:none;background-color:transparent;color:var(--goa-color-text-default);font-size:var(--goa-font-size-4);appearance:none;padding:calc(var(--goa-space-xs) + 2px);padding-left:0.5rem;padding-right:3rem;outline:none;width:100%}.dropdown-native::after{content:"";position:absolute;right:0.6rem;top:0.6rem;pointer-events:none;width:1.5rem;height:1.5rem;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path fill='none' stroke='%23333333' stroke-linecap='round' stroke-linejoin='round' stroke-width='48' d='M112 184l144 144 144-144' /%3E%3C/svg%3E");background-repeat:none}.dropdown-native:focus-within{box-shadow:0 0 0 3px var(--goa-color-interactive-focus)}</style>`;
|
|
8024
|
+
this.shadowRoot.innerHTML = `<style>:host{box-sizing:border-box;font-family:var(--goa-font-family-sans)}.dropdown{position:relative;cursor:pointer;display:inline-block;width:100%}@media(min-width: 640px){.dropdown{width:var(--width)}}.dropdown-background{cursor:default;position:fixed;z-index:98;inset:0}.dropdown-list{position:absolute;left:0;right:0;padding:0;margin:0;margin-top:3px;list-style-type:none;background:var(--goa-color-greyscale-white);border-radius:var(--goa-border-radius-m);outline:none;box-shadow:var(--shadow-1);z-index:99;bottom:var(--bottom);scroll-behavior:smooth;scrollbar-width:thin;display:none}.dropdown-active{display:block}.dropdown-list::-webkit-scrollbar{width:6px}.dropdown-list::-webkit-scrollbar-track{background:#f1f1f1}.dropdown-list::-webkit-scrollbar-thumb{background:#888}.dropdown-list::-webkit-scrollbar-thumb:hover{background:#555}.dropdown-item{margin:0;padding:0.5rem;cursor:pointer;color:var(--goa-color-greyscale-black);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dropdown-item--tabbed{background:var(--goa-color-greyscale-100);color:var(--goa-color-interactive-hover)}.dropdown-item--disabled{opacity:0.5;cursor:default}.dropdown-item--disabled:hover{cursor:default;color:var(--goa-color-greyscale-700)}.dropdown-item--selected{background:var(--goa-color-interactive-default);color:var(--goa-color-greyscale-white)}.dropdown-item--tabbed.dropdown-item--selected,.dropdown-item--selected:hover{background:var(--goa-color-interactive-hover);color:var(--goa-color-greyscale-white)}.dropdown-native{border:1px solid var(--goa-color-greyscale-700);border-radius:var(--goa-border-radius-m);background-color:var(--goa-color-greyscale-white);transition:box-shadow 0.1s ease-in}.dropdown-native:has(select:disabled){background-color:var(--goa-color-greyscale-100);border-color:var(--goa-color-greyscale-200);box-shadow:none;color:var(--goa-color-text-secondary);cursor:default}.dropdown-native:has(select.error){border:2px solid var(--goa-color-interactive-error)}.dropdown-native:hover{border-color:var(--goa-color-interactive-hover);box-shadow:0 0 0 var(--goa-border-width-m) var(--goa-color-interactive-hover)}select{border:none;background-color:transparent;color:var(--goa-color-text-default);font-size:var(--goa-font-size-4);appearance:none;padding:calc(var(--goa-space-xs) + 2px);padding-left:0.5rem;padding-right:3rem;outline:none;width:100%}.dropdown-native::after{content:"";position:absolute;right:0.6rem;top:0.6rem;pointer-events:none;width:1.5rem;height:1.5rem;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path fill='none' stroke='%23333333' stroke-linecap='round' stroke-linejoin='round' stroke-width='48' d='M112 184l144 144 144-144' /%3E%3C/svg%3E");background-repeat:none}.dropdown-native:focus-within{box-shadow:0 0 0 3px var(--goa-color-interactive-focus)}</style>`;
|
|
7985
8025
|
init(this, {
|
|
7986
8026
|
target: this.shadowRoot,
|
|
7987
8027
|
props: attribute_to_object(this.attributes),
|
|
@@ -7989,15 +8029,15 @@
|
|
|
7989
8029
|
}, instance$s, create_fragment$v, safe_not_equal, {
|
|
7990
8030
|
name: 0,
|
|
7991
8031
|
arialabel: 1,
|
|
7992
|
-
value:
|
|
8032
|
+
value: 29,
|
|
7993
8033
|
leadingicon: 2,
|
|
7994
8034
|
maxheight: 3,
|
|
7995
8035
|
placeholder: 4,
|
|
7996
8036
|
width: 5,
|
|
7997
8037
|
disabled: 6,
|
|
7998
8038
|
error: 7,
|
|
7999
|
-
multiselect:
|
|
8000
|
-
native:
|
|
8039
|
+
multiselect: 30,
|
|
8040
|
+
native: 31,
|
|
8001
8041
|
mt: 8,
|
|
8002
8042
|
mr: 9,
|
|
8003
8043
|
mb: 10,
|
|
@@ -8043,7 +8083,7 @@
|
|
|
8043
8083
|
}
|
|
8044
8084
|
|
|
8045
8085
|
get value() {
|
|
8046
|
-
return this.$$.ctx[
|
|
8086
|
+
return this.$$.ctx[29];
|
|
8047
8087
|
}
|
|
8048
8088
|
|
|
8049
8089
|
set value(value) {
|
|
@@ -8120,7 +8160,7 @@
|
|
|
8120
8160
|
}
|
|
8121
8161
|
|
|
8122
8162
|
get multiselect() {
|
|
8123
|
-
return this.$$.ctx[
|
|
8163
|
+
return this.$$.ctx[30];
|
|
8124
8164
|
}
|
|
8125
8165
|
|
|
8126
8166
|
set multiselect(multiselect) {
|
|
@@ -8131,7 +8171,7 @@
|
|
|
8131
8171
|
}
|
|
8132
8172
|
|
|
8133
8173
|
get native() {
|
|
8134
|
-
return this.$$.ctx[
|
|
8174
|
+
return this.$$.ctx[31];
|
|
8135
8175
|
}
|
|
8136
8176
|
|
|
8137
8177
|
set native(native) {
|