@iroco/ui 0.13.1 → 0.15.1
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/constants.scss +1 -0
- package/lib/index.js +123 -99
- package/lib/index.min.js +55 -55
- package/lib/index.mjs +123 -99
- package/lib/index.mjs.css +292 -124
- package/package.json +4 -3
- package/scss/constants.scss +1 -0
- package/src/Alert.svelte +2 -1
- package/src/Button.svelte +18 -12
- package/src/NavBar.svelte +0 -1
- package/src/TextInput.svelte +3 -1
package/lib/index.mjs
CHANGED
|
@@ -503,19 +503,18 @@ function create_fragment$h(ctx) {
|
|
|
503
503
|
let current;
|
|
504
504
|
let mounted;
|
|
505
505
|
let dispose;
|
|
506
|
-
const default_slot_template = /*#slots*/ ctx[
|
|
507
|
-
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[
|
|
506
|
+
const default_slot_template = /*#slots*/ ctx[7].default;
|
|
507
|
+
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[6], null);
|
|
508
508
|
|
|
509
509
|
return {
|
|
510
510
|
c() {
|
|
511
511
|
button = element("button");
|
|
512
512
|
if (default_slot) default_slot.c();
|
|
513
|
-
attr(button, "id", /*id*/ ctx[
|
|
514
|
-
attr(button, "class", button_class_value = "" + (null_to_empty(`iroco-ui-button iroco-ui-button--${/*size*/ ctx[4]} iroco-ui-button--${/*kind*/ ctx[3]}`) + " svelte-
|
|
513
|
+
attr(button, "id", /*id*/ ctx[5]);
|
|
514
|
+
attr(button, "class", button_class_value = "" + (null_to_empty(`iroco-ui-button iroco-ui-button--${/*size*/ ctx[4]} iroco-ui-button--${/*kind*/ ctx[3]}`) + " svelte-5qkkwb"));
|
|
515
515
|
attr(button, "type", /*type*/ ctx[1]);
|
|
516
516
|
button.disabled = /*disabled*/ ctx[2];
|
|
517
517
|
toggle_class(button, "disabled", /*disabled*/ ctx[2]);
|
|
518
|
-
toggle_class(button, "rounded", /*rounded*/ ctx[5]);
|
|
519
518
|
},
|
|
520
519
|
m(target, anchor) {
|
|
521
520
|
insert(target, button, anchor);
|
|
@@ -524,26 +523,26 @@ function create_fragment$h(ctx) {
|
|
|
524
523
|
default_slot.m(button, null);
|
|
525
524
|
}
|
|
526
525
|
|
|
527
|
-
/*button_binding*/ ctx[
|
|
526
|
+
/*button_binding*/ ctx[9](button);
|
|
528
527
|
current = true;
|
|
529
528
|
|
|
530
529
|
if (!mounted) {
|
|
531
|
-
dispose = listen(button, "click", /*click_handler*/ ctx[
|
|
530
|
+
dispose = listen(button, "click", /*click_handler*/ ctx[8]);
|
|
532
531
|
mounted = true;
|
|
533
532
|
}
|
|
534
533
|
},
|
|
535
534
|
p(ctx, [dirty]) {
|
|
536
535
|
if (default_slot) {
|
|
537
|
-
if (default_slot.p && (!current || dirty & /*$$scope*/
|
|
538
|
-
update_slot(default_slot, default_slot_template, ctx, /*$$scope*/ ctx[
|
|
536
|
+
if (default_slot.p && (!current || dirty & /*$$scope*/ 64)) {
|
|
537
|
+
update_slot(default_slot, default_slot_template, ctx, /*$$scope*/ ctx[6], dirty, null, null);
|
|
539
538
|
}
|
|
540
539
|
}
|
|
541
540
|
|
|
542
|
-
if (!current || dirty & /*id*/
|
|
543
|
-
attr(button, "id", /*id*/ ctx[
|
|
541
|
+
if (!current || dirty & /*id*/ 32) {
|
|
542
|
+
attr(button, "id", /*id*/ ctx[5]);
|
|
544
543
|
}
|
|
545
544
|
|
|
546
|
-
if (!current || dirty & /*size, kind*/ 24 && button_class_value !== (button_class_value = "" + (null_to_empty(`iroco-ui-button iroco-ui-button--${/*size*/ ctx[4]} iroco-ui-button--${/*kind*/ ctx[3]}`) + " svelte-
|
|
545
|
+
if (!current || dirty & /*size, kind*/ 24 && button_class_value !== (button_class_value = "" + (null_to_empty(`iroco-ui-button iroco-ui-button--${/*size*/ ctx[4]} iroco-ui-button--${/*kind*/ ctx[3]}`) + " svelte-5qkkwb"))) {
|
|
547
546
|
attr(button, "class", button_class_value);
|
|
548
547
|
}
|
|
549
548
|
|
|
@@ -558,10 +557,6 @@ function create_fragment$h(ctx) {
|
|
|
558
557
|
if (dirty & /*size, kind, disabled*/ 28) {
|
|
559
558
|
toggle_class(button, "disabled", /*disabled*/ ctx[2]);
|
|
560
559
|
}
|
|
561
|
-
|
|
562
|
-
if (dirty & /*size, kind, rounded*/ 56) {
|
|
563
|
-
toggle_class(button, "rounded", /*rounded*/ ctx[5]);
|
|
564
|
-
}
|
|
565
560
|
},
|
|
566
561
|
i(local) {
|
|
567
562
|
if (current) return;
|
|
@@ -575,7 +570,7 @@ function create_fragment$h(ctx) {
|
|
|
575
570
|
d(detaching) {
|
|
576
571
|
if (detaching) detach(button);
|
|
577
572
|
if (default_slot) default_slot.d(detaching);
|
|
578
|
-
/*button_binding*/ ctx[
|
|
573
|
+
/*button_binding*/ ctx[9](null);
|
|
579
574
|
mounted = false;
|
|
580
575
|
dispose();
|
|
581
576
|
}
|
|
@@ -588,7 +583,6 @@ function instance$g($$self, $$props, $$invalidate) {
|
|
|
588
583
|
let { disabled = false } = $$props;
|
|
589
584
|
let { kind = "basic" } = $$props;
|
|
590
585
|
let { size = "regular" } = $$props;
|
|
591
|
-
let { rounded = false } = $$props;
|
|
592
586
|
let { id } = $$props;
|
|
593
587
|
let { node } = $$props;
|
|
594
588
|
|
|
@@ -608,10 +602,9 @@ function instance$g($$self, $$props, $$invalidate) {
|
|
|
608
602
|
if ("disabled" in $$props) $$invalidate(2, disabled = $$props.disabled);
|
|
609
603
|
if ("kind" in $$props) $$invalidate(3, kind = $$props.kind);
|
|
610
604
|
if ("size" in $$props) $$invalidate(4, size = $$props.size);
|
|
611
|
-
if ("
|
|
612
|
-
if ("id" in $$props) $$invalidate(6, id = $$props.id);
|
|
605
|
+
if ("id" in $$props) $$invalidate(5, id = $$props.id);
|
|
613
606
|
if ("node" in $$props) $$invalidate(0, node = $$props.node);
|
|
614
|
-
if ("$$scope" in $$props) $$invalidate(
|
|
607
|
+
if ("$$scope" in $$props) $$invalidate(6, $$scope = $$props.$$scope);
|
|
615
608
|
};
|
|
616
609
|
|
|
617
610
|
return [
|
|
@@ -620,7 +613,6 @@ function instance$g($$self, $$props, $$invalidate) {
|
|
|
620
613
|
disabled,
|
|
621
614
|
kind,
|
|
622
615
|
size,
|
|
623
|
-
rounded,
|
|
624
616
|
id,
|
|
625
617
|
$$scope,
|
|
626
618
|
slots,
|
|
@@ -638,8 +630,7 @@ class Button extends SvelteComponent {
|
|
|
638
630
|
disabled: 2,
|
|
639
631
|
kind: 3,
|
|
640
632
|
size: 4,
|
|
641
|
-
|
|
642
|
-
id: 6,
|
|
633
|
+
id: 5,
|
|
643
634
|
node: 0
|
|
644
635
|
});
|
|
645
636
|
}
|
|
@@ -655,7 +646,7 @@ function create_if_block_2(ctx) {
|
|
|
655
646
|
c() {
|
|
656
647
|
label_1 = element("label");
|
|
657
648
|
t = text(/*label*/ ctx[2]);
|
|
658
|
-
attr(label_1, "class", "iroco-ui-label svelte-
|
|
649
|
+
attr(label_1, "class", "iroco-ui-label svelte-1y0402x");
|
|
659
650
|
attr(label_1, "for", /*id*/ ctx[1]);
|
|
660
651
|
},
|
|
661
652
|
m(target, anchor) {
|
|
@@ -692,7 +683,7 @@ function create_if_block$4(ctx) {
|
|
|
692
683
|
p = element("p");
|
|
693
684
|
if_block.c();
|
|
694
685
|
attr(p, "data-testid", "error");
|
|
695
|
-
attr(p, "class", "error svelte-
|
|
686
|
+
attr(p, "class", "error svelte-1y0402x");
|
|
696
687
|
},
|
|
697
688
|
m(target, anchor) {
|
|
698
689
|
insert(target, p, anchor);
|
|
@@ -786,11 +777,11 @@ function create_fragment$g(ctx) {
|
|
|
786
777
|
attr(input, "type", "text");
|
|
787
778
|
attr(input, "placeholder", /*placeholder*/ ctx[3]);
|
|
788
779
|
input.readOnly = /*readonly*/ ctx[8];
|
|
789
|
-
attr(input, "class", "svelte-
|
|
780
|
+
attr(input, "class", "svelte-1y0402x");
|
|
790
781
|
toggle_class(input, "border", /*border*/ ctx[9]);
|
|
791
782
|
toggle_class(input, "error", /*error*/ ctx[4] !== null);
|
|
792
783
|
toggle_class(input, "readonlyInput", /*readonly*/ ctx[8] == true);
|
|
793
|
-
attr(div, "class", "iroco-ui-input svelte-
|
|
784
|
+
attr(div, "class", "iroco-ui-input svelte-1y0402x");
|
|
794
785
|
},
|
|
795
786
|
m(target, anchor) {
|
|
796
787
|
insert(target, div, anchor);
|
|
@@ -4185,27 +4176,28 @@ class IconClose extends SvelteComponent {
|
|
|
4185
4176
|
}
|
|
4186
4177
|
}
|
|
4187
4178
|
|
|
4188
|
-
/* src/
|
|
4179
|
+
/* src/NavBar.svelte generated by Svelte v3.38.2 */
|
|
4189
4180
|
|
|
4190
4181
|
function get_each_context$1(ctx, list, i) {
|
|
4191
4182
|
const child_ctx = ctx.slice();
|
|
4192
|
-
child_ctx[
|
|
4183
|
+
child_ctx[7] = list[i];
|
|
4193
4184
|
return child_ctx;
|
|
4194
4185
|
}
|
|
4195
4186
|
|
|
4196
|
-
// (
|
|
4187
|
+
// (24:2) {#each navigationItems as item}
|
|
4197
4188
|
function create_each_block$1(ctx) {
|
|
4198
4189
|
let li;
|
|
4199
4190
|
let a;
|
|
4200
|
-
let t0_value = /*item*/ ctx[
|
|
4191
|
+
let t0_value = /*item*/ ctx[7].name + "";
|
|
4201
4192
|
let t0;
|
|
4202
4193
|
let a_href_value;
|
|
4203
4194
|
let t1;
|
|
4195
|
+
let li_class_value;
|
|
4204
4196
|
let mounted;
|
|
4205
4197
|
let dispose;
|
|
4206
4198
|
|
|
4207
4199
|
function click_handler_1() {
|
|
4208
|
-
return /*click_handler_1*/ ctx[
|
|
4200
|
+
return /*click_handler_1*/ ctx[5](/*item*/ ctx[7]);
|
|
4209
4201
|
}
|
|
4210
4202
|
|
|
4211
4203
|
return {
|
|
@@ -4215,13 +4207,13 @@ function create_each_block$1(ctx) {
|
|
|
4215
4207
|
t0 = text(t0_value);
|
|
4216
4208
|
t1 = space();
|
|
4217
4209
|
|
|
4218
|
-
attr(a, "href", a_href_value = typeof /*item*/ ctx[
|
|
4219
|
-
? /*item*/ ctx[
|
|
4210
|
+
attr(a, "href", a_href_value = typeof /*item*/ ctx[7].hrefOrCallback === "string"
|
|
4211
|
+
? /*item*/ ctx[7].hrefOrCallback
|
|
4220
4212
|
: "#");
|
|
4221
4213
|
|
|
4222
|
-
attr(a, "class", "svelte-
|
|
4223
|
-
attr(li, "class", "
|
|
4224
|
-
toggle_class(li, "active", /*active*/ ctx[
|
|
4214
|
+
attr(a, "class", "svelte-1c8sozl");
|
|
4215
|
+
attr(li, "class", li_class_value = "nav__" + /*type*/ ctx[1] + "__item" + " svelte-1c8sozl");
|
|
4216
|
+
toggle_class(li, "active", /*active*/ ctx[2] === /*item*/ ctx[7].name);
|
|
4225
4217
|
},
|
|
4226
4218
|
m(target, anchor) {
|
|
4227
4219
|
insert(target, li, anchor);
|
|
@@ -4236,16 +4228,20 @@ function create_each_block$1(ctx) {
|
|
|
4236
4228
|
},
|
|
4237
4229
|
p(new_ctx, dirty) {
|
|
4238
4230
|
ctx = new_ctx;
|
|
4239
|
-
if (dirty & /*navigationItems*/ 1 && t0_value !== (t0_value = /*item*/ ctx[
|
|
4231
|
+
if (dirty & /*navigationItems*/ 1 && t0_value !== (t0_value = /*item*/ ctx[7].name + "")) set_data(t0, t0_value);
|
|
4240
4232
|
|
|
4241
|
-
if (dirty & /*navigationItems*/ 1 && a_href_value !== (a_href_value = typeof /*item*/ ctx[
|
|
4242
|
-
? /*item*/ ctx[
|
|
4233
|
+
if (dirty & /*navigationItems*/ 1 && a_href_value !== (a_href_value = typeof /*item*/ ctx[7].hrefOrCallback === "string"
|
|
4234
|
+
? /*item*/ ctx[7].hrefOrCallback
|
|
4243
4235
|
: "#")) {
|
|
4244
4236
|
attr(a, "href", a_href_value);
|
|
4245
4237
|
}
|
|
4246
4238
|
|
|
4247
|
-
if (dirty & /*
|
|
4248
|
-
|
|
4239
|
+
if (dirty & /*type*/ 2 && li_class_value !== (li_class_value = "nav__" + /*type*/ ctx[1] + "__item" + " svelte-1c8sozl")) {
|
|
4240
|
+
attr(li, "class", li_class_value);
|
|
4241
|
+
}
|
|
4242
|
+
|
|
4243
|
+
if (dirty & /*type, active, navigationItems*/ 7) {
|
|
4244
|
+
toggle_class(li, "active", /*active*/ ctx[2] === /*item*/ ctx[7].name);
|
|
4249
4245
|
}
|
|
4250
4246
|
},
|
|
4251
4247
|
d(detaching) {
|
|
@@ -4260,8 +4256,11 @@ function create_fragment$7(ctx) {
|
|
|
4260
4256
|
let nav;
|
|
4261
4257
|
let button;
|
|
4262
4258
|
let iconclose;
|
|
4259
|
+
let button_class_value;
|
|
4263
4260
|
let t;
|
|
4264
4261
|
let ul;
|
|
4262
|
+
let ul_class_value;
|
|
4263
|
+
let nav_class_value;
|
|
4265
4264
|
let current;
|
|
4266
4265
|
let mounted;
|
|
4267
4266
|
let dispose;
|
|
@@ -4285,10 +4284,10 @@ function create_fragment$7(ctx) {
|
|
|
4285
4284
|
each_blocks[i].c();
|
|
4286
4285
|
}
|
|
4287
4286
|
|
|
4288
|
-
attr(button, "class", "
|
|
4289
|
-
attr(ul, "class", "
|
|
4290
|
-
attr(nav, "data-testid",
|
|
4291
|
-
attr(nav, "class", "
|
|
4287
|
+
attr(button, "class", button_class_value = "nav__" + /*type*/ ctx[1] + "__close" + " svelte-1c8sozl");
|
|
4288
|
+
attr(ul, "class", ul_class_value = "nav__" + /*type*/ ctx[1] + "__item-container" + " svelte-1c8sozl");
|
|
4289
|
+
attr(nav, "data-testid", /*type*/ ctx[1]);
|
|
4290
|
+
attr(nav, "class", nav_class_value = "nav__" + /*type*/ ctx[1] + " svelte-1c8sozl");
|
|
4292
4291
|
},
|
|
4293
4292
|
m(target, anchor) {
|
|
4294
4293
|
insert(target, nav, anchor);
|
|
@@ -4304,12 +4303,16 @@ function create_fragment$7(ctx) {
|
|
|
4304
4303
|
current = true;
|
|
4305
4304
|
|
|
4306
4305
|
if (!mounted) {
|
|
4307
|
-
dispose = listen(button, "click", /*click_handler*/ ctx[
|
|
4306
|
+
dispose = listen(button, "click", /*click_handler*/ ctx[4]);
|
|
4308
4307
|
mounted = true;
|
|
4309
4308
|
}
|
|
4310
4309
|
},
|
|
4311
4310
|
p(ctx, [dirty]) {
|
|
4312
|
-
if (dirty & /*
|
|
4311
|
+
if (!current || dirty & /*type*/ 2 && button_class_value !== (button_class_value = "nav__" + /*type*/ ctx[1] + "__close" + " svelte-1c8sozl")) {
|
|
4312
|
+
attr(button, "class", button_class_value);
|
|
4313
|
+
}
|
|
4314
|
+
|
|
4315
|
+
if (dirty & /*type, active, navigationItems, handleClickLink*/ 15) {
|
|
4313
4316
|
each_value = /*navigationItems*/ ctx[0];
|
|
4314
4317
|
let i;
|
|
4315
4318
|
|
|
@@ -4331,6 +4334,18 @@ function create_fragment$7(ctx) {
|
|
|
4331
4334
|
|
|
4332
4335
|
each_blocks.length = each_value.length;
|
|
4333
4336
|
}
|
|
4337
|
+
|
|
4338
|
+
if (!current || dirty & /*type*/ 2 && ul_class_value !== (ul_class_value = "nav__" + /*type*/ ctx[1] + "__item-container" + " svelte-1c8sozl")) {
|
|
4339
|
+
attr(ul, "class", ul_class_value);
|
|
4340
|
+
}
|
|
4341
|
+
|
|
4342
|
+
if (!current || dirty & /*type*/ 2) {
|
|
4343
|
+
attr(nav, "data-testid", /*type*/ ctx[1]);
|
|
4344
|
+
}
|
|
4345
|
+
|
|
4346
|
+
if (!current || dirty & /*type*/ 2 && nav_class_value !== (nav_class_value = "nav__" + /*type*/ ctx[1] + " svelte-1c8sozl")) {
|
|
4347
|
+
attr(nav, "class", nav_class_value);
|
|
4348
|
+
}
|
|
4334
4349
|
},
|
|
4335
4350
|
i(local) {
|
|
4336
4351
|
if (current) return;
|
|
@@ -4354,11 +4369,12 @@ function create_fragment$7(ctx) {
|
|
|
4354
4369
|
function instance$7($$self, $$props, $$invalidate) {
|
|
4355
4370
|
|
|
4356
4371
|
let { navigationItems } = $$props;
|
|
4372
|
+
let { type } = $$props;
|
|
4357
4373
|
let active;
|
|
4358
4374
|
const dispatch = createEventDispatcher();
|
|
4359
4375
|
|
|
4360
4376
|
const handleClickLink = menuItem => {
|
|
4361
|
-
$$invalidate(
|
|
4377
|
+
$$invalidate(2, active = menuItem.name);
|
|
4362
4378
|
|
|
4363
4379
|
if (typeof menuItem.hrefOrCallback === "function") {
|
|
4364
4380
|
menuItem.hrefOrCallback();
|
|
@@ -4376,15 +4392,16 @@ function instance$7($$self, $$props, $$invalidate) {
|
|
|
4376
4392
|
|
|
4377
4393
|
$$self.$$set = $$props => {
|
|
4378
4394
|
if ("navigationItems" in $$props) $$invalidate(0, navigationItems = $$props.navigationItems);
|
|
4395
|
+
if ("type" in $$props) $$invalidate(1, type = $$props.type);
|
|
4379
4396
|
};
|
|
4380
4397
|
|
|
4381
|
-
return [navigationItems, active, handleClickLink, click_handler, click_handler_1];
|
|
4398
|
+
return [navigationItems, type, active, handleClickLink, click_handler, click_handler_1];
|
|
4382
4399
|
}
|
|
4383
4400
|
|
|
4384
|
-
class
|
|
4401
|
+
class NavBar extends SvelteComponent {
|
|
4385
4402
|
constructor(options) {
|
|
4386
4403
|
super();
|
|
4387
|
-
init(this, options, instance$7, create_fragment$7, safe_not_equal, { navigationItems: 0 });
|
|
4404
|
+
init(this, options, instance$7, create_fragment$7, safe_not_equal, { navigationItems: 0, type: 1 });
|
|
4388
4405
|
}
|
|
4389
4406
|
}
|
|
4390
4407
|
|
|
@@ -4452,42 +4469,44 @@ class IconBurger extends SvelteComponent {
|
|
|
4452
4469
|
/* src/Navigation.svelte generated by Svelte v3.38.2 */
|
|
4453
4470
|
|
|
4454
4471
|
function create_if_block$1(ctx) {
|
|
4455
|
-
let
|
|
4472
|
+
let navbar;
|
|
4456
4473
|
let current;
|
|
4457
4474
|
|
|
4458
|
-
|
|
4475
|
+
navbar = new NavBar({
|
|
4459
4476
|
props: {
|
|
4477
|
+
type: /*type*/ ctx[1],
|
|
4460
4478
|
navigationItems: /*navigationItems*/ ctx[0]
|
|
4461
4479
|
}
|
|
4462
4480
|
});
|
|
4463
4481
|
|
|
4464
|
-
|
|
4465
|
-
|
|
4482
|
+
navbar.$on("click_link", /*click_link_handler*/ ctx[5]);
|
|
4483
|
+
navbar.$on("click", /*click_handler_1*/ ctx[6]);
|
|
4466
4484
|
|
|
4467
4485
|
return {
|
|
4468
4486
|
c() {
|
|
4469
|
-
create_component(
|
|
4487
|
+
create_component(navbar.$$.fragment);
|
|
4470
4488
|
},
|
|
4471
4489
|
m(target, anchor) {
|
|
4472
|
-
mount_component(
|
|
4490
|
+
mount_component(navbar, target, anchor);
|
|
4473
4491
|
current = true;
|
|
4474
4492
|
},
|
|
4475
4493
|
p(ctx, dirty) {
|
|
4476
|
-
const
|
|
4477
|
-
if (dirty & /*
|
|
4478
|
-
|
|
4494
|
+
const navbar_changes = {};
|
|
4495
|
+
if (dirty & /*type*/ 2) navbar_changes.type = /*type*/ ctx[1];
|
|
4496
|
+
if (dirty & /*navigationItems*/ 1) navbar_changes.navigationItems = /*navigationItems*/ ctx[0];
|
|
4497
|
+
navbar.$set(navbar_changes);
|
|
4479
4498
|
},
|
|
4480
4499
|
i(local) {
|
|
4481
4500
|
if (current) return;
|
|
4482
|
-
transition_in(
|
|
4501
|
+
transition_in(navbar.$$.fragment, local);
|
|
4483
4502
|
current = true;
|
|
4484
4503
|
},
|
|
4485
4504
|
o(local) {
|
|
4486
|
-
transition_out(
|
|
4505
|
+
transition_out(navbar.$$.fragment, local);
|
|
4487
4506
|
current = false;
|
|
4488
4507
|
},
|
|
4489
4508
|
d(detaching) {
|
|
4490
|
-
destroy_component(
|
|
4509
|
+
destroy_component(navbar, detaching);
|
|
4491
4510
|
}
|
|
4492
4511
|
};
|
|
4493
4512
|
}
|
|
@@ -4511,18 +4530,19 @@ function create_fragment$5(ctx) {
|
|
|
4511
4530
|
let h11;
|
|
4512
4531
|
let t6;
|
|
4513
4532
|
let t7;
|
|
4514
|
-
let
|
|
4533
|
+
let navbar;
|
|
4515
4534
|
let current;
|
|
4516
4535
|
let mounted;
|
|
4517
4536
|
let dispose;
|
|
4518
4537
|
iconirocologo0 = new IconIrocoLogo({ props: { width: "3em", height: "3em" } });
|
|
4519
4538
|
iconburger = new IconBurger({ props: { width: "3em", height: "3em" } });
|
|
4520
|
-
let if_block = /*showMenu*/ ctx[
|
|
4539
|
+
let if_block = /*showMenu*/ ctx[3] && create_if_block$1(ctx);
|
|
4521
4540
|
iconirocologo1 = new IconIrocoLogo({ props: { width: "3em", height: "3em" } });
|
|
4522
4541
|
|
|
4523
|
-
|
|
4542
|
+
navbar = new NavBar({
|
|
4524
4543
|
props: {
|
|
4525
|
-
navigationItems: /*navigationItems*/ ctx[0]
|
|
4544
|
+
navigationItems: /*navigationItems*/ ctx[0],
|
|
4545
|
+
type: /*type*/ ctx[1]
|
|
4526
4546
|
}
|
|
4527
4547
|
});
|
|
4528
4548
|
|
|
@@ -4533,7 +4553,7 @@ function create_fragment$5(ctx) {
|
|
|
4533
4553
|
create_component(iconirocologo0.$$.fragment);
|
|
4534
4554
|
t0 = space();
|
|
4535
4555
|
h10 = element("h1");
|
|
4536
|
-
t1 = text(/*title*/ ctx[
|
|
4556
|
+
t1 = text(/*title*/ ctx[2]);
|
|
4537
4557
|
t2 = space();
|
|
4538
4558
|
button = element("button");
|
|
4539
4559
|
create_component(iconburger.$$.fragment);
|
|
@@ -4545,16 +4565,16 @@ function create_fragment$5(ctx) {
|
|
|
4545
4565
|
create_component(iconirocologo1.$$.fragment);
|
|
4546
4566
|
t5 = space();
|
|
4547
4567
|
h11 = element("h1");
|
|
4548
|
-
t6 = text(/*title*/ ctx[
|
|
4568
|
+
t6 = text(/*title*/ ctx[2]);
|
|
4549
4569
|
t7 = space();
|
|
4550
|
-
create_component(
|
|
4551
|
-
attr(h10, "class", "svelte-
|
|
4552
|
-
attr(div0, "class", "
|
|
4553
|
-
attr(button, "class", "
|
|
4554
|
-
attr(div1, "class", "
|
|
4555
|
-
attr(h11, "class", "svelte-
|
|
4556
|
-
attr(div2, "class", "
|
|
4557
|
-
attr(div3, "class", "
|
|
4570
|
+
create_component(navbar.$$.fragment);
|
|
4571
|
+
attr(h10, "class", "svelte-lqwgm1");
|
|
4572
|
+
attr(div0, "class", "navigation--mobile__title-container svelte-lqwgm1");
|
|
4573
|
+
attr(button, "class", "navigation--mobile__button svelte-lqwgm1");
|
|
4574
|
+
attr(div1, "class", "navigation--mobile svelte-lqwgm1");
|
|
4575
|
+
attr(h11, "class", "svelte-lqwgm1");
|
|
4576
|
+
attr(div2, "class", "navigation__title-container svelte-lqwgm1");
|
|
4577
|
+
attr(div3, "class", "navigation svelte-lqwgm1");
|
|
4558
4578
|
},
|
|
4559
4579
|
m(target, anchor) {
|
|
4560
4580
|
insert(target, div1, anchor);
|
|
@@ -4576,22 +4596,22 @@ function create_fragment$5(ctx) {
|
|
|
4576
4596
|
append(div2, h11);
|
|
4577
4597
|
append(h11, t6);
|
|
4578
4598
|
append(div3, t7);
|
|
4579
|
-
mount_component(
|
|
4599
|
+
mount_component(navbar, div3, null);
|
|
4580
4600
|
current = true;
|
|
4581
4601
|
|
|
4582
4602
|
if (!mounted) {
|
|
4583
|
-
dispose = listen(button, "click", /*click_handler*/ ctx[
|
|
4603
|
+
dispose = listen(button, "click", /*click_handler*/ ctx[4]);
|
|
4584
4604
|
mounted = true;
|
|
4585
4605
|
}
|
|
4586
4606
|
},
|
|
4587
4607
|
p(ctx, [dirty]) {
|
|
4588
|
-
if (!current || dirty & /*title*/
|
|
4608
|
+
if (!current || dirty & /*title*/ 4) set_data(t1, /*title*/ ctx[2]);
|
|
4589
4609
|
|
|
4590
|
-
if (/*showMenu*/ ctx[
|
|
4610
|
+
if (/*showMenu*/ ctx[3]) {
|
|
4591
4611
|
if (if_block) {
|
|
4592
4612
|
if_block.p(ctx, dirty);
|
|
4593
4613
|
|
|
4594
|
-
if (dirty & /*showMenu*/
|
|
4614
|
+
if (dirty & /*showMenu*/ 8) {
|
|
4595
4615
|
transition_in(if_block, 1);
|
|
4596
4616
|
}
|
|
4597
4617
|
} else {
|
|
@@ -4610,10 +4630,11 @@ function create_fragment$5(ctx) {
|
|
|
4610
4630
|
check_outros();
|
|
4611
4631
|
}
|
|
4612
4632
|
|
|
4613
|
-
if (!current || dirty & /*title*/
|
|
4614
|
-
const
|
|
4615
|
-
if (dirty & /*navigationItems*/ 1)
|
|
4616
|
-
|
|
4633
|
+
if (!current || dirty & /*title*/ 4) set_data(t6, /*title*/ ctx[2]);
|
|
4634
|
+
const navbar_changes = {};
|
|
4635
|
+
if (dirty & /*navigationItems*/ 1) navbar_changes.navigationItems = /*navigationItems*/ ctx[0];
|
|
4636
|
+
if (dirty & /*type*/ 2) navbar_changes.type = /*type*/ ctx[1];
|
|
4637
|
+
navbar.$set(navbar_changes);
|
|
4617
4638
|
},
|
|
4618
4639
|
i(local) {
|
|
4619
4640
|
if (current) return;
|
|
@@ -4621,7 +4642,7 @@ function create_fragment$5(ctx) {
|
|
|
4621
4642
|
transition_in(iconburger.$$.fragment, local);
|
|
4622
4643
|
transition_in(if_block);
|
|
4623
4644
|
transition_in(iconirocologo1.$$.fragment, local);
|
|
4624
|
-
transition_in(
|
|
4645
|
+
transition_in(navbar.$$.fragment, local);
|
|
4625
4646
|
current = true;
|
|
4626
4647
|
},
|
|
4627
4648
|
o(local) {
|
|
@@ -4629,7 +4650,7 @@ function create_fragment$5(ctx) {
|
|
|
4629
4650
|
transition_out(iconburger.$$.fragment, local);
|
|
4630
4651
|
transition_out(if_block);
|
|
4631
4652
|
transition_out(iconirocologo1.$$.fragment, local);
|
|
4632
|
-
transition_out(
|
|
4653
|
+
transition_out(navbar.$$.fragment, local);
|
|
4633
4654
|
current = false;
|
|
4634
4655
|
},
|
|
4635
4656
|
d(detaching) {
|
|
@@ -4640,7 +4661,7 @@ function create_fragment$5(ctx) {
|
|
|
4640
4661
|
if (detaching) detach(t4);
|
|
4641
4662
|
if (detaching) detach(div3);
|
|
4642
4663
|
destroy_component(iconirocologo1);
|
|
4643
|
-
destroy_component(
|
|
4664
|
+
destroy_component(navbar);
|
|
4644
4665
|
mounted = false;
|
|
4645
4666
|
dispose();
|
|
4646
4667
|
}
|
|
@@ -4650,19 +4671,22 @@ function create_fragment$5(ctx) {
|
|
|
4650
4671
|
function instance$5($$self, $$props, $$invalidate) {
|
|
4651
4672
|
|
|
4652
4673
|
let { navigationItems } = $$props;
|
|
4674
|
+
let { type = "topbar" } = $$props;
|
|
4653
4675
|
let { title } = $$props;
|
|
4654
4676
|
let showMenu = false;
|
|
4655
|
-
const click_handler = () => $$invalidate(
|
|
4656
|
-
const click_link_handler = () => $$invalidate(
|
|
4657
|
-
const click_handler_1 = () => $$invalidate(
|
|
4677
|
+
const click_handler = () => $$invalidate(3, showMenu = true);
|
|
4678
|
+
const click_link_handler = () => $$invalidate(3, showMenu = false);
|
|
4679
|
+
const click_handler_1 = () => $$invalidate(3, showMenu = false);
|
|
4658
4680
|
|
|
4659
4681
|
$$self.$$set = $$props => {
|
|
4660
4682
|
if ("navigationItems" in $$props) $$invalidate(0, navigationItems = $$props.navigationItems);
|
|
4661
|
-
if ("
|
|
4683
|
+
if ("type" in $$props) $$invalidate(1, type = $$props.type);
|
|
4684
|
+
if ("title" in $$props) $$invalidate(2, title = $$props.title);
|
|
4662
4685
|
};
|
|
4663
4686
|
|
|
4664
4687
|
return [
|
|
4665
4688
|
navigationItems,
|
|
4689
|
+
type,
|
|
4666
4690
|
title,
|
|
4667
4691
|
showMenu,
|
|
4668
4692
|
click_handler,
|
|
@@ -4674,7 +4698,7 @@ function instance$5($$self, $$props, $$invalidate) {
|
|
|
4674
4698
|
class Navigation extends SvelteComponent {
|
|
4675
4699
|
constructor(options) {
|
|
4676
4700
|
super();
|
|
4677
|
-
init(this, options, instance$5, create_fragment$5, safe_not_equal, { navigationItems: 0,
|
|
4701
|
+
init(this, options, instance$5, create_fragment$5, safe_not_equal, { navigationItems: 0, type: 1, title: 2 });
|
|
4678
4702
|
}
|
|
4679
4703
|
}
|
|
4680
4704
|
|
|
@@ -5354,7 +5378,7 @@ function create_fragment(ctx) {
|
|
|
5354
5378
|
c() {
|
|
5355
5379
|
div = element("div");
|
|
5356
5380
|
t = text(/*content*/ ctx[1]);
|
|
5357
|
-
attr(div, "class", div_class_value = "" + (null_to_empty(`alert alert--${/*type*/ ctx[0]}`) + " svelte-
|
|
5381
|
+
attr(div, "class", div_class_value = "" + (null_to_empty(`alert alert--${/*type*/ ctx[0]}`) + " svelte-itln7g"));
|
|
5358
5382
|
},
|
|
5359
5383
|
m(target, anchor) {
|
|
5360
5384
|
insert(target, div, anchor);
|
|
@@ -5372,7 +5396,7 @@ function create_fragment(ctx) {
|
|
|
5372
5396
|
ctx = new_ctx;
|
|
5373
5397
|
if (dirty & /*content*/ 2) set_data(t, /*content*/ ctx[1]);
|
|
5374
5398
|
|
|
5375
|
-
if (dirty & /*type*/ 1 && div_class_value !== (div_class_value = "" + (null_to_empty(`alert alert--${/*type*/ ctx[0]}`) + " svelte-
|
|
5399
|
+
if (dirty & /*type*/ 1 && div_class_value !== (div_class_value = "" + (null_to_empty(`alert alert--${/*type*/ ctx[0]}`) + " svelte-itln7g"))) {
|
|
5376
5400
|
attr(div, "class", div_class_value);
|
|
5377
5401
|
}
|
|
5378
5402
|
},
|
|
@@ -5407,4 +5431,4 @@ class Alert extends SvelteComponent {
|
|
|
5407
5431
|
}
|
|
5408
5432
|
}
|
|
5409
5433
|
|
|
5410
|
-
export { Alert, Button, DataTable, Icon, IconFloppyDisk, IconInfo, IconMastodon, IconMoreSign as IconMore, IconTrashCan, Loader, Navigation, NumberInput, RadioButton,
|
|
5434
|
+
export { Alert, Button, DataTable, Icon, IconFloppyDisk, IconInfo, IconMastodon, IconMoreSign as IconMore, IconTrashCan, Loader, NavBar, Navigation, NumberInput, RadioButton, TextInput };
|