@expcat/tigercat-react 2.0.19 → 2.1.1

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 (186) hide show
  1. package/README.md +25 -16
  2. package/dist/chunk-246DAUEF.mjs +181 -0
  3. package/dist/{chunk-PU3JY6RE.mjs → chunk-2JMI7TCM.mjs} +1 -1
  4. package/dist/chunk-2YBLMVDT.mjs +428 -0
  5. package/dist/chunk-2YOP55OF.mjs +639 -0
  6. package/dist/{chunk-25D5TXZH.mjs → chunk-32MCQMBJ.mjs} +8 -6
  7. package/dist/chunk-3HHEVMHE.mjs +180 -0
  8. package/dist/{chunk-HSBN5MLS.mjs → chunk-3LACOSJQ.mjs} +1 -1
  9. package/dist/{chunk-F6WV53BS.mjs → chunk-3LDDXHW2.mjs} +28 -11
  10. package/dist/{chunk-IXQAECFP.mjs → chunk-3QNIFKVF.mjs} +12 -14
  11. package/dist/{chunk-UD4DTVJZ.mjs → chunk-4C2X5PZO.mjs} +57 -25
  12. package/dist/chunk-5JETWHLJ.mjs +28 -0
  13. package/dist/{chunk-VA6PZWOH.mjs → chunk-5SEMRHBD.mjs} +14 -6
  14. package/dist/{chunk-EKILTLUO.mjs → chunk-72CJNKDY.mjs} +1 -1
  15. package/dist/{chunk-XE4YFBOZ.mjs → chunk-AUD3VOLO.mjs} +1 -1
  16. package/dist/{chunk-UT5BV2VO.mjs → chunk-AYFKHWJS.mjs} +16 -10
  17. package/dist/{chunk-RPSHILHD.mjs → chunk-BXAH2GH3.mjs} +8 -2
  18. package/dist/{chunk-EW5EO7VE.mjs → chunk-BYD7EAWK.mjs} +1 -1
  19. package/dist/{chunk-BOGOQ44C.mjs → chunk-CQOLQAB5.mjs} +105 -90
  20. package/dist/{chunk-L55UK45A.mjs → chunk-CRIEUKMD.mjs} +5 -2
  21. package/dist/{chunk-DKNVSQSV.mjs → chunk-CUAXRBKO.mjs} +12 -0
  22. package/dist/{chunk-E7OTDBI6.mjs → chunk-DECUASRW.mjs} +17 -19
  23. package/dist/{chunk-XMTEMBQV.mjs → chunk-EAAWB3CK.mjs} +16 -13
  24. package/dist/{chunk-D33BIMGK.mjs → chunk-EG7EMDKK.mjs} +12 -2
  25. package/dist/chunk-EW43YBPV.mjs +457 -0
  26. package/dist/{chunk-HOYBHB7B.mjs → chunk-FNK2VWPP.mjs} +1 -1
  27. package/dist/{chunk-RJPNBYK5.mjs → chunk-FQS24AUH.mjs} +12 -3
  28. package/dist/{chunk-LADKKOJT.mjs → chunk-GBEDWXLL.mjs} +16 -10
  29. package/dist/chunk-GR3Y3XWP.mjs +47 -0
  30. package/dist/{chunk-2ENQZECC.mjs → chunk-HAXRHSCN.mjs} +4 -3
  31. package/dist/{chunk-K4GIKSZE.mjs → chunk-I2BENK5X.mjs} +2 -1
  32. package/dist/chunk-IGBQGR6G.mjs +234 -0
  33. package/dist/chunk-J76R2S62.mjs +161 -0
  34. package/dist/{chunk-DNOPEJ5I.mjs → chunk-JZZPLKTW.mjs} +7 -4
  35. package/dist/{chunk-7KCQMXJA.mjs → chunk-KDURW5AS.mjs} +4 -3
  36. package/dist/{chunk-TFMEHUVZ.mjs → chunk-KKN7KLTB.mjs} +0 -1
  37. package/dist/{chunk-6MGQAJ62.mjs → chunk-KL6YJIZ3.mjs} +24 -7
  38. package/dist/chunk-KRDHM5KB.mjs +259 -0
  39. package/dist/{chunk-HHIW7V7B.mjs → chunk-M6ZPTGBV.mjs} +2 -10
  40. package/dist/chunk-MFPVVGNA.mjs +248 -0
  41. package/dist/{chunk-PXRZ6CKY.mjs → chunk-MJVSZ2UJ.mjs} +46 -16
  42. package/dist/{chunk-LZKBDQE4.mjs → chunk-MYI3FPG4.mjs} +23 -4
  43. package/dist/{chunk-OIGEBCAS.mjs → chunk-NADODEZX.mjs} +69 -1
  44. package/dist/{chunk-KMP5CVNK.mjs → chunk-NJWTZ5MO.mjs} +57 -45
  45. package/dist/chunk-NLGLBTSM.mjs +138 -0
  46. package/dist/chunk-NT7GW2FD.mjs +40 -0
  47. package/dist/{chunk-773LH7BK.mjs → chunk-O6VYD4E4.mjs} +24 -2
  48. package/dist/{chunk-G7D4QV7A.mjs → chunk-O7TV5OKS.mjs} +33 -6
  49. package/dist/{chunk-DPWRXXXW.mjs → chunk-OJ6SHHOZ.mjs} +3 -3
  50. package/dist/chunk-OKYMTHFQ.mjs +279 -0
  51. package/dist/{chunk-UYJJLHVA.mjs → chunk-PMQJ6AYT.mjs} +23 -21
  52. package/dist/chunk-PY2VUNEJ.mjs +494 -0
  53. package/dist/{chunk-BEJZPJIK.mjs → chunk-QOAOOD53.mjs} +10 -4
  54. package/dist/{chunk-2WGEHH5A.mjs → chunk-QU3QXUTC.mjs} +49 -23
  55. package/dist/{chunk-V6P7ZK6O.mjs → chunk-QXSUG7SN.mjs} +3 -3
  56. package/dist/{chunk-FYINJRYN.mjs → chunk-R7YZ6FKP.mjs} +27 -16
  57. package/dist/{chunk-YI6YWH66.mjs → chunk-RE5ZLA5D.mjs} +6 -6
  58. package/dist/{chunk-UCBW5RJN.mjs → chunk-RGVU4EMA.mjs} +11 -6
  59. package/dist/{chunk-IBSOUQGB.mjs → chunk-RRGPDFDI.mjs} +7 -4
  60. package/dist/{chunk-ZH5ZBLAN.mjs → chunk-RUQ3F3MV.mjs} +34 -7
  61. package/dist/chunk-SEOG5AGS.mjs +72 -0
  62. package/dist/{chunk-PGD5RPKF.mjs → chunk-SVIJ2UZA.mjs} +2 -1
  63. package/dist/chunk-SXWEFZOF.mjs +766 -0
  64. package/dist/{chunk-NCHUEGUW.mjs → chunk-TEVEXDY2.mjs} +27 -16
  65. package/dist/{chunk-DJOFM2VO.mjs → chunk-TO6MZFNQ.mjs} +52 -40
  66. package/dist/chunk-TQ6RIFWR.mjs +135 -0
  67. package/dist/chunk-U4M3DC2P.mjs +48 -0
  68. package/dist/{chunk-ZCGIZOMT.mjs → chunk-V7HJ5HLC.mjs} +6 -10
  69. package/dist/{chunk-SIDDYP3O.mjs → chunk-VJWSKJLJ.mjs} +1 -1
  70. package/dist/{chunk-ZG56T75O.mjs → chunk-WTHWLCRL.mjs} +51 -11
  71. package/dist/{chunk-KP6DEYWB.mjs → chunk-X4L3W7RQ.mjs} +1 -1
  72. package/dist/{chunk-ZMRTETN2.mjs → chunk-X6C6MNG5.mjs} +4 -3
  73. package/dist/chunk-XT43B7ZI.mjs +58 -0
  74. package/dist/{chunk-OGG2TQDG.mjs → chunk-XVHTJQ4T.mjs} +12 -1
  75. package/dist/{chunk-QJE3MZBO.mjs → chunk-Y6UH3EKE.mjs} +1 -1
  76. package/dist/chunk-YJ5T4XZN.mjs +81 -0
  77. package/dist/{chunk-VVNFXJMN.mjs → chunk-YNDPQVEK.mjs} +8 -1
  78. package/dist/{chunk-QGZ32NFQ.mjs → chunk-Z23KOLNU.mjs} +4 -3
  79. package/dist/{chunk-5CKMYMTS.mjs → chunk-ZATZRXMW.mjs} +27 -8
  80. package/dist/components/ActivityFeed.mjs +3 -3
  81. package/dist/components/Affix.mjs +1 -1
  82. package/dist/components/Anchor.mjs +1 -1
  83. package/dist/components/AreaChart.mjs +5 -4
  84. package/dist/components/AspectRatio.d.mts +10 -0
  85. package/dist/components/AspectRatio.mjs +8 -0
  86. package/dist/components/AutoComplete.mjs +1 -1
  87. package/dist/components/BarChart.mjs +5 -4
  88. package/dist/components/Calendar.mjs +1 -1
  89. package/dist/components/Cascader.mjs +1 -1
  90. package/dist/components/ChartCanvas.mjs +1 -1
  91. package/dist/components/ChatWindow.mjs +4 -4
  92. package/dist/components/Code.mjs +3 -1
  93. package/dist/components/CollapsePanel.mjs +1 -1
  94. package/dist/components/ColorPicker.mjs +1 -1
  95. package/dist/components/CommentThread.mjs +2 -2
  96. package/dist/components/ContextMenu.d.mts +36 -0
  97. package/dist/components/ContextMenu.mjs +17 -0
  98. package/dist/components/DataExport.mjs +2 -2
  99. package/dist/components/DataTableWithToolbar.mjs +7 -7
  100. package/dist/components/DonutChart.mjs +4 -4
  101. package/dist/components/Dropdown.mjs +1 -1
  102. package/dist/components/FileManager.mjs +2 -1
  103. package/dist/components/FloatButton.mjs +1 -1
  104. package/dist/components/FormItem.mjs +1 -1
  105. package/dist/components/FormWizard.mjs +1 -1
  106. package/dist/components/FunnelChart.mjs +3 -3
  107. package/dist/components/Gantt.d.mts +3 -1
  108. package/dist/components/Gantt.mjs +2 -2
  109. package/dist/components/GaugeChart.mjs +2 -2
  110. package/dist/components/HeatmapChart.mjs +3 -3
  111. package/dist/components/Highlight.d.mts +11 -0
  112. package/dist/components/Highlight.mjs +8 -0
  113. package/dist/components/Image.mjs +4 -4
  114. package/dist/components/ImageCompare.d.mts +15 -0
  115. package/dist/components/ImageCompare.mjs +8 -0
  116. package/dist/components/ImageGroup.mjs +2 -2
  117. package/dist/components/ImagePreview.mjs +1 -1
  118. package/dist/components/Input.mjs +1 -1
  119. package/dist/components/InputNumber.d.mts +1 -1
  120. package/dist/components/InputNumber.mjs +1 -1
  121. package/dist/components/InputOTP.d.mts +33 -0
  122. package/dist/components/InputOTP.mjs +12 -0
  123. package/dist/components/Kanban.mjs +2 -2
  124. package/dist/components/Kbd.d.mts +10 -0
  125. package/dist/components/Kbd.mjs +8 -0
  126. package/dist/components/LineChart.mjs +5 -4
  127. package/dist/components/List.mjs +2 -2
  128. package/dist/components/Loading.mjs +1 -1
  129. package/dist/components/LoadingBar.d.mts +8 -0
  130. package/dist/components/LoadingBar.mjs +138 -0
  131. package/dist/components/LoadingBarContainer.d.mts +8 -0
  132. package/dist/components/LoadingBarContainer.mjs +8 -0
  133. package/dist/components/LoadingBarRoot.d.mts +6 -0
  134. package/dist/components/LoadingBarRoot.mjs +6 -0
  135. package/dist/components/Marquee.d.mts +10 -0
  136. package/dist/components/Marquee.mjs +8 -0
  137. package/dist/components/MaskInput.d.mts +37 -0
  138. package/dist/components/MaskInput.mjs +10 -0
  139. package/dist/components/Masonry.d.mts +10 -0
  140. package/dist/components/Masonry.mjs +8 -0
  141. package/dist/components/NavigationMenu.d.mts +84 -0
  142. package/dist/components/NavigationMenu.mjs +23 -0
  143. package/dist/components/NotificationCenter.mjs +4 -4
  144. package/dist/components/OrgChart.mjs +2 -2
  145. package/dist/components/PageHeader.d.mts +34 -0
  146. package/dist/components/PageHeader.mjs +11 -0
  147. package/dist/components/Pagination.mjs +1 -1
  148. package/dist/components/PieChart.mjs +3 -3
  149. package/dist/components/Popconfirm.mjs +2 -2
  150. package/dist/components/Popover.mjs +2 -2
  151. package/dist/components/QRCode.d.mts +2 -2
  152. package/dist/components/QRCode.mjs +1 -1
  153. package/dist/components/RadarChart.mjs +4 -4
  154. package/dist/components/Rate.mjs +1 -1
  155. package/dist/components/ScatterChart.mjs +5 -4
  156. package/dist/components/ScrollArea.d.mts +10 -0
  157. package/dist/components/ScrollArea.mjs +8 -0
  158. package/dist/components/ScrollSpy.mjs +1 -1
  159. package/dist/components/Signature.mjs +1 -1
  160. package/dist/components/SplitButton.d.mts +38 -0
  161. package/dist/components/SplitButton.mjs +12 -0
  162. package/dist/components/Splitter.mjs +1 -1
  163. package/dist/components/Stepper.d.mts +2 -0
  164. package/dist/components/Stepper.mjs +2 -1
  165. package/dist/components/SunburstChart.mjs +3 -3
  166. package/dist/components/Switch.d.mts +5 -1
  167. package/dist/components/Switch.mjs +2 -1
  168. package/dist/components/Table.mjs +2 -2
  169. package/dist/components/TagsInput.d.mts +41 -0
  170. package/dist/components/TagsInput.mjs +13 -0
  171. package/dist/components/TaskBoard.mjs +1 -1
  172. package/dist/components/Textarea.mjs +1 -1
  173. package/dist/components/Tooltip.mjs +2 -2
  174. package/dist/components/Tour.mjs +1 -1
  175. package/dist/components/TreeMapChart.mjs +3 -3
  176. package/dist/components/TreeSelect.mjs +2 -1
  177. package/dist/components/Upload.mjs +1 -1
  178. package/dist/hooks/useChartInteraction.d.mts +5 -0
  179. package/dist/hooks/useChartInteraction.mjs +1 -1
  180. package/dist/index.d.mts +17 -1
  181. package/dist/index.mjs +406 -0
  182. package/package.json +117 -2
  183. package/dist/chunk-7AFRHC7P.mjs +0 -312
  184. package/dist/chunk-CB4SK5AU.mjs +0 -235
  185. package/dist/chunk-KPACLRQH.mjs +0 -55
  186. package/dist/chunk-YIB6ZXZF.mjs +0 -386
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  ImageGroupContext
3
- } from "./chunk-HSBN5MLS.mjs";
3
+ } from "./chunk-3LACOSJQ.mjs";
4
4
  import {
5
5
  ImagePreview
6
- } from "./chunk-ZCGIZOMT.mjs";
6
+ } from "./chunk-V7HJ5HLC.mjs";
7
7
  import {
8
8
  usePopup
9
- } from "./chunk-ZG56T75O.mjs";
9
+ } from "./chunk-WTHWLCRL.mjs";
10
10
  import {
11
11
  renderOverlayPortal
12
12
  } from "./chunk-HKAZXG74.mjs";
