@abgov/web-components 1.0.0-alpha.107 → 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.107",
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"
@@ -3782,16 +3782,15 @@ function create_fragment$s(ctx) {
3782
3782
  this.c = noop;
3783
3783
  attr(div0, "class", "title");
3784
3784
  attr(div1, "class", "actions");
3785
- attr(header, "class", header_class_value = "heading--" + /*headingsize*/ ctx[1]);
3785
+ attr(header, "class", header_class_value = "heading--" + /*accent*/ ctx[1]);
3786
3786
  attr(div2, "class", "content");
3787
3787
 
3788
3788
  attr(div3, "class", div3_class_value = `
3789
3789
  goa-container
3790
3790
  goa-container--${/*type*/ ctx[0]}
3791
3791
  padding--${/*padding*/ ctx[2]}
3792
+ accent--${/*accent*/ ctx[1]}
3792
3793
  `);
3793
-
3794
- toggle_class(div3, "colored", /*_colored*/ ctx[3]);
3795
3794
  },
3796
3795
  m(target, anchor) {
3797
3796
  insert(target, div3, anchor);
@@ -3803,21 +3802,18 @@ function create_fragment$s(ctx) {
3803
3802
  append(div3, div2);
3804
3803
  },
3805
3804
  p(ctx, [dirty]) {
3806
- 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])) {
3807
3806
  attr(header, "class", header_class_value);
3808
3807
  }
3809
3808
 
