@drawbridge/components 0.0.37 → 0.0.40

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 (246) hide show
  1. package/dist/advertisement.js +1299 -0
  2. package/dist/advertisement.mjs +95 -0
  3. package/dist/card-advertisement.js +104 -31
  4. package/dist/card-advertisement.mjs +3 -281
  5. package/dist/chunk-2ZYGRSSA.mjs +45 -0
  6. package/dist/chunk-7ZLMDYBR.mjs +113 -0
  7. package/dist/chunk-BD3TDNJE.mjs +98 -0
  8. package/dist/chunk-FJXG3REN.mjs +93 -0
  9. package/dist/chunk-FYA7EAMR.mjs +29 -0
  10. package/dist/chunk-GFDZ7ER6.mjs +29 -0
  11. package/dist/chunk-HDOA3Y3U.mjs +334 -0
  12. package/dist/chunk-HH7WF5BT.mjs +29 -0
  13. package/dist/chunk-Q3UIVGPQ.mjs +29 -0
  14. package/dist/chunk-T5QQBFM3.mjs +29 -0
  15. package/dist/chunk-TJNIR4PF.mjs +358 -0
  16. package/dist/chunk-XWELEL6Z.mjs +208 -0
  17. package/dist/embla.js +41 -0
  18. package/dist/embla.mjs +6 -0
  19. package/dist/icons/arrow-down-tray.js +48 -0
  20. package/dist/icons/arrow-down-tray.mjs +28 -0
  21. package/dist/icons/arrow-left.js +48 -0
  22. package/dist/icons/arrow-left.mjs +28 -0
  23. package/dist/icons/arrow-right.js +48 -0
  24. package/dist/icons/arrow-right.mjs +28 -0
  25. package/dist/icons/arrow-up-tray.js +48 -0
  26. package/dist/icons/arrow-up-tray.mjs +28 -0
  27. package/dist/icons/bars-arrow-down.js +48 -0
  28. package/dist/icons/bars-arrow-down.mjs +28 -0
  29. package/dist/icons/bars-arrow-up.js +48 -0
  30. package/dist/icons/bars-arrow-up.mjs +28 -0
  31. package/dist/icons/bold.js +47 -0
  32. package/dist/icons/bold.mjs +27 -0
  33. package/dist/icons/bolt.js +48 -0
  34. package/dist/icons/bolt.mjs +28 -0
  35. package/dist/icons/calendar.js +48 -0
  36. package/dist/icons/calendar.mjs +28 -0
  37. package/dist/icons/cancel.js +48 -0
  38. package/dist/icons/cancel.mjs +28 -0
  39. package/dist/icons/card.js +48 -0
  40. package/dist/icons/card.mjs +28 -0
  41. package/dist/icons/chart.js +48 -0
  42. package/dist/icons/chart.mjs +28 -0
  43. package/dist/icons/check.js +48 -0
  44. package/dist/icons/check.mjs +6 -0
  45. package/dist/icons/chevron-down.js +48 -0
  46. package/dist/icons/chevron-down.mjs +6 -0
  47. package/dist/icons/chevron-left.js +48 -0
  48. package/dist/icons/chevron-left.mjs +28 -0
  49. package/dist/icons/chevron-right.js +48 -0
  50. package/dist/icons/chevron-right.mjs +28 -0
  51. package/dist/icons/chevron-up-down.js +48 -0
  52. package/dist/icons/chevron-up-down.mjs +28 -0
  53. package/dist/icons/chevron-up.js +48 -0
  54. package/dist/icons/chevron-up.mjs +28 -0
  55. package/dist/icons/clock.js +48 -0
  56. package/dist/icons/clock.mjs +28 -0
  57. package/dist/icons/code-bracket.js +48 -0
  58. package/dist/icons/code-bracket.mjs +28 -0
  59. package/dist/icons/cog.js +60 -0
  60. package/dist/icons/cog.mjs +40 -0
  61. package/dist/icons/copy.js +48 -0
  62. package/dist/icons/copy.mjs +28 -0
  63. package/dist/icons/document.js +48 -0
  64. package/dist/icons/document.mjs +28 -0
  65. package/dist/icons/download.js +48 -0
  66. package/dist/icons/download.mjs +28 -0
  67. package/dist/icons/drag.js +51 -0
  68. package/dist/icons/drag.mjs +31 -0
  69. package/dist/icons/ellipsis.js +48 -0
  70. package/dist/icons/ellipsis.mjs +28 -0
  71. package/dist/icons/email.js +48 -0
  72. package/dist/icons/email.mjs +28 -0
  73. package/dist/icons/external.js +48 -0
  74. package/dist/icons/external.mjs +28 -0
  75. package/dist/icons/filter.js +48 -0
  76. package/dist/icons/filter.mjs +28 -0
  77. package/dist/icons/flag.js +48 -0
  78. package/dist/icons/flag.mjs +28 -0
  79. package/dist/icons/google.js +74 -0
  80. package/dist/icons/google.mjs +54 -0
  81. package/dist/icons/home.js +48 -0
  82. package/dist/icons/home.mjs +28 -0
  83. package/dist/icons/image.js +48 -0
  84. package/dist/icons/image.mjs +28 -0
  85. package/dist/icons/italic.js +48 -0
  86. package/dist/icons/italic.mjs +28 -0
  87. package/dist/icons/link.js +48 -0
  88. package/dist/icons/link.mjs +28 -0
  89. package/dist/icons/loader.js +64 -0
  90. package/dist/icons/loader.mjs +6 -0
  91. package/dist/icons/lock.js +48 -0
  92. package/dist/icons/lock.mjs +28 -0
  93. package/dist/icons/logo-mark.js +55 -0
  94. package/dist/icons/logo-mark.mjs +35 -0
  95. package/dist/icons/logo-tagline.js +137 -0
  96. package/dist/icons/logo-tagline.mjs +117 -0
  97. package/dist/icons/map-pin.js +60 -0
  98. package/dist/icons/map-pin.mjs +40 -0
  99. package/dist/icons/menu.js +48 -0
  100. package/dist/icons/menu.mjs +28 -0
  101. package/dist/icons/minus.js +48 -0
  102. package/dist/icons/minus.mjs +6 -0
  103. package/dist/icons/muted.js +48 -0
  104. package/dist/icons/muted.mjs +28 -0
  105. package/dist/icons/pause.js +48 -0
  106. package/dist/icons/pause.mjs +28 -0
  107. package/dist/icons/pencil.js +48 -0
  108. package/dist/icons/pencil.mjs +28 -0
  109. package/dist/icons/play.js +48 -0
  110. package/dist/icons/play.mjs +28 -0
  111. package/dist/icons/plus.js +48 -0
  112. package/dist/icons/plus.mjs +6 -0
  113. package/dist/icons/powered-by.js +45 -0
  114. package/dist/icons/powered-by.mjs +25 -0
  115. package/dist/icons/qr-code.js +60 -0
  116. package/dist/icons/qr-code.mjs +40 -0
  117. package/dist/icons/queue.js +48 -0
  118. package/dist/icons/queue.mjs +28 -0
  119. package/dist/icons/refresh.js +48 -0
  120. package/dist/icons/refresh.mjs +28 -0
  121. package/dist/icons/refund.js +48 -0
  122. package/dist/icons/refund.mjs +28 -0
  123. package/dist/icons/rocket.js +48 -0
  124. package/dist/icons/rocket.mjs +28 -0
  125. package/dist/icons/search.js +48 -0
  126. package/dist/icons/search.mjs +28 -0
  127. package/dist/icons/share.js +48 -0
  128. package/dist/icons/share.mjs +28 -0
  129. package/dist/icons/shop.js +46 -0
  130. package/dist/icons/shop.mjs +26 -0
  131. package/dist/icons/sparkles.js +48 -0
  132. package/dist/icons/sparkles.mjs +28 -0
  133. package/dist/icons/star.js +48 -0
  134. package/dist/icons/star.mjs +28 -0
  135. package/dist/icons/switch.js +48 -0
  136. package/dist/icons/switch.mjs +28 -0
  137. package/dist/icons/times.js +48 -0
  138. package/dist/icons/times.mjs +28 -0
  139. package/dist/icons/trash.js +48 -0
  140. package/dist/icons/trash.mjs +28 -0
  141. package/dist/icons/underline.js +48 -0
  142. package/dist/icons/underline.mjs +28 -0
  143. package/dist/icons/upload.js +48 -0
  144. package/dist/icons/upload.mjs +28 -0
  145. package/dist/icons/volume.js +48 -0
  146. package/dist/icons/volume.mjs +28 -0
  147. package/dist/icons/warning.js +48 -0
  148. package/dist/icons/warning.mjs +6 -0
  149. package/dist/input-checkbox.js +130 -0
  150. package/dist/input-checkbox.mjs +71 -0
  151. package/dist/input-group.js +156 -0
  152. package/dist/input-group.mjs +7 -0
  153. package/dist/input-number.js +211 -0
  154. package/dist/input-number.mjs +136 -0
  155. package/dist/input-select.js +150 -0
  156. package/dist/input-select.mjs +9 -0
  157. package/dist/input-text.js +65 -0
  158. package/dist/input-text.mjs +36 -0
  159. package/dist/input-textarea.js +69 -0
  160. package/dist/input-textarea.mjs +40 -0
  161. package/dist/product.js +864 -0
  162. package/dist/product.mjs +14 -0
  163. package/dist/styles.js +127 -0
  164. package/dist/styles.mjs +28 -0
  165. package/dist/video.js +177 -0
  166. package/dist/video.mjs +107 -0
  167. package/dist/wrapper-gradient.js +232 -0
  168. package/dist/wrapper-gradient.mjs +9 -0
  169. package/package.json +312 -2
  170. package/types/advertisement.d.ts +35 -0
  171. package/types/embla.d.ts +2 -0
  172. package/types/icons/arrow-down-tray.d.ts +5 -0
  173. package/types/icons/arrow-left.d.ts +5 -0
  174. package/types/icons/arrow-right.d.ts +5 -0
  175. package/types/icons/arrow-up-tray.d.ts +5 -0
  176. package/types/icons/bars-arrow-down.d.ts +5 -0
  177. package/types/icons/bars-arrow-up.d.ts +5 -0
  178. package/types/icons/bold.d.ts +5 -0
  179. package/types/icons/bolt.d.ts +5 -0
  180. package/types/icons/calendar.d.ts +5 -0
  181. package/types/icons/cancel.d.ts +5 -0
  182. package/types/icons/card.d.ts +5 -0
  183. package/types/icons/chart.d.ts +5 -0
  184. package/types/icons/check.d.ts +5 -0
  185. package/types/icons/chevron-down.d.ts +5 -0
  186. package/types/icons/chevron-left.d.ts +5 -0
  187. package/types/icons/chevron-right.d.ts +5 -0
  188. package/types/icons/chevron-up-down.d.ts +5 -0
  189. package/types/icons/chevron-up.d.ts +5 -0
  190. package/types/icons/clock.d.ts +5 -0
  191. package/types/icons/code-bracket.d.ts +5 -0
  192. package/types/icons/cog.d.ts +5 -0
  193. package/types/icons/copy.d.ts +5 -0
  194. package/types/icons/document.d.ts +5 -0
  195. package/types/icons/download.d.ts +5 -0
  196. package/types/icons/drag.d.ts +5 -0
  197. package/types/icons/ellipsis.d.ts +5 -0
  198. package/types/icons/email.d.ts +5 -0
  199. package/types/icons/external.d.ts +5 -0
  200. package/types/icons/filter.d.ts +5 -0
  201. package/types/icons/flag.d.ts +5 -0
  202. package/types/icons/google.d.ts +5 -0
  203. package/types/icons/home.d.ts +5 -0
  204. package/types/icons/image.d.ts +5 -0
  205. package/types/icons/italic.d.ts +5 -0
  206. package/types/icons/link.d.ts +5 -0
  207. package/types/icons/loader.d.ts +5 -0
  208. package/types/icons/lock.d.ts +5 -0
  209. package/types/icons/logo-mark.d.ts +5 -0
  210. package/types/icons/logo-tagline.d.ts +5 -0
  211. package/types/icons/map-pin.d.ts +5 -0
  212. package/types/icons/menu.d.ts +5 -0
  213. package/types/icons/minus.d.ts +5 -0
  214. package/types/icons/muted.d.ts +5 -0
  215. package/types/icons/pause.d.ts +5 -0
  216. package/types/icons/pencil.d.ts +5 -0
  217. package/types/icons/play.d.ts +5 -0
  218. package/types/icons/plus.d.ts +5 -0
  219. package/types/icons/powered-by.d.ts +5 -0
  220. package/types/icons/qr-code.d.ts +5 -0
  221. package/types/icons/queue.d.ts +5 -0
  222. package/types/icons/refresh.d.ts +5 -0
  223. package/types/icons/refund.d.ts +5 -0
  224. package/types/icons/rocket.d.ts +5 -0
  225. package/types/icons/search.d.ts +5 -0
  226. package/types/icons/share.d.ts +5 -0
  227. package/types/icons/shop.d.ts +5 -0
  228. package/types/icons/sparkles.d.ts +5 -0
  229. package/types/icons/star.d.ts +5 -0
  230. package/types/icons/switch.d.ts +5 -0
  231. package/types/icons/times.d.ts +5 -0
  232. package/types/icons/trash.d.ts +5 -0
  233. package/types/icons/underline.d.ts +5 -0
  234. package/types/icons/upload.d.ts +5 -0
  235. package/types/icons/volume.d.ts +5 -0
  236. package/types/icons/warning.d.ts +5 -0
  237. package/types/input-checkbox.d.ts +14 -0
  238. package/types/input-group.d.ts +15 -0
  239. package/types/input-number.d.ts +17 -0
  240. package/types/input-select.d.ts +19 -0
  241. package/types/input-text.d.ts +12 -0
  242. package/types/input-textarea.d.ts +13 -0
  243. package/types/product.d.ts +20 -0
  244. package/types/styles.d.ts +37 -0
  245. package/types/video.d.ts +20 -0
  246. package/types/wrapper-gradient.d.ts +17 -0
