@prokodo/ui 0.0.7 → 0.0.9

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 (224) 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/types/components/accordion/index.d.ts +1 -1
  87. package/dist/types/components/animated/index.d.ts +1 -1
  88. package/dist/types/components/animatedText/index.d.ts +1 -1
  89. package/dist/types/components/avatar/index.d.ts +1 -1
  90. package/dist/types/components/base-link/index.d.ts +1 -1
  91. package/dist/types/components/button/index.d.ts +1 -1
  92. package/dist/types/components/calendly/index.d.ts +1 -1
  93. package/dist/types/components/card/index.d.ts +1 -1
  94. package/dist/types/components/carousel/index.d.ts +1 -1
  95. package/dist/types/components/chip/index.d.ts +1 -1
  96. package/dist/types/components/datePicker/index.d.ts +1 -1
  97. package/dist/types/components/dialog/index.d.ts +1 -1
  98. package/dist/types/components/drawer/index.d.ts +1 -1
  99. package/dist/types/components/form/Form.model.d.ts +4 -1
  100. package/dist/types/components/form/FormResponse.d.ts +2 -5
  101. package/dist/types/components/form/index.d.ts +2 -1
  102. package/dist/types/components/grid/Grid.d.ts +2 -6
  103. package/dist/types/components/grid/Grid.model.d.ts +17 -0
  104. package/dist/types/components/grid/GridRow.d.ts +2 -12
  105. package/dist/types/components/grid/index.d.ts +1 -0
  106. package/dist/types/components/headline/index.d.ts +1 -1
  107. package/dist/types/components/icon/index.d.ts +1 -1
  108. package/dist/types/components/image/index.d.ts +1 -1
  109. package/dist/types/components/image-text/index.d.ts +1 -1
  110. package/dist/types/components/input/index.d.ts +1 -1
  111. package/dist/types/components/inputOTP/index.d.ts +1 -1
  112. package/dist/types/components/label/index.d.ts +1 -1
  113. package/dist/types/components/link/index.d.ts +1 -1
  114. package/dist/types/components/list/index.d.ts +1 -1
  115. package/dist/types/components/loading/index.d.ts +1 -1
  116. package/dist/types/components/lottie/index.d.ts +1 -1
  117. package/dist/types/components/map/index.d.ts +1 -1
  118. package/dist/types/components/post-item/index.d.ts +2 -2
  119. package/dist/types/components/post-teaser/index.d.ts +1 -1
  120. package/dist/types/components/post-widget/index.d.ts +1 -1
  121. package/dist/types/components/post-widget-carousel/index.d.ts +1 -1
  122. package/dist/types/components/quote/index.d.ts +1 -1
  123. package/dist/types/components/rich-text/index.d.ts +1 -1
  124. package/dist/types/components/select/index.d.ts +1 -1
  125. package/dist/types/components/skeleton/index.d.ts +1 -1
  126. package/dist/types/components/slider/index.d.ts +1 -1
  127. package/dist/types/components/stepper/index.d.ts +1 -1
  128. package/dist/types/components/switch/index.d.ts +1 -1
  129. package/dist/types/components/table/index.d.ts +1 -1
  130. package/dist/types/components/teaser/index.d.ts +1 -1
  131. package/dist/types/index.d.ts +0 -40
  132. package/package.json +42 -42
  133. package/dist/components/Accordion-V3d_aGvZ.js +0 -130
  134. package/dist/components/Accordion-o8oKA6Tq.js +0 -1
  135. package/dist/components/Animated-BBfAgsHL.js +0 -64
  136. package/dist/components/Animated-CO4IEerF.js +0 -1
  137. package/dist/components/AnimatedText-BmB5Vkyq.js +0 -31
  138. package/dist/components/AnimatedText-Sy1jofZl.js +0 -1
  139. package/dist/components/Avatar-Ci5YNFc5.js +0 -95
  140. package/dist/components/Avatar-CjlbA5a5.js +0 -1
  141. package/dist/components/BaseLink-Dd9htNXU.js +0 -1
  142. package/dist/components/BaseLink-w1q9Qc1U.js +0 -30
  143. package/dist/components/Button-B8chVgsB.js +0 -111
  144. package/dist/components/Button-yvFLX-6Q.js +0 -1
  145. package/dist/components/Calendly-CWCAs02R.js +0 -1
  146. package/dist/components/Calendly-WBM4oHyC.js +0 -82
  147. package/dist/components/Card-BPEoLzF1.js +0 -1
  148. package/dist/components/Card-IW4R7bKr.js +0 -202
  149. package/dist/components/Carousel-CdS7SVzA.js +0 -1
  150. package/dist/components/Carousel-DpO4a3lm.js +0 -257
  151. package/dist/components/Chip-BmBxJH5M.js +0 -80
  152. package/dist/components/Chip-Q2ttDAQn.js +0 -1
  153. package/dist/components/ClassNameConfigurator-Ce5BUPXc.js +0 -860
  154. package/dist/components/DatePicker-BTenaDN8.js +0 -1
  155. package/dist/components/DatePicker-PK173UTy.js +0 -93
  156. package/dist/components/Dialog-Bq3tfZ0_.js +0 -1
  157. package/dist/components/Dialog-KlXAOdt_.js +0 -172
  158. package/dist/components/Drawer-DulO9091.js +0 -1
  159. package/dist/components/Drawer-i9X07r74.js +0 -120
  160. package/dist/components/Form-B6963dT5.js +0 -368
  161. package/dist/components/Form-DVNzITG2.js +0 -1
  162. package/dist/components/GridRow-1h1JHuDl.js +0 -114
  163. package/dist/components/GridRow-C5v0sOZZ.js +0 -1
  164. package/dist/components/Headline-CnyLLQLB.js +0 -1
  165. package/dist/components/Headline-DzEinaZi.js +0 -98
  166. package/dist/components/Icon-BMrVlROP.js +0 -4195
  167. package/dist/components/Icon-eWdA85cf.js +0 -1
  168. package/dist/components/Image-B-lyA7ym.js +0 -1
  169. package/dist/components/Image-CVgvVlLE.js +0 -33
  170. package/dist/components/ImageText-Cqp4xp9y.js +0 -113
  171. package/dist/components/ImageText-D-06_EGf.js +0 -1
  172. package/dist/components/Input-BEO9ig1R.js +0 -1
  173. package/dist/components/Input-CrNLI_OY.js +0 -258
  174. package/dist/components/InputOTP-Db7DHrhS.js +0 -88
  175. package/dist/components/InputOTP-MnmjEmPU.js +0 -1
  176. package/dist/components/Label-BvCzZIGM.js +0 -1
  177. package/dist/components/Label-DRUCdGoX.js +0 -71
  178. package/dist/components/Link-DSQ1125B.js +0 -69
  179. package/dist/components/Link-Dg7XR4uY.js +0 -1
  180. package/dist/components/List-D_dSwMx5.js +0 -1
  181. package/dist/components/List-P6xbVrBc.js +0 -196
  182. package/dist/components/Loading-C7lyHDW7.js +0 -68
  183. package/dist/components/Loading-U-CrTVTi.js +0 -1
  184. package/dist/components/Lottie-Br7PmIzX.js +0 -1
  185. package/dist/components/Lottie-CrvbxK0R.js +0 -87
  186. package/dist/components/Map-D3xbPS1S.js +0 -1
  187. package/dist/components/Map-DEIB_y-M.js +0 -64
  188. package/dist/components/PostItem-B8Vfv_sW.js +0 -183
  189. package/dist/components/PostItem-BSTn6cHD.js +0 -1
  190. package/dist/components/PostTeaser-BmZyqFL2.js +0 -186
  191. package/dist/components/PostTeaser-DLynX43c.js +0 -1
  192. package/dist/components/PostWidget-Bo4KiSsV.js +0 -170
  193. package/dist/components/PostWidget-DYWA-B8d.js +0 -1
  194. package/dist/components/PostWidgetCarousel-CZ6ptOGv.js +0 -168
  195. package/dist/components/PostWidgetCarousel-D7-p3Pwr.js +0 -1
  196. package/dist/components/Quote-6aurOanD.js +0 -1
  197. package/dist/components/Quote-CV_UYE1G.js +0 -101
  198. package/dist/components/RichText-Cg_XzkUs.js +0 -152
  199. package/dist/components/RichText-DVg1dwMV.js +0 -1
  200. package/dist/components/Select-BMyrX8V0.js +0 -3081
  201. package/dist/components/Skeleton-BuY3bttw.js +0 -1
  202. package/dist/components/Skeleton-D6olNYTG.js +0 -40
  203. package/dist/components/Slider-C-lecSwc.js +0 -957
  204. package/dist/components/Slider-GvO3Xllf.js +0 -1
  205. package/dist/components/Stepper-BV3PGCr2.js +0 -1
  206. package/dist/components/Stepper-CA1DOm4D.js +0 -135
  207. package/dist/components/Switch-C_6EUOIc.js +0 -330
  208. package/dist/components/Switch-Db3HpOhM.js +0 -1
  209. package/dist/components/Table-Csc0FIbX.js +0 -1
  210. package/dist/components/Table-Cy8bIv_C.js +0 -95
  211. package/dist/components/Teaser-CkisYOs-.js +0 -1
  212. package/dist/components/Teaser-Cl2oBeh5.js +0 -118
  213. package/dist/components/areArraysEqual-CJkStQkx.js +0 -20
  214. package/dist/components/bem-CYKrPjje.js +0 -11
  215. package/dist/components/calculation-79PhfKvq.js +0 -4
  216. package/dist/components/jsx-runtime-C5mzlN2N.js +0 -284
  217. package/dist/components/useControlled-BYdyS7Pn.js +0 -31
  218. package/dist/components/validations-B_cxltQ_.js +0 -8
  219. /package/dist/components/{areArraysEqual-6R3bBH2E.js → areArraysEqual.js} +0 -0
  220. /package/dist/components/{bem-DC5wv0dD.js → bem.js} +0 -0
  221. /package/dist/components/{calculation-D-p0iqpk.js → calculation.js} +0 -0
  222. /package/dist/components/{jsx-runtime-CITbqOLs.js → jsx-runtime.js} +0 -0
  223. /package/dist/components/{useControlled-Ysk4KqoX.js → useControlled.js} +0 -0
  224. /package/dist/components/{validations-Cnxtn28y.js → validations.js} +0 -0