@@ -0,0 +1,279 @@
1
+ // src/components/ImageCompare.tsx
2
+ import { forwardRef, useCallback, useEffect, useRef, useState } from "react";
3
+ import {
4
+ getImageCompareAfterClasses,
5
+ getImageCompareBeforeClasses,
6
+ getImageCompareClipStyle,
7
+ getImageCompareHandleClasses,
8
+ getImageCompareHandleStyle,
9
+ getImageCompareImgClasses,
10
+ getImageCompareKeyboardPosition,
11
+ getImageCompareKnobClasses,
12
+ getImageCompareLineClasses,
13
+ getImageComparePointerClientPoint,
14
+ getImageComparePositionFromPointer,
15
+ getImageCompareRootClasses,
16
+ getImageCompareRootStyle,
17
+ isImageCompareInteractiveTarget,
18
+ isImageCompareVertical,
19
+ resolveImageCompareAriaLabel,
20
+ resolveImageCompareFit,
21
+ resolveImageCompareOrientation,
22
+ resolveImageComparePosition,
23
+ resolveImageCompareStep
24
+ } from "@expcat/tigercat-core";
25
+ import { jsx, jsxs } from "react/jsx-runtime";
26
+ function renderPaneContent(slot, src, alt, fit) {
27
+ if (slot != null) return slot;
28
+ if (!src) return null;
29
+ return /* @__PURE__ */ jsx(
30
+ "img",
31
+ {
32
+ src,
33
+ alt,
34
+ className: getImageCompareImgClasses(resolveImageCompareFit(fit)),
35
+ draggable: false
36
+ }
37
+ );
38
+ }
39
+ var ImageCompare = forwardRef(
40
+ ({
41
+ beforeSrc,
42
+ afterSrc,
43
+ beforeAlt = "",
44
+ afterAlt = "",
45
+ fit,
46
+ position: controlledPosition,
47
+ defaultPosition,
48
+ orientation,
49
+ step,
50
+ disabled = false,
51
+ width,
52
+ height,
53
+ ariaLabel,
54
+ className,
55
+ style,
56
+ before,
57
+ after,
58
+ onChange,
59
+ onMouseDown,
60
+ onTouchStart,
61
+ onKeyDown,
62
+ ...rest
63
+ }, ref) => {
64
+ const {
65
+ "aria-label": ariaLabelAttr,
66
+ "aria-labelledby": ariaLabelledby,
67
+ "aria-describedby": ariaDescribedby,
68
+ ...domProps
69
+ } = rest;
70
+ const resolvedOrientation = resolveImageCompareOrientation(orientation);
71
+ const resolvedStep = resolveImageCompareStep(step);
72
+ const [uncontrolledPosition, setUncontrolledPosition] = useState(
73
+ () => resolveImageComparePosition(controlledPosition ?? defaultPosition, step)
74
+ );
75
+ const [dragging, setDragging] = useState(false);
76
+ const rootRef = useRef(null);
77
+ const handleRef = useRef(null);
78
+ const draggingRef = useRef(false);
79
+ const isControlled = controlledPosition !== void 0;
80
+ const current = resolveImageComparePosition(
81
+ isControlled ? controlledPosition : uncontrolledPosition,
82
+ step
83
+ );
84
+ const vertical = isImageCompareVertical(resolvedOrientation);
85
+ const resolvedAriaLabel = resolveImageCompareAriaLabel(
86
+ typeof ariaLabelAttr === "string" ? ariaLabelAttr : ariaLabel
87
+ );
88
+ const setRootRef = useCallback(
89
+ (node) => {
90
+ rootRef.current = node;
91
+ if (typeof ref === "function") ref(node);
92
+ else if (ref) ref.current = node;
93
+ },
94
+ [ref]
95
+ );
96
+ const commit = useCallback(
97
+ (next) => {
98
+ const resolved = resolveImageComparePosition(next, step);
99
+ if (!isControlled) setUncontrolledPosition(resolved);
100
+ onChange?.(resolved);
101
+ },
102
+ [isControlled, onChange, step]
103
+ );
104
+ const positionFromEvent = useCallback(
105
+ (event) => {
106
+ const root = rootRef.current;
107
+ const source = "nativeEvent" in event ? event.nativeEvent : event;
108
+ const point = getImageComparePointerClientPoint(source);
109
+ if (!root || !point) return null;
110
+ return getImageComparePositionFromPointer({
111
+ clientX: point.clientX,
112
+ clientY: point.clientY,
113
+ rect: root.getBoundingClientRect(),
114
+ orientation: resolvedOrientation,
115
+ step: resolvedStep
116
+ });
117
+ },
118
+ [resolvedOrientation, resolvedStep]
119
+ );
120
+ const handleMove = useCallback(
121
+ (event) => {
122
+ if (disabled || !draggingRef.current) return;
123
+ const next = positionFromEvent(event);
124
+ if (next === null) return;
125
+ commit(next);
126
+ },
127
+ [commit, disabled, positionFromEvent]
128
+ );
129
+ const handleEnd = useCallback(() => {
130
+ draggingRef.current = false;
131
+ setDragging(false);
132
+ }, []);
133
+ useEffect(() => {
134
+ if (!dragging) return;
135
+ document.addEventListener("mousemove", handleMove);
136
+ document.addEventListener("mouseup", handleEnd);
137
+ document.addEventListener("touchmove", handleMove);
138
+ document.addEventListener("touchend", handleEnd);
139
+ return () => {
140
+ document.removeEventListener("mousemove", handleMove);
141
+ document.removeEventListener("mouseup", handleEnd);
142
+ document.removeEventListener("touchmove", handleMove);
143
+ document.removeEventListener("touchend", handleEnd);
144
+ };
145
+ }, [dragging, handleEnd, handleMove]);
146
+ const startDrag = useCallback(
147
+ (event) => {
148
+ if (disabled) return;
149
+ if ("button" in event && event.button !== 0) return;
150
+ if (isImageCompareInteractiveTarget(event.target, handleRef.current)) return;
151
+ event.preventDefault();
152
+ draggingRef.current = true;
153
+ setDragging(true);
154
+ const next = positionFromEvent(event);
155
+ if (next !== null) commit(next);
156
+ handleRef.current?.focus();
157
+ },
158
+ [commit, disabled, positionFromEvent]
159
+ );
160
+ const handleMouseDown = useCallback(
161
+ (event) => {
162
+ startDrag(event);
163
+ onMouseDown?.(event);
164
+ },
165
+ [onMouseDown, startDrag]
166
+ );
167
+ const handleTouchStart = useCallback(
168
+ (event) => {
169
+ startDrag(event);
170
+ onTouchStart?.(event);
171
+ },
172
+ [onTouchStart, startDrag]
173
+ );
174
+ const handleKeyDown = useCallback(
175
+ (event) => {
176
+ if (disabled) {
177
+ onKeyDown?.(event);
178
+ return;
179
+ }
180
+ const next = getImageCompareKeyboardPosition(event.key, current, resolvedStep);
181
+ if (next !== null) {
182
+ event.preventDefault();
183
+ commit(next);
184
+ }
185
+ onKeyDown?.(event);
186
+ },
187
+ [commit, current, disabled, onKeyDown, resolvedStep]
188
+ );
189
+ return /* @__PURE__ */ jsxs(
190
+ "div",
191
+ {
192
+ ...domProps,
193
+ ref: setRootRef,
194
+ "data-image-compare": "",
195
+ "data-image-compare-orientation": resolvedOrientation,
196
+ "data-image-compare-position": String(current),
197
+ "data-image-compare-disabled": disabled ? "true" : "false",
198
+ "data-image-compare-dragging": dragging ? "true" : "false",
199
+ className: getImageCompareRootClasses({
200
+ orientation: resolvedOrientation,
201
+ disabled,
202
+ className
203
+ }),
204
+ style: {
205
+ ...getImageCompareRootStyle({
206
+ position: current,
207
+ step: resolvedStep,
208
+ width,
209
+ height
210
+ }),
211
+ ...style
212
+ },
213
+ onMouseDown: handleMouseDown,
214
+ onTouchStart: handleTouchStart,
215
+ children: [
216
+ /* @__PURE__ */ jsx("div", { className: getImageCompareAfterClasses(), "data-image-compare-after": "", children: renderPaneContent(after, afterSrc, afterAlt, fit) }),
217
+ /* @__PURE__ */ jsx(
218
+ "div",
219
+ {
220
+ className: getImageCompareBeforeClasses(),
221
+ style: getImageCompareClipStyle(current, resolvedOrientation, resolvedStep),
222
+ "data-image-compare-before": "",
223
+ children: renderPaneContent(before, beforeSrc, beforeAlt, fit)
224
+ }
225
+ ),
226
+ /* @__PURE__ */ jsxs(
227
+ "div",
228
+ {
229
+ ref: handleRef,
230
+ className: getImageCompareHandleClasses({
231
+ orientation: resolvedOrientation,
232
+ disabled
233
+ }),
234
+ style: getImageCompareHandleStyle(current, resolvedOrientation, resolvedStep),
235
+ "data-image-compare-handle": "",
236
+ role: "slider",
237
+ tabIndex: disabled ? -1 : 0,
238
+ "aria-label": resolvedAriaLabel,
239
+ "aria-labelledby": ariaLabelledby,
240
+ "aria-describedby": ariaDescribedby,
241
+ "aria-valuemin": 0,
242
+ "aria-valuemax": 100,
243
+ "aria-valuenow": current,
244
+ "aria-valuetext": `${current}%`,
245
+ "aria-orientation": vertical ? "vertical" : "horizontal",
246
+ "aria-disabled": disabled,
247
+ onKeyDown: handleKeyDown,
248
+ children: [
249
+ /* @__PURE__ */ jsx(
250
+ "div",
251
+ {
252
+ className: getImageCompareLineClasses(resolvedOrientation),
253
+ "data-image-compare-line": "",
254
+ "aria-hidden": "true"
255
+ }
256
+ ),
257
+ /* @__PURE__ */ jsx(
258
+ "div",
259
+ {
260
+ className: getImageCompareKnobClasses(),
261
+ "data-image-compare-knob": "",
262
+ "aria-hidden": "true"
263
+ }
264
+ )
265
+ ]
266
+ }
267
+ )
268
+ ]
269
+ }
270
+ );
271
+ }
272
+ );
273
+ ImageCompare.displayName = "ImageCompare";
274
+ var ImageCompare_default = ImageCompare;
275
+
276
+ export {
277
+ ImageCompare,
278
+ ImageCompare_default
279
+ };
@@ -66,28 +66,30 @@ var Textarea = forwardRef(
66
66
  onChange?.(event);
67
67
  };
