@caspeco/casper-ui-library 9.0.2 → 9.2.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.
Files changed (105) hide show
  1. package/README.md +10 -4
  2. package/dist/components/combobox/combobox.d.ts.map +1 -1
  3. package/dist/components/icon/icons/calendar-icon.d.ts +2 -0
  4. package/dist/components/icon/icons/calendar-icon.d.ts.map +1 -0
  5. package/dist/components/icon/icons/calendar-icon.js +8 -0
  6. package/dist/components/icon/icons/cart-icon.js +1 -1
  7. package/dist/components/icon/icons/closed-icon.d.ts +2 -0
  8. package/dist/components/icon/icons/closed-icon.d.ts.map +1 -0
  9. package/dist/components/icon/icons/closed-icon.js +8 -0
  10. package/dist/components/icon/icons/comment-add-icon.d.ts +2 -0
  11. package/dist/components/icon/icons/comment-add-icon.d.ts.map +1 -0
  12. package/dist/components/icon/icons/comment-add-icon.js +8 -0
  13. package/dist/components/icon/icons/comment-icon.js +1 -1
  14. package/dist/components/icon/icons/deliverect-icon.d.ts +2 -0
  15. package/dist/components/icon/icons/deliverect-icon.d.ts.map +1 -0
  16. package/dist/components/icon/icons/deliverect-icon.js +8 -0
  17. package/dist/components/icon/icons/door-closed-icon.d.ts +2 -0
  18. package/dist/components/icon/icons/door-closed-icon.d.ts.map +1 -0
  19. package/dist/components/icon/icons/door-closed-icon.js +8 -0
  20. package/dist/components/icon/icons/door-open-icon.d.ts +2 -0
  21. package/dist/components/icon/icons/door-open-icon.d.ts.map +1 -0
  22. package/dist/components/icon/icons/door-open-icon.js +8 -0
  23. package/dist/components/icon/icons/failed-print-icon.d.ts +2 -0
  24. package/dist/components/icon/icons/failed-print-icon.d.ts.map +1 -0
  25. package/dist/components/icon/icons/failed-print-icon.js +8 -0
  26. package/dist/components/icon/icons/index.d.ts +27 -4
  27. package/dist/components/icon/icons/index.d.ts.map +1 -1
  28. package/dist/components/icon/icons/key-command-icon.d.ts +2 -0
  29. package/dist/components/icon/icons/key-command-icon.d.ts.map +1 -0
  30. package/dist/components/icon/icons/key-command-icon.js +8 -0
  31. package/dist/components/icon/icons/key-enter-icon.d.ts +2 -0
  32. package/dist/components/icon/icons/key-enter-icon.d.ts.map +1 -0
  33. package/dist/components/icon/icons/key-enter-icon.js +8 -0
  34. package/dist/components/icon/icons/key-option-icon.d.ts +2 -0
  35. package/dist/components/icon/icons/key-option-icon.d.ts.map +1 -0
  36. package/dist/components/icon/icons/key-option-icon.js +8 -0
  37. package/dist/components/icon/icons/message-add-icon.d.ts +2 -0
  38. package/dist/components/icon/icons/message-add-icon.d.ts.map +1 -0
  39. package/dist/components/icon/icons/message-add-icon.js +8 -0
  40. package/dist/components/icon/icons/message-icon.js +1 -1
  41. package/dist/components/icon/icons/message-lines-icon.d.ts +2 -0
  42. package/dist/components/icon/icons/message-lines-icon.d.ts.map +1 -0
  43. package/dist/components/icon/icons/message-lines-icon.js +8 -0
  44. package/dist/components/icon/icons/module-home-icon.js +1 -1
  45. package/dist/components/icon/icons/no-cart-icon.d.ts +2 -0
  46. package/dist/components/icon/icons/no-cart-icon.d.ts.map +1 -0
  47. package/dist/components/icon/icons/no-cart-icon.js +8 -0
  48. package/dist/components/icon/icons/note-icon.d.ts +2 -0
  49. package/dist/components/icon/icons/note-icon.d.ts.map +1 -0
  50. package/dist/components/icon/icons/note-icon.js +8 -0
  51. package/dist/components/icon/icons/product-my-pages-icon.d.ts +2 -0
  52. package/dist/components/icon/icons/product-my-pages-icon.d.ts.map +1 -0
  53. package/dist/components/icon/icons/product-my-pages-icon.js +8 -0
  54. package/dist/components/icon/icons/puck-icon.d.ts +2 -0
  55. package/dist/components/icon/icons/puck-icon.d.ts.map +1 -0
  56. package/dist/components/icon/icons/puck-icon.js +8 -0
  57. package/dist/components/icon/icons/redo-icon.d.ts +2 -0
  58. package/dist/components/icon/icons/redo-icon.d.ts.map +1 -0
  59. package/dist/components/icon/icons/redo-icon.js +8 -0
  60. package/dist/components/icon/icons/sidebar-hide-icon.d.ts +2 -0
  61. package/dist/components/icon/icons/sidebar-hide-icon.d.ts.map +1 -0
  62. package/dist/components/icon/icons/sidebar-hide-icon.js +8 -0
  63. package/dist/components/icon/icons/sidebar-left-icon.d.ts +2 -0
  64. package/dist/components/icon/icons/sidebar-left-icon.d.ts.map +1 -0
  65. package/dist/components/icon/icons/sidebar-left-icon.js +8 -0
  66. package/dist/components/icon/icons/sidebar-right-icon.d.ts +2 -0
  67. package/dist/components/icon/icons/sidebar-right-icon.d.ts.map +1 -0
  68. package/dist/components/icon/icons/sidebar-right-icon.js +8 -0
  69. package/dist/components/icon/icons/sidebar-show-icon.d.ts +2 -0
  70. package/dist/components/icon/icons/sidebar-show-icon.d.ts.map +1 -0
  71. package/dist/components/icon/icons/sidebar-show-icon.js +8 -0
  72. package/dist/components/icon/icons/swatch-icon.d.ts +2 -0
  73. package/dist/components/icon/icons/swatch-icon.d.ts.map +1 -0
  74. package/dist/components/icon/icons/swatch-icon.js +8 -0
  75. package/dist/components/icon/icons/trivec-icon.d.ts +2 -0
  76. package/dist/components/icon/icons/trivec-icon.d.ts.map +1 -0
  77. package/dist/components/icon/icons/trivec-icon.js +9 -0
  78. package/dist/components/icon/icons/waste-icon.d.ts +2 -0
  79. package/dist/components/icon/icons/waste-icon.d.ts.map +1 -0
  80. package/dist/components/icon/icons/waste-icon.js +8 -0
  81. package/dist/components/table/table-toolbar-settings.d.ts +15 -1
  82. package/dist/components/table/table-toolbar-settings.d.ts.map +1 -1
  83. package/dist/components/table/table-toolbar-settings.js +71 -44
  84. package/dist/components/table/table-toolbar-settings.spec.d.ts +2 -0
  85. package/dist/components/table/table-toolbar-settings.spec.d.ts.map +1 -0
  86. package/dist/components/table/table.constants.d.ts +2 -0
  87. package/dist/components/table/table.constants.d.ts.map +1 -0
  88. package/dist/components/table/table.constants.js +4 -0
  89. package/dist/components/table/translations.d.ts +14 -0
  90. package/dist/components/table/translations.d.ts.map +1 -1
  91. package/dist/components/table/translations.js +12 -0
  92. package/dist/index.js +727 -681
  93. package/dist/node_modules/@dnd-kit/abstract/index.js +502 -442
  94. package/dist/node_modules/@dnd-kit/dom/index.js +817 -779
  95. package/dist/node_modules/@dnd-kit/dom/sortable.js +260 -262
  96. package/dist/node_modules/@dnd-kit/dom/utilities.js +470 -463
  97. package/dist/node_modules/@dnd-kit/react/hooks.js +26 -26
  98. package/dist/node_modules/@dnd-kit/react/index.js +8 -1
  99. package/dist/node_modules/@dnd-kit/react/sortable.js +45 -46
  100. package/dist/node_modules/@preact/signals-core/dist/signals-core.module.js +11 -11
  101. package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js +85 -73
  102. package/package.json +20 -18
  103. package/dist/components/icon/icons/tablet-icon.d.ts +0 -2
  104. package/dist/components/icon/icons/tablet-icon.d.ts.map +0 -1
  105. package/dist/components/icon/icons/tablet-icon.js +0 -8
