@abgov/web-components 1.0.0-alpha.106 → 1.0.0-alpha.108

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/web-components",
3
- "version": "1.0.0-alpha.106",
3
+ "version": "1.0.0-alpha.108",
4
4
  "description": "Government of Alberta - UI Web components",
5
5
  "bugs": {
6
6
  "url": "https://github.com/GovAlta/ui-components/issues"
@@ -1124,6 +1124,9 @@ function toBoolean(value) {
1124
1124
  }
1125
1125
  return !!value;
1126
1126
  }
1127
+ function fromBoolean(value) {
1128
+ return value ? "true" : "false";
1129
+ }
1127
1130
 
1128
1131
  /* libs/web-components/src/components/badge/Badge.svelte generated by Svelte v3.49.0 */
1129
1132
 
@@ -2531,7 +2534,7 @@ function create_if_block_1$9(ctx) {
2531
2534
  };
2532
2535
  }
2533
2536
 
2534
- // (49:4) {#if isIndeterminate}
2537
+ // (51:4) {#if isIndeterminate}
2535
2538
  function create_if_block$f(ctx) {
2536
2539
  let svg;
2537
2540
  let rect;
@@ -2710,6 +2713,9 @@ function instance$t($$self, $$props, $$invalidate) {
2710
2713
 
2711
2714
  const _value = newCheckStatus ? `${value || "checked"}` : "";
2712
2715
 
2716
+ // set the local state
2717
+ $$invalidate(9, checked = fromBoolean(newCheckStatus));
2718
+
2713
2719
  e.target.dispatchEvent(new CustomEvent("_change",
2714
2720
  {
2715
2721
  composed: true,
@@ -3776,16 +3782,15 @@ function create_fragment$s(ctx) {
3776
3782
  this.c = noop;
3777
3783
  attr(div0, "class", "title");
3778
3784
  attr(div1, "class", "actions");
3779
- attr(header, "class", header_class_value = "heading--" + /*headingsize*/ ctx[1]);
3785
+ attr(header, "class", header_class_value = "heading--" + /*accent*/ ctx[1]);
3780
3786
  attr(div2, "class", "content");
3781
3787
 
3782
3788
  attr(div3, "class", div3_class_value = `
3783
3789
  goa-container
3784
3790
  goa-container--${/*type*/ ctx[0]}
3785
3791
  padding--${/*padding*/ ctx[2]}
3792
+ accent--${/*accent*/ ctx[1]}
3786
3793
  `);
3787
-
3788
- toggle_class(div3, "colored", /*_colored*/ ctx[3]);
3789
3794
  },
3790
3795
  m(target, anchor) {
3791
3796
  insert(target, div3, anchor);
@@ -3797,21 +3802,18 @@ function create_fragment$s(ctx) {
3797
3802
  append(div3, div2);
3798
3803
  },
3799
3804
  p(ctx, [dirty]) {
3800
- if (dirty & /*headingsize*/ 2 && header_class_value !== (header_class_value = "heading--" + /*headingsize*/ ctx[1])) {
3805
+ if (dirty & /*accent*/ 2 && header_class_value !== (header_class_value = "heading--" + /*accent*/ ctx[1])) {
3801
3806
  attr(header, "class", header_class_value);
3802
3807
  }
3803
3808
 
3804
- if (dirty & /*type, padding*/ 5 && div3_class_value !== (div3_class_value = `
3809
+ if (dirty & /*type, padding, accent*/ 7 && div3_class_value !== (div3_class_value = `
3805
3810
  goa-container
3806
3811
  goa-container--${/*type*/ ctx[0]}
3807
3812
  padding--${/*padding*/ ctx[2]}
3813
+ accent--${/*accent*/ ctx[1]}
3808
3814
  `)) {
3809
3815
  attr(div3, "class", div3_class_value);
3810
3816
  }
3811
-
3812
- if (dirty & /*type, padding, _colored*/ 13) {
3813
- toggle_class(div3, "colored", /*_colored*/ ctx[3]);
3814
- }
3815
3817
  },
3816
3818
  i: noop,
3817
3819
  o: noop,
@@ -3822,32 +3824,23 @@ function create_fragment$s(ctx) {
3822
3824
  }
3823
3825
 
3824
3826
  function instance$q($$self, $$props, $$invalidate) {
3825
- let _colored;
3826
- let { type = 'non-interactive' } = $$props;
3827
- let { colored = "false" } = $$props;
3828
- let { headingsize = 'large' } = $$props;
3827
+ let { type = 'interactive' } = $$props;
3828
+ let { accent = 'filled' } = $$props;
3829
3829
  let { padding = "relaxed" } = $$props;
3830
3830
 
3831
3831
  $$self.$$set = $$props => {
3832
3832
  if ('type' in $$props) $$invalidate(0, type = $$props.type);
3833
- if ('colored' in $$props) $$invalidate(4, colored = $$props.colored);
3834
- if ('headingsize' in $$props) $$invalidate(1, headingsize = $$props.headingsize);
3833
+ if ('accent' in $$props) $$invalidate(1, accent = $$props.accent);
3835
3834
  if ('padding' in $$props) $$invalidate(2, padding = $$props.padding);
3836
3835
  };
3837
3836
 
3838
- $$self.$$.update = () => {
3839
- if ($$self.$$.dirty & /*colored*/ 16) {
3840
- $$invalidate(3, _colored = toBoolean(colored));
3841
- }
3842
- };
3843
-
3844
- return [type, headingsize, padding, _colored, colored];
3837
+ return [type, accent, padding];
3845
3838
  }
3846
3839
 
3847
3840
  class Container extends SvelteElement {
3848
3841
  constructor(options) {
3849
3842
  super();
3850
- this.shadowRoot.innerHTML = `<style>:host{box-sizing:border-box;font-family:var(--font-family);font-size:var(--fs-base)}.goa-container{margin-bottom:1rem;box-sizing:border-box}.goa-container *{box-sizing:border-box}header{display:flex;align-items:center;justify-content:space-between;font-weight:700;font-size:var(--fs-base);border-width:1px;border-style:solid;border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius)}.content{border-bottom:1px solid var(--color-gray-200);border-left:1px solid var(--color-gray-200);border-right:1px solid var(--color-gray-200);border-bottom-left-radius:var(--border-radius);border-bottom-right-radius:var(--border-radius)}.goa-container--non-interactive.colored .content{border-color:var(--color-gray-200);background-color:var(--color-gray-100)}.goa-container--important.colored .content{border-color:var(--goa-color-status-warning);background-color:var(--goa-color-status-warning-50)}.goa-container--error.colored .content{border-color:var(--goa-color-status-emergency);background-color:var(--goa-color-status-emergency-50)}.goa-container--success.colored .content{border-color:var(--goa-color-status-success);background-color:var(--goa-color-status-success-50)}.goa-container--info.colored .content{border-color:var(--goa-color-status-info);background-color:var(--goa-color-status-info-50)}.title,.actions{padding:0.5rem 0}.padding--relaxed header{padding:0 1.5rem}.padding--relaxed .content{padding:1.5rem}.padding--compact header,.padding--compact .content{padding:0 1rem}.padding--compact header{padding:0 1rem}.padding--compact .content{padding:1rem}@media screen and (max-width: 480px){.padding--relaxed header{padding:0 1rem}.padding--relaxed .content{padding:1rem}}.goa-container--non-interactive header{background-color:var(--color-gray-100);border-color:var(--color-gray-200);color:var(--color-black)}.goa-container--interactive header{background-color:var(--goa-color-brand);border-color:var(--goa-color-brand);color:var(--color-white)}.goa-container--info header{background-color:var(--goa-color-status-info);border-color:var(--goa-color-status-info);color:var(--color-white)}.goa-container--error header{background-color:var(--goa-color-status-emergency);border-color:var(--goa-color-status-emergency);color:var(--color-white)}.goa-container--success header{background-color:var(--goa-color-status-success);border-color:var(--goa-color-status-success);color:var(--color-white)}.goa-container--important header{background-color:var(--goa-color-status-warning);border-color:var(--goa-color-status-warning);color:var(--color-white)}.heading--large{padding:0.5rem 1.5rem;max-height:3rem;min-height:1rem}.heading--large .title{line-height:2rem}.heading--small{height:0.5rem}.heading--none{display:none}.heading--none~.content{border-top:1px solid var(--color-gray-200);border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius)}.heading--small .title,.heading--small .actions{display:none}.actions{display:flex;align-items:center}</style>`;
3843
+ this.shadowRoot.innerHTML = `<style>:host{box-sizing:border-box;font-family:var(--font-family);font-size:var(--fs-base)}.goa-container{margin-bottom:1rem;box-sizing:border-box}.goa-container *{box-sizing:border-box}header{display:flex;align-items:center;justify-content:space-between;font-weight:700;font-size:var(--fs-base);border-width:1px;border-style:solid;border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius)}.content{border-bottom:1px solid var(--color-gray-200);border-left:1px solid var(--color-gray-200);border-right:1px solid var(--color-gray-200);border-bottom-left-radius:var(--border-radius);border-bottom-right-radius:var(--border-radius)}.goa-container--non-interactive.accent--filled .content{border-color:var(--color-gray-200);background-color:var(--color-gray-100)}.goa-container--important.accent--filled .content{border-color:var(--goa-color-status-warning);background-color:var(--goa-color-status-warning-50)}.goa-container--error.accent--filled .content{border-color:var(--goa-color-status-emergency);background-color:var(--goa-color-status-emergency-50)}.goa-container--success.accent--filled .content{border-color:var(--goa-color-status-success);background-color:var(--goa-color-status-success-50)}.goa-container--info.accent--filled .content{border-color:var(--goa-color-status-info);background-color:var(--goa-color-status-info-50)}.title,.actions{padding:0.5rem 0}.padding--relaxed header{padding:0 1.5rem}.padding--relaxed .content{padding:1.5rem}.padding--compact header,.padding--compact .content{padding:0 1rem}.padding--compact header{padding:0 1rem}.padding--compact .content{padding:1rem}@media screen and (max-width: 480px){.padding--relaxed header{padding:0 1rem}.padding--relaxed .content{padding:1rem}}.goa-container--non-interactive header{background-color:var(--color-gray-100);border-color:var(--color-gray-200);color:var(--color-black)}.goa-container--interactive header{background-color:var(--goa-color-brand);border-color:var(--goa-color-brand);color:var(--color-white)}.goa-container--info header{background-color:var(--goa-color-status-info);border-color:var(--goa-color-status-info);color:var(--color-white)}.goa-container--error header{background-color:var(--goa-color-status-emergency);border-color:var(--goa-color-status-emergency);color:var(--color-white)}.goa-container--success header{background-color:var(--goa-color-status-success);border-color:var(--goa-color-status-success);color:var(--color-white)}.goa-container--important header{background-color:var(--goa-color-status-warning);border-color:var(--goa-color-status-warning);color:var(--color-white)}.heading--thick{padding:0.5rem 1.5rem;max-height:3rem;min-height:1rem}.heading--thick .title{line-height:2rem}.heading--thin{height:0.5rem}.heading--filled{display:none}.heading--filled~.content{border-top:1px solid var(--color-gray-200);border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius)}.heading--thin .title,.heading--thin .actions{display:none}.actions{display:flex;align-items:center}</style>`;
3851
3844
 
3852
3845
  init(
3853
3846
  this,
@@ -3859,12 +3852,7 @@ class Container extends SvelteElement {
3859
3852
  instance$q,
3860
3853
  create_fragment$s,
3861
3854
  safe_not_equal,
3862
- {
3863
- type: 0,
3864
- colored: 4,
3865
- headingsize: 1,
3866
- padding: 2
3867
- },
3855
+ { type: 0, accent: 1, padding: 2 },
3868
3856
  null
3869
3857
  );
3870
3858
 
@@ -3881,7 +3869,7 @@ class Container extends SvelteElement {
3881
3869
  }
3882
3870
 
3883
3871
  static get observedAttributes() {
3884
- return ["type", "colored", "headingsize", "padding"];
3872
+ return ["type", "accent", "padding"];
3885
3873
  }
3886
3874
 
3887
3875
  get type() {
@@ -3893,21 +3881,12 @@ class Container extends SvelteElement {
3893
3881
  flush();
3894
3882
  }
3895
3883
 
3896
- get colored() {
3897
- return this.$$.ctx[4];
3898
- }
3899
-
3900
- set colored(colored) {
3901
- this.$$set({ colored });
3902
- flush();
3903
- }
3904
-
3905
- get headingsize() {
3884
+ get accent() {
3906
3885
  return this.$$.ctx[1];
3907
3886
  }
3908
3887
 
3909
- set headingsize(headingsize) {
3910
- this.$$set({ headingsize });
3888
+ set accent(accent) {
3889
+ this.$$set({ accent });
3911
3890
  flush();
3912
3891
  }
3913
3892
 
@@ -4328,7 +4307,7 @@ function create_fragment$r(ctx) {
4328
4307
  };
4329
4308
  }
4330
4309
 
4331
- const MAX_HEIGHT = "300px";
4310
+ const MAX_HEIGHT = "276px";
4332
4311
 
4333
4312
  function instance$p($$self, $$props, $$invalidate) {
4334
4313
  let _disabled;
@@ -11220,10 +11199,69 @@ class TextArea extends SvelteElement {
11220
11199
 
11221
11200
  customElements.define("goa-textarea", TextArea);
11222
11201
 
11223
- /* libs/web-components/src/layouts/two-column-layout/TwoColumnLayout.svelte generated by Svelte v3.49.0 */
11202
+ /* libs/web-components/src/layouts/one-column-layout/OneColumnLayout.svelte generated by Svelte v3.49.0 */
11224
11203
 
11225
11204
  function create_fragment$4(ctx) {
11226
11205
  let div;
11206
+
11207
+ return {
11208
+ c() {
11209
+ div = element("div");
11210
+
11211
+ div.innerHTML = `<section class="header"><slot name="header"></slot></section>
11212
+
11213
+ <main><slot></slot></main>
11214
+
11215
+ <section class="footer"><slot name="footer"></slot></section>`;
11216
+
11217
+ this.c = noop;
11218
+ attr(div, "class", "page");
11219
+ },
11220
+ m(target, anchor) {
11221
+ insert(target, div, anchor);
11222
+ },
11223
+ p: noop,
11224
+ i: noop,
11225
+ o: noop,
11226
+ d(detaching) {
11227
+ if (detaching) detach(div);
11228
+ }
11229
+ };
11230
+ }
11231
+
11232
+ class OneColumnLayout extends SvelteElement {
11233
+ constructor(options) {
11234
+ super();
11235
+ this.shadowRoot.innerHTML = `<style>.page{height:100vh;display:flex;flex-direction:column}.header,.footer{flex:0 0 auto}main{flex:1 1 auto}</style>`;
11236
+
11237
+ init(
11238
+ this,
11239
+ {
11240
+ target: this.shadowRoot,
11241
+ props: attribute_to_object(this.attributes),
11242
+ customElement: true
11243
+ },
11244
+ null,
11245
+ create_fragment$4,
11246
+ safe_not_equal,
11247
+ {},
11248
+ null
11249
+ );
11250
+
11251
+ if (options) {
11252
+ if (options.target) {
11253
+ insert(options.target, this, options.anchor);
11254
+ }
11255
+ }
11256
+ }
11257
+ }
11258
+
11259
+ customElements.define("goa-one-column-layout", OneColumnLayout);
11260
+
11261
+ /* libs/web-components/src/layouts/two-column-layout/TwoColumnLayout.svelte generated by Svelte v3.49.0 */
11262
+
11263
+ function create_fragment$3(ctx) {
11264
+ let div;
11227
11265
  let header;
11228
11266
  let t0;
11229
11267
  let section;
@@ -11306,7 +11344,7 @@ class TwoColumnLayout extends SvelteElement {
11306
11344
  customElement: true
11307
11345
  },
11308
11346
  instance$2,
11309
- create_fragment$4,
11347
+ create_fragment$3,
11310
11348
  safe_not_equal,
11311
11349
  { navcolumnwidth: 0, maxcontentwidth: 1 },
11312
11350
  null
@@ -11351,7 +11389,7 @@ customElements.define("goa-two-column-layout", TwoColumnLayout);
11351
11389
 
11352
11390
  /* libs/web-components/src/layouts/FullScreenNavbarLayout.svelte generated by Svelte v3.49.0 */
11353
11391
 
11354
- function create_fragment$3(ctx) {
11392
+ function create_fragment$2(ctx) {
11355
11393
  let div;
11356
11394
 
11357
11395
  return {
@@ -11400,7 +11438,7 @@ class FullScreenNavbarLayout extends SvelteElement {
11400
11438
  customElement: true
11401
11439
  },
11402
11440
  null,
11403
- create_fragment$3,
11441
+ create_fragment$2,
11404
11442
  safe_not_equal,
11405
11443
  {},
11406
11444
  null
@@ -11464,7 +11502,7 @@ function create_if_block(ctx) {
11464
11502
  };
11465
11503
  }
11466
11504
 
11467
- function create_fragment$2(ctx) {
11505
+ function create_fragment$1(ctx) {
11468
11506
  let goa_container;
11469
11507
  let t0;
11470
11508
  let t1;
@@ -11484,7 +11522,7 @@ function create_fragment$2(ctx) {
11484
11522
  attr(div, "class", "content");
11485
11523
  attr(div, "slot", "");
11486
11524
  set_custom_element_data(goa_container, "type", /*type*/ ctx[3]);
11487
- set_custom_element_data(goa_container, "headingsize", /*headingsize*/ ctx[4]);
11525
+ set_custom_element_data(goa_container, "accent", /*accent*/ ctx[4]);
11488
11526
  },
11489
11527
  m(target, anchor) {
11490
11528
  insert(target, goa_container, anchor);
@@ -11527,8 +11565,8 @@ function create_fragment$2(ctx) {
11527
11565
  set_custom_element_data(goa_container, "type", /*type*/ ctx[3]);
11528
11566
  }
11529
11567
 
11530
- if (dirty & /*headingsize*/ 16) {
11531
- set_custom_element_data(goa_container, "headingsize", /*headingsize*/ ctx[4]);
11568
+ if (dirty & /*accent*/ 16) {
11569
+ set_custom_element_data(goa_container, "accent", /*accent*/ ctx[4]);
11532
11570
  }
11533
11571
  },
11534
11572
  i: noop,
@@ -11546,17 +11584,17 @@ function instance$1($$self, $$props, $$invalidate) {
11546
11584
  let { actions = "" } = $$props;
11547
11585
  let { content } = $$props;
11548
11586
  let { type = "default" } = $$props;
11549
- let { headingsize = "large" } = $$props;
11587
+ let { accent = "thick" } = $$props;
11550
11588
 
11551
11589
  $$self.$$set = $$props => {
11552
11590
  if ('title' in $$props) $$invalidate(0, title = $$props.title);
11553
11591
  if ('actions' in $$props) $$invalidate(1, actions = $$props.actions);
11554
11592
  if ('content' in $$props) $$invalidate(2, content = $$props.content);
11555
11593
  if ('type' in $$props) $$invalidate(3, type = $$props.type);
11556
- if ('headingsize' in $$props) $$invalidate(4, headingsize = $$props.headingsize);
11594
+ if ('accent' in $$props) $$invalidate(4, accent = $$props.accent);
11557
11595
  };
11558
11596
 
11559
- return [title, actions, content, type, headingsize];
11597
+ return [title, actions, content, type, accent];
11560
11598
  }
11561
11599
 
11562
11600
  class ContainerWrapper_test extends SvelteElement {
@@ -11571,14 +11609,14 @@ class ContainerWrapper_test extends SvelteElement {
11571
11609
  customElement: true
11572
11610
  },
11573
11611
  instance$1,
11574
- create_fragment$2,
11612
+ create_fragment$1,
11575
11613
  safe_not_equal,
11576
11614
  {
11577
11615
  title: 0,
11578
11616
  actions: 1,
11579
11617
  content: 2,
11580
11618
  type: 3,
11581
- headingsize: 4
11619
+ accent: 4
11582
11620
  },
11583
11621
  null
11584
11622
  );
@@ -11596,7 +11634,7 @@ class ContainerWrapper_test extends SvelteElement {
11596
11634
  }
11597
11635
 
11598
11636
  static get observedAttributes() {
11599
- return ["title", "actions", "content", "type", "headingsize"];
11637
+ return ["title", "actions", "content", "type", "accent"];
11600
11638
  }
11601
11639
 
11602
11640
  get title() {
@@ -11635,12 +11673,12 @@ class ContainerWrapper_test extends SvelteElement {
11635
11673
  flush();
11636
11674
  }
11637
11675
 
11638
- get headingsize() {
11676
+ get accent() {
11639
11677
  return this.$$.ctx[4];
11640
11678
  }
11641
11679
 
11642
- set headingsize(headingsize) {
11643
- this.$$set({ headingsize });
11680
+ set accent(accent) {
11681
+ this.$$set({ accent });
11644
11682
  flush();
11645
11683
  }
11646
11684
  }
@@ -11649,7 +11687,7 @@ customElements.define("test-container", ContainerWrapper_test);
11649
11687
 
11650
11688
  /* libs/web-components/src/components/divider/Divider.svelte generated by Svelte v3.49.0 */
11651
11689
 
11652
- function create_fragment$1(ctx) {
11690
+ function create_fragment(ctx) {
11653
11691
  let hr;
11654
11692
 
11655
11693
  return {
@@ -11719,7 +11757,7 @@ class Divider extends SvelteElement {
11719
11757
  customElement: true
11720
11758
  },
11721
11759
  instance,
11722
- create_fragment$1,
11760
+ create_fragment,
11723
11761
  safe_not_equal,
11724
11762
  { spacing: 1 },
11725
11763
  null
@@ -11752,62 +11790,3 @@ class Divider extends SvelteElement {
11752
11790
  }
11753
11791
 
11754
11792
  customElements.define("goa-divider", Divider);
11755
-
11756
- /* libs/web-components/src/components/page/Page.svelte generated by Svelte v3.49.0 */
11757
-
11758
- function create_fragment(ctx) {
11759
- let div;
11760
-
11761
- return {
11762
- c() {
11763
- div = element("div");
11764
-
11765
- div.innerHTML = `<section class="header"><slot name="header"></slot></section>
11766
-
11767
- <main><slot></slot></main>
11768
-
11769
- <section class="footer"><slot name="footer"></slot></section>`;
11770
-
11771
- this.c = noop;
11772
- attr(div, "class", "page");
11773
- },
11774
- m(target, anchor) {
11775
- insert(target, div, anchor);
11776
- },
11777
- p: noop,
11778
- i: noop,
11779
- o: noop,
11780
- d(detaching) {
11781
- if (detaching) detach(div);
11782
- }
11783
- };
11784
- }
11785
-
11786
- class Page extends SvelteElement {
11787
- constructor(options) {
11788
- super();
11789
- this.shadowRoot.innerHTML = `<style>.page{height:100vh;display:flex;flex-direction:column}.header,.footer{flex:0 0 auto}main{flex:1 1 auto}</style>`;
11790
-
11791
- init(
11792
- this,
11793
- {
11794
- target: this.shadowRoot,
11795
- props: attribute_to_object(this.attributes),
11796
- customElement: true
11797
- },
11798
- null,
11799
- create_fragment,
11800
- safe_not_equal,
11801
- {},
11802
- null
11803
- );
11804
-
11805
- if (options) {
11806
- if (options.target) {
11807
- insert(options.target, this, options.anchor);
11808
- }
11809
- }
11810
- }
11811
- }
11812
-
11813
- customElements.define("goa-page", Page);