@calcom/atoms 1.0.3

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 (134) hide show
  1. package/README.md +5 -0
  2. package/dist/AddressInput-Ci02wr5C.js +33 -0
  3. package/dist/AlbyPriceComponent-NqN1MEov.js +967 -0
  4. package/dist/Card-6fRR5Hwj.js +185 -0
  5. package/dist/DatePicker-9pbCidOU.js +27 -0
  6. package/dist/PhoneInput-ysQbrvjy.js +1405 -0
  7. package/dist/PoweredBy-AY0Afi6V.js +31 -0
  8. package/dist/UnpublishedEntity-epeaNFkK.js +23 -0
  9. package/dist/availability/AvailabilitySettings.d.ts +58 -0
  10. package/dist/availability/AvailabilitySettings.d.ts.map +1 -0
  11. package/dist/availability/index.d.ts +4 -0
  12. package/dist/availability/index.d.ts.map +1 -0
  13. package/dist/availability/types.d.ts +22 -0
  14. package/dist/availability/types.d.ts.map +1 -0
  15. package/dist/availability/wrappers/PlatformAvailabilitySettingsWrapper.d.ts +18 -0
  16. package/dist/availability/wrappers/PlatformAvailabilitySettingsWrapper.d.ts.map +1 -0
  17. package/dist/availability/wrappers/WebAvailabilitySettingsWrapper.d.ts +2 -0
  18. package/dist/availability/wrappers/WebAvailabilitySettingsWrapper.d.ts.map +1 -0
  19. package/dist/booker/Booker.stories.d.ts +7 -0
  20. package/dist/booker/Booker.stories.d.ts.map +1 -0
  21. package/dist/booker/BookerPlatformWrapper.d.ts +24 -0
  22. package/dist/booker/BookerPlatformWrapper.d.ts.map +1 -0
  23. package/dist/booker/BookerWebWrapper.d.ts +5 -0
  24. package/dist/booker/BookerWebWrapper.d.ts.map +1 -0
  25. package/dist/booker/export.d.ts +4 -0
  26. package/dist/booker/export.d.ts.map +1 -0
  27. package/dist/booker/index.d.ts +3 -0
  28. package/dist/booker/index.d.ts.map +1 -0
  29. package/dist/cal-atoms.js +9 -0
  30. package/dist/cal-atoms.umd.cjs +577 -0
  31. package/dist/cal-provider/BaseCalProvider.d.ts +4 -0
  32. package/dist/cal-provider/BaseCalProvider.d.ts.map +1 -0
  33. package/dist/cal-provider/CalProvider.d.ts +14 -0
  34. package/dist/cal-provider/CalProvider.d.ts.map +1 -0
  35. package/dist/cal-provider/index.d.ts +2 -0
  36. package/dist/cal-provider/index.d.ts.map +1 -0
  37. package/dist/framer-features-Zr_i_7k0.js +443 -0
  38. package/dist/gcal-connect/GcalConnect.d.ts +9 -0
  39. package/dist/gcal-connect/GcalConnect.d.ts.map +1 -0
  40. package/dist/gcal-connect/index.d.ts +2 -0
  41. package/dist/gcal-connect/index.d.ts.map +1 -0
  42. package/dist/globals.min.css +1 -0
  43. package/dist/hooks/useApiKeys.d.ts +10 -0
  44. package/dist/hooks/useApiKeys.d.ts.map +1 -0
  45. package/dist/hooks/useAtomsContext.d.ts +31 -0
  46. package/dist/hooks/useAtomsContext.d.ts.map +1 -0
  47. package/dist/hooks/useAvailableSlots.d.ts +6 -0
  48. package/dist/hooks/useAvailableSlots.d.ts.map +1 -0
  49. package/dist/hooks/useBookings.d.ts +3 -0
  50. package/dist/hooks/useBookings.d.ts.map +1 -0
  51. package/dist/hooks/useCalendarsBusyTimes.d.ts +10 -0
  52. package/dist/hooks/useCalendarsBusyTimes.d.ts.map +1 -0
  53. package/dist/hooks/useClientSchedule.d.ts +8 -0
  54. package/dist/hooks/useClientSchedule.d.ts.map +1 -0
  55. package/dist/hooks/useConnectedCalendars.d.ts +3 -0
  56. package/dist/hooks/useConnectedCalendars.d.ts.map +1 -0
  57. package/dist/hooks/useCreateBooking.d.ts +169 -0
  58. package/dist/hooks/useCreateBooking.d.ts.map +1 -0
  59. package/dist/hooks/useCreateInstantBooking.d.ts +169 -0
  60. package/dist/hooks/useCreateInstantBooking.d.ts.map +1 -0
  61. package/dist/hooks/useCreateRecurringBooking.d.ts +154 -0
  62. package/dist/hooks/useCreateRecurringBooking.d.ts.map +1 -0
  63. package/dist/hooks/useDeleteSchedule.d.ts +11 -0
  64. package/dist/hooks/useDeleteSchedule.d.ts.map +1 -0
  65. package/dist/hooks/useDeleteSelectedSlot.d.ts +8 -0
  66. package/dist/hooks/useDeleteSelectedSlot.d.ts.map +1 -0
  67. package/dist/hooks/useGcal.d.ts +9 -0
  68. package/dist/hooks/useGcal.d.ts.map +1 -0
  69. package/dist/hooks/useGetCityTimezones.d.ts +6 -0
  70. package/dist/hooks/useGetCityTimezones.d.ts.map +1 -0
  71. package/dist/hooks/useHandleBookEvent.d.ts +15 -0
  72. package/dist/hooks/useHandleBookEvent.d.ts.map +1 -0
  73. package/dist/hooks/useIsPlatform.d.ts +2 -0
  74. package/dist/hooks/useIsPlatform.d.ts.map +1 -0
  75. package/dist/hooks/useMe.d.ts +12 -0
  76. package/dist/hooks/useMe.d.ts.map +1 -0
  77. package/dist/hooks/useOAuthClient.d.ts +11 -0
  78. package/dist/hooks/useOAuthClient.d.ts.map +1 -0
  79. package/dist/hooks/useOAuthFlow.d.ts +12 -0
  80. package/dist/hooks/useOAuthFlow.d.ts.map +1 -0
  81. package/dist/hooks/usePublicEvent.d.ts +958 -0
  82. package/dist/hooks/usePublicEvent.d.ts.map +1 -0
  83. package/dist/hooks/useReserveSlot.d.ts +8 -0
  84. package/dist/hooks/useReserveSlot.d.ts.map +1 -0
  85. package/dist/hooks/useSlots.d.ts +11 -0
  86. package/dist/hooks/useSlots.d.ts.map +1 -0
  87. package/dist/hooks/useTimezone.d.ts +2 -0
  88. package/dist/hooks/useTimezone.d.ts.map +1 -0
  89. package/dist/hooks/useUpdateSchedule.d.ts +9 -0
  90. package/dist/hooks/useUpdateSchedule.d.ts.map +1 -0
  91. package/dist/hooks/useUpdateUserTimezone.d.ts +15 -0
  92. package/dist/hooks/useUpdateUserTimezone.d.ts.map +1 -0
  93. package/dist/index--Pb54wx_.js +4 -0
  94. package/dist/index-3sgDY24S.js +5 -0
  95. package/dist/index-GttMIx74.js +65366 -0
  96. package/dist/index-RcPlEXh-.js +220 -0
  97. package/dist/index-rUbdQ7Zu.js +1256 -0
  98. package/dist/index-uuiJumv6.js +76 -0
  99. package/dist/index.d.ts +7 -0
  100. package/dist/index.d.ts.map +1 -0
  101. package/dist/isSupportedCountry-WVb-DZDd.js +487 -0
  102. package/dist/lib/getQueryParam.d.ts +3 -0
  103. package/dist/lib/getQueryParam.d.ts.map +1 -0
  104. package/dist/lib/http.d.ts +18 -0
  105. package/dist/lib/http.d.ts.map +1 -0
  106. package/dist/lib/setQueryParam.d.ts +3 -0
  107. package/dist/lib/setQueryParam.d.ts.map +1 -0
  108. package/dist/monorepo.d.ts +9 -0
  109. package/dist/monorepo.d.ts.map +1 -0
  110. package/dist/server.browser-yA5s9iMO.js +9859 -0
  111. package/dist/src/components/ui/button.d.ts +12 -0
  112. package/dist/src/components/ui/button.d.ts.map +1 -0
  113. package/dist/src/components/ui/confirmation-dialog-content.d.ts +4 -0
  114. package/dist/src/components/ui/confirmation-dialog-content.d.ts.map +1 -0
  115. package/dist/src/components/ui/dialog.d.ts +20 -0
  116. package/dist/src/components/ui/dialog.d.ts.map +1 -0
  117. package/dist/src/components/ui/shell.d.ts +3 -0
  118. package/dist/src/components/ui/shell.d.ts.map +1 -0
  119. package/dist/src/components/ui/toast.d.ts +16 -0
  120. package/dist/src/components/ui/toast.d.ts.map +1 -0
  121. package/dist/src/components/ui/toaster.d.ts +3 -0
  122. package/dist/src/components/ui/toaster.d.ts.map +1 -0
  123. package/dist/src/components/ui/use-toast.d.ts +45 -0
  124. package/dist/src/components/ui/use-toast.d.ts.map +1 -0
  125. package/dist/src/lib/utils.d.ts +3 -0
  126. package/dist/src/lib/utils.d.ts.map +1 -0
  127. package/dist/style.css +1 -0
  128. package/dist/timezone/index.d.ts +4 -0
  129. package/dist/timezone/index.d.ts.map +1 -0
  130. package/dist/types.d.ts +8 -0
  131. package/dist/types.d.ts.map +1 -0
  132. package/dist/vite.config.d.ts +3 -0
  133. package/dist/vite.config.d.ts.map +1 -0
  134. package/package.json +56 -0
