@plitzi/sdk-elements 0.38.9 → 0.38.10

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 (44) hide show
  1. package/CHANGELOG.md +88 -0
  2. package/dist/Element/hooks/useElementInternal.mjs +67 -59
  3. package/dist/elements/advanced/BlockHtml/index.mjs +3 -3
  4. package/dist/elements/advanced/BlockJsx/index.mjs +3 -3
  5. package/dist/elements/advanced/Custom/index.mjs +3 -3
  6. package/dist/elements/basic/Button/index.mjs +3 -3
  7. package/dist/elements/basic/ThemeToggle/ThemeToggle.mjs +13 -13
  8. package/dist/elements/declarations/index.d.ts +22 -16
  9. package/dist/elements/declarations/index.mjs +6 -6
  10. package/dist/elements/form/Form/Form.mjs +19 -19
  11. package/dist/elements/form/FormControl/FormControl.mjs +10 -10
  12. package/dist/elements/form/FormControl/declaration.mjs +1 -1
  13. package/dist/elements/internal/NotFound/index.mjs +3 -3
  14. package/dist/elements/internal/Page/Page.d.ts +5 -0
  15. package/dist/elements/internal/Page/Page.mjs +26 -25
  16. package/dist/elements/internal/Page/PageHead.d.ts +12 -0
  17. package/dist/elements/internal/Page/PageHead.mjs +29 -0
  18. package/dist/elements/internal/Page/declaration.d.ts +2 -0
  19. package/dist/elements/internal/Page/declaration.mjs +5 -0
  20. package/dist/elements/internal/Page/index.d.ts +2 -0
  21. package/dist/elements/provider/ApiContainer/ApiContainer.mjs +187 -187
  22. package/dist/elements/provider/ApiContainer/declaration.d.ts +10 -9
  23. package/dist/elements/provider/ApiContainer/declaration.mjs +1 -0
  24. package/dist/elements/provider/ApiContainer/index.d.ts +10 -9
  25. package/dist/elements/provider/Channel/Channel.mjs +15 -15
  26. package/dist/elements/provider/Channel/declaration.d.ts +1 -1
  27. package/dist/elements/provider/Channel/index.d.ts +1 -1
  28. package/dist/elements/structure/Carousel/Carousel.mjs +72 -72
  29. package/dist/elements/structure/Carousel/CarouselTrack/index.mjs +3 -3
  30. package/dist/elements/structure/Carousel/declaration.d.ts +1 -1
  31. package/dist/elements/structure/Carousel/index.d.ts +1 -1
  32. package/dist/elements/structure/Container/Container.mjs +8 -8
  33. package/dist/elements/structure/DialogContainer/DialogContainer.mjs +14 -14
  34. package/dist/elements/structure/DialogContainer/declaration.d.ts +1 -2
  35. package/dist/elements/structure/DialogContainer/declaration.mjs +1 -2
  36. package/dist/elements/structure/DialogContainer/index.d.ts +1 -2
  37. package/dist/elements/structure/List/modes/ListControlled/ListControlled.mjs +8 -8
  38. package/dist/elements/structure/ModalContainer/ModalContainer.mjs +16 -16
  39. package/dist/elements/structure/ModalContainer/declaration.d.ts +2 -3
  40. package/dist/elements/structure/ModalContainer/declaration.mjs +2 -3
  41. package/dist/elements/structure/ModalContainer/index.d.ts +2 -3
  42. package/dist/elements/structure/Pagination/Pagination.mjs +10 -10
  43. package/dist/index.d.ts +17 -16
  44. package/package.json +11 -7
