@abgov/web-components 1.34.0-alpha.4 → 1.34.1-alpha.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.
Files changed (2) hide show
  1. package/index.js +18 -14
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -11866,7 +11866,9 @@ class qc extends be {
11866
11866
  }
11867
11867
  customElements.define("goa-file-upload-card", ve(qc, { filename: {}, size: {}, type: {}, progress: {}, error: {}, testid: {} }, [], [], !0));
11868
11868
  function Dc(t) {
11869
- ye(t, "svelte-1mfs51e", '.dragdrop.svelte-1mfs51e.svelte-1mfs51e{border-radius:var(--goa-file-upload-border-radius);border:var(--goa-file-upload-border);display:flex;font:var(--goa-file-upload-instruction-text);flex-direction:column;align-items:center;justify-content:center;gap:var(--goa-file-upload-text-gap);padding:var(--goa-file-upload-padding);color:var(--goa-file-upload-instruction-color);text-align:center;cursor:pointer;background:var(--goa-file-upload-color-bg);container:self / inline-size}.dragdrop.svelte-1mfs51e.svelte-1mfs51e:active{border:var(--goa-file-upload-border-active);outline:none}.dragdrop.svelte-1mfs51e.svelte-1mfs51e:focus-within{border:var(--goa-file-upload-border-hover);box-shadow:var(--goa-file-upload-border-focus);background-color:var(--goa-file-upload-color-bg-focus);color:var(--goa-file-upload-instruction-color-focus)}.state-hover.svelte-1mfs51e.svelte-1mfs51e{background:var(--goa-file-upload-color-bg-hover);border:var(--goa-file-upload-border-hover);color:var(--goa-file-upload-instruction-color-hover)}.state-dragenter.svelte-1mfs51e.svelte-1mfs51e{background:var(--goa-file-upload-color-bg-drag);border:var(--goa-file-upload-border-drag);color:var(--goa-file-upload-instruction-color-drag)}.instructions.svelte-1mfs51e.svelte-1mfs51e{display:flex;align-items:center}goa-icon.svelte-1mfs51e.svelte-1mfs51e{margin:0 var(--goa-space-s)}.browse-files.svelte-1mfs51e.svelte-1mfs51e{text-decoration:underline}em.svelte-1mfs51e.svelte-1mfs51e{font-style:normal;font:var(--goa-file-upload-help-text);color:var(--goa-file-upload-help-text-color)}.or-text.svelte-1mfs51e.svelte-1mfs51e{margin:var(--goa-space-3xs) var(--goa-space-xs) 0 var(--goa-space-xs)}.max-file-size.svelte-1mfs51e.svelte-1mfs51e{display:block}.button.svelte-1mfs51e .max-file-size.svelte-1mfs51e{margin-top:var(--goa-space-xs)}input[type="file"].svelte-1mfs51e.svelte-1mfs51e{position:absolute;left:-9999px}.issues.svelte-1mfs51e.svelte-1mfs51e{border-bottom:1px solid var(--goa-color-greyscale-200);margin:1rem 0}.issue.svelte-1mfs51e.svelte-1mfs51e{margin-bottom:1rem}.error.svelte-1mfs51e.svelte-1mfs51e{color:var(--goa-color-interactive-error);font-size:0.9em;display:flex;align-items:center;gap:0.5rem}@container self (max-width: 623px){.dragdrop.svelte-1mfs51e.svelte-1mfs51e{padding-top:1.75rem}.instructions.svelte-1mfs51e.svelte-1mfs51e{flex-direction:column}}');
11869
+ ye(t, "svelte-t8ftke", `.dragdrop.svelte-t8ftke.svelte-t8ftke{border-radius:var(--goa-file-upload-border-radius);border:var(--goa-file-upload-border);display:flex;font:var(--goa-file-upload-instruction-text);flex-direction:column;align-items:center;justify-content:center;gap:var(
11870
+ --goa-file-upload-text-gap
11871
+ );padding:var(--goa-file-upload-padding);color:var(--goa-file-upload-instruction-color);text-align:center;cursor:pointer;background:var(--goa-file-upload-color-bg);container:self / inline-size}.dragdrop.svelte-t8ftke.svelte-t8ftke:active{border:var(--goa-file-upload-border-active);outline:none}.dragdrop.svelte-t8ftke.svelte-t8ftke:focus-within{border:var(--goa-file-upload-border-hover);box-shadow:var(--goa-file-upload-border-focus);background-color:var(--goa-file-upload-color-bg-focus);color:var(--goa-file-upload-instruction-color-focus)}.state-hover.svelte-t8ftke.svelte-t8ftke{background:var(--goa-file-upload-color-bg-hover);border:var(--goa-file-upload-border-hover);color:var(--goa-file-upload-instruction-color-hover)}.state-dragenter.svelte-t8ftke.svelte-t8ftke{background:var(--goa-file-upload-color-bg-drag);border:var(--goa-file-upload-border-drag);color:var(--goa-file-upload-instruction-color-drag)}.instructions.svelte-t8ftke.svelte-t8ftke{display:flex;align-items:center}goa-icon.svelte-t8ftke.svelte-t8ftke{margin:0 var(--goa-space-s)}.browse-files.svelte-t8ftke.svelte-t8ftke{text-decoration:underline}em.svelte-t8ftke.svelte-t8ftke{font-style:normal;font:var(--goa-file-upload-help-text);color:var(--goa-file-upload-help-text-color)}.or-text.svelte-t8ftke.svelte-t8ftke{margin:var(--goa-space-3xs) var(--goa-space-xs) 0 var(--goa-space-xs)}.max-file-size.svelte-t8ftke.svelte-t8ftke{display:block}.button.svelte-t8ftke .max-file-size.svelte-t8ftke{margin-top:var(--goa-space-xs)}input[type="file"].svelte-t8ftke.svelte-t8ftke{position:absolute;left:-9999px}.issues.svelte-t8ftke.svelte-t8ftke{border-bottom:1px solid var(--goa-color-greyscale-200);margin:1rem 0}.issue.svelte-t8ftke.svelte-t8ftke{margin-bottom:1rem}.error.svelte-t8ftke.svelte-t8ftke{color:var(--goa-color-interactive-error);font-size:0.9em;display:flex;align-items:center;gap:0.5rem}@container self (max-width: 623px){.dragdrop.svelte-t8ftke.svelte-t8ftke{padding-top:1.75rem}.instructions.svelte-t8ftke.svelte-t8ftke{flex-direction:column}}`);
11870
11872
  }
