@pie-players/pie-tool-theme 0.3.45 → 0.3.46

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.
@@ -3932,10 +3932,12 @@ var ad = {
3932
3932
  draggable: !0,
3933
3933
  resizable: !0,
3934
3934
  closeable: !0,
3935
- initialWidth: 720,
3936
- initialHeight: 620,
3937
- minWidth: 360,
3938
- minHeight: 420
3935
+ initialWidth: 380,
3936
+ initialHeight: 420,
3937
+ minWidth: 380,
3938
+ minHeight: 420,
3939
+ initialAlign: "bottom-right",
3940
+ initialMargin: 16
3939
3941
  }
3940
3942
  }],
3941
3943
  button: f,
@@ -9376,26 +9378,27 @@ function _g(e, t) {
9376
9378
  }
9377
9379
  }
9378
9380
  function Tg(e, t = {}) {
9379
- const r = typeof document < "u" ? document.activeElement : null, n = (i) => {
9380
- if (i.key === "Escape") {
9381
+ const r = typeof document < "u" ? document.activeElement : null, n = t.wrap ?? !0, i = (o) => {
9382
+ if (o.key === "Escape") {
9381
9383
  t.onEscape?.();
9382
9384
  return;
9383
9385
  }
9384
- if (i.key !== "Tab") return;
9385
- const o = yc(e);
9386
- if (!o.length) {
9387
- i.preventDefault(), e.focus?.();
9386
+ if (o.key !== "Tab") return;
9387
+ const s = yc(e);
9388
+ if (!s.length) {
9389
+ if (!n) return;
9390
+ o.preventDefault(), e.focus?.();
9388
9391
  return;
9389
9392
  }
9390
- const s = document.activeElement, a = o.indexOf(s || o[0]);
9391
- if (i.shiftKey) {
9392
- a <= 0 && (i.preventDefault(), o[o.length - 1].focus());
9393
+ const a = document.activeElement, l = s.indexOf(a || s[0]);
9394
+ if (o.shiftKey) {
9395
+ l <= 0 && (n ? (o.preventDefault(), s[s.length - 1].focus()) : t.onTabExit?.("backward", o));
9393
9396
  return;
9394
9397
  }
9395
- a === o.length - 1 && (i.preventDefault(), o[0].focus());
9398
+ l === s.length - 1 && (n ? (o.preventDefault(), s[0].focus()) : t.onTabExit?.("forward", o));
9396
9399
  };
9397
- return queueMicrotask(() => _g(e, t.initialFocus)), e.addEventListener("keydown", n), () => {
9398
- e.removeEventListener("keydown", n);
9400
+ return queueMicrotask(() => _g(e, t.initialFocus)), e.addEventListener("keydown", i), () => {
9401
+ e.removeEventListener("keydown", i);
9399
9402
  try {
9400
9403
  r?.focus?.();
9401
9404
  } catch {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-players/pie-tool-theme",
3
- "version": "0.3.45",
3
+ "version": "0.3.46",
4
4
  "type": "module",
5
5
  "description": "Theme tool for PIE assessment player - provides accessible themes and color schemes",
6
6
  "repository": {
@@ -36,10 +36,10 @@
36
36
  "unpkg": "./dist/tool-color-scheme.js",
37
37
  "jsdelivr": "./dist/tool-color-scheme.js",
38
38
  "dependencies": {
39
- "@pie-players/pie-assessment-toolkit": "0.3.45",
40
- "@pie-players/pie-context": "0.3.45",
41
- "@pie-players/pie-players-shared": "0.3.45",
42
- "@pie-players/pie-theme": "0.3.45"
39
+ "@pie-players/pie-assessment-toolkit": "0.3.46",
40
+ "@pie-players/pie-context": "0.3.46",
41
+ "@pie-players/pie-players-shared": "0.3.46",
42
+ "@pie-players/pie-theme": "0.3.46"
43
43
  },
44
44
  "types": "./dist/index.d.ts",
45
45
  "scripts": {