@hybridcore/ui 1.6.0 → 1.6.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 (291) hide show
  1. package/CATALOG.md +179 -0
  2. package/README.md +1 -2
  3. package/dist/AccordionSummary-CJppWeqF.js +781 -0
  4. package/dist/Add-CqcD1PWb.js +403 -0
  5. package/dist/Box-DqUMmZjL.js +31 -0
  6. package/dist/{Button-CvE2gnly.js → Button-C5yquWAB.js} +120 -133
  7. package/dist/ButtonBase-BEF7oTOe.js +887 -0
  8. package/dist/{Delete-CW0UZv1m.js → Delete-BdyYpINH.js} +9 -8
  9. package/dist/{DialogContent-B3nbEbuv.js → DialogContent-BvVjD9z3.js} +127 -124
  10. package/dist/FormGroup-CpBsIyYR.js +89 -0
  11. package/dist/{IconButton-CHwRQF-g.js → IconButton-BoGwbvrP.js} +41 -43
  12. package/dist/InputLabel-Dd8RrneV.js +341 -0
  13. package/dist/{MenuItem-xZx_w7zA.js → MenuItem-DwqJqzuM.js} +51 -53
  14. package/dist/Modal-MUZygjmQ.js +1158 -0
  15. package/dist/Paper-BkQLdsCI.js +582 -0
  16. package/dist/Select-DHUl_uG3.js +3916 -0
  17. package/dist/SwitchBase-DTndTqI8.js +235 -0
  18. package/dist/TextField-e2oKaUN1.js +669 -0
  19. package/dist/TransitionGroupContext-BDAp2T0O.js +96 -0
  20. package/dist/{Typography-CxbneZy_.js → Typography-DgsSLCFC.js} +53 -53
  21. package/dist/assertThisInitialized-C1dAyb4j.js +7 -0
  22. package/dist/assets/index4.css +1 -0
  23. package/dist/clsx-OuTLNxxd.js +16 -0
  24. package/dist/components/access/helpers.js +1 -1
  25. package/dist/components/access/index.js +8 -15
  26. package/dist/components/access/logic.js +25 -0
  27. package/dist/components/button/index.js +10 -0
  28. package/dist/components/button/logic.js +26 -0
  29. package/dist/components/button/styled.js +9 -0
  30. package/dist/components/card/index.js +158 -498
  31. package/dist/components/card/logic.js +24 -0
  32. package/dist/components/card/styled.js +226 -51
  33. package/dist/components/card-alternate/index.js +111 -139
  34. package/dist/components/card-alternate/logic.js +17 -0
  35. package/dist/components/card-alternate/styled.js +113 -19
  36. package/dist/components/charts/_common/chart-error.js +19 -0
  37. package/dist/components/charts/candlestick/index.js +3 -3
  38. package/dist/components/charts/candlestick/logic.js +123 -113
  39. package/dist/components/charts/chart-wrapper/index.js +5 -5
  40. package/dist/components/charts/column-line-mix/index.js +9 -8
  41. package/dist/components/charts/column-line-mix/logic.js +68 -71
  42. package/dist/components/charts/drill-down-treemap/index.js +8 -7
  43. package/dist/components/charts/drill-down-treemap/logic.js +138 -144
  44. package/dist/components/charts/drill-down-voronoi-treemap/index.js +9 -8
  45. package/dist/components/charts/drill-down-voronoi-treemap/logic.js +222 -228
  46. package/dist/components/charts/heatmap/index.js +9 -8
  47. package/dist/components/charts/heatmap/logic.js +167 -173
  48. package/dist/components/charts/highlighting-line-data/index.js +3 -3
  49. package/dist/components/charts/line/index.js +9 -8
  50. package/dist/components/charts/line/logic.js +74 -79
  51. package/dist/components/charts/logaritmic-scale/index.js +9 -8
  52. package/dist/components/charts/logaritmic-scale/logic.js +63 -69
  53. package/dist/components/charts/multiple-value-axes/index.js +9 -8
  54. package/dist/components/charts/multiple-value-axes/logic.js +101 -107
  55. package/dist/components/charts/nested-pie/index.js +9 -8
  56. package/dist/components/charts/nested-pie/logic.js +62 -68
  57. package/dist/components/charts/packed-circles/index.js +7 -6
  58. package/dist/components/charts/packed-circles/logic.js +50 -56
  59. package/dist/components/charts/pie-chart/index.js +9 -8
  60. package/dist/components/charts/pie-chart/logic.js +49 -54
  61. package/dist/components/charts/stacked-area-radar/index.js +8 -7
  62. package/dist/components/charts/stacked-area-radar/logic.js +113 -118
  63. package/dist/components/charts/stacked-column-chart/index.js +9 -8
  64. package/dist/components/charts/stacked-column-chart/logic.js +78 -84
  65. package/dist/components/charts/xy-chart/index.js +9 -8
  66. package/dist/components/charts/xy-chart/logic.js +56 -60
  67. package/dist/components/collapsible-card/index.js +11 -10
  68. package/dist/components/collapsible-card/styled.js +1 -1
  69. package/dist/components/color-picker/index.js +7120 -0
  70. package/dist/components/color-picker/logic.js +18 -0
  71. package/dist/components/color-picker/styled.js +7 -0
  72. package/dist/components/confirm/dialog.js +3 -3
  73. package/dist/components/confirm/index.js +1 -1
  74. package/dist/components/container/index.js +28 -269
  75. package/dist/components/container/logic.js +12 -0
  76. package/dist/components/container/styled.js +29 -0
  77. package/dist/components/context-menu/index.js +25 -457
  78. package/dist/components/context-menu/logic.js +14 -0
  79. package/dist/components/context-menu/styled.js +40 -0
  80. package/dist/components/data-grid/index.js +22 -0
  81. package/dist/components/data-grid/logic.js +15 -0
  82. package/dist/components/data-grid/styled.js +20 -0
  83. package/dist/components/data-map/components/controls/index.js +4 -6
  84. package/dist/components/data-map/index.js +11 -11
  85. package/dist/components/data-security-selectors/dissemination-list/index.js +192 -191
  86. package/dist/components/data-security-selectors/dissemination-list/styled.js +12 -12
  87. package/dist/components/data-security-selectors/security-level/index.js +39 -91
  88. package/dist/components/data-security-selectors/security-level/logic.js +28 -0
  89. package/dist/components/data-security-selectors/security-level/styled.js +53 -0
  90. package/dist/components/date-picker-with-custom-range/index.js +1 -1
  91. package/dist/components/date-range-picker/index.js +2748 -0
  92. package/dist/components/date-range-picker/styled.js +14 -0
  93. package/dist/components/date-time-picker/index.js +45 -46
  94. package/dist/components/divider/index.js +11 -11
  95. package/dist/components/document-viewer/components/action-buttons/index.js +15 -15
  96. package/dist/components/document-viewer/components/navigation/index.js +9 -9
  97. package/dist/components/document-viewer/components/viewer/index.js +31 -35
  98. package/dist/components/document-viewer/index.js +31 -39
  99. package/dist/components/document-viewer/logic.js +41 -34
  100. package/dist/components/document-viewer/styled.js +115 -27
  101. package/dist/components/duration-select/index.js +27 -0
  102. package/dist/components/duration-select/logic.js +21 -0
  103. package/dist/components/duration-select/styled.js +26 -0
  104. package/dist/components/editable-text/index.js +20 -0
  105. package/dist/components/editable-text/logic.js +18 -0
  106. package/dist/components/editable-text/styled.js +22 -0
  107. package/dist/components/geometry-picker/coordinate/index.js +29 -29
  108. package/dist/components/geometry-picker/edit/index.js +18 -18
  109. package/dist/components/geometry-picker/geometry/index.js +67 -67
  110. package/dist/components/geometry-picker/geometry/map-overlay.js +6 -6
  111. package/dist/components/geometry-picker/index.js +69 -85
  112. package/dist/components/geometry-picker/kml/index.js +16 -16
  113. package/dist/components/geometry-picker/logic.js +50 -57
  114. package/dist/components/geometry-picker/map/index.js +8 -8
  115. package/dist/components/geometry-picker/parser/coordinate-input/index.js +4 -4
  116. package/dist/components/geometry-picker/parser/index.js +46 -50
  117. package/dist/components/geometry-picker/parser/styled.js +22 -4
  118. package/dist/components/geometry-picker/styled.js +97 -37
  119. package/dist/components/geometry-picker/wkt/index.js +13 -13
  120. package/dist/components/heat-map/components/controls/index.js +4 -6
  121. package/dist/components/heat-map/components/legend/index.js +15 -17
  122. package/dist/components/heat-map/index.js +7 -7
  123. package/dist/components/instance-form/components/TopLabelWrapper.js +8 -48
  124. package/dist/components/instance-form/components/composite-list/index.js +5 -3
  125. package/dist/components/instance-form/components/composite-matrix/components/editable-table/index.js +83 -74
  126. package/dist/components/instance-form/components/composite-matrix/components/editor/index.js +45 -66
  127. package/dist/components/instance-form/components/composite-matrix/components/form/index.js +60 -75
  128. package/dist/components/instance-form/components/composite-matrix/components/json-editor/index.js +2425 -2422
  129. package/dist/components/instance-form/components/composite-matrix/components/table/index.js +33 -52
  130. package/dist/components/instance-form/components/composite-matrix/index.js +30 -36
  131. package/dist/components/instance-form/components/policy-list/index.js +47 -81
  132. package/dist/components/instance-form/components/variable/index.js +6 -11
  133. package/dist/components/instance-form/components/variables/index.js +48 -55
  134. package/dist/components/instance-form/helpers.js +9 -0
  135. package/dist/components/instance-form/index.js +402 -518
  136. package/dist/components/instance-form/logic.js +115 -0
  137. package/dist/components/instance-form/styled.js +487 -0
  138. package/dist/components/instance-hierarchy-table/index.js +32 -37
  139. package/dist/components/instance-hierarchy-table/logic.js +16 -0
  140. package/dist/components/instance-hierarchy-table/styled.js +53 -12
  141. package/dist/components/instance-table/index.js +30 -135
  142. package/dist/components/instance-table/logic.js +122 -0
  143. package/dist/components/instance-table/styled.js +53 -11
  144. package/dist/components/instance-variable-list/index.js +11 -11
  145. package/dist/components/loading/index.js +15 -9
  146. package/dist/components/loading/logic.js +15 -0
  147. package/dist/components/loading/styled.js +26 -19
  148. package/dist/components/map/index.js +28 -6
  149. package/dist/components/map/styled.js +1 -1
  150. package/dist/components/notification/index.js +67 -0
  151. package/dist/components/notification/logic.js +30 -0
  152. package/dist/components/notification/store.js +23 -0
  153. package/dist/components/notification/styled.js +52 -0
  154. package/dist/components/object-profile-card/components/avatar/index.js +9 -10
  155. package/dist/components/object-profile-card/index.js +19 -20
  156. package/dist/components/paginated-list/index.js +2 -3
  157. package/dist/components/phone-input/index.js +18 -22
  158. package/dist/components/phone-input/logic.js +14 -0
  159. package/dist/components/phone-input/styled.js +12 -4
  160. package/dist/components/placeholder/index.js +10 -0
  161. package/dist/components/placeholder/logic.js +12 -0
  162. package/dist/components/placeholder/styled.js +32 -0
  163. package/dist/components/positional-tooltip/index.js +24 -0
  164. package/dist/components/positional-tooltip/styled.js +17 -0
  165. package/dist/components/property-mapping/index.js +204 -423
  166. package/dist/components/property-mapping/logic.js +156 -0
  167. package/dist/components/property-mapping/styled.js +199 -0
  168. package/dist/components/prr-map/components/controls/index.js +4 -6
  169. package/dist/components/prr-map/components/legend/index.js +26 -28
  170. package/dist/components/prr-map/index.js +5 -5
  171. package/dist/components/range-selector/components/composite-list-range/index.js +42 -50
  172. package/dist/components/range-selector/components/date-range/index.js +87 -4221
  173. package/dist/components/range-selector/components/geometry-range/index.js +11 -17
  174. package/dist/components/range-selector/components/number-range/index.js +48 -53
  175. package/dist/components/range-selector/components/string-range/index.js +15 -17
  176. package/dist/components/range-selector/index.js +63 -57
  177. package/dist/components/range-selector/logic.js +12 -0
  178. package/dist/components/range-selector/styled.js +4294 -0
  179. package/dist/components/raster-grid-map/components/controls/index.js +4 -6
  180. package/dist/components/raster-grid-map/components/legend/index.js +4 -6
  181. package/dist/components/raster-grid-map/index.js +5 -5
  182. package/dist/components/scroll-drag/index.js +22 -0
  183. package/dist/components/scroll-drag/logic.js +39 -0
  184. package/dist/components/scroll-drag/styled.js +17 -0
  185. package/dist/components/search-input/logic.js +35 -33
  186. package/dist/components/simple-pivot-table/index.js +12 -12
  187. package/dist/components/sortable-list/index.js +599 -0
  188. package/dist/components/sortable-list/logic.js +18 -0
  189. package/dist/components/sortable-list/styled.js +38 -0
  190. package/dist/components/static-text/index.js +6 -6
  191. package/dist/components/stats-box/index.js +12 -0
  192. package/dist/components/stats-box/styled.js +36 -0
  193. package/dist/components/template-filters/components/filter/index.js +13 -18
  194. package/dist/components/template-filters/components/tab-panel/index.js +8 -16
  195. package/dist/components/template-filters/index.js +21 -29
  196. package/dist/components/template-filters/logic.js +18 -0
  197. package/dist/components/template-filters/styled.js +44 -1
  198. package/dist/components/template-form/components/property-list/index.js +27 -26
  199. package/dist/components/template-form/components/property-list/property-list-columns.js +3 -3
  200. package/dist/components/template-form/components/property-list/property-list-form.js +758 -14
  201. package/dist/components/template-form/components/recognition-property-list/index.js +11 -11
  202. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-columns.js +2 -2
  203. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-form.js +24 -23
  204. package/dist/components/template-form/components/select-icon/index.js +24 -24
  205. package/dist/components/template-form/helpers.js +17 -0
  206. package/dist/components/template-form/index.js +270 -309
  207. package/dist/components/template-form/logic.js +69 -0
  208. package/dist/components/template-form/styled.js +84 -0
  209. package/dist/components/template-property-filters/index.js +45 -95
  210. package/dist/components/template-property-filters/logic.js +27 -0
  211. package/dist/components/template-property-filters/property.js +105 -165
  212. package/dist/components/template-property-filters/styled.js +121 -20
  213. package/dist/components/text-overflow/index.js +6 -0
  214. package/dist/components/text-overflow/styled.js +13 -0
  215. package/dist/components/timeline/index.js +12 -12
  216. package/dist/components/toggle-view-button/index.js +35 -0
  217. package/dist/components/toggle-view-button/logic.js +22 -0
  218. package/dist/components/toggle-view-button/styled.js +11 -0
  219. package/dist/components/tree-select/index.js +52 -67
  220. package/dist/components/tree-select/logic.js +59 -0
  221. package/dist/components/tree-select/styled.js +45 -62
  222. package/dist/components/treeview-filter/index.js +43 -65
  223. package/dist/components/treeview-filter/item/index.js +43 -42
  224. package/dist/components/treeview-filter/item-label/index.js +17 -37
  225. package/dist/components/treeview-filter/logic.js +28 -0
  226. package/dist/components/treeview-filter/styled.js +86 -0
  227. package/dist/components/uploader/index.js +532 -567
  228. package/dist/components/uploader/logic.js +74 -0
  229. package/dist/components/uploader/styled.js +93 -46
  230. package/dist/components/visually-hidden-input/index.js +4 -0
  231. package/dist/components/visually-hidden-input/styled.js +18 -0
  232. package/dist/createChainedFunction-C0nujS3O.js +9 -0
  233. package/dist/{createSvgIcon-DrtgaibK.js → createSvgIcon-Ch_cT8az.js} +69 -68
  234. package/dist/createSvgIcon-DuDuASu1.js +62 -0
  235. package/dist/{dialog-DcwXug9J.js → dialog-BYRnCztH.js} +18 -18
  236. package/dist/formControlState-vgaj2ksH.js +10 -0
  237. package/dist/generateUtilityClasses-C3ivN9Ie.js +2973 -0
  238. package/dist/{helpers-B4UL9NMD.js → helpers-D4uXfBfO.js} +2 -2
  239. package/dist/index-BtlzPygz.js +470 -0
  240. package/dist/index-DH6qsPBn.js +153 -0
  241. package/dist/{index-syTc6m_V.js → index-e9xTIYWt.js} +87 -87
  242. package/dist/main.d.ts +1722 -562
  243. package/dist/main.js +161 -128
  244. package/dist/ownerWindow-wg6foiOE.js +10 -0
  245. package/dist/setPrototypeOf-NPgp4cYc.js +8 -0
  246. package/dist/styled-Db1RdcPA.js +323 -0
  247. package/dist/unsupportedProp-DuqR2hj9.js +36 -0
  248. package/dist/useId-BW-oWmul.js +19 -0
  249. package/dist/useMobilePicker-CY8ndYRL.js +8279 -0
  250. package/dist/useSlot-B_Q4vnX5.js +42 -0
  251. package/package.json +15 -7
  252. package/dist/AccordionSummary-DgAwVTk8.js +0 -742
  253. package/dist/Add-DJLrrVHm.js +0 -382
  254. package/dist/Box-p6OtTUEo.js +0 -30
  255. package/dist/ButtonBase-2bPw77UP.js +0 -961
  256. package/dist/CardContent-CSHh-ZlM.js +0 -74
  257. package/dist/Checkbox-CWRMFTBp.js +0 -421
  258. package/dist/FormControl-BLbrq4C7.js +0 -1636
  259. package/dist/FormControlLabel-C8SPv14J.js +0 -195
  260. package/dist/InputAdornment-DLxWUE6H.js +0 -157
  261. package/dist/List-tqElle9C.js +0 -121
  262. package/dist/ListItem-CfjsIg4B.js +0 -430
  263. package/dist/Modal-DhPpOoGB.js +0 -1299
  264. package/dist/Paper-2B03OBmZ.js +0 -169
  265. package/dist/Select-BgYwkZgI.js +0 -2613
  266. package/dist/TextField-1yCesIbH.js +0 -457
  267. package/dist/assertThisInitialized-BUtkG-md.js +0 -13
  268. package/dist/capitalize-ciszXJ7R.js +0 -9
  269. package/dist/components/instance-form/components/composite-list/styled.js +0 -73
  270. package/dist/components/instance-form/components/composite-matrix/components/editor/styled.js +0 -1
  271. package/dist/components/instance-form/components/composite-matrix/styled.js +0 -69
  272. package/dist/components/key-protection/index.js +0 -4
  273. package/dist/components/key-protection/menu.js +0 -85
  274. package/dist/components/key-protection/utils.js +0 -10
  275. package/dist/components/treeview-filter/item/styled.js +0 -39
  276. package/dist/createSvgIcon-BjpIhJ30.js +0 -71
  277. package/dist/createTheme-DYxDnE9u.js +0 -612
  278. package/dist/index-BMS1Otro.js +0 -183
  279. package/dist/index-CcdvNlgr.js +0 -503
  280. package/dist/index-kCJ_Zvl8.js +0 -34
  281. package/dist/isHostComponent-kiaBvYVo.js +0 -6
  282. package/dist/isMuiElement-CxT3_ACP.js +0 -13
  283. package/dist/listItemTextClasses-C3lndiXO.js +0 -16
  284. package/dist/property-list-form-zZQfpR0X.js +0 -386
  285. package/dist/styled-eZwjUruw.js +0 -12
  286. package/dist/unsupportedProp-BND8AB6O.js +0 -25
  287. package/dist/useId-B4-oF9Mq.js +0 -34
  288. package/dist/useMobilePicker-BLg3Blg8.js +0 -7589
  289. package/dist/useThemeProps-BzzHcQyd.js +0 -58
  290. package/dist/utils-BDNynJcd.js +0 -365
  291. package/dist/utils-Bq0ye5vf.js +0 -115