11871
11873
  function bl(t, e, i) {
11872
11874
  const n = t.slice();
@@ -11879,14 +11881,14 @@ function pl(t) {
11879
11881
  );
11880
11882
  return {
11881
11883
  c() {
11882
- e = C("div"), i = C("div"), i.innerHTML = '<goa-icon type="cloud-upload" size="large" class="svelte-1mfs51e"></goa-icon> <div>Drag and drop files here</div> <em class="or-text svelte-1mfs51e">or</em> <div class="browse-files svelte-1mfs51e">Browse files</div>', n = B(), u && u.c(), l = B(), o = C("input"), f(i, "class", "instructions svelte-1mfs51e"), f(o, "data-testid", "input"), f(o, "tabindex", "0"), f(o, "type", "file"), f(
11884
+ e = C("div"), i = C("div"), i.innerHTML = '<goa-icon type="cloud-upload" size="large" class="svelte-t8ftke"></goa-icon> <div>Drag and drop files here</div> <em class="or-text svelte-t8ftke">or</em> <div class="browse-files svelte-t8ftke">Browse files</div>', n = B(), u && u.c(), l = B(), o = C("input"), f(i, "class", "instructions svelte-t8ftke"), f(o, "data-testid", "input"), f(o, "tabindex", "0"), f(o, "type", "file"), f(
11883
11885
  o,
11884
11886
  "accept",
11885
11887
  /*accept*/
11886
11888
  t[1]
11887
- ), o.multiple = !0, f(o, "class", "svelte-1mfs51e"), f(e, "data-testid", r = /*testid*/
11889
+ ), o.multiple = !0, f(o, "class", "svelte-t8ftke"), f(e, "data-testid", r = /*testid*/
11888
11890
  t[3] || "dragdrop"), f(e, "class", a = Me(`dragdrop state-${/*_state*/
11889
- t[6]}`) + " svelte-1mfs51e");
11891
+ t[6]}`) + " svelte-t8ftke");
11890
11892
  },
11891
11893
  m(c, g) {
11892
11894
  q(c, e, g), y(e, i), y(e, n), u && u.m(e, null), y(e, l), y(e, o), t[14](o), t[15](e), s || (d = [
@@ -11941,7 +11943,7 @@ function pl(t) {
11941
11943
  8 && r !== (r = /*testid*/
11942
11944
  c[3] || "dragdrop") && f(e, "data-testid", r), g & /*_state*/
11943
11945
  64 && a !== (a = Me(`dragdrop state-${/*_state*/
11944
- c[6]}`) + " svelte-1mfs51e") && f(e, "class", a);
11946
+ c[6]}`) + " svelte-t8ftke") && f(e, "class", a);
11945
11947
  },
11946
11948
  d(c) {
11947
11949
  c && P(e), u && u.d(), t[14](null), t[15](null), s = !1, Ve(d);
@@ -11955,7 +11957,7 @@ function _l(t) {
11955
11957
  e = C("em"), i = ne("Maximum file size is "), n = ne(
11956
11958
  /*maxfilesize*/
11957
11959
  t[2]
11958
- ), f(e, "class", "max-file-size svelte-1mfs51e"), f(e, "data-testid", "max-file-size");
11960
+ ), f(e, "class", "max-file-size svelte-t8ftke"), f(e, "data-testid", "max-file-size");
11959
11961
  },