@@ -1,27 +1,27 @@
1
- import e from "../../../Element/hocs/withElement.mjs";
2
- import t from "../../../Element/hooks/useElement.mjs";
3
- import { RootElement as n } from "../../../Element/RootElement.mjs";
4
- import r from "../../../dataSource/pathFields.mjs";
5
- import i from "./CarouselContext.mjs";
6
- import { clampIndex as a, directionOf as o, slideStep as s, stepIndex as c } from "./carouselIndex.mjs";
7
- import l from "./declaration.mjs";
8
- import u from "./useAutoplay.mjs";
9
- import { rowKeys as ee } from "../List/modes/ListControlled/rowKeys.mjs";
10
- import { use as te, useCallback as d, useEffect as f, useMemo as p, useRef as m, useState as h } from "react";
11
- import ne from "@plitzi/sdk-shared/hooks/usePlitziServiceContext";
12
- import { StoreProvider as re } from "@plitzi/nexus/react";
13
- import { emptyObject as g } from "@plitzi/sdk-shared/helpers/utils";
14
- import { jsx as _ } from "react/jsx-runtime";
15
- import ie from "clsx";
16
- import ae from "@plitzi/sdk-shared/dataSource/helpers/getSourceName";
17
- import oe from "@plitzi/sdk-shared/dataSource/hooks/useRegisterSource";
1
+ import e from "./declaration.mjs";
2
+ import t from "../../../Element/hocs/withElement.mjs";
3
+ import n from "../../../Element/hooks/useElement.mjs";
4
+ import { RootElement as ee } from "../../../Element/RootElement.mjs";
5
+ import te from "../../../dataSource/pathFields.mjs";
6
+ import ne from "./CarouselContext.mjs";
7
+ import { clampIndex as r, directionOf as i, slideStep as a, stepIndex as o } from "./carouselIndex.mjs";
8
+ import re from "./useAutoplay.mjs";
9
+ import { rowKeys as s } from "../List/modes/ListControlled/rowKeys.mjs";
10
+ import { use as ie, useCallback as c, useEffect as l, useMemo as u, useRef as d, useState as f } from "react";
11
+ import p from "@plitzi/sdk-shared/hooks/usePlitziServiceContext";
12
+ import { StoreProvider as m } from "@plitzi/nexus/react";
13
+ import { emptyObject as h } from "@plitzi/sdk-shared/helpers/utils";
14
+ import { jsx as g } from "react/jsx-runtime";
15
+ import ae from "clsx";
16
+ import oe from "@plitzi/sdk-shared/dataSource/helpers/getSourceName";
17
+ import se from "@plitzi/sdk-shared/dataSource/hooks/useRegisterSource";
18
18
  //#region src/elements/structure/Carousel/Carousel.tsx
