eat-js-sdk 0.0.42 → 0.0.43

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.
@@ -6640,6 +6640,7 @@
6640
6640
  attr(div0, "role", "button");
6641
6641
  attr(div0, "aria-label", "Close modal");
6642
6642
  attr(div0, "tabindex", "-1");
6643
+ attr(div0, "aria-hidden", "true");
6643
6644
  attr(div0, "class", "blanket-overlay h-full");
6644
6645
  attr(div1, "class", "z-10");
6645
6646
  attr(div2, "role", "dialog");
@@ -6855,21 +6856,24 @@
6855
6856
 
6856
6857
  // src/lib/components/prompt/categorise/PromptCategoriseModal.svelte
6857
6858
  function create_default_slot3(ctx) {
6858
- let div2;
6859
6859
  let div0;
6860
+ let t0;
6861
+ let t1;
6862
+ let div3;
6863
+ let div1;
6860
6864
  let span0;
6861
6865
  let alerticon;
6862
- let t0;
6863
- let span1;
6864
6866
  let t2;
6867
+ let span1;
6868
+ let t4;
6865
6869
  let button0;
6866
6870
  let crossicon;
6867
- let t3;
6868
- let p;
6869
6871
  let t5;
6870
- let div1;
6871
- let button1;
6872
+ let p;
6872
6873
  let t7;
6874
+ let div2;
6875
+ let button1;
6876
+ let t9;
6873
6877
  let button2;
6874
6878
  let current;
6875
6879
  let mounted;
@@ -6878,57 +6882,70 @@
6878
6882
  crossicon = new CrossIcon_default({});
6879
6883
  return {
6880
6884
  c() {
6881
- div2 = element("div");
6882
6885
  div0 = element("div");
6886
+ t0 = text("\xA0");
6887
+ t1 = space();
6888
+ div3 = element("div");
6889
+ div1 = element("div");
6883
6890
  span0 = element("span");
6884
6891
  create_component(alerticon.$$.fragment);
6885
- t0 = space();
6892
+ t2 = space();
6886
6893
  span1 = element("span");
6887
6894
  span1.textContent = "Reset words?";
6888
- t2 = space();
6895
+ t4 = space();
6889
6896
  button0 = element("button");
6890
6897
  create_component(crossicon.$$.fragment);
6891
- t3 = space();
6898
+ t5 = space();
6892
6899
  p = element("p");
6893
6900
  p.textContent = "Are you sure you want to reset your answers for this question? This cannot be undone.";
6894
- t5 = space();
6895
- div1 = element("div");
6901
+ t7 = space();
6902
+ div2 = element("div");
6896
6903
  button1 = element("button");
6897
6904
  button1.textContent = "Cancel";
6898
- t7 = space();
6905
+ t9 = space();
6899
6906
  button2 = element("button");
6900
6907
  button2.textContent = "Reset";
6908
+ attr(div0, "tabindex", "-1");
6909
+ attr(div0, "class", "sr-only");
6910
+ attr(
6911
+ div0,
6912
+ "aria-hidden",
6913
+ /*ariaHidden*/
6914
+ ctx[1]
6915
+ );
6901
6916
  attr(span1, "class", "text-xl leading-6 font-bold ml-3 grow");
6902
6917
  attr(button0, "aria-label", "Close");
6903
6918
  attr(button0, "class", "focus-ring text-charcoal rounded h-6 w-6 flex items-center justify-center hover:bg-black-50 active:bg-black-60");
6904
- attr(div0, "class", "flex items-center mb-3");
6919
+ attr(div1, "class", "flex items-center mb-3");
6905
6920
  attr(p, "class", "text-base font-semibold mb-10");
6906
6921
  attr(button1, "aria-label", "Cancel");
6907
6922
  attr(button1, "class", "focus-ring w-full py-2 px-3 text-blue-1000 text-base leading-4 rounded-lg font-bold border-2 border-white hover:bg-black-50 active:bg-black-60 md:w-fit");
6908
6923
  attr(button2, "aria-label", "Reset");
6909
6924
  attr(button2, "class", "focus-ring w-full py-2 px-3 text-white text-base leading-4 rounded-lg font-bold border-2 border-blue-1000 bg-soft-blue hover:bg-yellow-1000 hover:text-charcoal active:bg-yellow-1100 active:text-charcoal md:w-fit");
6910
- attr(div1, "class", "flex flex-col-reverse items-center space-y-2 space-y-reverse md:justify-between md:flex-row md:space-y-0");
6911
- attr(div2, "tabindex", "0");
6912
- attr(div2, "class", "absolute inset-y-0 right-4 left-4 w-fit h-fit m-auto bg-white p-6 max-w-[400px] shadow-md rounded-lg focus-visible:outline-none md:inset-0");
6925
+ attr(div2, "class", "flex flex-col-reverse items-center space-y-2 space-y-reverse md:justify-between md:flex-row md:space-y-0");
6926
+ attr(div3, "class", "absolute inset-y-0 right-4 left-4 w-fit h-fit m-auto bg-white p-6 max-w-[400px] shadow-md rounded-lg focus-visible:outline-none md:inset-0");
6913
6927
  },
6914
6928
  m(target, anchor) {
6915
- insert(target, div2, anchor);
6916
- append(div2, div0);
6917
- append(div0, span0);
6918
- mount_component(alerticon, span0, null);
6929
+ insert(target, div0, anchor);
6919
6930
  append(div0, t0);
6920
- append(div0, span1);
6921
- append(div0, t2);
6922
- append(div0, button0);
6931
+ ctx[4](div0);
6932
+ insert(target, t1, anchor);
6933
+ insert(target, div3, anchor);
6934
+ append(div3, div1);
6935
+ append(div1, span0);
6936
+ mount_component(alerticon, span0, null);
6937
+ append(div1, t2);
6938
+ append(div1, span1);
6939
+ append(div1, t4);
6940
+ append(div1, button0);
6923
6941
  mount_component(crossicon, button0, null);
6924
- append(div2, t3);
6925
- append(div2, p);
6926
- append(div2, t5);
6927
- append(div2, div1);
6928
- append(div1, button1);
6929
- append(div1, t7);
6930
- append(div1, button2);
6931
- ctx[3](div2);
6942
+ append(div3, t5);
6943
+ append(div3, p);
6944
+ append(div3, t7);
6945
+ append(div3, div2);
6946
+ append(div2, button1);
6947
+ append(div2, t9);
6948
+ append(div2, button2);
6932
6949
  current = true;
6933
6950
  if (!mounted) {
6934
6951
  dispose = [
@@ -6936,25 +6953,35 @@
6936
6953
  button0,
6937
6954
  "click",
6938
6955
  /*closeResetModal*/
6939
- ctx[1]
6956
+ ctx[2]
6940
6957
  ),
6941
6958
  listen(
6942
6959
  button1,
6943
6960
  "click",
6944
6961
  /*closeResetModal*/
6945
- ctx[1]
6962
+ ctx[2]
6946
6963
  ),
6947
6964
  listen(
6948
6965
  button2,
6949
6966
  "click",
6950
6967
  /*resetCategories*/
6951
- ctx[2]
6968
+ ctx[3]
6952
6969
  )
6953
6970
  ];
6954
6971
  mounted = true;
6955
6972
  }
6956
6973
  },
6957
- p: noop,
6974
+ p(ctx2, dirty) {
6975
+ if (!current || dirty & /*ariaHidden*/
6976
+ 2) {
6977
+ attr(
6978
+ div0,
6979
+ "aria-hidden",
6980
+ /*ariaHidden*/
6981
+ ctx2[1]
6982
+ );
6983
+ }
6984
+ },
6958
6985
  i(local) {
6959
6986
  if (current)
6960
6987
  return;
@@ -6969,11 +6996,13 @@
6969
6996
  },
6970
6997
  d(detaching) {
6971
6998
  if (detaching) {
6972
- detach(div2);
6999
+ detach(div0);
7000
+ detach(t1);
7001
+ detach(div3);
6973
7002
  }
7003
+ ctx[4](null);
6974
7004
  destroy_component(alerticon);
6975
7005
  destroy_component(crossicon);
6976
- ctx[3](null);
6977
7006
  mounted = false;
6978
7007
  run_all(dispose);
6979
7008
  }
@@ -6998,8 +7027,8 @@
6998
7027
  },
