wimui 0.51.2 → 0.52.2

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 (286) hide show
  1. package/dist/components/_internal/FeedbackCloseButton.cjs +1 -1
  2. package/dist/components/_internal/FeedbackCloseButton.js +14 -13
  3. package/dist/components/_internal/FieldLabelContent.cjs +1 -1
  4. package/dist/components/_internal/FieldLabelContent.js +18 -17
  5. package/dist/components/ai/AIResponseFeedback/AIResponseFeedback.cjs +1 -1
  6. package/dist/components/ai/AIResponseFeedback/AIResponseFeedback.js +46 -45
  7. package/dist/components/ai/AIResponseFeedback/airesponse-feedback.module.cjs +1 -1
  8. package/dist/components/ai/AIResponseFeedback/airesponse-feedback.module.js +1 -1
  9. package/dist/components/ai/AgentStatus/AgentStatus.cjs +1 -1
  10. package/dist/components/ai/AgentStatus/AgentStatus.js +24 -23
  11. package/dist/components/ai/ArtifactsOverlay/ArtifactsOverlay.cjs +1 -1
  12. package/dist/components/ai/ArtifactsOverlay/ArtifactsOverlay.js +47 -45
  13. package/dist/components/ai/ChatUI/ChatUI.cjs +1 -1
  14. package/dist/components/ai/ChatUI/ChatUI.js +82 -81
  15. package/dist/components/ai/CodeBlock/CodeBlock.cjs +3 -3
  16. package/dist/components/ai/CodeBlock/CodeBlock.js +53 -52
  17. package/dist/components/ai/CodeBlock/code-block.module.cjs +1 -1
  18. package/dist/components/ai/CodeBlock/code-block.module.js +1 -1
  19. package/dist/components/ai/CodeDiffViewer/CodeDiffViewer.cjs +2 -2
  20. package/dist/components/ai/CodeDiffViewer/CodeDiffViewer.js +105 -104
  21. package/dist/components/ai/CodeDiffViewer/code-diff-viewer.module.cjs +1 -1
  22. package/dist/components/ai/CodeDiffViewer/code-diff-viewer.module.js +2 -2
  23. package/dist/components/ai/MarkdownRenderer/MarkdownRenderer.cjs +1 -1
  24. package/dist/components/ai/MarkdownRenderer/MarkdownRenderer.js +60 -59
  25. package/dist/components/ai/ModelSelector/ModelSelector.cjs +1 -1
  26. package/dist/components/ai/ModelSelector/ModelSelector.js +83 -82
  27. package/dist/components/ai/ModelSelector/model-selector.module.cjs +1 -1
  28. package/dist/components/ai/ModelSelector/model-selector.module.js +1 -1
  29. package/dist/components/ai/PromptInput/PromptInput.cjs +1 -1
  30. package/dist/components/ai/PromptInput/PromptInput.js +76 -75
  31. package/dist/components/ai/SourceCitation/SourceCitation.cjs +1 -1
  32. package/dist/components/ai/SourceCitation/SourceCitation.js +39 -38
  33. package/dist/components/ai/Terminal/Terminal.cjs +2 -2
  34. package/dist/components/ai/Terminal/Terminal.js +65 -64
  35. package/dist/components/ai/Terminal/terminal.module.cjs +1 -1
  36. package/dist/components/ai/Terminal/terminal.module.js +1 -1
  37. package/dist/components/ai/ThoughtProcess/thought-process.module.cjs +1 -1
  38. package/dist/components/ai/ThoughtProcess/thought-process.module.js +4 -4
  39. package/dist/components/ai/ThreadList/ThreadList.cjs +1 -1
  40. package/dist/components/ai/ThreadList/ThreadList.js +58 -57
  41. package/dist/components/ai/ThreadList/thread-list.module.cjs +1 -1
  42. package/dist/components/ai/ThreadList/thread-list.module.js +1 -1
  43. package/dist/components/data-display/Accordion/accordion.module.cjs +1 -1
  44. package/dist/components/data-display/Accordion/accordion.module.js +1 -1
  45. package/dist/components/data-display/Barcode/Barcode.cjs +1 -1
  46. package/dist/components/data-display/Barcode/Barcode.js +76 -75
  47. package/dist/components/data-display/Calendar/Calendar.cjs +1 -1
  48. package/dist/components/data-display/Calendar/Calendar.js +75 -74
  49. package/dist/components/data-display/Calendar/calendar.module.cjs +1 -1
  50. package/dist/components/data-display/Calendar/calendar.module.js +1 -1
  51. package/dist/components/data-display/CalendarHeatmap/CalendarHeatmap.cjs +1 -1
  52. package/dist/components/data-display/CalendarHeatmap/CalendarHeatmap.js +54 -52
  53. package/dist/components/data-display/Carousel/Carousel.cjs +1 -1
  54. package/dist/components/data-display/Carousel/Carousel.js +62 -61
  55. package/dist/components/data-display/Carousel/carousel.module.cjs +1 -1
  56. package/dist/components/data-display/Carousel/carousel.module.js +1 -1
  57. package/dist/components/data-display/Chip/Chip.cjs +1 -1
  58. package/dist/components/data-display/Chip/Chip.js +36 -35
  59. package/dist/components/data-display/Comment/Comment.cjs +1 -1
  60. package/dist/components/data-display/Comment/Comment.js +58 -57
  61. package/dist/components/data-display/Comment/comment.module.cjs +1 -1
  62. package/dist/components/data-display/Comment/comment.module.js +1 -1
  63. package/dist/components/data-display/Countdown/Countdown.cjs +1 -1
  64. package/dist/components/data-display/Countdown/Countdown.js +56 -55
  65. package/dist/components/data-display/DataGrid/DataGrid.cjs +1 -1
  66. package/dist/components/data-display/DataGrid/DataGrid.js +128 -127
  67. package/dist/components/data-display/JsonViewer/JsonViewer.cjs +1 -1
  68. package/dist/components/data-display/JsonViewer/JsonViewer.js +153 -152
  69. package/dist/components/data-display/JsonViewer/json-viewer.module.cjs +1 -1
  70. package/dist/components/data-display/JsonViewer/json-viewer.module.js +3 -3
  71. package/dist/components/data-display/Kanban/Kanban.cjs +1 -1
  72. package/dist/components/data-display/Kanban/Kanban.js +95 -94
  73. package/dist/components/data-display/NodeGraph/NodeGraph.cjs +1 -1
  74. package/dist/components/data-display/NodeGraph/NodeGraph.js +62 -61
  75. package/dist/components/data-display/NodeGraph/node-graph.module.cjs +1 -1
  76. package/dist/components/data-display/NodeGraph/node-graph.module.js +1 -1
  77. package/dist/components/data-display/PivotTable/PivotTable.cjs +1 -1
  78. package/dist/components/data-display/PivotTable/PivotTable.js +153 -152
  79. package/dist/components/data-display/PivotTable/pivot-table.module.cjs +1 -1
  80. package/dist/components/data-display/PivotTable/pivot-table.module.js +1 -1
  81. package/dist/components/data-display/Presence/Presence.cjs +1 -1
  82. package/dist/components/data-display/Presence/Presence.js +28 -27
  83. package/dist/components/data-display/PullToRefresh/PullToRefresh.cjs +1 -1
  84. package/dist/components/data-display/PullToRefresh/PullToRefresh.js +73 -72
  85. package/dist/components/data-display/Reaction/Reaction.cjs +1 -1
  86. package/dist/components/data-display/Reaction/Reaction.js +31 -30
  87. package/dist/components/data-display/ScheduleView/ScheduleView.cjs +1 -1
  88. package/dist/components/data-display/ScheduleView/ScheduleView.js +49 -48
  89. package/dist/components/data-display/SortableList/SortableList.cjs +1 -1
  90. package/dist/components/data-display/SortableList/SortableList.js +44 -43
  91. package/dist/components/data-display/Tag/Tag.cjs +1 -1
  92. package/dist/components/data-display/Tag/Tag.js +29 -28
  93. package/dist/components/data-display/Tag/tag.module.cjs +1 -1
  94. package/dist/components/data-display/Tag/tag.module.js +1 -1
  95. package/dist/components/data-display/TreeDiagram/TreeDiagram.cjs +1 -1
  96. package/dist/components/data-display/TreeDiagram/TreeDiagram.js +85 -84
  97. package/dist/components/data-display/TreeDiagram/tree-diagram.module.cjs +1 -1
  98. package/dist/components/data-display/TreeDiagram/tree-diagram.module.js +1 -1
  99. package/dist/components/data-display/TreeView/TreeView.cjs +1 -1
  100. package/dist/components/data-display/TreeView/TreeView.js +123 -122
  101. package/dist/components/feedback/Autosave/Autosave.cjs +1 -1
  102. package/dist/components/feedback/Autosave/Autosave.js +32 -31
  103. package/dist/components/feedback/Banner/banner.module.cjs +1 -1
  104. package/dist/components/feedback/Banner/banner.module.js +2 -2
  105. package/dist/components/feedback/ErrorBoundary/ErrorBoundary.cjs +1 -1
  106. package/dist/components/feedback/ErrorBoundary/ErrorBoundary.js +35 -34
  107. package/dist/components/feedback/Notification/notification.module.cjs +1 -1
  108. package/dist/components/feedback/Notification/notification.module.js +2 -2
  109. package/dist/components/feedback/ScrollProgress/ScrollProgress.cjs +1 -1
  110. package/dist/components/feedback/ScrollProgress/ScrollProgress.js +21 -20
  111. package/dist/components/feedback/Tour/Tour.cjs +1 -1
  112. package/dist/components/feedback/Tour/Tour.js +98 -97
  113. package/dist/components/form/Button/Button.cjs +1 -1
  114. package/dist/components/form/Button/Button.js +55 -54
  115. package/dist/components/form/ColorInput/ColorInput.cjs +1 -1
  116. package/dist/components/form/ColorInput/ColorInput.js +30 -29
  117. package/dist/components/form/ColorPicker/color-picker.module.cjs +1 -1
  118. package/dist/components/form/ColorPicker/color-picker.module.js +1 -1
  119. package/dist/components/form/Combobox/combobox.module.cjs +1 -1
  120. package/dist/components/form/Combobox/combobox.module.js +1 -1
  121. package/dist/components/form/CopyButton/CopyButton.cjs +1 -1
  122. package/dist/components/form/CopyButton/CopyButton.js +27 -26
  123. package/dist/components/form/DatePicker/DatePicker.cjs +1 -1
  124. package/dist/components/form/DatePicker/DatePicker.js +47 -46
  125. package/dist/components/form/DatePicker/date-picker.module.cjs +1 -1
  126. package/dist/components/form/DatePicker/date-picker.module.js +1 -1
  127. package/dist/components/form/DateRangePicker/DateRangePicker.cjs +1 -1
  128. package/dist/components/form/DateRangePicker/DateRangePicker.js +36 -35
  129. package/dist/components/form/Dropzone/Dropzone.cjs +1 -1
  130. package/dist/components/form/Dropzone/Dropzone.js +56 -55
  131. package/dist/components/form/FileUpload/FileUpload.cjs +1 -1
  132. package/dist/components/form/FileUpload/FileUpload.js +47 -46
  133. package/dist/components/form/FloatButton/FloatButton.cjs +1 -1
  134. package/dist/components/form/FloatButton/FloatButton.d.ts +4 -1
  135. package/dist/components/form/FloatButton/FloatButton.js +6 -6
  136. package/dist/components/form/ImageCropper/ImageCropper.cjs +1 -1
  137. package/dist/components/form/ImageCropper/ImageCropper.js +101 -99
  138. package/dist/components/form/InlineEdit/InlineEdit.cjs +1 -1
  139. package/dist/components/form/InlineEdit/InlineEdit.js +66 -65
  140. package/dist/components/form/InlineEdit/inline-edit.module.cjs +1 -1
  141. package/dist/components/form/InlineEdit/inline-edit.module.js +1 -1
  142. package/dist/components/form/Input/Input.cjs +1 -1
  143. package/dist/components/form/Input/Input.js +45 -44
  144. package/dist/components/form/InputBase/InputBase.cjs +1 -1
  145. package/dist/components/form/InputBase/InputBase.js +51 -50
  146. package/dist/components/form/InputBase/input-base.module.cjs +1 -1
  147. package/dist/components/form/InputBase/input-base.module.js +1 -1
  148. package/dist/components/form/Mentions/mentions.module.cjs +1 -1
  149. package/dist/components/form/Mentions/mentions.module.js +1 -1
  150. package/dist/components/form/MultiSelect/multiselect.module.cjs +1 -1
  151. package/dist/components/form/MultiSelect/multiselect.module.js +1 -1
  152. package/dist/components/form/PasswordStrength/PasswordStrength.cjs +1 -1
  153. package/dist/components/form/PasswordStrength/PasswordStrength.js +27 -26
  154. package/dist/components/form/PhoneInput/PhoneInput.cjs +1 -1
  155. package/dist/components/form/PhoneInput/PhoneInput.js +10 -10
  156. package/dist/components/form/PhoneInput/phone-input.module.cjs +1 -1
  157. package/dist/components/form/PhoneInput/phone-input.module.js +1 -1
  158. package/dist/components/form/QueryBuilder/QueryBuilder.cjs +1 -1
  159. package/dist/components/form/QueryBuilder/QueryBuilder.js +90 -89
  160. package/dist/components/form/RangeSlider/RangeSlider.cjs +1 -1
  161. package/dist/components/form/RangeSlider/RangeSlider.js +30 -29
  162. package/dist/components/form/Rating/rating.module.cjs +1 -1
  163. package/dist/components/form/Rating/rating.module.js +1 -1
  164. package/dist/components/form/RichTextEditor/RichTextEditor.cjs +1 -1
  165. package/dist/components/form/RichTextEditor/RichTextEditor.js +223 -222
  166. package/dist/components/form/RichTextEditor/rich-text-editor.module.cjs +1 -1
  167. package/dist/components/form/RichTextEditor/rich-text-editor.module.js +1 -1
  168. package/dist/components/form/SegmentedControl/SegmentedControl.cjs +1 -1
  169. package/dist/components/form/SegmentedControl/SegmentedControl.js +7 -7
  170. package/dist/components/form/SegmentedControl/segmented-control.module.cjs +1 -1
  171. package/dist/components/form/SegmentedControl/segmented-control.module.js +1 -1
  172. package/dist/components/form/Select/Select.cjs +1 -1
  173. package/dist/components/form/Select/Select.js +112 -111
  174. package/dist/components/form/Select/select.module.cjs +1 -1
  175. package/dist/components/form/Select/select.module.js +1 -1
  176. package/dist/components/form/SignaturePad/SignaturePad.cjs +1 -1
  177. package/dist/components/form/SignaturePad/SignaturePad.js +86 -79
  178. package/dist/components/form/SmartSearchInput/SmartSearchInput.cjs +1 -1
  179. package/dist/components/form/SmartSearchInput/SmartSearchInput.js +63 -62
  180. package/dist/components/form/TagInput/TagInput.cjs +1 -1
  181. package/dist/components/form/TagInput/TagInput.js +68 -67
  182. package/dist/components/form/ThemeToggle/ThemeToggle.cjs +1 -1
  183. package/dist/components/form/ThemeToggle/ThemeToggle.js +68 -67
  184. package/dist/components/form/ThemeToggle/theme-toggle.module.cjs +1 -1
  185. package/dist/components/form/ThemeToggle/theme-toggle.module.js +1 -1
  186. package/dist/components/form/ToggleGroup/ToggleGroup.cjs +1 -1
  187. package/dist/components/form/ToggleGroup/ToggleGroup.js +6 -6
  188. package/dist/components/form/ToggleGroup/toggle-group.module.cjs +1 -1
  189. package/dist/components/form/ToggleGroup/toggle-group.module.js +1 -1
  190. package/dist/components/form/Transfer/Transfer.cjs +1 -1
  191. package/dist/components/form/Transfer/Transfer.js +127 -126
  192. package/dist/components/form/TreeSelect/TreeSelect.cjs +1 -1
  193. package/dist/components/form/TreeSelect/TreeSelect.js +6 -6
  194. package/dist/components/layout/Dashboard/Dashboard.cjs +1 -1
  195. package/dist/components/layout/Dashboard/Dashboard.js +90 -89
  196. package/dist/components/layout/Navbar/Navbar.cjs +1 -1
  197. package/dist/components/layout/Navbar/Navbar.d.ts +1 -1
  198. package/dist/components/layout/Navbar/Navbar.js +1 -1
  199. package/dist/components/layout/Sidebar/Sidebar.d.ts +1 -1
  200. package/dist/components/layout/Splitter/Splitter.cjs +1 -1
  201. package/dist/components/layout/Splitter/Splitter.js +40 -39
  202. package/dist/components/layout/Toolbar/Toolbar.cjs +1 -1
  203. package/dist/components/layout/Toolbar/Toolbar.js +66 -39
  204. package/dist/components/media/Audio/Audio.cjs +1 -1
  205. package/dist/components/media/Audio/Audio.js +90 -89
  206. package/dist/components/media/Audio/components/AudioCustomControls.cjs +1 -1
  207. package/dist/components/media/Audio/components/AudioCustomControls.js +115 -114
  208. package/dist/components/media/Gallery/Gallery.cjs +1 -1
  209. package/dist/components/media/Gallery/Gallery.js +132 -131
  210. package/dist/components/media/ImageCompare/ImageCompare.cjs +1 -1
  211. package/dist/components/media/ImageCompare/ImageCompare.js +72 -71
  212. package/dist/components/media/Lightbox/Lightbox.cjs +1 -1
  213. package/dist/components/media/Lightbox/Lightbox.js +128 -127
  214. package/dist/components/media/Video/Video.cjs +1 -1
  215. package/dist/components/media/Video/Video.js +56 -55
  216. package/dist/components/media/Video/components/VideoAdvancedMenu.cjs +1 -1
  217. package/dist/components/media/Video/components/VideoAdvancedMenu.js +136 -135
  218. package/dist/components/media/Video/components/VideoControls.cjs +1 -1
  219. package/dist/components/media/Video/components/VideoControls.js +103 -102
  220. package/dist/components/navigation/BackTop/BackTop.cjs +1 -1
  221. package/dist/components/navigation/BackTop/BackTop.js +37 -36
  222. package/dist/components/navigation/Breadcrumb/Breadcrumb.cjs +1 -1
  223. package/dist/components/navigation/Breadcrumb/Breadcrumb.js +41 -40
  224. package/dist/components/navigation/CommandPalette/CommandPalette.cjs +1 -1
  225. package/dist/components/navigation/CommandPalette/CommandPalette.js +100 -99
  226. package/dist/components/navigation/CommandPalette/command-palette.module.cjs +1 -1
  227. package/dist/components/navigation/CommandPalette/command-palette.module.js +1 -1
  228. package/dist/components/navigation/HamburgerMenu/HamburgerMenu.cjs +1 -1
  229. package/dist/components/navigation/HamburgerMenu/HamburgerMenu.d.ts +6 -0
  230. package/dist/components/navigation/HamburgerMenu/HamburgerMenu.js +32 -22
  231. package/dist/components/navigation/HamburgerMenu/hamburger-menu.module.cjs +1 -1
  232. package/dist/components/navigation/HamburgerMenu/hamburger-menu.module.js +1 -1
  233. package/dist/components/navigation/Menubar/menubar.module.cjs +1 -1
  234. package/dist/components/navigation/Menubar/menubar.module.js +1 -1
  235. package/dist/components/navigation/Pagination/Pagination.cjs +1 -1
  236. package/dist/components/navigation/Pagination/Pagination.js +39 -38
  237. package/dist/components/navigation/SpeedDial/SpeedDial.cjs +1 -1
  238. package/dist/components/navigation/SpeedDial/SpeedDial.js +50 -47
  239. package/dist/components/navigation/TabBar/tab-bar.module.cjs +1 -1
  240. package/dist/components/navigation/TabBar/tab-bar.module.js +1 -1
  241. package/dist/components/navigation/TabNavigation/tab-navigation.module.cjs +1 -1
  242. package/dist/components/navigation/TabNavigation/tab-navigation.module.js +1 -1
  243. package/dist/components/navigation/Tabs/tabs.module.cjs +1 -1
  244. package/dist/components/navigation/Tabs/tabs.module.js +1 -1
  245. package/dist/components/overlay/ContextMenu/ContextMenu.cjs +1 -1
  246. package/dist/components/overlay/ContextMenu/ContextMenu.js +4 -4
  247. package/dist/components/overlay/Popover/Popover.cjs +1 -1
  248. package/dist/components/overlay/Popover/Popover.js +63 -62
  249. package/dist/components/typography/Spoiler/Spoiler.cjs +1 -1
  250. package/dist/components/typography/Spoiler/Spoiler.js +38 -37
  251. package/dist/components/typography/Spoiler/spoiler.module.cjs +1 -1
  252. package/dist/components/typography/Spoiler/spoiler.module.js +1 -1
  253. package/dist/i18n/generated/common.cjs +2 -0
  254. package/dist/i18n/generated/common.d.ts +3 -0
  255. package/dist/i18n/generated/common.js +570 -0
  256. package/dist/i18n/generated/components.cjs +2 -0
  257. package/dist/i18n/generated/components.d.ts +3 -0
  258. package/dist/i18n/generated/components.js +399 -0
  259. package/dist/i18n/generated/data-display.cjs +2 -0
  260. package/dist/i18n/generated/data-display.d.ts +3 -0
  261. package/dist/i18n/generated/data-display.js +12 -0
  262. package/dist/i18n/generated/form.cjs +2 -0
  263. package/dist/i18n/generated/form.d.ts +3 -0
  264. package/dist/i18n/generated/form.js +321 -0
  265. package/dist/i18n/generated/keys.d.ts +5 -1
  266. package/dist/i18n/generated/locales.cjs +2 -0
  267. package/dist/i18n/generated/locales.d.ts +1 -0
  268. package/dist/i18n/generated/locales.js +9 -0
  269. package/dist/i18n/instance.cjs +1 -1
  270. package/dist/i18n/instance.d.ts +18 -3
  271. package/dist/i18n/instance.js +24 -26
  272. package/dist/i18n/useWimTranslation.cjs +1 -1
  273. package/dist/i18n/useWimTranslation.d.ts +7 -8
  274. package/dist/i18n/useWimTranslation.js +6 -5
  275. package/dist/llms-full.txt +7 -3
  276. package/dist/llms.txt +1 -1
  277. package/dist/locales/en/common.json +1 -1
  278. package/dist/locales/ja/common.json +1 -1
  279. package/dist/locales/pt/common.json +1 -1
  280. package/dist/styles.css +1 -1
  281. package/dist/wimui.umd.css +1 -1
  282. package/dist/wimui.umd.js +5 -5
  283. package/package.json +10 -10
  284. package/dist/i18n/generated/resources.cjs +0 -2
  285. package/dist/i18n/generated/resources.d.ts +0 -4
  286. package/dist/i18n/generated/resources.js +0 -1283
