@abgov/web-components 1.0.0-alpha.81 → 1.0.0-alpha.84
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/web-components.es.js +170 -214
- package/web-components.umd.js +31 -30
package/web-components.es.js
CHANGED
|
@@ -1147,7 +1147,7 @@ function instance$y($$self, $$props, $$invalidate) {
|
|
|
1147
1147
|
class AppHeader extends SvelteElement {
|
|
1148
1148
|
constructor(options) {
|
|
1149
1149
|
super();
|
|
1150
|
-
this.shadowRoot.innerHTML = `<style>:host{box-sizing:border-box;font-family:var(--font-family)}.app-header{display:flex;align-items:center;justify-content:space-between;margin:0 auto;padding:1rem
|
|
1150
|
+
this.shadowRoot.innerHTML = `<style>:host{box-sizing:border-box;font-family:var(--font-family)}.app-header{display:flex;align-items:center;justify-content:space-between;margin:0 auto;padding:1rem 1.5rem;border-bottom:1px solid var(--color-gray-100)}@media(max-width: 640px){.app-header{padding:1rem 1rem}}.app-link{display:flex;align-items:center;text-decoration:none;color:inherit}.title{margin-left:0.5rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.image-desktop{display:none}.image-mobile{display:block}@media(min-width: 768px){.image-desktop{display:block}.image-mobile{display:none}.title{margin-left:1.75rem}.image-desktop{display:block}.image-mobile{display:none}}</style>`;
|
|
1151
1151
|
|
|
1152
1152
|
init(
|
|
1153
1153
|
this,
|
|
@@ -1813,7 +1813,7 @@ class Button extends SvelteElement {
|
|
|
1813
1813
|
super();
|
|
1814
1814
|
|
|
1815
1815
|
this.shadowRoot.innerHTML = `<style>:host{box-sizing:border-box;font-family:var(--font-family)}@media(max-width: 480px){:host{width:100%}button{width:100%}}button{display:flex;box-sizing:border-box;border-radius:0.25rem;border:2px solid var(--goa-color-interactive);box-sizing:border-box;cursor:pointer;font-family:var(--font-family);font-size:var(--fs-lg);font-weight:400;height:var(--button-height);letter-spacing:0.5px;line-height:100%;padding:0 0.75rem;gap:0.5rem;align-items:center;justify-content:center;transition:transform 0.1s ease-in-out, background-color 0.2s ease-in-out,
|
|
1816
|
-
border-color 0.2s ease-in-out}.text{padding-bottom:var(--font-valign-fix)}button:disabled{pointer-events:none;opacity:0.5}button.compact{height:var(--button-height-compact);font-size:var(--fs-base)}button.start{height:var(--button-height-tall);font-weight:var(--fw-bold)}button.start,button.primary{border:2px solid var(--goa-color-interactive);background:var(--goa-color-interactive);color:var(--goa-color-text-light)}button.start:hover,button.primary:hover{border-color:var(--goa-color-interactive--hover);background:var(--goa-color-interactive--hover)}button.start:focus,button.start:active,button.primary:focus,button.primary:active{box-shadow:0 0 0 3px var(--goa-color-interactive--focus);border-color:var(--goa-color-interactive--active);background:var(--goa-color-interactive--active);outline:none}button.secondary{border:2px solid var(--goa-color-interactive);background:var(--color-white);color:var(--goa-color-interactive)}button.secondary:hover{border-color:var(--goa-color-interactive--hover);color:var(--goa-color-interactive--hover);background:var(--color-gray-100)}button.secondary:focus,button.secondary:active{border-color:var(--goa-color-interactive--active);box-shadow:0 0 0 3px var(--goa-color-interactive--focus);background:var(--color-gray-100);outline:none}button.tertiary{border:1px solid transparent;background:
|
|
1816
|
+
border-color 0.2s ease-in-out}.text{padding-bottom:var(--font-valign-fix)}button:disabled{pointer-events:none;opacity:0.5}button.compact{height:var(--button-height-compact);font-size:var(--fs-base)}button.start{height:var(--button-height-tall);font-weight:var(--fw-bold)}button.start,button.primary{border:2px solid var(--goa-color-interactive);background:var(--goa-color-interactive);color:var(--goa-color-text-light)}button.start:hover,button.primary:hover{border-color:var(--goa-color-interactive--hover);background:var(--goa-color-interactive--hover)}button.start:focus,button.start:active,button.primary:focus,button.primary:active{box-shadow:0 0 0 3px var(--goa-color-interactive--focus);border-color:var(--goa-color-interactive--active);background:var(--goa-color-interactive--active);outline:none}button.secondary{border:2px solid var(--goa-color-interactive);background:var(--color-white);color:var(--goa-color-interactive)}button.secondary:hover{border-color:var(--goa-color-interactive--hover);color:var(--goa-color-interactive--hover);background:var(--color-gray-100)}button.secondary:focus,button.secondary:active{border-color:var(--goa-color-interactive--active);box-shadow:0 0 0 3px var(--goa-color-interactive--focus);background:var(--color-gray-100);outline:none}button.tertiary{border:1px solid transparent;background:transparent;color:var(--goa-color-interactive);text-decoration:underline}button.tertiary:hover{border-color:var(--color-gray-100);color:var(--goa-color-interactive--hover);background:var(--color-gray-100)}button.tertiary:focus,button.tertiary:active{border-color:var(--color-gray-100);background:var(--color-gray-100);color:var(--goa-color-interactive--active);box-shadow:0 0 0 3px var(--goa-color-interactive--focus);outline:none}.primary.danger{color:var(--color-white);background:var(--goa-color-status-emergency);border-color:var(--goa-color-status-emergency)}.primary.danger:hover{background:var(--goa-color-status-emergency-dark);border-color:var(--goa-color-status-emergency-dark)}.primary.danger:focus,.primary.danger:active{background:var(--goa-color-status-emergency-dark);border-color:var(--goa-color-status-emergency-dark)}.secondary.danger{color:var(--goa-color-status-emergency);border-color:var(--goa-color-status-emergency);background:var(--color-white)}.secondary.danger:hover{border-color:var(--goa-color-status-emergency-dark);color:var(--goa-color-status-emergency-dark);background:var(--color-white)}.secondary.danger:focus,.secondary.danger:active{color:var(--goa-color-status-emergency-dark);border-color:var(--goa-color-status-emergency-dark);background:var(--color-white)}.tertiary.danger{color:var(--goa-color-status-emergency);border-color:var(--color-gray-200);background:var(--color-white)}.tertiary.danger:hover{border-color:var(--goa-color-status-emergency-dark);color:var(--goa-color-status-emergency-dark);background:var(--color-white)}.tertiary.danger:focus,.tertiary.danger:active{color:var(--goa-color-status-emergency-dark);border-color:var(--goa-color-status-emergency-dark);background:var(--color-white)}</style>`;
|
|
1817
1817
|
|
|
1818
1818
|
init(
|
|
1819
1819
|
this,
|
|
@@ -2147,7 +2147,7 @@ function create_fragment$z(ctx) {
|
|
|
2147
2147
|
function instance$u($$self, $$props, $$invalidate) {
|
|
2148
2148
|
let iconType;
|
|
2149
2149
|
let { type } = $$props;
|
|
2150
|
-
let { heading } = $$props;
|
|
2150
|
+
let { heading = "" } = $$props;
|
|
2151
2151
|
let { testid = "" } = $$props;
|
|
2152
2152
|
|
|
2153
2153
|
$$self.$$set = $$props => {
|
|
@@ -6338,7 +6338,7 @@ function create_if_block$9(ctx) {
|
|
|
6338
6338
|
attr(div4, "data-testid", "modal");
|
|
6339
6339
|
attr(div4, "class", "modal");
|
|
6340
6340
|
attr(div4, "style", div4_style_value = "--scroll-offset: " + /*scrollOffset*/ ctx[4] + "px; " + (/*width*/ ctx[2] && `--width: ${/*width*/ ctx[2]};`) + ";");
|
|
6341
|
-
set_custom_element_data(goa_focus_trap, "
|
|
6341
|
+
set_custom_element_data(goa_focus_trap, "active", /*open*/ ctx[1]);
|
|
6342
6342
|
},
|
|
6343
6343
|
m(target, anchor) {
|
|
6344
6344
|
insert(target, goa_focus_trap, anchor);
|
|
@@ -6413,7 +6413,7 @@ function create_if_block$9(ctx) {
|
|
|
6413
6413
|
if (noscroll_action && is_function(noscroll_action.update) && dirty & /*isOpen*/ 8) noscroll_action.update.call(null, { enable: /*isOpen*/ ctx[3] });
|
|
6414
6414
|
|
|
6415
6415
|
if (!current || dirty & /*open*/ 2) {
|
|
6416
|
-
set_custom_element_data(goa_focus_trap, "
|
|
6416
|
+
set_custom_element_data(goa_focus_trap, "active", /*open*/ ctx[1]);
|
|
6417
6417
|
}
|
|
6418
6418
|
},
|
|
6419
6419
|
i(local) {
|
|
@@ -7078,8 +7078,8 @@ function create_if_block$7(ctx) {
|
|
|
7078
7078
|
const if_blocks = [];
|
|
7079
7079
|
|
|
7080
7080
|
function select_block_type(ctx, dirty) {
|
|
7081
|
-
if (/*fullscreen*/ ctx[
|
|
7082
|
-
if (/*inline*/ ctx[
|
|
7081
|
+
if (/*fullscreen*/ ctx[3]) return 0;
|
|
7082
|
+
if (/*inline*/ ctx[4]) return 1;
|
|
7083
7083
|
return -1;
|
|
7084
7084
|
}
|
|
7085
7085
|
|
|
@@ -7155,14 +7155,13 @@ function create_if_block$7(ctx) {
|
|
|
7155
7155
|
};
|
|
7156
7156
|
}
|
|
7157
7157
|
|
|
7158
|
-
// (
|
|
7158
|
+
// (38:19)
|
|
7159
7159
|
function create_if_block_3$1(ctx) {
|
|
7160
7160
|
let div;
|
|
7161
7161
|
let goa_spinner;
|
|
7162
|
-
let goa_spinner_progress_value;
|
|
7163
7162
|
let t;
|
|
7164
7163
|
let div_class_value;
|
|
7165
|
-
let if_block = /*message*/ ctx[
|
|
7164
|
+
let if_block = /*message*/ ctx[0] && create_if_block_4(ctx);
|
|
7166
7165
|
|
|
7167
7166
|
return {
|
|
7168
7167
|
c() {
|
|
@@ -7170,11 +7169,10 @@ function create_if_block_3$1(ctx) {
|
|
|
7170
7169
|
goa_spinner = element("goa-spinner");
|
|
7171
7170
|
t = space();
|
|
7172
7171
|
if (if_block) if_block.c();
|
|
7173
|
-
set_custom_element_data(goa_spinner, "
|
|
7174
|
-
set_custom_element_data(goa_spinner, "
|
|
7175
|
-
|
|
7176
|
-
|
|
7177
|
-
toggle_class(div, "inline", /*inline*/ ctx[5]);
|
|
7172
|
+
set_custom_element_data(goa_spinner, "size", /*spinnerSize*/ ctx[2]);
|
|
7173
|
+
set_custom_element_data(goa_spinner, "progress", /*progress*/ ctx[1]);
|
|
7174
|
+
attr(div, "class", div_class_value = "spinner-" + /*spinnerSize*/ ctx[2]);
|
|
7175
|
+
toggle_class(div, "inline", /*inline*/ ctx[4]);
|
|
7178
7176
|
},
|
|
7179
7177
|
m(target, anchor) {
|
|
7180
7178
|
insert(target, div, anchor);
|
|
@@ -7183,19 +7181,15 @@ function create_if_block_3$1(ctx) {
|
|
|
7183
7181
|
if (if_block) if_block.m(div, null);
|
|
7184
7182
|
},
|
|
7185
7183
|
p(ctx, dirty) {
|
|
7186
|
-
if (dirty & /*
|
|
7187
|
-
set_custom_element_data(goa_spinner, "
|
|
7184
|
+
if (dirty & /*spinnerSize*/ 4) {
|
|
7185
|
+
set_custom_element_data(goa_spinner, "size", /*spinnerSize*/ ctx[2]);
|
|
7188
7186
|
}
|
|
7189
7187
|
|
|
7190
|
-
if (dirty & /*
|
|
7191
|
-
set_custom_element_data(goa_spinner, "
|
|
7188
|
+
if (dirty & /*progress*/ 2) {
|
|
7189
|
+
set_custom_element_data(goa_spinner, "progress", /*progress*/ ctx[1]);
|
|
7192
7190
|
}
|
|
7193
7191
|
|
|
7194
|
-
if (
|
|
7195
|
-
set_custom_element_data(goa_spinner, "progress", goa_spinner_progress_value);
|
|
7196
|
-
}
|
|
7197
|
-
|
|
7198
|
-
if (/*message*/ ctx[1]) {
|
|
7192
|
+
if (/*message*/ ctx[0]) {
|
|
7199
7193
|
if (if_block) {
|
|
7200
7194
|
if_block.p(ctx, dirty);
|
|
7201
7195
|
} else {
|
|
@@ -7208,12 +7202,12 @@ function create_if_block_3$1(ctx) {
|
|
|
7208
7202
|
if_block = null;
|
|
7209
7203
|
}
|
|
7210
7204
|
|
|
7211
|
-
if (dirty & /*spinnerSize*/
|
|
7205
|
+
if (dirty & /*spinnerSize*/ 4 && div_class_value !== (div_class_value = "spinner-" + /*spinnerSize*/ ctx[2])) {
|
|
7212
7206
|
attr(div, "class", div_class_value);
|
|
7213
7207
|
}
|
|
7214
7208
|
|
|
7215
|
-
if (dirty & /*spinnerSize, inline*/
|
|
7216
|
-
toggle_class(div, "inline", /*inline*/ ctx[
|
|
7209
|
+
if (dirty & /*spinnerSize, inline*/ 20) {
|
|
7210
|
+
toggle_class(div, "inline", /*inline*/ ctx[4]);
|
|
7217
7211
|
}
|
|
7218
7212
|
},
|
|
7219
7213
|
i: noop,
|
|
@@ -7225,17 +7219,16 @@ function create_if_block_3$1(ctx) {
|
|
|
7225
7219
|
};
|
|
7226
7220
|
}
|
|
7227
7221
|
|
|
7228
|
-
// (
|
|
7222
|
+
// (27:2) {#if fullscreen}
|
|
7229
7223
|
function create_if_block_1$4(ctx) {
|
|
7230
7224
|
let div;
|
|
7231
7225
|
let goa_spinner;
|
|
7232
|
-
let goa_spinner_progress_value;
|
|
7233
7226
|
let t;
|
|
7234
7227
|
let div_transition;
|
|
7235
7228
|
let current;
|
|
7236
7229
|
let mounted;
|
|
7237
7230
|
let dispose;
|
|
7238
|
-
let if_block = /*message*/ ctx[
|
|
7231
|
+
let if_block = /*message*/ ctx[0] && create_if_block_2$3(ctx);
|
|
7239
7232
|
|
|
7240
7233
|
return {
|
|
7241
7234
|
c() {
|
|
@@ -7243,10 +7236,9 @@ function create_if_block_1$4(ctx) {
|
|
|
7243
7236
|
goa_spinner = element("goa-spinner");
|
|
7244
7237
|
t = space();
|
|
7245
7238
|
if (if_block) if_block.c();
|
|
7246
|
-
set_custom_element_data(goa_spinner, "
|
|
7247
|
-
set_custom_element_data(goa_spinner, "
|
|
7248
|
-
|
|
7249
|
-
toggle_class(div, "fullscreen", /*fullscreen*/ ctx[4]);
|
|
7239
|
+
set_custom_element_data(goa_spinner, "size", /*spinnerSize*/ ctx[2]);
|
|
7240
|
+
set_custom_element_data(goa_spinner, "progress", /*progress*/ ctx[1]);
|
|
7241
|
+
toggle_class(div, "fullscreen", /*fullscreen*/ ctx[3]);
|
|
7250
7242
|
},
|
|
7251
7243
|
m(target, anchor) {
|
|
7252
7244
|
insert(target, div, anchor);
|
|
@@ -7261,19 +7253,15 @@ function create_if_block_1$4(ctx) {
|
|
|
7261
7253
|
}
|
|
7262
7254
|
},
|
|
7263
7255
|
p(ctx, dirty) {
|
|
7264
|
-
if (!current || dirty & /*
|
|
7265
|
-
set_custom_element_data(goa_spinner, "
|
|
7266
|
-
}
|
|
7267
|
-
|
|
7268
|
-
if (!current || dirty & /*spinnerSize*/ 8) {
|
|
7269
|
-
set_custom_element_data(goa_spinner, "size", /*spinnerSize*/ ctx[3]);
|
|
7256
|
+
if (!current || dirty & /*spinnerSize*/ 4) {
|
|
7257
|
+
set_custom_element_data(goa_spinner, "size", /*spinnerSize*/ ctx[2]);
|
|
7270
7258
|
}
|
|
7271
7259
|
|
|
7272
|
-
if (!current || dirty & /*progress*/
|
|
7273
|
-
set_custom_element_data(goa_spinner, "progress",
|
|
7260
|
+
if (!current || dirty & /*progress*/ 2) {
|
|
7261
|
+
set_custom_element_data(goa_spinner, "progress", /*progress*/ ctx[1]);
|
|
7274
7262
|
}
|
|
7275
7263
|
|
|
7276
|
-
if (/*message*/ ctx[
|
|
7264
|
+
if (/*message*/ ctx[0]) {
|
|
7277
7265
|
if (if_block) {
|
|
7278
7266
|
if_block.p(ctx, dirty);
|
|
7279
7267
|
} else {
|
|
@@ -7286,8 +7274,8 @@ function create_if_block_1$4(ctx) {
|
|
|
7286
7274
|
if_block = null;
|
|
7287
7275
|
}
|
|
7288
7276
|
|
|
7289
|
-
if (dirty & /*fullscreen*/
|
|
7290
|
-
toggle_class(div, "fullscreen", /*fullscreen*/ ctx[
|
|
7277
|
+
if (dirty & /*fullscreen*/ 8) {
|
|
7278
|
+
toggle_class(div, "fullscreen", /*fullscreen*/ ctx[3]);
|
|
7291
7279
|
}
|
|
7292
7280
|
},
|
|
7293
7281
|
i(local) {
|
|
@@ -7315,7 +7303,7 @@ function create_if_block_1$4(ctx) {
|
|
|
7315
7303
|
};
|
|
7316
7304
|
}
|
|
7317
7305
|
|
|
7318
|
-
// (
|
|
7306
|
+
// (41:6) {#if message}
|
|
7319
7307
|
function create_if_block_4(ctx) {
|
|
7320
7308
|
let div;
|
|
7321
7309
|
let t;
|
|
@@ -7323,7 +7311,7 @@ function create_if_block_4(ctx) {
|
|
|
7323
7311
|
return {
|
|
7324
7312
|
c() {
|
|
7325
7313
|
div = element("div");
|
|
7326
|
-
t = text(/*message*/ ctx[
|
|
7314
|
+
t = text(/*message*/ ctx[0]);
|
|
7327
7315
|
attr(div, "class", "message");
|
|
7328
7316
|
},
|
|
7329
7317
|
m(target, anchor) {
|
|
@@ -7331,7 +7319,7 @@ function create_if_block_4(ctx) {
|
|
|
7331
7319
|
append(div, t);
|
|
7332
7320
|
},
|
|
7333
7321
|
p(ctx, dirty) {
|
|
7334
|
-
if (dirty & /*message*/
|
|
7322
|
+
if (dirty & /*message*/ 1) set_data(t, /*message*/ ctx[0]);
|
|
7335
7323
|
},
|
|
7336
7324
|
d(detaching) {
|
|
7337
7325
|
if (detaching) detach(div);
|
|
@@ -7339,7 +7327,7 @@ function create_if_block_4(ctx) {
|
|
|
7339
7327
|
};
|
|
7340
7328
|
}
|
|
7341
7329
|
|
|
7342
|
-
// (
|
|
7330
|
+
// (34:6) {#if message}
|
|
7343
7331
|
function create_if_block_2$3(ctx) {
|
|
7344
7332
|
let div;
|
|
7345
7333
|
let t;
|
|
@@ -7347,7 +7335,7 @@ function create_if_block_2$3(ctx) {
|
|
|
7347
7335
|
return {
|
|
7348
7336
|
c() {
|
|
7349
7337
|
div = element("div");
|
|
7350
|
-
t = text(/*message*/ ctx[
|
|
7338
|
+
t = text(/*message*/ ctx[0]);
|
|
7351
7339
|
attr(div, "class", "message");
|
|
7352
7340
|
},
|
|
7353
7341
|
m(target, anchor) {
|
|
@@ -7355,7 +7343,7 @@ function create_if_block_2$3(ctx) {
|
|
|
7355
7343
|
append(div, t);
|
|
7356
7344
|
},
|
|
7357
7345
|
p(ctx, dirty) {
|
|
7358
|
-
if (dirty & /*message*/
|
|
7346
|
+
if (dirty & /*message*/ 1) set_data(t, /*message*/ ctx[0]);
|
|
7359
7347
|
},
|
|
7360
7348
|
d(detaching) {
|
|
7361
7349
|
if (detaching) detach(div);
|
|
@@ -7366,7 +7354,7 @@ function create_if_block_2$3(ctx) {
|
|
|
7366
7354
|
function create_fragment$f(ctx) {
|
|
7367
7355
|
let if_block_anchor;
|
|
7368
7356
|
let current;
|
|
7369
|
-
let if_block = /*isVisible*/ ctx[
|
|
7357
|
+
let if_block = /*isVisible*/ ctx[5] && create_if_block$7(ctx);
|
|
7370
7358
|
|
|
7371
7359
|
return {
|
|
7372
7360
|
c() {
|
|
@@ -7380,11 +7368,11 @@ function create_fragment$f(ctx) {
|
|
|
7380
7368
|
current = true;
|
|
7381
7369
|
},
|
|
7382
7370
|
p(ctx, [dirty]) {
|
|
7383
|
-
if (/*isVisible*/ ctx[
|
|
7371
|
+
if (/*isVisible*/ ctx[5]) {
|
|
7384
7372
|
if (if_block) {
|
|
7385
7373
|
if_block.p(ctx, dirty);
|
|
7386
7374
|
|
|
7387
|
-
if (dirty & /*isVisible*/
|
|
7375
|
+
if (dirty & /*isVisible*/ 32) {
|
|
7388
7376
|
transition_in(if_block, 1);
|
|
7389
7377
|
}
|
|
7390
7378
|
} else {
|
|
@@ -7421,39 +7409,36 @@ function create_fragment$f(ctx) {
|
|
|
7421
7409
|
|
|
7422
7410
|
function instance$e($$self, $$props, $$invalidate) {
|
|
7423
7411
|
let isVisible;
|
|
7424
|
-
let { type = "infinite" } = $$props;
|
|
7425
7412
|
let { variant = "inline" } = $$props;
|
|
7426
7413
|
let { size = "large" } = $$props;
|
|
7427
7414
|
let { message = "" } = $$props;
|
|
7428
|
-
let { progress =
|
|
7415
|
+
let { progress = -1 } = $$props;
|
|
7429
7416
|
let { visible = "false" } = $$props;
|
|
7430
7417
|
let spinnerSize;
|
|
7431
7418
|
let fullscreen;
|
|
7432
7419
|
let inline;
|
|
7433
7420
|
|
|
7434
7421
|
onMount(async () => {
|
|
7435
|
-
$$invalidate(
|
|
7436
|
-
$$invalidate(
|
|
7437
|
-
$$invalidate(
|
|
7422
|
+
$$invalidate(2, spinnerSize = size === "small" ? "large" : "xlarge");
|
|
7423
|
+
$$invalidate(3, fullscreen = variant === "fullscreen");
|
|
7424
|
+
$$invalidate(4, inline = variant === "inline");
|
|
7438
7425
|
});
|
|
7439
7426
|
|
|
7440
7427
|
$$self.$$set = $$props => {
|
|
7441
|
-
if ('
|
|
7442
|
-
if ('
|
|
7443
|
-
if ('
|
|
7444
|
-
if ('
|
|
7445
|
-
if ('
|
|
7446
|
-
if ('visible' in $$props) $$invalidate(9, visible = $$props.visible);
|
|
7428
|
+
if ('variant' in $$props) $$invalidate(6, variant = $$props.variant);
|
|
7429
|
+
if ('size' in $$props) $$invalidate(7, size = $$props.size);
|
|
7430
|
+
if ('message' in $$props) $$invalidate(0, message = $$props.message);
|
|
7431
|
+
if ('progress' in $$props) $$invalidate(1, progress = $$props.progress);
|
|
7432
|
+
if ('visible' in $$props) $$invalidate(8, visible = $$props.visible);
|
|
7447
7433
|
};
|
|
7448
7434
|
|
|
7449
7435
|
$$self.$$.update = () => {
|
|
7450
|
-
if ($$self.$$.dirty & /*visible*/
|
|
7451
|
-
$$invalidate(
|
|
7436
|
+
if ($$self.$$.dirty & /*visible*/ 256) {
|
|
7437
|
+
$$invalidate(5, isVisible = toBoolean(visible));
|
|
7452
7438
|
}
|
|
7453
7439
|
};
|
|
7454
7440
|
|
|
7455
7441
|
return [
|
|
7456
|
-
type,
|
|
7457
7442
|
message,
|
|
7458
7443
|
progress,
|
|
7459
7444
|
spinnerSize,
|
|
@@ -7482,12 +7467,11 @@ class CircularProgress extends SvelteElement {
|
|
|
7482
7467
|
create_fragment$f,
|
|
7483
7468
|
safe_not_equal,
|
|
7484
7469
|
{
|
|
7485
|
-
|
|
7486
|
-
|
|
7487
|
-
|
|
7488
|
-
|
|
7489
|
-
|
|
7490
|
-
visible: 9
|
|
7470
|
+
variant: 6,
|
|
7471
|
+
size: 7,
|
|
7472
|
+
message: 0,
|
|
7473
|
+
progress: 1,
|
|
7474
|
+
visible: 8
|
|
7491
7475
|
},
|
|
7492
7476
|
null
|
|
7493
7477
|
);
|
|
@@ -7505,20 +7489,11 @@ class CircularProgress extends SvelteElement {
|
|
|
7505
7489
|
}
|
|
7506
7490
|
|
|
7507
7491
|
static get observedAttributes() {
|
|
7508
|
-
return ["
|
|
7509
|
-
}
|
|
7510
|
-
|
|
7511
|
-
get type() {
|
|
7512
|
-
return this.$$.ctx[0];
|
|
7513
|
-
}
|
|
7514
|
-
|
|
7515
|
-
set type(type) {
|
|
7516
|
-
this.$$set({ type });
|
|
7517
|
-
flush();
|
|
7492
|
+
return ["variant", "size", "message", "progress", "visible"];
|
|
7518
7493
|
}
|
|
7519
7494
|
|
|
7520
7495
|
get variant() {
|
|
7521
|
-
return this.$$.ctx[
|
|
7496
|
+
return this.$$.ctx[6];
|
|
7522
7497
|
}
|
|
7523
7498
|
|
|
7524
7499
|
set variant(variant) {
|
|
@@ -7527,7 +7502,7 @@ class CircularProgress extends SvelteElement {
|
|
|
7527
7502
|
}
|
|
7528
7503
|
|
|
7529
7504
|
get size() {
|
|
7530
|
-
return this.$$.ctx[
|
|
7505
|
+
return this.$$.ctx[7];
|
|
7531
7506
|
}
|
|
7532
7507
|
|
|
7533
7508
|
set size(size) {
|
|
@@ -7536,7 +7511,7 @@ class CircularProgress extends SvelteElement {
|
|
|
7536
7511
|
}
|
|
7537
7512
|
|
|
7538
7513
|
get message() {
|
|
7539
|
-
return this.$$.ctx[
|
|
7514
|
+
return this.$$.ctx[0];
|
|
7540
7515
|
}
|
|
7541
7516
|
|
|
7542
7517
|
set message(message) {
|
|
@@ -7545,7 +7520,7 @@ class CircularProgress extends SvelteElement {
|
|
|
7545
7520
|
}
|
|
7546
7521
|
|
|
7547
7522
|
get progress() {
|
|
7548
|
-
return this.$$.ctx[
|
|
7523
|
+
return this.$$.ctx[1];
|
|
7549
7524
|
}
|
|
7550
7525
|
|
|
7551
7526
|
set progress(progress) {
|
|
@@ -7554,7 +7529,7 @@ class CircularProgress extends SvelteElement {
|
|
|
7554
7529
|
}
|
|
7555
7530
|
|
|
7556
7531
|
get visible() {
|
|
7557
|
-
return this.$$.ctx[
|
|
7532
|
+
return this.$$.ctx[8];
|
|
7558
7533
|
}
|
|
7559
7534
|
|
|
7560
7535
|
set visible(visible) {
|
|
@@ -8203,7 +8178,7 @@ function create_if_block_3(ctx) {
|
|
|
8203
8178
|
};
|
|
8204
8179
|
}
|
|
8205
8180
|
|
|
8206
|
-
// (
|
|
8181
|
+
// (34:2) {#if ["alpha", "beta"].includes(level)}
|
|
8207
8182
|
function create_if_block_1$3(ctx) {
|
|
8208
8183
|
let div0;
|
|
8209
8184
|
let t0_value = capitalize(/*level*/ ctx[0]) + "";
|
|
@@ -8225,7 +8200,7 @@ function create_if_block_1$3(ctx) {
|
|
|
8225
8200
|
t2 = text("This is a new ");
|
|
8226
8201
|
a = element("a");
|
|
8227
8202
|
a.textContent = "Alberta Government";
|
|
8228
|
-
t4 = text("
|
|
8203
|
+
t4 = text(" service\n ");
|
|
8229
8204
|
if (if_block) if_block.c();
|
|
8230
8205
|
attr(div0, "data-testid", "level");
|
|
8231
8206
|
attr(div0, "class", div0_class_value = "service-level service-level--" + /*level*/ ctx[0].toLowerCase());
|
|
@@ -8272,7 +8247,7 @@ function create_if_block_1$3(ctx) {
|
|
|
8272
8247
|
};
|
|
8273
8248
|
}
|
|
8274
8249
|
|
|
8275
|
-
// (
|
|
8250
|
+
// (43:6) {#if feedbackurl}
|
|
8276
8251
|
function create_if_block_2$2(ctx) {
|
|
8277
8252
|
let span;
|
|
8278
8253
|
let t0;
|
|
@@ -8305,7 +8280,7 @@ function create_if_block_2$2(ctx) {
|
|
|
8305
8280
|
};
|
|
8306
8281
|
}
|
|
8307
8282
|
|
|
8308
|
-
// (
|
|
8283
|
+
// (49:2) {#if version}
|
|
8309
8284
|
function create_if_block$6(ctx) {
|
|
8310
8285
|
let div;
|
|
8311
8286
|
let t;
|
|
@@ -8438,7 +8413,7 @@ function instance$a($$self, $$props, $$invalidate) {
|
|
|
8438
8413
|
class MicrositeHeader extends SvelteElement {
|
|
8439
8414
|
constructor(options) {
|
|
8440
8415
|
super();
|
|
8441
|
-
this.shadowRoot.innerHTML = `<style>:host{box-sizing:border-box;font-family:var(--font-family)}a{color:var(--goa-color-interactive);cursor:pointer}a:hover{color:var(--goa-color-interactive--hover)}a:focus{outline-width:thin;outline-style:solid;outline-color:var(--goa-color-interactive--hover);outline-offset:0px}.goa-official-site-header{display:flex;font-size:var(--fs-
|
|
8416
|
+
this.shadowRoot.innerHTML = `<style>:host{box-sizing:border-box;font-family:var(--font-family)}a{color:var(--goa-color-interactive);cursor:pointer}a:hover{color:var(--goa-color-interactive--hover)}a:focus{outline-width:thin;outline-style:solid;outline-color:var(--goa-color-interactive--hover);outline-offset:0px}.goa-official-site-header{display:flex;font-size:var(--fs-sm);background-color:var(--color-gray-100);align-items:center;justify-content:space-between;padding:0.5rem 1.5rem}@media(max-width: 640px){.goa-official-site-header{padding:0.5rem 1rem;align-items:start}}.spacer{flex:1 1 auto}.version{color:var(--goa-color-text-secondary);padding-left:1rem;line-height:1.25rem}.service-level{font-weight:bold;padding:0.25rem;display:flex;margin-right:1rem;line-height:initial}.service-level--alpha{background-color:var(--goa-color-status-warning);color:var(--goa-color-text)}.service-level--beta{background-color:var(--goa-color-brand);color:var(--goa-color-text-light)}.service-level--live{padding:0}.site-text{color:var(--goa-color-text);line-height:1.25rem}</style>`;
|
|
8442
8417
|
|
|
8443
8418
|
init(
|
|
8444
8419
|
this,
|
|
@@ -9138,12 +9113,12 @@ function create_if_block$4(ctx) {
|
|
|
9138
9113
|
: "var(--goa-color-primary)");
|
|
9139
9114
|
|
|
9140
9115
|
attr(path, "stroke-linecap", "round");
|
|
9141
|
-
attr(svg, "class", svg_class_value = `spinner-${/*type*/ ctx[
|
|
9116
|
+
attr(svg, "class", svg_class_value = `spinner-${/*type*/ ctx[2]}`);
|
|
9142
9117
|
attr(svg, "fill", "none");
|
|
9143
9118
|
attr(svg, "viewBox", svg_viewBox_value = "0 0 " + /*diameter*/ ctx[5] + " " + /*diameter*/ ctx[5]);
|
|
9144
9119
|
attr(svg, "width", /*diameter*/ ctx[5]);
|
|
9145
9120
|
attr(svg, "height", /*diameter*/ ctx[5]);
|
|
9146
|
-
attr(svg, "data-testid", /*testid*/ ctx[
|
|
9121
|
+
attr(svg, "data-testid", /*testid*/ ctx[1]);
|
|
9147
9122
|
attr(svg, "xmlns", "http://www.w3.org/2000/svg");
|
|
9148
9123
|
},
|
|
9149
9124
|
m(target, anchor) {
|
|
@@ -9188,7 +9163,7 @@ function create_if_block$4(ctx) {
|
|
|
9188
9163
|
attr(path, "stroke", path_stroke_value);
|
|
9189
9164
|
}
|
|
9190
9165
|
|
|
9191
|
-
if (dirty & /*type*/
|
|
9166
|
+
if (dirty & /*type*/ 4 && svg_class_value !== (svg_class_value = `spinner-${/*type*/ ctx[2]}`)) {
|
|
9192
9167
|
attr(svg, "class", svg_class_value);
|
|
9193
9168
|
}
|
|
9194
9169
|
|
|
@@ -9204,8 +9179,8 @@ function create_if_block$4(ctx) {
|
|
|
9204
9179
|
attr(svg, "height", /*diameter*/ ctx[5]);
|
|
9205
9180
|
}
|
|
9206
9181
|
|
|
9207
|
-
if (dirty & /*testid*/
|
|
9208
|
-
attr(svg, "data-testid", /*testid*/ ctx[
|
|
9182
|
+
if (dirty & /*testid*/ 2) {
|
|
9183
|
+
attr(svg, "data-testid", /*testid*/ ctx[1]);
|
|
9209
9184
|
}
|
|
9210
9185
|
},
|
|
9211
9186
|
d(detaching) {
|
|
@@ -9260,9 +9235,9 @@ function instance$8($$self, $$props, $$invalidate) {
|
|
|
9260
9235
|
let $_progress;
|
|
9261
9236
|
let { size } = $$props;
|
|
9262
9237
|
let { invert = false } = $$props;
|
|
9263
|
-
let {
|
|
9264
|
-
let { progress = "0" } = $$props;
|
|
9238
|
+
let { progress = -1 } = $$props;
|
|
9265
9239
|
let { testid = "" } = $$props;
|
|
9240
|
+
let type = "infinite";
|
|
9266
9241
|
const _progress = tweened(0, { duration: 500, easing: quartOut });
|
|
9267
9242
|
component_subscribe($$self, _progress, value => $$invalidate(7, $_progress = value));
|
|
9268
9243
|
|
|
@@ -9294,16 +9269,22 @@ function instance$8($$self, $$props, $$invalidate) {
|
|
|
9294
9269
|
$$self.$$set = $$props => {
|
|
9295
9270
|
if ('size' in $$props) $$invalidate(10, size = $$props.size);
|
|
9296
9271
|
if ('invert' in $$props) $$invalidate(0, invert = $$props.invert);
|
|
9297
|
-
if ('type' in $$props) $$invalidate(1, type = $$props.type);
|
|
9298
9272
|
if ('progress' in $$props) $$invalidate(11, progress = $$props.progress);
|
|
9299
|
-
if ('testid' in $$props) $$invalidate(
|
|
9273
|
+
if ('testid' in $$props) $$invalidate(1, testid = $$props.testid);
|
|
9300
9274
|
};
|
|
9301
9275
|
|
|
9302
9276
|
$$self.$$.update = () => {
|
|
9303
9277
|
if ($$self.$$.dirty & /*progress*/ 2048) {
|
|
9304
9278
|
// Reactive
|
|
9305
9279
|
{
|
|
9306
|
-
|
|
9280
|
+
// Typescript recognizes `progress` as a number, but once compiled, due to it being a web component, progress is a string.
|
|
9281
|
+
// This line makes both sides happy.
|
|
9282
|
+
const p = parseFloat(progress + '');
|
|
9283
|
+
|
|
9284
|
+
if (p >= 0) {
|
|
9285
|
+
_progress.set(p || 1); // start at 1 to prevent incorrect arc calculations
|
|
9286
|
+
$$invalidate(2, type = "progress");
|
|
9287
|
+
}
|
|
9307
9288
|
}
|
|
9308
9289
|
}
|
|
9309
9290
|
|
|
@@ -9328,7 +9309,7 @@ function instance$8($$self, $$props, $$invalidate) {
|
|
|
9328
9309
|
$$invalidate(12, pathRadius = radius - strokewidth / 2);
|
|
9329
9310
|
}
|
|
9330
9311
|
|
|
9331
|
-
if ($$self.$$.dirty & /*type, pathRadius, progress*/
|
|
9312
|
+
if ($$self.$$.dirty & /*type, pathRadius, progress*/ 6148) {
|
|
9332
9313
|
$$invalidate(6, ready = type === "infinite"
|
|
9333
9314
|
? pathRadius
|
|
9334
9315
|
: pathRadius && progress);
|
|
@@ -9337,8 +9318,8 @@ function instance$8($$self, $$props, $$invalidate) {
|
|
|
9337
9318
|
|
|
9338
9319
|
return [
|
|
9339
9320
|
invert,
|
|
9340
|
-
type,
|
|
9341
9321
|
testid,
|
|
9322
|
+
type,
|
|
9342
9323
|
radius,
|
|
9343
9324
|
strokewidth,
|
|
9344
9325
|
diameter,
|
|
@@ -9370,9 +9351,8 @@ class Spinner extends SvelteElement {
|
|
|
9370
9351
|
{
|
|
9371
9352
|
size: 10,
|
|
9372
9353
|
invert: 0,
|
|
9373
|
-
type: 1,
|
|
9374
9354
|
progress: 11,
|
|
9375
|
-
testid:
|
|
9355
|
+
testid: 1
|
|
9376
9356
|
},
|
|
9377
9357
|
null
|
|
9378
9358
|
);
|
|
@@ -9390,7 +9370,7 @@ class Spinner extends SvelteElement {
|
|
|
9390
9370
|
}
|
|
9391
9371
|
|
|
9392
9372
|
static get observedAttributes() {
|
|
9393
|
-
return ["size", "invert", "
|
|
9373
|
+
return ["size", "invert", "progress", "testid"];
|
|
9394
9374
|
}
|
|
9395
9375
|
|
|
9396
9376
|
get size() {
|
|
@@ -9411,15 +9391,6 @@ class Spinner extends SvelteElement {
|
|
|
9411
9391
|
flush();
|
|
9412
9392
|
}
|
|
9413
9393
|
|
|
9414
|
-
get type() {
|
|
9415
|
-
return this.$$.ctx[1];
|
|
9416
|
-
}
|
|
9417
|
-
|
|
9418
|
-
set type(type) {
|
|
9419
|
-
this.$$set({ type });
|
|
9420
|
-
flush();
|
|
9421
|
-
}
|
|
9422
|
-
|
|
9423
9394
|
get progress() {
|
|
9424
9395
|
return this.$$.ctx[11];
|
|
9425
9396
|
}
|
|
@@ -9430,7 +9401,7 @@ class Spinner extends SvelteElement {
|
|
|
9430
9401
|
}
|
|
9431
9402
|
|
|
9432
9403
|
get testid() {
|
|
9433
|
-
return this.$$.ctx[
|
|
9404
|
+
return this.$$.ctx[1];
|
|
9434
9405
|
}
|
|
9435
9406
|
|
|
9436
9407
|
set testid(testid) {
|
|
@@ -9907,31 +9878,31 @@ function create_fragment$7(ctx) {
|
|
|
9907
9878
|
return {
|
|
9908
9879
|
c() {
|
|
9909
9880
|
div = element("div");
|
|
9910
|
-
|
|
9881
|
+
|
|
9882
|
+
div.innerHTML = `<slot></slot>
|
|
9883
|
+
|
|
9884
|
+
<span tabindex="0"></span>`;
|
|
9885
|
+
|
|
9911
9886
|
this.c = noop;
|
|
9912
9887
|
},
|
|
9913
9888
|
m(target, anchor) {
|
|
9914
9889
|
insert(target, div, anchor);
|
|
9915
|
-
/*div_binding*/ ctx[
|
|
9890
|
+
/*div_binding*/ ctx[4](div);
|
|
9916
9891
|
},
|
|
9917
9892
|
p: noop,
|
|
9918
9893
|
i: noop,
|
|
9919
9894
|
o: noop,
|
|
9920
9895
|
d(detaching) {
|
|
9921
9896
|
if (detaching) detach(div);
|
|
9922
|
-
/*div_binding*/ ctx[
|
|
9897
|
+
/*div_binding*/ ctx[4](null);
|
|
9923
9898
|
}
|
|
9924
9899
|
};
|
|
9925
9900
|
}
|
|
9926
9901
|
|
|
9927
9902
|
function isFocusable(element) {
|
|
9928
|
-
|
|
9929
|
-
|
|
9930
|
-
|
|
9931
|
-
|
|
9932
|
-
if (element.disabled) {
|
|
9933
|
-
return false;
|
|
9934
|
-
}
|
|
9903
|
+
const isTabbable = element.tabIndex > 0 || element.tabIndex === 0 && element.getAttribute('tabIndex') !== null;
|
|
9904
|
+
if (isTabbable) return true;
|
|
9905
|
+
if (element.disabled) return false;
|
|
9935
9906
|
|
|
9936
9907
|
switch (element.nodeName) {
|
|
9937
9908
|
case 'A':
|
|
@@ -9948,11 +9919,12 @@ function isFocusable(element) {
|
|
|
9948
9919
|
}
|
|
9949
9920
|
|
|
9950
9921
|
function instance$6($$self, $$props, $$invalidate) {
|
|
9951
|
-
let
|
|
9922
|
+
let isActive;
|
|
9923
|
+
let { active } = $$props;
|
|
9952
9924
|
let ignoreFocusChanges = false;
|
|
9953
9925
|
let lastFocus;
|
|
9954
9926
|
let element;
|
|
9955
|
-
let
|
|
9927
|
+
let hasListeners = false;
|
|
9956
9928
|
|
|
9957
9929
|
function removeListeners() {
|
|
9958
9930
|
document.removeEventListener('focus', trapFocus, true);
|
|
@@ -9962,13 +9934,16 @@ function instance$6($$self, $$props, $$invalidate) {
|
|
|
9962
9934
|
document.addEventListener('focus', trapFocus, true);
|
|
9963
9935
|
}
|
|
9964
9936
|
|
|
9965
|
-
|
|
9966
|
-
|
|
9937
|
+
// ====
|
|
9938
|
+
// First Node
|
|
9939
|
+
// ====
|
|
9940
|
+
function focusOnFirstNode(nodes) {
|
|
9941
|
+
if (!nodes) return false;
|
|
9967
9942
|
|
|
9968
|
-
for (
|
|
9969
|
-
|
|
9943
|
+
for (const node of nodes) {
|
|
9944
|
+
const isFocusable = focus(node) || focusOnFirstNode(node.childNodes) || focusOnFirstNodeOfSlot(node) || focusOnFirstNodeOfShadowDOM(node);
|
|
9970
9945
|
|
|
9971
|
-
if (
|
|
9946
|
+
if (isFocusable) {
|
|
9972
9947
|
return true;
|
|
9973
9948
|
}
|
|
9974
9949
|
}
|
|
@@ -9976,43 +9951,35 @@ function instance$6($$self, $$props, $$invalidate) {
|
|
|
9976
9951
|
return false;
|
|
9977
9952
|
}
|
|
9978
9953
|
|
|
9979
|
-
function
|
|
9980
|
-
|
|
9981
|
-
|
|
9982
|
-
if (node instanceof HTMLSlotElement) {
|
|
9983
|
-
let assingedNodesOfSlotElement = (_a = node) === null || _a === void 0
|
|
9984
|
-
? void 0
|
|
9985
|
-
: _a.assignedNodes();
|
|
9954
|
+
function focusOnFirstNodeOfSlot(node) {
|
|
9955
|
+
if (!(node instanceof HTMLSlotElement)) return false;
|
|
9986
9956
|
|
|
9987
|
-
|
|
9988
|
-
|
|
9989
|
-
}
|
|
9957
|
+
if (focusOnFirstNode(node.assignedNodes())) {
|
|
9958
|
+
return true;
|
|
9990
9959
|
}
|
|
9991
9960
|
}
|
|
9992
9961
|
|
|
9993
|
-
function
|
|
9994
|
-
var _a
|
|
9995
|
-
|
|
9996
|
-
if (node instanceof HTMLElement) {
|
|
9997
|
-
let childNodesOfShadowRoot = (_b = (_a = node) === null || _a === void 0
|
|
9998
|
-
? void 0
|
|
9999
|
-
: _a.shadowRoot) === null || _b === void 0
|
|
10000
|
-
? void 0
|
|
10001
|
-
: _b.childNodes;
|
|
9962
|
+
function focusOnFirstNodeOfShadowDOM(node) {
|
|
9963
|
+
var _a;
|
|
9964
|
+
if (!(node instanceof HTMLElement)) return false;
|
|
10002
9965
|
|
|
10003
|
-
|
|
10004
|
-
|
|
10005
|
-
|
|
9966
|
+
if (focusOnFirstNode((_a = node.shadowRoot) === null || _a === void 0
|
|
9967
|
+
? void 0
|
|
9968
|
+
: _a.childNodes)) {
|
|
9969
|
+
return true;
|
|
10006
9970
|
}
|
|
10007
9971
|
}
|
|
10008
9972
|
|
|
10009
|
-
|
|
10010
|
-
|
|
9973
|
+
// ====
|
|
9974
|
+
// Last Node
|
|
9975
|
+
// ====
|
|
9976
|
+
function focusOnLastNode(nodes) {
|
|
9977
|
+
if (!nodes) return false;
|
|
10011
9978
|
|
|
10012
|
-
for (let i =
|
|
10013
|
-
let
|
|
9979
|
+
for (let i = nodes.length - 1; i >= 0; i--) {
|
|
9980
|
+
let node = nodes[i];
|
|
10014
9981
|
|
|
10015
|
-
if (
|
|
9982
|
+
if (focus(node) || focusOnLastNode(node.childNodes) || focusOnLastNodeOfSlot(node) || focusOnLastNodeOfShadowDOM(node)) {
|
|
10016
9983
|
return true;
|
|
10017
9984
|
}
|
|
10018
9985
|
}
|
|
@@ -10020,59 +9987,43 @@ function instance$6($$self, $$props, $$invalidate) {
|
|
|
10020
9987
|
return false;
|
|
10021
9988
|
}
|
|
10022
9989
|
|
|
10023
|
-
function
|
|
10024
|
-
|
|
10025
|
-
|
|
10026
|
-
if (node instanceof HTMLSlotElement) {
|
|
10027
|
-
let assingedNodesOfSlotElement = (_a = node) === null || _a === void 0
|
|
10028
|
-
? void 0
|
|
10029
|
-
: _a.assignedNodes();
|
|
9990
|
+
function focusOnLastNodeOfSlot(node) {
|
|
9991
|
+
if (!(node instanceof HTMLSlotElement)) return false;
|
|
10030
9992
|
|
|
10031
|
-
|
|
10032
|
-
|
|
10033
|
-
}
|
|
9993
|
+
if (focusOnLastNode(node.assignedNodes())) {
|
|
9994
|
+
return true;
|
|
10034
9995
|
}
|
|
10035
9996
|
}
|
|
10036
9997
|
|
|
10037
|
-
function
|
|
10038
|
-
var _a
|
|
10039
|
-
|
|
10040
|
-
if (node instanceof HTMLElement) {
|
|
10041
|
-
let childNodesOfShadowRoot = (_b = (_a = node) === null || _a === void 0
|
|
10042
|
-
? void 0
|
|
10043
|
-
: _a.shadowRoot) === null || _b === void 0
|
|
10044
|
-
? void 0
|
|
10045
|
-
: _b.childNodes;
|
|
9998
|
+
function focusOnLastNodeOfShadowDOM(node) {
|
|
9999
|
+
var _a;
|
|
10000
|
+
if (!(node instanceof HTMLElement)) return false;
|
|
10046
10001
|
|
|
10047
|
-
|
|
10048
|
-
|
|
10049
|
-
|
|
10002
|
+
if (focusOnLastNode((_a = node.shadowRoot) === null || _a === void 0
|
|
10003
|
+
? void 0
|
|
10004
|
+
: _a.childNodes)) {
|
|
10005
|
+
return true;
|
|
10050
10006
|
}
|
|
10051
10007
|
}
|
|
10052
10008
|
|
|
10053
|
-
function
|
|
10054
|
-
if (!isFocusable(element))
|
|
10055
|
-
return false;
|
|
10056
|
-
}
|
|
10057
|
-
|
|
10058
|
-
ignoreFocusChanges = true;
|
|
10009
|
+
function focus(element) {
|
|
10010
|
+
if (!isFocusable(element)) return false;
|
|
10059
10011
|
|
|
10060
10012
|
try {
|
|
10013
|
+
ignoreFocusChanges = true;
|
|
10061
10014
|
element.focus();
|
|
10062
10015
|
} catch(e) {
|
|
10063
10016
|
|
|
10017
|
+
} finally {
|
|
10018
|
+
ignoreFocusChanges = false;
|
|
10064
10019
|
}
|
|
10065
10020
|
|
|
10066
|
-
ignoreFocusChanges = false;
|
|
10067
10021
|
return document.activeElement === element;
|
|
10068
10022
|
}
|
|
10069
10023
|
|
|
10070
10024
|
function trapFocus(event) {
|
|
10071
10025
|
var _a;
|
|
10072
|
-
|
|
10073
|
-
if (ignoreFocusChanges) {
|
|
10074
|
-
return;
|
|
10075
|
-
}
|
|
10026
|
+
if (ignoreFocusChanges) return;
|
|
10076
10027
|
|
|
10077
10028
|
const slotElements = (_a = element.firstChild) === null || _a === void 0
|
|
10078
10029
|
? void 0
|
|
@@ -10086,15 +10037,16 @@ function instance$6($$self, $$props, $$invalidate) {
|
|
|
10086
10037
|
|
|
10087
10038
|
if (event.composedPath().includes(contentRootElement)) {
|
|
10088
10039
|
lastFocus = event.target;
|
|
10089
|
-
|
|
10090
|
-
|
|
10040
|
+
return;
|
|
10041
|
+
}
|
|
10091
10042
|
|
|
10092
|
-
|
|
10093
|
-
attemptFocusOnLastDescendant(contentRootElement.childNodes);
|
|
10094
|
-
}
|
|
10043
|
+
focusOnFirstNode(contentRootElement.childNodes);
|
|
10095
10044
|
|
|
10096
|
-
|
|
10045
|
+
if (lastFocus == document.activeElement) {
|
|
10046
|
+
focusOnLastNode(contentRootElement.childNodes);
|
|
10097
10047
|
}
|
|
10048
|
+
|
|
10049
|
+
lastFocus = document.activeElement;
|
|
10098
10050
|
}
|
|
10099
10051
|
|
|
10100
10052
|
function div_binding($$value) {
|
|
@@ -10105,26 +10057,30 @@ function instance$6($$self, $$props, $$invalidate) {
|
|
|
10105
10057
|
}
|
|
10106
10058
|
|
|
10107
10059
|
$$self.$$set = $$props => {
|
|
10108
|
-
if ('
|
|
10060
|
+
if ('active' in $$props) $$invalidate(1, active = $$props.active);
|
|
10109
10061
|
};
|
|
10110
10062
|
|
|
10111
10063
|
$$self.$$.update = () => {
|
|
10112
|
-
if ($$self.$$.dirty & /*
|
|
10113
|
-
$$invalidate(
|
|
10064
|
+
if ($$self.$$.dirty & /*active*/ 2) {
|
|
10065
|
+
$$invalidate(3, isActive = toBoolean(active));
|
|
10114
10066
|
}
|
|
10115
10067
|
|
|
10116
|
-
if ($$self.$$.dirty & /*
|
|
10068
|
+
if ($$self.$$.dirty & /*isActive, hasListeners*/ 12) {
|
|
10117
10069
|
{
|
|
10118
|
-
if (
|
|
10070
|
+
if (isActive && !hasListeners) {
|
|
10119
10071
|
addListeners();
|
|
10120
|
-
|
|
10072
|
+
$$invalidate(2, hasListeners = true);
|
|
10073
|
+
}
|
|
10074
|
+
|
|
10075
|
+
if (!isActive && hasListeners) {
|
|
10121
10076
|
removeListeners();
|
|
10077
|
+
$$invalidate(2, hasListeners = false);
|
|
10122
10078
|
}
|
|
10123
10079
|
}
|
|
10124
10080
|
}
|
|
10125
10081
|
};
|
|
10126
10082
|
|
|
10127
|
-
return [element,
|
|
10083
|
+
return [element, active, hasListeners, isActive, div_binding];
|
|
10128
10084
|
}
|
|
10129
10085
|
|
|
10130
10086
|
class FocusTrap extends SvelteElement {
|
|
@@ -10141,7 +10097,7 @@ class FocusTrap extends SvelteElement {
|
|
|
10141
10097
|
instance$6,
|
|
10142
10098
|
create_fragment$7,
|
|
10143
10099
|
safe_not_equal,
|
|
10144
|
-
{
|
|
10100
|
+
{ active: 1 },
|
|
10145
10101
|
null
|
|
10146
10102
|
);
|
|
10147
10103
|
|
|
@@ -10158,15 +10114,15 @@ class FocusTrap extends SvelteElement {
|
|
|
10158
10114
|
}
|
|
10159
10115
|
|
|
10160
10116
|
static get observedAttributes() {
|
|
10161
|
-
return ["
|
|
10117
|
+
return ["active"];
|
|
10162
10118
|
}
|
|
10163
10119
|
|
|
10164
|
-
get
|
|
10120
|
+
get active() {
|
|
10165
10121
|
return this.$$.ctx[1];
|
|
10166
10122
|
}
|
|
10167
10123
|
|
|
10168
|
-
set
|
|
10169
|
-
this.$$set({
|
|
10124
|
+
set active(active) {
|
|
10125
|
+
this.$$set({ active });
|
|
10170
10126
|
flush();
|
|
10171
10127
|
}
|
|
10172
10128
|
}
|