@@ -0,0 +1,74 @@
1
+ import { useThemeProps as I } from "@mui/material";
2
+ import g from "lodash";
3
+ import { useState as w } from "react";
4
+ import { confirm as S, alert as h } from "../confirm/index.js";
5
+ const N = (C) => {
6
+ const l = I({ props: C, name: "HCUploader" }), {
7
+ type: r = "IMAGE",
8
+ allowedExtensions: i = ["JPG", "PNG", "GIF"],
9
+ urls: o = [],
10
+ inputName: m = "file",
11
+ multiple: p = !1,
12
+ maxSize: a = 5,
13
+ minSize: c,
14
+ uploadAction: E,
15
+ onChange: n
16
+ } = l, [d, f] = w(!1), [M, u] = w(null), y = {
17
+ ...l,
18
+ type: r,
19
+ allowedExtensions: i,
20
+ urls: o,
21
+ inputName: m,
22
+ multiple: p,
23
+ maxSize: a,
24
+ minSize: c,
25
+ uploading: d
26
+ };
27
+ return {
28
+ refs: {},
29
+ state: {
30
+ ownerState: y,
31
+ uploading: d,
32
+ imageModal: M,
33
+ type: r,
34
+ allowedExtensions: i,
35
+ urls: o,
36
+ inputName: m,
37
+ multiple: p,
38
+ maxSize: a,
39
+ minSize: c
40
+ },
41
+ actions: {
42
+ handleChange: async (e) => {
43
+ f(!0);
44
+ const s = await E(e);
45
+ f(!1), s && n && n([...o, s].filter((t) => t));
46
+ },
47
+ handleRemove: (e) => async () => {
48
+ await S(
49
+ "Are you sure?",
50
+ `${g.startCase(g.lowerCase(r))} will be removed!`
51
+ ) && n && n(o.filter((t) => t !== e));
52
+ },
53
+ onTypeError: () => {
54
+ h("Error!", "Type error");
55
+ },
56
+ onSizeError: () => {
57
+ h("Error!", `File size is out of allowed limits!
58
+ Max: ${a}mb`);
59
+ },
60
+ onOpenImageModal: (e) => () => {
61
+ u(e);
62
+ },
63
+ onCloseImageModal: () => {
64
+ u(null);
65
+ },
66
+ onOpenFile: (e) => () => {
67
+ window.open(e, "_blank");
68
+ }
69
+ }
70
+ };
71
+ };
72
+ export {
73
+ N as useUploaderLogic
74
+ };
@@ -1,33 +1,18 @@
1
- import { styled as o, Box as e } from "@mui/material";
2
- const t = o(e, {
3
- name: "SNUploader",
4
- slot: "dropArea"
5
- })(({ theme: r }) => ({
6
- display: "flex",
7
- flexDirection: "column",
8
- justifyContent: "center",
9
- alignItems: "center",
10
- border: "1px dashed",
11
- borderColor: r.palette.divider,
12
- borderRadius: 5,
13
- padding: r.spacing(3),
14
- transition: "all .3s",
15
- cursor: "pointer",
16
- userSelect: "none",
17
- "&:hover:not([aria-disabled=true])": {
18
- borderColor: r.palette.primary.main
19
- },
20
- "& .MuiSvgIcon-root": {
21
- fontSize: 58
22
- },
23
- "&[aria-disabled=true]": {
24
- cursor: "default",
25
- opacity: 0.5
26
- }
27
- })), i = o(e, {
28
- name: "SNUploader",
29
- slot: "imageThumbContainer"
30
- })(({ theme: r }) => ({
1
+ import { styled as e, Box as r, Grid as n, Chip as i, Typography as a, Dialog as l, IconButton as p } from "@mui/material";
2
+ const s = (o) => o !== "ownerState", c = e(r, {
3
+ name: "HCUploader",
4
+ slot: "root",
5
+ shouldForwardProp: s
6
+ })({}), m = e(n, {
7
+ name: "HCUploader",
8
+ slot: "imageGrid"
9
+ })(({ theme: o }) => ({
10
+ marginBottom: o.spacing(1)
11
+ })), g = e(r, {
12
+ name: "HCUploader",
13
+ slot: "imageThumb",
14
+ shouldForwardProp: (o) => o !== "url"
15
+ })(({ theme: o, url: t }) => ({
31
16
  display: "flex",
32
17
  alignItems: "center",
33
18
  justifyContent: "center",
@@ -35,8 +20,10 @@ const t = o(e, {
35
20
  borderRadius: 12,
36
21
  height: 120,
37
22
  transition: "all .3s",
23
+ background: `url(${t}) no-repeat center`,
24
+ backgroundSize: "cover",
38
25
  "&:hover": {
39
- borderColor: r.palette.primary.main,
26
+ borderColor: o.palette.primary.main,
40
27
  "& .MuiButtonBase-root": {
41
28
  opacity: 1
42
29
  }
@@ -44,26 +31,86 @@ const t = o(e, {
44
31
  "& .MuiButtonBase-root": {
45
32
  marginLeft: 2,
46
33
  marginRight: 2,
47
- background: r.palette.common.white,
34
+ background: o.palette.common.white,
48
35
  transition: "all .3s",
49
36
  opacity: 0
50
37
  }
51
- })), n = o(e, {
52
- name: "SNUploader",
53
- slot: "fileThumbContainer"
54
- })(({ theme: r }) => ({
38
+ })), u = e(i, {
39
+ name: "HCUploader",
40
+ slot: "fileChip"
41
+ })(({ theme: o }) => ({
42
+ marginRight: o.spacing(1),
43
+ marginBottom: o.spacing(1)
44
+ })), C = e(r, {
45
+ name: "HCUploader",
46
+ slot: "chipIcon"
47
+ })(({ theme: o }) => ({
48
+ display: "inline-flex",
49
+ marginLeft: o.spacing(1)
50
+ })), b = e(r, {
51
+ name: "HCUploader",
52
+ slot: "dropArea"
53
+ })(({ theme: o }) => ({
55
54
  display: "flex",
56
- marginBottom: r.spacing(0.5),
57
- border: "1px solid",
58
- borderColor: r.palette.divider,
59
- padding: r.spacing(0.5),
55
+ flexDirection: "column",
56
+ justifyContent: "center",
57
+ alignItems: "center",
58
+ border: "1px dashed",
59
+ borderColor: o.palette.divider,
60
+ borderRadius: 5,
61
+ padding: o.spacing(3),
60
62
  transition: "all .3s",
61
- "&:hover": {
62
- borderColor: r.palette.primary.main
63
+ cursor: "pointer",
64
+ userSelect: "none",
65
+ "&:hover:not([aria-disabled=true])": {
66
+ borderColor: o.palette.primary.main
67
+ },
68
+ "& .MuiSvgIcon-root": {
69
+ fontSize: 58
70
+ },
71
+ "&[aria-disabled=true]": {
72
+ cursor: "default",
73
+ opacity: 0.5
63
74
  }
64
- }));
75
+ })), f = e(r, {
76
+ name: "HCUploader",
77
+ slot: "dropAreaIcon"
78
+ })({
79
+ display: "inline-flex"
80
+ }), h = e(a, {
81
+ name: "HCUploader",
82
+ slot: "dropAreaTitle"
83
+ })({}), y = e(a, {
84
+ name: "HCUploader",
85
+ slot: "dropAreaCaption"
86
+ })({}), U = e(l, {
87
+ name: "HCUploader",
88
+ slot: "previewDialog"
89
+ })({}), w = e(p, {
90
+ name: "HCUploader",
91
+ slot: "previewCloseButton"
92
+ })(({ theme: o }) => ({
93
+ position: "absolute",
94
+ right: o.spacing(1),
95
+ top: o.spacing(1),
96
+ backgroundColor: `${o.palette.common.white} !important`
97
+ })), H = e("img", {
98
+ name: "HCUploader",
99
+ slot: "previewImage"
100
+ })({
101
+ width: "100%"
102
+ });
65
103
  export {
66
- t as DropAreaContainer,
67
- n as FileThumbContainer,
68
- i as ImageThumbContainer
104
+ C as ChipIconRoot,
105
+ y as DropAreaCaption,
106
+ b as DropAreaContainer,
107
+ f as DropAreaIcon,
108
+ h as DropAreaTitle,
109
+ u as FileChip,
110
+ m as ImageGrid,
111
+ g as ImageThumbContainer,
112
+ w as PreviewCloseButton,
113
+ U as PreviewDialog,
114
+ H as PreviewImage,
115
+ c as UploaderRoot
69
116
  };
@@ -0,0 +1,4 @@
1
+ import { VisuallyHiddenInput as i } from "./styled.js";
2
+ export {
3
+ i as VisuallyHiddenInput
4
+ };
@@ -0,0 +1,18 @@
1
+ import { styled as t } from "@mui/material";
2
+ const o = t("input", {
3
+ name: "HCVisuallyHiddenInput",
4
+ slot: "root"
5
+ })({
6
+ clip: "rect(0 0 0 0)",
7
+ clipPath: "inset(50%)",
8
+ height: 1,
9
+ overflow: "hidden",
10
+ position: "absolute",
11
+ bottom: 0,
12
+ left: 0,
13
+ whiteSpace: "nowrap",
14
+ width: 1
15
+ });
16
+ export {
17
+ o as VisuallyHiddenInput
18
+ };
@@ -0,0 +1,9 @@
1
+ function u(...i) {
2
+ return i.reduce((n, t) => t == null ? n : function(...e) {
3
+ n.apply(this, e), t.apply(this, e);
4
+ }, () => {
5
+ });
6
+ }
7
+ export {
8
+ u as c
9
+ };
@@ -1,105 +1,106 @@
1
- import { _ as I, a as $ } from "./objectWithoutPropertiesLoose-DJteAcBH.js";
2
- import * as _ from "react";
3
- import { jsxs as b, jsx as w } from "react/jsx-runtime";
1
+ import { _ as b, a as S } from "./objectWithoutPropertiesLoose-DJteAcBH.js";
2
+ import * as g from "react";
3
+ import { jsxs as I, jsx as _ } from "react/jsx-runtime";
4
4
  import { P as o } from "./index-C__OZmYy.js";
5
- import { g as T, u as N, c as C, a as R } from "./useThemeProps-BzzHcQyd.js";
6
- import { s as O } from "./styled-eZwjUruw.js";
7
- import { g as B } from "./createTheme-DYxDnE9u.js";
8
- import { c as y } from "./capitalize-ciszXJ7R.js";
9
- function j(e) {
10
- return B("MuiSvgIcon", e);
5
+ import { c as w } from "./clsx-OuTLNxxd.js";
6
+ import { a as C, g as N, s as T, b as v, u as R, c as O } from "./generateUtilityClasses-C3ivN9Ie.js";
7
+ function B(e) {
8
+ return C("MuiSvgIcon", e);
11
9
  }
12
- T("MuiSvgIcon", ["root", "colorPrimary", "colorSecondary", "colorAction", "colorError", "colorDisabled", "fontSizeInherit", "fontSizeSmall", "fontSizeMedium", "fontSizeLarge"]);
13
- const E = ["children", "className", "color", "component", "fontSize", "htmlColor", "inheritViewBox", "titleAccess", "viewBox"], M = (e) => {
10
+ N("MuiSvgIcon", ["root", "colorPrimary", "colorSecondary", "colorAction", "colorError", "colorDisabled", "fontSizeInherit", "fontSizeSmall", "fontSizeMedium", "fontSizeLarge"]);
11
+ const j = ["children", "className", "color", "component", "fontSize", "htmlColor", "inheritViewBox", "titleAccess", "viewBox"], A = (e) => {
14
12
  const {
15
13
  color: t,
16
14
  fontSize: n,
17
- classes: i
18
- } = e, r = {
19
- root: ["root", t !== "inherit" && `color${y(t)}`, `fontSize${y(n)}`]
15
+ classes: r
16
+ } = e, i = {
17
+ root: ["root", t !== "inherit" && `color${v(t)}`, `fontSize${v(n)}`]
20
18
  };
21
- return R(r, j, i);
22
- }, V = O("svg", {
19
+ return O(i, B, r);
20
+ }, E = T("svg", {
23
21
  name: "MuiSvgIcon",
24
22
  slot: "Root",
25
23
  overridesResolver: (e, t) => {
26
24
  const {
27
25
  ownerState: n
28
26
  } = e;
29
- return [t.root, n.color !== "inherit" && t[`color${y(n.color)}`], t[`fontSize${y(n.fontSize)}`]];
27
+ return [t.root, n.color !== "inherit" && t[`color${v(n.color)}`], t[`fontSize${v(n.fontSize)}`]];
30
28
  }
31
29
  })(({
32
30
  theme: e,
33
31
  ownerState: t
34
32
  }) => {
35
- var n, i, r, f, a, c, p, v, s, l, m, g, d, u, h, x, z;
33
+ var n, r, i, u, f, c, h, d, m, s, a, p, l;
36
34
  return {
37
35
  userSelect: "none",
38
36
  width: "1em",
39
37
  height: "1em",
40
38
  display: "inline-block",
41
- fill: "currentColor",
39
+ // the <svg> will define the property that has `currentColor`
40
+ // for example heroicons uses fill="none" and stroke="currentColor"
41
+ fill: t.hasSvgAsChild ? void 0 : "currentColor",
42
42
  flexShrink: 0,
43
- transition: (n = e.transitions) == null || (i = n.create) == null ? void 0 : i.call(n, "fill", {
44
- duration: (r = e.transitions) == null || (f = r.duration) == null ? void 0 : f.shorter
43
+ transition: (n = e.transitions) == null || (r = n.create) == null ? void 0 : r.call(n, "fill", {
44
+ duration: (i = e.transitions) == null || (i = i.duration) == null ? void 0 : i.shorter
45
45
  }),
46
46
  fontSize: {
47
47
  inherit: "inherit",
48
- small: ((a = e.typography) == null || (c = a.pxToRem) == null ? void 0 : c.call(a, 20)) || "1.25rem",
49
- medium: ((p = e.typography) == null || (v = p.pxToRem) == null ? void 0 : v.call(p, 24)) || "1.5rem",
50
- large: ((s = e.typography) == null || (l = s.pxToRem) == null ? void 0 : l.call(s, 35)) || "2.1875rem"
48
+ small: ((u = e.typography) == null || (f = u.pxToRem) == null ? void 0 : f.call(u, 20)) || "1.25rem",
49
+ medium: ((c = e.typography) == null || (h = c.pxToRem) == null ? void 0 : h.call(c, 24)) || "1.5rem",
50
+ large: ((d = e.typography) == null || (m = d.pxToRem) == null ? void 0 : m.call(d, 35)) || "2.1875rem"
51
51
  }[t.fontSize],
52
52
  // TODO v5 deprecate, v6 remove for sx
53
- color: (m = (g = (e.vars || e).palette) == null || (d = g[t.color]) == null ? void 0 : d.main) != null ? m : {
54
- action: (u = (e.vars || e).palette) == null || (h = u.action) == null ? void 0 : h.active,
55
- disabled: (x = (e.vars || e).palette) == null || (z = x.action) == null ? void 0 : z.disabled,
53
+ color: (s = (a = (e.vars || e).palette) == null || (a = a[t.color]) == null ? void 0 : a.main) != null ? s : {
54
+ action: (p = (e.vars || e).palette) == null || (p = p.action) == null ? void 0 : p.active,
55
+ disabled: (l = (e.vars || e).palette) == null || (l = l.action) == null ? void 0 : l.disabled,
56
56
  inherit: void 0
57
57
  }[t.color]
58
58
  };
59
- }), S = /* @__PURE__ */ _.forwardRef(function(t, n) {
60
- const i = N({
59
+ }), y = /* @__PURE__ */ g.forwardRef(function(t, n) {
60
+ const r = R({
61
61
  props: t,
62
62
  name: "MuiSvgIcon"
63
63
  }), {
64
- children: r,
65
- className: f,
66
- color: a = "inherit",
64
+ children: i,
65
+ className: u,
66
+ color: f = "inherit",
67
67
  component: c = "svg",
68
- fontSize: p = "medium",
69
- htmlColor: v,
70
- inheritViewBox: s = !1,
71
- titleAccess: l,
72
- viewBox: m = "0 0 24 24"
73
- } = i, g = I(i, E), d = $({}, i, {
74
- color: a,
68
+ fontSize: h = "medium",
69
+ htmlColor: d,
70
+ inheritViewBox: m = !1,
71
+ titleAccess: s,
72
+ viewBox: a = "0 0 24 24"
73
+ } = r, p = b(r, j), l = /* @__PURE__ */ g.isValidElement(i) && i.type === "svg", x = S({}, r, {
74
+ color: f,
75
75
  component: c,
76
- fontSize: p,
76
+ fontSize: h,
77
77
  instanceFontSize: t.fontSize,
78
- inheritViewBox: s,
79
- viewBox: m
80
- }), u = {};
81
- s || (u.viewBox = m);
82
- const h = M(d);
83
- return /* @__PURE__ */ b(V, $({
78
+ inheritViewBox: m,
79
+ viewBox: a,
80
+ hasSvgAsChild: l
81
+ }), $ = {};
82
+ m || ($.viewBox = a);
83
+ const z = A(x);
84
+ return /* @__PURE__ */ I(E, S({
84
85
  as: c,
85
- className: C(h.root, f),
86
+ className: w(z.root, u),
86
87
  focusable: "false",
87
- color: v,
88
- "aria-hidden": l ? void 0 : !0,
89
- role: l ? "img" : void 0,
88
+ color: d,
89
+ "aria-hidden": s ? void 0 : !0,
90
+ role: s ? "img" : void 0,
90
91
  ref: n
91
- }, u, g, {
92
- ownerState: d,
93
- children: [r, l ? /* @__PURE__ */ w("title", {
94
- children: l
92
+ }, $, p, l && i.props, {
93
+ ownerState: x,
94
+ children: [l ? i.props.children : i, s ? /* @__PURE__ */ _("title", {
95
+ children: s
95
96
  }) : null]
96
97
  }));
97
98
  });
98
- process.env.NODE_ENV !== "production" && (S.propTypes = {
99
- // ----------------------------- Warning --------------------------------
100
- // | These PropTypes are generated from the TypeScript type definitions |
101
- // | To update them edit the d.ts file and run "yarn proptypes" |
102
- // ----------------------------------------------------------------------
99
+ process.env.NODE_ENV !== "production" && (y.propTypes = {
100
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
101
+ // These PropTypes are generated from the TypeScript type definitions.
102
+ // To update them, edit the d.ts file and run `pnpm proptypes`.
103
+ // └─────────────────────────────────────────────────────────────────────┘
103
104
  /**
104
105
  * Node passed into the SVG element.
105
106
  */
@@ -115,7 +116,7 @@ process.env.NODE_ENV !== "production" && (S.propTypes = {
115
116
  /**
116
117
  * The color of the component.
117
118
  * It supports both default and custom theme colors, which can be added as shown in the
118
- * [palette customization guide](https://mui.com/material-ui/customization/palette/#adding-new-colors).
119
+ * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
119
120
  * You can use the `htmlColor` prop to apply a color attribute to the SVG element.
120
121
  * @default 'inherit'
121
122
  */
@@ -167,18 +168,18 @@ process.env.NODE_ENV !== "production" && (S.propTypes = {
167
168
  */
168
169
  viewBox: o.string
169
170
  });
170
- S.muiName = "SvgIcon";
171
- function W(e, t) {
172
- function n(i, r) {
173
- return /* @__PURE__ */ w(S, $({
171
+ y.muiName = "SvgIcon";
172
+ function k(e, t) {
173
+ function n(r, i) {
174
+ return /* @__PURE__ */ _(y, S({
174
175
  "data-testid": `${t}Icon`,
175
- ref: r
176
- }, i, {
176
+ ref: i
177
+ }, r, {
177
178
  children: e
178
179
  }));
179
180
  }
180
- return process.env.NODE_ENV !== "production" && (n.displayName = `${t}Icon`), n.muiName = S.muiName, /* @__PURE__ */ _.memo(/* @__PURE__ */ _.forwardRef(n));
181
+ return process.env.NODE_ENV !== "production" && (n.displayName = `${t}Icon`), n.muiName = y.muiName, /* @__PURE__ */ g.memo(/* @__PURE__ */ g.forwardRef(n));
181
182
  }
182
183
  export {
183
- W as c
184
+ k as c
184
185
  };
@@ -0,0 +1,62 @@
1
+ import { g as l } from "./_commonjsHelpers-BVfed4GL.js";
2
+ import { c as f } from "./createSvgIcon-Ch_cT8az.js";
3
+ import { C as d, b as p } from "./generateUtilityClasses-C3ivN9Ie.js";
4
+ import { d as g } from "./debounce-46wSf_lW.js";
5
+ import { o as b, a as v } from "./ownerWindow-wg6foiOE.js";
6
+ import { i as h, r as _, u as E } from "./unsupportedProp-DuqR2hj9.js";
7
+ import { s as N, a as C, b as I, u as S } from "./TransitionGroupContext-BDAp2T0O.js";
8
+ import { c as y } from "./createChainedFunction-C0nujS3O.js";
9
+ import { u as $ } from "./useId-BW-oWmul.js";
10
+ import { u as O } from "./useControlled-BYdyS7Pn.js";
11
+ import { u as P } from "./ButtonBase-BEF7oTOe.js";
12
+ var t = {};
13
+ function j(e, r) {
14
+ return process.env.NODE_ENV === "production" ? () => null : (s, o, n, u, i) => {
15
+ const c = n || "<<anonymous>>", m = i || o;
16
+ return typeof s[o] < "u" ? new Error(`The ${u} \`${m}\` of \`${c}\` is deprecated. ${r}`) : null;
17
+ };
18
+ }
19
+ const w = {
20
+ configure: (e) => {
21
+ process.env.NODE_ENV !== "production" && console.warn(["MUI: `ClassNameGenerator` import from `@mui/material/utils` is outdated and might cause unexpected issues.", "", "You should use `import { unstable_ClassNameGenerator } from '@mui/material/className'` instead", "", "The detail of the issue: https://github.com/mui/material-ui/issues/30011#issuecomment-1024993401", "", "The updated documentation: https://mui.com/guides/classname-generator/"].join(`
22
+ `)), d.configure(e);
23
+ }
24
+ }, F = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
25
+ __proto__: null,
26
+ capitalize: p,
27
+ createChainedFunction: y,
28
+ createSvgIcon: f,
29
+ debounce: g,
30
+ deprecatedPropType: j,
31
+ isMuiElement: h,
32
+ ownerDocument: b,
33
+ ownerWindow: v,
34
+ requirePropFactory: _,
35
+ setRef: N,
36
+ unstable_ClassNameGenerator: w,
37
+ unstable_useEnhancedEffect: C,
38
+ unstable_useId: $,
39
+ unsupportedProp: E,
40
+ useControlled: O,
41
+ useEventCallback: I,
42
+ useForkRef: S,
43
+ useIsFocusVisible: P
44
+ }, Symbol.toStringTag, { value: "Module" })), T = /* @__PURE__ */ l(F);
45
+ var a;
46
+ function W() {
47
+ return a || (a = 1, function(e) {
48
+ "use client";
49
+ Object.defineProperty(e, "__esModule", {
50
+ value: !0
51
+ }), Object.defineProperty(e, "default", {
52
+ enumerable: !0,
53
+ get: function() {
54
+ return r.createSvgIcon;
55
+ }
56
+ });
57
+ var r = T;
58
+ }(t)), t;
59
+ }
60
+ export {
61
+ W as r
62
+ };
@@ -1,23 +1,23 @@
1
1
  import { jsx as s, jsxs as p } from "react/jsx-runtime";
2
2
  import { confirmable as x } from "react-confirm";
3
- import { IconButton as h } from "@mui/material";
3
+ import { IconButton as D } from "@mui/material";
4
4
  import { Close as C } from "@mui/icons-material";
5
- import { c as D, g as T, D as b, a as y, b as B } from "./DialogContent-B3nbEbuv.js";
5
+ import { b as h, g as T, D as b, a as y, c as B } from "./DialogContent-BvVjD9z3.js";
6
6
  import { _ as j, a as v } from "./objectWithoutPropertiesLoose-DJteAcBH.js";
7
7
  import * as d from "react";
8
8
  import { P as o } from "./index-C__OZmYy.js";
9
- import { u as M, c as N, a as O } from "./useThemeProps-BzzHcQyd.js";
10
- import { s as R } from "./styled-eZwjUruw.js";
11
- import { T as P } from "./Typography-CxbneZy_.js";
12
- import { B as m } from "./Button-CvE2gnly.js";
9
+ import { c as M } from "./clsx-OuTLNxxd.js";
10
+ import { s as N, u as O, c as R } from "./generateUtilityClasses-C3ivN9Ie.js";
11
+ import { T as P } from "./Typography-DgsSLCFC.js";
12
+ import { B as m } from "./Button-C5yquWAB.js";
13
13
  const _ = ["className", "id"], k = (a) => {
14
14
  const {
15
15
  classes: t
16
16
  } = a;
17
- return O({
17
+ return R({
18
18
  root: ["root"]
19
19
  }, T, t);
20
- }, w = R(P, {
20
+ }, w = N(P, {
21
21
  name: "MuiDialogTitle",
22
22
  slot: "Root",
23
23
  overridesResolver: (a, t) => t.root
@@ -25,7 +25,7 @@ const _ = ["className", "id"], k = (a) => {
25
25
  padding: "16px 24px",
26
26
  flex: "0 0 auto"
27
27
  }), u = /* @__PURE__ */ d.forwardRef(function(t, r) {
28
- const i = M({
28
+ const i = O({
29
29
  props: t,
30
30
  name: "MuiDialogTitle"
31
31
  }), {
@@ -33,10 +33,10 @@ const _ = ["className", "id"], k = (a) => {
33
33
  id: n
34
34
  } = i, l = j(i, _), c = i, f = k(c), {
35
35
  titleId: g = n
36
- } = d.useContext(D);
36
+ } = d.useContext(h);
37
37
  return /* @__PURE__ */ s(w, v({
38
38
  component: "h2",
39
- className: N(f.root, e),
39
+ className: M(f.root, e),
40
40
  ownerState: c,
41
41
  ref: r,
42
42
  variant: "h6",
@@ -44,10 +44,10 @@ const _ = ["className", "id"], k = (a) => {
44
44
  }, l));
45
45
  });
46
46
  process.env.NODE_ENV !== "production" && (u.propTypes = {
47
- // ----------------------------- Warning --------------------------------
48
- // | These PropTypes are generated from the TypeScript type definitions |
49
- // | To update them edit the d.ts file and run "yarn proptypes" |
50
- // ----------------------------------------------------------------------
47
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
48
+ // These PropTypes are generated from the TypeScript type definitions.
49
+ // To update them, edit the d.ts file and run `pnpm proptypes`.
50
+ // └─────────────────────────────────────────────────────────────────────┘
51
51
  /**
52
52
  * The content of the component.
53
53
  */
@@ -126,7 +126,7 @@ const I = {
126
126
  },
127
127
  children: [
128
128
  r,
129
- /* @__PURE__ */ s(h, { onClick: l, children: /* @__PURE__ */ s(C, {}) })
129
+ /* @__PURE__ */ s(D, { onClick: l, children: /* @__PURE__ */ s(C, {}) })
130
130
  ]
131
131
  }
132
132
  ),
@@ -149,6 +149,6 @@ const I = {
149
149
  );
150
150
  }, G = x(A);
151
151
  export {
152
- u as D,
153
- G as a
152
+ G as D,
153
+ u as a
154
154
  };
@@ -0,0 +1,10 @@
1
+ function d({
2
+ props: e,
3
+ states: u,
4
+ muiFormControl: r
5
+ }) {
6
+ return u.reduce((n, f) => (n[f] = e[f], r && typeof e[f] > "u" && (n[f] = r[f]), n), {});
7
+ }
8
+ export {
9
+ d as f
10
+ };