@plitzi/sdk-elements 0.38.8 → 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 (65) hide show
  1. package/CHANGELOG.md +157 -0
  2. package/dist/Component/ComponentHelper.mjs +22 -13
  3. package/dist/Element/hooks/useElementInternal.mjs +67 -59
  4. package/dist/elements/advanced/BlockHtml/index.mjs +3 -3
  5. package/dist/elements/advanced/BlockJsx/index.mjs +3 -3
  6. package/dist/elements/advanced/Custom/index.mjs +3 -3
  7. package/dist/elements/basic/Button/index.mjs +3 -3
  8. package/dist/elements/basic/Text/Settings.d.ts +2 -1
  9. package/dist/elements/basic/Text/Settings.mjs +16 -10
  10. package/dist/elements/basic/Text/Text.d.ts +3 -1
  11. package/dist/elements/basic/Text/Text.mjs +6 -5
  12. package/dist/elements/basic/Text/declaration.d.ts +1 -0
  13. package/dist/elements/basic/Text/index.d.ts +1 -0
  14. package/dist/elements/basic/ThemeToggle/ThemeToggle.mjs +13 -13
  15. package/dist/elements/declarations/index.d.ts +26 -17
  16. package/dist/elements/declarations/index.mjs +6 -6
  17. package/dist/elements/form/Form/Form.mjs +19 -19
  18. package/dist/elements/form/FormControl/FormControl.d.ts +1 -0
  19. package/dist/elements/form/FormControl/FormControl.mjs +10 -10
  20. package/dist/elements/form/FormControl/Settings.mjs +1 -1
  21. package/dist/elements/form/FormControl/declaration.d.ts +1 -1
  22. package/dist/elements/form/FormControl/declaration.mjs +3 -3
  23. package/dist/elements/form/FormControl/index.d.ts +1 -1
  24. package/dist/elements/internal/NotFound/index.mjs +3 -3
  25. package/dist/elements/internal/Page/Page.d.ts +5 -0
  26. package/dist/elements/internal/Page/Page.mjs +26 -25
  27. package/dist/elements/internal/Page/PageHead.d.ts +12 -0
  28. package/dist/elements/internal/Page/PageHead.mjs +29 -0
  29. package/dist/elements/internal/Page/declaration.d.ts +2 -0
  30. package/dist/elements/internal/Page/declaration.mjs +5 -0
  31. package/dist/elements/internal/Page/index.d.ts +2 -0
  32. package/dist/elements/provider/ApiContainer/ApiContainer.d.ts +7 -0
  33. package/dist/elements/provider/ApiContainer/ApiContainer.mjs +187 -187
  34. package/dist/elements/provider/ApiContainer/declaration.d.ts +11 -9
  35. package/dist/elements/provider/ApiContainer/declaration.mjs +2 -1
  36. package/dist/elements/provider/ApiContainer/index.d.ts +11 -9
  37. package/dist/elements/provider/Channel/Channel.mjs +15 -15
  38. package/dist/elements/provider/Channel/declaration.d.ts +1 -1
  39. package/dist/elements/provider/Channel/index.d.ts +1 -1
  40. package/dist/elements/structure/Carousel/Carousel.mjs +72 -72
  41. package/dist/elements/structure/Carousel/CarouselTrack/index.mjs +3 -3
  42. package/dist/elements/structure/Carousel/declaration.d.ts +1 -1
  43. package/dist/elements/structure/Carousel/index.d.ts +1 -1
  44. package/dist/elements/structure/Container/Container.mjs +8 -8
  45. package/dist/elements/structure/DialogContainer/DialogContainer.mjs +14 -14
  46. package/dist/elements/structure/DialogContainer/declaration.d.ts +1 -2
  47. package/dist/elements/structure/DialogContainer/declaration.mjs +1 -2
  48. package/dist/elements/structure/DialogContainer/index.d.ts +1 -2
  49. package/dist/elements/structure/List/List.d.ts +3 -1
  50. package/dist/elements/structure/List/List.mjs +3 -1
  51. package/dist/elements/structure/List/Settings.d.ts +2 -1
  52. package/dist/elements/structure/List/Settings.mjs +12 -5
  53. package/dist/elements/structure/List/declaration.d.ts +1 -0
  54. package/dist/elements/structure/List/index.d.ts +1 -0
  55. package/dist/elements/structure/List/modes/ListBasic.d.ts +3 -1
  56. package/dist/elements/structure/List/modes/ListBasic.mjs +2 -1
  57. package/dist/elements/structure/List/modes/ListControlled/ListControlled.d.ts +3 -1
  58. package/dist/elements/structure/List/modes/ListControlled/ListControlled.mjs +24 -23
  59. package/dist/elements/structure/ModalContainer/ModalContainer.mjs +16 -16
  60. package/dist/elements/structure/ModalContainer/declaration.d.ts +2 -3
  61. package/dist/elements/structure/ModalContainer/declaration.mjs +2 -3
  62. package/dist/elements/structure/ModalContainer/index.d.ts +2 -3
  63. package/dist/elements/structure/Pagination/Pagination.mjs +10 -10
  64. package/dist/index.d.ts +21 -17
  65. 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: {
@@ -11,8 +11,10 @@ export type ListProps<T = unknown> = {
11
11
  * filtered or reordered, and mounts again when its item changes. Left out: the item's `id`, else its position.
12
12
  */
13
13
  itemKey?: string;
14
+ /** What a screen reader calls the list — a group of options, a set of results — said before its rows. */
15
+ label?: string;
14
16
  };
15
- declare const List: ({ ref, className, subType, children, items, source, itemKey }: ListProps) => import('react').JSX.Element;
17
+ declare const List: ({ ref, className, subType, children, items, source, itemKey, label }: ListProps) => import('react').JSX.Element;
16
18
  declare const _default: {
17
19
  (props: import('../../../Element/hocs/withElement').WithElementProps<ListProps<unknown>>): import('react').JSX.Element;
18
20
  displayName: string;
@@ -3,7 +3,7 @@ import t from "./modes/ListBasic.mjs";
3
3
  import n from "./modes/ListControlled/index.mjs";
4
4
  import { jsx as r } from "react/jsx-runtime";
5
5
  //#region src/elements/structure/List/List.tsx
6
- var i = ({ ref: e, className: i = "", subType: a = "ul", children: o, items: s = [], source: c = "none", itemKey: l }) => {
6
+ var i = ({ ref: e, className: i = "", subType: a = "ul", children: o, items: s = [], source: c = "none", itemKey: l, label: u = "" }) => {
7
7
  switch (c) {
8
8
  case "controlled": return /* @__PURE__ */ r(n, {
9
9
  ref: e,
@@ -11,12 +11,14 @@ var i = ({ ref: e, className: i = "", subType: a = "ul", children: o, items: s =
11
11
  subType: a,
12
12
  items: s,
13
13
  itemKey: l,
14
+ label: u,
14
15
  children: o
15
16
  });
16
17
  default: return /* @__PURE__ */ r(t, {
17
18
  ref: e,
18
19
  className: i,
19
20
  subType: a,
21
+ label: u,
20
22
  children: o
21
23
  });
22
24
  }
@@ -2,7 +2,8 @@ type SettingsProps = {
2
2
  subType?: 'ul' | 'ol';
3
3
  source?: 'none' | 'controlled';
4
4
  itemKey?: string;
5
+ label?: string;
5
6
  onUpdate?: (key: string, value: string | boolean | number) => void;
6
7
  };
7
- declare const Settings: ({ subType, source, itemKey, onUpdate }: SettingsProps) => import('react').JSX.Element;
8
+ declare const Settings: ({ subType, source, itemKey, label, onUpdate }: SettingsProps) => import('react').JSX.Element;
8
9
  export default Settings;
@@ -3,15 +3,15 @@ import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
3
  import r from "@plitzi/plitzi-ui/Input";
4
4
  import i from "@plitzi/plitzi-ui/Select";
5
5
  //#region src/elements/structure/List/Settings.tsx
6
- var a = ({ subType: a = "ul", source: o = "none", itemKey: s = "", onUpdate: c }) => {
7
- let l = e((e) => (t) => c?.(e, t), [c]);
6
+ var a = ({ subType: a = "ul", source: o = "none", itemKey: s = "", label: c = "", onUpdate: l }) => {
7
+ let u = e((e) => (t) => l?.(e, t), [l]);
8
8
  return /* @__PURE__ */ n("div", {
9
9
  className: "flex flex-col gap-4 py-2",
10
10
  children: [
11
11
  /* @__PURE__ */ n(i, {
12
12
  label: "Source",
13
13
  value: o,
14
- onChange: l("source"),
14
+ onChange: u("source"),
15
15
  size: "xs",
16
16
  children: [/* @__PURE__ */ t("option", {
17
17
  value: "none",
@@ -27,12 +27,12 @@ var a = ({ subType: a = "ul", source: o = "none", itemKey: s = "", onUpdate: c }
27
27
  placeholder: "id",
28
28
  value: s,
29
29
  title: "The field of each item that names it, so a row stays with its item when the list is filtered.",
30
- onChange: l("itemKey")
30
+ onChange: u("itemKey")
31
31
  }),
32
32
  /* @__PURE__ */ n(i, {
33
33
  label: "List Type",
34
34
  value: a,
35
- onChange: l("subType"),
35
+ onChange: u("subType"),
36
36
  size: "xs",
37
37
  children: [/* @__PURE__ */ t("option", {
38
38
  value: "ul",
@@ -41,6 +41,13 @@ var a = ({ subType: a = "ul", source: o = "none", itemKey: s = "", onUpdate: c }
41
41
  value: "ol",
42
42
  children: "Ordered"
43
43
  })]
44
+ }),
45
+ /* @__PURE__ */ t(r, {
46
+ value: c,
47
+ label: "List Name",
48
+ placeholder: "e.g. Kinds of capsule, Search results",
49
+ onChange: u("label"),
50
+ size: "xs"
44
51
  })
45
52
  ]
46
53
  });
@@ -92,6 +92,7 @@ declare const declaration: {
92
92
  readonly initialItems: readonly ["listItem", "listItem", "listItem"];
93
93
  } & import('@plitzi/sdk-shared/authoring/declare').ElementAttributesBrand<Partial<{
94
94
  source?: "none" | "controlled" | undefined;
95
+ label?: string | undefined;
95
96
  items?: unknown[] | undefined;
96
97
  subType?: "ul" | "ol" | undefined;
97
98
  itemKey?: string | undefined;
@@ -143,6 +143,7 @@ declare const List: {
143
143
  initialItems: readonly ["listItem", "listItem", "listItem"];
144
144
  __attributes: Partial<{
145
145
  source?: "none" | "controlled" | undefined;
146
+ label?: string | undefined;
146
147
  items?: unknown[] | undefined;
147
148
  subType?: "ul" | "ol" | undefined;
148
149
  itemKey?: string | undefined;
@@ -4,6 +4,8 @@ export type ListBasicProps = {
4
4
  className?: string;
5
5
  subType?: 'ul' | 'ol';
6
6
  children?: ReactNode;
7
+ /** The list's accessible name. */
8
+ label?: string;
7
9
  };
8
- declare const ListBasic: ({ ref, className, subType, children }: ListBasicProps) => import('react').JSX.Element;
10
+ declare const ListBasic: ({ ref, className, subType, children, label }: ListBasicProps) => import('react').JSX.Element;
9
11
  export default ListBasic;
@@ -2,10 +2,11 @@ import { RootElement as e } from "../../../../Element/RootElement.mjs";
2
2
  import { jsx as t } from "react/jsx-runtime";
3
3
  import n from "clsx";
4
4
  //#region src/elements/structure/List/modes/ListBasic.tsx
5
- var r = ({ ref: r, className: i = "", subType: a = "ul", children: o }) => /* @__PURE__ */ t(e, {
5
+ var r = ({ ref: r, className: i = "", subType: a = "ul", children: o, label: s = "" }) => /* @__PURE__ */ t(e, {
6
6
  ref: r,
7
7
  tag: a,
8
8
  className: n("plitzi-component__list", i),
9
+ "aria-label": s || void 0,
9
10
  children: o
10
11
  });
11
12
  //#endregion
@@ -7,6 +7,8 @@ export type ListControlledProps<T = unknown> = {
7
7
  children: ReactNode;
8
8
  items: T[];
9
9
  itemKey?: string;
10
+ /** The list's accessible name. */
11
+ label?: string;
10
12
  };
11
- declare const ListControlled: ({ ref, className, subType, children, items, itemKey }: ListControlledProps) => import('react').JSX.Element;
13
+ declare const ListControlled: ({ ref, className, subType, children, items, itemKey, label }: ListControlledProps) => import('react').JSX.Element;
12
14
  export default ListControlled;