3810
- if (dirty & /*type, padding*/ 5 && div3_class_value !== (div3_class_value = `
3809
+ if (dirty & /*type, padding, accent*/ 7 && div3_class_value !== (div3_class_value = `
3811
3810
  goa-container
3812
3811
  goa-container--${/*type*/ ctx[0]}
3813
3812
  padding--${/*padding*/ ctx[2]}
3813
+ accent--${/*accent*/ ctx[1]}
3814
3814
  `)) {
3815
3815
  attr(div3, "class", div3_class_value);
3816
3816
  }
3817
-
3818
- if (dirty & /*type, padding, _colored*/ 13) {
3819
- toggle_class(div3, "colored", /*_colored*/ ctx[3]);
3820
- }
3821
3817
  },
3822
3818
  i: noop,
3823
3819
  o: noop,
@@ -3828,32 +3824,23 @@ function create_fragment$s(ctx) {
3828
3824
  }
3829
3825
 
3830
3826
  function instance$q($$self, $$props, $$invalidate) {
3831
- let _colored;
3832
- let { type = 'non-interactive' } = $$props;
3833
- let { colored = "false" } = $$props;
3834
- let { headingsize = 'large' } = $$props;
3827
+ let { type = 'interactive' } = $$props;
3828
+ let { accent = 'filled' } = $$props;
3835
3829
  let { padding = "relaxed" } = $$props;
3836
3830
 
3837
3831
  $$self.$$set = $$props => {
3838
3832
  if ('type' in $$props) $$invalidate(0, type = $$props.type);
3839
- if ('colored' in $$props) $$invalidate(4, colored = $$props.colored);
3840
- if ('headingsize' in $$props) $$invalidate(1, headingsize = $$props.headingsize);
3833
+ if ('accent' in $$props) $$invalidate(1, accent = $$props.accent);
3841
3834
  if ('padding' in $$props) $$invalidate(2, padding = $$props.padding);
3842
3835
  };
3843
3836
 
3844
- $$self.$$.update = () => {
3845
- if ($$self.$$.dirty & /*colored*/ 16) {
3846
- $$invalidate(3, _colored = toBoolean(colored));
3847
- }
3848
- };
3849
-
3850
- return [type, headingsize, padding, _colored, colored];
3837
+ return [type, accent, padding];
3851
3838
  }
3852
3839
 
3853
3840
  class Container extends SvelteElement {
3854
3841
  constructor(options) {
3855
3842
  super();
3856
- 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>`;
3857
3844
 
3858
3845
  init(
3859
3846
  this,
@@ -3865,12 +3852,7 @@ class Container extends SvelteElement {
3865
3852
  instance$q,
3866
3853
  create_fragment$s,
3867
3854
  safe_not_equal,
3868
- {
3869
- type: 0,
3870
- colored: 4,
3871
- headingsize: 1,
3872
- padding: 2
3873
- },
3855
+ { type: 0, accent: 1, padding: 2 },
3874
3856
  null
3875
3857
  );
3876
3858
 
@@ -3887,7 +3869,7 @@ class Container extends SvelteElement {
3887
3869
  }
3888
3870
 
3889
3871
  static get observedAttributes() {
3890
- return ["type", "colored", "headingsize", "padding"];
3872
+ return ["type", "accent", "padding"];
3891
3873
  }
3892
3874
 
3893
3875
  get type() {
@@ -3899,21 +3881,12 @@ class Container extends SvelteElement {
3899
3881
  flush();
3900
3882
  }
3901
3883
 
3902
- get colored() {
3903
- return this.$$.ctx[4];
3904
- }
3905
-
3906
- set colored(colored) {
3907
- this.$$set({ colored });
3908
- flush();
3909
- }
3910
-
3911
- get headingsize() {
3884
+ get accent() {
3912
3885
  return this.$$.ctx[1];
3913
3886
  }
3914
3887
 
3915
- set headingsize(headingsize) {
3916
- this.$$set({ headingsize });
3888
+ set accent(accent) {
3889
+ this.$$set({ accent });
3917
3890
  flush();
3918
3891
  }
3919
3892
 
@@ -4334,7 +4307,7 @@ function create_fragment$r(ctx) {
4334
4307
  };
4335
4308
  }
4336
4309
 
4337
- const MAX_HEIGHT = "300px";
4310
+ const MAX_HEIGHT = "276px";
4338
4311
 
4339
4312
  function instance$p($$self, $$props, $$invalidate) {
4340
4313
  let _disabled;
@@ -11226,10 +11199,69 @@ class TextArea extends SvelteElement {
11226
11199
 
11227
11200
  customElements.define("goa-textarea", TextArea);
11228
11201
 
11229
- /* 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 */
11230
11203
 
11231
11204
  function create_fragment$4(ctx) {
11232
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;
11233
11265
  let header;
11234
11266
  let t0;
11235
11267
  let section;
@@ -11312,7 +11344,7 @@ class TwoColumnLayout extends SvelteElement {
11312
11344
  customElement: true
11313
11345
  },
11314
11346
  instance$2,
11315
- create_fragment$4,
11347
+ create_fragment$3,
11316
11348
  safe_not_equal,
11317
11349
  { navcolumnwidth: 0, maxcontentwidth: 1 },
11318
11350
  null
@@ -11357,7 +11389,7 @@ customElements.define("goa-two-column-layout", TwoColumnLayout);
11357
11389
 
11358
11390
  /* libs/web-components/src/layouts/FullScreenNavbarLayout.svelte generated by Svelte v3.49.0 */
11359
11391
 
11360
- function create_fragment$3(ctx) {
11392
+ function create_fragment$2(ctx) {
11361
11393
  let div;
11362
11394
 
11363
11395
  return {
@@ -11406,7 +11438,7 @@ class FullScreenNavbarLayout extends SvelteElement {
11406
11438
  customElement: true
11407
11439
  },
11408
11440
  null,
11409
- create_fragment$3,
11441
+ create_fragment$2,
11410
11442
  safe_not_equal,
11411
11443
  {},
11412
11444
  null
@@ -11470,7 +11502,7 @@ function create_if_block(ctx) {
11470
11502
  };
11471
11503
  }
11472
11504
 
11473
- function create_fragment$2(ctx) {
11505
+ function create_fragment$1(ctx) {
11474
11506
  let goa_container;
11475
11507
  let t0;
11476
11508
  let t1;
@@ -11490,7 +11522,7 @@ function create_fragment$2(ctx) {
11490
11522
  attr(div, "class", "content");
11491
11523
  attr(div, "slot", "");
11492
11524
  set_custom_element_data(goa_container, "type", /*type*/ ctx[3]);
11493
- set_custom_element_data(goa_container, "headingsize", /*headingsize*/ ctx[4]);
11525
+ set_custom_element_data(goa_container, "accent", /*accent*/ ctx[4]);
11494
11526
  },
11495
11527
  m(target, anchor) {
11496
11528
  insert(target, goa_container, anchor);
@@ -11533,8 +11565,8 @@ function create_fragment$2(ctx) {
11533
11565
  set_custom_element_data(goa_container, "type", /*type*/ ctx[3]);
11534
11566
  }
11535
11567
 
11536
- if (dirty & /*headingsize*/ 16) {
11537
- 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]);
11538
11570
  }
11539
11571
  },
11540
11572
  i: noop,
@@ -11552,17 +11584,17 @@ function instance$1($$self, $$props, $$invalidate) {
11552
11584
  let { actions = "" } = $$props;
11553
11585
  let { content } = $$props;
11554
11586
  let { type = "default" } = $$props;
11555
- let { headingsize = "large" } = $$props;
11587
+ let { accent = "thick" } = $$props;
11556
11588
 
11557
11589
  $$self.$$set = $$props => {
11558
11590
  if ('title' in $$props) $$invalidate(0, title = $$props.title);
11559
11591
  if ('actions' in $$props) $$invalidate(1, actions = $$props.actions);
11560
11592
  if ('content' in $$props) $$invalidate(2, content = $$props.content);
11561
11593
  if ('type' in $$props) $$invalidate(3, type = $$props.type);
11562
- if ('headingsize' in $$props) $$invalidate(4, headingsize = $$props.headingsize);
11594
+ if ('accent' in $$props) $$invalidate(4, accent = $$props.accent);
11563
11595
  };
11564
11596
 
11565
- return [title, actions, content, type, headingsize];
11597
+ return [title, actions, content, type, accent];
11566
11598
  }
11567
11599
 
11568
11600
  class ContainerWrapper_test extends SvelteElement {
@@ -11577,14 +11609,14 @@ class ContainerWrapper_test extends SvelteElement {
11577
11609
  customElement: true
11578
11610
  },
11579
11611
  instance$1,
11580
- create_fragment$2,
11612
+ create_fragment$1,
11581
11613
  safe_not_equal,
11582
11614
  {
11583
11615
  title: 0,
11584
11616
  actions: 1,
11585
11617
  content: 2,
11586
11618
  type: 3,
11587
- headingsize: 4
11619
+ accent: 4
11588
11620
  },
11589
11621
  null
11590
11622
  );
@@ -11602,7 +11634,7 @@ class ContainerWrapper_test extends SvelteElement {
11602
11634
  }
11603
11635
 
11604
11636
  static get observedAttributes() {
11605
- return ["title", "actions", "content", "type", "headingsize"];
11637
+ return ["title", "actions", "content", "type", "accent"];
11606
11638
  }
11607
11639
 
11608
11640
  get title() {
@@ -11641,12 +11673,12 @@ class ContainerWrapper_test extends SvelteElement {
11641
11673
  flush();
11642
11674
  }
11643
11675
 
11644
- get headingsize() {
11676
+ get accent() {
11645
11677
  return this.$$.ctx[4];
11646
11678
  }
11647
11679
 
11648
- set headingsize(headingsize) {
11649
- this.$$set({ headingsize });
11680
+ set accent(accent) {
11681
+ this.$$set({ accent });
11650
11682
  flush();
11651
11683
  }
11652
11684
  }
@@ -11655,7 +11687,7 @@ customElements.define("test-container", ContainerWrapper_test);
11655
11687
 
11656
11688
  /* libs/web-components/src/components/divider/Divider.svelte generated by Svelte v3.49.0 */
11657
11689
 
11658
- function create_fragment$1(ctx) {
11690
+ function create_fragment(ctx) {
11659
11691
  let hr;
11660
11692
 
11661
11693
  return {
@@ -11725,7 +11757,7 @@ class Divider extends SvelteElement {
11725
11757
  customElement: true
11726
11758
  },
11727
11759
  instance,
11728
- create_fragment$1,
11760
+ create_fragment,
11729
11761
  safe_not_equal,
11730
11762
  { spacing: 1 },
11731
11763
  null
@@ -11758,62 +11790,3 @@ class Divider extends SvelteElement {
11758
11790
  }
11759
11791
 
11760
11792
  customElements.define("goa-divider", Divider);
11761
-
11762
- /* libs/web-components/src/components/page/Page.svelte generated by Svelte v3.49.0 */
11763
-
11764
- function create_fragment(ctx) {
11765
- let div;
11766
-
11767
- return {
11768
- c() {
11769
- div = element("div");
11770
-
11771
- div.innerHTML = `<section class="header"><slot name="header"></slot></section>
11772
-
11773
- <main><slot></slot></main>
11774
-
11775
- <section class="footer"><slot name="footer"></slot></section>`;
11776
-
11777
- this.c = noop;
11778
- attr(div, "class", "page");
11779
- },
11780
- m(target, anchor) {
11781
- insert(target, div, anchor);
11782
- },
11783
- p: noop,
11784
- i: noop,
11785
- o: noop,
11786
- d(detaching) {
11787
- if (detaching) detach(div);
11788
- }
11789
- };
11790
- }
11791
-
11792
- class Page extends SvelteElement {
11793
- constructor(options) {
11794
- super();
11795
- this.shadowRoot.innerHTML = `<style>.page{height:100vh;display:flex;flex-direction:column}.header,.footer{flex:0 0 auto}main{flex:1 1 auto}</style>`;
11796
-
11797
- init(
11798
- this,
11799
- {
11800
- target: this.shadowRoot,
11801
- props: attribute_to_object(this.attributes),
11802
- customElement: true
11803
- },
11804
- null,
11805
- create_fragment,
11806
- safe_not_equal,
11807
- {},
11808
- null
11809
- );
11810
-
11811
- if (options) {
11812
- if (options.target) {
11813
- insert(options.target, this, options.anchor);
11814
- }
11815
- }
11816
- }
11817
- }
11818
-
11819
- customElements.define("goa-page", Page);