19
- var v = ({ ref: e, className: v = "", children: y, items: b = [], mode: x = "slide", autoplay: S = 0, pauseOnHover: C = !0, loop: w = !0, transition: T = "slide", speed: E = 30, itemKey: D, label: se = "" }) => {
20
- let { id: O, definition: { label: k = "Carousel" } } = t(), A = ae(l.sourceType, O), { settings: { previewMode: ce }, contexts: { InteractionsContext: le } } = ne(), { interactionsManager: j } = te(le), M = p(() => Array.isArray(b) ? b : [], [b]), N = p(() => ee(M, D), [M, D]), P = M.length, F = !!ce, [I, L] = h(0), [R, z] = h("next"), [B, V] = h(!1), [H, U] = h(S > 0), ue = m(null), W = e ?? ue, G = m(null), K = a(I, P);
21
- f(() => {
19
+ var _ = ({ ref: t, className: _ = "", children: v, items: y = [], mode: b = "slide", autoplay: x = 0, pauseOnHover: S = !0, loop: C = !0, transition: w = "slide", speed: T = 30, itemKey: E, label: D = "" }) => {
20
+ let { id: O, definition: { label: k = "Carousel" } } = n(), A = oe(e.sourceType, O), { settings: { previewMode: ce }, contexts: { InteractionsContext: le } } = p(), { interactionsManager: j } = ie(le), M = u(() => Array.isArray(y) ? y : [], [y]), N = u(() => s(M, E), [M, E]), P = M.length, F = !!ce, [I, L] = f(0), [R, z] = f("next"), [B, V] = f(!1), [H, U] = f(x > 0), ue = d(null), W = t ?? ue, G = d(null), K = r(I, P);
21
+ l(() => {
22
22
  I !== K && L(K);
23
23
  }, [I, K]);
24
- let q = d((e, t) => {
24
+ let q = c((e, t) => {
25
25
  P !== 0 && e !== K && (z(t), V(!0), L(e), j.interactionTrigger(O, "onChange", {
26
26
  index: e,
27
27
  item: M[e]
@@ -32,117 +32,117 @@ var v = ({ ref: e, className: v = "", children: y, items: b = [], mode: x = "sli
32
32
  O,
33
33
  j,
34
34
  M
35
- ]), J = d((e) => {
36
- let t = G.current, n = t ? s(t) : 0;
35
+ ]), J = c((e) => {
36
+ let t = G.current, n = t ? a(t) : 0;
37
37
  t && n > 0 && t.scrollBy({
38
38
  left: e * n,
39
39
  behavior: "smooth"
40
40
  });
41
- }, []), Y = d(() => {
42
- if (x === "scroll") {
41
+ }, []), Y = c(() => {
42
+ if (b === "scroll") {
43
43
  J(1);
44
44
  return;
45
45
  }
46
- q(c(K, P, 1, w), "next");
46
+ q(o(K, P, 1, C), "next");
47
47
  }, [
48
48
  P,
49
49
  K,
50
- w,
51
- x,
50
+ C,
51
+ b,
52
52
  q,
53
53
  J
54
- ]), X = d(() => {
55
- if (x === "scroll") {
54
+ ]), X = c(() => {
55
+ if (b === "scroll") {
56
56
  J(-1);
57
57
  return;
58
58
  }
59
- q(c(K, P, -1, w), "previous");
59
+ q(o(K, P, -1, C), "previous");
60
60
  }, [
61
61
  P,
62
62
  K,
63
- w,
64
- x,
63
+ C,
64
+ b,
65
65
  q,
66
66
  J
67
- ]), Z = d((e) => {
68
- let t = a(e.index, P);
69
- if (x === "scroll") {
67
+ ]), Z = c((e) => {
68
+ let t = r(e.index, P);
69
+ if (b === "scroll") {
70
70
  J(t - K);
71
71
  return;
72
72
  }
73
- q(t, o(K, t));
73
+ q(t, i(K, t));
74
74
  }, [
75
75
  P,
76
76
  K,
77
- x,
77
+ b,
78
78
  q,
79
79
  J
80
- ]), Q = d((e) => {
81
- e !== K && q(e, o(K, e));
80
+ ]), Q = c((e) => {
81
+ e !== K && q(e, i(K, e));
82
82
  }, [K, q]);
83
- u({
84
- delay: x === "slide" ? S : 0,
83
+ re({
84
+ delay: b === "slide" ? x : 0,
85
85
  active: F && H && P > 1,
86
86
  rootRef: W,
87
- pauseOnHover: C,
87
+ pauseOnHover: S,
88
88
  position: K,
89
89
  onTick: Y
90
90
  });
91
- let de = p(() => ({
91
+ let de = u(() => ({
92
92
  next: {
93
- ...l.callbacks.next,
93
+ ...e.callbacks.next,
94
94
  callback: Y
95
95
  },
96
96
  previous: {
97
- ...l.callbacks.previous,
97
+ ...e.callbacks.previous,
98
98
  callback: X
99
99
  },
100
100
  goTo: {
101
- ...l.callbacks.goTo,
101
+ ...e.callbacks.goTo,
102
102
  callback: Z
103
103
  },
104
104
  play: {
105
- ...l.callbacks.play,
105
+ ...e.callbacks.play,
106
106
  callback: () => U(!0)
107
107
  },
108
108
  pause: {
109
- ...l.callbacks.pause,
109
+ ...e.callbacks.pause,
110
110
  callback: () => U(!1)
111
111
  }
112
112
  }), [
113
113
  Z,
114
114
  Y,
115
115
  X
116
- ]), $ = p(() => ({
116
+ ]), $ = u(() => ({
117
117
  items: M,
118
118
  count: P,
119
119
  index: K,
120
120
  item: M[K],
121
- playing: H && S > 0
121
+ playing: H && x > 0
122
122
  }), [
123
- S,
123
+ x,
124
124
  P,
125
125
  K,
126
126
  M,
127
127
  H
128
- ]), fe = d(() => r($), [$]);
129
- oe({
128
+ ]), fe = c(() => te($), [$]);
129
+ se({
130
130
  id: O,
131
131
  source: A,
132
132
  name: k || `Carousel - ${O}`,
133
133
  fields: fe
134
134
  });
135
- let pe = p(() => A ? { runtime: { sources: { [A]: $ } } } : g, [A, $]), me = p(() => ({
135
+ let pe = u(() => A ? { runtime: { sources: { [A]: $ } } } : h, [A, $]), me = u(() => ({
136
136
  source: A,
137
137
  items: M,
138
138
  keys: N,
139
139
  index: K,
140
140
  direction: R,
141
141
  moved: B,
142
- mode: x,
143
- transition: T,
144
- speed: E,
145
- pauseOnHover: C,
142
+ mode: b,
143
+ transition: w,
144
+ speed: T,
145
+ pauseOnHover: S,
146
146
  live: F,
147
147
  scrollerRef: G,
148
148
  onScrolledTo: Q
@@ -152,32 +152,32 @@ var v = ({ ref: e, className: v = "", children: y, items: b = [], mode: x = "sli
152
152
  N,
153
153
  M,
154
154
  F,
155
- x,
155
+ b,
156
156
  B,
157
157
  Q,
158
- C,
158
+ S,
159
159
  A,
160
- E,
161
- T
160
+ T,
161
+ w
162
162
  ]);
163
- return /* @__PURE__ */ _(n, {
163
+ return /* @__PURE__ */ g(ee, {
164
164
  ref: W,
165
- className: ie("plitzi-component__carousel", `carousel--${x}`, v),
165
+ className: ae("plitzi-component__carousel", `carousel--${b}`, _),
166
166
  role: "region",
167
167
  "aria-roledescription": "carousel",
168
- "aria-label": se || void 0,
169
- interactionTriggers: l.triggers,
168
+ "aria-label": D || void 0,
169
+ interactionTriggers: e.triggers,
170
170
  interactionCallbacks: de,
171
- children: /* @__PURE__ */ _(re, {
171
+ children: /* @__PURE__ */ g(m, {
172
172
  inherit: "live",
173
173
  name: `Carousel:${O}`,
174
174
  value: pe,
175
- children: /* @__PURE__ */ _(i, {
175
+ children: /* @__PURE__ */ g(ne, {
176
176
  value: me,
177
- children: y
177
+ children: v
178
178
  })
179
179
  })
180
180
  });
181
- }, y = e(v);
181
+ }, v = t(_);
182
182
  //#endregion
183
- export { v as Carousel, y as default };
183
+ export { _ as Carousel, v as default };
@@ -1,6 +1,6 @@
1
- import e from "./CarouselTrack.mjs";
2
- import t from "./declaration.mjs";
1
+ import e from "./declaration.mjs";
2
+ import t from "./CarouselTrack.mjs";
3
3
  //#region src/elements/structure/Carousel/CarouselTrack/index.ts
4
- var n = Object.assign(e, t);
4
+ var n = Object.assign(t, e);
5
5
  //#endregion
6
6
  export { n as default };
@@ -123,8 +123,8 @@ declare const declaration: {
123
123
  items?: unknown[] | undefined;
124
124
  speed?: number | undefined;
125
125
  loop?: boolean | undefined;
126
- autoplay?: number | undefined;
127
126
  pauseOnHover?: boolean | undefined;
127
+ autoplay?: number | undefined;
128
128
  transition?: import('./CarouselContext').CarouselTransition | undefined;
129
129
  itemKey?: string | undefined;
130
130
  }>>;
@@ -178,8 +178,8 @@ declare const Carousel: {
178
178
  items?: unknown[] | undefined;
179
179
  speed?: number | undefined;
180
180
  loop?: boolean | undefined;
181
- autoplay?: number | undefined;
182
181
  pauseOnHover?: boolean | undefined;
182
+ autoplay?: number | undefined;
183
183
  transition?: import('./CarouselContext').CarouselTransition | undefined;
184
184
  itemKey?: string | undefined;
185
185
  }>;
@@ -1,16 +1,16 @@
1
- import e from "../../../Element/hocs/withElement.mjs";
2
- import { RootElement as t } from "../../../Element/RootElement.mjs";
3
- import { NAMEABLE_CONTAINER_TAGS as n } from "./declaration.mjs";
1
+ import { NAMEABLE_CONTAINER_TAGS as e } from "./declaration.mjs";
2
+ import t from "../../../Element/hocs/withElement.mjs";
3
+ import { RootElement as n } from "../../../Element/RootElement.mjs";
4
4
  import { jsx as r } from "react/jsx-runtime";
5
5
  import i from "clsx";
6
6
  //#region src/elements/structure/Container/Container.tsx
7
- var a = ({ ref: e, className: a = "", subType: o = "div", label: s = "", decorative: c = !1, live: l = "", title: u = "", children: d }) => {
8
- let f = !c && s && n.includes(o) ? {
7
+ var a = ({ ref: t, className: a = "", subType: o = "div", label: s = "", decorative: c = !1, live: l = "", title: u = "", children: d }) => {
8
+ let f = !c && s && e.includes(o) ? {
9
9
  "aria-label": s,
10
10
  ...o === "div" ? { role: "group" } : {}
11
11
  } : {}, p = c ? { "aria-hidden": !0 } : {}, m = l ? { "aria-live": l } : {};
12
- return /* @__PURE__ */ r(t, {
13
- ref: e,
12
+ return /* @__PURE__ */ r(n, {
13
+ ref: t,
14
14
  tag: o,
15
15
  className: i(`plitzi-component__container plitzi-component__container-${o}`, a),
16
16
  title: u || void 0,
@@ -19,6 +19,6 @@ var a = ({ ref: e, className: a = "", subType: o = "div", label: s = "", decorat
19
19
  ...m,
20
20
  children: d
21
21
  });
22
- }, o = e(a);
22
+ }, o = t(a);
23
23
  //#endregion
24
24
  export { a as Container, o as default };
@@ -1,8 +1,8 @@
1
- import e from "../../../Element/hocs/withElement.mjs";
2
- import t from "../../../Element/hooks/useElement.mjs";
3
- import { RootElement as n } from "../../../Element/RootElement.mjs";
4
- import r from "../../../dataSource/pathFields.mjs";
5
- import i from "./declaration.mjs";
1
+ import e from "./declaration.mjs";
2
+ import t from "../../../Element/hocs/withElement.mjs";
3
+ import n from "../../../Element/hooks/useElement.mjs";
4
+ import { RootElement as r } from "../../../Element/RootElement.mjs";
5
+ import i from "../../../dataSource/pathFields.mjs";
6
6
  import a from "../ModalContainer/useModalDialog.mjs";
7
7
  import { use as o, useCallback as s, useEffect as c, useMemo as l, useRef as u, useState as d } from "react";
8
8
  import f from "@plitzi/sdk-shared/hooks/usePlitziServiceContext";
@@ -13,8 +13,8 @@ import _ from "clsx";
13
13
  import v from "@plitzi/sdk-shared/dataSource/helpers/getSourceName";
14
14
  import y from "@plitzi/sdk-shared/dataSource/hooks/useRegisterSource";
15
15
  //#region src/elements/structure/DialogContainer/DialogContainer.tsx
16
- var b = ({ ref: e, className: b = "", children: x, headerLabel: S = "Dialog Header", acceptButtonLabel: C = "Accept", acceptButtonLabelLoading: w = "Loading...", rejectButtonLabel: T = "Cancel", autoHideAfterClick: E = !0 }) => {
17
- let { id: D, rootId: O, visible: k, setElementState: A, definition: { styleSelectors: j, label: M = "Dialog" }, elementState: N } = t(), P = v(i.sourceType, D), { settings: { previewMode: F }, contexts: { InteractionsContext: I } } = f(), { interactionsManager: L } = o(I), [R, z] = d({}), [B, V] = d(!1), H = u(null), U = `${O}_${D}_title`, W = s((e) => {
16
+ var b = ({ ref: t, className: b = "", children: x, headerLabel: S = "Dialog Header", acceptButtonLabel: C = "Accept", acceptButtonLabelLoading: w = "Loading...", rejectButtonLabel: T = "Cancel", autoHideAfterClick: E = !0 }) => {
17
+ let { id: D, rootId: O, visible: k, setElementState: A, definition: { styleSelectors: j, label: M = "Dialog" }, elementState: N } = n(), P = v(e.sourceType, D), { settings: { previewMode: F }, contexts: { InteractionsContext: I } } = f(), { interactionsManager: L } = o(I), [R, z] = d({}), [B, V] = d(!1), H = u(null), U = `${O}_${D}_title`, W = s((e) => {
18
18
  let { metadata: t } = e;
19
19
  if (t && typeof t == "object") z(t);
20
20
  else if (typeof t == "string") try {
@@ -72,12 +72,12 @@ var b = ({ ref: e, className: b = "", children: x, headerLabel: S = "Dialog Head
72
72
  A
73
73
  ]), Y = l(() => ({
74
74
  openDialog: {
75
- ...i.callbacks.openDialog,
75
+ ...e.callbacks.openDialog,
76
76
  title: `Open ${M}`,
77
77
  callback: W
78
78
  },
79
79
  closeDialog: {
80
- ...i.callbacks.closeDialog,
80
+ ...e.callbacks.closeDialog,
81
81
  title: `Close ${M}`,
82
82
  callback: G
83
83
  }
@@ -98,7 +98,7 @@ var b = ({ ref: e, className: b = "", children: x, headerLabel: S = "Dialog Head
98
98
  R,
99
99
  N.visibility
100
100
  ]);
101
- let X = s(() => r(R), [R]);
101
+ let X = s(() => i(R), [R]);
102
102
  y({
103
103
  id: D,
104
104
  source: P,
@@ -106,10 +106,10 @@ var b = ({ ref: e, className: b = "", children: x, headerLabel: S = "Dialog Head
106
106
  fields: X
107
107
  });
108
108
  let Z = l(() => P ? { runtime: { sources: { [P]: R } } } : m, [P, R]);
109
- return /* @__PURE__ */ g(n, {
110
- ref: e,
109
+ return /* @__PURE__ */ g(r, {
110
+ ref: t,
111
111
  className: _("plitzi-component__dialog-container", b),
112
- interactionTriggers: i.triggers,
112
+ interactionTriggers: e.triggers,
113
113
  interactionCallbacks: Y,
114
114
  children: [/* @__PURE__ */ h("div", {
115
115
  className: _("dialog-container__background", j.backgroundContainer),
@@ -175,6 +175,6 @@ var b = ({ ref: e, className: b = "", children: x, headerLabel: S = "Dialog Head
175
175
  ]
176
176
  })]
177
177
  });
178
- }, x = e(b);
178
+ }, x = t(b);
179
179
  //#endregion
180
180
  export { b as DialogContainer, x as default };
@@ -156,8 +156,7 @@ declare const declaration: {
156
156
  readonly top: "0";
157
157
  readonly position: "absolute";
158
158
  readonly 'z-index': "210";
159
- readonly 'background-color': "black";
160
- readonly opacity: "0.5";
159
+ readonly 'background-color': "rgb(0 0 0 / 50%)";
161
160
  };
162
161
  };
163
162
  readonly rootContainer: {
@@ -169,8 +169,7 @@ var t = { default: {
169
169
  top: "0",
170
170
  position: "absolute",
171
171
  "z-index": "210",
172
- "background-color": "black",
173
- opacity: "0.5"
172
+ "background-color": "rgb(0 0 0 / 50%)"
174
173
  } },
175
174
  rootContainer: { default: {
176
175
  display: "flex",
@@ -155,8 +155,7 @@ declare const DialogContainer: {
155
155
  readonly top: "0";
156
156
  readonly position: "absolute";
157
157
  readonly 'z-index': "210";
158
- readonly 'background-color': "black";
159
- readonly opacity: "0.5";
158
+ readonly 'background-color': "rgb(0 0 0 / 50%)";
160
159
  };
161
160
  };
162
161
  readonly rootContainer: {
@@ -1,8 +1,8 @@
1
- import e from "../../../../../Element/hooks/useElement.mjs";
2
- import { RootElement as t } from "../../../../../Element/RootElement.mjs";
3
- import { rowKeys as n } from "./rowKeys.mjs";
4
- import r from "./ListControlledItem.mjs";
5
- import i from "../../declaration.mjs";
1
+ import e from "../../declaration.mjs";
2
+ import t from "../../../../../Element/hooks/useElement.mjs";
3
+ import { RootElement as n } from "../../../../../Element/RootElement.mjs";
4
+ import { rowKeys as r } from "./rowKeys.mjs";
5
+ import i from "./ListControlledItem.mjs";
6
6
  import { useCallback as a, useMemo as o } from "react";
7
7
  import s from "@plitzi/sdk-shared/hooks/usePlitziServiceContext";
8
8
  import { get as c } from "@plitzi/plitzi-ui/helpers";
@@ -14,7 +14,7 @@ import h from "@plitzi/sdk-shared/dataSource/helpers/getSourceName";
14
14
  import g from "@plitzi/sdk-shared/dataSource/hooks/useRegisterSource";
15
15
  //#region src/elements/structure/List/modes/ListControlled/ListControlled.tsx
16
16
  var _ = ({ ref: _, className: v = "", subType: y = "ul", children: b, items: x = [], itemKey: S, label: C = "" }) => {
17
- let { id: w, definition: { label: T } } = e(), E = h(i.sourceType, w), { settings: { previewMode: D } } = s(), O = o(() => Array.isArray(x) ? x : [], [x]), k = o(() => n(O, S), [O, S]), A = a(() => d({
17
+ let { id: w, definition: { label: T } } = t(), E = h(e.sourceType, w), { settings: { previewMode: D } } = s(), O = o(() => Array.isArray(x) ? x : [], [x]), k = o(() => r(O, S), [O, S]), A = a(() => d({
18
18
  item: c(O, "0", {}),
19
19
  index: 0
20
20
  }).reduce((e, t) => [...e, {
@@ -26,7 +26,7 @@ var _ = ({ ref: _, className: v = "", subType: y = "ul", children: b, items: x =
26
26
  source: E,
27
27
  name: T || `List - ${w}`,
28
28
  fields: A
29
- }), /* @__PURE__ */ p(t, {
29
+ }), /* @__PURE__ */ p(n, {
30
30
  ref: _,
31
31
  tag: y,
32
32
  "aria-label": C || void 0,
@@ -41,7 +41,7 @@ var _ = ({ ref: _, className: v = "", subType: y = "ul", children: b, items: x =
41
41
  className: "controlled-list-item__counter",
42
42
  children: `List Item - ${t + 1}`
43
43
  })
44
- }, t) : /* @__PURE__ */ f(r, {
44
+ }, t) : /* @__PURE__ */ f(i, {
45
45
  index: t,
46
46
  isTemplate: t !== 0 && !D,
47
47
  record: e,
@@ -1,9 +1,9 @@
1
- import e from "../../../Element/hocs/withElement.mjs";
2
- import t from "../../../Element/hooks/useElement.mjs";
3
- import { RootElement as n } from "../../../Element/RootElement.mjs";
4
- import r from "../../../dataSource/pathFields.mjs";
5
- import i from "./useModalDialog.mjs";
6
- import a from "./declaration.mjs";
1
+ import e from "./declaration.mjs";
2
+ import t from "../../../Element/hocs/withElement.mjs";
3
+ import n from "../../../Element/hooks/useElement.mjs";
4
+ import { RootElement as r } from "../../../Element/RootElement.mjs";
5
+ import i from "../../../dataSource/pathFields.mjs";
6
+ import a from "./useModalDialog.mjs";
7
7
  import { metadataFromText as o } from "./metadataFromText.mjs";
8
8
  import { use as s, useCallback as c, useEffect as l, useMemo as u, useRef as d, useState as f } from "react";
9
9
  import p from "@plitzi/sdk-shared/hooks/usePlitziServiceContext";
@@ -14,8 +14,8 @@ import v from "clsx";
14
14
  import y from "@plitzi/sdk-shared/dataSource/helpers/getSourceName";
15
15
  import b from "@plitzi/sdk-shared/dataSource/hooks/useRegisterSource";
16
16
  //#region src/elements/structure/ModalContainer/ModalContainer.tsx
17
- var x = ({ ref: e, className: x = "", children: S, title: C = "Modal Header", autoHideAfterClick: w = !0 }) => {
18
- let { id: T, rootId: E, visible: D, definition: { styleSelectors: O, label: k = "Modal" }, elementState: A, setElementState: j } = t(), M = y(a.sourceType, T), { settings: { previewMode: N }, contexts: { InteractionsContext: P } } = p(), { interactionsManager: F } = s(P), [I, L] = f({}), R = d(null), z = `${E}_${T}_title`, B = c((e) => {
17
+ var x = ({ ref: t, className: x = "", children: S, title: C = "Modal Header", autoHideAfterClick: w = !0 }) => {
18
+ let { id: T, rootId: E, visible: D, definition: { styleSelectors: O, label: k = "Modal" }, elementState: A, setElementState: j } = n(), M = y(e.sourceType, T), { settings: { previewMode: N }, contexts: { InteractionsContext: P } } = p(), { interactionsManager: F } = s(P), [I, L] = f({}), R = d(null), z = `${E}_${T}_title`, B = c((e) => {
19
19
  let { metadata: t } = e;
20
20
  L(t && typeof t == "object" ? t : typeof t == "string" ? o(t) : typeof t == "boolean" || typeof t == "number" ? { content: t } : {}), j((e) => ({
21
21
  ...e,
@@ -46,12 +46,12 @@ var x = ({ ref: e, className: x = "", children: S, title: C = "Modal Header", au
46
46
  T
47
47
  ]), U = u(() => ({
48
48
  openModal: {
49
- ...a.callbacks.openModal,
49
+ ...e.callbacks.openModal,
50
50
  title: `Open ${k}`,
51
51
  callback: B
52
52
  },
53
53
  closeModal: {
54
- ...a.callbacks.closeModal,
54
+ ...e.callbacks.closeModal,
55
55
  title: `Close ${k}`,
56
56
  callback: V
57
57
  }
@@ -60,7 +60,7 @@ var x = ({ ref: e, className: x = "", children: S, title: C = "Modal Header", au
60
60
  B,
61
61
  k
62
62
  ]);
63
- i({
63
+ a({
64
64
  panelRef: R,
65
65
  open: !!N && D,
66
66
  onClose: V
@@ -72,7 +72,7 @@ var x = ({ ref: e, className: x = "", children: S, title: C = "Modal Header", au
72
72
  I,
73
73
  A.visibility
74
74
  ]);
75
- let W = c(() => r(I), [I]);
75
+ let W = c(() => i(I), [I]);
76
76
  b({
77
77
  id: T,
78
78
  source: M,
@@ -80,10 +80,10 @@ var x = ({ ref: e, className: x = "", children: S, title: C = "Modal Header", au
80
80
  fields: W
81
81
  });
82
82
  let G = u(() => M ? { runtime: { sources: { [M]: I } } } : h, [M, I]);
83
- return /* @__PURE__ */ _(n, {
84
- ref: e,
83
+ return /* @__PURE__ */ _(r, {
84
+ ref: t,
85
85
  className: v("plitzi-component__modal-container", x),
86
- interactionTriggers: a.triggers,
86
+ interactionTriggers: e.triggers,
87
87
  interactionCallbacks: U,
88
88
  children: [/* @__PURE__ */ g("div", {
89
89
  className: v("modal-container__background", O.backgroundContainer),
@@ -124,6 +124,6 @@ var x = ({ ref: e, className: x = "", children: S, title: C = "Modal Header", au
124
124
  })]
125
125
  })]
126
126
  });
127
- }, S = e(x);
127
+ }, S = t(x);
128
128
  //#endregion
129
129
  export { x as ModalContainer, S as default };
@@ -59,7 +59,7 @@ declare const declaration: {
59
59
  readonly definition: {
60
60
  readonly label: "Modal Container";
61
61
  readonly type: "modalContainer";
62
- readonly description: "A modal overlay container opened and closed through interactions; use for dialogs over the page.";
62
+ readonly description: string;
63
63
  readonly items: readonly [];
64
64
  readonly bindings: {};
65
65
  /**
@@ -121,8 +121,7 @@ declare const declaration: {
121
121
  readonly top: "0";
122
122
  readonly position: "absolute";
123
123
  readonly 'z-index': "210";
124
- readonly 'background-color': "black";
125
- readonly opacity: "0.5";
124
+ readonly 'background-color': "rgb(0 0 0 / 50%)";
126
125
  };
127
126
  };
128
127
  readonly rootContainer: {
@@ -49,7 +49,7 @@ var t = e()({
49
49
  definition: {
50
50
  label: "Modal Container",
51
51
  type: "modalContainer",
52
- description: "A modal overlay container opened and closed through interactions; use for dialogs over the page.",
52
+ description: "A modal overlay container opened and closed through interactions; use for dialogs over the page. The element itself is fixed over the whole viewport, and holds two layers side by side — neither inside the other: `backgroundContainer`, the dim layer, `rgb(0 0 0 / 50%)` (its `background-color` is the whole dim), and `rootContainer`, the dialog, centred by `top: 50%`, `left: 50%` and `transform: translate3d(-50%, -50%, 0)` — to sit it near the top, set `top` and `transform: translateX(-50%)`; flex alignment on the dim layer moves nothing. Inside the dialog, top to bottom: `headerContainer` (with `headerTitle` and `headerCloseButton`) and `bodyContainer`.",
53
53
  items: [],
54
54
  bindings: {},
55
55
  loadStrategy: "lazy",
@@ -101,8 +101,7 @@ var t = e()({
101
101
  top: "0",
102
102
  position: "absolute",
103
103
  "z-index": "210",
104
- "background-color": "black",
105
- opacity: "0.5"
104
+ "background-color": "rgb(0 0 0 / 50%)"
106
105
  } },
107
106
  rootContainer: { default: {
108
107
  display: "flex",
@@ -58,7 +58,7 @@ declare const ModalContainer: {
58
58
  readonly definition: {
59
59
  readonly label: "Modal Container";
60
60
  readonly type: "modalContainer";
61
- readonly description: "A modal overlay container opened and closed through interactions; use for dialogs over the page.";
61
+ readonly description: string;
62
62
  readonly items: readonly [];
63
63
  readonly bindings: {};
64
64
  readonly loadStrategy: "lazy";
@@ -115,8 +115,7 @@ declare const ModalContainer: {
115
115
  readonly top: "0";
116
116
  readonly position: "absolute";
117
117
  readonly 'z-index': "210";
118
- readonly 'background-color': "black";
119
- readonly opacity: "0.5";
118
+ readonly 'background-color': "rgb(0 0 0 / 50%)";
120
119
  };
121
120
  };
122
121
  readonly rootContainer: {