@abgov/react-components 4.0.0-alpha.38 → 4.0.0-alpha.40
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 +153 -119
- package/react-components.umd.js +161 -125
package/package.json
CHANGED
package/react-components.esm.js
CHANGED
|
@@ -2114,7 +2114,7 @@ function clickHandler(e) {
|
|
|
2114
2114
|
function instance$w($$self, $$props, $$invalidate) {
|
|
2115
2115
|
let isDisabled;
|
|
2116
2116
|
let isButtonDark;
|
|
2117
|
-
const BUTTON_TYPES = ["primary", "secondary", "tertiary", "start"];
|
|
2117
|
+
const BUTTON_TYPES = ["primary", "submit", "secondary", "tertiary", "start"];
|
|
2118
2118
|
const SIZES = ["normal", "compact"];
|
|
2119
2119
|
const VARIANTS = ["normal", "destructive"]; // type check functions
|
|
2120
2120
|
|
|
@@ -2200,7 +2200,7 @@ class Button extends SvelteElement {
|
|
|
2200
2200
|
constructor(options) {
|
|
2201
2201
|
super();
|
|
2202
2202
|
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:inline-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,
|
|
2203
|
-
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.destructive{color:var(--color-white);background:var(--goa-color-status-emergency);border-color:var(--goa-color-status-emergency)}.primary.destructive:hover{background:var(--goa-color-status-emergency-dark);border-color:var(--goa-color-status-emergency-dark)}.primary.destructive:focus,.primary.destructive:active{background:var(--goa-color-status-emergency-dark);border-color:var(--goa-color-status-emergency-dark)}.secondary.destructive{color:var(--goa-color-status-emergency);border-color:var(--goa-color-status-emergency);background:var(--color-white)}.secondary.destructive:hover{border-color:var(--goa-color-status-emergency-dark);color:var(--goa-color-status-emergency-dark);background:var(--color-white)}.secondary.destructive:focus,.secondary.destructive:active{color:var(--goa-color-status-emergency-dark);border-color:var(--goa-color-status-emergency-dark);background:var(--color-white)}.tertiary.destructive{color:var(--goa-color-status-emergency);border-color:var(--color-gray-200);background:var(--color-white)}.tertiary.destructive:hover{border-color:var(--goa-color-status-emergency-dark);color:var(--goa-color-status-emergency-dark);background:var(--color-white)}.tertiary.destructive:focus,.tertiary.destructive:active{color:var(--goa-color-status-emergency-dark);border-color:var(--goa-color-status-emergency-dark);background:var(--color-white)}</style>`;
|
|
2203
|
+
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.submit,button.primary{border:2px solid var(--goa-color-interactive);background:var(--goa-color-interactive);color:var(--goa-color-text-light)}button.start:hover,button.submit:hover,button.primary:hover{border-color:var(--goa-color-interactive--hover);background:var(--goa-color-interactive--hover)}button.start:focus,button.start:active,button.submit:focus,button.submit: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}.submit.destructive,.primary.destructive{color:var(--color-white);background:var(--goa-color-status-emergency);border-color:var(--goa-color-status-emergency)}.submit.destructive:hover,.primary.destructive:hover{background:var(--goa-color-status-emergency-dark);border-color:var(--goa-color-status-emergency-dark)}.submit.destructive:focus,.primary.destructive:focus,.primary.destructive:active{background:var(--goa-color-status-emergency-dark);border-color:var(--goa-color-status-emergency-dark)}.secondary.destructive{color:var(--goa-color-status-emergency);border-color:var(--goa-color-status-emergency);background:var(--color-white)}.secondary.destructive:hover{border-color:var(--goa-color-status-emergency-dark);color:var(--goa-color-status-emergency-dark);background:var(--color-white)}.secondary.destructive:focus,.secondary.destructive:active{color:var(--goa-color-status-emergency-dark);border-color:var(--goa-color-status-emergency-dark);background:var(--color-white)}.tertiary.destructive{color:var(--goa-color-status-emergency);border-color:var(--color-gray-200);background:var(--color-white)}.tertiary.destructive:hover{border-color:var(--goa-color-status-emergency-dark);color:var(--goa-color-status-emergency-dark);background:var(--color-white)}.tertiary.destructive:focus,.tertiary.destructive:active{color:var(--goa-color-status-emergency-dark);border-color:var(--goa-color-status-emergency-dark);background:var(--color-white)}</style>`;
|
|
2204
2204
|
init(this, {
|
|
2205
2205
|
target: this.shadowRoot,
|
|
2206
2206
|
props: attribute_to_object(this.attributes),
|
|
@@ -4201,7 +4201,7 @@ function writable(value, start = noop) {
|
|
|
4201
4201
|
|
|
4202
4202
|
const stores = {};
|
|
4203
4203
|
|
|
4204
|
-
class
|
|
4204
|
+
class ContextStoreInternal {
|
|
4205
4205
|
constructor() {
|
|
4206
4206
|
this.store = writable();
|
|
4207
4207
|
}
|
|
@@ -4219,26 +4219,13 @@ class ContextStore {
|
|
|
4219
4219
|
}
|
|
4220
4220
|
|
|
4221
4221
|
function createContext(name) {
|
|
4222
|
-
const ctx = new
|
|
4222
|
+
const ctx = new ContextStoreInternal();
|
|
4223
4223
|
stores[name] = ctx;
|
|
4224
4224
|
return ctx;
|
|
4225
4225
|
}
|
|
4226
4226
|
|
|
4227
|
-
|
|
4228
|
-
return
|
|
4229
|
-
}
|
|
4230
|
-
|
|
4231
|
-
async function _getContext(name, attempts) {
|
|
4232
|
-
if (attempts > 10) {
|
|
4233
|
-
throw new Error(`Could not find context ${name}`);
|
|
4234
|
-
}
|
|
4235
|
-
|
|
4236
|
-
if (stores[name]) {
|
|
4237
|
-
return stores[name];
|
|
4238
|
-
}
|
|
4239
|
-
|
|
4240
|
-
await tick();
|
|
4241
|
-
return _getContext(name, attempts + 1);
|
|
4227
|
+
function getContext(name) {
|
|
4228
|
+
return stores[name];
|
|
4242
4229
|
}
|
|
4243
4230
|
|
|
4244
4231
|
function deleteContext(name) {
|
|
@@ -4252,10 +4239,10 @@ const BIND$1 = "bind";
|
|
|
4252
4239
|
|
|
4253
4240
|
function get_each_context$4(ctx, list, i) {
|
|
4254
4241
|
const child_ctx = ctx.slice();
|
|
4255
|
-
child_ctx[
|
|
4256
|
-
child_ctx[
|
|
4242
|
+
child_ctx[39] = list[i];
|
|
4243
|
+
child_ctx[41] = i;
|
|
4257
4244
|
return child_ctx;
|
|
4258
|
-
} // (
|
|
4245
|
+
} // (198:2) {#if isMenuVisible}
|
|
4259
4246
|
|
|
4260
4247
|
|
|
4261
4248
|
function create_if_block$d(ctx) {
|
|
@@ -4300,14 +4287,16 @@ function create_if_block$d(ctx) {
|
|
|
4300
4287
|
}
|
|
4301
4288
|
|
|
4302
4289
|
};
|
|
4303
|
-
} // (
|
|
4290
|
+
} // (234:4) {#each options as option, index}
|
|
4304
4291
|
|
|
4305
4292
|
|
|
4306
|
-
function create_each_block$4(
|
|
4293
|
+
function create_each_block$4(ctx) {
|
|
4307
4294
|
let li;
|
|
4308
|
-
let t0_value =
|
|
4295
|
+
let t0_value = (
|
|
4309
4296
|
/*option*/
|
|
4310
|
-
ctx[
|
|
4297
|
+
ctx[39].label ||
|
|
4298
|
+
/*option*/
|
|
4299
|
+
ctx[39].value) + "";
|
|
4311
4300
|
let t0;
|
|
4312
4301
|
let t1;
|
|
4313
4302
|
let li_aria_label_value;
|
|
@@ -4322,43 +4311,39 @@ function create_each_block$4(key_1, ctx) {
|
|
|
4322
4311
|
/*click_handler*/
|
|
4323
4312
|
ctx[22](
|
|
4324
4313
|
/*option*/
|
|
4325
|
-
ctx[
|
|
4314
|
+
ctx[39])
|
|
4326
4315
|
);
|
|
4327
4316
|
}
|
|
4328
4317
|
|
|
4329
4318
|
return {
|
|
4330
|
-
key: key_1,
|
|
4331
|
-
first: null,
|
|
4332
|
-
|
|
4333
4319
|
c() {
|
|
4334
4320
|
li = element("li");
|
|
4335
4321
|
t0 = text(t0_value);
|
|
4336
4322
|
t1 = space();
|
|
4337
4323
|
attr(li, "aria-label", li_aria_label_value =
|
|
4338
4324
|
/*option*/
|
|
4339
|
-
ctx[
|
|
4325
|
+
ctx[39].label ||
|
|
4340
4326
|
/*option*/
|
|
4341
|
-
ctx[
|
|
4327
|
+
ctx[39].value);
|
|
4342
4328
|
attr(li, "data-testid", li_data_testid_value = `${
|
|
4343
4329
|
/*option*/
|
|
4344
|
-
ctx[
|
|
4330
|
+
ctx[39].value}-dropdown-item`);
|
|
4345
4331
|
attr(li, "data-index", li_data_index_value =
|
|
4346
4332
|
/*index*/
|
|
4347
|
-
ctx[
|
|
4333
|
+
ctx[41]);
|
|
4348
4334
|
attr(li, "class", "goa-dropdown-option");
|
|
4349
4335
|
attr(li, "style", li_style_value = `display: ${"block"}`);
|
|
4350
4336
|
toggle_class(li, "goa-dropdown-option--disabled", false);
|
|
4351
4337
|
toggle_class(li, "goa-dropdown-option--tabbed",
|
|
4352
4338
|
/*index*/
|
|
4353
|
-
ctx[
|
|
4339
|
+
ctx[41] ===
|
|
4354
4340
|
/*highlightedIndex*/
|
|
4355
4341
|
ctx[13]);
|
|
4356
4342
|
toggle_class(li, "goa-dropdown-option--selected",
|
|
4357
4343
|
/*_values*/
|
|
4358
4344
|
ctx[9].includes(
|
|
4359
4345
|
/*option*/
|
|
4360
|
-
ctx[
|
|
4361
|
-
this.first = li;
|
|
4346
|
+
ctx[39].value));
|
|
4362
4347
|
},
|
|
4363
4348
|
|
|
4364
4349
|
m(target, anchor) {
|
|
@@ -4376,17 +4361,19 @@ function create_each_block$4(key_1, ctx) {
|
|
|
4376
4361
|
ctx = new_ctx;
|
|
4377
4362
|
if (dirty[0] &
|
|
4378
4363
|
/*options*/
|
|
4379
|
-
1024 && t0_value !== (t0_value =
|
|
4364
|
+
1024 && t0_value !== (t0_value = (
|
|
4380
4365
|
/*option*/
|
|
4381
|
-
ctx[
|
|
4366
|
+
ctx[39].label ||
|
|
4367
|
+
/*option*/
|
|
4368
|
+
ctx[39].value) + "")) set_data(t0, t0_value);
|
|
4382
4369
|
|
|
4383
4370
|
if (dirty[0] &
|
|
4384
4371
|
/*options*/
|
|
4385
4372
|
1024 && li_aria_label_value !== (li_aria_label_value =
|
|
4386
4373
|
/*option*/
|
|
4387
|
-
ctx[
|
|
4374
|
+
ctx[39].label ||
|
|
4388
4375
|
/*option*/
|
|
4389
|
-
ctx[
|
|
4376
|
+
ctx[39].value)) {
|
|
4390
4377
|
attr(li, "aria-label", li_aria_label_value);
|
|
4391
4378
|
}
|
|
4392
4379
|
|
|
@@ -4394,24 +4381,16 @@ function create_each_block$4(key_1, ctx) {
|
|
|
4394
4381
|
/*options*/
|
|
4395
4382
|
1024 && li_data_testid_value !== (li_data_testid_value = `${
|
|
4396
4383
|
/*option*/
|
|
4397
|
-
ctx[
|
|
4384
|
+
ctx[39].value}-dropdown-item`)) {
|
|
4398
4385
|
attr(li, "data-testid", li_data_testid_value);
|
|
4399
4386
|
}
|
|
4400
4387
|
|
|
4401
4388
|
if (dirty[0] &
|
|
4402
|
-
/*
|
|
4403
|
-
|
|
4404
|
-
/*index*/
|
|
4405
|
-
ctx[38])) {
|
|
4406
|
-
attr(li, "data-index", li_data_index_value);
|
|
4407
|
-
}
|
|
4408
|
-
|
|
4409
|
-
if (dirty[0] &
|
|
4410
|
-
/*options, highlightedIndex*/
|
|
4411
|
-
9216) {
|
|
4389
|
+
/*highlightedIndex*/
|
|
4390
|
+
8192) {
|
|
4412
4391
|
toggle_class(li, "goa-dropdown-option--tabbed",
|
|
4413
4392
|
/*index*/
|
|
4414
|
-
ctx[
|
|
4393
|
+
ctx[41] ===
|
|
4415
4394
|
/*highlightedIndex*/
|
|
4416
4395
|
ctx[13]);
|
|
4417
4396
|
}
|
|
@@ -4423,7 +4402,7 @@ function create_each_block$4(key_1, ctx) {
|
|
|
4423
4402
|
/*_values*/
|
|
4424
4403
|
ctx[9].includes(
|
|
4425
4404
|
/*option*/
|
|
4426
|
-
ctx[
|
|
4405
|
+
ctx[39].value));
|
|
4427
4406
|
}
|
|
4428
4407
|
},
|
|
4429
4408
|
|
|
@@ -4448,8 +4427,6 @@ function create_fragment$q(ctx) {
|
|
|
4448
4427
|
let ul;
|
|
4449
4428
|
let slot;
|
|
4450
4429
|
let t2;
|
|
4451
|
-
let each_blocks = [];
|
|
4452
|
-
let each_1_lookup = new Map();
|
|
4453
4430
|
let ul_style_value;
|
|
4454
4431
|
let div1_style_value;
|
|
4455
4432
|
let mounted;
|
|
@@ -4460,15 +4437,10 @@ function create_fragment$q(ctx) {
|
|
|
4460
4437
|
let each_value =
|
|
4461
4438
|
/*options*/
|
|
4462
4439
|
ctx[10];
|
|
4463
|
-
|
|
4464
|
-
const get_key = ctx =>
|
|
4465
|
-
/*option*/
|
|
4466
|
-
ctx[36].value;
|
|
4440
|
+
let each_blocks = [];
|
|
4467
4441
|
|
|
4468
4442
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
4469
|
-
|
|
4470
|
-
let key = get_key(child_ctx);
|
|
4471
|
-
each_1_lookup.set(key, each_blocks[i] = create_each_block$4(key, child_ctx));
|
|
4443
|
+
each_blocks[i] = create_each_block$4(get_each_context$4(ctx, each_value, i));
|
|
4472
4444
|
}
|
|
4473
4445
|
|
|
4474
4446
|
return {
|
|
@@ -4656,7 +4628,25 @@ function create_fragment$q(ctx) {
|
|
|
4656
4628
|
each_value =
|
|
4657
4629
|
/*options*/
|
|
4658
4630
|
ctx[10];
|
|
4659
|
-
|
|
4631
|
+
let i;
|
|
4632
|
+
|
|
4633
|
+
for (i = 0; i < each_value.length; i += 1) {
|
|
4634
|
+
const child_ctx = get_each_context$4(ctx, each_value, i);
|
|
4635
|
+
|
|
4636
|
+
if (each_blocks[i]) {
|
|
4637
|
+
each_blocks[i].p(child_ctx, dirty);
|
|
4638
|
+
} else {
|
|
4639
|
+
each_blocks[i] = create_each_block$4(child_ctx);
|
|
4640
|
+
each_blocks[i].c();
|
|
4641
|
+
each_blocks[i].m(ul, null);
|
|
4642
|
+
}
|
|
4643
|
+
}
|
|
4644
|
+
|
|
4645
|
+
for (; i < each_blocks.length; i += 1) {
|
|
4646
|
+
each_blocks[i].d(1);
|
|
4647
|
+
}
|
|
4648
|
+
|
|
4649
|
+
each_blocks.length = each_value.length;
|
|
4660
4650
|
}
|
|
4661
4651
|
|
|
4662
4652
|
if (dirty[0] &
|
|
@@ -4700,13 +4690,9 @@ function create_fragment$q(ctx) {
|
|
|
4700
4690
|
d(detaching) {
|
|
4701
4691
|
if (detaching) detach(div1);
|
|
4702
4692
|
if (if_block) if_block.d();
|
|
4703
|
-
|
|
4704
|
-
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
4705
|
-
each_blocks[i].d();
|
|
4706
|
-
}
|
|
4693
|
+
destroy_each(each_blocks, detaching);
|
|
4707
4694
|
/*ul_binding*/
|
|
4708
4695
|
|
|
4709
|
-
|
|
4710
4696
|
ctx[23](null);
|
|
4711
4697
|
/*div1_binding*/
|
|
4712
4698
|
|
|
@@ -4770,15 +4756,42 @@ function instance$o($$self, $$props, $$invalidate) {
|
|
|
4770
4756
|
let menuEl;
|
|
4771
4757
|
let ctx; // Hooks
|
|
4772
4758
|
|
|
4773
|
-
onMount(
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
-
|
|
4777
|
-
|
|
4759
|
+
onMount(() => {
|
|
4760
|
+
const maxAttempts = 10;
|
|
4761
|
+
let attempts = 0;
|
|
4762
|
+
const fn = setInterval(async () => {
|
|
4763
|
+
attempts++;
|
|
4764
|
+
|
|
4765
|
+
if (name && el) {
|
|
4766
|
+
addEventListeners();
|
|
4767
|
+
parseValues();
|
|
4768
|
+
bindContext();
|
|
4769
|
+
clearInterval(fn);
|
|
4770
|
+
}
|
|
4778
4771
|
|
|
4772
|
+
if (attempts > maxAttempts) {
|
|
4773
|
+
console.error("goa-dropdown: missing the required `name` attribute. It must match the children's name attribute.");
|
|
4774
|
+
clearInterval(fn);
|
|
4775
|
+
}
|
|
4776
|
+
}, 10);
|
|
4777
|
+
});
|
|
4778
|
+
onDestroy(() => {
|
|
4779
|
+
removeEventListeners();
|
|
4780
|
+
deleteContext(name);
|
|
4781
|
+
}); // Functions
|
|
4782
|
+
|
|
4783
|
+
function addEventListeners() {
|
|
4779
4784
|
el.addEventListener("focus", onFocus, true);
|
|
4780
|
-
el.addEventListener("blur", onBlur, true);
|
|
4785
|
+
el.addEventListener("blur", onBlur, true);
|
|
4786
|
+
}
|
|
4781
4787
|
|
|
4788
|
+
function removeEventListeners() {
|
|
4789
|
+
el.removeEventListener("focus", onFocus, true);
|
|
4790
|
+
el.removeEventListener("blur", onBlur, true);
|
|
4791
|
+
}
|
|
4792
|
+
|
|
4793
|
+
function parseValues() {
|
|
4794
|
+
// parse and convert values to strings to avoid later type comparison issues
|
|
4782
4795
|
let rawValue;
|
|
4783
4796
|
|
|
4784
4797
|
try {
|
|
@@ -4790,13 +4803,7 @@ function instance$o($$self, $$props, $$invalidate) {
|
|
|
4790
4803
|
const rawValues = typeof rawValue === "object" ? rawValue : [rawValue]; // convert all values to strings to avoid later type comparison issues
|
|
4791
4804
|
|
|
4792
4805
|
$$invalidate(9, _values = rawValues.map(val => `${val}`));
|
|
4793
|
-
|
|
4794
|
-
});
|
|
4795
|
-
onDestroy(() => {
|
|
4796
|
-
el.removeEventListener("focus", onFocus, true);
|
|
4797
|
-
el.removeEventListener("blur", onBlur, true);
|
|
4798
|
-
deleteContext(name);
|
|
4799
|
-
}); // Functions
|
|
4806
|
+
}
|
|
4800
4807
|
|
|
4801
4808
|
function bindContext() {
|
|
4802
4809
|
ctx = createContext(name);
|
|
@@ -5173,21 +5180,25 @@ function instance$n($$self, $$props, $$invalidate) {
|
|
|
5173
5180
|
label = ""
|
|
5174
5181
|
} = $$props; // private
|
|
5175
5182
|
|
|
5176
|
-
let ctx;
|
|
5183
|
+
let ctx;
|
|
5184
|
+
onMount(() => {
|
|
5185
|
+
const fn = setInterval(() => {
|
|
5186
|
+
if (name && value) {
|
|
5187
|
+
ctx = getContext(name);
|
|
5177
5188
|
|
|
5178
|
-
|
|
5179
|
-
|
|
5180
|
-
|
|
5181
|
-
return;
|
|
5182
|
-
}
|
|
5189
|
+
if (!ctx) {
|
|
5190
|
+
return;
|
|
5191
|
+
}
|
|
5183
5192
|
|
|
5184
|
-
|
|
5185
|
-
|
|
5186
|
-
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
|
|
5190
|
-
|
|
5193
|
+
ctx.notify({
|
|
5194
|
+
type: BIND$1,
|
|
5195
|
+
name,
|
|
5196
|
+
label,
|
|
5197
|
+
value
|
|
5198
|
+
});
|
|
5199
|
+
clearInterval(fn);
|
|
5200
|
+
}
|
|
5201
|
+
}, 10);
|
|
5191
5202
|
});
|
|
5192
5203
|
|
|
5193
5204
|
$$self.$$set = $$props => {
|
|
@@ -9192,7 +9203,7 @@ function get_each_context$3(ctx, list, i) {
|
|
|
9192
9203
|
const child_ctx = ctx.slice();
|
|
9193
9204
|
child_ctx[14] = list[i];
|
|
9194
9205
|
return child_ctx;
|
|
9195
|
-
} // (
|
|
9206
|
+
} // (63:2) {#each options as option (option.value) }
|
|
9196
9207
|
|
|
9197
9208
|
|
|
9198
9209
|
function create_each_block$3(key_1, ctx) {
|
|
@@ -9487,20 +9498,29 @@ function instance$d($$self, $$props, $$invalidate) {
|
|
|
9487
9498
|
let ctx;
|
|
9488
9499
|
let el;
|
|
9489
9500
|
onMount(() => {
|
|
9490
|
-
|
|
9491
|
-
|
|
9492
|
-
|
|
9493
|
-
|
|
9494
|
-
|
|
9495
|
-
|
|
9496
|
-
|
|
9497
|
-
|
|
9498
|
-
|
|
9499
|
-
|
|
9500
|
-
|
|
9501
|
+
const maxAttempts = 10;
|
|
9502
|
+
let attempts = 0;
|
|
9503
|
+
const fn = setInterval(async () => {
|
|
9504
|
+
attempts++;
|
|
9505
|
+
|
|
9506
|
+
if (name) {
|
|
9507
|
+
ctx = createContext(name);
|
|
9508
|
+
ctx.subscribe(msg => {
|
|
9509
|
+
switch (msg === null || msg === void 0 ? void 0 : msg.type) {
|
|
9510
|
+
case BIND:
|
|
9511
|
+
{
|
|
9512
|
+
$$invalidate(4, options = [...options, msg]);
|
|
9513
|
+
}
|
|
9501
9514
|
}
|
|
9515
|
+
});
|
|
9516
|
+
clearInterval(fn);
|
|
9502
9517
|
}
|
|
9503
|
-
|
|
9518
|
+
|
|
9519
|
+
if (attempts > maxAttempts) {
|
|
9520
|
+
console.error("goa-radio: missing the required `name` attribute. It must match the children's name attribute.");
|
|
9521
|
+
clearInterval(fn);
|
|
9522
|
+
}
|
|
9523
|
+
}, 10);
|
|
9504
9524
|
});
|
|
9505
9525
|
|
|
9506
9526
|
function onChange(newValue) {
|
|
@@ -9683,18 +9703,32 @@ function instance$c($$self, $$props, $$invalidate) {
|
|
|
9683
9703
|
name
|
|
9684
9704
|
} = $$props;
|
|
9685
9705
|
let ctx;
|
|
9686
|
-
onMount(
|
|
9687
|
-
|
|
9688
|
-
|
|
9689
|
-
|
|
9690
|
-
|
|
9706
|
+
onMount(() => {
|
|
9707
|
+
const maxAttempts = 10;
|
|
9708
|
+
let attempts = 0;
|
|
9709
|
+
const fn = setInterval(() => {
|
|
9710
|
+
attempts++;
|
|
9691
9711
|
|
|
9692
|
-
|
|
9693
|
-
|
|
9694
|
-
|
|
9695
|
-
|
|
9696
|
-
|
|
9697
|
-
|
|
9712
|
+
if (name) {
|
|
9713
|
+
ctx = getContext(name);
|
|
9714
|
+
|
|
9715
|
+
if (!ctx) {
|
|
9716
|
+
return;
|
|
9717
|
+
}
|
|
9718
|
+
|
|
9719
|
+
ctx.notify({
|
|
9720
|
+
type: BIND,
|
|
9721
|
+
value,
|
|
9722
|
+
label
|
|
9723
|
+
});
|
|
9724
|
+
clearInterval(fn);
|
|
9725
|
+
}
|
|
9726
|
+
|
|
9727
|
+
if (attempts > maxAttempts) {
|
|
9728
|
+
console.error("goa-radio-item: missing the required `name` attribute. It must match the parent's name attribute.");
|
|
9729
|
+
clearInterval(fn);
|
|
9730
|
+
}
|
|
9731
|
+
}, 10);
|
|
9698
9732
|
});
|
|
9699
9733
|
|
|
9700
9734
|
$$self.$$set = $$props => {
|
package/react-components.umd.js
CHANGED
|
@@ -45,20 +45,6 @@
|
|
|
45
45
|
|
|
46
46
|
function noop() {}
|
|
47
47
|
|
|
48
|
-
const _getContext = _async(function (name, attempts) {
|
|
49
|
-
if (attempts > 10) {
|
|
50
|
-
throw new Error(`Could not find context ${name}`);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
return stores[name] ? stores[name] : _call(tick, function () {
|
|
54
|
-
return _getContext(name, attempts + 1);
|
|
55
|
-
});
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
const getContext = function getContext(name) {
|
|
59
|
-
return _await(_getContext(name, 0));
|
|
60
|
-
};
|
|
61
|
-
|
|
62
48
|
const identity = x => x;
|
|
63
49
|
|
|
64
50
|
function assign(tar, src) {
|
|
@@ -2169,7 +2155,7 @@
|
|
|
2169
2155
|
function instance$w($$self, $$props, $$invalidate) {
|
|
2170
2156
|
let isDisabled;
|
|
2171
2157
|
let isButtonDark;
|
|
2172
|
-
const BUTTON_TYPES = ["primary", "secondary", "tertiary", "start"];
|
|
2158
|
+
const BUTTON_TYPES = ["primary", "submit", "secondary", "tertiary", "start"];
|
|
2173
2159
|
const SIZES = ["normal", "compact"];
|
|
2174
2160
|
const VARIANTS = ["normal", "destructive"]; // type check functions
|
|
2175
2161
|
|
|
@@ -2255,7 +2241,7 @@
|
|
|
2255
2241
|
constructor(options) {
|
|
2256
2242
|
super();
|
|
2257
2243
|
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:inline-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,
|
|
2258
|
-
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.destructive{color:var(--color-white);background:var(--goa-color-status-emergency);border-color:var(--goa-color-status-emergency)}.primary.destructive:hover{background:var(--goa-color-status-emergency-dark);border-color:var(--goa-color-status-emergency-dark)}.primary.destructive:focus,.primary.destructive:active{background:var(--goa-color-status-emergency-dark);border-color:var(--goa-color-status-emergency-dark)}.secondary.destructive{color:var(--goa-color-status-emergency);border-color:var(--goa-color-status-emergency);background:var(--color-white)}.secondary.destructive:hover{border-color:var(--goa-color-status-emergency-dark);color:var(--goa-color-status-emergency-dark);background:var(--color-white)}.secondary.destructive:focus,.secondary.destructive:active{color:var(--goa-color-status-emergency-dark);border-color:var(--goa-color-status-emergency-dark);background:var(--color-white)}.tertiary.destructive{color:var(--goa-color-status-emergency);border-color:var(--color-gray-200);background:var(--color-white)}.tertiary.destructive:hover{border-color:var(--goa-color-status-emergency-dark);color:var(--goa-color-status-emergency-dark);background:var(--color-white)}.tertiary.destructive:focus,.tertiary.destructive:active{color:var(--goa-color-status-emergency-dark);border-color:var(--goa-color-status-emergency-dark);background:var(--color-white)}</style>`;
|
|
2244
|
+
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.submit,button.primary{border:2px solid var(--goa-color-interactive);background:var(--goa-color-interactive);color:var(--goa-color-text-light)}button.start:hover,button.submit:hover,button.primary:hover{border-color:var(--goa-color-interactive--hover);background:var(--goa-color-interactive--hover)}button.start:focus,button.start:active,button.submit:focus,button.submit: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}.submit.destructive,.primary.destructive{color:var(--color-white);background:var(--goa-color-status-emergency);border-color:var(--goa-color-status-emergency)}.submit.destructive:hover,.primary.destructive:hover{background:var(--goa-color-status-emergency-dark);border-color:var(--goa-color-status-emergency-dark)}.submit.destructive:focus,.primary.destructive:focus,.primary.destructive:active{background:var(--goa-color-status-emergency-dark);border-color:var(--goa-color-status-emergency-dark)}.secondary.destructive{color:var(--goa-color-status-emergency);border-color:var(--goa-color-status-emergency);background:var(--color-white)}.secondary.destructive:hover{border-color:var(--goa-color-status-emergency-dark);color:var(--goa-color-status-emergency-dark);background:var(--color-white)}.secondary.destructive:focus,.secondary.destructive:active{color:var(--goa-color-status-emergency-dark);border-color:var(--goa-color-status-emergency-dark);background:var(--color-white)}.tertiary.destructive{color:var(--goa-color-status-emergency);border-color:var(--color-gray-200);background:var(--color-white)}.tertiary.destructive:hover{border-color:var(--goa-color-status-emergency-dark);color:var(--goa-color-status-emergency-dark);background:var(--color-white)}.tertiary.destructive:focus,.tertiary.destructive:active{color:var(--goa-color-status-emergency-dark);border-color:var(--goa-color-status-emergency-dark);background:var(--color-white)}</style>`;
|
|
2259
2245
|
init(this, {
|
|
2260
2246
|
target: this.shadowRoot,
|
|
2261
2247
|
props: attribute_to_object(this.attributes),
|
|
@@ -4256,7 +4242,7 @@
|
|
|
4256
4242
|
|
|
4257
4243
|
const stores = {};
|
|
4258
4244
|
|
|
4259
|
-
class
|
|
4245
|
+
class ContextStoreInternal {
|
|
4260
4246
|
constructor() {
|
|
4261
4247
|
this.store = writable();
|
|
4262
4248
|
}
|
|
@@ -4274,11 +4260,15 @@
|
|
|
4274
4260
|
}
|
|
4275
4261
|
|
|
4276
4262
|
function createContext(name) {
|
|
4277
|
-
const ctx = new
|
|
4263
|
+
const ctx = new ContextStoreInternal();
|
|
4278
4264
|
stores[name] = ctx;
|
|
4279
4265
|
return ctx;
|
|
4280
4266
|
}
|
|
4281
4267
|
|
|
4268
|
+
function getContext(name) {
|
|
4269
|
+
return stores[name];
|
|
4270
|
+
}
|
|
4271
|
+
|
|
4282
4272
|
function deleteContext(name) {
|
|
4283
4273
|
const store = stores[name];
|
|
4284
4274
|
if (!store) return;
|
|
@@ -4290,10 +4280,10 @@
|
|
|
4290
4280
|
|
|
4291
4281
|
function get_each_context$4(ctx, list, i) {
|
|
4292
4282
|
const child_ctx = ctx.slice();
|
|
4293
|
-
child_ctx[
|
|
4294
|
-
child_ctx[
|
|
4283
|
+
child_ctx[39] = list[i];
|
|
4284
|
+
child_ctx[41] = i;
|
|
4295
4285
|
return child_ctx;
|
|
4296
|
-
} // (
|
|
4286
|
+
} // (198:2) {#if isMenuVisible}
|
|
4297
4287
|
|
|
4298
4288
|
|
|
4299
4289
|
function create_if_block$d(ctx) {
|
|
@@ -4338,14 +4328,16 @@
|
|
|
4338
4328
|
}
|
|
4339
4329
|
|
|
4340
4330
|
};
|
|
4341
|
-
} // (
|
|
4331
|
+
} // (234:4) {#each options as option, index}
|
|
4342
4332
|
|
|
4343
4333
|
|
|
4344
|
-
function create_each_block$4(
|
|
4334
|
+
function create_each_block$4(ctx) {
|
|
4345
4335
|
let li;
|
|
4346
|
-
let t0_value =
|
|
4336
|
+
let t0_value = (
|
|
4337
|
+
/*option*/
|
|
4338
|
+
ctx[39].label ||
|
|
4347
4339
|
/*option*/
|
|
4348
|
-
ctx[
|
|
4340
|
+
ctx[39].value) + "";
|
|
4349
4341
|
let t0;
|
|
4350
4342
|
let t1;
|
|
4351
4343
|
let li_aria_label_value;
|
|
@@ -4360,43 +4352,39 @@
|
|
|
4360
4352
|
/*click_handler*/
|
|
4361
4353
|
ctx[22](
|
|
4362
4354
|
/*option*/
|
|
4363
|
-
ctx[
|
|
4355
|
+
ctx[39])
|
|
4364
4356
|
);
|
|
4365
4357
|
}
|
|
4366
4358
|
|
|
4367
4359
|
return {
|
|
4368
|
-
key: key_1,
|
|
4369
|
-
first: null,
|
|
4370
|
-
|
|
4371
4360
|
c() {
|
|
4372
4361
|
li = element("li");
|
|
4373
4362
|
t0 = text(t0_value);
|
|
4374
4363
|
t1 = space();
|
|
4375
4364
|
attr(li, "aria-label", li_aria_label_value =
|
|
4376
4365
|
/*option*/
|
|
4377
|
-
ctx[
|
|
4366
|
+
ctx[39].label ||
|
|
4378
4367
|
/*option*/
|
|
4379
|
-
ctx[
|
|
4368
|
+
ctx[39].value);
|
|
4380
4369
|
attr(li, "data-testid", li_data_testid_value = `${
|
|
4381
4370
|
/*option*/
|
|
4382
|
-
ctx[
|
|
4371
|
+
ctx[39].value}-dropdown-item`);
|
|
4383
4372
|
attr(li, "data-index", li_data_index_value =
|
|
4384
4373
|
/*index*/
|
|
4385
|
-
ctx[
|
|
4374
|
+
ctx[41]);
|
|
4386
4375
|
attr(li, "class", "goa-dropdown-option");
|
|
4387
4376
|
attr(li, "style", li_style_value = `display: ${"block"}`);
|
|
4388
4377
|
toggle_class(li, "goa-dropdown-option--disabled", false);
|
|
4389
4378
|
toggle_class(li, "goa-dropdown-option--tabbed",
|
|
4390
4379
|
/*index*/
|
|
4391
|
-
ctx[
|
|
4380
|
+
ctx[41] ===
|
|
4392
4381
|
/*highlightedIndex*/
|
|
4393
4382
|
ctx[13]);
|
|
4394
4383
|
toggle_class(li, "goa-dropdown-option--selected",
|
|
4395
4384
|
/*_values*/
|
|
4396
4385
|
ctx[9].includes(
|
|
4397
4386
|
/*option*/
|
|
4398
|
-
ctx[
|
|
4399
|
-
this.first = li;
|
|
4387
|
+
ctx[39].value));
|
|
4400
4388
|
},
|
|
4401
4389
|
|
|
4402
4390
|
m(target, anchor) {
|
|
@@ -4414,17 +4402,19 @@
|
|
|
4414
4402
|
ctx = new_ctx;
|
|
4415
4403
|
if (dirty[0] &
|
|
4416
4404
|
/*options*/
|
|
4417
|
-
1024 && t0_value !== (t0_value =
|
|
4405
|
+
1024 && t0_value !== (t0_value = (
|
|
4406
|
+
/*option*/
|
|
4407
|
+
ctx[39].label ||
|
|
4418
4408
|
/*option*/
|
|
4419
|
-
ctx[
|
|
4409
|
+
ctx[39].value) + "")) set_data(t0, t0_value);
|
|
4420
4410
|
|
|
4421
4411
|
if (dirty[0] &
|
|
4422
4412
|
/*options*/
|
|
4423
4413
|
1024 && li_aria_label_value !== (li_aria_label_value =
|
|
4424
4414
|
/*option*/
|
|
4425
|
-
ctx[
|
|
4415
|
+
ctx[39].label ||
|
|
4426
4416
|
/*option*/
|
|
4427
|
-
ctx[
|
|
4417
|
+
ctx[39].value)) {
|
|
4428
4418
|
attr(li, "aria-label", li_aria_label_value);
|
|
4429
4419
|
}
|
|
4430
4420
|
|
|
@@ -4432,24 +4422,16 @@
|
|
|
4432
4422
|
/*options*/
|
|
4433
4423
|
1024 && li_data_testid_value !== (li_data_testid_value = `${
|
|
4434
4424
|
/*option*/
|
|
4435
|
-
ctx[
|
|
4425
|
+
ctx[39].value}-dropdown-item`)) {
|
|
4436
4426
|
attr(li, "data-testid", li_data_testid_value);
|
|
4437
4427
|
}
|
|
4438
4428
|
|
|
4439
4429
|
if (dirty[0] &
|
|
4440
|
-
/*
|
|
4441
|
-
|
|
4442
|
-
/*index*/
|
|
4443
|
-
ctx[38])) {
|
|
4444
|
-
attr(li, "data-index", li_data_index_value);
|
|
4445
|
-
}
|
|
4446
|
-
|
|
4447
|
-
if (dirty[0] &
|
|
4448
|
-
/*options, highlightedIndex*/
|
|
4449
|
-
9216) {
|
|
4430
|
+
/*highlightedIndex*/
|
|
4431
|
+
8192) {
|
|
4450
4432
|
toggle_class(li, "goa-dropdown-option--tabbed",
|
|
4451
4433
|
/*index*/
|
|
4452
|
-
ctx[
|
|
4434
|
+
ctx[41] ===
|
|
4453
4435
|
/*highlightedIndex*/
|
|
4454
4436
|
ctx[13]);
|
|
4455
4437
|
}
|
|
@@ -4461,7 +4443,7 @@
|
|
|
4461
4443
|
/*_values*/
|
|
4462
4444
|
ctx[9].includes(
|
|
4463
4445
|
/*option*/
|
|
4464
|
-
ctx[
|
|
4446
|
+
ctx[39].value));
|
|
4465
4447
|
}
|
|
4466
4448
|
},
|
|
4467
4449
|
|
|
@@ -4486,8 +4468,6 @@
|
|
|
4486
4468
|
let ul;
|
|
4487
4469
|
let slot;
|
|
4488
4470
|
let t2;
|
|
4489
|
-
let each_blocks = [];
|
|
4490
|
-
let each_1_lookup = new Map();
|
|
4491
4471
|
let ul_style_value;
|
|
4492
4472
|
let div1_style_value;
|
|
4493
4473
|
let mounted;
|
|
@@ -4498,15 +4478,10 @@
|
|
|
4498
4478
|
let each_value =
|
|
4499
4479
|
/*options*/
|
|
4500
4480
|
ctx[10];
|
|
4501
|
-
|
|
4502
|
-
const get_key = ctx =>
|
|
4503
|
-
/*option*/
|
|
4504
|
-
ctx[36].value;
|
|
4481
|
+
let each_blocks = [];
|
|
4505
4482
|
|
|
4506
4483
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
4507
|
-
|
|
4508
|
-
let key = get_key(child_ctx);
|
|
4509
|
-
each_1_lookup.set(key, each_blocks[i] = create_each_block$4(key, child_ctx));
|
|
4484
|
+
each_blocks[i] = create_each_block$4(get_each_context$4(ctx, each_value, i));
|
|
4510
4485
|
}
|
|
4511
4486
|
|
|
4512
4487
|
return {
|
|
@@ -4694,7 +4669,25 @@
|
|
|
4694
4669
|
each_value =
|
|
4695
4670
|
/*options*/
|
|
4696
4671
|
ctx[10];
|
|
4697
|
-
|
|
4672
|
+
let i;
|
|
4673
|
+
|
|
4674
|
+
for (i = 0; i < each_value.length; i += 1) {
|
|
4675
|
+
const child_ctx = get_each_context$4(ctx, each_value, i);
|
|
4676
|
+
|
|
4677
|
+
if (each_blocks[i]) {
|
|
4678
|
+
each_blocks[i].p(child_ctx, dirty);
|
|
4679
|
+
} else {
|
|
4680
|
+
each_blocks[i] = create_each_block$4(child_ctx);
|
|
4681
|
+
each_blocks[i].c();
|
|
4682
|
+
each_blocks[i].m(ul, null);
|
|
4683
|
+
}
|
|
4684
|
+
}
|
|
4685
|
+
|
|
4686
|
+
for (; i < each_blocks.length; i += 1) {
|
|
4687
|
+
each_blocks[i].d(1);
|
|
4688
|
+
}
|
|
4689
|
+
|
|
4690
|
+
each_blocks.length = each_value.length;
|
|
4698
4691
|
}
|
|
4699
4692
|
|
|
4700
4693
|
if (dirty[0] &
|
|
@@ -4738,13 +4731,9 @@
|
|
|
4738
4731
|
d(detaching) {
|
|
4739
4732
|
if (detaching) detach(div1);
|
|
4740
4733
|
if (if_block) if_block.d();
|
|
4741
|
-
|
|
4742
|
-
for (let i = 0; i < each_blocks.length; i += 1) {
|
|
4743
|
-
each_blocks[i].d();
|
|
4744
|
-
}
|
|
4734
|
+
destroy_each(each_blocks, detaching);
|
|
4745
4735
|
/*ul_binding*/
|
|
4746
4736
|
|
|
4747
|
-
|
|
4748
4737
|
ctx[23](null);
|
|
4749
4738
|
/*div1_binding*/
|
|
4750
4739
|
|
|
@@ -4824,15 +4813,44 @@
|
|
|
4824
4813
|
let menuEl;
|
|
4825
4814
|
let ctx; // Hooks
|
|
4826
4815
|
|
|
4827
|
-
onMount(
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4816
|
+
onMount(() => {
|
|
4817
|
+
const maxAttempts = 10;
|
|
4818
|
+
let attempts = 0;
|
|
4819
|
+
const fn = setInterval(_async(function () {
|
|
4820
|
+
attempts++;
|
|
4821
|
+
|
|
4822
|
+
if (name && el) {
|
|
4823
|
+
addEventListeners();
|
|
4824
|
+
parseValues();
|
|
4825
|
+
bindContext();
|
|
4826
|
+
clearInterval(fn);
|
|
4827
|
+
}
|
|
4828
|
+
|
|
4829
|
+
if (attempts > maxAttempts) {
|
|
4830
|
+
console.error("goa-dropdown: missing the required `name` attribute. It must match the children's name attribute.");
|
|
4831
|
+
clearInterval(fn);
|
|
4832
|
+
}
|
|
4833
|
+
|
|
4834
|
+
return _await();
|
|
4835
|
+
}), 10);
|
|
4836
|
+
});
|
|
4837
|
+
onDestroy(() => {
|
|
4838
|
+
removeEventListeners();
|
|
4839
|
+
deleteContext(name);
|
|
4840
|
+
}); // Functions
|
|
4832
4841
|
|
|
4842
|
+
function addEventListeners() {
|
|
4833
4843
|
el.addEventListener("focus", onFocus, true);
|
|
4834
|
-
el.addEventListener("blur", onBlur, true);
|
|
4844
|
+
el.addEventListener("blur", onBlur, true);
|
|
4845
|
+
}
|
|
4835
4846
|
|
|
4847
|
+
function removeEventListeners() {
|
|
4848
|
+
el.removeEventListener("focus", onFocus, true);
|
|
4849
|
+
el.removeEventListener("blur", onBlur, true);
|
|
4850
|
+
}
|
|
4851
|
+
|
|
4852
|
+
function parseValues() {
|
|
4853
|
+
// parse and convert values to strings to avoid later type comparison issues
|
|
4836
4854
|
let rawValue;
|
|
4837
4855
|
|
|
4838
4856
|
try {
|
|
@@ -4844,14 +4862,7 @@
|
|
|
4844
4862
|
const rawValues = typeof rawValue === "object" ? rawValue : [rawValue]; // convert all values to strings to avoid later type comparison issues
|
|
4845
4863
|
|
|
4846
4864
|
$$invalidate(9, _values = rawValues.map(val => `${val}`));
|
|
4847
|
-
|
|
4848
|
-
return _await();
|
|
4849
|
-
}));
|
|
4850
|
-
onDestroy(() => {
|
|
4851
|
-
el.removeEventListener("focus", onFocus, true);
|
|
4852
|
-
el.removeEventListener("blur", onBlur, true);
|
|
4853
|
-
deleteContext(name);
|
|
4854
|
-
}); // Functions
|
|
4865
|
+
}
|
|
4855
4866
|
|
|
4856
4867
|
function bindContext() {
|
|
4857
4868
|
ctx = createContext(name);
|
|
@@ -5213,24 +5224,26 @@
|
|
|
5213
5224
|
label = ""
|
|
5214
5225
|
} = $$props; // private
|
|
5215
5226
|
|
|
5216
|
-
let ctx;
|
|
5227
|
+
let ctx;
|
|
5228
|
+
onMount(() => {
|
|
5229
|
+
const fn = setInterval(() => {
|
|
5230
|
+
if (name && value) {
|
|
5231
|
+
ctx = getContext(name);
|
|
5217
5232
|
|
|
5218
|
-
|
|
5219
|
-
|
|
5220
|
-
|
|
5221
|
-
return;
|
|
5222
|
-
}
|
|
5233
|
+
if (!ctx) {
|
|
5234
|
+
return;
|
|
5235
|
+
}
|
|
5223
5236
|
|
|
5224
|
-
|
|
5225
|
-
|
|
5226
|
-
|
|
5227
|
-
|
|
5228
|
-
|
|
5229
|
-
|
|
5230
|
-
|
|
5231
|
-
}
|
|
5232
|
-
});
|
|
5233
|
-
})
|
|
5237
|
+
ctx.notify({
|
|
5238
|
+
type: BIND$1,
|
|
5239
|
+
name,
|
|
5240
|
+
label,
|
|
5241
|
+
value
|
|
5242
|
+
});
|
|
5243
|
+
clearInterval(fn);
|
|
5244
|
+
}
|
|
5245
|
+
}, 10);
|
|
5246
|
+
});
|
|
5234
5247
|
|
|
5235
5248
|
$$self.$$set = $$props => {
|
|
5236
5249
|
if ('name' in $$props) $$invalidate(0, name = $$props.name);
|
|
@@ -9235,7 +9248,7 @@
|
|
|
9235
9248
|
const child_ctx = ctx.slice();
|
|
9236
9249
|
child_ctx[14] = list[i];
|
|
9237
9250
|
return child_ctx;
|
|
9238
|
-
} // (
|
|
9251
|
+
} // (63:2) {#each options as option (option.value) }
|
|
9239
9252
|
|
|
9240
9253
|
|
|
9241
9254
|
function create_each_block$3(key_1, ctx) {
|
|
@@ -9530,20 +9543,31 @@
|
|
|
9530
9543
|
let ctx;
|
|
9531
9544
|
let el;
|
|
9532
9545
|
onMount(() => {
|
|
9533
|
-
|
|
9534
|
-
|
|
9535
|
-
|
|
9536
|
-
|
|
9537
|
-
|
|
9538
|
-
|
|
9539
|
-
|
|
9540
|
-
|
|
9541
|
-
|
|
9542
|
-
|
|
9543
|
-
|
|
9546
|
+
const maxAttempts = 10;
|
|
9547
|
+
let attempts = 0;
|
|
9548
|
+
const fn = setInterval(_async(function () {
|
|
9549
|
+
attempts++;
|
|
9550
|
+
|
|
9551
|
+
if (name) {
|
|
9552
|
+
ctx = createContext(name);
|
|
9553
|
+
ctx.subscribe(msg => {
|
|
9554
|
+
switch (msg === null || msg === void 0 ? void 0 : msg.type) {
|
|
9555
|
+
case BIND:
|
|
9556
|
+
{
|
|
9557
|
+
$$invalidate(4, options = [...options, msg]);
|
|
9558
|
+
}
|
|
9544
9559
|
}
|
|
9560
|
+
});
|
|
9561
|
+
clearInterval(fn);
|
|
9545
9562
|
}
|
|
9546
|
-
|
|
9563
|
+
|
|
9564
|
+
if (attempts > maxAttempts) {
|
|
9565
|
+
console.error("goa-radio: missing the required `name` attribute. It must match the children's name attribute.");
|
|
9566
|
+
clearInterval(fn);
|
|
9567
|
+
}
|
|
9568
|
+
|
|
9569
|
+
return _await();
|
|
9570
|
+
}), 10);
|
|
9547
9571
|
});
|
|
9548
9572
|
|
|
9549
9573
|
function onChange(newValue) {
|
|
@@ -9726,21 +9750,33 @@
|
|
|
9726
9750
|
name
|
|
9727
9751
|
} = $$props;
|
|
9728
9752
|
let ctx;
|
|
9729
|
-
onMount(
|
|
9730
|
-
|
|
9731
|
-
|
|
9732
|
-
|
|
9733
|
-
|
|
9753
|
+
onMount(() => {
|
|
9754
|
+
const maxAttempts = 10;
|
|
9755
|
+
let attempts = 0;
|
|
9756
|
+
const fn = setInterval(() => {
|
|
9757
|
+
attempts++;
|
|
9734
9758
|
|
|
9735
|
-
|
|
9736
|
-
|
|
9737
|
-
|
|
9738
|
-
|
|
9739
|
-
|
|
9740
|
-
|
|
9741
|
-
|
|
9742
|
-
|
|
9743
|
-
|
|
9759
|
+
if (name) {
|
|
9760
|
+
ctx = getContext(name);
|
|
9761
|
+
|
|
9762
|
+
if (!ctx) {
|
|
9763
|
+
return;
|
|
9764
|
+
}
|
|
9765
|
+
|
|
9766
|
+
ctx.notify({
|
|
9767
|
+
type: BIND,
|
|
9768
|
+
value,
|
|
9769
|
+
label
|
|
9770
|
+
});
|
|
9771
|
+
clearInterval(fn);
|
|
9772
|
+
}
|
|
9773
|
+
|
|
9774
|
+
if (attempts > maxAttempts) {
|
|
9775
|
+
console.error("goa-radio-item: missing the required `name` attribute. It must match the parent's name attribute.");
|
|
9776
|
+
clearInterval(fn);
|
|
9777
|
+
}
|
|
9778
|
+
}, 10);
|
|
9779
|
+
});
|
|
9744
9780
|
|
|
9745
9781
|
$$self.$$set = $$props => {
|
|
9746
9782
|
if ('value' in $$props) $$invalidate(0, value = $$props.value);
|