@@ -1,150 +1,152 @@
1
1
  "use client";
2
2
  import { useWimTranslation as e } from "../../../i18n/useWimTranslation.js";
3
- import { Button as t } from "../Button/Button.js";
4
- import { Slider as n } from "../Slider/Slider.js";
5
- import { IconButton as r } from "../IconButton/IconButton.js";
6
- import { Dialog as i, DialogClose as a, DialogContent as o, DialogDescription as s, DialogFooter as c, DialogHeader as l, DialogTitle as u } from "../../overlay/Dialog/Dialog.js";
7
- import d from "./image-cropper.module.js";
8
- import f, { useCallback as p, useEffect as m, useRef as h, useState as g } from "react";
9
- import _ from "classnames";
10
- import { jsx as v, jsxs as y } from "react/jsx-runtime";
3
+ import { commonNs as t } from "../../../i18n/generated/common.js";
4
+ import { Button as n } from "../Button/Button.js";
5
+ import { formNs as r } from "../../../i18n/generated/form.js";
6
+ import { Slider as i } from "../Slider/Slider.js";
7
+ import { IconButton as a } from "../IconButton/IconButton.js";
8
+ import { Dialog as o, DialogClose as s, DialogContent as c, DialogDescription as l, DialogFooter as u, DialogHeader as d, DialogTitle as f } from "../../overlay/Dialog/Dialog.js";
9
+ import p from "./image-cropper.module.js";
10
+ import m, { useCallback as h, useEffect as g, useRef as _, useState as v } from "react";
11
+ import y from "classnames";
12
+ import { jsx as b, jsxs as x } from "react/jsx-runtime";
11
13
  //#region src/components/form/ImageCropper/ImageCropper.tsx