6999
7028
  p(ctx2, [dirty]) {
7000
7029
  const commonmodal_changes = {};
7001
- if (dirty & /*$$scope, categoryModal*/
7002
- 65) {
7030
+ if (dirty & /*$$scope, ariaHidden, categoryModal*/
7031
+ 131) {
7003
7032
  commonmodal_changes.$$scope = { dirty, ctx: ctx2 };
7004
7033
  }
7005
7034
  commonmodal.$set(commonmodal_changes);
@@ -7021,15 +7050,13 @@
7021
7050
  }
7022
7051
  function instance8($$self, $$props, $$invalidate) {
7023
7052
  let categoryModal;
7053
+ let ariaHidden = false;
7024
7054
  const { isModalOpen } = get_store_value(modalSettings);
7025
7055
  if (isModalOpen) {
7026
- setTimeout(
7027
- () => {
7028
- categoryModal.focus();
7029
- $$invalidate(0, categoryModal.tabIndex = -1, categoryModal);
7030
- },
7031
- 100
7032
- );
7056
+ setTimeout(() => {
7057
+ categoryModal.focus();
7058
+ $$invalidate(1, ariaHidden = true);
7059
+ });
7033
7060
  }
7034
7061
  const closeResetModal = () => {
7035
7062
  modalSettings.set({
@@ -7038,6 +7065,7 @@
7038
7065
  modalAriaLabel: "",
7039
7066
  isOpenLastStatus: true
7040
7067
  });
7068
+ showModalAria = true;
7041
7069
  };
7042
7070
  const dispatch = createEventDispatcher();
7043
7071
  const resetCategories = () => {
@@ -7068,13 +7096,13 @@
7068
7096
  dispatch("resetCategory", { answer_list: [] });
7069
7097
  closeResetModal();
7070
7098
  };
7071
- function div2_binding($$value) {
7099
+ function div0_binding($$value) {
7072
7100
  binding_callbacks[$$value ? "unshift" : "push"](() => {
7073
7101
  categoryModal = $$value;
7074
7102
  $$invalidate(0, categoryModal);
7075
7103
  });
7076
7104
  }
7077
- return [categoryModal, closeResetModal, resetCategories, div2_binding];
7105
+ return [categoryModal, ariaHidden, closeResetModal, resetCategories, div0_binding];
7078
7106
  }
7079
7107
  var PromptCategoriseModal = class extends SvelteComponent {
7080
7108
  constructor(options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eat-js-sdk",
3
- "version": "0.0.42",
3
+ "version": "0.0.43",
4
4
  "description": "Authoring tool frontend SDK",
5
5
  "contributors": [
6
6
  {