@drawbridge/components 0.0.39 → 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 (245) hide show
  1. package/dist/advertisement.js +1299 -0
  2. package/dist/advertisement.mjs +95 -0
  3. package/dist/card-advertisement.mjs +3 -354
  4. package/dist/chunk-2ZYGRSSA.mjs +45 -0
  5. package/dist/chunk-7ZLMDYBR.mjs +113 -0
  6. package/dist/chunk-BD3TDNJE.mjs +98 -0
  7. package/dist/chunk-FJXG3REN.mjs +93 -0
  8. package/dist/chunk-FYA7EAMR.mjs +29 -0
  9. package/dist/chunk-GFDZ7ER6.mjs +29 -0
  10. package/dist/chunk-HDOA3Y3U.mjs +334 -0
  11. package/dist/chunk-HH7WF5BT.mjs +29 -0
  12. package/dist/chunk-Q3UIVGPQ.mjs +29 -0
  13. package/dist/chunk-T5QQBFM3.mjs +29 -0
  14. package/dist/chunk-TJNIR4PF.mjs +358 -0
  15. package/dist/chunk-XWELEL6Z.mjs +208 -0
  16. package/dist/embla.js +41 -0
  17. package/dist/embla.mjs +6 -0
  18. package/dist/icons/arrow-down-tray.js +48 -0
  19. package/dist/icons/arrow-down-tray.mjs +28 -0
  20. package/dist/icons/arrow-left.js +48 -0
  21. package/dist/icons/arrow-left.mjs +28 -0
  22. package/dist/icons/arrow-right.js +48 -0
  23. package/dist/icons/arrow-right.mjs +28 -0
  24. package/dist/icons/arrow-up-tray.js +48 -0
  25. package/dist/icons/arrow-up-tray.mjs +28 -0
  26. package/dist/icons/bars-arrow-down.js +48 -0
  27. package/dist/icons/bars-arrow-down.mjs +28 -0
  28. package/dist/icons/bars-arrow-up.js +48 -0
  29. package/dist/icons/bars-arrow-up.mjs +28 -0
  30. package/dist/icons/bold.js +47 -0
  31. package/dist/icons/bold.mjs +27 -0
  32. package/dist/icons/bolt.js +48 -0
  33. package/dist/icons/bolt.mjs +28 -0
  34. package/dist/icons/calendar.js +48 -0
  35. package/dist/icons/calendar.mjs +28 -0
  36. package/dist/icons/cancel.js +48 -0
  37. package/dist/icons/cancel.mjs +28 -0
  38. package/dist/icons/card.js +48 -0
  39. package/dist/icons/card.mjs +28 -0
  40. package/dist/icons/chart.js +48 -0
  41. package/dist/icons/chart.mjs +28 -0
  42. package/dist/icons/check.js +48 -0
  43. package/dist/icons/check.mjs +6 -0
  44. package/dist/icons/chevron-down.js +48 -0
  45. package/dist/icons/chevron-down.mjs +6 -0
  46. package/dist/icons/chevron-left.js +48 -0
  47. package/dist/icons/chevron-left.mjs +28 -0
  48. package/dist/icons/chevron-right.js +48 -0
  49. package/dist/icons/chevron-right.mjs +28 -0
  50. package/dist/icons/chevron-up-down.js +48 -0
  51. package/dist/icons/chevron-up-down.mjs +28 -0
  52. package/dist/icons/chevron-up.js +48 -0
  53. package/dist/icons/chevron-up.mjs +28 -0
  54. package/dist/icons/clock.js +48 -0
  55. package/dist/icons/clock.mjs +28 -0
  56. package/dist/icons/code-bracket.js +48 -0
  57. package/dist/icons/code-bracket.mjs +28 -0
  58. package/dist/icons/cog.js +60 -0
  59. package/dist/icons/cog.mjs +40 -0
  60. package/dist/icons/copy.js +48 -0
  61. package/dist/icons/copy.mjs +28 -0
  62. package/dist/icons/document.js +48 -0
  63. package/dist/icons/document.mjs +28 -0
  64. package/dist/icons/download.js +48 -0
  65. package/dist/icons/download.mjs +28 -0
  66. package/dist/icons/drag.js +51 -0
  67. package/dist/icons/drag.mjs +31 -0
  68. package/dist/icons/ellipsis.js +48 -0
  69. package/dist/icons/ellipsis.mjs +28 -0
  70. package/dist/icons/email.js +48 -0
  71. package/dist/icons/email.mjs +28 -0
  72. package/dist/icons/external.js +48 -0
  73. package/dist/icons/external.mjs +28 -0
  74. package/dist/icons/filter.js +48 -0
  75. package/dist/icons/filter.mjs +28 -0
  76. package/dist/icons/flag.js +48 -0
  77. package/dist/icons/flag.mjs +28 -0
  78. package/dist/icons/google.js +74 -0
  79. package/dist/icons/google.mjs +54 -0
  80. package/dist/icons/home.js +48 -0
  81. package/dist/icons/home.mjs +28 -0
  82. package/dist/icons/image.js +48 -0
  83. package/dist/icons/image.mjs +28 -0
  84. package/dist/icons/italic.js +48 -0
  85. package/dist/icons/italic.mjs +28 -0
  86. package/dist/icons/link.js +48 -0
  87. package/dist/icons/link.mjs +28 -0
  88. package/dist/icons/loader.js +64 -0
  89. package/dist/icons/loader.mjs +6 -0
  90. package/dist/icons/lock.js +48 -0
  91. package/dist/icons/lock.mjs +28 -0
  92. package/dist/icons/logo-mark.js +55 -0
  93. package/dist/icons/logo-mark.mjs +35 -0
  94. package/dist/icons/logo-tagline.js +137 -0
  95. package/dist/icons/logo-tagline.mjs +117 -0
  96. package/dist/icons/map-pin.js +60 -0
  97. package/dist/icons/map-pin.mjs +40 -0
  98. package/dist/icons/menu.js +48 -0
  99. package/dist/icons/menu.mjs +28 -0
  100. package/dist/icons/minus.js +48 -0
  101. package/dist/icons/minus.mjs +6 -0
  102. package/dist/icons/muted.js +48 -0
  103. package/dist/icons/muted.mjs +28 -0
  104. package/dist/icons/pause.js +48 -0
  105. package/dist/icons/pause.mjs +28 -0
  106. package/dist/icons/pencil.js +48 -0
  107. package/dist/icons/pencil.mjs +28 -0
  108. package/dist/icons/play.js +48 -0
  109. package/dist/icons/play.mjs +28 -0
  110. package/dist/icons/plus.js +48 -0
  111. package/dist/icons/plus.mjs +6 -0
  112. package/dist/icons/powered-by.js +45 -0
  113. package/dist/icons/powered-by.mjs +25 -0
  114. package/dist/icons/qr-code.js +60 -0
  115. package/dist/icons/qr-code.mjs +40 -0
  116. package/dist/icons/queue.js +48 -0
  117. package/dist/icons/queue.mjs +28 -0
  118. package/dist/icons/refresh.js +48 -0
  119. package/dist/icons/refresh.mjs +28 -0
  120. package/dist/icons/refund.js +48 -0
  121. package/dist/icons/refund.mjs +28 -0
  122. package/dist/icons/rocket.js +48 -0
  123. package/dist/icons/rocket.mjs +28 -0
  124. package/dist/icons/search.js +48 -0
  125. package/dist/icons/search.mjs +28 -0
  126. package/dist/icons/share.js +48 -0
  127. package/dist/icons/share.mjs +28 -0
  128. package/dist/icons/shop.js +46 -0
  129. package/dist/icons/shop.mjs +26 -0
  130. package/dist/icons/sparkles.js +48 -0
  131. package/dist/icons/sparkles.mjs +28 -0
  132. package/dist/icons/star.js +48 -0
  133. package/dist/icons/star.mjs +28 -0
  134. package/dist/icons/switch.js +48 -0
  135. package/dist/icons/switch.mjs +28 -0
  136. package/dist/icons/times.js +48 -0
  137. package/dist/icons/times.mjs +28 -0
  138. package/dist/icons/trash.js +48 -0
  139. package/dist/icons/trash.mjs +28 -0
  140. package/dist/icons/underline.js +48 -0
  141. package/dist/icons/underline.mjs +28 -0
  142. package/dist/icons/upload.js +48 -0
  143. package/dist/icons/upload.mjs +28 -0
  144. package/dist/icons/volume.js +48 -0
  145. package/dist/icons/volume.mjs +28 -0
  146. package/dist/icons/warning.js +48 -0
  147. package/dist/icons/warning.mjs +6 -0
  148. package/dist/input-checkbox.js +130 -0
  149. package/dist/input-checkbox.mjs +71 -0
  150. package/dist/input-group.js +156 -0
  151. package/dist/input-group.mjs +7 -0
  152. package/dist/input-number.js +211 -0
  153. package/dist/input-number.mjs +136 -0
  154. package/dist/input-select.js +150 -0
  155. package/dist/input-select.mjs +9 -0
  156. package/dist/input-text.js +65 -0
  157. package/dist/input-text.mjs +36 -0
  158. package/dist/input-textarea.js +69 -0
  159. package/dist/input-textarea.mjs +40 -0
  160. package/dist/product.js +864 -0
  161. package/dist/product.mjs +14 -0
  162. package/dist/styles.js +127 -0
  163. package/dist/styles.mjs +28 -0
  164. package/dist/video.js +177 -0
  165. package/dist/video.mjs +107 -0
  166. package/dist/wrapper-gradient.js +232 -0
  167. package/dist/wrapper-gradient.mjs +9 -0
  168. package/package.json +312 -2
  169. package/types/advertisement.d.ts +35 -0
  170. package/types/embla.d.ts +2 -0
  171. package/types/icons/arrow-down-tray.d.ts +5 -0
  172. package/types/icons/arrow-left.d.ts +5 -0
  173. package/types/icons/arrow-right.d.ts +5 -0
  174. package/types/icons/arrow-up-tray.d.ts +5 -0
  175. package/types/icons/bars-arrow-down.d.ts +5 -0
  176. package/types/icons/bars-arrow-up.d.ts +5 -0
  177. package/types/icons/bold.d.ts +5 -0
  178. package/types/icons/bolt.d.ts +5 -0
  179. package/types/icons/calendar.d.ts +5 -0
  180. package/types/icons/cancel.d.ts +5 -0
  181. package/types/icons/card.d.ts +5 -0
  182. package/types/icons/chart.d.ts +5 -0
  183. package/types/icons/check.d.ts +5 -0
  184. package/types/icons/chevron-down.d.ts +5 -0
  185. package/types/icons/chevron-left.d.ts +5 -0
  186. package/types/icons/chevron-right.d.ts +5 -0
  187. package/types/icons/chevron-up-down.d.ts +5 -0
  188. package/types/icons/chevron-up.d.ts +5 -0
  189. package/types/icons/clock.d.ts +5 -0
  190. package/types/icons/code-bracket.d.ts +5 -0
  191. package/types/icons/cog.d.ts +5 -0
  192. package/types/icons/copy.d.ts +5 -0
  193. package/types/icons/document.d.ts +5 -0
  194. package/types/icons/download.d.ts +5 -0
  195. package/types/icons/drag.d.ts +5 -0
  196. package/types/icons/ellipsis.d.ts +5 -0
  197. package/types/icons/email.d.ts +5 -0
  198. package/types/icons/external.d.ts +5 -0
  199. package/types/icons/filter.d.ts +5 -0
  200. package/types/icons/flag.d.ts +5 -0
  201. package/types/icons/google.d.ts +5 -0
  202. package/types/icons/home.d.ts +5 -0
  203. package/types/icons/image.d.ts +5 -0
  204. package/types/icons/italic.d.ts +5 -0
  205. package/types/icons/link.d.ts +5 -0
  206. package/types/icons/loader.d.ts +5 -0
  207. package/types/icons/lock.d.ts +5 -0
  208. package/types/icons/logo-mark.d.ts +5 -0
  209. package/types/icons/logo-tagline.d.ts +5 -0
  210. package/types/icons/map-pin.d.ts +5 -0
  211. package/types/icons/menu.d.ts +5 -0
  212. package/types/icons/minus.d.ts +5 -0
  213. package/types/icons/muted.d.ts +5 -0
  214. package/types/icons/pause.d.ts +5 -0
  215. package/types/icons/pencil.d.ts +5 -0
  216. package/types/icons/play.d.ts +5 -0
  217. package/types/icons/plus.d.ts +5 -0
  218. package/types/icons/powered-by.d.ts +5 -0
  219. package/types/icons/qr-code.d.ts +5 -0
  220. package/types/icons/queue.d.ts +5 -0
  221. package/types/icons/refresh.d.ts +5 -0
  222. package/types/icons/refund.d.ts +5 -0
  223. package/types/icons/rocket.d.ts +5 -0
  224. package/types/icons/search.d.ts +5 -0
  225. package/types/icons/share.d.ts +5 -0
  226. package/types/icons/shop.d.ts +5 -0
  227. package/types/icons/sparkles.d.ts +5 -0
  228. package/types/icons/star.d.ts +5 -0
  229. package/types/icons/switch.d.ts +5 -0
  230. package/types/icons/times.d.ts +5 -0
  231. package/types/icons/trash.d.ts +5 -0
  232. package/types/icons/underline.d.ts +5 -0
  233. package/types/icons/upload.d.ts +5 -0
  234. package/types/icons/volume.d.ts +5 -0
  235. package/types/icons/warning.d.ts +5 -0
  236. package/types/input-checkbox.d.ts +14 -0
  237. package/types/input-group.d.ts +15 -0
  238. package/types/input-number.d.ts +17 -0
  239. package/types/input-select.d.ts +19 -0
  240. package/types/input-text.d.ts +12 -0
  241. package/types/input-textarea.d.ts +13 -0
  242. package/types/product.d.ts +20 -0
  243. package/types/styles.d.ts +37 -0
  244. package/types/video.d.ts +20 -0
  245. package/types/wrapper-gradient.d.ts +17 -0