11960
11962
  m(l, o) {
11961
11963
  q(l, e, o), y(e, i), y(e, n);
@@ -11980,13 +11982,13 @@ function wl(t) {
11980
11982
  );
11981
11983
  return {
11982
11984
  c() {
11983
- e = C("div"), i = C("goa-button"), i.textContent = "Choose file", n = B(), d && d.c(), l = B(), o = C("input"), _(i, "type", "secondary"), f(e, "class", "button svelte-1mfs51e"), f(o, "data-testid", r = /*testid*/
11985
+ e = C("div"), i = C("goa-button"), i.textContent = "Choose file", n = B(), d && d.c(), l = B(), o = C("input"), _(i, "type", "secondary"), f(e, "class", "button svelte-t8ftke"), f(o, "data-testid", r = /*testid*/
11984
11986
  t[3] || "input"), f(o, "tabindex", "-1"), f(o, "type", "file"), f(
11985
11987
  o,
11986
11988
  "accept",
11987
11989
  /*accept*/
11988
11990
  t[1]
11989
- ), o.multiple = !0, f(o, "class", "svelte-1mfs51e");
11991
+ ), o.multiple = !0, f(o, "class", "svelte-t8ftke");
11990
11992
  },
11991
11993
  m(u, c) {
11992
11994
  q(u, e, c), y(e, i), y(e, n), d && d.m(e, null), t[16](e), q(u, l, c), q(u, o, c), t[17](o), a || (s = $(
@@ -12020,7 +12022,7 @@ function yl(t) {
12020
12022
  e = C("em"), i = ne("Maximum file size is "), n = ne(
12021
12023
  /*maxfilesize*/
12022
12024
  t[2]
12023
- ), f(e, "class", "max-file-size svelte-1mfs51e"), f(e, "data-testid", "max-file-size");
12025
+ ), f(e, "class", "max-file-size svelte-t8ftke"), f(e, "data-testid", "max-file-size");
12024
12026
  },
12025
12027
  m(l, o) {
12026
12028
  q(l, e, o), y(e, i), y(e, n);
@@ -12050,7 +12052,7 @@ function kl(t) {
12050
12052
  e = C("div");
12051
12053
  for (let l = 0; l < n.length; l += 1)
12052
12054
  n[l].c();
12053
- f(e, "class", "issues svelte-1mfs51e");
12055
+ f(e, "class", "issues svelte-t8ftke");
12054
12056
  },
12055
12057
  m(l, o) {
12056
12058
  q(l, e, o);
@@ -12089,7 +12091,7 @@ function Cl(t) {
12089
12091
  ), d, u;
12090
12092
  return {
12091
12093
  c() {
12092
- e = C("div"), n = ne(i), l = B(), o = C("div"), r = C("goa-icon"), a = B(), d = ne(s), u = B(), _(r, "type", "warning"), _(r, "size", "small"), _(r, "theme", "filled"), _(r, "class", "svelte-1mfs51e"), f(o, "class", "error svelte-1mfs51e"), f(o, "data-testid", "error"), f(e, "class", "issue svelte-1mfs51e");
12094
+ e = C("div"), n = ne(i), l = B(), o = C("div"), r = C("goa-icon"), a = B(), d = ne(s), u = B(), _(r, "type", "warning"), _(r, "size", "small"), _(r, "theme", "filled"), _(r, "class", "svelte-t8ftke"), f(o, "class", "error svelte-t8ftke"), f(o, "data-testid", "error"), f(e, "class", "issue svelte-t8ftke");
12093
12095
  },
12094
12096
  m(c, g) {
12095
12097
  q(c, e, g), y(e, n), y(e, l), y(e, o), y(o, r), y(o, a), y(o, d), y(e, u);
@@ -12162,10 +12164,12 @@ function Fc(t, e, i) {
12162
12164
  return g(T) ? h(T) ? null : `The file must be less than ${o}` : "Invalid file type";
12163
12165
  }
12164
12166
  function g(T) {
12165
- const V = l.split(",").map((x) => x.trim());
12166
- for (const x of V)
12167
- if (T.type.match(x.replace("*", ".*")) || T.name.endsWith(x))
12167
+ const V = l.split(",").map((S) => S.trim()), x = T.type.toLowerCase(), D = T.name.toLowerCase();
12168
+ for (const S of V) {
12169
+ const A = S.toLowerCase();
12170
+ if (x.match(A.replace("*", ".*")) || D.endsWith(A))
12168
12171
  return !0;
12172
+ }
12169
12173
  return !1;
12170
12174
  }
12171
12175
  function h(T) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/web-components",
3
- "version": "1.34.0-alpha.4",
3
+ "version": "1.34.1-alpha.1",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Government of Alberta - UI Web components",
6
6
  "bugs": {