@@ -1,58 +1,58 @@
1
1
  import { useEffect as p, useRef as s, useLayoutEffect as w, useMemo as y, useState as E, useCallback as k } from "react";
2
2
  import "../state/dist/index.js";
3
- import { flushSync as O } from "react-dom";
3
+ import { flushSync as M } from "react-dom";
4
4
  import { currentValue as m } from "./utilities.js";
5
- import { effect as S, untracked as V } from "../../@preact/signals-core/dist/signals-core.module.js";
6
- var C = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", a = C ? w : p;
5
+ import { effect as O, untracked as S } from "../../@preact/signals-core/dist/signals-core.module.js";
6
+ var V = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", a = V ? w : p;
7
7
  function L() {
8
8
  const e = E(0)[1];
9
9
  return k(() => {
10
10
  e((t) => t + 1);
11
11
  }, [e]);
12
12
  }
13
- function D(e, t) {
13
+ function C(e, t) {
14
14
  const n = s(/* @__PURE__ */ new Map()), r = L();
15
15
  return a(() => {
16
16
  if (!e) {
17
17
  n.current.clear();
18
18
  return;
19
19
  }
20
- return S(() => {
21
- var o;
22
- let c = !1, u = !1;
23
- for (const d of n.current) {
24
- const [f] = d, l = V(() => d[1]), i = e[f];
25
- l !== i && (c = !0, n.current.set(f, i), u = (o = t?.(f, l, i)) != null ? o : !1);
20
+ return O(() => {
21
+ var u;
22
+ let c = !1, o = !1;
23
+ for (const l of n.current) {
24
+ const [f] = l, d = S(() => l[1]), i = e[f];
25
+ d !== i && (c = !0, n.current.set(f, i), o = (u = t?.(f, d, i)) != null ? u : !1);
26
26
  }
27
- c && (u ? O(r) : r());
27
+ c && (o ? queueMicrotask(() => M(r)) : r());
28
28
  });
29
29
  }, [e]), y(
30
30
  () => e && new Proxy(e, {
31
- get(o, c) {
32
- const u = o[c];
33
- return n.current.set(c, u), u;
31
+ get(u, c) {
32
+ const o = u[c];
33
+ return n.current.set(c, o), o;
34
34
  }
35
35
  }),
36
36
  [e]
37
37
  );
38
38
  }
39
- function I(e, t) {
39
+ function D(e, t) {
40
40
  e();
41
41
  }
42
- function R(e) {
42
+ function I(e) {
43
43
  const t = s(e);
44
44
  return a(() => {
45
45
  t.current = e;
46
46
  }, [e]), t;
47
47
  }
48
- function _(e, t, n = p, r = Object.is) {
49
- const o = s(e);
48
+ function R(e, t, n = p, r = Object.is) {
49
+ const u = s(e);
50
50
  n(() => {
51
- const c = o.current;
52
- r(e, c) || (o.current = e, t(e, c));
51
+ const c = u.current;
52
+ r(e, c) || (u.current = e, t(e, c));
53
53
  }, [t, e]);
54
54
  }
55
- function j(e, t) {
55
+ function _(e, t) {
56
56
  const n = s(m(e));
57
57
  a(() => {
58
58
  const r = m(e);
@@ -60,10 +60,10 @@ function j(e, t) {
60
60
  });
61
61
  }
62
62
  export {
63
- D as useDeepSignal,
64
- I as useImmediateEffect,
63
+ C as useDeepSignal,
64
+ D as useImmediateEffect,
65
65
  a as useIsomorphicLayoutEffect,
66
- R as useLatest,
67
- j as useOnElementChange,
68
- _ as useOnValueChange
66
+ I as useLatest,
67
+ _ as useOnElementChange,
68
+ R as useOnValueChange
69
69
  };
@@ -60,7 +60,14 @@ function Wr(e) {
60
60
  "onDragOver",
61
61
  "onDragEnd"
62
62
  ]);
63
- const p = b(null), { plugins: I, modifiers: M, sensors: w } = f, m = R(I, k.plugins), E = R(w, k.sensors), v = R(M, k.modifiers), y = h(a), _ = h(i), rr = h(c), er = h(u), tr = h(d), B = h(n), s = Er(() => {
63
+ const p = b(null), {
64
+ plugins: I,
65
+ modifiers: M,
66
+ sensors: w
67
+ } = f, m = R(I, k.plugins), E = R(w, k.sensors), v = R(
68
+ M,
69
+ k.modifiers
70
+ ), y = h(a), _ = h(i), rr = h(c), er = h(u), tr = h(d), B = h(n), s = Er(() => {
64
71
  var S;
65
72
  return (S = f.manager) != null ? S : new W(f);
66
73
  });
@@ -1,79 +1,78 @@
1
- import { useCallback as c } from "react";
2
- import { deepEqual as f } from "../state/dist/index.js";
1
+ import { useCallback as d } from "react";
2
+ import { deepEqual as p } from "../state/dist/index.js";
3
3
  import { defaultSortableTransition as x, Sortable as R } from "../dom/sortable.js";
4
4
  import { isSortable as rr } from "../dom/sortable.js";
5
5
  import { useInstance as T } from "./index.js";
6
- import { useDeepSignal as V, useOnValueChange as i, useIsomorphicLayoutEffect as k, useImmediateEffect as q, useOnElementChange as m } from "./hooks.js";
7
- import { currentValue as v } from "./utilities.js";
8
- import { batch as L } from "../../@preact/signals-core/dist/signals-core.module.js";
9
- var N = Object.defineProperty, U = Object.defineProperties, z = Object.getOwnPropertyDescriptors, I = Object.getOwnPropertySymbols, A = Object.prototype.hasOwnProperty, B = Object.prototype.propertyIsEnumerable, j = (o, t, a) => t in o ? N(o, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : o[t] = a, _ = (o, t) => {
6
+ import { useDeepSignal as V, useOnValueChange as i, useIsomorphicLayoutEffect as q, useImmediateEffect as L, useOnElementChange as f } from "./hooks.js";
7
+ import { currentValue as m } from "./utilities.js";
8
+ import { batch as N } from "../../@preact/signals-core/dist/signals-core.module.js";
9
+ var U = Object.defineProperty, k = Object.defineProperties, z = Object.getOwnPropertyDescriptors, I = Object.getOwnPropertySymbols, A = Object.prototype.hasOwnProperty, B = Object.prototype.propertyIsEnumerable, j = (o, t, a) => t in o ? U(o, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : o[t] = a, v = (o, t) => {
10
10
  for (var a in t || (t = {}))
11
11
  A.call(t, a) && j(o, a, t[a]);
12
12
  if (I)
13
13
  for (var a of I(t))
14
14
  B.call(t, a) && j(o, a, t[a]);
15
15
  return o;
16
- }, F = (o, t) => U(o, z(t));
16
+ }, F = (o, t) => k(o, z(t));
17
17
  function Y(o) {
18
18
  const {
19
19
  accept: t,
20
20
  collisionDetector: a,
21
- collisionPriority: b,
22
- id: O,
23
- data: p,
24
- element: h,
25
- handle: y,
26
- index: g,
27
- group: D,
28
- disabled: P,
29
- feedback: d,
30
- modifiers: S,
31
- sensors: w,
32
- target: C,
33
- type: E
34
- } = o, l = _(_({}, x), o.transition), r = T((e) => new R(
35
- F(_({}, o), {
21
+ collisionPriority: _,
22
+ id: b,
23
+ data: g,
24
+ element: O,
25
+ handle: h,
26
+ index: c,
27
+ group: y,
28
+ disabled: D,
29
+ modifiers: P,
30
+ sensors: S,
31
+ target: w,
32
+ type: C,
33
+ plugins: E
34
+ } = o, l = v(v({}, x), o.transition), r = T((e) => new R(
35
+ F(v({}, o), {
36
36
  transition: l,
37
37
  register: !1,
38
- handle: v(y),
39
- element: v(h),
40
- target: v(C),
41
- feedback: d
38
+ handle: m(h),
39
+ element: m(O),
40
+ target: m(w)
42
41
  }),
43
42
  e
44
43
  )), u = V(r, G);
45
- return i(O, () => r.id = O), k(() => {
46
- L(() => {
47
- r.group = D, r.index = g;
44
+ return i(b, () => r.id = b), q(() => {
45
+ N(() => {
46
+ r.group = y, r.index = c;
48
47
  });
49
- }, [r, D, g]), i(E, () => r.type = E), i(
48
+ }, [r, y, c]), i(C, () => r.type = C), i(
50
49
  t,
51
50
  () => r.accept = t,
52
51
  void 0,
53
- f
54
- ), i(p, () => p && (r.data = p)), i(
55
- g,
52
+ p
53
+ ), i(g, () => g && (r.data = g)), i(
54
+ c,
56
55
  () => {
57
56
  var e;
58
57
  (e = r.manager) != null && e.dragOperation.status.idle && l?.idle && r.refreshShape();
59
58
  },
60
- q
61
- ), m(y, (e) => r.handle = e), m(h, (e) => r.element = e), m(C, (e) => r.target = e), i(P, () => r.disabled = P === !0), i(w, () => r.sensors = w), i(
59
+ L
60
+ ), f(h, (e) => r.handle = e), f(O, (e) => r.element = e), f(w, (e) => r.target = e), i(D, () => r.disabled = D === !0), i(S, () => r.sensors = S), i(
62
61
  a,
63
62
  () => r.collisionDetector = a
64
63
  ), i(
65
- b,
66
- () => r.collisionPriority = b
67
- ), i(d, () => r.feedback = d ?? "default"), i(
64
+ _,
65
+ () => r.collisionPriority = _
66
+ ), i(E, () => r.plugins = E, void 0, p), i(
68
67
  l,
69
68
  () => r.transition = l,
70
69
  void 0,
71
- f
70
+ p
72
71
  ), i(
73
- S,
74
- () => r.modifiers = S,
72
+ P,
73
+ () => r.modifiers = P,
75
74
  void 0,
76
- f
75
+ p
77
76
  ), i(
78
77
  o.alignment,
79
78
  () => r.alignment = o.alignment
@@ -91,27 +90,27 @@ function Y(o) {
91
90
  get isDropTarget() {
92
91
  return u.isDropTarget;
93
92
  },
94
- handleRef: c(
93
+ handleRef: d(
95
94
  (e) => {
96
95
  r.handle = e ?? void 0;
97
96
  },
98
97
  [r]
99
98
  ),
100
- ref: c(
99
+ ref: d(
101
100
  (e) => {
102
101
  var n, s;
103
102
  !e && ((n = r.element) != null && n.isConnected) && !((s = r.manager) != null && s.dragOperation.status.idle) || (r.element = e ?? void 0);
104
103
  },
105
104
  [r]
106
105
  ),
107
- sourceRef: c(
106
+ sourceRef: d(
108
107
  (e) => {
109
108
  var n, s;
110
109
  !e && ((n = r.source) != null && n.isConnected) && !((s = r.manager) != null && s.dragOperation.status.idle) || (r.source = e ?? void 0);
111
110
  },
112
111
  [r]
113
112
  ),
114
- targetRef: c(
113
+ targetRef: d(
115
114
  (e) => {
116
115
  var n, s;
117
116
  !e && ((n = r.target) != null && n.isConnected) && !((s = r.manager) != null && s.dragOperation.status.idle) || (r.target = e ?? void 0);
@@ -23,7 +23,7 @@ function l() {
23
23
  if (d = 0, e--, i) throw t;
24
24
  }
25
25
  }
26
- function O(t) {
26
+ function C(t) {
27
27
  if (e > 0) return t();
28
28
  p = ++U, e++;
29
29
  try {
@@ -78,7 +78,7 @@ f.prototype.U = function(t) {
78
78
  };
79
79
  f.prototype.subscribe = function(t) {
80
80
  var i = this;
81
- return N(function() {
81
+ return O(function() {
82
82
  var o = i.value, r = n;
83
83
  n = void 0;
84
84
  try {
@@ -122,7 +122,7 @@ Object.defineProperty(f.prototype, "value", { get: function() {
122
122
  }
123
123
  }
124
124
  } });
125
- function k(t, i) {
125
+ function j(t, i) {
126
126
  return new f(t, i);
127
127
  }
128
128
  function m(t) {
@@ -189,7 +189,7 @@ Object.defineProperty(h.prototype, "value", { get: function() {
189
189
  if (this.h(), t !== void 0 && (t.i = this.i), 16 & this.f) throw this.v;
190
190
  return this.v;
191
191
  } });
192
- function W(t, i) {
192
+ function k(t, i) {
193
193
  return new h(t, i);
194
194
  }
195
195
  function g(t) {
@@ -211,7 +211,7 @@ function y(t) {
211
211
  for (var i = t.s; i !== void 0; i = i.n) i.S.U(i);
212
212
  t.x = void 0, t.s = void 0, g(t);
213
213
  }
214
- function C(t) {
214
+ function N(t) {
215
215
  if (n !== this) throw new Error("Out-of-order effect");
216
216
  b(this), n = t, this.f &= -2, 8 & this.f && y(this), l();
217
217
  }
@@ -232,7 +232,7 @@ v.prototype.S = function() {
232
232
  if (1 & this.f) throw new Error("Cycle detected");
233
233
  this.f |= 1, this.f &= -9, g(this), x(this), e++;
234
234
  var t = n;
235
- return n = this, C.bind(this, t);
235
+ return n = this, N.bind(this, t);
236
236
  };
237
237
  v.prototype.N = function() {
238
238
  2 & this.f || (this.f |= 2, this.u = u, u = this);
@@ -243,7 +243,7 @@ v.prototype.d = function() {
243
243
  v.prototype.dispose = function() {
244
244
  this.d();
245
245
  };
246
- function N(t, i) {
246
+ function O(t, i) {
247
247
  var o = new v(t, i);
248
248
  try {
249
249
  o.c();
@@ -257,9 +257,9 @@ export {
257
257
  h as Computed,
258
258
  v as Effect,
259
259
  f as Signal,
260
- O as batch,
261
- W as computed,
262
- N as effect,
263
- k as signal,
260
+ C as batch,
261
+ k as computed,
262
+ O as effect,
263
+ j as signal,
264
264
  S as untracked
265
265
  };