kdpa-components 1.35.2 → 1.35.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (234) hide show
  1. package/dist/Accordion/index.d.ts +3 -0
  2. package/dist/Accordion/index.d.ts.map +1 -0
  3. package/dist/Accordion/index.js +481 -0
  4. package/dist/AdvancedList/index.d.ts +2 -0
  5. package/dist/AdvancedList/index.d.ts.map +1 -0
  6. package/dist/AdvancedList/index.js +16751 -0
  7. package/dist/Alert/index.d.ts +5 -0
  8. package/dist/Alert/index.d.ts.map +1 -0
  9. package/dist/Alert/index.js +407 -0
  10. package/dist/ArrowDropDown-76613637.js +35 -0
  11. package/dist/Autocomplete-45ae6737.js +1670 -0
  12. package/dist/Avatar/index.d.ts +3 -0
  13. package/dist/Avatar/index.d.ts.map +1 -0
  14. package/dist/Avatar/index.js +210 -0
  15. package/dist/Badge/index.d.ts +6 -0
  16. package/dist/Badge/index.d.ts.map +1 -0
  17. package/dist/Badge/index.js +69 -0
  18. package/dist/Badge-26e8a2aa.js +392 -0
  19. package/dist/Box-a827334a.js +58 -0
  20. package/dist/Button-b93e890d.js +355 -0
  21. package/dist/ButtonBase-0f9f324d.js +655 -0
  22. package/dist/Buttons/index.d.ts +9 -0
  23. package/dist/Buttons/index.d.ts.map +1 -0
  24. package/dist/Buttons/index.js +83 -0
  25. package/dist/CSSTransition-d0281d1f.js +215 -0
  26. package/dist/Cards/index.d.ts +3 -0
  27. package/dist/Cards/index.d.ts.map +1 -0
  28. package/dist/Cards/index.js +144 -0
  29. package/dist/CheckBox/index.d.ts +3 -0
  30. package/dist/CheckBox/index.d.ts.map +1 -0
  31. package/dist/CheckBox/index.js +32 -0
  32. package/dist/Checkbox-2cb33932.js +199 -0
  33. package/dist/Chip/index.d.ts +3 -0
  34. package/dist/Chip/index.d.ts.map +1 -0
  35. package/dist/Chip/index.js +61 -0
  36. package/dist/Chip-7b1a25ce.js +444 -0
  37. package/dist/CircularProgress-2c55d9ef.js +217 -0
  38. package/dist/Close-ef7a3b6b.js +9 -0
  39. package/dist/CodeEditor/index.d.ts +2 -0
  40. package/dist/CodeEditor/index.d.ts.map +1 -0
  41. package/dist/CodeEditor/index.js +559 -0
  42. package/dist/Collapse/index.d.ts +3 -0
  43. package/dist/Collapse/index.d.ts.map +1 -0
  44. package/dist/Collapse/index.js +23 -0
  45. package/dist/Collapse-4b8b3146.js +299 -0
  46. package/dist/CopyToClipboard/index.d.ts +3 -0
  47. package/dist/CopyToClipboard/index.d.ts.map +1 -0
  48. package/dist/CopyToClipboard/index.js +591 -0
  49. package/dist/Dialog-25ebaee6.js +356 -0
  50. package/dist/Divider/index.d.ts +4 -0
  51. package/dist/Divider/index.d.ts.map +1 -0
  52. package/dist/Divider/index.js +31 -0
  53. package/dist/Divider-cadf67a7.js +231 -0
  54. package/dist/DropZone/index.d.ts +2 -0
  55. package/dist/DropZone/index.d.ts.map +1 -0
  56. package/dist/DropZone/index.js +1348 -0
  57. package/dist/Fade-aabbd0cb.js +163 -0
  58. package/dist/FormControl/index.d.ts +5 -0
  59. package/dist/FormControl/index.d.ts.map +1 -0
  60. package/dist/FormControl/index.js +24 -0
  61. package/dist/FormControl-e7294bde.js +232 -0
  62. package/dist/FormControlLabel-276f1b1e.js +214 -0
  63. package/dist/FullScreenDialog/index.d.ts +3 -0
  64. package/dist/FullScreenDialog/index.d.ts.map +1 -0
  65. package/dist/FullScreenDialog/index.js +42 -0
  66. package/dist/Grid/index.d.ts +3 -0
  67. package/dist/Grid/index.d.ts.map +1 -0
  68. package/dist/Grid/index.js +17 -0
  69. package/dist/Grid-c1f5fe6b.js +486 -0
  70. package/dist/Grow-151a20f6.js +193 -0
  71. package/dist/HTMLElementType-ff213f3c.js +9 -0
  72. package/dist/IconButton-fdbca6d2.js +184 -0
  73. package/dist/Input/index.d.ts +7 -0
  74. package/dist/Input/index.d.ts.map +1 -0
  75. package/dist/Input/index.js +88 -0
  76. package/dist/InputAdornment-3334ace2.js +155 -0
  77. package/dist/KdpaAutoComplete-40e0949e.js +8 -0
  78. package/dist/KdpaCollapse-d9e37824.js +11 -0
  79. package/dist/KdpaFormControl-2d7c1db8.js +6 -0
  80. package/dist/KdpaIconButton-514e0d96.js +23 -0
  81. package/dist/KdpaMenuItem-085f686f.js +36 -0
  82. package/dist/KdpaSecondaryButton-14992523.js +25 -0
  83. package/dist/KeyboardArrowRight-14dbe7d6.js +12 -0
  84. package/dist/LazyDrop/index.d.ts +3 -0
  85. package/dist/LazyDrop/index.d.ts.map +1 -0
  86. package/dist/LazyDrop/index.js +839 -0
  87. package/dist/ListContext-de5072f9.js +7 -0
  88. package/dist/ListItem-2b5c2e20.js +426 -0
  89. package/dist/ListItemText-fcd66149.js +150 -0
  90. package/dist/Loading/KdpaProgress/index.d.ts +3 -0
  91. package/dist/Loading/KdpaProgress/index.d.ts.map +1 -0
  92. package/dist/Loading/KdpaProgress/index.js +56 -0
  93. package/dist/Loading/index.d.ts +6 -0
  94. package/dist/Loading/index.d.ts.map +1 -0
  95. package/dist/Loading/index.js +348 -0
  96. package/dist/MenuItem-cc037c5b.js +240 -0
  97. package/dist/Modal/index.d.ts +2 -0
  98. package/dist/Modal/index.d.ts.map +1 -0
  99. package/dist/Modal/index.js +751 -0
  100. package/dist/Modal-5f23fcfd.js +984 -0
  101. package/dist/PaginationGrid/index.d.ts +3 -0
  102. package/dist/PaginationGrid/index.d.ts.map +1 -0
  103. package/dist/PaginationGrid/index.js +60 -0
  104. package/dist/Paper-aaec61a3.js +163 -0
  105. package/dist/Pickers/index.d.ts +7 -0
  106. package/dist/Pickers/index.d.ts.map +1 -0
  107. package/dist/Pickers/index.js +14408 -0
  108. package/dist/Popper-490e6477.js +490 -0
  109. package/dist/Portal-b4f8657f.js +77 -0
  110. package/dist/Radio/index.d.ts +5 -0
  111. package/dist/Radio/index.d.ts.map +1 -0
  112. package/dist/Radio/index.js +431 -0
  113. package/dist/Segment/index.d.ts +3 -0
  114. package/dist/Segment/index.d.ts.map +1 -0
  115. package/dist/Segment/index.js +84 -0
  116. package/dist/Selects/index.d.ts +7 -0
  117. package/dist/Selects/index.d.ts.map +1 -0
  118. package/dist/Selects/index.js +66 -0
  119. package/dist/SimpleList/index.d.ts +2 -0
  120. package/dist/SimpleList/index.d.ts.map +1 -0
  121. package/dist/SimpleList/index.js +1913 -0
  122. package/dist/Skeleton-263b2beb.js +213 -0
  123. package/dist/Slide-3bc7a346.js +227 -0
  124. package/dist/Slider/index.d.ts +3 -0
  125. package/dist/Slider/index.d.ts.map +1 -0
  126. package/dist/Slider/index.js +1322 -0
  127. package/dist/SweetAlerts/index.d.ts +6 -0
  128. package/dist/SweetAlerts/index.d.ts.map +1 -0
  129. package/dist/SweetAlerts/index.js +1540 -0
  130. package/dist/Switch/index.d.ts +3 -0
  131. package/dist/Switch/index.d.ts.map +1 -0
  132. package/dist/Switch/index.js +39 -0
  133. package/dist/Switch-ef584fc0.js +302 -0
  134. package/dist/SwitchBase-c367ca3c.js +231 -0
  135. package/dist/Tabs/index.d.ts +5 -0
  136. package/dist/Tabs/index.d.ts.map +1 -0
  137. package/dist/Tabs/index.js +63 -0
  138. package/dist/Tabs-9775b0bb.js +1084 -0
  139. package/dist/TextField-b8c731e8.js +4439 -0
  140. package/dist/ThemeProvider/index.d.ts +4 -0
  141. package/dist/ThemeProvider/index.d.ts.map +1 -0
  142. package/dist/ThemeProvider/index.js +294 -0
  143. package/dist/Tooltip-4b1baf1b.js +584 -0
  144. package/dist/Tooltips/index.d.ts +3 -0
  145. package/dist/Tooltips/index.d.ts.map +1 -0
  146. package/dist/Tooltips/index.js +46 -0
  147. package/dist/TransitionGroup-196acb6a.js +185 -0
  148. package/dist/TransitionGroupContext-7435e195.js +10 -0
  149. package/dist/Transitions/index.d.ts +11 -0
  150. package/dist/Transitions/index.d.ts.map +1 -0
  151. package/dist/Transitions/index.js +34 -0
  152. package/dist/Tree/index.d.ts +3 -0
  153. package/dist/Tree/index.d.ts.map +1 -0
  154. package/dist/Tree/index.js +1447 -0
  155. package/dist/TreeSelect/index.d.ts +3 -0
  156. package/dist/TreeSelect/index.d.ts.map +1 -0
  157. package/dist/TreeSelect/index.js +6888 -0
  158. package/dist/Typography/index.d.ts +3 -0
  159. package/dist/Typography/index.d.ts.map +1 -0
  160. package/dist/Typography/index.js +14 -0
  161. package/dist/Typography-dfa51fea.js +176 -0
  162. package/dist/Uploader/index.d.ts +3 -0
  163. package/dist/Uploader/index.d.ts.map +1 -0
  164. package/dist/Uploader/index.js +81 -0
  165. package/dist/Zoom-b84bdc2b.js +163 -0
  166. package/dist/_commonjsHelpers-92157f1b.js +36 -0
  167. package/dist/assertThisInitialized-05701a63.js +8 -0
  168. package/dist/chainPropTypes-004bf492.js +8 -0
  169. package/dist/createChainedFunction-68e2a88d.js +9 -0
  170. package/dist/createSvgIcon-b80a8a41.js +182 -0
  171. package/dist/dividerClasses-99758da7.js +10 -0
  172. package/dist/elementAcceptingRef-803dfd80.js +26 -0
  173. package/dist/elementTypeAcceptingRef-6c34f16b.js +23 -0
  174. package/dist/emotion-is-prop-valid.esm-b7f48706.js +191 -0
  175. package/dist/emotion-memoize.esm-021d0d4e.js +9 -0
  176. package/dist/emotion-react.browser.esm-d563ed65.js +255 -0
  177. package/dist/exactProp-3aaa3ecc.js +13 -0
  178. package/dist/extendSxProp-f7714a31.js +30 -0
  179. package/dist/extends-393586f3.js +22 -0
  180. package/dist/formControlState-9148c46f.js +10 -0
  181. package/dist/hoist-non-react-statics.cjs-ce2f2873.js +236 -0
  182. package/dist/iconBase-800b43ff.js +63 -0
  183. package/dist/identifier-9dfe30d8.js +3320 -0
  184. package/dist/index-116f732f.js +749 -0
  185. package/dist/index-7e2d793d.js +12011 -0
  186. package/dist/index-fa965a10.js +43 -0
  187. package/dist/index.css +1 -1
  188. package/dist/index.d.ts +36 -0
  189. package/dist/index.d.ts.map +1 -0
  190. package/dist/index.esm-b78383d3.js +35 -0
  191. package/dist/isMuiElement-b88a921a.js +7 -0
  192. package/dist/jsx-runtime-944c88e2.js +631 -0
  193. package/dist/kdpaSelect-4ed993c7.js +1 -0
  194. package/dist/listItemTextClasses-d6839c02.js +10 -0
  195. package/dist/ownerDocument-5430cd5b.js +6 -0
  196. package/dist/ownerWindow-e6cc3097.js +20 -0
  197. package/dist/popper-78c6b162.js +1006 -0
  198. package/dist/refType-af1a9f54.js +5 -0
  199. package/dist/setPrototypeOf-98a00546.js +8 -0
  200. package/dist/style.css +1 -0
  201. package/dist/toPropertyKey-e295cd73.js +27 -0
  202. package/dist/types/designerKit/components/GridPanel/PanelWrapper.d.ts +1 -1
  203. package/dist/types/designerKit/components/GridPanel/PanelWrapper.d.ts.map +1 -1
  204. package/dist/types/designerKit/components/Uploader/KdAdvanceFileUploader/DroppedFiles.d.ts.map +1 -1
  205. package/dist/types/designerKit/components/Uploader/KdFileUploader/UploadedItems.d.ts.map +1 -1
  206. package/dist/types/designerKit/utils/typographyHelper.d.ts +1 -2
  207. package/dist/types/designerKit/utils/typographyHelper.d.ts.map +1 -1
  208. package/dist/unsupportedProp-3dbf01f6.js +9 -0
  209. package/dist/useControlled-cc2d41cb.js +31 -0
  210. package/dist/useEventCallback-fe4fd69c.js +16 -0
  211. package/dist/useForkRef-0781dda0.js +15 -0
  212. package/dist/useFormControl-af690c26.js +11 -0
  213. package/dist/useId-e7dff7be.js +19 -0
  214. package/dist/useIsFocusVisible-4693b580.js +68 -0
  215. package/dist/usePreviousProps-c1ae4548.js +10 -0
  216. package/dist/useSlotProps-f238319f.js +74 -0
  217. package/dist/useTheme-014a54ad.js +10 -0
  218. package/dist/useThemeProps-7d04a175.js +513 -0
  219. package/dist/utils-129661c6.js +370 -0
  220. package/package.json +1 -1
  221. package/dist/types/designerKit/components/Alert/Temp.d.ts +0 -3
  222. package/dist/types/designerKit/components/Alert/Temp.d.ts.map +0 -1
  223. package/dist/types/designerKit/components/Form/KdFormField/KdpaFormField.d.ts +0 -12
  224. package/dist/types/designerKit/components/Form/KdFormField/KdpaFormField.d.ts.map +0 -1
  225. package/dist/types/designerKit/components/Tree/useKdTreeHelper.d.ts +0 -5
  226. package/dist/types/designerKit/components/Tree/useKdTreeHelper.d.ts.map +0 -1
  227. package/dist/types/designerKit/components/Uploader/KdAdvanceFileUploader/DroppingFiles.d.ts +0 -9
  228. package/dist/types/designerKit/components/Uploader/KdAdvanceFileUploader/DroppingFiles.d.ts.map +0 -1
  229. package/dist/types/designerKit/components/Uploader/KdUseFileUpload/KdUseFileUpload.d.ts +0 -53
  230. package/dist/types/designerKit/components/Uploader/KdUseFileUpload/KdUseFileUpload.d.ts.map +0 -1
  231. package/dist/types/designerKit/utils/fileUtils.d.ts +0 -19
  232. package/dist/types/designerKit/utils/fileUtils.d.ts.map +0 -1
  233. package/dist/types/designerKit/utils/useTreeHelper.d.ts +0 -17
  234. package/dist/types/designerKit/utils/useTreeHelper.d.ts.map +0 -1