12
- var b = f.forwardRef(({ src: f, aspectRatio: b = 1, circular: x = !1, onCrop: S, showRotation: C = !0, showZoom: w = !0, showApplyButton: T = !0, applyLabel: E, onApply: D, className: O, ...k }, A) => {
13
- let { t: j } = e("form"), [M, N] = g(1), [P, F] = g(0), [I, L] = g({
14
+ var S = m.forwardRef(({ src: m, aspectRatio: S = 1, circular: C = !1, onCrop: w, showRotation: T = !0, showZoom: E = !0, showApplyButton: D = !0, applyLabel: O, onApply: k, className: A, ...j }, M) => {
15
+ let { t: N } = e([r, t]), [P, F] = v(1), [I, L] = v(0), [R, z] = v({
14
16
  x: 0,
15
17
  y: 0
16
- }), [R, z] = g(!1), [B, V] = g({
18
+ }), [B, V] = v(!1), [H, U] = v({
17
19
  x: 0,
18
20
  y: 0
19
- }), [H, U] = g(!1), W = h(null), G = h(null);
20
- m(() => {
21
- L({
21
+ }), [W, G] = v(!1), K = _(null), q = _(null);
22
+ g(() => {
23
+ z({
22
24
  x: 0,
23
25
  y: 0
24
- }), N(1), F(0);
25
- }, [f]);
26
- let K = (e) => {
27
- z(!0), V({
28
- x: e.clientX - I.x,
29
- y: e.clientY - I.y
26
+ }), F(1), L(0);
27
+ }, [m]);
28
+ let J = (e) => {
29
+ V(!0), U({
30
+ x: e.clientX - R.x,
31
+ y: e.clientY - R.y
30
32
  });
31
- }, q = p((e) => {
32
- R && L({
33
- x: e.clientX - B.x,
34
- y: e.clientY - B.y
33
+ }, Y = h((e) => {
34
+ B && z({
35
+ x: e.clientX - H.x,
36
+ y: e.clientY - H.y
35
37
  });
36
- }, [R, B]), J = p(() => {
37
- z(!1);
38
+ }, [B, H]), X = h(() => {
39
+ V(!1);
38
40
  }, []);
39
- m(() => (R ? (window.addEventListener("mousemove", q), window.addEventListener("mouseup", J)) : (window.removeEventListener("mousemove", q), window.removeEventListener("mouseup", J)), () => {
40
- window.removeEventListener("mousemove", q), window.removeEventListener("mouseup", J);
41
+ g(() => (B ? (window.addEventListener("mousemove", Y), window.addEventListener("mouseup", X)) : (window.removeEventListener("mousemove", Y), window.removeEventListener("mouseup", X)), () => {
42
+ window.removeEventListener("mousemove", Y), window.removeEventListener("mouseup", X);
41
43
  }), [
42
- R,
43
- q,
44
- J
44
+ B,
45
+ Y,
46
+ X
45
47
  ]);
46
- let Y = () => {
47
- F((e) => (e + 90) % 360);
48
- }, X = () => {
49
- U(!0);
50
- }, Z = () => {
51
- let e = f || "";
52
- S?.(e), D?.(e), U(!1);
48
+ let Z = () => {
49
+ L((e) => (e + 90) % 360);
50
+ }, Q = () => {
51
+ G(!0);
52
+ }, $ = () => {
53
+ let e = m || "";
54
+ w?.(e), k?.(e), G(!1);
53
55
  };
54
- return f ? /* @__PURE__ */ y("div", {
55
- ref: A,
56
- className: _("wim-image-cropper", d.root, O),
57
- ...k,
56
+ return m ? /* @__PURE__ */ x("div", {
57
+ ref: M,
58
+ className: y("wim-image-cropper", p.root, A),
59
+ ...j,
58
60
  children: [
59
- /* @__PURE__ */ y("div", {
60
- ref: G,
61
- className: d.viewer,
62
- onMouseDown: K,
61
+ /* @__PURE__ */ x("div", {
62
+ ref: q,
63
+ className: p.viewer,
64
+ onMouseDown: J,
63
65
  role: "presentation",
64
- children: [/* @__PURE__ */ v("div", {
65
- className: d.imageContainer,
66
- children: /* @__PURE__ */ v("img", {
67
- ref: W,
68
- src: f,
69
- alt: j("a11y.crop_target"),
70
- className: d.image,
71
- style: { transform: `translate(${I.x}px, ${I.y}px) rotate(${P}deg) scale(${M})` },
66
+ children: [/* @__PURE__ */ b("div", {
67
+ className: p.imageContainer,
68
+ children: /* @__PURE__ */ b("img", {
69
+ ref: K,
70
+ src: m,
71
+ alt: N("a11y.crop_target"),
72
+ className: p.image,
73
+ style: { transform: `translate(${R.x}px, ${R.y}px) rotate(${I}deg) scale(${P})` },
72
74
  draggable: !1
73
75
  })
74
- }), /* @__PURE__ */ v("div", {
75
- className: d.overlay,
76
- children: /* @__PURE__ */ v("div", {
77
- className: _(d.cropArea, { [d.circular]: x }),
78
- style: { aspectRatio: b }
76
+ }), /* @__PURE__ */ b("div", {
77
+ className: p.overlay,
78
+ children: /* @__PURE__ */ b("div", {
79
+ className: y(p.cropArea, { [p.circular]: C }),
80
+ style: { aspectRatio: S }
79
81
  })
80
82
  })]
81
83
  }),
82
- /* @__PURE__ */ y("div", {
83
- className: d.controls,
84
+ /* @__PURE__ */ x("div", {
85
+ className: p.controls,
84
86
  children: [
85
- w && /* @__PURE__ */ v("div", {
86
- className: d.zoomControl,
87
- children: /* @__PURE__ */ v(n, {
87
+ E && /* @__PURE__ */ b("div", {
88
+ className: p.zoomControl,
89
+ children: /* @__PURE__ */ b(i, {
88
90
  min: 1,
89
91
  max: 3,
90
92
  step: .1,
91
- value: M,
92
- onChange: (e) => N(e),
93
- label: j("image_cropper.zoom"),
94
- styles: { root: d.zoomSlider }
93
+ value: P,
94
+ onChange: (e) => F(e),
95
+ label: N("image_cropper.zoom"),
96
+ styles: { root: p.zoomSlider }
95
97
  })
96
98
  }),
97
- C && /* @__PURE__ */ v("div", {
98
- className: d.rotationControl,
99
- children: /* @__PURE__ */ v(r, {
99
+ T && /* @__PURE__ */ b("div", {
100
+ className: p.rotationControl,
101
+ children: /* @__PURE__ */ b(a, {
100
102
  iconName: "RefreshIcon",
101
- onClick: Y,
102
- "aria-label": j("image_cropper.rotate"),
103
+ onClick: Z,
104
+ "aria-label": N("image_cropper.rotate"),
103
105
  variant: "outline",
104
106
  size: "sm"
105
107
  })
106
108
  }),
107
- T && /* @__PURE__ */ v("div", {
108
- className: d.applyControl,
109
- children: /* @__PURE__ */ v(t, {
110
- onClick: X,
109
+ D && /* @__PURE__ */ b("div", {
110
+ className: p.applyControl,
111
+ children: /* @__PURE__ */ b(n, {
112
+ onClick: Q,
111
113
  size: "sm",
112
114
  variant: "solid",
113
- children: E || j("image_cropper.apply")
115
+ children: O || N("image_cropper.apply")
114
116
  })
115
117
  })
116
118
  ]
117
119
  }),
118
- /* @__PURE__ */ v(i, {
119
- open: H,
120
- onOpenChange: U,
121
- children: /* @__PURE__ */ y(o, { children: [
122
- /* @__PURE__ */ v(l, { children: /* @__PURE__ */ v(u, { children: j("image_cropper.confirm_title") }) }),
123
- /* @__PURE__ */ v(s, { children: j("image_cropper.confirm_message") }),
124
- /* @__PURE__ */ y(c, { children: [/* @__PURE__ */ v(a, {
120
+ /* @__PURE__ */ b(o, {
121
+ open: W,
122
+ onOpenChange: G,
123
+ children: /* @__PURE__ */ x(c, { children: [
124
+ /* @__PURE__ */ b(d, { children: /* @__PURE__ */ b(f, { children: N("image_cropper.confirm_title") }) }),
125
+ /* @__PURE__ */ b(l, { children: N("image_cropper.confirm_message") }),
126
+ /* @__PURE__ */ x(u, { children: [/* @__PURE__ */ b(s, {
125
127
  asChild: !0,
126
- children: /* @__PURE__ */ v(t, {
128
+ children: /* @__PURE__ */ b(n, {
127
129
  variant: "ghost",
128
- children: j("image_cropper.cancel")
130
+ children: N("image_cropper.cancel")
129
131
  })
130
- }), /* @__PURE__ */ v(t, {
131
- onClick: Z,
132
+ }), /* @__PURE__ */ b(n, {
133
+ onClick: $,
132
134
  variant: "solid",
133
- children: j("image_cropper.confirm")
135
+ children: N("image_cropper.confirm")
134
136
  })] })
135
137
  ] })
136
138
  })
137
139
  ]
138
- }) : /* @__PURE__ */ v("div", {
139
- ref: A,
140
- className: _("wim-image-cropper", d.root, d.empty, O),
141
- ...k,
142
- children: /* @__PURE__ */ v("div", {
143
- className: d.emptyContent,
144
- children: j("image_cropper.no_image")
140
+ }) : /* @__PURE__ */ b("div", {
141
+ ref: M,
142
+ className: y("wim-image-cropper", p.root, p.empty, A),
143
+ ...j,
144
+ children: /* @__PURE__ */ b("div", {
145
+ className: p.emptyContent,
146
+ children: N("image_cropper.no_image")
145
147
  })
146
148
  });
147
149
  });
148
- b.displayName = "ImageCropper";
150
+ S.displayName = "ImageCropper";
149
151
  //#endregion
150
- export { b as ImageCropper };
152
+ export { S as ImageCropper };
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../i18n/useWimTranslation.cjs"),n=require("../FieldTemplate/FieldTemplate.cjs"),r=require("../Input/Input.cjs"),i=require("../IconButton/IconButton.cjs"),a=require("./inline-edit.module.cjs");let o=require("react");o=e.__toESM(o,1);let s=require("classnames");s=e.__toESM(s,1);let c=require("react/jsx-runtime");var l=o.default.forwardRef(({value:e,defaultValue:l,onChange:u,onSave:d,onCancel:f,onEdit:p,placeholder:m,disabled:h=!1,fullWidth:g=!1,label:_,className:v,"aria-label":y,...b},x)=>{let{t:S}=t.useWimTranslation(`common`),[C,w]=(0,o.useState)(!1),[T,E]=(0,o.useState)(l??``),[D,O]=(0,o.useState)(l??``),k=(0,o.useRef)(null),A=e!==void 0,j=A?e:D,M=()=>{h||(A||O(T),w(!0),p?.())},N=()=>{h||(A||E(j),w(!1),d?.(j))},P=()=>{h||(A||O(T),w(!1),f?.())},F=e=>{let t=e.target.value;A||O(t),u?.(t)},I=e=>{e.key===`Enter`?(e.preventDefault(),N()):e.key===`Escape`&&(e.preventDefault(),P())};return(0,o.useEffect)(()=>{C&&k.current&&k.current.focus()},[C]),(0,c.jsx)(n.FieldTemplate,{label:_,className:v,children:(0,c.jsx)(`div`,{ref:x,className:(0,s.default)(`wim-inline-edit`,a.default.root,g&&a.default.fullWidth,h&&a.default.disabled),...b,children:C?(0,c.jsxs)(`div`,{className:a.default.editWrapper,children:[(0,c.jsx)(r.Input,{ref:k,value:j,onChange:F,onKeyDown:I,disabled:h,placeholder:m,"aria-label":y,fullWidth:g,className:a.default.input}),(0,c.jsxs)(`div`,{className:a.default.editActions,children:[(0,c.jsx)(i.IconButton,{iconName:`CheckIcon`,intent:`success`,variant:`outline`,"aria-label":S(`action.save`),onClick:N,disabled:h}),(0,c.jsx)(i.IconButton,{iconName:`CloseIcon`,intent:`default`,variant:`outline`,"aria-label":S(`action.cancel`),onClick:P,disabled:h})]})]}):(0,c.jsxs)(`div`,{className:a.default.preview,onClick:M,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),M())},tabIndex:h?-1:0,role:`button`,"aria-label":y,"aria-disabled":h,children:[(0,c.jsx)(`span`,{className:(0,s.default)(a.default.text,!j&&a.default.placeholder),children:j||m||`\xA0`}),(0,c.jsx)(`span`,{className:a.default.editIconWrapper,children:(0,c.jsx)(i.IconButton,{iconName:`EditIcon`,variant:`ghost`,size:`sm`,tabIndex:-1,"aria-label":S(`action.edit`),"aria-hidden":`true`,asChild:!0,children:(0,c.jsx)(`span`,{})})})]})})})});l.displayName=`InlineEdit`,exports.InlineEdit=l;
2
+ const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../i18n/useWimTranslation.cjs"),n=require("../../../i18n/generated/common.cjs"),r=require("../FieldTemplate/FieldTemplate.cjs"),i=require("../Input/Input.cjs"),a=require("../IconButton/IconButton.cjs"),o=require("./inline-edit.module.cjs");let s=require("react");s=e.__toESM(s,1);let c=require("classnames");c=e.__toESM(c,1);let l=require("react/jsx-runtime");var u=s.default.forwardRef(({value:e,defaultValue:u,onChange:d,onSave:f,onCancel:p,onEdit:m,placeholder:h,disabled:g=!1,fullWidth:_=!1,label:v,className:y,"aria-label":b,...x},S)=>{let{t:C}=t.useWimTranslation(n.commonNs),[w,T]=(0,s.useState)(!1),[E,D]=(0,s.useState)(u??``),[O,k]=(0,s.useState)(u??``),A=(0,s.useRef)(null),j=e!==void 0,M=j?e:O,N=()=>{g||(j||k(E),T(!0),m?.())},P=()=>{g||(j||D(M),T(!1),f?.(M))},F=()=>{g||(j||k(E),T(!1),p?.())},I=e=>{let t=e.target.value;j||k(t),d?.(t)},L=e=>{e.key===`Enter`?(e.preventDefault(),P()):e.key===`Escape`&&(e.preventDefault(),F())};return(0,s.useEffect)(()=>{w&&A.current&&A.current.focus()},[w]),(0,l.jsx)(r.FieldTemplate,{label:v,className:y,children:(0,l.jsx)(`div`,{ref:S,className:(0,c.default)(`wim-inline-edit`,o.default.root,_&&o.default.fullWidth,g&&o.default.disabled),...x,children:w?(0,l.jsxs)(`div`,{className:o.default.editWrapper,children:[(0,l.jsx)(i.Input,{ref:A,value:M,onChange:I,onKeyDown:L,disabled:g,placeholder:h,"aria-label":b,fullWidth:_,className:o.default.input}),(0,l.jsxs)(`div`,{className:o.default.editActions,children:[(0,l.jsx)(a.IconButton,{iconName:`CheckIcon`,intent:`success`,variant:`outline`,"aria-label":C(`action.save`),onClick:P,disabled:g}),(0,l.jsx)(a.IconButton,{iconName:`CloseIcon`,intent:`default`,variant:`outline`,"aria-label":C(`action.cancel`),onClick:F,disabled:g})]})]}):(0,l.jsxs)(`div`,{className:o.default.preview,onClick:N,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),N())},tabIndex:g?-1:0,role:`button`,"aria-label":b,"aria-disabled":g,children:[(0,l.jsx)(`span`,{className:(0,c.default)(o.default.text,!M&&o.default.placeholder),children:M||h||`\xA0`}),(0,l.jsx)(`span`,{className:o.default.editIconWrapper,children:(0,l.jsx)(a.IconButton,{iconName:`EditIcon`,variant:`ghost`,size:`sm`,tabIndex:-1,"aria-label":C(`action.edit`),"aria-hidden":`true`,asChild:!0,children:(0,l.jsx)(`span`,{})})})]})})})});u.displayName=`InlineEdit`,exports.InlineEdit=u;
@@ -1,95 +1,96 @@
1
1
  "use client";
2
2
  import { useWimTranslation as e } from "../../../i18n/useWimTranslation.js";
3
- import { FieldTemplate as t } from "../FieldTemplate/FieldTemplate.js";
4
- import { Input as n } from "../Input/Input.js";
5
- import { IconButton as r } from "../IconButton/IconButton.js";
6
- import i from "./inline-edit.module.js";
7
- import a, { useEffect as o, useRef as s, useState as c } from "react";
8
- import l from "classnames";
9
- import { jsx as u, jsxs as d } from "react/jsx-runtime";
3
+ import { commonNs as t } from "../../../i18n/generated/common.js";
4
+ import { FieldTemplate as n } from "../FieldTemplate/FieldTemplate.js";
5
+ import { Input as r } from "../Input/Input.js";
6
+ import { IconButton as i } from "../IconButton/IconButton.js";
7
+ import a from "./inline-edit.module.js";
8
+ import o, { useEffect as s, useRef as c, useState as l } from "react";
9
+ import u from "classnames";
10
+ import { jsx as d, jsxs as f } from "react/jsx-runtime";
10
11
  //#region src/components/form/InlineEdit/InlineEdit.tsx
11
- var f = a.forwardRef(({ value: a, defaultValue: f, onChange: p, onSave: m, onCancel: h, onEdit: g, placeholder: _, disabled: v = !1, fullWidth: y = !1, label: b, className: x, "aria-label": S, ...C }, w) => {
12
- let { t: T } = e("common"), [E, D] = c(!1), [O, k] = c(f ?? ""), [A, j] = c(f ?? ""), M = s(null), N = a !== void 0, P = N ? a : A, F = () => {
13
- v || (N || j(O), D(!0), g?.());
14
- }, I = () => {
15
- v || (N || k(P), D(!1), m?.(P));
12
+ var p = o.forwardRef(({ value: o, defaultValue: p, onChange: m, onSave: h, onCancel: g, onEdit: _, placeholder: v, disabled: y = !1, fullWidth: b = !1, label: x, className: S, "aria-label": C, ...w }, T) => {
13
+ let { t: E } = e(t), [D, O] = l(!1), [k, A] = l(p ?? ""), [j, M] = l(p ?? ""), N = c(null), P = o !== void 0, F = P ? o : j, I = () => {
14
+ y || (P || M(k), O(!0), _?.());
16
15
  }, L = () => {
17
- v || (N || j(O), D(!1), h?.());
18
- }, R = (e) => {
19
- let t = e.target.value;
20
- N || j(t), p?.(t);
16
+ y || (P || A(F), O(!1), h?.(F));
17
+ }, R = () => {
18
+ y || (P || M(k), O(!1), g?.());
21
19
  }, z = (e) => {
22
- e.key === "Enter" ? (e.preventDefault(), I()) : e.key === "Escape" && (e.preventDefault(), L());
20
+ let t = e.target.value;
21
+ P || M(t), m?.(t);
22
+ }, B = (e) => {
23
+ e.key === "Enter" ? (e.preventDefault(), L()) : e.key === "Escape" && (e.preventDefault(), R());
23
24
  };
24
- return o(() => {
25
- E && M.current && M.current.focus();
26
- }, [E]), /* @__PURE__ */ u(t, {
27
- label: b,
28
- className: x,
29
- children: /* @__PURE__ */ u("div", {
30
- ref: w,
31
- className: l("wim-inline-edit", i.root, y && i.fullWidth, v && i.disabled),
32
- ...C,
33
- children: E ? /* @__PURE__ */ d("div", {
34
- className: i.editWrapper,
35
- children: [/* @__PURE__ */ u(n, {
36
- ref: M,
37
- value: P,
38
- onChange: R,
39
- onKeyDown: z,
40
- disabled: v,
41
- placeholder: _,
42
- "aria-label": S,
43
- fullWidth: y,
44
- className: i.input
45
- }), /* @__PURE__ */ d("div", {
46
- className: i.editActions,
47
- children: [/* @__PURE__ */ u(r, {
25
+ return s(() => {
26
+ D && N.current && N.current.focus();
27
+ }, [D]), /* @__PURE__ */ d(n, {
28
+ label: x,
29
+ className: S,
30
+ children: /* @__PURE__ */ d("div", {
31
+ ref: T,
32
+ className: u("wim-inline-edit", a.root, b && a.fullWidth, y && a.disabled),
33
+ ...w,
34
+ children: D ? /* @__PURE__ */ f("div", {
35
+ className: a.editWrapper,
36
+ children: [/* @__PURE__ */ d(r, {
37
+ ref: N,
38
+ value: F,
39
+ onChange: z,
40
+ onKeyDown: B,
41
+ disabled: y,
42
+ placeholder: v,
43
+ "aria-label": C,
44
+ fullWidth: b,
45
+ className: a.input
46
+ }), /* @__PURE__ */ f("div", {
47
+ className: a.editActions,
48
+ children: [/* @__PURE__ */ d(i, {
48
49
  iconName: "CheckIcon",
49
50
  intent: "success",
50
51
  variant: "outline",
51
- "aria-label": T("action.save"),
52
- onClick: I,
53
- disabled: v
54
- }), /* @__PURE__ */ u(r, {
52
+ "aria-label": E("action.save"),
53
+ onClick: L,
54
+ disabled: y
55
+ }), /* @__PURE__ */ d(i, {
55
56
  iconName: "CloseIcon",
56
57
  intent: "default",
57
58
  variant: "outline",
58
- "aria-label": T("action.cancel"),
59
- onClick: L,
60
- disabled: v
59
+ "aria-label": E("action.cancel"),
60
+ onClick: R,
61
+ disabled: y
61
62
  })]
62
63
  })]
63
- }) : /* @__PURE__ */ d("div", {
64
- className: i.preview,
65
- onClick: F,
64
+ }) : /* @__PURE__ */ f("div", {
65
+ className: a.preview,
66
+ onClick: I,
66
67
  onKeyDown: (e) => {
67
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), F());
68
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), I());
68
69
  },
69
- tabIndex: v ? -1 : 0,
70
+ tabIndex: y ? -1 : 0,
70
71
  role: "button",
71
- "aria-label": S,
72
- "aria-disabled": v,
73
- children: [/* @__PURE__ */ u("span", {
74
- className: l(i.text, !P && i.placeholder),
75
- children: P || _ || "\xA0"
76
- }), /* @__PURE__ */ u("span", {
77
- className: i.editIconWrapper,
78
- children: /* @__PURE__ */ u(r, {
72
+ "aria-label": C,
73
+ "aria-disabled": y,
74
+ children: [/* @__PURE__ */ d("span", {
75
+ className: u(a.text, !F && a.placeholder),
76
+ children: F || v || "\xA0"
77
+ }), /* @__PURE__ */ d("span", {
78
+ className: a.editIconWrapper,
79
+ children: /* @__PURE__ */ d(i, {
79
80
  iconName: "EditIcon",
80
81
  variant: "ghost",
81
82
  size: "sm",
82
83
  tabIndex: -1,
83
- "aria-label": T("action.edit"),
84
+ "aria-label": E("action.edit"),
84
85
  "aria-hidden": "true",
85
86
  asChild: !0,
86
- children: /* @__PURE__ */ u("span", {})
87
+ children: /* @__PURE__ */ d("span", {})
87
88
  })
88
89
  })]
89
90
  })
90
91
  })
91
92
  });
92
93
  });
93
- f.displayName = "InlineEdit";
94
+ p.displayName = "InlineEdit";
94
95
  //#endregion
95
- export { f as InlineEdit };
96
+ export { p as InlineEdit };
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- var e=`_root_1aqud_2`,t=`_fullWidth_1aqud_9`,n=`_disabled_1aqud_12`,r=`_text_1aqud_16`,i=`_placeholder_1aqud_17`,a=`_editIconWrapper_1aqud_20`,o=`_editWrapper_1aqud_24`,s=`_input_1aqud_29`,c=`_editActions_1aqud_33`,l=`_preview_1aqud_39`,u={root:e,fullWidth:t,disabled:n,text:r,placeholder:i,editIconWrapper:a,editWrapper:o,input:s,editActions:c,preview:l};exports.default=u,exports.disabled=n,exports.editActions=c,exports.editIconWrapper=a,exports.editWrapper=o,exports.fullWidth=t,exports.input=s,exports.placeholder=i,exports.preview=l,exports.root=e,exports.text=r;
2
+ var e=`_root_1ahed_2`,t=`_fullWidth_1ahed_9`,n=`_disabled_1ahed_12`,r=`_text_1ahed_16`,i=`_placeholder_1ahed_17`,a=`_editIconWrapper_1ahed_20`,o=`_editWrapper_1ahed_24`,s=`_input_1ahed_29`,c=`_editActions_1ahed_33`,l=`_preview_1ahed_39`,u={root:e,fullWidth:t,disabled:n,text:r,placeholder:i,editIconWrapper:a,editWrapper:o,input:s,editActions:c,preview:l};exports.default=u,exports.disabled=n,exports.editActions=c,exports.editIconWrapper=a,exports.editWrapper=o,exports.fullWidth=t,exports.input=s,exports.placeholder=i,exports.preview=l,exports.root=e,exports.text=r;
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  //#region src/components/form/InlineEdit/inline-edit.module.scss
3
- var e = "_root_1aqud_2", t = "_fullWidth_1aqud_9", n = "_disabled_1aqud_12", r = "_text_1aqud_16", i = "_placeholder_1aqud_17", a = "_editIconWrapper_1aqud_20", o = "_editWrapper_1aqud_24", s = "_input_1aqud_29", c = "_editActions_1aqud_33", l = "_preview_1aqud_39", u = {
3
+ var e = "_root_1ahed_2", t = "_fullWidth_1ahed_9", n = "_disabled_1ahed_12", r = "_text_1ahed_16", i = "_placeholder_1ahed_17", a = "_editIconWrapper_1ahed_20", o = "_editWrapper_1ahed_24", s = "_input_1ahed_29", c = "_editActions_1ahed_33", l = "_preview_1ahed_39", u = {
4
4
  root: e,
5
5
  fullWidth: t,
6
6
  disabled: n,
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../node_modules/@radix-ui/react-slot/dist/index.cjs"),ee=require("../../../i18n/useWimTranslation.cjs"),n=require("../../../hooks/useMergedRef.cjs"),te=require("../InputBase/InputBase.cjs"),ne=require("../FieldTemplate/FieldTemplate.cjs"),r=require("./input.module.cjs");let i=require("react");i=e.__toESM(i,1);let a=require("classnames");a=e.__toESM(a,1);let o=require("react/jsx-runtime");var s=(0,i.forwardRef)(({intent:e=`default`,variant:s=`outline`,fullWidth:re=!1,className:c,disabled:l,leftIcon:u,rightIcon:d,leftIconColor:f,rightIconColor:ie,onLeftIconClick:p,onRightIconClick:m,allowClear:ae=!1,showPasswordToggle:oe=!0,rightIconClassName:se,rightIconRotated:ce,width:le,value:h,defaultValue:ue,onChange:g,type:_,label:v,error:y,required:b,layout:x,id:S,inputClassName:C,showPasswordAriaLabel:w,hidePasswordAriaLabel:T,rightIconAriaLabel:E,rightIconDecorative:D=!1,suffix:O,styles:k,asChild:A=!1,children:j,...M},N)=>{let{t:P}=ee.useWimTranslation(`common`),F=w??P(`a11y.show_password`),I=T??P(`a11y.hide_password`),L=E??P(`a11y.right_icon_action`),[R,z]=(0,i.useState)(ue??``),[B,V]=(0,i.useState)(!1),H=(0,i.useRef)(null),U=n.useMergedRef(N,H),W=h!==void 0,G=W?h:R,K=l,de=e=>{W||z(e.target.value),g?.(e)},fe=()=>{let e=H.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,`value`)?.set;t?(t.call(e,``),e.dispatchEvent(new Event(`input`,{bubbles:!0}))):(W||z(``),g&&(e.value=``,g({target:e,currentTarget:e}))),W||z(``)},pe=()=>{V(e=>!e)},me=_===`password`&&oe,q=[];me&&q.push({name:B?`EyeOffIcon`:`EyeIcon`,onClick:e=>pe(),ariaLabel:B?I:F}),d&&(q.some(e=>e.name===d)||q.push({name:d,onClick:m,color:ie,ariaLabel:L,decorative:D,className:se,rotated:ce}));let J=_===`password`&&B?`text`:_,Y=y?`danger`:e,he=(0,i.useId)(),X=S||`wim-input-${he}`,Z=y?`${X}-error`:void 0,Q=O!=null&&O!==``?`${X}-suffix`:void 0,ge=[Z,Q].filter(Boolean).join(` `)||void 0,$=v?`${X}-label`:void 0;return(0,o.jsx)(ne.FieldTemplate,{label:v,error:y,required:b,layout:x,labelId:$,htmlFor:X,errorId:Z,className:c,children:(0,o.jsx)(te.InputBase,{intent:Y,variant:s,fullWidth:re,width:le,disabled:K,leftIcon:u,leftIconColor:f,onLeftIconClick:p,rightIcons:q,suffix:O,suffixId:Q,allowClear:ae,hasValue:!!G,onClear:fe,styles:k,children:(0,o.jsx)(A?t.Root:`input`,{id:X,ref:U,className:(0,a.default)(`wim-input`,r.default.root,r.default[Y],K&&r.default.disabled,r.default[s],C),disabled:K,value:G,onChange:de,type:J,"aria-invalid":Y===`danger`,"aria-describedby":ge,"aria-labelledby":v?$:void 0,"aria-required":b,...M,children:A?(0,o.jsx)(t.Slottable,{children:j}):null})})})});s.displayName=`Input`,exports.Input=s,exports.default=s;
2
+ const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../node_modules/@radix-ui/react-slot/dist/index.cjs"),n=require("../../../i18n/useWimTranslation.cjs"),ee=require("../../../i18n/generated/common.cjs"),te=require("../../../hooks/useMergedRef.cjs"),ne=require("../InputBase/InputBase.cjs"),r=require("../FieldTemplate/FieldTemplate.cjs"),i=require("./input.module.cjs");let a=require("react");a=e.__toESM(a,1);let o=require("classnames");o=e.__toESM(o,1);let s=require("react/jsx-runtime");var c=(0,a.forwardRef)(({intent:e=`default`,variant:c=`outline`,fullWidth:re=!1,className:l,disabled:u,leftIcon:d,rightIcon:f,leftIconColor:p,rightIconColor:ie,onLeftIconClick:ae,onRightIconClick:oe,allowClear:se=!1,showPasswordToggle:ce=!0,rightIconClassName:m,rightIconRotated:h,width:g,value:_,defaultValue:v,onChange:y,type:b,label:x,error:S,required:C,layout:w,id:T,inputClassName:E,showPasswordAriaLabel:D,hidePasswordAriaLabel:O,rightIconAriaLabel:k,rightIconDecorative:A=!1,suffix:j,styles:M,asChild:N=!1,children:P,...F},I)=>{let{t:L}=n.useWimTranslation(ee.commonNs),R=D??L(`a11y.show_password`),z=O??L(`a11y.hide_password`),B=k??L(`a11y.right_icon_action`),[le,V]=(0,a.useState)(v??``),[H,U]=(0,a.useState)(!1),W=(0,a.useRef)(null),ue=te.useMergedRef(I,W),G=_!==void 0,K=G?_:le,q=u,de=e=>{G||V(e.target.value),y?.(e)},fe=()=>{let e=W.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,`value`)?.set;t?(t.call(e,``),e.dispatchEvent(new Event(`input`,{bubbles:!0}))):(G||V(``),y&&(e.value=``,y({target:e,currentTarget:e}))),G||V(``)},pe=()=>{U(e=>!e)},me=b===`password`&&ce,J=[];me&&J.push({name:H?`EyeOffIcon`:`EyeIcon`,onClick:e=>pe(),ariaLabel:H?z:R}),f&&(J.some(e=>e.name===f)||J.push({name:f,onClick:oe,color:ie,ariaLabel:B,decorative:A,className:m,rotated:h}));let he=b===`password`&&H?`text`:b,Y=S?`danger`:e,ge=(0,a.useId)(),X=T||`wim-input-${ge}`,Z=S?`${X}-error`:void 0,Q=j!=null&&j!==``?`${X}-suffix`:void 0,_e=[Z,Q].filter(Boolean).join(` `)||void 0,$=x?`${X}-label`:void 0;return(0,s.jsx)(r.FieldTemplate,{label:x,error:S,required:C,layout:w,labelId:$,htmlFor:X,errorId:Z,className:l,children:(0,s.jsx)(ne.InputBase,{intent:Y,variant:c,fullWidth:re,width:g,disabled:q,leftIcon:d,leftIconColor:p,onLeftIconClick:ae,rightIcons:J,suffix:j,suffixId:Q,allowClear:se,hasValue:!!K,onClear:fe,styles:M,children:(0,s.jsx)(N?t.Root:`input`,{id:X,ref:ue,className:(0,o.default)(`wim-input`,i.default.root,i.default[Y],q&&i.default.disabled,i.default[c],E),disabled:q,value:K,onChange:de,type:he,"aria-invalid":Y===`danger`,"aria-describedby":_e,"aria-labelledby":x?$:void 0,"aria-required":C,...F,children:N?(0,s.jsx)(t.Slottable,{children:P}):null})})})});c.displayName=`Input`,exports.Input=c,exports.default=c;
@@ -1,18 +1,19 @@
1
1
  "use client";
2
2
  import { Root as e, Slottable as t } from "../../../node_modules/@radix-ui/react-slot/dist/index.js";
3
3
  import { useWimTranslation as ee } from "../../../i18n/useWimTranslation.js";
4
- import { useMergedRef as te } from "../../../hooks/useMergedRef.js";
5
- import { InputBase as n } from "../InputBase/InputBase.js";
6
- import { FieldTemplate as r } from "../FieldTemplate/FieldTemplate.js";
7
- import i from "./input.module.js";
8
- import { forwardRef as a, useId as o, useRef as s, useState as c } from "react";
9
- import l from "classnames";
10
- import { jsx as u } from "react/jsx-runtime";
4
+ import { commonNs as te } from "../../../i18n/generated/common.js";
5
+ import { useMergedRef as n } from "../../../hooks/useMergedRef.js";
6
+ import { InputBase as r } from "../InputBase/InputBase.js";
7
+ import { FieldTemplate as i } from "../FieldTemplate/FieldTemplate.js";
8
+ import a from "./input.module.js";
9
+ import { forwardRef as o, useId as s, useRef as c, useState as l } from "react";
10
+ import u from "classnames";
11
+ import { jsx as d } from "react/jsx-runtime";
11
12
  //#region src/components/form/Input/Input.tsx
12
- var d = a(({ intent: a = "default", variant: d = "outline", fullWidth: f = !1, className: ne, disabled: re, leftIcon: ie, rightIcon: p, leftIconColor: ae, rightIconColor: oe, onLeftIconClick: m, onRightIconClick: se, allowClear: h = !1, showPasswordToggle: g = !0, rightIconClassName: _, rightIconRotated: ce, width: le, value: v, defaultValue: ue, onChange: y, type: b, label: x, error: S, required: C, layout: w, id: T, inputClassName: E, showPasswordAriaLabel: D, hidePasswordAriaLabel: O, rightIconAriaLabel: k, rightIconDecorative: A = !1, suffix: j, styles: M, asChild: N = !1, children: P, ...F }, I) => {
13
- let { t: L } = ee("common"), R = D ?? L("a11y.show_password"), de = O ?? L("a11y.hide_password"), z = k ?? L("a11y.right_icon_action"), [B, V] = c(ue ?? ""), [H, fe] = c(!1), U = s(null), pe = te(I, U), W = v !== void 0, G = W ? v : B, K = re, me = (e) => {
13
+ var f = o(({ intent: o = "default", variant: f = "outline", fullWidth: p = !1, className: m, disabled: h, leftIcon: ne, rightIcon: g, leftIconColor: re, rightIconColor: ie, onLeftIconClick: ae, onRightIconClick: oe, allowClear: se = !1, showPasswordToggle: ce = !0, rightIconClassName: le, rightIconRotated: ue, width: de, value: _, defaultValue: v, onChange: y, type: b, label: x, error: S, required: C, layout: w, id: T, inputClassName: E, showPasswordAriaLabel: D, hidePasswordAriaLabel: O, rightIconAriaLabel: k, rightIconDecorative: A = !1, suffix: j, styles: M, asChild: N = !1, children: P, ...F }, I) => {
14
+ let { t: L } = ee(te), fe = D ?? L("a11y.show_password"), R = O ?? L("a11y.hide_password"), z = k ?? L("a11y.right_icon_action"), [B, V] = l(v ?? ""), [H, pe] = l(!1), U = c(null), me = n(I, U), W = _ !== void 0, G = W ? _ : B, K = h, he = (e) => {
14
15
  W || V(e.target.value), y?.(e);
15
- }, q = () => {
16
+ }, ge = () => {
16
17
  let e = U.current;
17
18
  if (!e) return;
18
19
  let t = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")?.set;
@@ -20,24 +21,24 @@ var d = a(({ intent: a = "default", variant: d = "outline", fullWidth: f = !1, c
20
21
  target: e,
21
22
  currentTarget: e
22
23
  }))), W || V("");
23
- }, he = () => {
24
- fe((e) => !e);
25
- }, ge = b === "password" && g, J = [];
26
- ge && J.push({
24
+ }, _e = () => {
25
+ pe((e) => !e);
26
+ }, ve = b === "password" && ce, q = [];
27
+ ve && q.push({
27
28
  name: H ? "EyeOffIcon" : "EyeIcon",
28
- onClick: (e) => he(),
29
- ariaLabel: H ? de : R
30
- }), p && (J.some((e) => e.name === p) || J.push({
31
- name: p,
32
- onClick: se,
33
- color: oe,
29
+ onClick: (e) => _e(),
30
+ ariaLabel: H ? R : fe
31
+ }), g && (q.some((e) => e.name === g) || q.push({
32
+ name: g,
33
+ onClick: oe,
34
+ color: ie,
34
35
  ariaLabel: z,
35
36
  decorative: A,
36
- className: _,
37
- rotated: ce
37
+ className: le,
38
+ rotated: ue
38
39
  }));
39
- let _e = b === "password" && H ? "text" : b, Y = S ? "danger" : a, ve = o(), X = T || `wim-input-${ve}`, Z = S ? `${X}-error` : void 0, Q = j != null && j !== "" ? `${X}-suffix` : void 0, ye = [Z, Q].filter(Boolean).join(" ") || void 0, $ = x ? `${X}-label` : void 0;
40
- return /* @__PURE__ */ u(r, {
40
+ let J = b === "password" && H ? "text" : b, Y = S ? "danger" : o, ye = s(), X = T || `wim-input-${ye}`, Z = S ? `${X}-error` : void 0, Q = j != null && j !== "" ? `${X}-suffix` : void 0, be = [Z, Q].filter(Boolean).join(" ") || void 0, $ = x ? `${X}-label` : void 0;
41
+ return /* @__PURE__ */ d(i, {
41
42
  label: x,
42
43
  error: S,
43
44
  required: C,
@@ -45,41 +46,41 @@ var d = a(({ intent: a = "default", variant: d = "outline", fullWidth: f = !1, c
45
46
  labelId: $,
46
47
  htmlFor: X,
47
48
  errorId: Z,
48
- className: ne,
49
- children: /* @__PURE__ */ u(n, {
49
+ className: m,
50
+ children: /* @__PURE__ */ d(r, {
50
51
  intent: Y,
51
- variant: d,
52
- fullWidth: f,
53
- width: le,
52
+ variant: f,
53
+ fullWidth: p,
54
+ width: de,
54
55
  disabled: K,
55
- leftIcon: ie,
56
- leftIconColor: ae,
57
- onLeftIconClick: m,
58
- rightIcons: J,
56
+ leftIcon: ne,
57
+ leftIconColor: re,
58
+ onLeftIconClick: ae,
59
+ rightIcons: q,
59
60
  suffix: j,
60
61
  suffixId: Q,
61
- allowClear: h,
62
+ allowClear: se,
62
63
  hasValue: !!G,
63
- onClear: q,
64
+ onClear: ge,
64
65
  styles: M,
65
- children: /* @__PURE__ */ u(N ? e : "input", {
66
+ children: /* @__PURE__ */ d(N ? e : "input", {
66
67
  id: X,
67
- ref: pe,
68
- className: l("wim-input", i.root, i[Y], K && i.disabled, i[d], E),
68
+ ref: me,
69
+ className: u("wim-input", a.root, a[Y], K && a.disabled, a[f], E),
69
70
  disabled: K,
70
71
  value: G,
71
- onChange: me,
72
- type: _e,
72
+ onChange: he,
73
+ type: J,
73
74
  "aria-invalid": Y === "danger",
74
- "aria-describedby": ye,
75
+ "aria-describedby": be,
75
76
  "aria-labelledby": x ? $ : void 0,
76
77
  "aria-required": C,
77
78
  ...F,
78
- children: N ? /* @__PURE__ */ u(t, { children: P }) : null
79
+ children: N ? /* @__PURE__ */ d(t, { children: P }) : null
79
80
  })
80
81
  })
81
82
  });
82
83
  });
83
- d.displayName = "Input";
84
+ f.displayName = "Input";
84
85
  //#endregion
85
- export { d as Input, d as default };
86
+ export { f as Input, f as default };