@abgov/react-components 4.0.0-alpha.127 → 4.0.0-alpha.129
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/lib/container/container.d.ts +1 -0
- package/package.json +1 -1
- package/react-components.esm.js +147 -139
- package/react-components.umd.js +152 -144
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[48] = list[i];
|
|
6771
|
+
child_ctx[52] = 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[48] = list[i];
|
|
6778
6778
|
return child_ctx;
|
|
6779
|
-
} // (
|
|
6779
|
+
} // (259:2) {:else}
|
|
6780
6780
|
|
|
6781
6781
|
|
|
6782
6782
|
function create_else_block$5(ctx) {
|
|
@@ -6795,14 +6795,14 @@
|
|
|
6795
6795
|
let dispose;
|
|
6796
6796
|
let if_block =
|
|
6797
6797
|
/*_isMenuVisible*/
|
|
6798
|
-
ctx[
|
|
6798
|
+
ctx[17] && create_if_block_1$7(ctx);
|
|
6799
6799
|
let each_value_1 =
|
|
6800
6800
|
/*_options*/
|
|
6801
|
-
ctx[
|
|
6801
|
+
ctx[12];
|
|
6802
6802
|
|
|
6803
6803
|
const get_key = ctx =>
|
|
6804
6804
|
/*index*/
|
|
6805
|
-
ctx[
|
|
6805
|
+
ctx[52];
|
|
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);
|
|
@@ -6839,7 +6839,7 @@
|
|
|
6839
6839
|
set_custom_element_data(goa_input, "aria-controls", "menu");
|
|
6840
6840
|
set_custom_element_data(goa_input, "aria-expanded",
|
|
6841
6841
|
/*_isMenuVisible*/
|
|
6842
|
-
ctx[
|
|
6842
|
+
ctx[17]);
|
|
6843
6843
|
set_custom_element_data(goa_input, "arialabel", goa_input_arialabel_value =
|
|
6844
6844
|
/*arialabel*/
|
|
6845
6845
|
ctx[1] ||
|
|
@@ -6854,7 +6854,7 @@
|
|
|
6854
6854
|
set_custom_element_data(goa_input, "type", "text");
|
|
6855
6855
|
set_custom_element_data(goa_input, "value",
|
|
6856
6856
|
/*_selectedLabel*/
|
|
6857
|
-
ctx[
|
|
6857
|
+
ctx[16]);
|
|
6858
6858
|
set_custom_element_data(goa_input, "width", "100%");
|
|
6859
6859
|
set_custom_element_data(goa_input, "name",
|
|
6860
6860
|
/*name*/
|
|
@@ -6863,7 +6863,7 @@
|
|
|
6863
6863
|
attr(ul, "role", "listbox");
|
|
6864
6864
|
attr(ul, "aria-activedescendant",
|
|
6865
6865
|
/*_selectedLabel*/
|
|
6866
|
-
ctx[
|
|
6866
|
+
ctx[16]);
|
|
6867
6867
|
attr(ul, "data-testid", "dropdown-menu");
|
|
6868
6868
|
attr(ul, "tabindex", "0");
|
|
6869
6869
|
attr(ul, "class", "dropdown-list");
|
|
@@ -6872,7 +6872,7 @@
|
|
|
6872
6872
|
ctx[3]}`);
|
|
6873
6873
|
toggle_class(ul, "dropdown-active",
|
|
6874
6874
|
/*_isMenuVisible*/
|
|
6875
|
-
ctx[
|
|
6875
|
+
ctx[17]);
|
|
6876
6876
|
},
|
|
6877
6877
|
|
|
6878
6878
|
m(target, anchor) {
|
|
@@ -6903,7 +6903,7 @@
|
|
|
6903
6903
|
p(ctx, dirty) {
|
|
6904
6904
|
if (
|
|
6905
6905
|
/*_isMenuVisible*/
|
|
6906
|
-
ctx[
|
|
6906
|
+
ctx[17]) {
|
|
6907
6907
|
if (if_block) {
|
|
6908
6908
|
if_block.p(ctx, dirty);
|
|
6909
6909
|
} else {
|
|
@@ -6950,10 +6950,10 @@
|
|
|
6950
6950
|
|
|
6951
6951
|
if (dirty[0] &
|
|
6952
6952
|
/*_isMenuVisible*/
|
|
6953
|
-
|
|
6953
|
+
131072) {
|
|
6954
6954
|
set_custom_element_data(goa_input, "aria-expanded",
|
|
6955
6955
|
/*_isMenuVisible*/
|
|
6956
|
-
ctx[
|
|
6956
|
+
ctx[17]);
|
|
6957
6957
|
}
|
|
6958
6958
|
|
|
6959
6959
|
if (dirty[0] &
|
|
@@ -6976,10 +6976,10 @@
|
|
|
6976
6976
|
|
|
6977
6977
|
if (dirty[0] &
|
|
6978
6978
|
/*_selectedLabel*/
|
|
6979
|
-
|
|
6979
|
+
65536) {
|
|
6980
6980
|
set_custom_element_data(goa_input, "value",
|
|
6981
6981
|
/*_selectedLabel*/
|
|
6982
|
-
ctx[
|
|
6982
|
+
ctx[16]);
|
|
6983
6983
|
}
|
|
6984
6984
|
|
|
6985
6985
|
if (dirty[0] &
|
|
@@ -6992,19 +6992,19 @@
|
|
|
6992
6992
|
|
|
6993
6993
|
if (dirty[0] &
|
|
6994
6994
|
/*_options, _values, _highlightedIndex, onSelect*/
|
|
6995
|
-
|
|
6995
|
+
67407872) {
|
|
6996
6996
|
each_value_1 =
|
|
6997
6997
|
/*_options*/
|
|
6998
|
-
ctx[
|
|
6998
|
+
ctx[12];
|
|
6999
6999
|
each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value_1, each_1_lookup, ul, destroy_block, create_each_block_1, null, get_each_context_1);
|
|
7000
7000
|
}
|
|
7001
7001
|
|
|
7002
7002
|
if (dirty[0] &
|
|
7003
7003
|
/*_selectedLabel*/
|
|
7004
|
-
|
|
7004
|
+
65536) {
|
|
7005
7005
|
attr(ul, "aria-activedescendant",
|
|
7006
7006
|
/*_selectedLabel*/
|
|
7007
|
-
ctx[
|
|
7007
|
+
ctx[16]);
|
|
7008
7008
|
}
|
|
7009
7009
|
|
|
7010
7010
|
if (dirty[0] &
|
|
@@ -7017,10 +7017,10 @@
|
|
|
7017
7017
|
|
|
7018
7018
|
if (dirty[0] &
|
|
7019
7019
|
/*_isMenuVisible*/
|
|
7020
|
-
|
|
7020
|
+
131072) {
|
|
7021
7021
|
toggle_class(ul, "dropdown-active",
|
|
7022
7022
|
/*_isMenuVisible*/
|
|
7023
|
-
ctx[
|
|
7023
|
+
ctx[17]);
|
|
7024
7024
|
}
|
|
7025
7025
|
},
|
|
7026
7026
|
|
|
@@ -7045,7 +7045,7 @@
|
|
|
7045
7045
|
}
|
|
7046
7046
|
|
|
7047
7047
|
};
|
|
7048
|
-
} // (
|
|
7048
|
+
} // (240:2) {#if _native}
|
|
7049
7049
|
|
|
7050
7050
|
|
|
7051
7051
|
function create_if_block$f(ctx) {
|
|
@@ -7056,7 +7056,7 @@
|
|
|
7056
7056
|
let dispose;
|
|
7057
7057
|
let each_value =
|
|
7058
7058
|
/*_options*/
|
|
7059
|
-
ctx[
|
|
7059
|
+
ctx[12];
|
|
7060
7060
|
let each_blocks = [];
|
|
7061
7061
|
|
|
7062
7062
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
@@ -7074,7 +7074,7 @@
|
|
|
7074
7074
|
|
|
7075
7075
|
select.disabled =
|
|
7076
7076
|
/*_disabled*/
|
|
7077
|
-
ctx[
|
|
7077
|
+
ctx[22];
|
|
7078
7078
|
attr(select, "aria-label", select_aria_label_value =
|
|
7079
7079
|
/*arialabel*/
|
|
7080
7080
|
ctx[1] ||
|
|
@@ -7108,10 +7108,10 @@
|
|
|
7108
7108
|
p(ctx, dirty) {
|
|
7109
7109
|
if (dirty[0] &
|
|
7110
7110
|
/*_options*/
|
|
7111
|
-
|
|
7111
|
+
4096) {
|
|
7112
7112
|
each_value =
|
|
7113
7113
|
/*_options*/
|
|
7114
|
-
ctx[
|
|
7114
|
+
ctx[12];
|
|
7115
7115
|
let i;
|
|
7116
7116
|
|
|
7117
7117
|
for (i = 0; i < each_value.length; i += 1) {
|
|
@@ -7135,10 +7135,10 @@
|
|
|
7135
7135
|
|
|
7136
7136
|
if (dirty[0] &
|
|
7137
7137
|
/*_disabled*/
|
|
7138
|
-
|
|
7138
|
+
4194304) {
|
|
7139
7139
|
select.disabled =
|
|
7140
7140
|
/*_disabled*/
|
|
7141
|
-
ctx[
|
|
7141
|
+
ctx[22];
|
|
7142
7142
|
}
|
|
7143
7143
|
|
|
7144
7144
|
if (dirty[0] &
|
|
@@ -7171,7 +7171,7 @@
|
|
|
7171
7171
|
}
|
|
7172
7172
|
|
|
7173
7173
|
};
|
|
7174
|
-
} // (
|
|
7174
|
+
} // (260:4) {#if _isMenuVisible}
|
|
7175
7175
|
|
|
7176
7176
|
|
|
7177
7177
|
function create_if_block_1$7(ctx) {
|
|
@@ -7216,16 +7216,16 @@
|
|
|
7216
7216
|
}
|
|
7217
7217
|
|
|
7218
7218
|
};
|
|
7219
|
-
} // (
|
|
7219
|
+
} // (303:6) {#each _options as option, index (index)}
|
|
7220
7220
|
|
|
7221
7221
|
|
|
7222
7222
|
function create_each_block_1(key_1, ctx) {
|
|
7223
7223
|
let li;
|
|
7224
7224
|
let t0_value = (
|
|
7225
7225
|
/*option*/
|
|
7226
|
-
ctx[
|
|
7226
|
+
ctx[48].label ||
|
|
7227
7227
|
/*option*/
|
|
7228
|
-
ctx[
|
|
7228
|
+
ctx[48].value) + "";
|
|
7229
7229
|
let t0;
|
|
7230
7230
|
let t1;
|
|
7231
7231
|
let li_id_value;
|
|
@@ -7243,7 +7243,7 @@
|
|
|
7243
7243
|
/*click_handler*/
|
|
7244
7244
|
ctx[32](
|
|
7245
7245
|
/*option*/
|
|
7246
|
-
ctx[
|
|
7246
|
+
ctx[48])
|
|
7247
7247
|
);
|
|
7248
7248
|
}
|
|
7249
7249
|
|
|
@@ -7257,40 +7257,40 @@
|
|
|
7257
7257
|
t1 = space();
|
|
7258
7258
|
attr(li, "id", li_id_value =
|
|
7259
7259
|
/*option*/
|
|
7260
|
-
ctx[
|
|
7260
|
+
ctx[48].label);
|
|
7261
7261
|
attr(li, "role", "option");
|
|
7262
7262
|
attr(li, "aria-label", li_aria_label_value =
|
|
7263
7263
|
/*option*/
|
|
7264
|
-
ctx[
|
|
7264
|
+
ctx[48].label ||
|
|
7265
7265
|
/*option*/
|
|
7266
|
-
ctx[
|
|
7266
|
+
ctx[48].value);
|
|
7267
7267
|
attr(li, "aria-selected", li_aria_selected_value =
|
|
7268
7268
|
/*_values*/
|
|
7269
|
-
ctx[
|
|
7269
|
+
ctx[15].includes(
|
|
7270
7270
|
/*option*/
|
|
7271
|
-
ctx[
|
|
7271
|
+
ctx[48].value) ? "true" : "false");
|
|
7272
7272
|
attr(li, "class", "dropdown-item");
|
|
7273
7273
|
attr(li, "data-testid", li_data_testid_value = `dropdown-item-${
|
|
7274
7274
|
/*option*/
|
|
7275
|
-
ctx[
|
|
7275
|
+
ctx[48].value}`);
|
|
7276
7276
|
attr(li, "data-index", li_data_index_value =
|
|
7277
7277
|
/*index*/
|
|
7278
|
-
ctx[
|
|
7278
|
+
ctx[52]);
|
|
7279
7279
|
attr(li, "data-value", li_data_value_value =
|
|
7280
7280
|
/*option*/
|
|
7281
|
-
ctx[
|
|
7281
|
+
ctx[48].value);
|
|
7282
7282
|
attr(li, "style", li_style_value = `display: ${"block"}`);
|
|
7283
7283
|
toggle_class(li, "dropdown-item--disabled", false);
|
|
7284
7284
|
toggle_class(li, "dropdown-item--tabbed",
|
|
7285
7285
|
/*index*/
|
|
7286
|
-
ctx[
|
|
7286
|
+
ctx[52] ===
|
|
7287
7287
|
/*_highlightedIndex*/
|
|
7288
|
-
ctx[
|
|
7288
|
+
ctx[18]);
|
|
7289
7289
|
toggle_class(li, "dropdown-item--selected",
|
|
7290
7290
|
/*_values*/
|
|
7291
|
-
ctx[
|
|
7291
|
+
ctx[15].includes(
|
|
7292
7292
|
/*option*/
|
|
7293
|
-
ctx[
|
|
7293
|
+
ctx[48].value));
|
|
7294
7294
|
this.first = li;
|
|
7295
7295
|
},
|
|
7296
7296
|
|
|
@@ -7309,82 +7309,82 @@
|
|
|
7309
7309
|
ctx = new_ctx;
|
|
7310
7310
|
if (dirty[0] &
|
|
7311
7311
|
/*_options*/
|
|
7312
|
-
|
|
7312
|
+
4096 && t0_value !== (t0_value = (
|
|
7313
7313
|
/*option*/
|
|
7314
|
-
ctx[
|
|
7314
|
+
ctx[48].label ||
|
|
7315
7315
|
/*option*/
|
|
7316
|
-
ctx[
|
|
7316
|
+
ctx[48].value) + "")) set_data(t0, t0_value);
|
|
7317
7317
|
|
|
7318
7318
|
if (dirty[0] &
|
|
7319
7319
|
/*_options*/
|
|
7320
|
-
|
|
7320
|
+
4096 && li_id_value !== (li_id_value =
|
|
7321
7321
|
/*option*/
|
|
7322
|
-
ctx[
|
|
7322
|
+
ctx[48].label)) {
|
|
7323
7323
|
attr(li, "id", li_id_value);
|
|
7324
7324
|
}
|
|
7325
7325
|
|
|
7326
7326
|
if (dirty[0] &
|
|
7327
7327
|
/*_options*/
|
|
7328
|
-
|
|
7328
|
+
4096 && li_aria_label_value !== (li_aria_label_value =
|
|
7329
7329
|
/*option*/
|
|
7330
|
-
ctx[
|
|
7330
|
+
ctx[48].label ||
|
|
7331
7331
|
/*option*/
|
|
7332
|
-
ctx[
|
|
7332
|
+
ctx[48].value)) {
|
|
7333
7333
|
attr(li, "aria-label", li_aria_label_value);
|
|
7334
7334
|
}
|
|
7335
7335
|
|
|
7336
7336
|
if (dirty[0] &
|
|
7337
7337
|
/*_values, _options*/
|
|
7338
|
-
|
|
7338
|
+
36864 && li_aria_selected_value !== (li_aria_selected_value =
|
|
7339
7339
|
/*_values*/
|
|
7340
|
-
ctx[
|
|
7340
|
+
ctx[15].includes(
|
|
7341
7341
|
/*option*/
|
|
7342
|
-
ctx[
|
|
7342
|
+
ctx[48].value) ? "true" : "false")) {
|
|
7343
7343
|
attr(li, "aria-selected", li_aria_selected_value);
|
|
7344
7344
|
}
|
|
7345
7345
|
|
|
7346
7346
|
if (dirty[0] &
|
|
7347
7347
|
/*_options*/
|
|
7348
|
-
|
|
7348
|
+
4096 && li_data_testid_value !== (li_data_testid_value = `dropdown-item-${
|
|
7349
7349
|
/*option*/
|
|
7350
|
-
ctx[
|
|
7350
|
+
ctx[48].value}`)) {
|
|
7351
7351
|
attr(li, "data-testid", li_data_testid_value);
|
|
7352
7352
|
}
|
|
7353
7353
|
|
|
7354
7354
|
if (dirty[0] &
|
|
7355
7355
|
/*_options*/
|
|
7356
|
-
|
|
7356
|
+
4096 && li_data_index_value !== (li_data_index_value =
|
|
7357
7357
|
/*index*/
|
|
7358
|
-
ctx[
|
|
7358
|
+
ctx[52])) {
|
|
7359
7359
|
attr(li, "data-index", li_data_index_value);
|
|
7360
7360
|
}
|
|
7361
7361
|
|
|
7362
7362
|
if (dirty[0] &
|
|
7363
7363
|
/*_options*/
|
|
7364
|
-
|
|
7364
|
+
4096 && li_data_value_value !== (li_data_value_value =
|
|
7365
7365
|
/*option*/
|
|
7366
|
-
ctx[
|
|
7366
|
+
ctx[48].value)) {
|
|
7367
7367
|
attr(li, "data-value", li_data_value_value);
|
|
7368
7368
|
}
|
|
7369
7369
|
|
|
7370
7370
|
if (dirty[0] &
|
|
7371
7371
|
/*_options, _highlightedIndex*/
|
|
7372
|
-
|
|
7372
|
+
266240) {
|
|
7373
7373
|
toggle_class(li, "dropdown-item--tabbed",
|
|
7374
7374
|
/*index*/
|
|
7375
|
-
ctx[
|
|
7375
|
+
ctx[52] ===
|
|
7376
7376
|
/*_highlightedIndex*/
|
|
7377
|
-
ctx[
|
|
7377
|
+
ctx[18]);
|
|
7378
7378
|
}
|
|
7379
7379
|
|
|
7380
7380
|
if (dirty[0] &
|
|
7381
7381
|
/*_values, _options*/
|
|
7382
|
-
|
|
7382
|
+
36864) {
|
|
7383
7383
|
toggle_class(li, "dropdown-item--selected",
|
|
7384
7384
|
/*_values*/
|
|
7385
|
-
ctx[
|
|
7385
|
+
ctx[15].includes(
|
|
7386
7386
|
/*option*/
|
|
7387
|
-
ctx[
|
|
7387
|
+
ctx[48].value));
|
|
7388
7388
|
}
|
|
7389
7389
|
},
|
|
7390
7390
|
|
|
@@ -7395,14 +7395,14 @@
|
|
|
7395
7395
|
}
|
|
7396
7396
|
|
|
7397
7397
|
};
|
|
7398
|
-
} // (
|
|
7398
|
+
} // (249:6) {#each _options as option}
|
|
7399
7399
|
|
|
7400
7400
|
|
|
7401
7401
|
function create_each_block$4(ctx) {
|
|
7402
7402
|
let option;
|
|
7403
7403
|
let t0_value =
|
|
7404
7404
|
/*option*/
|
|
7405
|
-
ctx[
|
|
7405
|
+
ctx[48].label + "";
|
|
7406
7406
|
let t0;
|
|
7407
7407
|
let t1;
|
|
7408
7408
|
let option_selected_value;
|
|
@@ -7415,14 +7415,14 @@
|
|
|
7415
7415
|
t1 = space();
|
|
7416
7416
|
option.selected = option_selected_value =
|
|
7417
7417
|
/*option*/
|
|
7418
|
-
ctx[
|
|
7418
|
+
ctx[48].selected;
|
|
7419
7419
|
option.__value = option_value_value =
|
|
7420
7420
|
/*option*/
|
|
7421
|
-
ctx[
|
|
7421
|
+
ctx[48].value;
|
|
7422
7422
|
option.value = option.__value;
|
|
7423
7423
|
attr(option, "aria-label", option_aria_label_value =
|
|
7424
7424
|
/*option*/
|
|
7425
|
-
ctx[
|
|
7425
|
+
ctx[48].label);
|
|
7426
7426
|
},
|
|
7427
7427
|
|
|
7428
7428
|
m(target, anchor) {
|
|
@@ -7434,32 +7434,32 @@
|
|
|
7434
7434
|
p(ctx, dirty) {
|
|
7435
7435
|
if (dirty[0] &
|
|
7436
7436
|
/*_options*/
|
|
7437
|
-
|
|
7437
|
+
4096 && t0_value !== (t0_value =
|
|
7438
7438
|
/*option*/
|
|
7439
|
-
ctx[
|
|
7439
|
+
ctx[48].label + "")) set_data(t0, t0_value);
|
|
7440
7440
|
|
|
7441
7441
|
if (dirty[0] &
|
|
7442
7442
|
/*_options*/
|
|
7443
|
-
|
|
7443
|
+
4096 && option_selected_value !== (option_selected_value =
|
|
7444
7444
|
/*option*/
|
|
7445
|
-
ctx[
|
|
7445
|
+
ctx[48].selected)) {
|
|
7446
7446
|
option.selected = option_selected_value;
|
|
7447
7447
|
}
|
|
7448
7448
|
|
|
7449
7449
|
if (dirty[0] &
|
|
7450
7450
|
/*_options*/
|
|
7451
|
-
|
|
7451
|
+
4096 && option_value_value !== (option_value_value =
|
|
7452
7452
|
/*option*/
|
|
7453
|
-
ctx[
|
|
7453
|
+
ctx[48].value)) {
|
|
7454
7454
|
option.__value = option_value_value;
|
|
7455
7455
|
option.value = option.__value;
|
|
7456
7456
|
}
|
|
7457
7457
|
|
|
7458
7458
|
if (dirty[0] &
|
|
7459
7459
|
/*_options*/
|
|
7460
|
-
|
|
7460
|
+
4096 && option_aria_label_value !== (option_aria_label_value =
|
|
7461
7461
|
/*option*/
|
|
7462
|
-
ctx[
|
|
7462
|
+
ctx[48].label)) {
|
|
7463
7463
|
attr(option, "aria-label", option_aria_label_value);
|
|
7464
7464
|
}
|
|
7465
7465
|
},
|
|
@@ -7479,7 +7479,7 @@
|
|
|
7479
7479
|
function select_block_type(ctx, dirty) {
|
|
7480
7480
|
if (
|
|
7481
7481
|
/*_native*/
|
|
7482
|
-
ctx[
|
|
7482
|
+
ctx[14]) return create_if_block$f;
|
|
7483
7483
|
return create_else_block$5;
|
|
7484
7484
|
}
|
|
7485
7485
|
|
|
@@ -7508,11 +7508,11 @@
|
|
|
7508
7508
|
/*width*/
|
|
7509
7509
|
ctx[5] ||
|
|
7510
7510
|
/*_computedWidth*/
|
|
7511
|
-
ctx[
|
|
7511
|
+
ctx[19]}
|
|
7512
7512
|
`);
|
|
7513
7513
|
toggle_class(div, "dropdown-native",
|
|
7514
7514
|
/*_native*/
|
|
7515
|
-
ctx[
|
|
7515
|
+
ctx[14]);
|
|
7516
7516
|
},
|
|
7517
7517
|
|
|
7518
7518
|
m(target, anchor) {
|
|
@@ -7546,7 +7546,7 @@
|
|
|
7546
7546
|
|
|
7547
7547
|
if (dirty[0] &
|
|
7548
7548
|
/*mt, mr, mb, ml, width, _computedWidth*/
|
|
7549
|
-
|
|
7549
|
+
528160 && div_style_value !== (div_style_value = `
|
|
7550
7550
|
${calculateMargin(
|
|
7551
7551
|
/*mt*/
|
|
7552
7552
|
ctx[8],
|
|
@@ -7560,17 +7560,17 @@
|
|
|
7560
7560
|
/*width*/
|
|
7561
7561
|
ctx[5] ||
|
|
7562
7562
|
/*_computedWidth*/
|
|
7563
|
-
ctx[
|
|
7563
|
+
ctx[19]}
|
|
7564
7564
|
`)) {
|
|
7565
7565
|
attr(div, "style", div_style_value);
|
|
7566
7566
|
}
|
|
7567
7567
|
|
|
7568
7568
|
if (dirty[0] &
|
|
7569
7569
|
/*_native*/
|
|
7570
|
-
|
|
7570
|
+
16384) {
|
|
7571
7571
|
toggle_class(div, "dropdown-native",
|
|
7572
7572
|
/*_native*/
|
|
7573
|
-
ctx[
|
|
7573
|
+
ctx[14]);
|
|
7574
7574
|
}
|
|
7575
7575
|
},
|
|
7576
7576
|
|
|
@@ -7588,13 +7588,27 @@
|
|
|
7588
7588
|
};
|
|
7589
7589
|
}
|
|
7590
7590
|
|
|
7591
|
+
function parseValues(selectedValue) {
|
|
7592
|
+
let rawValue;
|
|
7593
|
+
|
|
7594
|
+
try {
|
|
7595
|
+
rawValue = JSON.parse(selectedValue || "[]");
|
|
7596
|
+
} catch (e) {
|
|
7597
|
+
rawValue = [selectedValue];
|
|
7598
|
+
}
|
|
7599
|
+
|
|
7600
|
+
const rawValues = typeof rawValue === "object" ? rawValue : [rawValue]; // convert all values to strings to avoid later type comparison issues
|
|
7601
|
+
|
|
7602
|
+
return rawValues.map(val => `${val}`);
|
|
7603
|
+
}
|
|
7604
|
+
|
|
7591
7605
|
function instance$s($$self, $$props, $$invalidate) {
|
|
7592
7606
|
const showMenu = _async(function () {
|
|
7593
7607
|
if (_disabled || _isMenuVisible) {
|
|
7594
7608
|
return;
|
|
7595
7609
|
}
|
|
7596
7610
|
|
|
7597
|
-
$$invalidate(
|
|
7611
|
+
$$invalidate(17, _isMenuVisible = true);
|
|
7598
7612
|
return _call(tick, function () {
|
|
7599
7613
|
// hide menu on blur
|
|
7600
7614
|
_menuEl.addEventListener("blur", closeMenu); // bind up/down arrows to navigate options
|
|
@@ -7672,27 +7686,17 @@
|
|
|
7672
7686
|
|
|
7673
7687
|
let _selectEl;
|
|
7674
7688
|
|
|
7675
|
-
onMount(function () {
|
|
7676
|
-
|
|
7677
|
-
|
|
7678
|
-
$$invalidate(13, _options = getOptions());
|
|
7679
|
-
|
|
7680
|
-
if (!_native) {
|
|
7681
|
-
$$invalidate(17, _computedWidth = getCustomDropdownWidth(_options));
|
|
7682
|
-
addKeyboardEventListeners();
|
|
7683
|
-
setHighlightedIndexToSelected();
|
|
7684
|
-
} // watch for DOM changes within the slot => dynamic binding
|
|
7685
|
-
|
|
7686
|
-
|
|
7687
|
-
const slot = _el.querySelector("slot");
|
|
7689
|
+
onMount(_async(function () {
|
|
7690
|
+
// watch for DOM changes within the slot => dynamic binding
|
|
7691
|
+
const slot = _el.querySelector("slot");
|
|
7688
7692
|
|
|
7689
|
-
|
|
7690
|
-
|
|
7691
|
-
|
|
7692
|
-
|
|
7693
|
-
});
|
|
7693
|
+
slot === null || slot === void 0 ? void 0 : slot.addEventListener("slotchange", _e => {
|
|
7694
|
+
$$invalidate(16, _selectedLabel = "");
|
|
7695
|
+
$$invalidate(15, _values = parseValues(value));
|
|
7696
|
+
$$invalidate(12, _options = getOptions());
|
|
7694
7697
|
});
|
|
7695
|
-
|
|
7698
|
+
return _await();
|
|
7699
|
+
}));
|
|
7696
7700
|
onDestroy(() => {
|
|
7697
7701
|
removeKeyboardEventListeners();
|
|
7698
7702
|
}); // Functions
|
|
@@ -7723,8 +7727,8 @@
|
|
|
7723
7727
|
const selected = _values.includes(value);
|
|
7724
7728
|
|
|
7725
7729
|
if (selected) {
|
|
7726
|
-
$$invalidate(
|
|
7727
|
-
$$invalidate(
|
|
7730
|
+
$$invalidate(16, _selectedLabel = label);
|
|
7731
|
+
$$invalidate(15, _values = [value]);
|
|
7728
7732
|
}
|
|
7729
7733
|
|
|
7730
7734
|
return {
|
|
@@ -7765,21 +7769,6 @@
|
|
|
7765
7769
|
_el.removeEventListener("focus", onFocus, true);
|
|
7766
7770
|
|
|
7767
7771
|
_el.removeEventListener("blur", onBlur, true);
|
|
7768
|
-
} // parse and convert values to strings to avoid later type comparison issues
|
|
7769
|
-
|
|
7770
|
-
|
|
7771
|
-
function parseValues() {
|
|
7772
|
-
let rawValue;
|
|
7773
|
-
|
|
7774
|
-
try {
|
|
7775
|
-
rawValue = JSON.parse(value || "[]");
|
|
7776
|
-
} catch (e) {
|
|
7777
|
-
rawValue = [value];
|
|
7778
|
-
}
|
|
7779
|
-
|
|
7780
|
-
const rawValues = typeof rawValue === "object" ? rawValue : [rawValue]; // convert all values to strings to avoid later type comparison issues
|
|
7781
|
-
|
|
7782
|
-
return rawValues.map(val => `${val}`);
|
|
7783
7772
|
}
|
|
7784
7773
|
|
|
7785
7774
|
function closeMenu() {
|
|
@@ -7788,11 +7777,11 @@
|
|
|
7788
7777
|
_menuEl.removeEventListener("mouseover", onHighlight);
|
|
7789
7778
|
|
|
7790
7779
|
setHighlightedIndexToSelected();
|
|
7791
|
-
$$invalidate(
|
|
7780
|
+
$$invalidate(17, _isMenuVisible = false);
|
|
7792
7781
|
}
|
|
7793
7782
|
|
|
7794
7783
|
function setHighlightedIndexToSelected() {
|
|
7795
|
-
$$invalidate(
|
|
7784
|
+
$$invalidate(18, _highlightedIndex = _options.findIndex(option => _values.includes(option.value)));
|
|
7796
7785
|
} // Event handlers
|
|
7797
7786
|
|
|
7798
7787
|
/**
|
|
@@ -7802,7 +7791,7 @@
|
|
|
7802
7791
|
|
|
7803
7792
|
function onSelect(value, label, close) {
|
|
7804
7793
|
if (_disabled) return;
|
|
7805
|
-
$$invalidate(
|
|
7794
|
+
$$invalidate(16, _selectedLabel = label);
|
|
7806
7795
|
let detail;
|
|
7807
7796
|
|
|
7808
7797
|
if (_multiselect) {
|
|
@@ -7813,7 +7802,7 @@
|
|
|
7813
7802
|
values: _values
|
|
7814
7803
|
};
|
|
7815
7804
|
} else {
|
|
7816
|
-
$$invalidate(
|
|
7805
|
+
$$invalidate(15, _values = [value]);
|
|
7817
7806
|
detail = {
|
|
7818
7807
|
name,
|
|
7819
7808
|
value
|
|
@@ -7869,14 +7858,14 @@
|
|
|
7869
7858
|
|
|
7870
7859
|
function _handleArrowDown() {
|
|
7871
7860
|
if (_highlightedIndex < _options.length - 1) {
|
|
7872
|
-
$$invalidate(
|
|
7861
|
+
$$invalidate(18, _highlightedIndex++, _highlightedIndex);
|
|
7873
7862
|
onSelect(_options[_highlightedIndex].value, _options[_highlightedIndex].label, false);
|
|
7874
7863
|
}
|
|
7875
7864
|
}
|
|
7876
7865
|
|
|
7877
7866
|
function _handleArrowUp() {
|
|
7878
7867
|
if (_highlightedIndex > 0) {
|
|
7879
|
-
$$invalidate(
|
|
7868
|
+
$$invalidate(18, _highlightedIndex--, _highlightedIndex);
|
|
7880
7869
|
onSelect(_options[_highlightedIndex].value, _options[_highlightedIndex].label, false);
|
|
7881
7870
|
}
|
|
7882
7871
|
} // add required bindings to component
|
|
@@ -7892,7 +7881,7 @@
|
|
|
7892
7881
|
}
|
|
7893
7882
|
|
|
7894
7883
|
function onHighlight(e) {
|
|
7895
|
-
$$invalidate(
|
|
7884
|
+
$$invalidate(18, _highlightedIndex = Number(e.target.dataset.index));
|
|
7896
7885
|
}
|
|
7897
7886
|
|
|
7898
7887
|
function onNativeSelect(e) {
|
|
@@ -7904,8 +7893,8 @@
|
|
|
7904
7893
|
function select_binding($$value) {
|
|
7905
7894
|
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
7906
7895
|
_selectEl = $$value;
|
|
7907
|
-
$$invalidate(
|
|
7908
|
-
$$invalidate(
|
|
7896
|
+
$$invalidate(21, _selectEl);
|
|
7897
|
+
((($$invalidate(12, _options), $$invalidate(13, _el)), $$invalidate(28, value)), $$invalidate(14, _native)), $$invalidate(30, native);
|
|
7909
7898
|
});
|
|
7910
7899
|
}
|
|
7911
7900
|
|
|
@@ -7914,14 +7903,14 @@
|
|
|
7914
7903
|
function ul_binding($$value) {
|
|
7915
7904
|
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
7916
7905
|
_menuEl = $$value;
|
|
7917
|
-
$$invalidate(
|
|
7906
|
+
$$invalidate(20, _menuEl);
|
|
7918
7907
|
});
|
|
7919
7908
|
}
|
|
7920
7909
|
|
|
7921
7910
|
function div_binding($$value) {
|
|
7922
7911
|
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
7923
7912
|
_el = $$value;
|
|
7924
|
-
$$invalidate(
|
|
7913
|
+
$$invalidate(13, _el);
|
|
7925
7914
|
});
|
|
7926
7915
|
}
|
|
7927
7916
|
|
|
@@ -7947,7 +7936,7 @@
|
|
|
7947
7936
|
if ($$self.$$.dirty[0] &
|
|
7948
7937
|
/*disabled*/
|
|
7949
7938
|
64) {
|
|
7950
|
-
$$invalidate(
|
|
7939
|
+
$$invalidate(22, _disabled = toBoolean(disabled));
|
|
7951
7940
|
}
|
|
7952
7941
|
|
|
7953
7942
|
if ($$self.$$.dirty[0] &
|
|
@@ -7965,11 +7954,28 @@
|
|
|
7965
7954
|
if ($$self.$$.dirty[0] &
|
|
7966
7955
|
/*native*/
|
|
7967
7956
|
1073741824) {
|
|
7968
|
-
$$invalidate(
|
|
7957
|
+
$$invalidate(14, _native = toBoolean(native));
|
|
7958
|
+
}
|
|
7959
|
+
|
|
7960
|
+
if ($$self.$$.dirty[0] &
|
|
7961
|
+
/*_el, value, _native, _options*/
|
|
7962
|
+
268464128) {
|
|
7963
|
+
{
|
|
7964
|
+
if (_el) {
|
|
7965
|
+
$$invalidate(15, _values = parseValues(value));
|
|
7966
|
+
$$invalidate(12, _options = getOptions());
|
|
7967
|
+
|
|
7968
|
+
if (!_native) {
|
|
7969
|
+
$$invalidate(19, _computedWidth = getCustomDropdownWidth(_options));
|
|
7970
|
+
addKeyboardEventListeners();
|
|
7971
|
+
setHighlightedIndexToSelected();
|
|
7972
|
+
}
|
|
7973
|
+
}
|
|
7974
|
+
}
|
|
7969
7975
|
}
|
|
7970
7976
|
};
|
|
7971
7977
|
|
|
7972
|
-
return [name, arialabel, leadingicon, maxheight, placeholder, width, disabled, error, mt, mr, mb, ml,
|
|
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];
|
|
7973
7979
|
}
|
|
7974
7980
|
|
|
7975
7981
|
class Dropdown extends SvelteElement {
|
|
@@ -20183,6 +20189,7 @@
|
|
|
20183
20189
|
|
|
20184
20190
|
var GoAContainer = function GoAContainer(_a) {
|
|
20185
20191
|
var accent = _a.accent,
|
|
20192
|
+
heading = _a.heading,
|
|
20186
20193
|
title = _a.title,
|
|
20187
20194
|
padding = _a.padding,
|
|
20188
20195
|
children = _a.children,
|
|
@@ -20193,6 +20200,7 @@
|
|
|
20193
20200
|
mb = _a.mb,
|
|
20194
20201
|
ml = _a.ml,
|
|
20195
20202
|
testId = _a.testId;
|
|
20203
|
+
var headingContent = heading || title;
|
|
20196
20204
|
return jsxRuntime.jsxs("goa-container", __assign({
|
|
20197
20205
|
type: type,
|
|
20198
20206
|
padding: padding,
|
|
@@ -20203,15 +20211,15 @@
|
|
|
20203
20211
|
ml: ml,
|
|
20204
20212
|
"data-testid": testId
|
|
20205
20213
|
}, {
|
|
20206
|
-
children: [
|
|
20214
|
+
children: [headingContent && jsxRuntime.jsx("div", __assign({
|
|
20207
20215
|
slot: "title"
|
|
20208
20216
|
}, {
|
|
20209
|
-
children:
|
|
20210
|
-
}), void 0), actions && jsxRuntime.jsx("div", __assign({
|
|
20217
|
+
children: headingContent
|
|
20218
|
+
}), void 0), children, actions && jsxRuntime.jsx("div", __assign({
|
|
20211
20219
|
slot: "actions"
|
|
20212
20220
|
}, {
|
|
20213
20221
|
children: actions
|
|
20214
|
-
}), void 0)
|
|
20222
|
+
}), void 0)]
|
|
20215
20223
|
}), void 0);
|
|
20216
20224
|
};
|
|
20217
20225
|
|