@@ -1,130 +0,0 @@
1
- import { j as e } from "./jsx-runtime-C5mzlN2N.js";
2
- import { useState as $, useCallback as x } from "react";
3
- import { A as C } from "./Animated-BBfAgsHL.js";
4
- import { B as E } from "./Button-B8chVgsB.js";
5
- import { H as K } from "./Headline-DzEinaZi.js";
6
- import { I as M } from "./Icon-BMrVlROP.js";
7
- import { c as w } from "./bem-CYKrPjje.js";
8
- import { a as h } from "./validations-B_cxltQ_.js";
9
- const B = "backgroundFill", F = "gradientMove", H = "fadeInKeyframe", S = {
10
- "prokodo-Accordion": "prokodo-Accordion",
11
- "prokodo-Accordion__item": "prokodo-Accordion__item",
12
- "prokodo-Accordion__item--is-expanded": "prokodo-Accordion__item--is-expanded",
13
- "prokodo-Accordion__header": "prokodo-Accordion__header",
14
- backgroundFill: B,
15
- "prokodo-Accordion__header--is-expanded": "prokodo-Accordion__header--is-expanded",
16
- "prokodo-Accordion__title": "prokodo-Accordion__title",
17
- "prokodo-Accordion__title--is-expanded": "prokodo-Accordion__title--is-expanded",
18
- "prokodo-Accordion__icon": "prokodo-Accordion__icon",
19
- "prokodo-Accordion__icon--is-hidden": "prokodo-Accordion__icon--is-hidden",
20
- "prokodo-Accordion__content": "prokodo-Accordion__content",
21
- "prokodo-Accordion__content--is-expanded": "prokodo-Accordion__content--is-expanded",
22
- "prokodo-Accordion__actions": "prokodo-Accordion__actions",
23
- gradientMove: F,
24
- fadeInKeyframe: H
25
- }, c = w(S, "Accordion"), z = ({
26
- id: u,
27
- expanded: f,
28
- className: I,
29
- variant: y = "primary",
30
- titleOptions: j,
31
- iconProps: p,
32
- items: N,
33
- onChange: l,
34
- ...g
35
- }) => {
36
- const [s, b] = $(f), _ = x(
37
- (o, r) => {
38
- const i = s === o ? null : o;
39
- b(i), l(o, r, i !== null);
40
- },
41
- [s, l]
42
- ), m = x(
43
- (o, r, i) => /* @__PURE__ */ e.jsx(
44
- M,
45
- {
46
- className: c("icon", { "is-hidden": !!i }),
47
- color: r,
48
- name: o,
49
- size: "sm",
50
- ...p
51
- }
52
- ),
53
- [p]
54
- );
55
- return /* @__PURE__ */ e.jsx("div", { className: c(void 0, { [y]: !0 }, I), ...g, children: N.map((o, r) => {
56
- const {
57
- className: i,
58
- title: v,
59
- renderHeader: k,
60
- renderContent: A,
61
- actions: t
62
- } = o, a = `${u}-${o.title}`, d = s === r;
63
- return /* @__PURE__ */ e.jsxs(
64
- "div",
65
- {
66
- className: c(
67
- "item",
68
- { "is-expanded": d },
69
- i
70
- ),
71
- children: [
72
- /* @__PURE__ */ e.jsxs(
73
- "div",
74
- {
75
- "aria-controls": `${a}-content`,
76
- "aria-expanded": d,
77
- className: c("header", { "is-expanded": d }),
78
- id: `${a}-header`,
79
- role: "button",
80
- tabIndex: 0,
81
- onClick: (n) => _(r, n),
82
- onKeyDown: (n) => {
83
- (n.key === "Enter" || n.key === " ") && _(r, n);
84
- },
85
- children: [
86
- h(k) ? /* @__PURE__ */ e.jsx(
87
- K,
88
- {
89
- className: c("title", { "is-expanded": d }),
90
- size: "sm",
91
- type: "h3",
92
- ...(o == null ? void 0 : o.titleOptions) ?? j,
93
- children: v
94
- }
95
- ) : k,
96
- m("PlusSignIcon", "primary", d),
97
- m("MinusSignIcon", "white", !d)
98
- ]
99
- }
100
- ),
101
- /* @__PURE__ */ e.jsxs(
102
- "div",
103
- {
104
- "aria-labelledby": `${a}-header`,
105
- className: c("content", { "is-expanded": d }),
106
- hidden: !d,
107
- id: `${a}-content`,
108
- role: "region",
109
- children: [
110
- !h(A) && /* @__PURE__ */ e.jsx(C, { children: A }),
111
- t && t.length > 0 && /* @__PURE__ */ e.jsx("div", { className: c("actions"), children: t.map((n) => /* @__PURE__ */ e.jsx(
112
- E,
113
- {
114
- ...n
115
- },
116
- `${a}-action-${n.id}`
117
- )) })
118
- ]
119
- }
120
- )
121
- ]
122
- },
123
- a
124
- );
125
- }) });
126
- };
127
- z.displayName = "Accordion";
128
- export {
129
- z as A
130
- };
@@ -1 +0,0 @@
1
- "use strict";const e=require("./jsx-runtime-CITbqOLs.js"),l=require("react"),$=require("./Animated-CO4IEerF.js"),q=require("./Button-yvFLX-6Q.js"),f=require("./Headline-CnyLLQLB.js"),C=require("./Icon-eWdA85cf.js"),K=require("./bem-DC5wv0dD.js"),A=require("./validations-Cnxtn28y.js"),M="backgroundFill",w="gradientMove",B="fadeInKeyframe",F={"prokodo-Accordion":"prokodo-Accordion","prokodo-Accordion__item":"prokodo-Accordion__item","prokodo-Accordion__item--is-expanded":"prokodo-Accordion__item--is-expanded","prokodo-Accordion__header":"prokodo-Accordion__header",backgroundFill:M,"prokodo-Accordion__header--is-expanded":"prokodo-Accordion__header--is-expanded","prokodo-Accordion__title":"prokodo-Accordion__title","prokodo-Accordion__title--is-expanded":"prokodo-Accordion__title--is-expanded","prokodo-Accordion__icon":"prokodo-Accordion__icon","prokodo-Accordion__icon--is-hidden":"prokodo-Accordion__icon--is-hidden","prokodo-Accordion__content":"prokodo-Accordion__content","prokodo-Accordion__content--is-expanded":"prokodo-Accordion__content--is-expanded","prokodo-Accordion__actions":"prokodo-Accordion__actions",gradientMove:w,fadeInKeyframe:B},r=K.create(F,"Accordion"),h=({id:j,expanded:I,className:y,variant:E="primary",titleOptions:N,iconProps:p,items:b,onChange:x,...R})=>{const[t,g]=l.useState(I),_=l.useCallback((o,i)=>{const c=t===o?null:o;g(c),x(o,i,c!==null)},[t,x]),u=l.useCallback((o,i,c)=>e.jsxRuntimeExports.jsx(C.Icon,{className:r("icon",{"is-hidden":!!c}),color:i,name:o,size:"sm",...p}),[p]);return e.jsxRuntimeExports.jsx("div",{className:r(void 0,{[E]:!0},y),...R,children:b.map((o,i)=>{const{className:c,title:v,renderHeader:m,renderContent:k,actions:a}=o,s=`${j}-${o.title}`,n=t===i;return e.jsxRuntimeExports.jsxs("div",{className:r("item",{"is-expanded":n},c),children:[e.jsxRuntimeExports.jsxs("div",{"aria-controls":`${s}-content`,"aria-expanded":n,className:r("header",{"is-expanded":n}),id:`${s}-header`,role:"button",tabIndex:0,onClick:d=>_(i,d),onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&_(i,d)},children:[A.isNull(m)?e.jsxRuntimeExports.jsx(f.Headline,{className:r("title",{"is-expanded":n}),size:"sm",type:"h3",...(o==null?void 0:o.titleOptions)??N,children:v}):m,u("PlusSignIcon","primary",n),u("MinusSignIcon","white",!n)]}),e.jsxRuntimeExports.jsxs("div",{"aria-labelledby":`${s}-header`,className:r("content",{"is-expanded":n}),hidden:!n,id:`${s}-content`,role:"region",children:[!A.isNull(k)&&e.jsxRuntimeExports.jsx($.Animated,{children:k}),a&&a.length>0&&e.jsxRuntimeExports.jsx("div",{className:r("actions"),children:a.map(d=>e.jsxRuntimeExports.jsx(q.Button,{...d},`${s}-action-${d.id}`))})]})]},s)})})};h.displayName="Accordion";exports.Accordion=h;
@@ -1,64 +0,0 @@
1
- import { j as g } from "./jsx-runtime-C5mzlN2N.js";
2
- import { useState as I, useRef as n, useEffect as w } from "react";
3
- import { c as R } from "./bem-CYKrPjje.js";
4
- import { c as u } from "./validations-B_cxltQ_.js";
5
- const x = "gradientMove", j = "fadeInKeyframe", K = {
6
- "prokodo-Animated": "prokodo-Animated",
7
- "prokodo-Animated--animate-bottom-top": "prokodo-Animated--animate-bottom-top",
8
- "prokodo-Animated--animate-top-bottom": "prokodo-Animated--animate-top-bottom",
9
- "prokodo-Animated--animate-left-right": "prokodo-Animated--animate-left-right",
10
- "prokodo-Animated--animate-right-left": "prokodo-Animated--animate-right-left",
11
- "prokodo-Animated--is-visible": "prokodo-Animated--is-visible",
12
- "prokodo-Animated--is-disabled": "prokodo-Animated--is-disabled",
13
- "prokodo-Animated--has-fast-speed": "prokodo-Animated--has-fast-speed",
14
- "prokodo-Animated--has-slow-speed": "prokodo-Animated--has-slow-speed",
15
- gradientMove: x,
16
- fadeInKeyframe: j
17
- }, M = R(K, "Animated"), V = ({
18
- className: p,
19
- disabled: k = !1,
20
- delay: a = 0,
21
- speed: d = "normal",
22
- animation: m = "fade-in",
23
- children: b,
24
- intersectionObserverOptions: c = {},
25
- onAnimate: t,
26
- ...A
27
- }) => {
28
- const [o, f] = I(!1), i = n(null), e = n(null), r = n(null);
29
- return w(() => {
30
- if (!i.current) return;
31
- const h = (v) => {
32
- const [s] = v, l = (s == null ? void 0 : s.isIntersecting) ?? !1;
33
- l && !o && (e.current !== null && u(e.current) && clearTimeout(e.current), e.current = window.setTimeout(() => {
34
- f(!0), t == null || t(!0);
35
- }, a)), !l && o && f(!1);
36
- };
37
- return r.current = new IntersectionObserver(h, {
38
- threshold: 0.1,
39
- ...c
40
- }), r.current.observe(i.current), () => {
41
- r.current && r.current.disconnect(), e.current !== null && u(e.current) && clearTimeout(e.current);
42
- };
43
- }, [t, a, c, o]), /* @__PURE__ */ g.jsx(
44
- "div",
45
- {
46
- ref: i,
47
- className: M(
48
- void 0,
49
- {
50
- "is-visible": !!o,
51
- "is-disabled": !!k,
52
- [`has-${d}-speed`]: !!d,
53
- [`animate-${m}`]: !!m
54
- },
55
- p
56
- ),
57
- ...A,
58
- children: b
59
- }
60
- );
61
- };
62
- export {
63
- V as A
64
- };
@@ -1 +0,0 @@
1
- "use strict";const g=require("./jsx-runtime-CITbqOLs.js"),t=require("react"),R=require("./bem-DC5wv0dD.js"),f=require("./validations-Cnxtn28y.js"),I="gradientMove",w="fadeInKeyframe",q={"prokodo-Animated":"prokodo-Animated","prokodo-Animated--animate-bottom-top":"prokodo-Animated--animate-bottom-top","prokodo-Animated--animate-top-bottom":"prokodo-Animated--animate-top-bottom","prokodo-Animated--animate-left-right":"prokodo-Animated--animate-left-right","prokodo-Animated--animate-right-left":"prokodo-Animated--animate-right-left","prokodo-Animated--is-visible":"prokodo-Animated--is-visible","prokodo-Animated--is-disabled":"prokodo-Animated--is-disabled","prokodo-Animated--has-fast-speed":"prokodo-Animated--has-fast-speed","prokodo-Animated--has-slow-speed":"prokodo-Animated--has-slow-speed",gradientMove:I,fadeInKeyframe:w},x=R.create(q,"Animated"),j=({className:p,disabled:b=!1,delay:a=0,speed:d="normal",animation:m="fade-in",children:k,intersectionObserverOptions:c={},onAnimate:o,...A})=>{const[r,u]=t.useState(!1),s=t.useRef(null),e=t.useRef(null),i=t.useRef(null);return t.useEffect(()=>{if(!s.current)return;const h=v=>{const[n]=v,l=(n==null?void 0:n.isIntersecting)??!1;l&&!r&&(e.current!==null&&f.isNumber(e.current)&&clearTimeout(e.current),e.current=window.setTimeout(()=>{u(!0),o==null||o(!0)},a)),!l&&r&&u(!1)};return i.current=new IntersectionObserver(h,{threshold:.1,...c}),i.current.observe(s.current),()=>{i.current&&i.current.disconnect(),e.current!==null&&f.isNumber(e.current)&&clearTimeout(e.current)}},[o,a,c,r]),g.jsxRuntimeExports.jsx("div",{ref:s,className:x(void 0,{"is-visible":!!r,"is-disabled":!!b,[`has-${d}-speed`]:!!d,[`animate-${m}`]:!!m},p),...A,children:k})};exports.Animated=j;
@@ -1,31 +0,0 @@
1
- import { j as v } from "./jsx-runtime-C5mzlN2N.js";
2
- import { useRef as b, useState as n, useEffect as a } from "react";
3
- const E = ({
4
- speed: s = 30,
5
- delay: o = 0,
6
- disabled: u,
7
- children: t,
8
- ...f
9
- }) => {
10
- const c = b(null), [i, T] = n(!1), [x, p] = n(""), [r, I] = n(0);
11
- return a(() => {
12
- if (u) return;
13
- new IntersectionObserver((e) => {
14
- e.forEach((g) => {
15
- const l = setTimeout(() => {
16
- T(g.isIntersecting);
17
- }, o);
18
- return () => clearTimeout(l);
19
- });
20
- }).observe(c.current);
21
- }, [o, u]), a(() => {
22
- if (!i || r >= t.length) return;
23
- const m = setTimeout(() => {
24
- p((e) => e + t[r]), I((e) => e + 1);
25
- }, s);
26
- return () => clearTimeout(m);
27
- }, [i, r, t, s]), /* @__PURE__ */ v.jsx("span", { ...f, ref: c, children: x });
28
- };
29
- export {
30
- E as A
31
- };
@@ -1 +0,0 @@
1
- "use strict";const R=require("./jsx-runtime-CITbqOLs.js"),e=require("react"),p=({speed:s=30,delay:u=0,disabled:o,children:r,...T})=>{const c=e.useRef(null),[i,f]=e.useState(!1),[m,x]=e.useState(""),[n,I]=e.useState(0);return e.useEffect(()=>{if(o)return;new IntersectionObserver(t=>{t.forEach(g=>{const l=setTimeout(()=>{f(g.isIntersecting)},u);return()=>clearTimeout(l)})}).observe(c.current)},[u,o]),e.useEffect(()=>{if(!i||n>=r.length)return;const a=setTimeout(()=>{x(t=>t+r[n]),I(t=>t+1)},s);return()=>clearTimeout(a)},[i,n,r,s]),R.jsxRuntimeExports.jsx("span",{...T,ref:c,children:m})};exports.AnimatedText=p;
@@ -1,95 +0,0 @@
1
- import { j as e } from "./jsx-runtime-C5mzlN2N.js";
2
- import { useMemo as k, useCallback as A } from "react";
3
- import { c as m } from "./bem-CYKrPjje.js";
4
- import { I as c, g as l } from "./Icon-BMrVlROP.js";
5
- import { I as h } from "./Image-CVgvVlLE.js";
6
- import { L as f } from "./Link-DSQ1125B.js";
7
- const x = "gradientMove", I = "fadeInKeyframe", g = {
8
- "prokodo-Avatar": "prokodo-Avatar",
9
- "prokodo-Avatar--primary": "prokodo-Avatar--primary",
10
- "prokodo-Avatar--secondary": "prokodo-Avatar--secondary",
11
- "prokodo-Avatar--info": "prokodo-Avatar--info",
12
- "prokodo-Avatar--success": "prokodo-Avatar--success",
13
- "prokodo-Avatar--warning": "prokodo-Avatar--warning",
14
- "prokodo-Avatar--error": "prokodo-Avatar--error",
15
- "prokodo-Avatar--white": "prokodo-Avatar--white",
16
- "prokodo-Avatar--has-size-xs": "prokodo-Avatar--has-size-xs",
17
- "prokodo-Avatar--has-size-sm": "prokodo-Avatar--has-size-sm",
18
- "prokodo-Avatar--has-size-md": "prokodo-Avatar--has-size-md",
19
- "prokodo-Avatar--has-size-lg": "prokodo-Avatar--has-size-lg",
20
- "prokodo-Avatar--has-size-xl": "prokodo-Avatar--has-size-xl",
21
- "prokodo-Avatar__image": "prokodo-Avatar__image",
22
- "prokodo-Avatar__link": "prokodo-Avatar__link",
23
- gradientMove: x,
24
- fadeInKeyframe: I
25
- }, t = m(g, "Avatar"), M = ({
26
- className: p,
27
- variant: o = "primary",
28
- size: a = "sm",
29
- image: r,
30
- redirect: d,
31
- ...n
32
- }) => {
33
- const s = k(
34
- () => ({
35
- [o]: !!o
36
- }),
37
- [o]
38
- ), i = k(
39
- () => ({
40
- [`has-size-${a}`]: !!a
41
- }),
42
- [a]
43
- ), v = A(
44
- () => /* @__PURE__ */ e.jsx(
45
- "div",
46
- {
47
- ...n,
48
- tabIndex: -1,
49
- className: t(
50
- void 0,
51
- {
52
- ...s,
53
- ...i
54
- },
55
- p
56
- ),
57
- children: r ? /* @__PURE__ */ e.jsx(
58
- h,
59
- {
60
- ...r,
61
- className: t("image", void 0, r.className),
62
- tabIndex: 0
63
- }
64
- ) : /* @__PURE__ */ e.jsx(
65
- c,
66
- {
67
- className: t("icon", s),
68
- name: "UserIcon",
69
- size: l(a) * 2,
70
- color: ["inherit", "white"].includes(o) ? void 0 : "white"
71
- }
72
- )
73
- }
74
- ),
75
- [i, s, p, r, o, a, n]
76
- );
77
- return d ? /* @__PURE__ */ e.jsx(
78
- f,
79
- {
80
- ...d,
81
- className: t(
82
- "link",
83
- {
84
- ...s,
85
- ...i
86
- },
87
- d.className
88
- ),
89
- children: v()
90
- }
91
- ) : v();
92
- };
93
- export {
94
- M as A
95
- };
@@ -1 +0,0 @@
1
- "use strict";const s=require("./jsx-runtime-CITbqOLs.js"),n=require("react"),A=require("./bem-DC5wv0dD.js"),p=require("./Icon-eWdA85cf.js"),m=require("./Image-B-lyA7ym.js"),u=require("./Link-Dg7XR4uY.js"),l="gradientMove",x="fadeInKeyframe",h={"prokodo-Avatar":"prokodo-Avatar","prokodo-Avatar--primary":"prokodo-Avatar--primary","prokodo-Avatar--secondary":"prokodo-Avatar--secondary","prokodo-Avatar--info":"prokodo-Avatar--info","prokodo-Avatar--success":"prokodo-Avatar--success","prokodo-Avatar--warning":"prokodo-Avatar--warning","prokodo-Avatar--error":"prokodo-Avatar--error","prokodo-Avatar--white":"prokodo-Avatar--white","prokodo-Avatar--has-size-xs":"prokodo-Avatar--has-size-xs","prokodo-Avatar--has-size-sm":"prokodo-Avatar--has-size-sm","prokodo-Avatar--has-size-md":"prokodo-Avatar--has-size-md","prokodo-Avatar--has-size-lg":"prokodo-Avatar--has-size-lg","prokodo-Avatar--has-size-xl":"prokodo-Avatar--has-size-xl","prokodo-Avatar__image":"prokodo-Avatar__image","prokodo-Avatar__link":"prokodo-Avatar__link",gradientMove:l,fadeInKeyframe:x},t=A.create(h,"Avatar"),f=({className:v,variant:o="primary",size:r="sm",image:a,redirect:i,...c})=>{const e=n.useMemo(()=>({[o]:!!o}),[o]),d=n.useMemo(()=>({[`has-size-${r}`]:!!r}),[r]),k=n.useCallback(()=>s.jsxRuntimeExports.jsx("div",{...c,tabIndex:-1,className:t(void 0,{...e,...d},v),children:a?s.jsxRuntimeExports.jsx(m.Image,{...a,className:t("image",void 0,a.className),tabIndex:0}):s.jsxRuntimeExports.jsx(p.Icon,{className:t("icon",e),name:"UserIcon",size:p.getIconSize(r)*2,color:["inherit","white"].includes(o)?void 0:"white"})}),[d,e,v,a,o,r,c]);return i?s.jsxRuntimeExports.jsx(u.Link,{...i,className:t("link",{...e,...d},i.className),children:k()}):k()};exports.Avatar=f;
@@ -1 +0,0 @@
1
- "use strict";const u=require("./jsx-runtime-CITbqOLs.js"),r=require("./validations-Cnxtn28y.js"),d=({href:t,children:o,disabled:i,linkComponent:e,style:l,target:p,rel:x,...s})=>{const v={pointerEvents:"none"},n=t==null?void 0:t.startsWith("http"),m=s.download!==void 0,j=/^\w+:/.test(t),k=p??(n?"_blank":void 0),E=x??(n?"noopener noreferrer":void 0),a=r.isNull(i)?void 0:-1,c=r.isNull(i)?l:{...v,...l};return n||m||j||e===void 0?u.jsxRuntimeExports.jsx("a",{...s,href:t,rel:E,style:c,tabIndex:a,target:k,children:o}):u.jsxRuntimeExports.jsx(e,{...s,href:t,style:c,tabIndex:a,children:o})};d.displayName="BaseLink";exports.BaseLink=d;
@@ -1,30 +0,0 @@
1
- import { j as r } from "./jsx-runtime-C5mzlN2N.js";
2
- import { a as c } from "./validations-B_cxltQ_.js";
3
- const B = ({
4
- href: o,
5
- children: n,
6
- disabled: i,
7
- linkComponent: a,
8
- style: e,
9
- target: d,
10
- rel: m,
11
- ...t
12
- }) => {
13
- const u = { pointerEvents: "none" }, s = o == null ? void 0 : o.startsWith("http"), v = t.download !== void 0, x = /^\w+:/.test(o), j = d ?? (s ? "_blank" : void 0), k = m ?? (s ? "noopener noreferrer" : void 0), l = c(i) ? void 0 : -1, p = c(i) ? e : { ...u, ...e };
14
- return s || v || x || a === void 0 ? /* @__PURE__ */ r.jsx(
15
- "a",
16
- {
17
- ...t,
18
- href: o,
19
- rel: k,
20
- style: p,
21
- tabIndex: l,
22
- target: j,
23
- children: n
24
- }
25
- ) : /* @__PURE__ */ r.jsx(a, { ...t, href: o, style: p, tabIndex: l, children: n });
26
- };
27
- B.displayName = "BaseLink";
28
- export {
29
- B
30
- };
@@ -1,111 +0,0 @@
1
- import { j as n } from "./jsx-runtime-C5mzlN2N.js";
2
- import { useId as j, useRef as v, useMemo as w } from "react";
3
- import { c as K } from "./bem-CYKrPjje.js";
4
- import { i as L } from "./validations-B_cxltQ_.js";
5
- import { I as M } from "./Icon-BMrVlROP.js";
6
- import { L as N } from "./Link-DSQ1125B.js";
7
- import { L as C } from "./Loading-C7lyHDW7.js";
8
- const D = "gradientMove", E = "fadeInKeyframe", R = {
9
- "prokodo-Button": "prokodo-Button",
10
- "prokodo-Button--has-bg-primary": "prokodo-Button--has-bg-primary",
11
- "prokodo-Button--has-bg-secondary": "prokodo-Button--has-bg-secondary",
12
- "prokodo-Button--has-bg-info": "prokodo-Button--has-bg-info",
13
- "prokodo-Button--has-bg-error": "prokodo-Button--has-bg-error",
14
- "prokodo-Button--has-bg-success": "prokodo-Button--has-bg-success",
15
- "prokodo-Button--has-bg-warning": "prokodo-Button--has-bg-warning",
16
- "prokodo-Button--is-disabled": "prokodo-Button--is-disabled",
17
- "prokodo-Button--has-text-inherit": "prokodo-Button--has-text-inherit",
18
- "prokodo-Button--has-text-primary": "prokodo-Button--has-text-primary",
19
- "prokodo-Button--has-text-secondary": "prokodo-Button--has-text-secondary",
20
- "prokodo-Button--has-text-info": "prokodo-Button--has-text-info",
21
- "prokodo-Button--has-text-success": "prokodo-Button--has-text-success",
22
- "prokodo-Button--has-text-warning": "prokodo-Button--has-text-warning",
23
- "prokodo-Button--has-text-error": "prokodo-Button--has-text-error",
24
- "prokodo-Button--has-variant-outlined": "prokodo-Button--has-variant-outlined",
25
- "prokodo-Button--icon-only": "prokodo-Button--icon-only",
26
- "prokodo-Button--has-fullWidth": "prokodo-Button--has-fullWidth",
27
- "prokodo-Button__title": "prokodo-Button__title",
28
- "prokodo-Button__icon": "prokodo-Button__icon",
29
- "prokodo-Button__icon--icon-only": "prokodo-Button__icon--icon-only",
30
- "prokodo-Button__link": "prokodo-Button__link",
31
- "prokodo-Button__link--icon-only": "prokodo-Button__link--icon-only",
32
- "prokodo-Button__content": "prokodo-Button__content",
33
- "prokodo-Button__content--icon-only": "prokodo-Button__content--icon-only",
34
- gradientMove: D,
35
- fadeInKeyframe: E
36
- }, d = K(R, "Button"), W = {}, O = {}, H = ({
37
- id: B,
38
- fullWidth: k,
39
- color: e = "primary",
40
- iconProps: i = {},
41
- loading: c,
42
- variant: t = "contained",
43
- className: l,
44
- contentClassName: y,
45
- disabled: a,
46
- redirect: s,
47
- ...o
48
- }) => {
49
- const b = j(), g = v(null), h = `Button-${b}`, I = t === "outlined", m = i == null ? void 0 : i.name, x = m && !(o != null && o.title), u = w(
50
- () => ({
51
- "icon-only": !!x
52
- }),
53
- [x]
54
- ), $ = () => /* @__PURE__ */ n.jsxs("span", { ref: g, "aria-labelledby": h, className: d("title"), children: [
55
- m && /* @__PURE__ */ n.jsx(M, { className: d("icon", u), ...i }),
56
- o == null ? void 0 : o.title
57
- ] }), f = () => c ? /* @__PURE__ */ n.jsx(C, { size: "xs" }) : $(), _ = () => I ? /* @__PURE__ */ n.jsx("div", { className: d("content", u, y), children: f() }) : f();
58
- return s ? /* @__PURE__ */ n.jsx(
59
- N,
60
- {
61
- disabled: a,
62
- href: s.href,
63
- className: d(
64
- void 0,
65
- {
66
- "has-fullWidth": !!k,
67
- [`has-variant-${t}`]: !0,
68
- [`has-bg-${e}`]: t === "contained",
69
- [`has-text-${e}`]: t === "text",
70
- "is-disabled": !!a,
71
- ...u
72
- },
73
- l
74
- ),
75
- onClick: () => {
76
- var r;
77
- return (r = o == null ? void 0 : o.onClick) == null ? void 0 : r.call(o, W);
78
- },
79
- onKeyDown: () => {
80
- var r;
81
- return (r = o == null ? void 0 : o.onKeyDown) == null ? void 0 : r.call(o, O);
82
- },
83
- children: _()
84
- }
85
- ) : /* @__PURE__ */ n.jsx(
86
- "button",
87
- {
88
- ...o,
89
- color: e,
90
- disabled: !!a || !!c,
91
- id: `${h}${L(B) ? ` ${B}` : ""}`,
92
- className: d(
93
- void 0,
94
- {
95
- "has-fullWidth": !!k,
96
- [`has-variant-${t}`]: !0,
97
- [`has-bg-${e}`]: t === "contained",
98
- [`has-text-${e}`]: t === "text",
99
- "is-disabled": !!a,
100
- ...u
101
- },
102
- l
103
- ),
104
- tabIndex: s !== void 0 || a ? -1 : (o == null ? void 0 : o.tabIndex) ?? void 0,
105
- children: _()
106
- }
107
- );
108
- };
109
- export {
110
- H as B
111
- };
@@ -1 +0,0 @@
1
- "use strict";const n=require("./jsx-runtime-CITbqOLs.js"),c=require("react"),R=require("./bem-DC5wv0dD.js"),v=require("./validations-Cnxtn28y.js"),q=require("./Icon-eWdA85cf.js"),E=require("./Link-Dg7XR4uY.js"),w=require("./Loading-U-CrTVTi.js"),K="gradientMove",L="fadeInKeyframe",M={"prokodo-Button":"prokodo-Button","prokodo-Button--has-bg-primary":"prokodo-Button--has-bg-primary","prokodo-Button--has-bg-secondary":"prokodo-Button--has-bg-secondary","prokodo-Button--has-bg-info":"prokodo-Button--has-bg-info","prokodo-Button--has-bg-error":"prokodo-Button--has-bg-error","prokodo-Button--has-bg-success":"prokodo-Button--has-bg-success","prokodo-Button--has-bg-warning":"prokodo-Button--has-bg-warning","prokodo-Button--is-disabled":"prokodo-Button--is-disabled","prokodo-Button--has-text-inherit":"prokodo-Button--has-text-inherit","prokodo-Button--has-text-primary":"prokodo-Button--has-text-primary","prokodo-Button--has-text-secondary":"prokodo-Button--has-text-secondary","prokodo-Button--has-text-info":"prokodo-Button--has-text-info","prokodo-Button--has-text-success":"prokodo-Button--has-text-success","prokodo-Button--has-text-warning":"prokodo-Button--has-text-warning","prokodo-Button--has-text-error":"prokodo-Button--has-text-error","prokodo-Button--has-variant-outlined":"prokodo-Button--has-variant-outlined","prokodo-Button--icon-only":"prokodo-Button--icon-only","prokodo-Button--has-fullWidth":"prokodo-Button--has-fullWidth","prokodo-Button__title":"prokodo-Button__title","prokodo-Button__icon":"prokodo-Button__icon","prokodo-Button__icon--icon-only":"prokodo-Button__icon--icon-only","prokodo-Button__link":"prokodo-Button__link","prokodo-Button__link--icon-only":"prokodo-Button__link--icon-only","prokodo-Button__content":"prokodo-Button__content","prokodo-Button__content--icon-only":"prokodo-Button__content--icon-only",gradientMove:K,fadeInKeyframe:L},r=R.create(M,"Button"),N={},C={},D=({id:B,fullWidth:k,color:e="primary",iconProps:u={},loading:l,variant:t="contained",className:h,contentClassName:g,disabled:a,redirect:s,...o})=>{const f=c.useId(),j=c.useRef(null),x=`Button-${f}`,I=t==="outlined",_=u==null?void 0:u.name,y=_&&!(o!=null&&o.title),d=c.useMemo(()=>({"icon-only":!!y}),[y]),$=()=>n.jsxRuntimeExports.jsxs("span",{ref:j,"aria-labelledby":x,className:r("title"),children:[_&&n.jsxRuntimeExports.jsx(q.Icon,{className:r("icon",d),...u}),o==null?void 0:o.title]}),m=()=>l?n.jsxRuntimeExports.jsx(w.Loading,{size:"xs"}):$(),b=()=>I?n.jsxRuntimeExports.jsx("div",{className:r("content",d,g),children:m()}):m();return s?n.jsxRuntimeExports.jsx(E.Link,{disabled:a,href:s.href,className:r(void 0,{"has-fullWidth":!!k,[`has-variant-${t}`]:!0,[`has-bg-${e}`]:t==="contained",[`has-text-${e}`]:t==="text","is-disabled":!!a,...d},h),onClick:()=>{var i;return(i=o==null?void 0:o.onClick)==null?void 0:i.call(o,N)},onKeyDown:()=>{var i;return(i=o==null?void 0:o.onKeyDown)==null?void 0:i.call(o,C)},children:b()}):n.jsxRuntimeExports.jsx("button",{...o,color:e,disabled:!!a||!!l,id:`${x}${v.isString(B)?` ${B}`:""}`,className:r(void 0,{"has-fullWidth":!!k,[`has-variant-${t}`]:!0,[`has-bg-${e}`]:t==="contained",[`has-text-${e}`]:t==="text","is-disabled":!!a,...d},h),tabIndex:s!==void 0||a?-1:(o==null?void 0:o.tabIndex)??void 0,children:b()})};exports.Button=D;
@@ -1 +0,0 @@
1
- "use strict";const a=require("./jsx-runtime-CITbqOLs.js"),i=require("react"),r=require("./validations-Cnxtn28y.js"),A=require("./Animated-CO4IEerF.js"),k=require("./Loading-U-CrTVTi.js");let d=!1;const R=({calendlyId:f,data:t,color:n={text:"#4D4D4D",button:"#1E90FF",background:"#FFFFFF"},animationProps:h,hideCookieSettings:g,hideEventTypeDetails:p,hideDetails:y,...w})=>{const o=i.useRef(null),[l,C]=i.useState(!1),[x,_]=i.useState(d),c=e=>e==null?void 0:e.replaceAll("#",""),j=e=>{const u={};if(!e)return u;for(const s of["name","email","firstName","lastName"])r.isString(e[s])&&(u[s]=e[s]);return u},m=i.useMemo(()=>{const e=new URLSearchParams;return y&&e.set("hide_landing_page_details","1"),p&&e.set("hide_event_type_details","1"),g&&e.set("hide_gdpr_banner","1"),r.isString(n.background)&&e.set("background_color",c(n.background)),r.isString(n.text)&&e.set("text_color",c(n.text)),r.isString(n.button)&&e.set("primary_color",c(n.button)),r.isString(t==null?void 0:t.utm_campaign)&&e.set("utm_campaign",(t==null?void 0:t.utm_campaign)??""),r.isString(t==null?void 0:t.utm_source)&&e.set("utm_source",(t==null?void 0:t.utm_source)??""),`https://calendly.com/${f}?${e.toString()}`},[f,n,t,y,p,g]),F=i.useCallback(e=>{if(e&&x&&!l){let s=0;const b=()=>{var S;window.Calendly?((S=o.current)==null||S.setAttribute("data-url",m),window.Calendly.initInlineWidget({url:m,parentElement:o.current,prefill:j(t)}),C(!0)):s<10?(s+=1,setTimeout(b,100)):console.warn("Calendly widget failed to load.")};b()}},[x,l,m,t]);return i.useEffect(()=>{if(d||typeof document>"u"){_(!0);return}const e=document.createElement("script");e.src="https://assets.calendly.com/assets/external/widget.js",e.async=!0,e.onload=()=>{d=!0,_(!0)},document.body.appendChild(e)},[]),a.jsxRuntimeExports.jsxs(A.Animated,{...h,onAnimate:F,children:[!l&&a.jsxRuntimeExports.jsx(k.Loading,{}),a.jsxRuntimeExports.jsx("div",{...w,ref:o,style:{display:l?"block":"none",minWidth:320,height:700}})]})};R.displayName="Calendly";exports.Calendly=R;
@@ -1,82 +0,0 @@
1
- import { j as c } from "./jsx-runtime-C5mzlN2N.js";
2
- import { useRef as k, useState as h, useMemo as L, useCallback as R, useEffect as S } from "react";
3
- import { i } from "./validations-B_cxltQ_.js";
4
- import { A as E } from "./Animated-BBfAgsHL.js";
5
- import { L as B } from "./Loading-C7lyHDW7.js";
6
- let f = !1;
7
- const I = ({
8
- calendlyId: a,
9
- data: t,
10
- color: n = {
11
- text: "#4D4D4D",
12
- button: "#1E90FF",
13
- background: "#FFFFFF"
14
- },
15
- animationProps: w,
16
- hideCookieSettings: p,
17
- hideEventTypeDetails: d,
18
- hideDetails: g,
19
- ...C
20
- }) => {
21
- const l = k(null), [r, F] = h(!1), [y, _] = h(f), u = (e) => e == null ? void 0 : e.replaceAll("#", ""), A = (e) => {
22
- const o = {};
23
- if (!e) return o;
24
- for (const s of ["name", "email", "firstName", "lastName"])
25
- i(e[s]) && (o[s] = e[s]);
26
- return o;
27
- }, m = L(() => {
28
- const e = new URLSearchParams();
29
- return g && e.set("hide_landing_page_details", "1"), d && e.set("hide_event_type_details", "1"), p && e.set("hide_gdpr_banner", "1"), i(n.background) && e.set("background_color", u(n.background)), i(n.text) && e.set("text_color", u(n.text)), i(n.button) && e.set("primary_color", u(n.button)), i(t == null ? void 0 : t.utm_campaign) && e.set("utm_campaign", (t == null ? void 0 : t.utm_campaign) ?? ""), i(t == null ? void 0 : t.utm_source) && e.set("utm_source", (t == null ? void 0 : t.utm_source) ?? ""), `https://calendly.com/${a}?${e.toString()}`;
30
- }, [
31
- a,
32
- n,
33
- t,
34
- g,
35
- d,
36
- p
37
- ]), j = R(
38
- (e) => {
39
- if (e && y && !r) {
40
- let s = 0;
41
- const x = () => {
42
- var b;
43
- window.Calendly ? ((b = l.current) == null || b.setAttribute("data-url", m), window.Calendly.initInlineWidget({
44
- url: m,
45
- parentElement: l.current,
46
- prefill: A(t)
47
- }), F(!0)) : s < 10 ? (s += 1, setTimeout(x, 100)) : console.warn("Calendly widget failed to load.");
48
- };
49
- x();
50
- }
51
- },
52
- [y, r, m, t]
53
- );
54
- return S(() => {
55
- if (f || typeof document > "u") {
56
- _(!0);
57
- return;
58
- }
59
- const e = document.createElement("script");
60
- e.src = "https://assets.calendly.com/assets/external/widget.js", e.async = !0, e.onload = () => {
61
- f = !0, _(!0);
62
- }, document.body.appendChild(e);
63
- }, []), /* @__PURE__ */ c.jsxs(E, { ...w, onAnimate: j, children: [
64
- !r && /* @__PURE__ */ c.jsx(B, {}),
65
- /* @__PURE__ */ c.jsx(
66
- "div",
67
- {
68
- ...C,
69
- ref: l,
70
- style: {
71
- display: r ? "block" : "none",
72
- minWidth: 320,
73
- height: 700
74
- }
75
- }
76
- )
77
- ] });
78
- };
79
- I.displayName = "Calendly";
80
- export {
81
- I as C
82
- };