@@ -0,0 +1,14 @@
1
+ "use client";
2
+ import {
3
+ product_default
4
+ } from "./chunk-HDOA3Y3U.mjs";
5
+ import "./chunk-2ZYGRSSA.mjs";
6
+ import "./chunk-XWELEL6Z.mjs";
7
+ import "./chunk-7ZLMDYBR.mjs";
8
+ import "./chunk-Q3UIVGPQ.mjs";
9
+ import "./chunk-BD3TDNJE.mjs";
10
+ import "./chunk-FYA7EAMR.mjs";
11
+ import "./chunk-FJXG3REN.mjs";
12
+ export {
13
+ product_default as default
14
+ };
package/dist/styles.js ADDED
@@ -0,0 +1,127 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // components/styles.js
20
+ var styles_exports = {};
21
+ __export(styles_exports, {
22
+ backgroundStyle: () => backgroundStyle,
23
+ borderStyle: () => borderStyle,
24
+ buttonStyle: () => buttonStyle,
25
+ closeStyle: () => closeStyle,
26
+ headerStyle: () => headerStyle,
27
+ inputCheckboxStyle: () => inputCheckboxStyle,
28
+ inputNameStyle: () => inputNameStyle,
29
+ inputPhoneStyle: () => inputPhoneStyle,
30
+ inputStyle: () => inputStyle,
31
+ menuStyle: () => menuStyle,
32
+ selectStyle: () => selectStyle,
33
+ textStyle: () => textStyle
34
+ });
35
+ module.exports = __toCommonJS(styles_exports);
36
+ var backgroundStyle = (style) => {
37
+ var _a, _b, _c, _d;
38
+ return {
39
+ backgroundColor: (_b = (_a = style == null ? void 0 : style.background) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb,
40
+ color: (_d = (_c = style == null ? void 0 : style.text) == null ? void 0 : _c.color) == null ? void 0 : _d.rgb
41
+ };
42
+ };
43
+ var borderStyle = (style) => {
44
+ var _a, _b;
45
+ return {
46
+ borderColor: (_b = (_a = style == null ? void 0 : style.text) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb
47
+ };
48
+ };
49
+ var buttonStyle = (style) => {
50
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
51
+ return {
52
+ backgroundColor: ((_c = (_b = (_a = style == null ? void 0 : style.button) == null ? void 0 : _a.background) == null ? void 0 : _b.color) == null ? void 0 : _c.rgb) || ((_e = (_d = style == null ? void 0 : style.text) == null ? void 0 : _d.color) == null ? void 0 : _e.rgb),
53
+ borderColor: ((_h = (_g = (_f = style == null ? void 0 : style.button) == null ? void 0 : _f.background) == null ? void 0 : _g.color) == null ? void 0 : _h.rgb) || ((_j = (_i = style == null ? void 0 : style.text) == null ? void 0 : _i.color) == null ? void 0 : _j.rgb),
54
+ borderRadius: ((_k = style == null ? void 0 : style.button) == null ? void 0 : _k.radius) != null ? style.button.radius / 4 + "px" : void 0,
55
+ color: ((_n = (_m = (_l = style == null ? void 0 : style.button) == null ? void 0 : _l.text) == null ? void 0 : _m.color) == null ? void 0 : _n.rgb) || ((_p = (_o = style == null ? void 0 : style.background) == null ? void 0 : _o.color) == null ? void 0 : _p.rgb)
56
+ };
57
+ };
58
+ var closeStyle = (style) => {
59
+ var _a, _b, _c, _d;
60
+ return {
61
+ backgroundColor: (_b = (_a = style == null ? void 0 : style.text) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb,
62
+ color: (_d = (_c = style == null ? void 0 : style.background) == null ? void 0 : _c.color) == null ? void 0 : _d.rgb
63
+ };
64
+ };
65
+ var headerStyle = (style) => {
66
+ var _a, _b, _c;
67
+ return {
68
+ fontFamily: (_a = style == null ? void 0 : style.heading) == null ? void 0 : _a.family,
69
+ fontWeight: (_b = style == null ? void 0 : style.heading) == null ? void 0 : _b.weight,
70
+ textTransform: (_c = style == null ? void 0 : style.heading) == null ? void 0 : _c.transform
71
+ };
72
+ };
73
+ var inputStyle = (style) => {
74
+ var _a, _b, _c, _d, _e, _f, _g;
75
+ return {
76
+ backgroundColor: (_b = (_a = style == null ? void 0 : style.background) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb,
77
+ borderColor: (_d = (_c = style == null ? void 0 : style.text) == null ? void 0 : _c.color) == null ? void 0 : _d.rgb,
78
+ borderRadius: ((_e = style == null ? void 0 : style.input) == null ? void 0 : _e.radius) != null ? style.input.radius / 4 + "px" : void 0,
79
+ color: (_g = (_f = style == null ? void 0 : style.text) == null ? void 0 : _f.color) == null ? void 0 : _g.rgb
80
+ };
81
+ };
82
+ var inputCheckboxStyle = (style) => {
83
+ var _a;
84
+ return {
85
+ ...inputStyle(style),
86
+ borderRadius: ((_a = style == null ? void 0 : style.input) == null ? void 0 : _a.radius) != null ? Math.min(style.input.radius / 4, 6) + "px" : void 0
87
+ };
88
+ };
89
+ var inputNameStyle = (style) => inputStyle(style);
90
+ var inputPhoneStyle = (style) => inputStyle(style);
91
+ var menuStyle = (style) => {
92
+ var _a, _b, _c, _d, _e, _f;
93
+ return {
94
+ backgroundColor: (_b = (_a = style == null ? void 0 : style.background) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb,
95
+ borderColor: (_d = (_c = style == null ? void 0 : style.text) == null ? void 0 : _c.color) == null ? void 0 : _d.rgb,
96
+ color: (_f = (_e = style == null ? void 0 : style.text) == null ? void 0 : _e.color) == null ? void 0 : _f.rgb
97
+ };
98
+ };
99
+ var selectStyle = (style) => {
100
+ var _a, _b, _c, _d, _e, _f;
101
+ return {
102
+ borderColor: (_c = (_b = (_a = style == null ? void 0 : style.text) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb) == null ? void 0 : _c.replace(")", ", 0.3)"),
103
+ borderRadius: ((_d = style == null ? void 0 : style.input) == null ? void 0 : _d.radius) != null ? style.input.radius / 4 + "px" : void 0,
104
+ color: (_f = (_e = style == null ? void 0 : style.text) == null ? void 0 : _e.color) == null ? void 0 : _f.rgb
105
+ };
106
+ };
107
+ var textStyle = (style) => {
108
+ var _a, _b;
109
+ return {
110
+ color: (_b = (_a = style == null ? void 0 : style.text) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb
111
+ };
112
+ };
113
+ // Annotate the CommonJS export names for ESM import in node:
114
+ 0 && (module.exports = {
115
+ backgroundStyle,
116
+ borderStyle,
117
+ buttonStyle,
118
+ closeStyle,
119
+ headerStyle,
120
+ inputCheckboxStyle,
121
+ inputNameStyle,
122
+ inputPhoneStyle,
123
+ inputStyle,
124
+ menuStyle,
125
+ selectStyle,
126
+ textStyle
127
+ });
@@ -0,0 +1,28 @@
1
+ import {
2
+ backgroundStyle,
3
+ borderStyle,
4
+ buttonStyle,
5
+ closeStyle,
6
+ headerStyle,
7
+ inputCheckboxStyle,
8
+ inputNameStyle,
9
+ inputPhoneStyle,
10
+ inputStyle,
11
+ menuStyle,
12
+ selectStyle,
13
+ textStyle
14
+ } from "./chunk-FJXG3REN.mjs";
15
+ export {
16
+ backgroundStyle,
17
+ borderStyle,
18
+ buttonStyle,
19
+ closeStyle,
20
+ headerStyle,
21
+ inputCheckboxStyle,
22
+ inputNameStyle,
23
+ inputPhoneStyle,
24
+ inputStyle,
25
+ menuStyle,
26
+ selectStyle,
27
+ textStyle
28
+ };
package/dist/video.js ADDED
@@ -0,0 +1,177 @@
1
+ "use client";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // components/video.js
31
+ var video_exports = {};
32
+ __export(video_exports, {
33
+ default: () => video_default
34
+ });
35
+ module.exports = __toCommonJS(video_exports);
36
+ var import_dynamic = __toESM(require("next/dynamic"));
37
+ var import_react = require("react");
38
+
39
+ // components/icons/loader.js
40
+ var import_jsx_runtime = require("react/jsx-runtime");
41
+ var Loader = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
42
+ "svg",
43
+ {
44
+ ...{
45
+ fill: "none",
46
+ stroke: "none",
47
+ strokeWidth: 0,
48
+ viewBox: "0 0 24 24",
49
+ className: ["animate-spin", className].filter(Boolean).join(" "),
50
+ ...props
51
+ },
52
+ children: [
53
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
54
+ "circle",
55
+ {
56
+ ...{
57
+ className: "opacity-25",
58
+ cx: 12,
59
+ cy: 12,
60
+ r: 10,
61
+ stroke: "currentColor",
62
+ strokeWidth: 4
63
+ }
64
+ }
65
+ ),
66
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
67
+ "path",
68
+ {
69
+ ...{
70
+ className: "opacity-75",
71
+ fill: "currentColor",
72
+ d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
73
+ }
74
+ }
75
+ )
76
+ ]
77
+ }
78
+ );
79
+ var loader_default = Loader;
80
+
81
+ // components/video.js
82
+ var import_jsx_runtime2 = require("react/jsx-runtime");
83
+ var ReactPlayer = (0, import_dynamic.default)(
84
+ () => import("react-player/lazy"),
85
+ {
86
+ ssr: false
87
+ }
88
+ );
89
+ var Video = ({
90
+ controls = false,
91
+ loop = false,
92
+ onEnded = () => {
93
+ },
94
+ onDuration = () => {
95
+ },
96
+ muted = true,
97
+ onPlay,
98
+ playing = false,
99
+ poster,
100
+ reset = false,
101
+ style = {},
102
+ hls,
103
+ mp4
104
+ }) => {
105
+ var _a, _b;
106
+ const durationFired = (0, import_react.useRef)(false);
107
+ const [player, setPlayer] = (0, import_react.useState)();
108
+ const [videoUrl, setVideoUrl] = (0, import_react.useState)(hls ? hls : mp4);
109
+ (0, import_react.useEffect)(
110
+ () => {
111
+ if (player && reset) {
112
+ player.seekTo(0, "seconds");
113
+ }
114
+ },
115
+ [player, reset]
116
+ );
117
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react.Fragment, { children: [
118
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
119
+ ReactPlayer,
120
+ {
121
+ ...{
122
+ className: "relative react-video",
123
+ controls,
124
+ config: {
125
+ file: {
126
+ attributes: {
127
+ "aria-label": "Decorative Video",
128
+ poster
129
+ }
130
+ }
131
+ },
132
+ height: "100%",
133
+ loop,
134
+ muted,
135
+ onPlay,
136
+ onEnded,
137
+ onDuration: (value) => {
138
+ if (!durationFired.current) {
139
+ durationFired.current = true;
140
+ onDuration(value);
141
+ }
142
+ },
143
+ onError: () => {
144
+ setVideoUrl(mp4);
145
+ },
146
+ onReady: (instance) => {
147
+ setPlayer(instance.player);
148
+ },
149
+ playing: Boolean(playing),
150
+ playsinline: true,
151
+ url: videoUrl,
152
+ width: "100%"
153
+ }
154
+ }
155
+ ),
156
+ !player && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
157
+ "div",
158
+ {
159
+ ...{
160
+ className: "w-full h-full flex justify-center items-center"
161
+ },
162
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
163
+ loader_default,
164
+ {
165
+ ...{
166
+ className: "w-10 h-10 animate-spin",
167
+ style: {
168
+ color: (_b = (_a = style == null ? void 0 : style.background) == null ? void 0 : _a.color) == null ? void 0 : _b.hex
169
+ }
170
+ }
171
+ }
172
+ )
173
+ }
174
+ )
175
+ ] });
176
+ };
177
+ var video_default = Video;
package/dist/video.mjs ADDED
@@ -0,0 +1,107 @@
1
+ "use client";
2
+ import {
3
+ loader_default
4
+ } from "./chunk-2ZYGRSSA.mjs";
5
+
6
+ // components/video.js
7
+ import dynamic from "next/dynamic";
8
+ import { Fragment, useEffect, useRef, useState } from "react";
9
+ import { jsx, jsxs } from "react/jsx-runtime";
10
+ var ReactPlayer = dynamic(
11
+ () => import("react-player/lazy"),
12
+ {
13
+ ssr: false
14
+ }
15
+ );
16
+ var Video = ({
17
+ controls = false,
18
+ loop = false,
19
+ onEnded = () => {
20
+ },
21
+ onDuration = () => {
22
+ },
23
+ muted = true,
24
+ onPlay,
25
+ playing = false,
26
+ poster,
27
+ reset = false,
28
+ style = {},
29
+ hls,
30
+ mp4
31
+ }) => {
32
+ var _a, _b;
33
+ const durationFired = useRef(false);
34
+ const [player, setPlayer] = useState();
35
+ const [videoUrl, setVideoUrl] = useState(hls ? hls : mp4);
36
+ useEffect(
37
+ () => {
38
+ if (player && reset) {
39
+ player.seekTo(0, "seconds");
40
+ }
41
+ },
42
+ [player, reset]
43
+ );
44
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
45
+ /* @__PURE__ */ jsx(
46
+ ReactPlayer,
47
+ {
48
+ ...{
49
+ className: "relative react-video",
50
+ controls,
51
+ config: {
52
+ file: {
53
+ attributes: {
54
+ "aria-label": "Decorative Video",
55
+ poster
56
+ }
57
+ }
58
+ },
59
+ height: "100%",
60
+ loop,
61
+ muted,
62
+ onPlay,
63
+ onEnded,
64
+ onDuration: (value) => {
65
+ if (!durationFired.current) {
66
+ durationFired.current = true;
67
+ onDuration(value);
68
+ }
69
+ },
70
+ onError: () => {
71
+ setVideoUrl(mp4);
72
+ },
73
+ onReady: (instance) => {
74
+ setPlayer(instance.player);
75
+ },
76
+ playing: Boolean(playing),
77
+ playsinline: true,
78
+ url: videoUrl,
79
+ width: "100%"
80
+ }
81
+ }
82
+ ),
83
+ !player && /* @__PURE__ */ jsx(
84
+ "div",
85
+ {
86
+ ...{
87
+ className: "w-full h-full flex justify-center items-center"
88
+ },
89
+ children: /* @__PURE__ */ jsx(
90
+ loader_default,
91
+ {
92
+ ...{
93
+ className: "w-10 h-10 animate-spin",
94
+ style: {
95
+ color: (_b = (_a = style == null ? void 0 : style.background) == null ? void 0 : _a.color) == null ? void 0 : _b.hex
96
+ }
97
+ }
98
+ }
99
+ )
100
+ }
101
+ )
102
+ ] });
103
+ };
104
+ var video_default = Video;
105
+ export {
106
+ video_default as default
107
+ };
@@ -0,0 +1,232 @@
1
+ "use client";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // components/wrapper-gradient.js
21
+ var wrapper_gradient_exports = {};
22
+ __export(wrapper_gradient_exports, {
23
+ default: () => wrapper_gradient_default,
24
+ useWrapperGradient: () => useWrapperGradient
25
+ });
26
+ module.exports = __toCommonJS(wrapper_gradient_exports);
27
+ var import_react = require("react");
28
+ var import_jsx_runtime = require("react/jsx-runtime");
29
+ var WrapperGradientContext = (0, import_react.createContext)(null);
30
+ var useWrapperGradient = () => (0, import_react.useContext)(WrapperGradientContext);
31
+ var WrapperGradient = ({
32
+ children,
33
+ className,
34
+ classNameGradient,
35
+ classNameScroll,
36
+ color,
37
+ gradientTopOffset,
38
+ horizontal = false
39
+ }) => {
40
+ const showX = horizontal === true || horizontal === "both";
41
+ const showY = horizontal === false || horizontal === "both";
42
+ const overflowClass = horizontal === "both" ? "overflow-scroll" : horizontal ? "overflow-x-scroll overflow-y-visible" : "overflow-y-scroll overflow-x-visible";
43
+ const overscrollClass = horizontal === "both" ? "overscroll-none" : horizontal ? "overscroll-x-none overscroll-y-auto" : "overscroll-y-none overscroll-x-auto";
44
+ const themed = Boolean(color);
45
+ const gradientDefaults = "absolute z-[2] " + (themed ? "pointer-events-none " : "") + "transition-all duration-[100ms] ";
46
+ const classes = {
47
+ container: [
48
+ themed ? "relative" : "w-full relative",
49
+ ...className ? [className] : []
50
+ ],
51
+ inner: [
52
+ "w-full relative scroll-smooth hide-scrollbar",
53
+ overscrollClass,
54
+ overflowClass,
55
+ ...classNameScroll ? [classNameScroll] : []
56
+ ],
57
+ topGradient: [
58
+ gradientDefaults,
59
+ "w-full -top-[1px]",
60
+ ...themed ? [] : ["bg-gradient-to-b"],
61
+ ...classNameGradient ? [classNameGradient] : themed ? ["h-10"] : ["from-white to-transparent h-10"]
62
+ ],
63
+ bottomGradient: [
64
+ gradientDefaults,
65
+ "w-full -bottom-[1px]",
66
+ ...themed ? [] : ["bg-gradient-to-t"],
67
+ ...classNameGradient ? [classNameGradient] : themed ? ["h-10"] : ["from-white to-transparent h-10"]
68
+ ],
69
+ leftGradient: [
70
+ gradientDefaults,
71
+ "h-full top-0 left-0",
72
+ ...themed ? [] : ["bg-gradient-to-r"],
73
+ ...classNameGradient ? [classNameGradient] : themed ? ["w-4"] : ["from-white from-30% to-transparent w-4"]
74
+ ],
75
+ rightGradient: [
76
+ gradientDefaults,
77
+ "h-full top-0 right-0",
78
+ ...themed ? [] : ["bg-gradient-to-l"],
79
+ ...classNameGradient ? [classNameGradient] : themed ? ["w-4"] : ["from-white from-30% to-transparent w-4"]
80
+ ]
81
+ };
82
+ const gradients = {
83
+ top: "linear-gradient( to bottom, " + color + " 0%, transparent 100% )",
84
+ bottom: "linear-gradient( to top, " + color + " 0%, transparent 100% )",
85
+ left: "linear-gradient( to right, " + color + " 0%, transparent 100% )",
86
+ right: "linear-gradient( to left, " + color + " 0%, transparent 100% )"
87
+ };
88
+ const containerRef = (0, import_react.useRef)(null);
89
+ const [scroll, setScroll] = (0, import_react.useState)({
90
+ top: 0,
91
+ left: 0,
92
+ atBottom: true,
93
+ atRight: true
94
+ });
95
+ (0, import_react.useEffect)(
96
+ () => {
97
+ const container = containerRef.current;
98
+ const handleScroll = () => {
99
+ const { scrollTop, scrollLeft, scrollHeight, scrollWidth, clientHeight, clientWidth } = container;
100
+ setScroll({
101
+ top: scrollTop,
102
+ left: scrollLeft,
103
+ atBottom: scrollTop + clientHeight >= scrollHeight - 1,
104
+ atRight: scrollLeft + clientWidth >= scrollWidth - 1
105
+ });
106
+ };
107
+ const handleUpdate = () => {
108
+ const { scrollHeight, scrollWidth, clientHeight, clientWidth } = container;
109
+ if (scrollHeight <= clientHeight && scrollWidth <= clientWidth) {
110
+ setScroll({
111
+ top: 0,
112
+ left: 0,
113
+ atBottom: true,
114
+ atRight: true
115
+ });
116
+ return;
117
+ }
118
+ ;
119
+ handleScroll();
120
+ };
121
+ handleUpdate();
122
+ container.addEventListener("scroll", handleScroll);
123
+ const observer = new MutationObserver((mutations) => {
124
+ for (const mutation of mutations) {
125
+ if (mutation.type === "childList" && mutation.addedNodes.length > 0) {
126
+ handleUpdate();
127
+ break;
128
+ }
129
+ }
130
+ });
131
+ observer.observe(container, {
132
+ childList: true,
133
+ subtree: true
134
+ });
135
+ const resizeObserver = new ResizeObserver(handleUpdate);
136
+ resizeObserver.observe(container);
137
+ return () => {
138
+ container.removeEventListener("scroll", handleScroll);
139
+ observer.disconnect();
140
+ resizeObserver.disconnect();
141
+ };
142
+ },
143
+ [horizontal]
144
+ );
145
+ const contextValue = (0, import_react.useMemo)(
146
+ () => ({
147
+ atBottom: scroll.atBottom,
148
+ atRight: scroll.atRight
149
+ }),
150
+ [scroll.atBottom, scroll.atRight]
151
+ );
152
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
153
+ "div",
154
+ {
155
+ ...{
156
+ className: classes.container.join(" ")
157
+ },
158
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(WrapperGradientContext.Provider, { value: contextValue, children: [
159
+ showY && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
160
+ "div",
161
+ {
162
+ ...{
163
+ className: classes.topGradient.join(" ") + (scroll.top > 5 ? " opacity-100 visible" : " opacity-0 invisible"),
164
+ style: {
165
+ ...themed && {
166
+ backgroundImage: gradients.top
167
+ },
168
+ ...gradientTopOffset && {
169
+ top: gradientTopOffset
170
+ }
171
+ }
172
+ }
173
+ }
174
+ ),
175
+ showX && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
176
+ "div",
177
+ {
178
+ ...{
179
+ className: classes.leftGradient.join(" ") + (scroll.left > 5 ? " opacity-100 visible" : " opacity-0 invisible"),
180
+ style: {
181
+ ...themed && {
182
+ backgroundImage: gradients.left
183
+ }
184
+ }
185
+ }
186
+ }
187
+ ),
188
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
189
+ "div",
190
+ {
191
+ ...{
192
+ className: classes.inner.join(" "),
193
+ ref: containerRef
194
+ },
195
+ children
196
+ }
197
+ ),
198
+ showY && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
199
+ "div",
200
+ {
201
+ ...{
202
+ className: classes.bottomGradient.join(" ") + (!scroll.atBottom ? " opacity-100 visible" : " opacity-0 invisible"),
203
+ style: {
204
+ ...themed && {
205
+ backgroundImage: gradients.bottom
206
+ }
207
+ }
208
+ }
209
+ }
210
+ ),
211
+ showX && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
212
+ "div",
213
+ {
214
+ ...{
215
+ className: classes.rightGradient.join(" ") + (!scroll.atRight ? " opacity-100 visible" : " opacity-0 invisible"),
216
+ style: {
217
+ ...themed && {
218
+ backgroundImage: gradients.right
219
+ }
220
+ }
221
+ }
222
+ }
223
+ )
224
+ ] })
225
+ }
226
+ );
227
+ };
228
+ var wrapper_gradient_default = WrapperGradient;
229
+ // Annotate the CommonJS export names for ESM import in node:
230
+ 0 && (module.exports = {
231
+ useWrapperGradient
232
+ });
@@ -0,0 +1,9 @@
1
+ "use client";
2
+ import {
3
+ useWrapperGradient,
4
+ wrapper_gradient_default
5
+ } from "./chunk-XWELEL6Z.mjs";
6
+ export {
7
+ wrapper_gradient_default as default,
8
+ useWrapperGradient
9
+ };