@prokodo/ui 0.0.7 → 0.0.8

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 (225) hide show
  1. package/README.md +1 -2
  2. package/dist/components/Accordion2.js +1 -0
  3. package/dist/components/Animated2.js +1 -0
  4. package/dist/components/AnimatedText2.js +1 -0
  5. package/dist/components/Avatar2.js +1 -0
  6. package/dist/components/BaseLink.js +1 -0
  7. package/dist/components/Button2.js +1 -0
  8. package/dist/components/Calendly2.js +1 -0
  9. package/dist/components/Card2.js +1 -0
  10. package/dist/components/Carousel2.js +1 -0
  11. package/dist/components/Chip2.js +1 -0
  12. package/dist/components/{ClassNameConfigurator-C6UbdI-d.js → ClassNameConfigurator.js} +1 -1
  13. package/dist/components/DatePicker2.js +1 -0
  14. package/dist/components/Dialog2.js +1 -0
  15. package/dist/components/Drawer2.js +1 -0
  16. package/dist/components/Form2.js +1 -0
  17. package/dist/components/GridRow.js +1 -0
  18. package/dist/components/Headline2.js +1 -0
  19. package/dist/components/Icon2.js +1 -0
  20. package/dist/components/Image2.js +1 -0
  21. package/dist/components/ImageText.js +1 -0
  22. package/dist/components/Input2.js +1 -0
  23. package/dist/components/InputOTP2.js +1 -0
  24. package/dist/components/Label2.js +1 -0
  25. package/dist/components/Link2.js +1 -0
  26. package/dist/components/List2.js +1 -0
  27. package/dist/components/Loading2.js +1 -0
  28. package/dist/components/Lottie2.js +1 -0
  29. package/dist/components/Map2.js +1 -0
  30. package/dist/components/PostItem.js +1 -0
  31. package/dist/components/PostTeaser.js +1 -0
  32. package/dist/components/PostWidget.js +1 -0
  33. package/dist/components/PostWidgetCarousel.js +1 -0
  34. package/dist/components/Quote2.js +1 -0
  35. package/dist/components/RichText.js +1 -0
  36. package/dist/components/{Select-DbjU6dlH.js → Select2.js} +1 -1
  37. package/dist/components/Skeleton2.js +1 -0
  38. package/dist/components/Slider2.js +1 -0
  39. package/dist/components/Stepper2.js +1 -0
  40. package/dist/components/Switch2.js +1 -0
  41. package/dist/components/Table2.js +1 -0
  42. package/dist/components/Teaser2.js +1 -0
  43. package/dist/components/accordion.js +1 -1
  44. package/dist/components/animated.js +1 -1
  45. package/dist/components/animatedText.js +1 -1
  46. package/dist/components/avatar.js +1 -1
  47. package/dist/components/base-link.js +1 -1
  48. package/dist/components/button.js +1 -1
  49. package/dist/components/calendly.js +1 -1
  50. package/dist/components/card.js +1 -1
  51. package/dist/components/carousel.js +1 -1
  52. package/dist/components/chip.js +1 -1
  53. package/dist/components/datePicker.js +1 -1
  54. package/dist/components/dialog.js +1 -1
  55. package/dist/components/drawer.js +1 -1
  56. package/dist/components/form.js +1 -1
  57. package/dist/components/grid.js +1 -1
  58. package/dist/components/headline.js +1 -1
  59. package/dist/components/icon.js +1 -1
  60. package/dist/components/image-text.js +1 -1
  61. package/dist/components/image.js +1 -1
  62. package/dist/components/input.js +1 -1
  63. package/dist/components/inputOTP.js +1 -1
  64. package/dist/components/label.js +1 -1
  65. package/dist/components/link.js +1 -1
  66. package/dist/components/list.js +1 -1
  67. package/dist/components/loading.js +1 -1
  68. package/dist/components/lottie.js +1 -1
  69. package/dist/components/map.js +1 -1
  70. package/dist/components/post-item.js +1 -1
  71. package/dist/components/post-teaser.js +1 -1
  72. package/dist/components/post-widget-carousel.js +1 -1
  73. package/dist/components/post-widget.js +1 -1
  74. package/dist/components/quote.js +1 -1
  75. package/dist/components/rich-text.js +1 -1
  76. package/dist/components/select.js +1 -1
  77. package/dist/components/skeleton.js +1 -1
  78. package/dist/components/slider.js +1 -1
  79. package/dist/components/stepper.js +1 -1
  80. package/dist/components/switch.js +1 -1
  81. package/dist/components/table.js +1 -1
  82. package/dist/components/teaser.js +1 -1
  83. package/dist/index.cjs.js +1 -1
  84. package/dist/index.es.js +40 -40
  85. package/dist/tsconfig.build.tsbuildinfo +1 -1
  86. package/dist/tsconfig.typecheck.tsbuildinfo +1 -0
  87. package/dist/types/components/accordion/index.d.ts +1 -1
  88. package/dist/types/components/animated/index.d.ts +1 -1
  89. package/dist/types/components/animatedText/index.d.ts +1 -1
  90. package/dist/types/components/avatar/index.d.ts +1 -1
  91. package/dist/types/components/base-link/index.d.ts +1 -1
  92. package/dist/types/components/button/index.d.ts +1 -1
  93. package/dist/types/components/calendly/index.d.ts +1 -1
  94. package/dist/types/components/card/index.d.ts +1 -1
  95. package/dist/types/components/carousel/index.d.ts +1 -1
  96. package/dist/types/components/chip/index.d.ts +1 -1
  97. package/dist/types/components/datePicker/index.d.ts +1 -1
  98. package/dist/types/components/dialog/index.d.ts +1 -1
  99. package/dist/types/components/drawer/index.d.ts +1 -1
  100. package/dist/types/components/form/Form.model.d.ts +4 -1
  101. package/dist/types/components/form/FormResponse.d.ts +2 -5
  102. package/dist/types/components/form/index.d.ts +2 -1
  103. package/dist/types/components/grid/Grid.d.ts +2 -6
  104. package/dist/types/components/grid/Grid.model.d.ts +17 -0
  105. package/dist/types/components/grid/GridRow.d.ts +2 -12
  106. package/dist/types/components/grid/index.d.ts +1 -0
  107. package/dist/types/components/headline/index.d.ts +1 -1
  108. package/dist/types/components/icon/index.d.ts +1 -1
  109. package/dist/types/components/image/index.d.ts +1 -1
  110. package/dist/types/components/image-text/index.d.ts +1 -1
  111. package/dist/types/components/input/index.d.ts +1 -1
  112. package/dist/types/components/inputOTP/index.d.ts +1 -1
  113. package/dist/types/components/label/index.d.ts +1 -1
  114. package/dist/types/components/link/index.d.ts +1 -1
  115. package/dist/types/components/list/index.d.ts +1 -1
  116. package/dist/types/components/loading/index.d.ts +1 -1
  117. package/dist/types/components/lottie/index.d.ts +1 -1
  118. package/dist/types/components/map/index.d.ts +1 -1
  119. package/dist/types/components/post-item/index.d.ts +2 -2
  120. package/dist/types/components/post-teaser/index.d.ts +1 -1
  121. package/dist/types/components/post-widget/index.d.ts +1 -1
  122. package/dist/types/components/post-widget-carousel/index.d.ts +1 -1
  123. package/dist/types/components/quote/index.d.ts +1 -1
  124. package/dist/types/components/rich-text/index.d.ts +1 -1
  125. package/dist/types/components/select/index.d.ts +1 -1
  126. package/dist/types/components/skeleton/index.d.ts +1 -1
  127. package/dist/types/components/slider/index.d.ts +1 -1
  128. package/dist/types/components/stepper/index.d.ts +1 -1
  129. package/dist/types/components/switch/index.d.ts +1 -1
  130. package/dist/types/components/table/index.d.ts +1 -1
  131. package/dist/types/components/teaser/index.d.ts +1 -1
  132. package/dist/types/index.d.ts +0 -40
  133. package/package.json +1 -1
  134. package/dist/components/Accordion-V3d_aGvZ.js +0 -130
  135. package/dist/components/Accordion-o8oKA6Tq.js +0 -1
  136. package/dist/components/Animated-BBfAgsHL.js +0 -64
  137. package/dist/components/Animated-CO4IEerF.js +0 -1
  138. package/dist/components/AnimatedText-BmB5Vkyq.js +0 -31
  139. package/dist/components/AnimatedText-Sy1jofZl.js +0 -1
  140. package/dist/components/Avatar-Ci5YNFc5.js +0 -95
  141. package/dist/components/Avatar-CjlbA5a5.js +0 -1
  142. package/dist/components/BaseLink-Dd9htNXU.js +0 -1
  143. package/dist/components/BaseLink-w1q9Qc1U.js +0 -30
  144. package/dist/components/Button-B8chVgsB.js +0 -111
  145. package/dist/components/Button-yvFLX-6Q.js +0 -1
  146. package/dist/components/Calendly-CWCAs02R.js +0 -1
  147. package/dist/components/Calendly-WBM4oHyC.js +0 -82
  148. package/dist/components/Card-BPEoLzF1.js +0 -1
  149. package/dist/components/Card-IW4R7bKr.js +0 -202
  150. package/dist/components/Carousel-CdS7SVzA.js +0 -1
  151. package/dist/components/Carousel-DpO4a3lm.js +0 -257
  152. package/dist/components/Chip-BmBxJH5M.js +0 -80
  153. package/dist/components/Chip-Q2ttDAQn.js +0 -1
  154. package/dist/components/ClassNameConfigurator-Ce5BUPXc.js +0 -860
  155. package/dist/components/DatePicker-BTenaDN8.js +0 -1
  156. package/dist/components/DatePicker-PK173UTy.js +0 -93
  157. package/dist/components/Dialog-Bq3tfZ0_.js +0 -1
  158. package/dist/components/Dialog-KlXAOdt_.js +0 -172
  159. package/dist/components/Drawer-DulO9091.js +0 -1
  160. package/dist/components/Drawer-i9X07r74.js +0 -120
  161. package/dist/components/Form-B6963dT5.js +0 -368
  162. package/dist/components/Form-DVNzITG2.js +0 -1
  163. package/dist/components/GridRow-1h1JHuDl.js +0 -114
  164. package/dist/components/GridRow-C5v0sOZZ.js +0 -1
  165. package/dist/components/Headline-CnyLLQLB.js +0 -1
  166. package/dist/components/Headline-DzEinaZi.js +0 -98
  167. package/dist/components/Icon-BMrVlROP.js +0 -4195
  168. package/dist/components/Icon-eWdA85cf.js +0 -1
  169. package/dist/components/Image-B-lyA7ym.js +0 -1
  170. package/dist/components/Image-CVgvVlLE.js +0 -33
  171. package/dist/components/ImageText-Cqp4xp9y.js +0 -113
  172. package/dist/components/ImageText-D-06_EGf.js +0 -1
  173. package/dist/components/Input-BEO9ig1R.js +0 -1
  174. package/dist/components/Input-CrNLI_OY.js +0 -258
  175. package/dist/components/InputOTP-Db7DHrhS.js +0 -88
  176. package/dist/components/InputOTP-MnmjEmPU.js +0 -1
  177. package/dist/components/Label-BvCzZIGM.js +0 -1
  178. package/dist/components/Label-DRUCdGoX.js +0 -71
  179. package/dist/components/Link-DSQ1125B.js +0 -69
  180. package/dist/components/Link-Dg7XR4uY.js +0 -1
  181. package/dist/components/List-D_dSwMx5.js +0 -1
  182. package/dist/components/List-P6xbVrBc.js +0 -196
  183. package/dist/components/Loading-C7lyHDW7.js +0 -68
  184. package/dist/components/Loading-U-CrTVTi.js +0 -1
  185. package/dist/components/Lottie-Br7PmIzX.js +0 -1
  186. package/dist/components/Lottie-CrvbxK0R.js +0 -87
  187. package/dist/components/Map-D3xbPS1S.js +0 -1
  188. package/dist/components/Map-DEIB_y-M.js +0 -64
  189. package/dist/components/PostItem-B8Vfv_sW.js +0 -183
  190. package/dist/components/PostItem-BSTn6cHD.js +0 -1
  191. package/dist/components/PostTeaser-BmZyqFL2.js +0 -186
  192. package/dist/components/PostTeaser-DLynX43c.js +0 -1
  193. package/dist/components/PostWidget-Bo4KiSsV.js +0 -170
  194. package/dist/components/PostWidget-DYWA-B8d.js +0 -1
  195. package/dist/components/PostWidgetCarousel-CZ6ptOGv.js +0 -168
  196. package/dist/components/PostWidgetCarousel-D7-p3Pwr.js +0 -1
  197. package/dist/components/Quote-6aurOanD.js +0 -1
  198. package/dist/components/Quote-CV_UYE1G.js +0 -101
  199. package/dist/components/RichText-Cg_XzkUs.js +0 -152
  200. package/dist/components/RichText-DVg1dwMV.js +0 -1
  201. package/dist/components/Select-BMyrX8V0.js +0 -3081
  202. package/dist/components/Skeleton-BuY3bttw.js +0 -1
  203. package/dist/components/Skeleton-D6olNYTG.js +0 -40
  204. package/dist/components/Slider-C-lecSwc.js +0 -957
  205. package/dist/components/Slider-GvO3Xllf.js +0 -1
  206. package/dist/components/Stepper-BV3PGCr2.js +0 -1
  207. package/dist/components/Stepper-CA1DOm4D.js +0 -135
  208. package/dist/components/Switch-C_6EUOIc.js +0 -330
  209. package/dist/components/Switch-Db3HpOhM.js +0 -1
  210. package/dist/components/Table-Csc0FIbX.js +0 -1
  211. package/dist/components/Table-Cy8bIv_C.js +0 -95
  212. package/dist/components/Teaser-CkisYOs-.js +0 -1
  213. package/dist/components/Teaser-Cl2oBeh5.js +0 -118
  214. package/dist/components/areArraysEqual-CJkStQkx.js +0 -20
  215. package/dist/components/bem-CYKrPjje.js +0 -11
  216. package/dist/components/calculation-79PhfKvq.js +0 -4
  217. package/dist/components/jsx-runtime-C5mzlN2N.js +0 -284
  218. package/dist/components/useControlled-BYdyS7Pn.js +0 -31
  219. package/dist/components/validations-B_cxltQ_.js +0 -8
  220. /package/dist/components/{areArraysEqual-6R3bBH2E.js → areArraysEqual.js} +0 -0
  221. /package/dist/components/{bem-DC5wv0dD.js → bem.js} +0 -0
  222. /package/dist/components/{calculation-D-p0iqpk.js → calculation.js} +0 -0
  223. /package/dist/components/{jsx-runtime-CITbqOLs.js → jsx-runtime.js} +0 -0
  224. /package/dist/components/{useControlled-Ysk4KqoX.js → useControlled.js} +0 -0
  225. /package/dist/components/{validations-Cnxtn28y.js → validations.js} +0 -0