@@ -0,0 +1,751 @@
1
+ import { j as M } from "../jsx-runtime-944c88e2.js";
2
+ import a, { Component as E } from "react";
3
+ function z(t) {
4
+ return z = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
5
+ return typeof e;
6
+ } : function(e) {
7
+ return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
8
+ }, z(t);
9
+ }
10
+ function K(t, e) {
11
+ if (!(t instanceof e))
12
+ throw new TypeError("Cannot call a class as a function");
13
+ }
14
+ function N(t, e) {
15
+ for (var o = 0; o < e.length; o++) {
16
+ var n = e[o];
17
+ n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n);
18
+ }
19
+ }
20
+ function F(t, e, o) {
21
+ return e && N(t.prototype, e), o && N(t, o), Object.defineProperty(t, "prototype", { writable: !1 }), t;
22
+ }
23
+ function q(t, e) {
24
+ if (typeof e != "function" && e !== null)
25
+ throw new TypeError("Super expression must either be null or a function");
26
+ t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && $(t, e);
27
+ }
28
+ function $(t, e) {
29
+ return $ = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, r) {
30
+ return n.__proto__ = r, n;
31
+ }, $(t, e);
32
+ }
33
+ function X(t) {
34
+ var e = J();
35
+ return function() {
36
+ var n = b(t), r;
37
+ if (e) {
38
+ var i = b(this).constructor;
39
+ r = Reflect.construct(n, arguments, i);
40
+ } else
41
+ r = n.apply(this, arguments);
42
+ return Y(this, r);
43
+ };
44
+ }
45
+ function Y(t, e) {
46
+ if (e && (z(e) === "object" || typeof e == "function"))
47
+ return e;
48
+ if (e !== void 0)
49
+ throw new TypeError("Derived constructors may only return object or undefined");
50
+ return G(t);
51
+ }
52
+ function G(t) {
53
+ if (t === void 0)
54
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
55
+ return t;
56
+ }
57
+ function J() {
58
+ if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
59
+ return !1;
60
+ if (typeof Proxy == "function")
61
+ return !0;
62
+ try {
63
+ return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
64
+ })), !0;
65
+ } catch {
66
+ return !1;
67
+ }
68
+ }
69
+ function b(t) {
70
+ return b = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(o) {
71
+ return o.__proto__ || Object.getPrototypeOf(o);
72
+ }, b(t);
73
+ }
74
+ function Q(t, e) {
75
+ if (!document.head.querySelector("#" + t)) {
76
+ var o = document.createElement("style");
77
+ o.textContent = e, o.type = "text/css", o.id = t, document.head.appendChild(o);
78
+ }
79
+ }
80
+ var ee = /* @__PURE__ */ function(t) {
81
+ q(o, t);
82
+ var e = X(o);
83
+ function o() {
84
+ return K(this, o), e.apply(this, arguments);
85
+ }
86
+ return F(o, [{
87
+ key: "componentDidMount",
88
+ value: function() {
89
+ Q(this.props.name, this.props.css);
90
+ }
91
+ }, {
92
+ key: "componentWillUnmount",
93
+ value: function() {
94
+ var r = document.getElementById(this.props.name);
95
+ r.parentNode.removeChild(r);
96
+ }
97
+ }, {
98
+ key: "render",
99
+ value: function() {
100
+ return null;
101
+ }
102
+ }]), o;
103
+ }(E), te = function(e) {
104
+ var o = e.imageBackgroundColor;
105
+ return `
106
+ body {
107
+ overflow: hidden;
108
+ }
109
+
110
+ .__react_modal_image__modal_container {
111
+ position: fixed;
112
+ z-index: 5000;
113
+ left: 0;
114
+ top: 0;
115
+ width: 100%;
116
+ height: 100%;
117
+ background-color: rgba(0, 0, 0, 0.8);
118
+ touch-action: none;
119
+ overflow: hidden;
120
+ }
121
+
122
+ .__react_modal_image__modal_content {
123
+ position: relative;
124
+ height: 100%;
125
+ width: 100%;
126
+ }
127
+
128
+ .__react_modal_image__modal_content img,
129
+ .__react_modal_image__modal_content svg {
130
+ position: absolute;
131
+ top: 50%;
132
+ left: 50%;
133
+ transform: translate3d(-50%, -50%, 0);
134
+ -webkit-transform: translate3d(-50%, -50%, 0);
135
+ -ms-transform: translate3d(-50%, -50%, 0);
136
+ overflow: hidden;
137
+ }
138
+
139
+ .__react_modal_image__medium_img {
140
+ max-width: 98%;
141
+ max-height: 98%;
142
+ background-color: `.concat(o, `;
143
+ }
144
+
145
+ .__react_modal_image__large_img {
146
+ cursor: move;
147
+ background-color: `).concat(o, `
148
+ }
149
+
150
+ .__react_modal_image__icon_menu a {
151
+ display: inline-block;
152
+ font-size: 40px;
153
+ cursor: pointer;
154
+ line-height: 40px;
155
+ box-sizing: border-box;
156
+ border: none;
157
+ padding: 0px 5px 0px 5px;
158
+ margin-left: 10px;
159
+ color: white;
160
+ background-color: rgba(0, 0, 0, 0);
161
+ }
162
+
163
+ .__react_modal_image__icon_menu {
164
+ display: inline-block;
165
+ float: right;
166
+ }
167
+
168
+ .__react_modal_image__caption {
169
+ display: inline-block;
170
+ color: white;
171
+ font-size: 120%;
172
+ padding: 10px;
173
+ margin: 0;
174
+ }
175
+
176
+ .__react_modal_image__header {
177
+ position: absolute;
178
+ top: 0;
179
+ width: 100%;
180
+ background-color: rgba(0, 0, 0, 0.7);
181
+ overflow: hidden;
182
+ }
183
+ `);
184
+ }, ne = function() {
185
+ return /* @__PURE__ */ a.createElement("svg", {
186
+ fill: "#ffffff",
187
+ height: "24",
188
+ viewBox: "0 0 24 24",
189
+ width: "24",
190
+ xmlns: "http://www.w3.org/2000/svg"
191
+ }, /* @__PURE__ */ a.createElement("path", {
192
+ d: "M0 0h24v24H0z",
193
+ fill: "none"
194
+ }), /* @__PURE__ */ a.createElement("path", {
195
+ d: "M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"
196
+ }));
197
+ }, oe = function() {
198
+ return /* @__PURE__ */ a.createElement("svg", {
199
+ fill: "#ffffff",
200
+ height: "24",
201
+ viewBox: "0 0 24 24",
202
+ width: "24",
203
+ xmlns: "http://www.w3.org/2000/svg"
204
+ }, /* @__PURE__ */ a.createElement("path", {
205
+ d: "M0 0h24v24H0z",
206
+ fill: "none"
207
+ }), /* @__PURE__ */ a.createElement("path", {
208
+ d: "M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"
209
+ }));
210
+ }, re = function() {
211
+ return /* @__PURE__ */ a.createElement("svg", {
212
+ fill: "#ffffff",
213
+ height: "24",
214
+ viewBox: "0 0 24 24",
215
+ width: "24",
216
+ xmlns: "http://www.w3.org/2000/svg"
217
+ }, /* @__PURE__ */ a.createElement("path", {
218
+ d: "M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"
219
+ }), /* @__PURE__ */ a.createElement("path", {
220
+ d: "M0 0h24v24H0z",
221
+ fill: "none"
222
+ }));
223
+ }, ae = function() {
224
+ return /* @__PURE__ */ a.createElement("svg", {
225
+ fill: "#ffffff",
226
+ height: "24",
227
+ viewBox: "0 0 24 24",
228
+ width: "24",
229
+ xmlns: "http://www.w3.org/2000/svg"
230
+ }, /* @__PURE__ */ a.createElement("path", {
231
+ d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
232
+ }), /* @__PURE__ */ a.createElement("path", {
233
+ d: "M0 0h24v24H0z",
234
+ fill: "none"
235
+ }));
236
+ }, ie = function() {
237
+ return /* @__PURE__ */ a.createElement("svg", {
238
+ fill: "#ffffff",
239
+ height: "48",
240
+ viewBox: "0 0 24 24",
241
+ width: "48",
242
+ xmlns: "http://www.w3.org/2000/svg"
243
+ }, /* @__PURE__ */ a.createElement("path", {
244
+ d: "M6 2v6h.01L6 8.01 10 12l-4 4 .01.01H6V22h12v-5.99h-.01L18 16l-4-4 4-3.99-.01-.01H18V2H6zm10 14.5V20H8v-3.5l4-4 4 4zm-4-5l-4-4V4h8v3.5l-4 4z"
245
+ }), /* @__PURE__ */ a.createElement("path", {
246
+ d: "M0 0h24v24H0V0z",
247
+ fill: "none"
248
+ }));
249
+ }, le = function() {
250
+ return /* @__PURE__ */ a.createElement("svg", {
251
+ fill: "#ffffff",
252
+ width: "24",
253
+ height: "24",
254
+ viewBox: "0 0 24 24",
255
+ xmlns: "http://www.w3.org/2000/svg"
256
+ }, /* @__PURE__ */ a.createElement("path", {
257
+ fill: "none",
258
+ d: "M0 0h24v24H0V0zm0 0h24v24H0V0z"
259
+ }), /* @__PURE__ */ a.createElement("path", {
260
+ d: "M7.47 21.49C4.2 19.93 1.86 16.76 1.5 13H0c.51 6.16 5.66 11 11.95 11 .23 0 .44-.02.66-.03L8.8 20.15l-1.33 1.34zM12.05 0c-.23 0-.44.02-.66.04l3.81 3.81 1.33-1.33C19.8 4.07 22.14 7.24 22.5 11H24c-.51-6.16-5.66-11-11.95-11zM16 14h2V8c0-1.11-.9-2-2-2h-6v2h6v6zm-8 2V4H6v2H4v2h2v8c0 1.1.89 2 2 2h8v2h2v-2h2v-2H8z"
261
+ }));
262
+ };
263
+ function ce(t) {
264
+ return document.location.hostname !== new URL(t, document.location).hostname;
265
+ }
266
+ var ue = function(e) {
267
+ return function(o) {
268
+ ce(e) && (o.preventDefault(), fetch(e).then(function(n) {
269
+ return n.ok || console.error("Failed to download image, HTTP status " + n.status + " from " + e), n.blob().then(function(r) {
270
+ var i = document.createElement("a");
271
+ i.setAttribute("download", e.split("/").pop()), i.href = URL.createObjectURL(r), i.click();
272
+ });
273
+ }).catch(function(n) {
274
+ console.error(n), console.error("Failed to download image from " + e);
275
+ }));
276
+ };
277
+ }, fe = function(e) {
278
+ var o = e.image, n = e.alt, r = e.zoomed, i = e.toggleZoom, c = e.toggleRotate, l = e.onClose, u = e.enableDownload, f = e.enableZoom, m = e.enableRotate;
279
+ return /* @__PURE__ */ a.createElement("div", {
280
+ className: "__react_modal_image__header"
281
+ }, /* @__PURE__ */ a.createElement("span", {
282
+ className: "__react_modal_image__icon_menu"
283
+ }, u && /* @__PURE__ */ a.createElement("a", {
284
+ href: o,
285
+ download: !0,
286
+ onClick: ue(o)
287
+ }, /* @__PURE__ */ a.createElement(re, null)), f && /* @__PURE__ */ a.createElement("a", {
288
+ onClick: i
289
+ }, r ? /* @__PURE__ */ a.createElement(oe, null) : /* @__PURE__ */ a.createElement(ne, null)), m && /* @__PURE__ */ a.createElement("a", {
290
+ onClick: c
291
+ }, /* @__PURE__ */ a.createElement(le, null)), /* @__PURE__ */ a.createElement("a", {
292
+ onClick: l
293
+ }, /* @__PURE__ */ a.createElement(ae, null))), n && /* @__PURE__ */ a.createElement("span", {
294
+ className: "__react_modal_image__caption"
295
+ }, n));
296
+ };
297
+ function k(t) {
298
+ return k = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
299
+ return typeof e;
300
+ } : function(e) {
301
+ return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
302
+ }, k(t);
303
+ }
304
+ function se(t, e) {
305
+ if (!(t instanceof e))
306
+ throw new TypeError("Cannot call a class as a function");
307
+ }
308
+ function Z(t, e) {
309
+ for (var o = 0; o < e.length; o++) {
310
+ var n = e[o];
311
+ n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n);
312
+ }
313
+ }
314
+ function me(t, e, o) {
315
+ return e && Z(t.prototype, e), o && Z(t, o), Object.defineProperty(t, "prototype", { writable: !1 }), t;
316
+ }
317
+ function de(t, e) {
318
+ if (typeof e != "function" && e !== null)
319
+ throw new TypeError("Super expression must either be null or a function");
320
+ t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && T(t, e);
321
+ }
322
+ function T(t, e) {
323
+ return T = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, r) {
324
+ return n.__proto__ = r, n;
325
+ }, T(t, e);
326
+ }
327
+ function he(t) {
328
+ var e = ye();
329
+ return function() {
330
+ var n = w(t), r;
331
+ if (e) {
332
+ var i = w(this).constructor;
333
+ r = Reflect.construct(n, arguments, i);
334
+ } else
335
+ r = n.apply(this, arguments);
336
+ return pe(this, r);
337
+ };
338
+ }
339
+ function pe(t, e) {
340
+ if (e && (k(e) === "object" || typeof e == "function"))
341
+ return e;
342
+ if (e !== void 0)
343
+ throw new TypeError("Derived constructors may only return object or undefined");
344
+ return v(t);
345
+ }
346
+ function v(t) {
347
+ if (t === void 0)
348
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
349
+ return t;
350
+ }
351
+ function ye() {
352
+ if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
353
+ return !1;
354
+ if (typeof Proxy == "function")
355
+ return !0;
356
+ try {
357
+ return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
358
+ })), !0;
359
+ } catch {
360
+ return !1;
361
+ }
362
+ }
363
+ function w(t) {
364
+ return w = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(o) {
365
+ return o.__proto__ || Object.getPrototypeOf(o);
366
+ }, w(t);
367
+ }
368
+ function D(t, e, o) {
369
+ return e in t ? Object.defineProperty(t, e, { value: o, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = o, t;
370
+ }
371
+ var V = /* @__PURE__ */ function(t) {
372
+ de(o, t);
373
+ var e = he(o);
374
+ function o() {
375
+ var n;
376
+ se(this, o);
377
+ for (var r = arguments.length, i = new Array(r), c = 0; c < r; c++)
378
+ i[c] = arguments[c];
379
+ return n = e.call.apply(e, [this].concat(i)), D(v(n), "state", {
380
+ loading: !0
381
+ }), D(v(n), "handleOnLoad", function() {
382
+ n.setState({
383
+ loading: !1
384
+ });
385
+ }), D(v(n), "handleOnContextMenu", function(l) {
386
+ !n.props.contextMenu && l.preventDefault();
387
+ }), n;
388
+ }
389
+ return me(o, [{
390
+ key: "render",
391
+ value: function() {
392
+ var r = this.props, i = r.id, c = r.className, l = r.src, u = r.style, f = r.handleDoubleClick;
393
+ return /* @__PURE__ */ a.createElement("div", null, this.state.loading && /* @__PURE__ */ a.createElement(ie, null), /* @__PURE__ */ a.createElement("img", {
394
+ id: i,
395
+ className: c,
396
+ src: l,
397
+ style: u,
398
+ onLoad: this.handleOnLoad,
399
+ onDoubleClick: f,
400
+ onContextMenu: this.handleOnContextMenu
401
+ }));
402
+ }
403
+ }]), o;
404
+ }(E);
405
+ function I(t) {
406
+ return I = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
407
+ return typeof e;
408
+ } : function(e) {
409
+ return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
410
+ }, I(t);
411
+ }
412
+ function ge(t, e) {
413
+ if (!(t instanceof e))
414
+ throw new TypeError("Cannot call a class as a function");
415
+ }
416
+ function L(t, e) {
417
+ for (var o = 0; o < e.length; o++) {
418
+ var n = e[o];
419
+ n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n);
420
+ }
421
+ }
422
+ function _e(t, e, o) {
423
+ return e && L(t.prototype, e), o && L(t, o), Object.defineProperty(t, "prototype", { writable: !1 }), t;
424
+ }
425
+ function ve(t, e) {
426
+ if (typeof e != "function" && e !== null)
427
+ throw new TypeError("Super expression must either be null or a function");
428
+ t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && j(t, e);
429
+ }
430
+ function j(t, e) {
431
+ return j = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, r) {
432
+ return n.__proto__ = r, n;
433
+ }, j(t, e);
434
+ }
435
+ function be(t) {
436
+ var e = Oe();
437
+ return function() {
438
+ var n = O(t), r;
439
+ if (e) {
440
+ var i = O(this).constructor;
441
+ r = Reflect.construct(n, arguments, i);
442
+ } else
443
+ r = n.apply(this, arguments);
444
+ return we(this, r);
445
+ };
446
+ }
447
+ function we(t, e) {
448
+ if (e && (I(e) === "object" || typeof e == "function"))
449
+ return e;
450
+ if (e !== void 0)
451
+ throw new TypeError("Derived constructors may only return object or undefined");
452
+ return s(t);
453
+ }
454
+ function s(t) {
455
+ if (t === void 0)
456
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
457
+ return t;
458
+ }
459
+ function Oe() {
460
+ if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
461
+ return !1;
462
+ if (typeof Proxy == "function")
463
+ return !0;
464
+ try {
465
+ return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
466
+ })), !0;
467
+ } catch {
468
+ return !1;
469
+ }
470
+ }
471
+ function O(t) {
472
+ return O = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(o) {
473
+ return o.__proto__ || Object.getPrototypeOf(o);
474
+ }, O(t);
475
+ }
476
+ function d(t, e, o) {
477
+ return e in t ? Object.defineProperty(t, e, { value: o, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = o, t;
478
+ }
479
+ var xe = /* @__PURE__ */ function(t) {
480
+ ve(o, t);
481
+ var e = be(o);
482
+ function o() {
483
+ var n;
484
+ ge(this, o);
485
+ for (var r = arguments.length, i = new Array(r), c = 0; c < r; c++)
486
+ i[c] = arguments[c];
487
+ return n = e.call.apply(e, [this].concat(i)), d(s(n), "state", {
488
+ move: {
489
+ x: 0,
490
+ y: 0
491
+ },
492
+ moveStart: void 0,
493
+ zoomed: !1,
494
+ rotationDeg: 0
495
+ }), d(s(n), "handleKeyDown", function(l) {
496
+ (l.keyCode === 27 || l.keyCode === 13) && n.props.onClose();
497
+ }), d(s(n), "getCoordinatesIfOverImg", function(l) {
498
+ var u = l.changedTouches ? l.changedTouches[0] : l;
499
+ if (u.target.id === "react-modal-image-img") {
500
+ var f = n.contentEl.getBoundingClientRect(), m = u.clientX - f.left, y = u.clientY - f.top;
501
+ return {
502
+ x: m,
503
+ y
504
+ };
505
+ }
506
+ }), d(s(n), "handleMouseDownOrTouchStart", function(l) {
507
+ if (l.preventDefault(), !(l.touches && l.touches.length > 1)) {
508
+ var u = n.getCoordinatesIfOverImg(l);
509
+ u || n.props.onClose(), n.state.zoomed && n.setState(function(f) {
510
+ return {
511
+ moveStart: {
512
+ x: u.x - f.move.x,
513
+ y: u.y - f.move.y
514
+ }
515
+ };
516
+ });
517
+ }
518
+ }), d(s(n), "handleMouseMoveOrTouchMove", function(l) {
519
+ if (l.preventDefault(), !(!n.state.zoomed || !n.state.moveStart) && !(l.touches && l.touches.length > 1)) {
520
+ var u = n.getCoordinatesIfOverImg(l);
521
+ u && n.setState(function(f) {
522
+ return {
523
+ move: {
524
+ x: u.x - f.moveStart.x,
525
+ y: u.y - f.moveStart.y
526
+ }
527
+ };
528
+ });
529
+ }
530
+ }), d(s(n), "handleMouseUpOrTouchEnd", function(l) {
531
+ n.setState({
532
+ moveStart: void 0
533
+ });
534
+ }), d(s(n), "toggleZoom", function(l) {
535
+ l.preventDefault(), n.setState(function(u) {
536
+ return {
537
+ zoomed: !u.zoomed,
538
+ // reset position if zoomed out
539
+ move: u.zoomed ? {
540
+ x: 0,
541
+ y: 0
542
+ } : u.move
543
+ };
544
+ });
545
+ }), d(s(n), "toggleRotate", function(l) {
546
+ l.preventDefault();
547
+ var u = n.state.rotationDeg;
548
+ if (u === 360) {
549
+ n.setState({
550
+ rotationDeg: 90
551
+ });
552
+ return;
553
+ }
554
+ n.setState(function(f) {
555
+ return {
556
+ rotationDeg: f.rotationDeg += 90
557
+ };
558
+ });
559
+ }), n;
560
+ }
561
+ return _e(o, [{
562
+ key: "componentDidMount",
563
+ value: function() {
564
+ document.addEventListener("keydown", this.handleKeyDown, !1);
565
+ }
566
+ }, {
567
+ key: "componentWillUnmount",
568
+ value: function() {
569
+ document.removeEventListener("keydown", this.handleKeyDown, !1);
570
+ }
571
+ }, {
572
+ key: "render",
573
+ value: function() {
574
+ var r = this, i = this.props, c = i.medium, l = i.large, u = i.alt, f = i.onClose, m = i.hideDownload, y = i.hideZoom, S = i.showRotate, _ = i.imageBackgroundColor, R = _ === void 0 ? "black" : _, g = this.state, h = g.move, P = g.zoomed, p = g.rotationDeg;
575
+ return /* @__PURE__ */ a.createElement("div", null, /* @__PURE__ */ a.createElement(ee, {
576
+ name: "__react_modal_image__lightbox",
577
+ css: te({
578
+ imageBackgroundColor: R
579
+ })
580
+ }), /* @__PURE__ */ a.createElement("div", {
581
+ className: "__react_modal_image__modal_container"
582
+ }, /* @__PURE__ */ a.createElement("div", {
583
+ className: "__react_modal_image__modal_content",
584
+ onMouseDown: this.handleMouseDownOrTouchStart,
585
+ onMouseUp: this.handleMouseUpOrTouchEnd,
586
+ onMouseMove: this.handleMouseMoveOrTouchMove,
587
+ onTouchStart: this.handleMouseDownOrTouchStart,
588
+ onTouchEnd: this.handleMouseUpOrTouchEnd,
589
+ onTouchMove: this.handleMouseMoveOrTouchMove,
590
+ ref: function(A) {
591
+ r.contentEl = A;
592
+ }
593
+ }, P && /* @__PURE__ */ a.createElement(V, {
594
+ id: "react-modal-image-img",
595
+ className: "__react_modal_image__large_img",
596
+ src: l || c,
597
+ style: {
598
+ transform: "translate3d(-50%, -50%, 0) translate3d(".concat(h.x, "px, ").concat(h.y, "px, 0) rotate(").concat(p, "deg)"),
599
+ WebkitTransform: "translate3d(-50%, -50%, 0) translate3d(".concat(h.x, "px, ").concat(h.y, "px, 0) rotate(").concat(p, "deg)"),
600
+ MsTransform: "translate3d(-50%, -50%, 0) translate3d(".concat(h.x, "px, ").concat(h.y, "px, 0) rotate(").concat(p, "deg)")
601
+ },
602
+ handleDoubleClick: this.toggleZoom
603
+ }), !P && /* @__PURE__ */ a.createElement(V, {
604
+ id: "react-modal-image-img",
605
+ className: "__react_modal_image__medium_img",
606
+ src: c || l,
607
+ handleDoubleClick: this.toggleZoom,
608
+ contextMenu: !c,
609
+ style: {
610
+ transform: "translate3d(-50%, -50%, 0) rotate(".concat(p, "deg)"),
611
+ WebkitTransform: "translate3d(-50%, -50%, 0) rotate(".concat(p, "deg)"),
612
+ MsTransform: "translate3d(-50%, -50%, 0) rotate(".concat(p, "deg)")
613
+ }
614
+ })), /* @__PURE__ */ a.createElement(fe, {
615
+ image: l || c,
616
+ alt: u,
617
+ zoomed: P,
618
+ toggleZoom: this.toggleZoom,
619
+ toggleRotate: this.toggleRotate,
620
+ onClose: f,
621
+ enableDownload: !m,
622
+ enableZoom: !y,
623
+ enableRotate: !!S
624
+ })));
625
+ }
626
+ }]), o;
627
+ }(E);
628
+ function H(t) {
629
+ return H = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
630
+ return typeof e;
631
+ } : function(e) {
632
+ return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
633
+ }, H(t);
634
+ }
635
+ function Ee(t, e) {
636
+ if (!(t instanceof e))
637
+ throw new TypeError("Cannot call a class as a function");
638
+ }
639
+ function U(t, e) {
640
+ for (var o = 0; o < e.length; o++) {
641
+ var n = e[o];
642
+ n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n);
643
+ }
644
+ }
645
+ function Se(t, e, o) {
646
+ return e && U(t.prototype, e), o && U(t, o), Object.defineProperty(t, "prototype", { writable: !1 }), t;
647
+ }
648
+ function Re(t, e) {
649
+ if (typeof e != "function" && e !== null)
650
+ throw new TypeError("Super expression must either be null or a function");
651
+ t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && C(t, e);
652
+ }
653
+ function C(t, e) {
654
+ return C = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, r) {
655
+ return n.__proto__ = r, n;
656
+ }, C(t, e);
657
+ }
658
+ function Pe(t) {
659
+ var e = De();
660
+ return function() {
661
+ var n = x(t), r;
662
+ if (e) {
663
+ var i = x(this).constructor;
664
+ r = Reflect.construct(n, arguments, i);
665
+ } else
666
+ r = n.apply(this, arguments);
667
+ return Me(this, r);
668
+ };
669
+ }
670
+ function Me(t, e) {
671
+ if (e && (H(e) === "object" || typeof e == "function"))
672
+ return e;
673
+ if (e !== void 0)
674
+ throw new TypeError("Derived constructors may only return object or undefined");
675
+ return B(t);
676
+ }
677
+ function B(t) {
678
+ if (t === void 0)
679
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
680
+ return t;
681
+ }
682
+ function De() {
683
+ if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
684
+ return !1;
685
+ if (typeof Proxy == "function")
686
+ return !0;
687
+ try {
688
+ return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
689
+ })), !0;
690
+ } catch {
691
+ return !1;
692
+ }
693
+ }
694
+ function x(t) {
695
+ return x = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(o) {
696
+ return o.__proto__ || Object.getPrototypeOf(o);
697
+ }, x(t);
698
+ }
699
+ function W(t, e, o) {
700
+ return e in t ? Object.defineProperty(t, e, { value: o, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = o, t;
701
+ }
702
+ var ze = /* @__PURE__ */ function(t) {
703
+ Re(o, t);
704
+ var e = Pe(o);
705
+ function o() {
706
+ var n;
707
+ Ee(this, o);
708
+ for (var r = arguments.length, i = new Array(r), c = 0; c < r; c++)
709
+ i[c] = arguments[c];
710
+ return n = e.call.apply(e, [this].concat(i)), W(B(n), "state", {
711
+ modalOpen: !1
712
+ }), W(B(n), "toggleModal", function() {
713
+ n.setState(function(l) {
714
+ return {
715
+ modalOpen: !l.modalOpen
716
+ };
717
+ });
718
+ }), n;
719
+ }
720
+ return Se(o, [{
721
+ key: "render",
722
+ value: function() {
723
+ var r = this.props, i = r.className, c = r.small, l = r.smallSrcSet, u = r.medium, f = r.large, m = r.alt, y = r.hideDownload, S = r.hideZoom, _ = r.showRotate, R = r.imageBackgroundColor, g = this.state.modalOpen;
724
+ return /* @__PURE__ */ a.createElement("div", null, /* @__PURE__ */ a.createElement("img", {
725
+ className: i,
726
+ style: {
727
+ cursor: "pointer",
728
+ maxWidth: "100%",
729
+ maxHeight: "100%"
730
+ },
731
+ onClick: this.toggleModal,
732
+ src: c,
733
+ srcSet: l,
734
+ alt: m
735
+ }), g && /* @__PURE__ */ a.createElement(xe, {
736
+ medium: u,
737
+ large: f,
738
+ alt: m,
739
+ onClose: this.toggleModal,
740
+ hideDownload: y,
741
+ hideZoom: S,
742
+ showRotate: _,
743
+ imageBackgroundColor: R
744
+ }));
745
+ }
746
+ }]), o;
747
+ }(E);
748
+ const Ie = (t) => /* @__PURE__ */ M.jsx(M.Fragment, { children: /* @__PURE__ */ M.jsx(ze, { ...t }) });
749
+ export {
750
+ Ie as KdpaModalImage
751
+ };