@@ -0,0 +1,150 @@
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/input-select.js
21
+ var input_select_exports = {};
22
+ __export(input_select_exports, {
23
+ default: () => input_select_default
24
+ });
25
+ module.exports = __toCommonJS(input_select_exports);
26
+ var import_react = require("react");
27
+
28
+ // components/icons/chevron-down.js
29
+ var import_jsx_runtime = require("react/jsx-runtime");
30
+ var ChevronDown = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
31
+ "svg",
32
+ {
33
+ ...{
34
+ fill: "none",
35
+ stroke: "currentColor",
36
+ strokeWidth: 1.5,
37
+ viewBox: "0 0 24 24",
38
+ ...props
39
+ },
40
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
41
+ "path",
42
+ {
43
+ ...{
44
+ d: "m19.5 8.25-7.5 7.5-7.5-7.5",
45
+ strokeLinecap: "round",
46
+ strokeLinejoin: "round"
47
+ }
48
+ }
49
+ )
50
+ }
51
+ );
52
+ var chevron_down_default = ChevronDown;
53
+
54
+ // components/styles.js
55
+ var inputStyle = (style) => {
56
+ var _a, _b, _c, _d, _e, _f, _g;
57
+ return {
58
+ backgroundColor: (_b = (_a = style == null ? void 0 : style.background) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb,
59
+ borderColor: (_d = (_c = style == null ? void 0 : style.text) == null ? void 0 : _c.color) == null ? void 0 : _d.rgb,
60
+ borderRadius: ((_e = style == null ? void 0 : style.input) == null ? void 0 : _e.radius) != null ? style.input.radius / 4 + "px" : void 0,
61
+ color: (_g = (_f = style == null ? void 0 : style.text) == null ? void 0 : _f.color) == null ? void 0 : _g.rgb
62
+ };
63
+ };
64
+
65
+ // components/input-select.js
66
+ var import_jsx_runtime2 = require("react/jsx-runtime");
67
+ var InputSelect = ({
68
+ onChange,
69
+ options = [],
70
+ style,
71
+ value,
72
+ ...rest
73
+ }) => {
74
+ const [keyboard, setKeyboard] = (0, import_react.useState)(false);
75
+ (0, import_react.useEffect)(() => {
76
+ const down = (e) => {
77
+ if (e.key === "Tab") setKeyboard(true);
78
+ };
79
+ const click = () => setKeyboard(false);
80
+ window.addEventListener("keydown", down);
81
+ window.addEventListener("mousedown", click);
82
+ return () => {
83
+ window.removeEventListener("keydown", down);
84
+ window.removeEventListener("mousedown", click);
85
+ };
86
+ }, []);
87
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
88
+ "div",
89
+ {
90
+ ...{
91
+ className: "relative"
92
+ },
93
+ children: [
94
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
95
+ "select",
96
+ {
97
+ ...{
98
+ ...rest,
99
+ className: "input appearance-none " + (keyboard ? "focus-visible:!outline-1 focus-visible:!ring-1 focus-visible:!ring-blue-600" : "focus-visible:!outline-0 focus-visible:!ring-0"),
100
+ onChange: ({ target }) => onChange(target == null ? void 0 : target.value),
101
+ style: inputStyle(style),
102
+ value
103
+ },
104
+ children: [
105
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
106
+ "option",
107
+ {
108
+ ...{
109
+ disabled: true,
110
+ "aria-label": "Select option",
111
+ value: ""
112
+ },
113
+ children: "Select"
114
+ }
115
+ ),
116
+ options.map(({ label, option, value: optValue }, key) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
117
+ "option",
118
+ {
119
+ ...{
120
+ value: optValue ?? option
121
+ },
122
+ children: label ?? option
123
+ },
124
+ "input-select-option-" + key
125
+ ))
126
+ ]
127
+ }
128
+ ),
129
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
130
+ "div",
131
+ {
132
+ ...{
133
+ "aria-hidden": true,
134
+ className: "h-full flex items-center absolute inset-y-0 right-0 pointer-events-none px-2.5"
135
+ },
136
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
137
+ chevron_down_default,
138
+ {
139
+ ...{
140
+ className: "w-5 h-5 text-inherit"
141
+ }
142
+ }
143
+ )
144
+ }
145
+ )
146
+ ]
147
+ }
148
+ );
149
+ };
150
+ var input_select_default = InputSelect;
@@ -0,0 +1,9 @@
1
+ "use client";
2
+ import {
3
+ input_select_default
4
+ } from "./chunk-BD3TDNJE.mjs";
5
+ import "./chunk-FYA7EAMR.mjs";
6
+ import "./chunk-FJXG3REN.mjs";
7
+ export {
8
+ input_select_default as default
9
+ };
@@ -0,0 +1,65 @@
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/input-text.js
20
+ var input_text_exports = {};
21
+ __export(input_text_exports, {
22
+ default: () => input_text_default
23
+ });
24
+ module.exports = __toCommonJS(input_text_exports);
25
+
26
+ // components/styles.js
27
+ var inputStyle = (style) => {
28
+ var _a, _b, _c, _d, _e, _f, _g;
29
+ return {
30
+ backgroundColor: (_b = (_a = style == null ? void 0 : style.background) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb,
31
+ borderColor: (_d = (_c = style == null ? void 0 : style.text) == null ? void 0 : _c.color) == null ? void 0 : _d.rgb,
32
+ borderRadius: ((_e = style == null ? void 0 : style.input) == null ? void 0 : _e.radius) != null ? style.input.radius / 4 + "px" : void 0,
33
+ color: (_g = (_f = style == null ? void 0 : style.text) == null ? void 0 : _f.color) == null ? void 0 : _g.rgb
34
+ };
35
+ };
36
+
37
+ // components/input-text.js
38
+ var import_jsx_runtime = require("react/jsx-runtime");
39
+ var InputText = ({
40
+ className,
41
+ max,
42
+ onChange,
43
+ style,
44
+ value,
45
+ ...rest
46
+ }) => {
47
+ const classes = ["input"];
48
+ if (className) {
49
+ classes.push(className);
50
+ }
51
+ ;
52
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
53
+ "input",
54
+ {
55
+ ...{
56
+ ...rest,
57
+ className: classes.join(" "),
58
+ onChange: ({ target }) => onChange(target.value),
59
+ style: inputStyle(style),
60
+ value
61
+ }
62
+ }
63
+ );
64
+ };
65
+ var input_text_default = InputText;
@@ -0,0 +1,36 @@
1
+ import {
2
+ inputStyle
3
+ } from "./chunk-FJXG3REN.mjs";
4
+
5
+ // components/input-text.js
6
+ import { jsx } from "react/jsx-runtime";
7
+ var InputText = ({
8
+ className,
9
+ max,
10
+ onChange,
11
+ style,
12
+ value,
13
+ ...rest
14
+ }) => {
15
+ const classes = ["input"];
16
+ if (className) {
17
+ classes.push(className);
18
+ }
19
+ ;
20
+ return /* @__PURE__ */ jsx(
21
+ "input",
22
+ {
23
+ ...{
24
+ ...rest,
25
+ className: classes.join(" "),
26
+ onChange: ({ target }) => onChange(target.value),
27
+ style: inputStyle(style),
28
+ value
29
+ }
30
+ }
31
+ );
32
+ };
33
+ var input_text_default = InputText;
34
+ export {
35
+ input_text_default as default
36
+ };
@@ -0,0 +1,69 @@
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/input-textarea.js
20
+ var input_textarea_exports = {};
21
+ __export(input_textarea_exports, {
22
+ default: () => input_textarea_default
23
+ });
24
+ module.exports = __toCommonJS(input_textarea_exports);
25
+
26
+ // components/styles.js
27
+ var inputStyle = (style) => {
28
+ var _a, _b, _c, _d, _e, _f, _g;
29
+ return {
30
+ backgroundColor: (_b = (_a = style == null ? void 0 : style.background) == null ? void 0 : _a.color) == null ? void 0 : _b.rgb,
31
+ borderColor: (_d = (_c = style == null ? void 0 : style.text) == null ? void 0 : _c.color) == null ? void 0 : _d.rgb,
32
+ borderRadius: ((_e = style == null ? void 0 : style.input) == null ? void 0 : _e.radius) != null ? style.input.radius / 4 + "px" : void 0,
33
+ color: (_g = (_f = style == null ? void 0 : style.text) == null ? void 0 : _f.color) == null ? void 0 : _g.rgb
34
+ };
35
+ };
36
+
37
+ // components/input-textarea.js
38
+ var import_jsx_runtime = require("react/jsx-runtime");
39
+ var InputTextarea = ({
40
+ className,
41
+ max,
42
+ onChange,
43
+ rows,
44
+ style,
45
+ value,
46
+ ...rest
47
+ }) => {
48
+ const classes = ["input resize-none whitespace-pre-line"];
49
+ if (className) {
50
+ classes.push(className);
51
+ }
52
+ ;
53
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
54
+ "textarea",
55
+ {
56
+ ...{
57
+ ...rest,
58
+ ...rows && {
59
+ rows
60
+ },
61
+ className: classes.join(" "),
62
+ onChange: ({ target }) => onChange(target.value),
63
+ style: inputStyle(style),
64
+ value
65
+ }
66
+ }
67
+ );
68
+ };
69
+ var input_textarea_default = InputTextarea;
@@ -0,0 +1,40 @@
1
+ import {
2
+ inputStyle
3
+ } from "./chunk-FJXG3REN.mjs";
4
+
5
+ // components/input-textarea.js
6
+ import { jsx } from "react/jsx-runtime";
7
+ var InputTextarea = ({
8
+ className,
9
+ max,
10
+ onChange,
11
+ rows,
12
+ style,
13
+ value,
14
+ ...rest
15
+ }) => {
16
+ const classes = ["input resize-none whitespace-pre-line"];
17
+ if (className) {
18
+ classes.push(className);
19
+ }
20
+ ;
21
+ return /* @__PURE__ */ jsx(
22
+ "textarea",
23
+ {
24
+ ...{
25
+ ...rest,
26
+ ...rows && {
27
+ rows
28
+ },
29
+ className: classes.join(" "),
30
+ onChange: ({ target }) => onChange(target.value),
31
+ style: inputStyle(style),
32
+ value
33
+ }
34
+ }
35
+ );
36
+ };
37
+ var input_textarea_default = InputTextarea;
38
+ export {
39
+ input_textarea_default as default
40
+ };