@@ -0,0 +1,185 @@
1
+ import { ak as C, aj as d, au as i, ai as r, e as N, av as p, aw as w } from "./index-GttMIx74.js";
2
+ const c = w("", {
3
+ // Variants won't have any style by default. Style will only be applied if the variants are combined.
4
+ // So, style is defined in compoundVariants.
5
+ variants: {
6
+ variant: {
7
+ basic: "",
8
+ ProfileCard: "",
9
+ SidebarCard: ""
10
+ },
11
+ structure: {
12
+ image: "",
13
+ card: "",
14
+ title: "",
15
+ description: ""
16
+ }
17
+ },
18
+ compoundVariants: [
19
+ // Style for Basic Variants types
20
+ {
21
+ variant: "basic",
22
+ structure: "image",
23
+ className: "w-10 h-auto"
24
+ },
25
+ {
26
+ variant: "basic",
27
+ structure: "card",
28
+ className: "p-5"
29
+ },
30
+ {
31
+ variant: "basic",
32
+ structure: "title",
33
+ className: "text-base mt-4"
34
+ },
35
+ {
36
+ variant: "basic",
37
+ structure: "description",
38
+ className: "text-sm leading-[18px] text-subtle font-normal"
39
+ },
40
+ // Style for ProfileCard Variant Types
41
+ {
42
+ variant: "ProfileCard",
43
+ structure: "image",
44
+ className: "w-9 h-auto rounded-full mb-4s"
45
+ },
46
+ {
47
+ variant: "ProfileCard",
48
+ structure: "card",
49
+ className: "w-80 p-4 hover:bg-subtle"
50
+ },
51
+ {
52
+ variant: "ProfileCard",
53
+ structure: "title",
54
+ className: "text-base"
55
+ },
56
+ {
57
+ variant: "ProfileCard",
58
+ structure: "description",
59
+ className: "text-sm leading-[18px] text-subtle font-normal"
60
+ },
61
+ // Style for SidebarCard Variant Types
62
+ {
63
+ variant: "SidebarCard",
64
+ structure: "image",
65
+ className: "w-9 h-auto rounded-full mb-4s"
66
+ },
67
+ {
68
+ variant: "SidebarCard",
69
+ structure: "card",
70
+ className: "w-full p-3 border border-subtle"
71
+ },
72
+ {
73
+ variant: "SidebarCard",
74
+ structure: "title",
75
+ className: "text-sm font-cal"
76
+ },
77
+ {
78
+ variant: "SidebarCard",
79
+ structure: "description",
80
+ className: "text-xs text-default line-clamp-2"
81
+ }
82
+ ]
83
+ });
84
+ function g({
85
+ image: f,
86
+ title: h,
87
+ icon: b,
88
+ description: m,
89
+ variant: a,
90
+ actionButton: e,
91
+ containerProps: t,
92
+ imageProps: s,
93
+ mediaLink: u,
94
+ thumbnailUrl: x,
95
+ learnMore: l
96
+ }) {
97
+ const v = l && l.href.startsWith("https") ? "a" : C;
98
+ return /* @__PURE__ */ d("div", {
99
+ className: i(t == null ? void 0 : t.className, c({
100
+ variant: a,
101
+ structure: "card"
102
+ }), "bg-default border-subtle text-default flex flex-col justify-between rounded-md border"),
103
+ "data-testid": "card-container",
104
+ ...t,
105
+ children: [/* @__PURE__ */ d("div", {
106
+ children: [b && b, f && /* @__PURE__ */ r("img", {
107
+ src: f,
108
+ alt: s == null ? void 0 : s.alt,
109
+ className: i(s == null ? void 0 : s.className, c({
110
+ variant: a,
111
+ structure: "image"
112
+ })),
113
+ ...s
114
+ }), /* @__PURE__ */ r("h5", {
115
+ title: h,
116
+ className: i(c({
117
+ variant: a,
118
+ structure: "title"
119
+ }), "text-emphasis line-clamp-1 font-bold leading-5"),
120
+ children: h
121
+ }), m && /* @__PURE__ */ r("p", {
122
+ title: m.toString(),
123
+ className: i(c({
124
+ variant: a,
125
+ structure: "description"
126
+ }), "pt-1"),
127
+ children: m
128
+ })]
129
+ }), a === "SidebarCard" && /* @__PURE__ */ d("a", {
130
+ onClick: e == null ? void 0 : e.onClick,
131
+ target: "_blank",
132
+ rel: "noreferrer",
133
+ href: u,
134
+ className: "group relative my-3 flex aspect-video items-center overflow-hidden rounded",
135
+ children: [/* @__PURE__ */ r("div", {
136
+ className: "absolute inset-0 bg-black bg-opacity-50 transition-opacity group-hover:bg-opacity-40"
137
+ }), /* @__PURE__ */ d("svg", {
138
+ className: "text-inverted absolute left-1/2 top-1/2 h-8 w-8 -translate-x-1/2 -translate-y-1/2 transform rounded-full shadow-lg hover:-mt-px",
139
+ viewBox: "0 0 32 32",
140
+ fill: "none",
141
+ xmlns: "http://www.w3.org/2000/svg",
142
+ children: [/* @__PURE__ */ r("path", {
143
+ d: "M16 32C24.8366 32 32 24.8366 32 16C32 7.16344 24.8366 0 16 0C7.16344 0 0 7.16344 0 16C0 24.8366 7.16344 32 16 32Z",
144
+ fill: "white"
145
+ }), /* @__PURE__ */ r("path", {
146
+ d: "M12.1667 8.5L23.8334 16L12.1667 23.5V8.5Z",
147
+ fill: "#111827",
148
+ stroke: "#111827",
149
+ strokeWidth: "1.5",
150
+ strokeLinecap: "round",
151
+ strokeLinejoin: "round"
152
+ })]
153
+ }), /* @__PURE__ */ r("img", {
154
+ alt: "play feature video",
155
+ src: x
156
+ })]
157
+ }), /* @__PURE__ */ r("div", {
158
+ children: a === "basic" && /* @__PURE__ */ r(N, {
159
+ color: "secondary",
160
+ href: e == null ? void 0 : e.href,
161
+ className: "mt-10",
162
+ EndIcon: p,
163
+ children: e == null ? void 0 : e.child
164
+ })
165
+ }), a === "SidebarCard" && /* @__PURE__ */ d("div", {
166
+ className: "mt-2 flex items-center justify-between",
167
+ children: [l && /* @__PURE__ */ r(v, {
168
+ href: l.href,
169
+ onClick: e == null ? void 0 : e.onClick,
170
+ target: "_blank",
171
+ rel: "noreferrer",
172
+ className: "text-default text-xs font-medium",
173
+ children: l.text
174
+ }), (e == null ? void 0 : e.child) && /* @__PURE__ */ r("button", {
175
+ className: "text-default hover:text-emphasis p-0 text-xs font-normal",
176
+ color: "minimal",
177
+ onClick: e == null ? void 0 : e.onClick,
178
+ children: e == null ? void 0 : e.child
179
+ })]
180
+ })]
181
+ });
182
+ }
183
+ export {
184
+ g as C
185
+ };
@@ -0,0 +1,27 @@
1
+ import { af as g, ao as c, ap as i, aq as k, ai as S, ar as p, as as Y, at as f } from "./index-GttMIx74.js";
2
+ const w = ({
3
+ event: t,
4
+ schedule: e
5
+ }) => {
6
+ var n, r, D, l;
7
+ const {
8
+ i18n: m
9
+ } = g(), [o, d] = c((a) => [a.month, a.selectedDate], i), [s, M, u] = c((a) => [a.setSelectedDate, a.setMonth, a.setDayCount], i), y = k((n = e == null ? void 0 : e.data) == null ? void 0 : n.slots);
10
+ return /* @__PURE__ */ S(p, {
11
+ isPending: e.isPending,
12
+ onChange: (a) => {
13
+ s(a === null ? a : a.format("YYYY-MM-DD"));
14
+ },
15
+ onMonthChange: (a) => {
16
+ M(a.format("YYYY-MM")), s(a.format("YYYY-MM-DD")), u(null);
17
+ },
18
+ includedDates: y,
19
+ locale: m.language,
20
+ browsingDate: o ? Y(o) : void 0,
21
+ selected: Y(d),
22
+ weekStart: f((l = (D = (r = t == null ? void 0 : t.data) == null ? void 0 : r.users) == null ? void 0 : D[0]) == null ? void 0 : l.weekStart)
23
+ });
24
+ };
25
+ export {
26
+ w as DatePicker
27
+ };