@@ -1,368 +0,0 @@
1
- import { j as p } from "./jsx-runtime-C5mzlN2N.js";
2
- import { memo as B, useCallback as y, useMemo as A, useState as w, useEffect as rr, Fragment as or } from "react";
3
- import { c as H } from "./bem-CYKrPjje.js";
4
- import { b as D, a as Z, i as tr } from "./validations-B_cxltQ_.js";
5
- import { B as nr } from "./Button-B8chVgsB.js";
6
- import { a as cr, G as er } from "./GridRow-1h1JHuDl.js";
7
- import { H as ir } from "./Headline-DzEinaZi.js";
8
- import { D as ar } from "./DatePicker-PK173UTy.js";
9
- import { I as mr } from "./Input-CrNLI_OY.js";
10
- import { S as sr } from "./Select-BMyrX8V0.js";
11
- import { S as pr } from "./Slider-C-lecSwc.js";
12
- import { S as _r } from "./Switch-C_6EUOIc.js";
13
- import { L as ur } from "./List-P6xbVrBc.js";
14
- const dr = "gradientMove", lr = "fadeInKeyframe", xr = {
15
- "prokodo-Form__label": "prokodo-Form__label",
16
- "prokodo-Form__hp": "prokodo-Form__hp",
17
- "prokodo-Form__footer": "prokodo-Form__footer",
18
- "prokodo-Form__footer__submit": "prokodo-Form__footer__submit",
19
- gradientMove: dr,
20
- fadeInKeyframe: lr
21
- }, yr = "gradientMove", br = "fadeInKeyframe", fr = {
22
- "prokodo-FormField": "prokodo-FormField",
23
- gradientMove: yr,
24
- fadeInKeyframe: br
25
- }, jr = H(fr, "FormField"), z = B(
26
- ({
27
- fieldType: I,
28
- visible: t,
29
- variant: k = "primary",
30
- messagesFields: b,
31
- onChange: i,
32
- onValidate: u,
33
- ...a
34
- }) => {
35
- var h, f;
36
- const m = y(
37
- (d) => /* @__PURE__ */ p.jsx(cr, { className: jr(), xs: 12, children: d }),
38
- []
39
- );
40
- if (t === !1) return null;
41
- switch (I) {
42
- case "switch":
43
- return m(
44
- /* @__PURE__ */ p.jsx(
45
- _r,
46
- {
47
- color: k,
48
- ...a,
49
- onChange: (d, l) => i == null ? void 0 : i(a, l)
50
- }
51
- )
52
- );
53
- case "slider":
54
- return m(
55
- /* @__PURE__ */ p.jsx(
56
- pr,
57
- {
58
- ...a,
59
- onChange: (d, l) => i == null ? void 0 : i(a, l == null ? void 0 : l.toString())
60
- }
61
- )
62
- );
63
- case "select":
64
- return m(
65
- /* @__PURE__ */ p.jsx(
66
- sr,
67
- {
68
- color: k,
69
- ...a,
70
- onChange: (d, l) => i == null ? void 0 : i(a, l ?? void 0)
71
- }
72
- )
73
- );
74
- case "input":
75
- return m(
76
- /* @__PURE__ */ p.jsx(
77
- mr,
78
- {
79
- color: k,
80
- errorTranslations: (h = b == null ? void 0 : b.errors) == null ? void 0 : h.input,
81
- onValidate: (d, l) => u == null ? void 0 : u(a, l),
82
- onChange: (d) => i == null ? void 0 : i(a, d.target.value),
83
- ...a
84
- }
85
- )
86
- );
87
- case "date":
88
- return m(
89
- /* @__PURE__ */ p.jsx(
90
- ar,
91
- {
92
- ...a,
93
- errorTranslations: (f = b == null ? void 0 : b.errors) == null ? void 0 : f.date,
94
- onValidate: (d, l) => u == null ? void 0 : u(a, l),
95
- onChange: (d) => i == null ? void 0 : i(
96
- a,
97
- d == null ? void 0 : d.format("YYYY-MM-DDTHH:mm:ssZ")
98
- )
99
- }
100
- )
101
- );
102
- default:
103
- return null;
104
- }
105
- }
106
- );
107
- z.displayName = "FormField";
108
- const vr = "gradientMove", Ir = "fadeInKeyframe", kr = {
109
- "prokodo-FormResponse": "prokodo-FormResponse",
110
- "prokodo-FormResponse__success": "prokodo-FormResponse__success",
111
- "prokodo-FormResponse__errors": "prokodo-FormResponse__errors",
112
- "prokodo-FormResponse__errors__item": "prokodo-FormResponse__errors__item",
113
- "prokodo-FormResponse__errors__desc": "prokodo-FormResponse__errors__desc",
114
- gradientMove: vr,
115
- fadeInKeyframe: Ir
116
- }, F = H(kr, "FormResponse"), J = B(
117
- ({ className: I, messages: t, ...k }) => {
118
- const b = A(
119
- () => Object.keys((t == null ? void 0 : t.errors) || {}),
120
- [t == null ? void 0 : t.errors]
121
- ), i = A(
122
- () => b.map((u) => {
123
- var a, m;
124
- return {
125
- title: u.charAt(0).toUpperCase() + u.slice(1),
126
- desc: t != null && t.errors ? (m = (a = t.errors) == null ? void 0 : a[u]) == null ? void 0 : m.join(", ") : "",
127
- className: F("errors__item")
128
- };
129
- }),
130
- [b, t == null ? void 0 : t.errors]
131
- );
132
- return D(i) ? /* @__PURE__ */ p.jsxs("div", { ...k, className: F(void 0, void 0, I), children: [
133
- !Z(t == null ? void 0 : t.message) && /* @__PURE__ */ p.jsx("p", { "aria-live": "polite", className: F("success"), children: t == null ? void 0 : t.message }),
134
- !Z(t == null ? void 0 : t.errors) && /* @__PURE__ */ p.jsx(
135
- ur,
136
- {
137
- "aria-live": "assertive",
138
- "aria-relevant": "all",
139
- className: F("errors"),
140
- classNameDesc: F("errors__desc"),
141
- items: i,
142
- role: "alert",
143
- variant: "error"
144
- }
145
- )
146
- ] }) : null;
147
- }
148
- );
149
- J.displayName = "FormResponse";
150
- const N = H(xr, "Form"), hr = B(
151
- ({
152
- variant: I = "primary",
153
- action: t,
154
- label: k,
155
- className: b,
156
- fields: i,
157
- disableFields: u,
158
- hideResponse: a,
159
- defaultFields: m,
160
- messages: h,
161
- messagesFields: f,
162
- button: d,
163
- children: l,
164
- onSubmit: T,
165
- onChangeForm: R,
166
- ...Q
167
- }) => {
168
- const [s, W] = w(i ?? []), [q, K] = w(
169
- h
170
- ), [M, X] = w("");
171
- rr(() => {
172
- h !== void 0 && K(h);
173
- }, [h]);
174
- const v = y(
175
- (r, o) => {
176
- W((c) => {
177
- const e = [...c];
178
- return e[r] = {
179
- ...e[r],
180
- ...o
181
- }, e;
182
- }), R && R({
183
- ...s[r],
184
- ...o
185
- });
186
- },
187
- [s, R]
188
- ), $ = y(
189
- (r, o) => r.filter((c) => o === void 0 || c.equalTo === void 0 || typeof c.equalTo == "boolean" && c.equalTo === o ? !0 : typeof c.equalTo == "string" ? c.equalTo === o : Array.isArray(c.equalTo) && typeof o == "string" ? c.equalTo.includes(o) : !1),
190
- []
191
- ), O = y(
192
- (r, o) => o !== void 0 && D(o) ? o.flatMap(
193
- (c) => $(r, c)
194
- ) : $(r, o),
195
- [$]
196
- ), E = y(
197
- (r) => s.findIndex((o) => (o == null ? void 0 : o.name) === (r == null ? void 0 : r.name)),
198
- [s]
199
- ), P = y(
200
- (r) => {
201
- var e, n;
202
- const o = s.findIndex(
203
- (_) => (_ == null ? void 0 : _.name) === (r == null ? void 0 : r.name)
204
- );
205
- (m == null ? void 0 : m[o]) !== void 0 && ((n = (e = m == null ? void 0 : m[o]) == null ? void 0 : e.conditions) == null || n.forEach((_) => {
206
- const x = m.findIndex(
207
- (j) => (j == null ? void 0 : j.name) === (_ == null ? void 0 : _.fieldId)
208
- );
209
- m[x] !== void 0 && v(x, m[x]);
210
- }));
211
- },
212
- [m, s, v]
213
- ), Y = y(
214
- (r, o) => {
215
- const c = r == null ? void 0 : r.conditions;
216
- if (!c || (c == null ? void 0 : c.length) <= 0) {
217
- const n = E(r);
218
- v(n, { value: o });
219
- return;
220
- }
221
- P(r), O(c, o).forEach((n) => {
222
- const _ = s.findIndex(
223
- (x) => (x == null ? void 0 : x.name) === (n == null ? void 0 : n.fieldId)
224
- );
225
- v(_, n.updateProps);
226
- });
227
- const e = E(r);
228
- v(e, { value: o });
229
- },
230
- [
231
- s,
232
- E,
233
- P,
234
- O,
235
- v
236
- ]
237
- ), G = y(
238
- (r, o) => {
239
- const c = s.findIndex((n) => (n == null ? void 0 : n.name) === (r == null ? void 0 : r.name));
240
- v(c, {
241
- errorText: o
242
- });
243
- const e = (r == null ? void 0 : r.label) ?? "";
244
- K((n) => {
245
- const _ = { ...n == null ? void 0 : n.errors }, x = o !== void 0 ? [o] : [];
246
- return x.length > 0 ? _[e] = x : delete _[e], {
247
- ...n,
248
- errors: Object.keys(_).length > 0 ? _ : void 0
249
- // Only keep errors if there are any
250
- };
251
- });
252
- },
253
- [s, v]
254
- ), S = y(
255
- (r) => /* @__PURE__ */ p.jsx(
256
- z,
257
- {
258
- ...r,
259
- "aria-labelledby": `${r == null ? void 0 : r.label}-label`,
260
- "aria-required": r != null && r.required ? "true" : void 0,
261
- messagesFields: f,
262
- variant: I,
263
- disabled: u !== void 0 ? u : r == null ? void 0 : r.disabled,
264
- onChange: Y,
265
- onValidate: G
266
- }
267
- ),
268
- [
269
- I,
270
- u,
271
- f,
272
- Y,
273
- G
274
- ]
275
- ), L = y(() => {
276
- var c;
277
- const r = {};
278
- for (const e of s) {
279
- const { required: n, visible: _, value: x, label: j, fieldType: U } = e;
280
- if (j === void 0)
281
- continue;
282
- if (r[j] || (r[j] = []), U !== "slider" && U !== "switch" && tr(e == null ? void 0 : e.errorText)) {
283
- r[j].push(e == null ? void 0 : e.errorText);
284
- continue;
285
- }
286
- n && (x === void 0 || x === "") && _ !== !1 && r[j].push(
287
- ((c = f == null ? void 0 : f.errors) == null ? void 0 : c.required) ?? "This field is required. Please fill it out."
288
- );
289
- }
290
- const o = Object.keys(r).reduce((e, n) => (r[n] && r[n].length > 0 && (e[n] = r[n]), e), {});
291
- return {
292
- errors: Object.keys(o).length > 0 ? o : void 0
293
- };
294
- }, [s, f]), V = y(
295
- (r) => {
296
- r.preventDefault();
297
- const { errors: o } = L();
298
- K({
299
- errors: o !== void 0 ? o : void 0
300
- }), o === void 0 && (T == null || T(s));
301
- },
302
- [s, L, T]
303
- ), C = y(
304
- (r) => {
305
- var o;
306
- return X((o = r == null ? void 0 : r.target) == null ? void 0 : o.value);
307
- },
308
- []
309
- ), g = A(
310
- () => a ? s.every((r) => {
311
- const { value: o } = r;
312
- return !(r != null && r.required && (o === void 0 || o === "" || Array.isArray(o) && (o == null ? void 0 : o.length) <= 0) && (r == null ? void 0 : r.visible) !== !1);
313
- }) : !0,
314
- [s, a]
315
- );
316
- return /* @__PURE__ */ p.jsxs(
317
- "form",
318
- {
319
- ...Q,
320
- noValidate: !0,
321
- action: t,
322
- "aria-labelledby": "form-heading",
323
- className: N(void 0, void 0, b),
324
- onSubmit: t === void 0 ? V : void 0,
325
- children: [
326
- /* @__PURE__ */ p.jsx(ir, { className: N("label"), id: "form-heading", type: "h2", children: k }),
327
- /* @__PURE__ */ p.jsxs(er, { spacing: 2, children: [
328
- D(s) && s.map((r) => /* @__PURE__ */ p.jsx(or, { children: S(r) }, `form-input-${r.name}`)),
329
- l,
330
- S({
331
- fieldType: "input",
332
- label: "Do not fill this field",
333
- labelProps: {
334
- "aria-hidden": "true"
335
- },
336
- name: "hp",
337
- id: "hp",
338
- "aria-hidden": "true",
339
- // Hide honeypot field from assistive technology
340
- className: N("hp"),
341
- value: M,
342
- onChange: C
343
- })
344
- ] }),
345
- /* @__PURE__ */ p.jsxs("div", { className: N("footer"), children: [
346
- (a === !1 || a === void 0) && /* @__PURE__ */ p.jsx(J, { messages: q }),
347
- (M == null ? void 0 : M.length) <= 0 && /* @__PURE__ */ p.jsx(
348
- nr,
349
- {
350
- "aria-label": "Submit form",
351
- className: N("footer__submit"),
352
- color: I,
353
- type: "submit",
354
- ...d,
355
- disabled: (q == null ? void 0 : q.errors) !== void 0 || !g
356
- }
357
- )
358
- ] })
359
- ]
360
- }
361
- );
362
- }
363
- );
364
- hr.displayName = "Form";
365
- export {
366
- hr as F,
367
- J as a
368
- };
@@ -1 +0,0 @@
1
- "use strict";const x=require("./jsx-runtime-CITbqOLs.js"),c=require("react"),A=require("./bem-DC5wv0dD.js"),I=require("./validations-Cnxtn28y.js"),V=require("./Button-yvFLX-6Q.js"),L=require("./GridRow-C5v0sOZZ.js"),g=require("./Headline-CnyLLQLB.js"),rr=require("./DatePicker-BTenaDN8.js"),or=require("./Input-BEO9ig1R.js"),tr=require("./Select-DbjU6dlH.js"),nr=require("./Slider-GvO3Xllf.js"),er=require("./Switch-Db3HpOhM.js"),cr=require("./List-D_dSwMx5.js"),ir="gradientMove",sr="fadeInKeyframe",ur={"prokodo-Form__label":"prokodo-Form__label","prokodo-Form__hp":"prokodo-Form__hp","prokodo-Form__footer":"prokodo-Form__footer","prokodo-Form__footer__submit":"prokodo-Form__footer__submit",gradientMove:ir,fadeInKeyframe:sr},ar="gradientMove",mr="fadeInKeyframe",xr={"prokodo-FormField":"prokodo-FormField",gradientMove:ar,fadeInKeyframe:mr},lr=A.create(xr,"FormField"),U=c.memo(({fieldType:q,visible:t,variant:E="primary",messagesFields:j,onChange:s,onValidate:p,...u})=>{var v,y;const a=c.useCallback(d=>x.jsxRuntimeExports.jsx(L.GridRow,{className:lr(),xs:12,children:d}),[]);if(t===!1)return null;switch(q){case"switch":return a(x.jsxRuntimeExports.jsx(er.Switch,{color:E,...u,onChange:(d,_)=>s==null?void 0:s(u,_)}));case"slider":return a(x.jsxRuntimeExports.jsx(nr.Slider,{...u,onChange:(d,_)=>s==null?void 0:s(u,_==null?void 0:_.toString())}));case"select":return a(x.jsxRuntimeExports.jsx(tr.Select,{color:E,...u,onChange:(d,_)=>s==null?void 0:s(u,_??void 0)}));case"input":return a(x.jsxRuntimeExports.jsx(or.Input,{color:E,errorTranslations:(v=j==null?void 0:j.errors)==null?void 0:v.input,onValidate:(d,_)=>p==null?void 0:p(u,_),onChange:d=>s==null?void 0:s(u,d.target.value),...u}));case"date":return a(x.jsxRuntimeExports.jsx(rr.DatePicker,{...u,errorTranslations:(y=j==null?void 0:j.errors)==null?void 0:y.date,onValidate:(d,_)=>p==null?void 0:p(u,_),onChange:d=>s==null?void 0:s(u,d==null?void 0:d.format("YYYY-MM-DDTHH:mm:ssZ"))}));default:return null}});U.displayName="FormField";const pr="gradientMove",dr="fadeInKeyframe",_r={"prokodo-FormResponse":"prokodo-FormResponse","prokodo-FormResponse__success":"prokodo-FormResponse__success","prokodo-FormResponse__errors":"prokodo-FormResponse__errors","prokodo-FormResponse__errors__item":"prokodo-FormResponse__errors__item","prokodo-FormResponse__errors__desc":"prokodo-FormResponse__errors__desc",gradientMove:pr,fadeInKeyframe:dr},h=A.create(_r,"FormResponse"),D=c.memo(({className:q,messages:t,...E})=>{const j=c.useMemo(()=>Object.keys((t==null?void 0:t.errors)||{}),[t==null?void 0:t.errors]),s=c.useMemo(()=>j.map(p=>{var u,a;return{title:p.charAt(0).toUpperCase()+p.slice(1),desc:t!=null&&t.errors?(a=(u=t.errors)==null?void 0:u[p])==null?void 0:a.join(", "):"",className:h("errors__item")}}),[j,t==null?void 0:t.errors]);return I.isArray(s)?x.jsxRuntimeExports.jsxs("div",{...E,className:h(void 0,void 0,q),children:[!I.isNull(t==null?void 0:t.message)&&x.jsxRuntimeExports.jsx("p",{"aria-live":"polite",className:h("success"),children:t==null?void 0:t.message}),!I.isNull(t==null?void 0:t.errors)&&x.jsxRuntimeExports.jsx(cr.List,{"aria-live":"assertive","aria-relevant":"all",className:h("errors"),classNameDesc:h("errors__desc"),items:s,role:"alert",variant:"error"})]}):null});D.displayName="FormResponse";const F=A.create(ur,"Form"),Z=c.memo(({variant:q="primary",action:t,label:E,className:j,fields:s,disableFields:p,hideResponse:u,defaultFields:a,messages:v,messagesFields:y,button:d,children:_,onSubmit:N,onChangeForm:f,...z})=>{const[m,C]=c.useState(s??[]),[M,$]=c.useState(v),[T,J]=c.useState("");c.useEffect(()=>{v!==void 0&&$(v)},[v]);const R=c.useCallback((r,o)=>{C(e=>{const i=[...e];return i[r]={...i[r],...o},i}),f&&f({...m[r],...o})},[m,f]),K=c.useCallback((r,o)=>r.filter(e=>o===void 0||e.equalTo===void 0||typeof e.equalTo=="boolean"&&e.equalTo===o?!0:typeof e.equalTo=="string"?e.equalTo===o:Array.isArray(e.equalTo)&&typeof o=="string"?e.equalTo.includes(o):!1),[]),B=c.useCallback((r,o)=>o!==void 0&&I.isArray(o)?o.flatMap(e=>K(r,e)):K(r,o),[K]),w=c.useCallback(r=>m.findIndex(o=>(o==null?void 0:o.name)===(r==null?void 0:r.name)),[m]),H=c.useCallback(r=>{var i,n;const o=m.findIndex(l=>(l==null?void 0:l.name)===(r==null?void 0:r.name));(a==null?void 0:a[o])!==void 0&&((n=(i=a==null?void 0:a[o])==null?void 0:i.conditions)==null||n.forEach(l=>{const b=a.findIndex(k=>(k==null?void 0:k.name)===(l==null?void 0:l.fieldId));a[b]!==void 0&&R(b,a[b])}))},[a,m,R]),P=c.useCallback((r,o)=>{const e=r==null?void 0:r.conditions;if(!e||(e==null?void 0:e.length)<=0){const n=w(r);R(n,{value:o});return}H(r),B(e,o).forEach(n=>{const l=m.findIndex(b=>(b==null?void 0:b.name)===(n==null?void 0:n.fieldId));R(l,n.updateProps)});const i=w(r);R(i,{value:o})},[m,w,H,B,R]),S=c.useCallback((r,o)=>{const e=m.findIndex(n=>(n==null?void 0:n.name)===(r==null?void 0:r.name));R(e,{errorText:o});const i=(r==null?void 0:r.label)??"";$(n=>{const l={...n==null?void 0:n.errors},b=o!==void 0?[o]:[];return b.length>0?l[i]=b:delete l[i],{...n,errors:Object.keys(l).length>0?l:void 0}})},[m,R]),O=c.useCallback(r=>x.jsxRuntimeExports.jsx(U,{...r,"aria-labelledby":`${r==null?void 0:r.label}-label`,"aria-required":r!=null&&r.required?"true":void 0,messagesFields:y,variant:q,disabled:p!==void 0?p:r==null?void 0:r.disabled,onChange:P,onValidate:S}),[q,p,y,P,S]),Y=c.useCallback(()=>{var e;const r={};for(const i of m){const{required:n,visible:l,value:b,label:k,fieldType:G}=i;if(k===void 0)continue;if(r[k]||(r[k]=[]),G!=="slider"&&G!=="switch"&&I.isString(i==null?void 0:i.errorText)){r[k].push(i==null?void 0:i.errorText);continue}n&&(b===void 0||b==="")&&l!==!1&&r[k].push(((e=y==null?void 0:y.errors)==null?void 0:e.required)??"This field is required. Please fill it out.")}const o=Object.keys(r).reduce((i,n)=>(r[n]&&r[n].length>0&&(i[n]=r[n]),i),{});return{errors:Object.keys(o).length>0?o:void 0}},[m,y]),Q=c.useCallback(r=>{r.preventDefault();const{errors:o}=Y();$({errors:o!==void 0?o:void 0}),o===void 0&&(N==null||N(m))},[m,Y,N]),W=c.useCallback(r=>{var o;return J((o=r==null?void 0:r.target)==null?void 0:o.value)},[]),X=c.useMemo(()=>u?m.every(r=>{const{value:o}=r;return!(r!=null&&r.required&&(o===void 0||o===""||Array.isArray(o)&&(o==null?void 0:o.length)<=0)&&(r==null?void 0:r.visible)!==!1)}):!0,[m,u]);return x.jsxRuntimeExports.jsxs("form",{...z,noValidate:!0,action:t,"aria-labelledby":"form-heading",className:F(void 0,void 0,j),onSubmit:t===void 0?Q:void 0,children:[x.jsxRuntimeExports.jsx(g.Headline,{className:F("label"),id:"form-heading",type:"h2",children:E}),x.jsxRuntimeExports.jsxs(L.Grid,{spacing:2,children:[I.isArray(m)&&m.map(r=>x.jsxRuntimeExports.jsx(c.Fragment,{children:O(r)},`form-input-${r.name}`)),_,O({fieldType:"input",label:"Do not fill this field",labelProps:{"aria-hidden":"true"},name:"hp",id:"hp","aria-hidden":"true",className:F("hp"),value:T,onChange:W})]}),x.jsxRuntimeExports.jsxs("div",{className:F("footer"),children:[(u===!1||u===void 0)&&x.jsxRuntimeExports.jsx(D,{messages:M}),(T==null?void 0:T.length)<=0&&x.jsxRuntimeExports.jsx(V.Button,{"aria-label":"Submit form",className:F("footer__submit"),color:q,type:"submit",...d,disabled:(M==null?void 0:M.errors)!==void 0||!X})]})]})});Z.displayName="Form";exports.Form=Z;exports.FormResponse=D;
@@ -1,114 +0,0 @@
1
- import { j as k } from "./jsx-runtime-C5mzlN2N.js";
2
- import { memo as s } from "react";
3
- import { c as l } from "./bem-CYKrPjje.js";
4
- const e = "gradientMove", x = "fadeInKeyframe", a = {
5
- "prokodo-Grid": "prokodo-Grid",
6
- gradientMove: e,
7
- fadeInKeyframe: x
8
- }, g = l(a, "Grid"), n = s(
9
- ({ spacing: o = 2, className: r, children: i, ...d }) => /* @__PURE__ */ k.jsx(
10
- "div",
11
- {
12
- className: g(void 0, void 0, r),
13
- style: {
14
- gap: `${o * 8}px`
15
- },
16
- ...d,
17
- children: i
18
- }
19
- )
20
- );
21
- n.displayName = "Grid";
22
- const t = "gradientMove", f = "fadeInKeyframe", c = {
23
- "prokodo-GridRow": "prokodo-GridRow",
24
- "prokodo-GridRow--align-left": "prokodo-GridRow--align-left",
25
- "prokodo-GridRow--align-center": "prokodo-GridRow--align-center",
26
- "prokodo-GridRow--align-right": "prokodo-GridRow--align-right",
27
- "prokodo-GridRow--xs-1": "prokodo-GridRow--xs-1",
28
- "prokodo-GridRow--xs-2": "prokodo-GridRow--xs-2",
29
- "prokodo-GridRow--xs-3": "prokodo-GridRow--xs-3",
30
- "prokodo-GridRow--xs-4": "prokodo-GridRow--xs-4",
31
- "prokodo-GridRow--xs-5": "prokodo-GridRow--xs-5",
32
- "prokodo-GridRow--xs-6": "prokodo-GridRow--xs-6",
33
- "prokodo-GridRow--xs-7": "prokodo-GridRow--xs-7",
34
- "prokodo-GridRow--xs-8": "prokodo-GridRow--xs-8",
35
- "prokodo-GridRow--xs-9": "prokodo-GridRow--xs-9",
36
- "prokodo-GridRow--xs-10": "prokodo-GridRow--xs-10",
37
- "prokodo-GridRow--xs-11": "prokodo-GridRow--xs-11",
38
- "prokodo-GridRow--xs-12": "prokodo-GridRow--xs-12",
39
- "prokodo-GridRow--sm-1": "prokodo-GridRow--sm-1",
40
- "prokodo-GridRow--sm-2": "prokodo-GridRow--sm-2",
41
- "prokodo-GridRow--sm-3": "prokodo-GridRow--sm-3",
42
- "prokodo-GridRow--sm-4": "prokodo-GridRow--sm-4",
43
- "prokodo-GridRow--sm-5": "prokodo-GridRow--sm-5",
44
- "prokodo-GridRow--sm-6": "prokodo-GridRow--sm-6",
45
- "prokodo-GridRow--sm-7": "prokodo-GridRow--sm-7",
46
- "prokodo-GridRow--sm-8": "prokodo-GridRow--sm-8",
47
- "prokodo-GridRow--sm-9": "prokodo-GridRow--sm-9",
48
- "prokodo-GridRow--sm-10": "prokodo-GridRow--sm-10",
49
- "prokodo-GridRow--sm-11": "prokodo-GridRow--sm-11",
50
- "prokodo-GridRow--sm-12": "prokodo-GridRow--sm-12",
51
- "prokodo-GridRow--md-1": "prokodo-GridRow--md-1",
52
- "prokodo-GridRow--md-2": "prokodo-GridRow--md-2",
53
- "prokodo-GridRow--md-3": "prokodo-GridRow--md-3",
54
- "prokodo-GridRow--md-4": "prokodo-GridRow--md-4",
55
- "prokodo-GridRow--md-5": "prokodo-GridRow--md-5",
56
- "prokodo-GridRow--md-6": "prokodo-GridRow--md-6",
57
- "prokodo-GridRow--md-7": "prokodo-GridRow--md-7",
58
- "prokodo-GridRow--md-8": "prokodo-GridRow--md-8",
59
- "prokodo-GridRow--md-9": "prokodo-GridRow--md-9",
60
- "prokodo-GridRow--md-10": "prokodo-GridRow--md-10",
61
- "prokodo-GridRow--md-11": "prokodo-GridRow--md-11",
62
- "prokodo-GridRow--md-12": "prokodo-GridRow--md-12",
63
- "prokodo-GridRow--lg-1": "prokodo-GridRow--lg-1",
64
- "prokodo-GridRow--lg-2": "prokodo-GridRow--lg-2",
65
- "prokodo-GridRow--lg-3": "prokodo-GridRow--lg-3",
66
- "prokodo-GridRow--lg-4": "prokodo-GridRow--lg-4",
67
- "prokodo-GridRow--lg-5": "prokodo-GridRow--lg-5",
68
- "prokodo-GridRow--lg-6": "prokodo-GridRow--lg-6",
69
- "prokodo-GridRow--lg-7": "prokodo-GridRow--lg-7",
70
- "prokodo-GridRow--lg-8": "prokodo-GridRow--lg-8",
71
- "prokodo-GridRow--lg-9": "prokodo-GridRow--lg-9",
72
- "prokodo-GridRow--lg-10": "prokodo-GridRow--lg-10",
73
- "prokodo-GridRow--lg-11": "prokodo-GridRow--lg-11",
74
- "prokodo-GridRow--lg-12": "prokodo-GridRow--lg-12",
75
- "prokodo-GridRow--xl-1": "prokodo-GridRow--xl-1",
76
- "prokodo-GridRow--xl-2": "prokodo-GridRow--xl-2",
77
- "prokodo-GridRow--xl-3": "prokodo-GridRow--xl-3",
78
- "prokodo-GridRow--xl-4": "prokodo-GridRow--xl-4",
79
- "prokodo-GridRow--xl-5": "prokodo-GridRow--xl-5",
80
- "prokodo-GridRow--xl-6": "prokodo-GridRow--xl-6",
81
- "prokodo-GridRow--xl-7": "prokodo-GridRow--xl-7",
82
- "prokodo-GridRow--xl-8": "prokodo-GridRow--xl-8",
83
- "prokodo-GridRow--xl-9": "prokodo-GridRow--xl-9",
84
- "prokodo-GridRow--xl-10": "prokodo-GridRow--xl-10",
85
- "prokodo-GridRow--xl-11": "prokodo-GridRow--xl-11",
86
- "prokodo-GridRow--xl-12": "prokodo-GridRow--xl-12",
87
- gradientMove: t,
88
- fadeInKeyframe: f
89
- }, v = l(c, "GridRow"), y = s(
90
- ({ align: o, className: r, children: i, xs: d, sm: p, md: G, lg: R, xl: w, ...m }) => /* @__PURE__ */ k.jsx(
91
- "div",
92
- {
93
- className: v(
94
- void 0,
95
- {
96
- [`align-${o}`]: !!o,
97
- [`xs-${d}`]: !!d,
98
- [`sm-${p}`]: !!p,
99
- [`md-${G}`]: !!G,
100
- [`lg-${R}`]: !!R,
101
- [`xl-${w}`]: !!w
102
- },
103
- r
104
- ),
105
- ...m,
106
- children: i
107
- }
108
- )
109
- );
110
- y.displayName = "GridRow";
111
- export {
112
- n as G,
113
- y as a
114
- };
@@ -1 +0,0 @@
1
- "use strict";const k=require("./jsx-runtime-CITbqOLs.js"),s=require("react"),e=require("./bem-DC5wv0dD.js"),a="gradientMove",n="fadeInKeyframe",g={"prokodo-Grid":"prokodo-Grid",gradientMove:a,fadeInKeyframe:n},t=e.create(g,"Grid"),l=s.memo(({spacing:o=2,className:r,children:i,...d})=>k.jsxRuntimeExports.jsx("div",{className:t(void 0,void 0,r),style:{gap:`${o*8}px`},...d,children:i}));l.displayName="Grid";const c="gradientMove",f="fadeInKeyframe",$={"prokodo-GridRow":"prokodo-GridRow","prokodo-GridRow--align-left":"prokodo-GridRow--align-left","prokodo-GridRow--align-center":"prokodo-GridRow--align-center","prokodo-GridRow--align-right":"prokodo-GridRow--align-right","prokodo-GridRow--xs-1":"prokodo-GridRow--xs-1","prokodo-GridRow--xs-2":"prokodo-GridRow--xs-2","prokodo-GridRow--xs-3":"prokodo-GridRow--xs-3","prokodo-GridRow--xs-4":"prokodo-GridRow--xs-4","prokodo-GridRow--xs-5":"prokodo-GridRow--xs-5","prokodo-GridRow--xs-6":"prokodo-GridRow--xs-6","prokodo-GridRow--xs-7":"prokodo-GridRow--xs-7","prokodo-GridRow--xs-8":"prokodo-GridRow--xs-8","prokodo-GridRow--xs-9":"prokodo-GridRow--xs-9","prokodo-GridRow--xs-10":"prokodo-GridRow--xs-10","prokodo-GridRow--xs-11":"prokodo-GridRow--xs-11","prokodo-GridRow--xs-12":"prokodo-GridRow--xs-12","prokodo-GridRow--sm-1":"prokodo-GridRow--sm-1","prokodo-GridRow--sm-2":"prokodo-GridRow--sm-2","prokodo-GridRow--sm-3":"prokodo-GridRow--sm-3","prokodo-GridRow--sm-4":"prokodo-GridRow--sm-4","prokodo-GridRow--sm-5":"prokodo-GridRow--sm-5","prokodo-GridRow--sm-6":"prokodo-GridRow--sm-6","prokodo-GridRow--sm-7":"prokodo-GridRow--sm-7","prokodo-GridRow--sm-8":"prokodo-GridRow--sm-8","prokodo-GridRow--sm-9":"prokodo-GridRow--sm-9","prokodo-GridRow--sm-10":"prokodo-GridRow--sm-10","prokodo-GridRow--sm-11":"prokodo-GridRow--sm-11","prokodo-GridRow--sm-12":"prokodo-GridRow--sm-12","prokodo-GridRow--md-1":"prokodo-GridRow--md-1","prokodo-GridRow--md-2":"prokodo-GridRow--md-2","prokodo-GridRow--md-3":"prokodo-GridRow--md-3","prokodo-GridRow--md-4":"prokodo-GridRow--md-4","prokodo-GridRow--md-5":"prokodo-GridRow--md-5","prokodo-GridRow--md-6":"prokodo-GridRow--md-6","prokodo-GridRow--md-7":"prokodo-GridRow--md-7","prokodo-GridRow--md-8":"prokodo-GridRow--md-8","prokodo-GridRow--md-9":"prokodo-GridRow--md-9","prokodo-GridRow--md-10":"prokodo-GridRow--md-10","prokodo-GridRow--md-11":"prokodo-GridRow--md-11","prokodo-GridRow--md-12":"prokodo-GridRow--md-12","prokodo-GridRow--lg-1":"prokodo-GridRow--lg-1","prokodo-GridRow--lg-2":"prokodo-GridRow--lg-2","prokodo-GridRow--lg-3":"prokodo-GridRow--lg-3","prokodo-GridRow--lg-4":"prokodo-GridRow--lg-4","prokodo-GridRow--lg-5":"prokodo-GridRow--lg-5","prokodo-GridRow--lg-6":"prokodo-GridRow--lg-6","prokodo-GridRow--lg-7":"prokodo-GridRow--lg-7","prokodo-GridRow--lg-8":"prokodo-GridRow--lg-8","prokodo-GridRow--lg-9":"prokodo-GridRow--lg-9","prokodo-GridRow--lg-10":"prokodo-GridRow--lg-10","prokodo-GridRow--lg-11":"prokodo-GridRow--lg-11","prokodo-GridRow--lg-12":"prokodo-GridRow--lg-12","prokodo-GridRow--xl-1":"prokodo-GridRow--xl-1","prokodo-GridRow--xl-2":"prokodo-GridRow--xl-2","prokodo-GridRow--xl-3":"prokodo-GridRow--xl-3","prokodo-GridRow--xl-4":"prokodo-GridRow--xl-4","prokodo-GridRow--xl-5":"prokodo-GridRow--xl-5","prokodo-GridRow--xl-6":"prokodo-GridRow--xl-6","prokodo-GridRow--xl-7":"prokodo-GridRow--xl-7","prokodo-GridRow--xl-8":"prokodo-GridRow--xl-8","prokodo-GridRow--xl-9":"prokodo-GridRow--xl-9","prokodo-GridRow--xl-10":"prokodo-GridRow--xl-10","prokodo-GridRow--xl-11":"prokodo-GridRow--xl-11","prokodo-GridRow--xl-12":"prokodo-GridRow--xl-12",gradientMove:c,fadeInKeyframe:f},v=e.create($,"GridRow"),m=s.memo(({align:o,className:r,children:i,xs:d,sm:G,md:p,lg:R,xl:w,...x})=>k.jsxRuntimeExports.jsx("div",{className:v(void 0,{[`align-${o}`]:!!o,[`xs-${d}`]:!!d,[`sm-${G}`]:!!G,[`md-${p}`]:!!p,[`lg-${R}`]:!!R,[`xl-${w}`]:!!w},r),...x,children:i}));m.displayName="GridRow";exports.Grid=l;exports.GridRow=m;
@@ -1 +0,0 @@
1
- "use strict";const a=require("./jsx-runtime-CITbqOLs.js"),n=require("react"),q=require("react-markdown"),T=require("remark-breaks"),M=require("remark-gfm"),R=require("./AnimatedText-Sy1jofZl.js"),B=require("./bem-DC5wv0dD.js"),E="gradientMove",G="fadeInKeyframe",L={"prokodo-Headline":"prokodo-Headline","prokodo-Headline--is-highlighted":"prokodo-Headline--is-highlighted","prokodo-Headline--primary--highlighted":"prokodo-Headline--primary--highlighted","prokodo-Headline--secondary--highlighted":"prokodo-Headline--secondary--highlighted","prokodo-Headline--success--highlighted":"prokodo-Headline--success--highlighted","prokodo-Headline--warning--highlighted":"prokodo-Headline--warning--highlighted","prokodo-Headline--error--highlighted":"prokodo-Headline--error--highlighted","prokodo-Headline--inherit":"prokodo-Headline--inherit","prokodo-Headline--inherit--highlighted":"prokodo-Headline--inherit--highlighted","prokodo-Headline--primary":"prokodo-Headline--primary","prokodo-Headline--secondary":"prokodo-Headline--secondary","prokodo-Headline--success":"prokodo-Headline--success","prokodo-Headline--info":"prokodo-Headline--info","prokodo-Headline--warning":"prokodo-Headline--warning","prokodo-Headline--error":"prokodo-Headline--error","prokodo-Headline--white":"prokodo-Headline--white","prokodo-Headline--black":"prokodo-Headline--black","prokodo-Headline--xs":"prokodo-Headline--xs","prokodo-Headline--sm":"prokodo-Headline--sm","prokodo-Headline--md":"prokodo-Headline--md","prokodo-Headline--lg":"prokodo-Headline--lg","prokodo-Headline--xl":"prokodo-Headline--xl","prokodo-Headline--xxl":"prokodo-Headline--xxl","prokodo-Headline--center":"prokodo-Headline--center","prokodo-Headline--right":"prokodo-Headline--right",gradientMove:E,fadeInKeyframe:G},x=B.create(L,"Headline"),f=["inherit","primary","secondary","white"],$=({animated:t,animationProps:s={},type:d="h3",size:o="md",highlight:y,schema:h={},className:b,align:H,isRichtext:I=!1,variant:i="inherit",...r})=>{const l=!!y&&f.includes(i),w={[i]:!!i,"is-highlighted":l,highlighted:l,[`${i}--highlighted`]:l,[o]:typeof o=="string"&&!!o,[`${H}`]:!!H},k=x(void 0,w,b),c=n.useMemo(()=>typeof o=="number"?{fontSize:`${o}em`}:{},[o]),p=typeof r.children=="string"?r.children:void 0,g=n.useMemo(()=>({"aria-label":p,className:k,style:c,node:void 0,...h}),[p,k,c,h]),m=n.useCallback(e=>t?a.jsxRuntimeExports.jsx(R.AnimatedText,{...s,children:e}):e,[t,s]),u=n.useCallback(e=>{if(!/^h[1-6]$/.test(d))return null;const S=e.children,j=d;return a.jsxRuntimeExports.jsx(j,{...e,"aria-level":parseInt(d[1]??"",10),...g,children:m(S)})},[d,g,m]);return I?a.jsxRuntimeExports.jsx(q,{className:x("headline"),remarkPlugins:[M,T],components:{p:e=>u(e)},children:r.children}):u(r)};exports.Headline=$;exports.POSSIBLE_HIGHLIGHTS=f;
@@ -1,98 +0,0 @@
1
- import { j as l } from "./jsx-runtime-C5mzlN2N.js";
2
- import { useMemo as f, useCallback as u } from "react";
3
- import S from "react-markdown";
4
- import T from "remark-breaks";
5
- import v from "remark-gfm";
6
- import { A as B } from "./AnimatedText-BmB5Vkyq.js";
7
- import { c as $ } from "./bem-CYKrPjje.js";
8
- const G = "gradientMove", K = "fadeInKeyframe", L = {
9
- "prokodo-Headline": "prokodo-Headline",
10
- "prokodo-Headline--is-highlighted": "prokodo-Headline--is-highlighted",
11
- "prokodo-Headline--primary--highlighted": "prokodo-Headline--primary--highlighted",
12
- "prokodo-Headline--secondary--highlighted": "prokodo-Headline--secondary--highlighted",
13
- "prokodo-Headline--success--highlighted": "prokodo-Headline--success--highlighted",
14
- "prokodo-Headline--warning--highlighted": "prokodo-Headline--warning--highlighted",
15
- "prokodo-Headline--error--highlighted": "prokodo-Headline--error--highlighted",
16
- "prokodo-Headline--inherit": "prokodo-Headline--inherit",
17
- "prokodo-Headline--inherit--highlighted": "prokodo-Headline--inherit--highlighted",
18
- "prokodo-Headline--primary": "prokodo-Headline--primary",
19
- "prokodo-Headline--secondary": "prokodo-Headline--secondary",
20
- "prokodo-Headline--success": "prokodo-Headline--success",
21
- "prokodo-Headline--info": "prokodo-Headline--info",
22
- "prokodo-Headline--warning": "prokodo-Headline--warning",
23
- "prokodo-Headline--error": "prokodo-Headline--error",
24
- "prokodo-Headline--white": "prokodo-Headline--white",
25
- "prokodo-Headline--black": "prokodo-Headline--black",
26
- "prokodo-Headline--xs": "prokodo-Headline--xs",
27
- "prokodo-Headline--sm": "prokodo-Headline--sm",
28
- "prokodo-Headline--md": "prokodo-Headline--md",
29
- "prokodo-Headline--lg": "prokodo-Headline--lg",
30
- "prokodo-Headline--xl": "prokodo-Headline--xl",
31
- "prokodo-Headline--xxl": "prokodo-Headline--xxl",
32
- "prokodo-Headline--center": "prokodo-Headline--center",
33
- "prokodo-Headline--right": "prokodo-Headline--right",
34
- gradientMove: G,
35
- fadeInKeyframe: K
36
- }, x = $(L, "Headline"), P = [
37
- "inherit",
38
- "primary",
39
- "secondary",
40
- "white"
41
- ], q = ({
42
- animated: a,
43
- animationProps: t = {},
44
- type: d = "h3",
45
- size: o = "md",
46
- highlight: y,
47
- schema: h = {},
48
- className: b,
49
- align: s,
50
- isRichtext: w = !1,
51
- variant: i = "inherit",
52
- ...r
53
- }) => {
54
- const n = !!y && P.includes(i), I = {
55
- [i]: !!i,
56
- "is-highlighted": n,
57
- highlighted: n,
58
- [`${i}--highlighted`]: n,
59
- [o]: typeof o == "string" && !!o,
60
- [`${s}`]: !!s
61
- }, p = x(void 0, I, b), H = f(() => typeof o == "number" ? {
62
- fontSize: `${o}em`
63
- } : {}, [o]), k = typeof r.children == "string" ? r.children : void 0, g = f(
64
- () => ({
65
- "aria-label": k,
66
- className: p,
67
- style: H,
68
- node: void 0,
69
- ...h
70
- }),
71
- [k, p, H, h]
72
- ), c = u(
73
- (e) => a ? /* @__PURE__ */ l.jsx(B, { ...t, children: e }) : e,
74
- [a, t]
75
- ), m = u(
76
- (e) => {
77
- if (!/^h[1-6]$/.test(d)) return null;
78
- const j = e.children, M = d;
79
- return /* @__PURE__ */ l.jsx(M, { ...e, "aria-level": parseInt(d[1] ?? "", 10), ...g, children: c(j) });
80
- },
81
- [d, g, c]
82
- );
83
- return w ? /* @__PURE__ */ l.jsx(
84
- S,
85
- {
86
- className: x("headline"),
87
- remarkPlugins: [v, T],
88
- components: {
89
- p: (e) => m(e)
90
- },
91
- children: r.children
92
- }
93
- ) : m(r);
94
- };
95
- export {
96
- q as H,
97
- P
98
- };