@abgov/react-components 4.0.0 → 4.1.0

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.
@@ -1353,6 +1353,20 @@ function toBoolean(value) {
1353
1353
  function fromBoolean(value) {
1354
1354
  return value ? "true" : "false";
1355
1355
  }
1356
+
1357
+ function typeValidator(message, values, required = false) {
1358
+ const validator = value => {
1359
+ if (!required && !value) {
1360
+ return;
1361
+ }
1362
+
1363
+ if (!values.includes(value)) {
1364
+ console.error(`[${value}] is an invalid ${message.toLowerCase()}`);
1365
+ }
1366
+ };
1367
+
1368
+ return [values, validator];
1369
+ }
1356
1370
  /* libs/web-components/src/components/badge/Badge.svelte generated by Svelte v3.51.0 */
1357
1371
 
1358
1372
 
@@ -1697,12 +1711,12 @@ function create_fragment$D(ctx) {
1697
1711
  div = element("div");
1698
1712
  slot = element("slot");
1699
1713
  this.c = noop;
1700
- set_style(div, "--alignment", "flex-" +
1701
- /*alignment*/
1714
+ set_style(div, "--alignment",
1715
+ /*_alignment*/
1702
1716
  ctx[1]);
1703
1717
  set_style(div, "--gap-size",
1704
1718
  /*gap*/
1705
- ctx[0] === "small" ? "0.5rem" : "1.25rem");
1719
+ ctx[0] === 'relaxed' ? '1rem' : '0.75rem');
1706
1720
  },
1707
1721
 
1708
1722
  m(target, anchor) {
@@ -1712,10 +1726,10 @@ function create_fragment$D(ctx) {
1712
1726
 
1713
1727
  p(ctx, [dirty]) {
1714
1728
  if (dirty &
1715
- /*alignment*/
1729
+ /*_alignment*/
1716
1730
  2) {
1717
- set_style(div, "--alignment", "flex-" +
1718
- /*alignment*/
1731
+ set_style(div, "--alignment",
1732
+ /*_alignment*/
1719
1733
  ctx[1]);
1720
1734
  }
1721
1735
 
@@ -1724,7 +1738,7 @@ function create_fragment$D(ctx) {
1724
1738
  1) {
1725
1739
  set_style(div, "--gap-size",
1726
1740
  /*gap*/
1727
- ctx[0] === "small" ? "0.5rem" : "1.25rem");
1741
+ ctx[0] === 'relaxed' ? '1rem' : '0.75rem');
1728
1742
  }
1729
1743
  },
1730
1744
 
@@ -1739,32 +1753,52 @@ function create_fragment$D(ctx) {
1739
1753
  }
1740
1754
 
1741
1755
  function instance$y($$self, $$props, $$invalidate) {
1756
+ let _alignment;
1757
+
1742
1758
  let {
1743
- gap = "medium"
1759
+ alignment = "start"
1744
1760
  } = $$props;
1745
1761
  let {
1746
- alignment
1762
+ gap = "relaxed"
1747
1763
  } = $$props;
1764
+ const [BUTTON_ALIGNMENTS, validateAlignment] = typeValidator("alignment", ["start", "end", "center"]);
1765
+ const [GAPS, validateGap] = typeValidator("gap", ["relaxed", "compact"]);
1766
+ onMount(() => {
1767
+ validateAlignment(alignment);
1768
+ validateGap(gap);
1769
+ });
1748
1770
 
1749
1771
  $$self.$$set = $$props => {
1772
+ if ('alignment' in $$props) $$invalidate(2, alignment = $$props.alignment);
1750
1773
  if ('gap' in $$props) $$invalidate(0, gap = $$props.gap);
1751
- if ('alignment' in $$props) $$invalidate(1, alignment = $$props.alignment);
1752
1774
  };
1753
1775
 
1754
- return [gap, alignment];
1776
+ $$self.$$.update = () => {
1777
+ if ($$self.$$.dirty &
1778
+ /*alignment*/
1779
+ 4) {
1780
+ $$invalidate(1, _alignment = {
1781
+ start: "flex-start",
1782
+ end: "flex-end",
1783
+ center: "center"
1784
+ }[alignment]);
1785
+ }
1786
+ };
1787
+
1788
+ return [gap, _alignment, alignment];
1755
1789
  }
1756
1790
 
1757
1791
  class ButtonGroup extends SvelteElement {
1758
1792
  constructor(options) {
1759
1793
  super();
1760
- this.shadowRoot.innerHTML = `<style>:host{box-sizing:border-box;font-family:var(--font-family)}div{display:flex;flex-direction:row;justify-content:var(--alignment);flex-wrap:wrap;gap:var(--gap-size);padding:3px 0}</style>`;
1794
+ this.shadowRoot.innerHTML = `<style>:host{box-sizing:border-box;font-family:var(--font-family)}div{display:flex;flex-direction:row;justify-content:var(--alignment);align-items:center;flex-wrap:wrap;gap:var(--gap-size);padding:3px 0}</style>`;
1761
1795
  init(this, {
1762
1796
  target: this.shadowRoot,
1763
1797
  props: attribute_to_object(this.attributes),
1764
1798
  customElement: true
1765
1799
  }, instance$y, create_fragment$D, safe_not_equal, {
1766
- gap: 0,
1767
- alignment: 1
1800
+ alignment: 2,
1801
+ gap: 0
1768
1802
  }, null);
1769
1803
 
1770
1804
  if (options) {
@@ -1780,27 +1814,27 @@ class ButtonGroup extends SvelteElement {
1780
1814
  }
1781
1815
 
1782
1816
  static get observedAttributes() {
1783
- return ["gap", "alignment"];
1817
+ return ["alignment", "gap"];
1784
1818
  }
1785
1819
 
1786
- get gap() {
1787
- return this.$$.ctx[0];
1820
+ get alignment() {
1821
+ return this.$$.ctx[2];
1788
1822
  }
1789
1823
 
1790
- set gap(gap) {
1824
+ set alignment(alignment) {
1791
1825
  this.$$set({
1792
- gap
1826
+ alignment
1793
1827
  });
1794
1828
  flush();
1795
1829
  }
1796
1830
 
1797
- get alignment() {
1798
- return this.$$.ctx[1];
1831
+ get gap() {
1832
+ return this.$$.ctx[0];
1799
1833
  }
1800
1834
 
1801
- set alignment(alignment) {
1835
+ set gap(gap) {
1802
1836
  this.$$set({
1803
- alignment
1837
+ gap
1804
1838
  });
1805
1839
  flush();
1806
1840
  }
@@ -1883,7 +1917,7 @@ function create_else_block$1(ctx) {
1883
1917
  }
1884
1918
 
1885
1919
  };
1886
- } // (53:2) {#if type === "start"}
1920
+ } // (38:2) {#if type === "start"}
1887
1921
 
1888
1922
 
1889
1923
  function create_if_block$g(ctx) {
@@ -1916,7 +1950,7 @@ function create_if_block$g(ctx) {
1916
1950
  }
1917
1951
 
1918
1952
  };
1919
- } // (57:4) {#if leadingicon}
1953
+ } // (42:4) {#if leadingicon}
1920
1954
 
1921
1955
 
1922
1956
  function create_if_block_2$6(ctx) {
@@ -1960,7 +1994,7 @@ function create_if_block_2$6(ctx) {
1960
1994
  }
1961
1995
 
1962
1996
  };
1963
- } // (61:4) {#if trailingicon}
1997
+ } // (46:4) {#if trailingicon}
1964
1998
 
1965
1999
 
1966
2000
  function create_if_block_1$9(ctx) {
@@ -2143,22 +2177,9 @@ function clickHandler(e) {
2143
2177
  function instance$x($$self, $$props, $$invalidate) {
2144
2178
  let isDisabled;
2145
2179
  let isButtonDark;
2146
- const BUTTON_TYPES = ["primary", "submit", "secondary", "tertiary", "start"];
2147
- const SIZES = ["normal", "compact"];
2148
- const VARIANTS = ["normal", "destructive"]; // type check functions
2149
-
2150
- function isButtonType(value) {
2151
- return BUTTON_TYPES.includes(value);
2152
- }
2153
-
2154
- function isSize(value) {
2155
- return SIZES.includes(value);
2156
- }
2157
-
2158
- function isVariant(value) {
2159
- return VARIANTS.includes(value);
2160
- }
2161
-
2180
+ const [Types, validateType] = typeValidator("Button type", ["primary", "submit", "secondary", "tertiary", "start"], true);
2181
+ const [Sizes, validateSize] = typeValidator("Button size", ["normal", "compact"], true);
2182
+ const [Variants, validateVariant] = typeValidator("Button variant", ["normal", "destructive"], true);
2162
2183
  let {
2163
2184
  type = "primary"
2164
2185
  } = $$props;
@@ -2181,17 +2202,9 @@ function instance$x($$self, $$props, $$invalidate) {
2181
2202
  testid = ""
2182
2203
  } = $$props;
2183
2204
  onMount(() => {
2184
- if (!isButtonType(type)) {
2185
- console.error("Invalid button type");
2186
- }
2187
-
2188
- if (!isSize(size)) {
2189
- console.error("Invalid button size");
2190
- }
2191
-
2192
- if (!isVariant(variant)) {
2193
- console.error("Invalid button variant");
2194
- }
2205
+ validateType(type);
2206
+ validateSize(size);
2207
+ validateVariant(variant);
2195
2208
  });
2196
2209
 
2197
2210
  $$self.$$set = $$props => {
@@ -2225,7 +2238,9 @@ class Button extends SvelteElement {
2225
2238
  constructor(options) {
2226
2239
  super();
2227
2240
  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,
2228
- 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-color: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-color: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-color:var(--goa-color-interactive--active);outline:none}button.secondary{border:2px solid var(--goa-color-interactive);background-color: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-color: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-color:var(--color-gray-100);outline:none}button.tertiary{border:1px solid transparent;background-color: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-color:var(--color-gray-100)}button.tertiary:focus,button.tertiary:active{border-color:var(--color-gray-100);background-color: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-color:var(--goa-color-status-emergency);border-color:var(--goa-color-status-emergency)}.submit.destructive:hover,.primary.destructive:hover{background-color:var(--goa-color-status-emergency-dark);border-color:var(--goa-color-status-emergency-dark)}.submit.destructive:focus,.primary.destructive:focus,.primary.destructive:active{background-color: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-color:var(--color-white)}.secondary.destructive:hover{border-color:var(--goa-color-status-emergency-dark);color:var(--goa-color-status-emergency-dark);background-color: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-color:var(--color-white)}.tertiary.destructive{color:var(--goa-color-status-emergency);border-color:var(--color-gray-200);background-color:var(--color-white)}.tertiary.destructive:hover{border-color:var(--goa-color-status-emergency-dark);color:var(--goa-color-status-emergency-dark);background-color: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-color:var(--color-white)}</style>`;
2241
+ border-color 0.2s ease-in-out}.text{padding-bottom:var(
2242
+ --font-valign-fix
2243
+ )}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-color: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-color: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-color:var(--goa-color-interactive--active);outline:none}button.secondary{border:2px solid var(--goa-color-interactive);background-color: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-color: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-color:var(--color-gray-100);outline:none}button.tertiary{border:1px solid transparent;background-color: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-color:var(--color-gray-100)}button.tertiary:focus,button.tertiary:active{border-color:var(--color-gray-100);background-color: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-color:var(--goa-color-status-emergency);border-color:var(--goa-color-status-emergency)}.submit.destructive:hover,.primary.destructive:hover{background-color:var(--goa-color-status-emergency-dark);border-color:var(--goa-color-status-emergency-dark)}.submit.destructive:focus,.primary.destructive:focus,.primary.destructive:active{background-color: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-color:var(--color-white)}.secondary.destructive:hover{border-color:var(--goa-color-status-emergency-dark);color:var(--goa-color-status-emergency-dark);background-color: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-color:var(--color-white)}.tertiary.destructive{color:var(--goa-color-status-emergency);border-color:var(--color-gray-200);background-color:var(--color-white)}.tertiary.destructive:hover{border-color:var(--goa-color-status-emergency-dark);color:var(--goa-color-status-emergency-dark);background-color: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-color:var(--color-white)}</style>`;
2229
2244
  init(this, {
2230
2245
  target: this.shadowRoot,
2231
2246
  props: attribute_to_object(this.attributes),
@@ -4069,7 +4084,7 @@ function create_if_block_3$4(ctx) {
4069
4084
  let div_class_value;
4070
4085
  let if_block =
4071
4086
  /*message*/
4072
- ctx[0] && create_if_block_4$1(ctx);
4087
+ ctx[0] && create_if_block_4$2(ctx);
4073
4088
  return {
4074
4089
  c() {
4075
4090
  div = element("div");
@@ -4120,7 +4135,7 @@ function create_if_block_3$4(ctx) {
4120
4135
  if (if_block) {
4121
4136
  if_block.p(ctx, dirty);
4122
4137
  } else {
4123
- if_block = create_if_block_4$1(ctx);
4138
+ if_block = create_if_block_4$2(ctx);
4124
4139
  if_block.c();
4125
4140
  if_block.m(div, null);
4126
4141
  }
@@ -4273,7 +4288,7 @@ function create_if_block_1$6(ctx) {
4273
4288
  } // (41:6) {#if message}
4274
4289
 
4275
4290
 
4276
- function create_if_block_4$1(ctx) {
4291
+ function create_if_block_4$2(ctx) {
4277
4292
  let div;
4278
4293
  let t;
4279
4294
  return {
@@ -7711,8 +7726,8 @@ function create_fragment$h(ctx) {
7711
7726
  set_custom_element_data(goa_icon, "inverted",
7712
7727
  /*isInverted*/
7713
7728
  ctx[5]);
7714
- set_style(button, "--size",
7715
- /*_size*/
7729
+ set_style(button, "--pading-size",
7730
+ /*_paddingSize*/
7716
7731
  ctx[6]);
7717
7732
  attr(button, "title",
7718
7733
  /*title*/
@@ -7780,10 +7795,10 @@ function create_fragment$h(ctx) {
7780
7795
  }
7781
7796
 
7782
7797
  if (dirty &
7783
- /*_size*/
7798
+ /*_paddingSize*/
7784
7799
  64) {
7785
- set_style(button, "--size",
7786
- /*_size*/
7800
+ set_style(button, "--pading-size",
7801
+ /*_paddingSize*/
7787
7802
  ctx[6]);
7788
7803
  }
7789
7804
 
@@ -7846,7 +7861,7 @@ function instance$f($$self, $$props, $$invalidate) {
7846
7861
  let isDisabled;
7847
7862
  let isInverted;
7848
7863
 
7849
- let _size;
7864
+ let _paddingSize;
7850
7865
 
7851
7866
  let {
7852
7867
  icon
@@ -7907,21 +7922,21 @@ function instance$f($$self, $$props, $$invalidate) {
7907
7922
  if ($$self.$$.dirty &
7908
7923
  /*size*/
7909
7924
  2) {
7910
- $$invalidate(6, _size = {
7911
- small: "1rem",
7912
- medium: "1rem",
7913
- large: "2rem"
7925
+ $$invalidate(6, _paddingSize = {
7926
+ small: "0.25rem",
7927
+ medium: "0.25rem",
7928
+ large: "0.5rem"
7914
7929
  }[size]);
7915
7930
  }
7916
7931
  };
7917
7932
 
7918
- return [icon, size, theme, title, testId, isInverted, _size, isDisabled, css, variant, disabled, inverted];
7933
+ return [icon, size, theme, title, testId, isInverted, _paddingSize, isDisabled, css, variant, disabled, inverted];
7919
7934
  }
7920
7935
 
7921
7936
  class IconButton extends SvelteElement {
7922
7937
  constructor(options) {
7923
7938
  super();
7924
- this.shadowRoot.innerHTML = `<style>:host{display:inline-flex;align-items:center;box-sizing:border-box;font-family:var(--font-family)}button,button *{box-sizing:border-box}button{display:inline-flex;align-items:center;box-sizing:border-box;justify-content:center;background:transparent;cursor:pointer;border:none;padding:0 0.75rem}.color{border-radius:0.5rem;padding:calc(var(--size) / 4);color:var(--goa-color-interactive);fill:var(--goa-color-interactive);cursor:pointer;transition:background-color 100ms ease-in, transform 100ms ease-in}.nocolor{border-radius:0.5rem;padding:calc(var(--size) / 4)}button:hover{background-color:var(--color-gray-100);border-color:var(--color-gray-100);color:var(--goa-color-interactive--hover);outline:none}button:focus,button:active{background-color:var(--color-gray-100);border-color:var(--goa-color-interactive--active);color:var(--goa-color-interactive--active);box-shadow:0 0 0 3px var(--goa-color-interactive--focus);outline:none}.color.inverted:hover{background-color:var(--goa-color-primary-dark)}button:disabled{pointer-events:none;opacity:0.5;transform:none;cursor:default}button:disabled:hover{background-color:transparent}</style>`;
7939
+ this.shadowRoot.innerHTML = `<style>:host{display:inline-flex;align-items:center;box-sizing:border-box;font-family:var(--font-family)}button,button *{box-sizing:border-box}button{display:inline-flex;align-items:center;box-sizing:border-box;justify-content:center;background:transparent;cursor:pointer;border:none;border-radius:0.5rem;padding:var(--pading-size)}.color,.dark{color:var(--goa-color-interactive);fill:var(--goa-color-interactive);cursor:pointer;transition:background-color 100ms ease-in, transform 100ms ease-in}.dark:not(.inverted){color:unset}button:hover{background-color:var(--color-gray-100);border-color:var(--color-gray-100);color:var(--goa-color-interactive--hover);outline:none}button:focus,button:active{background-color:var(--color-gray-100);border-color:var(--goa-color-interactive--active);color:var(--goa-color-interactive--active);box-shadow:0 0 0 3px var(--goa-color-interactive--focus);outline:none}.color.inverted:hover{background-color:var(--goa-color-primary-dark)}button:disabled{pointer-events:none;opacity:0.5;transform:none;cursor:default}button:disabled:hover{background-color:transparent}button.dark:hover{background-color:rgba(0, 0, 0, 0.3)}button.dark:focus,button.dark:active{background-color:rgba(0, 0, 0, 0.3);box-shadow:0 0 0 3px var(--color-white)}</style>`;
7925
7940
  init(this, {
7926
7941
  target: this.shadowRoot,
7927
7942
  props: attribute_to_object(this.attributes),
@@ -8398,7 +8413,7 @@ class Icon extends SvelteElement {
8398
8413
  customElements.define("goa-icon", Icon);
8399
8414
  /* libs/web-components/src/components/input/Input.svelte generated by Svelte v3.51.0 */
8400
8415
 
8401
- function create_if_block_4(ctx) {
8416
+ function create_if_block_4$1(ctx) {
8402
8417
  let div;
8403
8418
  let t;
8404
8419
  return {
@@ -8605,7 +8620,7 @@ function create_fragment$f(ctx) {
8605
8620
  let dispose;
8606
8621
  let if_block0 =
8607
8622
  /*prefix*/
8608
- ctx[14] && create_if_block_4(ctx);
8623
+ ctx[14] && create_if_block_4$1(ctx);
8609
8624
  let if_block1 =
8610
8625
  /*leadingicon*/
8611
8626
  ctx[5] && create_if_block_3$2(ctx);
@@ -8741,7 +8756,7 @@ function create_fragment$f(ctx) {
8741
8756
  if (if_block0) {
8742
8757
  if_block0.p(ctx, dirty);
8743
8758
  } else {
8744
- if_block0 = create_if_block_4(ctx);
8759
+ if_block0 = create_if_block_4$1(ctx);
8745
8760
  if_block0.c();
8746
8761
  if_block0.m(div0, t0);
8747
8762
  }
@@ -9840,67 +9855,76 @@ customElements.define("goa-microsite-header", MicrositeHeader);
9840
9855
 
9841
9856
  function create_if_block$4(ctx) {
9842
9857
  let goa_focus_trap;
9843
- let div4;
9858
+ let div5;
9844
9859
  let div0;
9845
9860
  let t0;
9846
- let div3;
9861
+ let div4;
9847
9862
  let t1;
9863
+ let div3;
9848
9864
  let t2;
9849
- let div1;
9850
9865
  let t3;
9851
- let slot0;
9866
+ let div1;
9852
9867
  let t4;
9868
+ let slot0;
9869
+ let t5;
9853
9870
  let div2;
9854
- let div3_intro;
9855
- let div3_outro;
9856
- let div4_style_value;
9857
- let noscroll_action;
9858
9871
  let div4_intro;
9859
9872
  let div4_outro;
9873
+ let div5_style_value;
9874
+ let noscroll_action;
9875
+ let div5_intro;
9876
+ let div5_outro;
9860
9877
  let current;
9861
9878
  let mounted;
9862
9879
  let dispose;
9863
9880
  let if_block0 =
9881
+ /*calloutvariant*/
9882
+ ctx[3] !== null && create_if_block_4(ctx);
9883
+ let if_block1 =
9864
9884
  /*heading*/
9865
9885
  ctx[0] && create_if_block_3(ctx);
9866
- let if_block1 =
9886
+ let if_block2 =
9867
9887
  /*isClosable*/
9868
- ctx[3] && create_if_block_2$1(ctx);
9888
+ ctx[4] && create_if_block_2$1(ctx);
9869
9889
 
9870
9890
  function select_block_type(ctx, dirty) {
9871
9891
  return create_if_block_1$2;
9872
9892
  }
9873
9893
 
9874
9894
  let current_block_type = select_block_type();
9875
- let if_block2 = current_block_type(ctx);
9895
+ let if_block3 = current_block_type(ctx);
9876
9896
  return {
9877
9897
  c() {
9878
9898
  goa_focus_trap = element("goa-focus-trap");
9879
- div4 = element("div");
9899
+ div5 = element("div");
9880
9900
  div0 = element("div");
9881
9901
  t0 = space();
9882
- div3 = element("div");
9902
+ div4 = element("div");
9883
9903
  if (if_block0) if_block0.c();
9884
9904
  t1 = space();
9905
+ div3 = element("div");
9885
9906
  if (if_block1) if_block1.c();
9886
9907
  t2 = space();
9887
- div1 = element("div");
9888
- if_block2.c();
9908
+ if (if_block2) if_block2.c();
9889
9909
  t3 = space();
9890
- slot0 = element("slot");
9910
+ div1 = element("div");
9911
+ if_block3.c();
9891
9912
  t4 = space();
9913
+ slot0 = element("slot");
9914
+ t5 = space();
9892
9915
  div2 = element("div");
9893
9916
  div2.innerHTML = `<slot name="actions"></slot>`;
9894
9917
  attr(div0, "data-testid", "modal-overlay");
9895
9918
  attr(div0, "class", "modal-overlay");
9896
9919
  attr(div1, "data-testid", "modal-content");
9897
9920
  attr(div1, "class", "modal-content");
9898
- attr(div2, "data-testid", "modal-actions");
9899
9921
  attr(div2, "class", "modal-actions");
9900
- attr(div3, "class", "modal-pane");
9901
- attr(div4, "data-testid", "modal");
9902
- attr(div4, "class", "modal");
9903
- attr(div4, "style", div4_style_value = "" + ((
9922
+ attr(div2, "data-testid", "modal-actions");
9923
+ attr(div3, "class", "content");
9924
+ attr(div4, "class", "modal-pane");
9925
+ attr(div5, "data-testid", "modal");
9926
+ attr(div5, "class", "modal");
9927
+ attr(div5, "style", div5_style_value = "" + ((
9904
9928
  /*width*/
9905
9929
  ctx[2] && `--width: ${
9906
9930
  /*width*/
@@ -9912,29 +9936,32 @@ function create_if_block$4(ctx) {
9912
9936
 
9913
9937
  m(target, anchor) {
9914
9938
  insert(target, goa_focus_trap, anchor);
9915
- append(goa_focus_trap, div4);
9916
- append(div4, div0);
9917
- append(div4, t0);
9939
+ append(goa_focus_trap, div5);
9940
+ append(div5, div0);
9941
+ append(div5, t0);
9942
+ append(div5, div4);
9943
+ if (if_block0) if_block0.m(div4, null);
9944
+ append(div4, t1);
9918
9945
  append(div4, div3);
9919
- if (if_block0) if_block0.m(div3, null);
9920
- append(div3, t1);
9921
9946
  if (if_block1) if_block1.m(div3, null);
9922
9947
  append(div3, t2);
9948
+ if (if_block2) if_block2.m(div3, null);
9949
+ append(div3, t3);
9923
9950
  append(div3, div1);
9924
- if_block2.m(div1, null);
9925
- append(div1, t3);
9951
+ if_block3.m(div1, null);
9952
+ append(div1, t4);
9926
9953
  append(div1, slot0);
9927
- append(div3, t4);
9954
+ append(div3, t5);
9928
9955
  append(div3, div2);
9929
9956
  current = true;
9930
9957
 
9931
9958
  if (!mounted) {
9932
9959
  dispose = [listen(div0, "click",
9933
9960
  /*close*/
9934
- ctx[6]), action_destroyer(noscroll_action = noscroll.call(null, div4, {
9961
+ ctx[8]), action_destroyer(noscroll_action = noscroll.call(null, div5, {
9935
9962
  enable:
9936
9963
  /*isOpen*/
9937
- ctx[5]
9964
+ ctx[7]
9938
9965
  }))];
9939
9966
  mounted = true;
9940
9967
  }
@@ -9944,14 +9971,14 @@ function create_if_block$4(ctx) {
9944
9971
  ctx = new_ctx;
9945
9972
 
9946
9973
  if (
9947
- /*heading*/
9948
- ctx[0]) {
9974
+ /*calloutvariant*/
9975
+ ctx[3] !== null) {
9949
9976
  if (if_block0) {
9950
9977
  if_block0.p(ctx, dirty);
9951
9978
  } else {
9952
- if_block0 = create_if_block_3(ctx);
9979
+ if_block0 = create_if_block_4(ctx);
9953
9980
  if_block0.c();
9954
- if_block0.m(div3, t1);
9981
+ if_block0.m(div4, t1);
9955
9982
  }
9956
9983
  } else if (if_block0) {
9957
9984
  if_block0.d(1);
@@ -9959,12 +9986,12 @@ function create_if_block$4(ctx) {
9959
9986
  }
9960
9987
 
9961
9988
  if (
9962
- /*isClosable*/
9963
- ctx[3]) {
9989
+ /*heading*/
9990
+ ctx[0]) {
9964
9991
  if (if_block1) {
9965
9992
  if_block1.p(ctx, dirty);
9966
9993
  } else {
9967
- if_block1 = create_if_block_2$1(ctx);
9994
+ if_block1 = create_if_block_3(ctx);
9968
9995
  if_block1.c();
9969
9996
  if_block1.m(div3, t2);
9970
9997
  }
@@ -9973,22 +10000,37 @@ function create_if_block$4(ctx) {
9973
10000
  if_block1 = null;
9974
10001
  }
9975
10002
 
10003
+ if (
10004
+ /*isClosable*/
10005
+ ctx[4]) {
10006
+ if (if_block2) {
10007
+ if_block2.p(ctx, dirty);
10008
+ } else {
10009
+ if_block2 = create_if_block_2$1(ctx);
10010
+ if_block2.c();
10011
+ if_block2.m(div3, t3);
10012
+ }
10013
+ } else if (if_block2) {
10014
+ if_block2.d(1);
10015
+ if_block2 = null;
10016
+ }
10017
+
9976
10018
  if (!current || dirty &
9977
10019
  /*width*/
9978
- 4 && div4_style_value !== (div4_style_value = "" + ((
10020
+ 4 && div5_style_value !== (div5_style_value = "" + ((
9979
10021
  /*width*/
9980
10022
  ctx[2] && `--width: ${
9981
10023
  /*width*/
9982
10024
  ctx[2]};`) + ";"))) {
9983
- attr(div4, "style", div4_style_value);
10025
+ attr(div5, "style", div5_style_value);
9984
10026
  }
9985
10027
 
9986
10028
  if (noscroll_action && is_function(noscroll_action.update) && dirty &
9987
10029
  /*isOpen*/
9988
- 32) noscroll_action.update.call(null, {
10030
+ 128) noscroll_action.update.call(null, {
9989
10031
  enable:
9990
10032
  /*isOpen*/
9991
- ctx[5]
10033
+ ctx[7]
9992
10034
  });
9993
10035
 
9994
10036
  if (!current || dirty &
@@ -10003,46 +10045,46 @@ function create_if_block$4(ctx) {
10003
10045
  i(local) {
10004
10046
  if (current) return;
10005
10047
  add_render_callback(() => {
10006
- if (div3_outro) div3_outro.end(1);
10007
- div3_intro = create_in_transition(div3, fly, {
10048
+ if (div4_outro) div4_outro.end(1);
10049
+ div4_intro = create_in_transition(div4, fly, {
10008
10050
  duration:
10009
10051
  /*_transitionTime*/
10010
- ctx[4],
10052
+ ctx[6],
10011
10053
  y: 200
10012
10054
  });
10013
- div3_intro.start();
10055
+ div4_intro.start();
10014
10056
  });
10015
10057
  add_render_callback(() => {
10016
- if (div4_outro) div4_outro.end(1);
10017
- div4_intro = create_in_transition(div4, fade, {
10058
+ if (div5_outro) div5_outro.end(1);
10059
+ div5_intro = create_in_transition(div5, fade, {
10018
10060
  duration:
10019
10061
  /*_transitionTime*/
10020
- ctx[4]
10062
+ ctx[6]
10021
10063
  });
10022
- div4_intro.start();
10064
+ div5_intro.start();
10023
10065
  });
10024
10066
  current = true;
10025
10067
  },
10026
10068
 
10027
10069
  o(local) {
10028
- if (div3_intro) div3_intro.invalidate();
10029
- div3_outro = create_out_transition(div3, fly, {
10070
+ if (div4_intro) div4_intro.invalidate();
10071
+ div4_outro = create_out_transition(div4, fly, {
10030
10072
  delay:
10031
10073
  /*_transitionTime*/
10032
- ctx[4],
10074
+ ctx[6],
10033
10075
  duration:
10034
10076
  /*_transitionTime*/
10035
- ctx[4],
10077
+ ctx[6],
10036
10078
  y: -100
10037
10079
  });
10038
- if (div4_intro) div4_intro.invalidate();
10039
- div4_outro = create_out_transition(div4, fade, {
10080
+ if (div5_intro) div5_intro.invalidate();
10081
+ div5_outro = create_out_transition(div5, fade, {
10040
10082
  delay:
10041
10083
  /*_transitionTime*/
10042
- ctx[4],
10084
+ ctx[6],
10043
10085
  duration:
10044
10086
  /*_transitionTime*/
10045
- ctx[4]
10087
+ ctx[6]
10046
10088
  });
10047
10089
  current = false;
10048
10090
  },
@@ -10051,15 +10093,75 @@ function create_if_block$4(ctx) {
10051
10093
  if (detaching) detach(goa_focus_trap);
10052
10094
  if (if_block0) if_block0.d();
10053
10095
  if (if_block1) if_block1.d();
10054
- if_block2.d();
10055
- if (detaching && div3_outro) div3_outro.end();
10096
+ if (if_block2) if_block2.d();
10097
+ if_block3.d();
10056
10098
  if (detaching && div4_outro) div4_outro.end();
10099
+ if (detaching && div5_outro) div5_outro.end();
10057
10100
  mounted = false;
10058
10101
  run_all(dispose);
10059
10102
  }
10060
10103
 
10061
10104
  };
10062
- } // (53:8) {#if heading}
10105
+ } // (65:8) {#if calloutvariant !== null}
10106
+
10107
+
10108
+ function create_if_block_4(ctx) {
10109
+ let div;
10110
+ let goa_icon;
10111
+ let goa_icon_inverted_value;
10112
+ let div_class_value;
10113
+ return {
10114
+ c() {
10115
+ div = element("div");
10116
+ goa_icon = element("goa-icon");
10117
+ set_custom_element_data(goa_icon, "type",
10118
+ /*iconType*/
10119
+ ctx[5]);
10120
+ set_custom_element_data(goa_icon, "inverted", goa_icon_inverted_value =
10121
+ /*calloutvariant*/
10122
+ ctx[3] === "important" ? "false" : "true");
10123
+ attr(div, "class", div_class_value = "callout-bar " +
10124
+ /*calloutvariant*/
10125
+ ctx[3]);
10126
+ },
10127
+
10128
+ m(target, anchor) {
10129
+ insert(target, div, anchor);
10130
+ append(div, goa_icon);
10131
+ },
10132
+
10133
+ p(ctx, dirty) {
10134
+ if (dirty &
10135
+ /*iconType*/
10136
+ 32) {
10137
+ set_custom_element_data(goa_icon, "type",
10138
+ /*iconType*/
10139
+ ctx[5]);
10140
+ }
10141
+
10142
+ if (dirty &
10143
+ /*calloutvariant*/
10144
+ 8 && goa_icon_inverted_value !== (goa_icon_inverted_value =
10145
+ /*calloutvariant*/
10146
+ ctx[3] === "important" ? "false" : "true")) {
10147
+ set_custom_element_data(goa_icon, "inverted", goa_icon_inverted_value);
10148
+ }
10149
+
10150
+ if (dirty &
10151
+ /*calloutvariant*/
10152
+ 8 && div_class_value !== (div_class_value = "callout-bar " +
10153
+ /*calloutvariant*/
10154
+ ctx[3])) {
10155
+ attr(div, "class", div_class_value);
10156
+ }
10157
+ },
10158
+
10159
+ d(detaching) {
10160
+ if (detaching) detach(div);
10161
+ }
10162
+
10163
+ };
10164
+ } // (74:10) {#if heading}
10063
10165
 
10064
10166
 
10065
10167
  function create_if_block_3(ctx) {
@@ -10093,7 +10195,7 @@ function create_if_block_3(ctx) {
10093
10195
  }
10094
10196
 
10095
10197
  };
10096
- } // (56:8) {#if isClosable}
10198
+ } // (77:10) {#if isClosable}
10097
10199
 
10098
10200
 
10099
10201
  function create_if_block_2$1(ctx) {
@@ -10107,6 +10209,7 @@ function create_if_block_2$1(ctx) {
10107
10209
  goa_icon_button = element("goa-icon-button");
10108
10210
  set_custom_element_data(goa_icon_button, "data-testid", "modal-close-button");
10109
10211
  set_custom_element_data(goa_icon_button, "icon", "close");
10212
+ set_custom_element_data(goa_icon_button, "variant", "nocolor");
10110
10213
  attr(div, "class", "modal-close");
10111
10214
  },
10112
10215
 
@@ -10117,7 +10220,7 @@ function create_if_block_2$1(ctx) {
10117
10220
  if (!mounted) {
10118
10221
  dispose = listen(goa_icon_button, "click",
10119
10222
  /*close*/
10120
- ctx[6]);
10223
+ ctx[8]);
10121
10224
  mounted = true;
10122
10225
  }
10123
10226
  },
@@ -10131,7 +10234,7 @@ function create_if_block_2$1(ctx) {
10131
10234
  }
10132
10235
 
10133
10236
  };
10134
- } // (67:10) {#if isScrollable}
10237
+ } // (89:12) {#if isScrollable}
10135
10238
 
10136
10239
 
10137
10240
  function create_if_block_1$2(ctx) {
@@ -10142,7 +10245,6 @@ function create_if_block_1$2(ctx) {
10142
10245
  goa_scrollable.innerHTML = `<slot></slot>`;
10143
10246
  set_custom_element_data(goa_scrollable, "direction", "vertical");
10144
10247
  set_custom_element_data(goa_scrollable, "height", "50");
10145
- set_custom_element_data(goa_scrollable, "hpadding", "1.75");
10146
10248
  },
10147
10249
 
10148
10250
  m(target, anchor) {
@@ -10161,7 +10263,7 @@ function create_fragment$d(ctx) {
10161
10263
  let current;
10162
10264
  let if_block =
10163
10265
  /*isOpen*/
10164
- ctx[5] && create_if_block$4(ctx);
10266
+ ctx[7] && create_if_block$4(ctx);
10165
10267
  return {
10166
10268
  c() {
10167
10269
  if (if_block) if_block.c();
@@ -10178,13 +10280,13 @@ function create_fragment$d(ctx) {
10178
10280
  p(ctx, [dirty]) {
10179
10281
  if (
10180
10282
  /*isOpen*/
10181
- ctx[5]) {
10283
+ ctx[7]) {
10182
10284
  if (if_block) {
10183
10285
  if_block.p(ctx, dirty);
10184
10286
 
10185
10287
  if (dirty &
10186
10288
  /*isOpen*/
10187
- 32) {
10289
+ 128) {
10188
10290
  transition_in(if_block, 1);
10189
10291
  }
10190
10292
  } else {
@@ -10227,6 +10329,8 @@ function instance$b($$self, $$props, $$invalidate) {
10227
10329
 
10228
10330
  let _transitionTime;
10229
10331
 
10332
+ let iconType;
10333
+ const [CALLOUT_VARIANT, validateCalloutVariant] = typeValidator("Callout variant", ["emergency", "important", "information", "success", "event"]);
10230
10334
  let {
10231
10335
  heading = ""
10232
10336
  } = $$props;
@@ -10242,6 +10346,9 @@ function instance$b($$self, $$props, $$invalidate) {
10242
10346
  let {
10243
10347
  width = ""
10244
10348
  } = $$props;
10349
+ let {
10350
+ calloutvariant = null
10351
+ } = $$props;
10245
10352
 
10246
10353
  function close(e) {
10247
10354
  if (!isClosable) {
@@ -10254,51 +10361,63 @@ function instance$b($$self, $$props, $$invalidate) {
10254
10361
  e.stopPropagation();
10255
10362
  }
10256
10363
 
10364
+ onMount(() => {
10365
+ validateCalloutVariant(calloutvariant);
10366
+ });
10367
+
10257
10368
  $$self.$$set = $$props => {
10258
10369
  if ('heading' in $$props) $$invalidate(0, heading = $$props.heading);
10259
- if ('closable' in $$props) $$invalidate(7, closable = $$props.closable);
10370
+ if ('closable' in $$props) $$invalidate(9, closable = $$props.closable);
10260
10371
  if ('open' in $$props) $$invalidate(1, open = $$props.open);
10261
- if ('transition' in $$props) $$invalidate(8, transition = $$props.transition);
10372
+ if ('transition' in $$props) $$invalidate(10, transition = $$props.transition);
10262
10373
  if ('width' in $$props) $$invalidate(2, width = $$props.width);
10374
+ if ('calloutvariant' in $$props) $$invalidate(3, calloutvariant = $$props.calloutvariant);
10263
10375
  };
10264
10376
 
10265
10377
  $$self.$$.update = () => {
10266
10378
  if ($$self.$$.dirty &
10267
10379
  /*closable*/
10268
- 128) {
10269
- $$invalidate(3, isClosable = toBoolean(closable));
10380
+ 512) {
10381
+ $$invalidate(4, isClosable = toBoolean(closable));
10270
10382
  }
10271
10383
 
10272
10384
  if ($$self.$$.dirty &
10273
10385
  /*open*/
10274
10386
  2) {
10275
- $$invalidate(5, isOpen = toBoolean(open));
10387
+ $$invalidate(7, isOpen = toBoolean(open));
10276
10388
  }
10277
10389
 
10278
10390
  if ($$self.$$.dirty &
10279
10391
  /*transition*/
10280
- 256) {
10281
- $$invalidate(4, _transitionTime = transition === "none" ? 0 : transition === "slow" ? 400 : 200);
10392
+ 1024) {
10393
+ $$invalidate(6, _transitionTime = transition === "none" ? 0 : transition === "slow" ? 400 : 200);
10394
+ }
10395
+
10396
+ if ($$self.$$.dirty &
10397
+ /*calloutvariant*/
10398
+ 8) {
10399
+ $$invalidate(5, iconType = calloutvariant === "emergency" ? "warning" : calloutvariant === "important" ? "alert-circle" : calloutvariant === "information" ? "information-circle" : calloutvariant === "success" ? "checkmark-circle" : calloutvariant === "event" ? "calendar" : "");
10282
10400
  }
10283
10401
  };
10284
10402
 
10285
- return [heading, open, width, isClosable, _transitionTime, isOpen, close, closable, transition];
10403
+ return [heading, open, width, calloutvariant, isClosable, iconType, _transitionTime, isOpen, close, closable, transition];
10286
10404
  }
10287
10405
 
10288
10406
  class Modal extends SvelteElement {
10289
10407
  constructor(options) {
10290
10408
  super();
10291
- this.shadowRoot.innerHTML = `<style>:host{box-sizing:border-box;font-family:var(--font-family)}.modal{font-family:var(--font-family);position:fixed;inset:0;display:flex;align-items:center;justify-content:center;height:100vh;width:100%;z-index:100}.modal-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.2);z-index:1000}.modal-pane{position:relative;background-color:#fff;z-index:1001;width:90%;margin:1rem;box-shadow:var(--shadow-2);border-radius:4px;max-height:90%}@media(min-width: 640px){.modal-pane{width:var(--width, 60ch);max-height:80%}}.modal-actions{text-align:right;padding:0 1.75rem;margin:1.75rem 0;flex:1 1 auto}.modal-close{position:absolute;top:1rem;right:1rem}.modal-title{font-size:var(--fs-xl);padding-bottom:1rem;padding:0 1.75rem;margin:1.75rem 0;margin-right:40px;flex:0 0 auto}</style>`;
10409
+ this.shadowRoot.innerHTML = `<style>:host{box-sizing:border-box;font-family:var(--font-family)}.modal{font-family:var(--font-family);position:fixed;inset:0;display:flex;align-items:center;justify-content:center;height:100vh;width:100%;z-index:100}.modal-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.2);z-index:1000}.emergency{background-color:var(--goa-color-status-emergency)}.important{background-color:var(--goa-color-status-warning)}.information{background-color:var(--goa-color-status-info)}.event{background-color:var(--goa-color-status-info)}.success{background-color:var(--goa-color-status-success)}.callout-bar{flex:0 0 3rem;text-align:center;padding-top:2rem;border-radius:4px 0px 0px 4px}.content{flex:1 1 auto;width:100%;margin:2rem 2rem}.modal-pane{position:relative;background-color:#fff;z-index:1001;width:90%;display:flex;margin:1rem;box-shadow:6px 6px 6px rgba(0, 0, 0, 0.16);border-radius:4px;max-height:90%;border:1px solid var(--color-gray-600)}@media(min-width: 640px){.modal-pane{width:var(--width, 60ch);max-height:80%}}.modal-actions ::slotted(div){margin:1.5rem 0 0}.modal-close{position:absolute;top:2rem;right:2rem}.modal-title{font-size:var(--fs-xl);margin:0 0 1.5rem;margin-right:40px;flex:0 0 auto}.modal-content{line-height:1.75rem}</style>`;
10292
10410
  init(this, {
10293
10411
  target: this.shadowRoot,
10294
10412
  props: attribute_to_object(this.attributes),
10295
10413
  customElement: true
10296
10414
  }, instance$b, create_fragment$d, safe_not_equal, {
10297
10415
  heading: 0,
10298
- closable: 7,
10416
+ closable: 9,
10299
10417
  open: 1,
10300
- transition: 8,
10301
- width: 2
10418
+ transition: 10,
10419
+ width: 2,
10420
+ calloutvariant: 3
10302
10421
  }, null);
10303
10422
 
10304
10423
  if (options) {
@@ -10314,7 +10433,7 @@ class Modal extends SvelteElement {
10314
10433
  }
10315
10434
 
10316
10435
  static get observedAttributes() {
10317
- return ["heading", "closable", "open", "transition", "width"];
10436
+ return ["heading", "closable", "open", "transition", "width", "calloutvariant"];
10318
10437
  }
10319
10438
 
10320
10439
  get heading() {
@@ -10329,7 +10448,7 @@ class Modal extends SvelteElement {
10329
10448
  }
10330
10449
 
10331
10450
  get closable() {
10332
- return this.$$.ctx[7];
10451
+ return this.$$.ctx[9];
10333
10452
  }
10334
10453
 
10335
10454
  set closable(closable) {
@@ -10351,7 +10470,7 @@ class Modal extends SvelteElement {
10351
10470
  }
10352
10471
 
10353
10472
  get transition() {
10354
- return this.$$.ctx[8];
10473
+ return this.$$.ctx[10];
10355
10474
  }
10356
10475
 
10357
10476
  set transition(transition) {
@@ -10372,6 +10491,17 @@ class Modal extends SvelteElement {
10372
10491
  flush();
10373
10492
  }
10374
10493
 
10494
+ get calloutvariant() {
10495
+ return this.$$.ctx[3];
10496
+ }
10497
+
10498
+ set calloutvariant(calloutvariant) {
10499
+ this.$$set({
10500
+ calloutvariant
10501
+ });
10502
+ flush();
10503
+ }
10504
+
10375
10505
  }
10376
10506
 
10377
10507
  customElements.define("goa-modal", Modal);
@@ -10381,11 +10511,13 @@ function create_if_block$3(ctx) {
10381
10511
  let div3;
10382
10512
  let div0;
10383
10513
  let goa_icon;
10514
+ let goa_icon_inverted_value;
10384
10515
  let t0;
10385
10516
  let div1;
10386
10517
  let t1;
10387
10518
  let div2;
10388
10519
  let goa_icon_button;
10520
+ let goa_icon_button_inverted_value;
10389
10521
  let div3_class_value;
10390
10522
  let div3_transition;
10391
10523
  let current;
@@ -10405,11 +10537,16 @@ function create_if_block$3(ctx) {
10405
10537
  set_custom_element_data(goa_icon, "type",
10406
10538
  /*iconType*/
10407
10539
  ctx[2]);
10408
- set_custom_element_data(goa_icon, "inverted", "");
10540
+ set_custom_element_data(goa_icon, "inverted", goa_icon_inverted_value =
10541
+ /*type*/
10542
+ ctx[0] === "important" ? "false" : "true");
10409
10543
  attr(div0, "class", "icon");
10410
10544
  attr(div1, "class", "content");
10411
10545
  set_custom_element_data(goa_icon_button, "icon", "close");
10412
- set_custom_element_data(goa_icon_button, "inverted", "");
10546
+ set_custom_element_data(goa_icon_button, "variant", "dark");
10547
+ set_custom_element_data(goa_icon_button, "inverted", goa_icon_button_inverted_value =
10548
+ /*type*/
10549
+ ctx[0] === "important" ? "false" : "true");
10413
10550
  attr(div2, "class", "close");
10414
10551
  attr(div3, "class", div3_class_value = "notification " +
10415
10552
  /*type*/
@@ -10444,6 +10581,22 @@ function create_if_block$3(ctx) {
10444
10581
  ctx[2]);
10445
10582
  }
10446
10583
 
10584
+ if (!current || dirty &
10585
+ /*type*/
10586
+ 1 && goa_icon_inverted_value !== (goa_icon_inverted_value =
10587
+ /*type*/
10588
+ ctx[0] === "important" ? "false" : "true")) {
10589
+ set_custom_element_data(goa_icon, "inverted", goa_icon_inverted_value);
10590
+ }
10591
+
10592
+ if (!current || dirty &
10593
+ /*type*/
10594
+ 1 && goa_icon_button_inverted_value !== (goa_icon_button_inverted_value =
10595
+ /*type*/
10596
+ ctx[0] === "important" ? "false" : "true")) {
10597
+ set_custom_element_data(goa_icon_button, "inverted", goa_icon_button_inverted_value);
10598
+ }
10599
+
10447
10600
  if (!current || dirty &
10448
10601
  /*type*/
10449
10602
  1 && div3_class_value !== (div3_class_value = "notification " +
@@ -10546,9 +10699,20 @@ function create_fragment$c(ctx) {
10546
10699
  function instance$a($$self, $$props, $$invalidate) {
10547
10700
  let iconType;
10548
10701
  let {
10549
- type
10702
+ type = ""
10550
10703
  } = $$props;
10704
+ const NOTIFICATION_TYPES = ["emergency", "important", "information", "event"]; // type check function
10705
+
10706
+ function isNotificationType(value) {
10707
+ return NOTIFICATION_TYPES.includes(value);
10708
+ }
10709
+
10551
10710
  let show = true;
10711
+ onMount(() => {
10712
+ if (!isNotificationType(type)) {
10713
+ console.error("Invalid notification type");
10714
+ }
10715
+ });
10552
10716
 
10553
10717
  function close() {
10554
10718
  $$invalidate(1, show = false);
@@ -10562,7 +10726,7 @@ function instance$a($$self, $$props, $$invalidate) {
10562
10726
  if ($$self.$$.dirty &
10563
10727
  /*type*/
10564
10728
  1) {
10565
- $$invalidate(2, iconType = type === "emergency" ? "warning" : type === "caution" ? "alert-circle" : type === "information" ? "information-circle" : "calendar");
10729
+ $$invalidate(2, iconType = type === "emergency" ? "warning" : type === "important" ? "alert-circle" : type === "information" ? "information-circle" : type === "event" ? "calendar" : "");
10566
10730
  }
10567
10731
  };
10568
10732
 
@@ -10572,7 +10736,7 @@ function instance$a($$self, $$props, $$invalidate) {
10572
10736
  class Notification extends SvelteElement {
10573
10737
  constructor(options) {
10574
10738
  super();
10575
- this.shadowRoot.innerHTML = `<style>:host{box-sizing:border-box;font-family:var(--font-family)}.notification{padding:1.5rem;display:flex;align-items:center;gap:1rem;border-radius:3px}.emergency{background-color:var(--goa-color-status-emergency);color:var(--color-white)}.caution{background-color:var(--goa-color-status-warning)}.information{background-color:var(--goa-color-status-info);color:var(--color-white)}.event{background-color:var(--goa-color-status-success);color:var(--color-white)}.icon{flex:0 0 auto;align-self:flex-start}.content{flex:1 1 auto}.close{flex:0 0 auto;align-self:flex-start}</style>`;
10739
+ this.shadowRoot.innerHTML = `<style>:host{box-sizing:border-box;font-family:var(--font-family)}.notification{padding:1.5rem;display:flex;gap:1rem}.emergency{background-color:var(--goa-color-status-emergency);color:var(--color-white)}.important{background-color:var(--goa-color-status-warning)}.information{background-color:var(--goa-color-status-info);color:var(--color-white)}.event{background-color:var(--goa-color-status-success);color:var(--color-white)}.icon{flex:0 0 auto}.content{flex:1 1 auto}::slotted(a){color:unset !important;outline:unset !important}.close{flex:0 0 auto}</style>`;
10576
10740
  init(this, {
10577
10741
  target: this.shadowRoot,
10578
10742
  props: attribute_to_object(this.attributes),
@@ -13915,10 +14079,12 @@ styleInject(css_248z$1);
13915
14079
 
13916
14080
  const GoAButtonGroup = ({
13917
14081
  alignment,
14082
+ gap,
13918
14083
  children
13919
14084
  }) => {
13920
14085
  return jsx("goa-button-group", Object.assign({
13921
- alignment: alignment
14086
+ alignment: alignment,
14087
+ gap: gap
13922
14088
  }, {
13923
14089
  children: children
13924
14090
  }), void 0);
@@ -14590,9 +14756,16 @@ const GoAModal = ({
14590
14756
  width,
14591
14757
  actions,
14592
14758
  transition,
14759
+ type,
14760
+ calloutVariant,
14593
14761
  onClose
14594
14762
  }) => {
14595
14763
  const el = useRef(null);
14764
+ useEffect(() => {
14765
+ if (type) {
14766
+ console.warn("GoAModal [type] is deprecated.");
14767
+ }
14768
+ }, [type]);
14596
14769
  useEffect(() => {
14597
14770
  if (!el.current) {
14598
14771
  return;
@@ -14616,7 +14789,8 @@ const GoAModal = ({
14616
14789
  closable: !!onClose,
14617
14790
  scrollable: true,
14618
14791
  width: width,
14619
- transition: transition
14792
+ transition: transition,
14793
+ calloutVariant: calloutVariant
14620
14794
  }, {
14621
14795
  children: [actions && jsx("div", Object.assign({
14622
14796
  slot: "actions"