68
68
  const currentLength = currentValue?.length ?? 0;
69
+ const textarea = /* @__PURE__ */ jsx(
70
+ "textarea",
71
+ {
72
+ ref: setRefs,
73
+ className: textareaClasses,
74
+ value: currentValue,
75
+ disabled,
76
+ readOnly: readonly,
77
+ required,
78
+ placeholder,
79
+ rows,
80
+ maxLength,
81
+ minLength,
82
+ onInput: handleInput,
83
+ onChange: handleChange,
84
+ onFocus,
85
+ onBlur,
86
+ ...props
87
+ }
88
+ );
89
+ if (!showCount) return textarea;
69
90
  return /* @__PURE__ */ jsxs("div", { className: "w-full", children: [
70
- /* @__PURE__ */ jsx(
71
- "textarea",
72
- {
73
- ref: setRefs,
74
- className: textareaClasses,
75
- value: currentValue,
76
- disabled,
77
- readOnly: readonly,
78
- required,
79
- placeholder,
80
- rows,
81
- maxLength,
82
- minLength,
83
- onInput: handleInput,
84
- onChange: handleChange,
85
- onFocus,
86
- onBlur,
87
- ...props
88
- }
89
- ),
90
- showCount && /* @__PURE__ */ jsx("div", { className: "mt-1 text-sm text-gray-500 text-right", children: maxLength ? `${currentLength}/${maxLength}` : currentLength })
91
+ textarea,
92
+ /* @__PURE__ */ jsx("div", { className: "mt-1 text-sm text-gray-500 text-right", children: maxLength ? `${currentLength}/${maxLength}` : currentLength })
91
93
  ] });
92
94
  }
93
95
  );