@zydon/common 2.7.61 → 2.7.63

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 (149) hide show
  1. package/dist/{chunk-75G5RNV4.js → chunk-5LQLLZ5L.js} +2 -2
  2. package/dist/chunk-5NIMUEW5.js +25 -0
  3. package/dist/chunk-5NIMUEW5.js.map +1 -0
  4. package/dist/chunk-6WGKIN5L.js +18 -0
  5. package/dist/chunk-6WGKIN5L.js.map +1 -0
  6. package/dist/chunk-7MVZYOHX.js +13 -0
  7. package/dist/chunk-7MVZYOHX.js.map +1 -0
  8. package/dist/{chunk-KRT2AT6N.js → chunk-CWCEG2DZ.js} +2 -2
  9. package/dist/{chunk-HLMZQG27.js → chunk-HWYA3EGC.js} +2 -2
  10. package/dist/chunk-HWYA3EGC.js.map +1 -0
  11. package/dist/chunk-IEGF6HVV.js +43 -0
  12. package/dist/{chunk-XTTDUDXX.js.map → chunk-IEGF6HVV.js.map} +1 -1
  13. package/dist/chunk-JFZOAS75.js +23 -0
  14. package/dist/{chunk-MJQ5FMYR.js → chunk-JZ55NEMI.js} +2 -2
  15. package/dist/{chunk-WVXEXDGZ.js → chunk-KR3DUHA6.js} +3 -3
  16. package/dist/{chunk-X7VVV26F.js → chunk-LEMPYV5U.js} +2 -2
  17. package/dist/{chunk-AA2DXMIC.js → chunk-LNXA53QR.js} +2 -2
  18. package/dist/{chunk-CDJKO3NN.js → chunk-LY3IB5VH.js} +2 -2
  19. package/dist/{chunk-YEVAAROT.js → chunk-MP2LAJS5.js} +3 -3
  20. package/dist/{chunk-BX2JPTSO.js → chunk-N4DW7EIC.js} +2 -2
  21. package/dist/{chunk-DLIHGNBS.js → chunk-NQNNMRLC.js} +3 -3
  22. package/dist/{chunk-DLIHGNBS.js.map → chunk-NQNNMRLC.js.map} +1 -1
  23. package/dist/{chunk-QHXITV2M.js → chunk-OTVEMGF2.js} +2 -2
  24. package/dist/chunk-POTVACYB.js +8 -0
  25. package/dist/chunk-POTVACYB.js.map +1 -0
  26. package/dist/chunk-QVU6HSYP.js +12 -0
  27. package/dist/chunk-QVU6HSYP.js.map +1 -0
  28. package/dist/{chunk-GFXVOSAE.js → chunk-R76WTFYC.js} +2 -2
  29. package/dist/chunk-RBTYTONM.js +13 -0
  30. package/dist/chunk-RBTYTONM.js.map +1 -0
  31. package/dist/{chunk-BOKTSYI5.js → chunk-RFRLNTFN.js} +2 -2
  32. package/dist/{chunk-MTBVMYTS.js → chunk-U7BH6DMJ.js} +2 -2
  33. package/dist/{chunk-CU7PKEY2.js → chunk-VPKUUY5Q.js} +2 -2
  34. package/dist/chunk-VYNBVZSA.js +37 -0
  35. package/dist/chunk-VYNBVZSA.js.map +1 -0
  36. package/dist/chunk-WQSRNCNF.js +5 -0
  37. package/dist/chunk-WQSRNCNF.js.map +1 -0
  38. package/dist/{chunk-BBFBNDAZ.js → chunk-XZFBTUAG.js} +2 -2
  39. package/dist/{chunk-C7VQJ35F.js → chunk-ZFRNMT3P.js} +2 -2
  40. package/dist/{chunk-SSLZPI3M.js → chunk-ZGSSTXUO.js} +2 -2
  41. package/dist/components/ActionButton/index.js +2 -2
  42. package/dist/components/Autocomplete/index.js +2 -2
  43. package/dist/components/Avatar/index.d.ts +1 -1
  44. package/dist/components/AvatarButton/index.js +3 -3
  45. package/dist/components/BuilderLayout/index.js +2 -2
  46. package/dist/components/BuilderSidebar/index.js +1 -1
  47. package/dist/components/BulkEditModal/index.d.ts +64 -0
  48. package/dist/components/BulkEditModal/index.js +28 -0
  49. package/dist/components/BulkEditModal/index.js.map +1 -0
  50. package/dist/components/CardBrand/index.js +1 -1
  51. package/dist/components/Common/index.js +3 -3
  52. package/dist/components/CopyButton/index.js +2 -2
  53. package/dist/components/DataGrid/index.js +2 -1
  54. package/dist/components/DataView/index.js +8 -6
  55. package/dist/components/DragButton/index.js +2 -2
  56. package/dist/components/Drawer/index.js +1 -1
  57. package/dist/components/DynamicDataView/index.d.ts +4 -2
  58. package/dist/components/DynamicDataView/index.js +20 -14
  59. package/dist/components/DynamicDataView/index.js.map +1 -1
  60. package/dist/components/EasyCropModal/index.js +3 -3
  61. package/dist/components/Error/index.js +1 -1
  62. package/dist/components/ExpandableGroup/index.js +7 -7
  63. package/dist/components/ExpandableGroup/index.js.map +1 -1
  64. package/dist/components/FieldMentions/index.js.map +1 -1
  65. package/dist/components/FileUpload/index.js +7 -6
  66. package/dist/components/FrameSkeleton/index.js +4 -4
  67. package/dist/components/HelpButton/index.js +2 -2
  68. package/dist/components/Icon/index.js +1 -1
  69. package/dist/components/IconButton/index.js +2 -2
  70. package/dist/components/ImageCropModal/index.js +3 -3
  71. package/dist/components/Incrementer/index.js +2 -2
  72. package/dist/components/InfoCircle/index.js +1 -1
  73. package/dist/components/ListBundles/index.js +2 -2
  74. package/dist/components/MenuItem/index.js +1 -1
  75. package/dist/components/Modal/index.js +2 -2
  76. package/dist/components/MoreMenu/index.js +1 -1
  77. package/dist/components/PasswordRules/index.js +1 -1
  78. package/dist/components/PopoverSelect/index.js +1 -1
  79. package/dist/components/SearchInput/index.js +2 -2
  80. package/dist/components/SelectableCards/index.js +3 -3
  81. package/dist/components/SeoPreview/index.js +1 -1
  82. package/dist/components/StateDisplay/index.js +2 -2
  83. package/dist/components/Steps/index.js +1 -1
  84. package/dist/components/StyledTab/index.js +1 -1
  85. package/dist/components/SwapList/index.js +2 -2
  86. package/dist/components/ToggleTheme/index.js +2 -2
  87. package/dist/components/WebhookCard/index.js +2 -2
  88. package/dist/components/carousel/index.js +2 -2
  89. package/dist/components/form/Address/index.js +3 -3
  90. package/dist/components/form/Autocomplete/index.js +3 -3
  91. package/dist/components/form/FileUpload/index.js +8 -7
  92. package/dist/components/form/FileUpload/index.js.map +1 -1
  93. package/dist/components/form/Incrementer/index.js +2 -2
  94. package/dist/components/form/Password/index.js +1 -1
  95. package/dist/components/form/SelectableCards/index.js +3 -3
  96. package/dist/components/form/UploadAvatarWithCrop/index.js +6 -5
  97. package/dist/components/form/UploadAvatarWithCrop/index.js.map +1 -1
  98. package/dist/components/form/UploadWithCrop/index.js +8 -7
  99. package/dist/components/form/UploadWithCrop/index.js.map +1 -1
  100. package/dist/components/form/Webhook/index.js +12 -12
  101. package/dist/components/form/Webhook/index.js.map +1 -1
  102. package/dist/components/lightbox/index.js +1 -1
  103. package/dist/components/table/index.js +2 -2
  104. package/dist/components/upload/index.js +11 -10
  105. package/dist/components/upload/index.js.map +1 -1
  106. package/dist/hooks/useCollapseSidebarOnMount.js +3 -3
  107. package/dist/hooks/useEventCallback.d.ts +2 -3
  108. package/dist/hooks/useEventCallback.js +1 -1
  109. package/dist/hooks/useLocalStorage.js +2 -2
  110. package/dist/hooks/useSnackbar.d.ts +1 -1
  111. package/dist/hooks/useThemeToggle.js +2 -2
  112. package/dist/index.d.ts +2 -2
  113. package/dist/index.js +2 -2
  114. package/dist/theme/core/index.d.ts +1 -1
  115. package/dist/theme/styles/index.d.ts +13 -13
  116. package/dist/theme/theme-provider.js +2 -2
  117. package/package.json +1 -1
  118. package/dist/chunk-F4T3RPSV.js +0 -36
  119. package/dist/chunk-F4T3RPSV.js.map +0 -1
  120. package/dist/chunk-HLMZQG27.js.map +0 -1
  121. package/dist/chunk-JBPWWO5D.js +0 -15
  122. package/dist/chunk-JBPWWO5D.js.map +0 -1
  123. package/dist/chunk-MQAMSYYK.js +0 -8
  124. package/dist/chunk-MQAMSYYK.js.map +0 -1
  125. package/dist/chunk-NCNSNAJ5.js +0 -27
  126. package/dist/chunk-NCNSNAJ5.js.map +0 -1
  127. package/dist/chunk-SA2BESEB.js +0 -17
  128. package/dist/chunk-SA2BESEB.js.map +0 -1
  129. package/dist/chunk-XTTDUDXX.js +0 -42
  130. package/dist/chunk-YCKZD2H6.js +0 -23
  131. package/dist/{chunk-75G5RNV4.js.map → chunk-5LQLLZ5L.js.map} +0 -0
  132. package/dist/{chunk-KRT2AT6N.js.map → chunk-CWCEG2DZ.js.map} +0 -0
  133. package/dist/{chunk-YCKZD2H6.js.map → chunk-JFZOAS75.js.map} +0 -0
  134. package/dist/{chunk-MJQ5FMYR.js.map → chunk-JZ55NEMI.js.map} +0 -0
  135. package/dist/{chunk-WVXEXDGZ.js.map → chunk-KR3DUHA6.js.map} +0 -0
  136. package/dist/{chunk-X7VVV26F.js.map → chunk-LEMPYV5U.js.map} +0 -0
  137. package/dist/{chunk-AA2DXMIC.js.map → chunk-LNXA53QR.js.map} +0 -0
  138. package/dist/{chunk-CDJKO3NN.js.map → chunk-LY3IB5VH.js.map} +0 -0
  139. package/dist/{chunk-YEVAAROT.js.map → chunk-MP2LAJS5.js.map} +0 -0
  140. package/dist/{chunk-BX2JPTSO.js.map → chunk-N4DW7EIC.js.map} +0 -0
  141. package/dist/{chunk-QHXITV2M.js.map → chunk-OTVEMGF2.js.map} +0 -0
  142. package/dist/{chunk-GFXVOSAE.js.map → chunk-R76WTFYC.js.map} +0 -0
  143. package/dist/{chunk-BOKTSYI5.js.map → chunk-RFRLNTFN.js.map} +0 -0
  144. package/dist/{chunk-MTBVMYTS.js.map → chunk-U7BH6DMJ.js.map} +0 -0
  145. package/dist/{chunk-CU7PKEY2.js.map → chunk-VPKUUY5Q.js.map} +0 -0
  146. package/dist/{chunk-BBFBNDAZ.js.map → chunk-XZFBTUAG.js.map} +0 -0
  147. package/dist/{chunk-C7VQJ35F.js.map → chunk-ZFRNMT3P.js.map} +0 -0
  148. package/dist/{chunk-SSLZPI3M.js.map → chunk-ZGSSTXUO.js.map} +0 -0
  149. package/dist/{index-c8f1e6e7.d.ts → index-5a5e5dc8.d.ts} +12 -12
@@ -193,7 +193,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
193
193
  flexShrink?: readonly ((string & {}) | csstype.Globals)[] | csstype.Property.FlexShrink | readonly NonNullable<csstype.Property.FlexShrink | undefined>[] | undefined;
194
194
  flexWrap?: csstype.Property.FlexWrap | readonly NonNullable<csstype.Property.FlexWrap | undefined>[] | readonly csstype.Property.FlexWrap[] | undefined;
195
195
  float?: csstype.Property.Float | readonly NonNullable<csstype.Property.Float | undefined>[] | readonly csstype.Property.Float[] | undefined;
196
- fontFamily?: readonly string[] | csstype.Property.FontFamily | readonly csstype.Property.FontFamily[] | undefined;
196
+ fontFamily?: csstype.Property.FontFamily | readonly string[] | readonly csstype.Property.FontFamily[] | undefined;
197
197
  fontFeatureSettings?: readonly string[] | csstype.Property.FontFeatureSettings | readonly csstype.Property.FontFeatureSettings[] | undefined;
198
198
  fontKerning?: csstype.Property.FontKerning | readonly NonNullable<csstype.Property.FontKerning | undefined>[] | readonly csstype.Property.FontKerning[] | undefined;
199
199
  fontLanguageOverride?: readonly string[] | csstype.Property.FontLanguageOverride | readonly csstype.Property.FontLanguageOverride[] | undefined;
@@ -218,7 +218,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
218
218
  fontVariantNumeric?: readonly string[] | csstype.Property.FontVariantNumeric | readonly csstype.Property.FontVariantNumeric[] | undefined;
219
219
  fontVariantPosition?: csstype.Property.FontVariantPosition | readonly NonNullable<csstype.Property.FontVariantPosition | undefined>[] | readonly csstype.Property.FontVariantPosition[] | undefined;
220
220
  fontVariationSettings?: readonly string[] | csstype.Property.FontVariationSettings | readonly csstype.Property.FontVariationSettings[] | undefined;
221
- fontWeight?: csstype.Property.FontWeight | readonly NonNullable<csstype.Property.FontWeight | undefined>[] | readonly ("bold" | (string & {}) | csstype.Globals | "normal" | "bolder" | "lighter")[] | undefined;
221
+ fontWeight?: csstype.Property.FontWeight | readonly NonNullable<csstype.Property.FontWeight | undefined>[] | readonly ((string & {}) | csstype.Globals | "bold" | "normal" | "bolder" | "lighter")[] | undefined;
222
222
  forcedColorAdjust?: csstype.Property.ForcedColorAdjust | readonly NonNullable<csstype.Property.ForcedColorAdjust | undefined>[] | readonly csstype.Property.ForcedColorAdjust[] | undefined;
223
223
  gridAutoColumns?: readonly (string | (string & {}))[] | csstype.Property.GridAutoColumns<string | number> | readonly NonNullable<csstype.Property.GridAutoColumns<string | number> | undefined>[] | undefined;
224
224
  gridAutoFlow?: readonly string[] | csstype.Property.GridAutoFlow | readonly csstype.Property.GridAutoFlow[] | undefined;
@@ -443,9 +443,9 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
443
443
  wordWrap?: csstype.Property.WordWrap | readonly NonNullable<csstype.Property.WordWrap | undefined>[] | readonly csstype.Property.WordWrap[] | undefined;
444
444
  writingMode?: csstype.Property.WritingMode | readonly NonNullable<csstype.Property.WritingMode | undefined>[] | readonly csstype.Property.WritingMode[] | undefined;
445
445
  zIndex?: readonly ((string & {}) | csstype.Globals | "auto")[] | csstype.Property.ZIndex | readonly NonNullable<csstype.Property.ZIndex | undefined>[] | undefined;
446
- zoom?: csstype.Property.Zoom | readonly NonNullable<csstype.Property.Zoom | undefined>[] | readonly ("reset" | (string & {}) | csstype.Globals | "normal")[] | undefined;
446
+ zoom?: csstype.Property.Zoom | readonly NonNullable<csstype.Property.Zoom | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal" | "reset")[] | undefined;
447
447
  all?: csstype.Globals | readonly NonNullable<csstype.Globals | undefined>[] | readonly csstype.Globals[] | undefined;
448
- animation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "none" | "auto" | "normal" | "alternate" | "alternate-reverse" | "reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
448
+ animation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal" | "none" | "auto" | "alternate" | "alternate-reverse" | "reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
449
449
  animationRange?: readonly (string | (string & {}))[] | csstype.Property.AnimationRange<string | number> | readonly NonNullable<csstype.Property.AnimationRange<string | number> | undefined>[] | undefined;
450
450
  background?: readonly (string | (string & {}))[] | csstype.Property.Background<string | number> | readonly NonNullable<csstype.Property.Background<string | number> | undefined>[] | undefined;
451
451
  border?: readonly (string | (string & {}))[] | csstype.Property.Border<string | number> | readonly NonNullable<csstype.Property.Border<string | number> | undefined>[] | undefined;
@@ -454,7 +454,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
454
454
  borderBlockStart?: readonly (string | (string & {}))[] | csstype.Property.BorderBlockStart<string | number> | readonly NonNullable<csstype.Property.BorderBlockStart<string | number> | undefined>[] | undefined;
455
455
  borderBottom?: readonly (string | (string & {}))[] | csstype.Property.BorderBottom<string | number> | readonly NonNullable<csstype.Property.BorderBottom<string | number> | undefined>[] | undefined;
456
456
  borderColor?: readonly string[] | csstype.Property.BorderColor | readonly csstype.Property.BorderColor[] | undefined;
457
- borderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ("repeat" | (string & {}) | csstype.Globals | "none" | "round" | "space" | "stretch")[] | undefined;
457
+ borderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ((string & {}) | csstype.Globals | "repeat" | "none" | "round" | "space" | "stretch")[] | undefined;
458
458
  borderInline?: readonly (string | (string & {}))[] | csstype.Property.BorderInline<string | number> | readonly NonNullable<csstype.Property.BorderInline<string | number> | undefined>[] | undefined;
459
459
  borderInlineEnd?: readonly (string | (string & {}))[] | csstype.Property.BorderInlineEnd<string | number> | readonly NonNullable<csstype.Property.BorderInlineEnd<string | number> | undefined>[] | undefined;
460
460
  borderInlineStart?: readonly (string | (string & {}))[] | csstype.Property.BorderInlineStart<string | number> | readonly NonNullable<csstype.Property.BorderInlineStart<string | number> | undefined>[] | undefined;
@@ -486,7 +486,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
486
486
  marginBlock?: readonly (string | (string & {}))[] | csstype.Property.MarginBlock<string | number> | readonly NonNullable<csstype.Property.MarginBlock<string | number> | undefined>[] | undefined;
487
487
  marginInline?: readonly (string | (string & {}))[] | csstype.Property.MarginInline<string | number> | readonly NonNullable<csstype.Property.MarginInline<string | number> | undefined>[] | undefined;
488
488
  mask?: readonly (string | (string & {}))[] | csstype.Property.Mask<string | number> | readonly NonNullable<csstype.Property.Mask<string | number> | undefined>[] | undefined;
489
- maskBorder?: csstype.Property.MaskBorder | readonly NonNullable<csstype.Property.MaskBorder | undefined>[] | readonly ("repeat" | (string & {}) | csstype.Globals | "none" | "round" | "space" | "alpha" | "luminance" | "stretch")[] | undefined;
489
+ maskBorder?: csstype.Property.MaskBorder | readonly NonNullable<csstype.Property.MaskBorder | undefined>[] | readonly ((string & {}) | csstype.Globals | "repeat" | "none" | "round" | "space" | "alpha" | "luminance" | "stretch")[] | undefined;
490
490
  motion?: readonly (string | (string & {}))[] | csstype.Property.Offset<string | number> | readonly NonNullable<csstype.Property.Offset<string | number> | undefined>[] | undefined;
491
491
  offset?: readonly (string | (string & {}))[] | csstype.Property.Offset<string | number> | readonly NonNullable<csstype.Property.Offset<string | number> | undefined>[] | undefined;
492
492
  outline?: readonly (string | (string & {}))[] | csstype.Property.Outline<string | number> | readonly NonNullable<csstype.Property.Outline<string | number> | undefined>[] | undefined;
@@ -729,8 +729,8 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
729
729
  WebkitUserModify?: csstype.Property.WebkitUserModify | readonly NonNullable<csstype.Property.WebkitUserModify | undefined>[] | readonly csstype.Property.WebkitUserModify[] | undefined;
730
730
  WebkitUserSelect?: csstype.Property.UserSelect | readonly NonNullable<csstype.Property.UserSelect | undefined>[] | readonly csstype.Property.UserSelect[] | undefined;
731
731
  WebkitWritingMode?: csstype.Property.WritingMode | readonly NonNullable<csstype.Property.WritingMode | undefined>[] | readonly csstype.Property.WritingMode[] | undefined;
732
- MozAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "none" | "auto" | "normal" | "alternate" | "alternate-reverse" | "reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
733
- MozBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ("repeat" | (string & {}) | csstype.Globals | "none" | "round" | "space" | "stretch")[] | undefined;
732
+ MozAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal" | "none" | "auto" | "alternate" | "alternate-reverse" | "reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
733
+ MozBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ((string & {}) | csstype.Globals | "repeat" | "none" | "round" | "space" | "stretch")[] | undefined;
734
734
  MozColumnRule?: readonly (string | (string & {}))[] | csstype.Property.ColumnRule<string | number> | readonly NonNullable<csstype.Property.ColumnRule<string | number> | undefined>[] | undefined;
735
735
  MozColumns?: readonly (string | (string & {}))[] | csstype.Property.Columns<string | number> | readonly NonNullable<csstype.Property.Columns<string | number> | undefined>[] | undefined;
736
736
  MozOutlineRadius?: readonly (string | (string & {}))[] | csstype.Property.MozOutlineRadius<string | number> | readonly NonNullable<csstype.Property.MozOutlineRadius<string | number> | undefined>[] | undefined;
@@ -741,16 +741,16 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
741
741
  msScrollSnapX?: readonly string[] | csstype.Property.MsScrollSnapX | readonly csstype.Property.MsScrollSnapX[] | undefined;
742
742
  msScrollSnapY?: readonly string[] | csstype.Property.MsScrollSnapY | readonly csstype.Property.MsScrollSnapY[] | undefined;
743
743
  msTransition?: readonly string[] | csstype.Property.Transition<string & {}> | readonly csstype.Property.Transition<string & {}>[] | undefined;
744
- WebkitAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "none" | "auto" | "normal" | "alternate" | "alternate-reverse" | "reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
744
+ WebkitAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal" | "none" | "auto" | "alternate" | "alternate-reverse" | "reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
745
745
  WebkitBorderBefore?: readonly (string | (string & {}))[] | csstype.Property.WebkitBorderBefore<string | number> | readonly NonNullable<csstype.Property.WebkitBorderBefore<string | number> | undefined>[] | undefined;
746
- WebkitBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ("repeat" | (string & {}) | csstype.Globals | "none" | "round" | "space" | "stretch")[] | undefined;
746
+ WebkitBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ((string & {}) | csstype.Globals | "repeat" | "none" | "round" | "space" | "stretch")[] | undefined;
747
747
  WebkitBorderRadius?: readonly (string | (string & {}))[] | csstype.Property.BorderRadius<string | number> | readonly NonNullable<csstype.Property.BorderRadius<string | number> | undefined>[] | undefined;
748
748
  WebkitColumnRule?: readonly (string | (string & {}))[] | csstype.Property.ColumnRule<string | number> | readonly NonNullable<csstype.Property.ColumnRule<string | number> | undefined>[] | undefined;
749
749
  WebkitColumns?: readonly (string | (string & {}))[] | csstype.Property.Columns<string | number> | readonly NonNullable<csstype.Property.Columns<string | number> | undefined>[] | undefined;
750
750
  WebkitFlex?: readonly (string | (string & {}))[] | csstype.Property.Flex<string | number> | readonly NonNullable<csstype.Property.Flex<string | number> | undefined>[] | undefined;
751
751
  WebkitFlexFlow?: readonly string[] | csstype.Property.FlexFlow | readonly csstype.Property.FlexFlow[] | undefined;
752
752
  WebkitMask?: readonly (string | (string & {}))[] | csstype.Property.WebkitMask<string | number> | readonly NonNullable<csstype.Property.WebkitMask<string | number> | undefined>[] | undefined;
753
- WebkitMaskBoxImage?: csstype.Property.MaskBorder | readonly NonNullable<csstype.Property.MaskBorder | undefined>[] | readonly ("repeat" | (string & {}) | csstype.Globals | "none" | "round" | "space" | "alpha" | "luminance" | "stretch")[] | undefined;
753
+ WebkitMaskBoxImage?: csstype.Property.MaskBorder | readonly NonNullable<csstype.Property.MaskBorder | undefined>[] | readonly ((string & {}) | csstype.Globals | "repeat" | "none" | "round" | "space" | "alpha" | "luminance" | "stretch")[] | undefined;
754
754
  WebkitTextEmphasis?: readonly string[] | csstype.Property.TextEmphasis | readonly csstype.Property.TextEmphasis[] | undefined;
755
755
  WebkitTextStroke?: readonly (string | (string & {}))[] | csstype.Property.WebkitTextStroke<string | number> | readonly NonNullable<csstype.Property.WebkitTextStroke<string | number> | undefined>[] | undefined;
756
756
  WebkitTransition?: readonly string[] | csstype.Property.Transition<string & {}> | readonly csstype.Property.Transition<string & {}>[] | undefined;
@@ -831,7 +831,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
831
831
  MozTransitionTimingFunction?: readonly string[] | csstype.Property.TransitionTimingFunction | readonly csstype.Property.TransitionTimingFunction[] | undefined;
832
832
  MozUserInput?: csstype.Property.MozUserInput | readonly NonNullable<csstype.Property.MozUserInput | undefined>[] | readonly csstype.Property.MozUserInput[] | undefined;
833
833
  msImeMode?: csstype.Property.ImeMode | readonly NonNullable<csstype.Property.ImeMode | undefined>[] | readonly csstype.Property.ImeMode[] | undefined;
834
- OAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "none" | "auto" | "normal" | "alternate" | "alternate-reverse" | "reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
834
+ OAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal" | "none" | "auto" | "alternate" | "alternate-reverse" | "reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
835
835
  OAnimationDelay?: readonly string[] | csstype.Property.AnimationDelay<string & {}> | readonly csstype.Property.AnimationDelay<string & {}>[] | undefined;
836
836
  OAnimationDirection?: readonly string[] | csstype.Property.AnimationDirection | readonly csstype.Property.AnimationDirection[] | undefined;
837
837
  OAnimationDuration?: readonly string[] | csstype.Property.AnimationDuration<string & {}> | readonly csstype.Property.AnimationDuration<string & {}>[] | undefined;
@@ -841,7 +841,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
841
841
  OAnimationPlayState?: readonly string[] | csstype.Property.AnimationPlayState | readonly csstype.Property.AnimationPlayState[] | undefined;
842
842
  OAnimationTimingFunction?: readonly string[] | csstype.Property.AnimationTimingFunction | readonly csstype.Property.AnimationTimingFunction[] | undefined;
843
843
  OBackgroundSize?: readonly (string | (string & {}))[] | csstype.Property.BackgroundSize<string | number> | readonly NonNullable<csstype.Property.BackgroundSize<string | number> | undefined>[] | undefined;
844
- OBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ("repeat" | (string & {}) | csstype.Globals | "none" | "round" | "space" | "stretch")[] | undefined;
844
+ OBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ((string & {}) | csstype.Globals | "repeat" | "none" | "round" | "space" | "stretch")[] | undefined;
845
845
  OObjectFit?: csstype.Property.ObjectFit | readonly NonNullable<csstype.Property.ObjectFit | undefined>[] | readonly csstype.Property.ObjectFit[] | undefined;
846
846
  OObjectPosition?: readonly (string | (string & {}))[] | csstype.Property.ObjectPosition<string | number> | readonly NonNullable<csstype.Property.ObjectPosition<string | number> | undefined>[] | undefined;
847
847
  OTabSize?: readonly (string | (string & {}))[] | csstype.Property.TabSize<string | number> | readonly NonNullable<csstype.Property.TabSize<string | number> | undefined>[] | undefined;
@@ -1,11 +1,11 @@
1
- export { b as default } from '../chunk-CU7PKEY2.js';
1
+ export { b as default } from '../chunk-VPKUUY5Q.js';
2
2
  import '../chunk-LDGBS7ZI.js';
3
+ import '../chunk-WUFEPE2G.js';
3
4
  export { b as useSettingsContext } from '../chunk-2WG6OWB4.js';
4
5
  import '../chunk-6W52DPH4.js';
5
6
  import '../chunk-TWSAWMZ3.js';
6
7
  import '../chunk-ROVD7OGE.js';
7
8
  import '../chunk-EQYL7U3J.js';
8
- import '../chunk-WUFEPE2G.js';
9
9
  export { a as THEME_CONFIG } from '../chunk-GLRLKFPS.js';
10
10
  //# sourceMappingURL=out.js.map
11
11
  //# sourceMappingURL=theme-provider.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zydon/common",
3
- "version": "2.7.61",
3
+ "version": "2.7.63",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "./dist/index.js",
@@ -1,36 +0,0 @@
1
- import { a as a$5 } from './chunk-DTIGB5NW.js';
2
- import { a as a$6 } from './chunk-C7VQJ35F.js';
3
- import { a } from './chunk-AA2DXMIC.js';
4
- import { e } from './chunk-OF6623HG.js';
5
- import { a as a$2 } from './chunk-BX2JPTSO.js';
6
- import { x } from './chunk-33C6UWPV.js';
7
- import { a as a$3 } from './chunk-45OMMG7D.js';
8
- import { a as a$7 } from './chunk-6U5LS7MP.js';
9
- import { a as a$4 } from './chunk-DLIHGNBS.js';
10
- import { j } from './chunk-VITOOMKK.js';
11
- import { a as a$8 } from './chunk-SVX7EWV4.js';
12
- import { a as a$1 } from './chunk-XNKYJHNL.js';
13
- import { memo, forwardRef, useMemo, useLayoutEffect, useState, useCallback, useRef, useEffect } from 'react';
14
- import $o from '@mui/material/FormHelperText';
15
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
16
- import { useSensors, useSensor, PointerSensor, KeyboardSensor, DndContext, closestCenter } from '@dnd-kit/core';
17
- import { restrictToHorizontalAxis, restrictToParentElement, restrictToWindowEdges } from '@dnd-kit/modifiers';
18
- import { useSortable, sortableKeyboardCoordinates, SortableContext, horizontalListSortingStrategy } from '@dnd-kit/sortable';
19
- import { m, AnimatePresence } from 'framer-motion';
20
- import de from '@mui/material/Stack';
21
- import Qe from '@mui/material/Typography';
22
- import De from '@mui/material/Box';
23
- import Vo from '@mui/material/IconButton';
24
- import Ko from '@mui/material/Paper';
25
- import { styled, alpha } from '@mui/material/styles';
26
- import Yo from '@mui/material/Badge';
27
- import Gr from '@mui/material/ButtonBase';
28
- import Hr from '@mui/material/Tooltip';
29
- import { useDropzone } from 'react-dropzone';
30
- import Wt from '@mui/material/CircularProgress';
31
-
32
- var Xo=({helperText:e,disabled:o,isError:r})=>e?jsx($o,{error:r,sx:t=>({mx:"14px",color:o?t.palette.grey[500]:void 0}),children:e}):null,O=memo(Xo);var Me=styled(de)({position:"relative",width:"100%",borderRadius:8,overflow:"hidden","&:hover .actions":{display:"flex"}}),ke=styled(de)({position:"absolute",top:4,right:4,gap:.5,"& svg":{width:16,height:16}}),so=styled(De,{shouldForwardProp:e=>!["isDragActive","isError","disabled"].includes(e)})(({theme:e,isDragActive:o,isError:r,disabled:t})=>({outline:"none",cursor:"pointer",overflow:"hidden",position:"relative",padding:e.spacing(5),borderRadius:e.shape.borderRadius,transition:e.transitions.create("padding"),backgroundColor:e.palette.background.neutral,border:`dashed 1px ${e.palette.divider}`,...o&&{opacity:.72},...r&&{color:e.palette.error.main,backgroundColor:e.palette.error.lighter,borderColor:e.palette.error.light},...t&&{opacity:.48,pointerEvents:"none"},"&:hover":{opacity:.72}}));styled(de)(({theme:e})=>({display:"none",position:"absolute",alignItems:"center",justifyContent:"center",flexDirection:"row",gap:12,width:"100%",height:"100%",backgroundColor:alpha(e.palette.primary.main,.9),zIndex:999,button:{"&, &:hover, &:focus":{backgroundColor:e.palette.background.paper}}}));var lo=styled(Vo)(({theme:e})=>({position:"relative",zIndex:999,pointerEvents:"auto",color:e.palette.grey[700],backgroundColor:e.palette.grey[100],"&:hover":{color:e.palette.grey[900],backgroundColor:e.palette.grey[300]}})),He=styled("div")({position:"relative",zIndex:1,userSelect:"none","&:hover":{zIndex:2}}),po=styled(de,{shouldForwardProp:e=>!["isDragging"].includes(e)})(({theme:e,width:o,isDragging:r})=>({width:o,height:100,alignItems:"center",display:"inline-flex",justifyContent:"center",margin:e.spacing(.5),padding:e.spacing(2,1,2,1),gap:e.spacing(1),borderRadius:e.spacing(1.25),overflow:"hidden",position:"relative",border:`solid 1px ${e.palette.divider}`,backgroundColor:e.palette.common.white,zIndex:1,transition:"box-shadow 150ms ease-in-out",boxShadow:r?`0 0 0 2px ${e.palette.primary.main}, ${e.customShadows.z8}, inset 0 0 0 1000px ${alpha(e.palette.primary.main,.06)}`:"0px 0px 0px 0px rgba(0, 0, 0, 0)"})),mo=styled(m.div)(({theme:e,width:o,isDragging:r})=>({width:o,height:60,alignItems:"center",display:"inline-flex",justifyContent:"center",margin:e.spacing(.5),padding:e.spacing(2),borderRadius:e.spacing(1.25),overflow:"hidden",position:"relative",border:`solid 1px ${e.palette.divider}`,backgroundColor:e.palette.common.white,zIndex:1,transition:"box-shadow 150ms ease-in-out",boxShadow:r?`0 0 0 2px ${e.palette.primary.main}, ${e.customShadows.z8}, inset 0 0 0 1000px ${alpha(e.palette.primary.main,.06)}`:"0px 0px 0px 0px rgba(0, 0, 0, 0)"})),co=styled(a)(({theme:e})=>({top:16,right:16,zIndex:9,position:"absolute",color:e.palette.common.white,backgroundColor:alpha(e.palette.grey[900],.72),"&:hover":{backgroundColor:alpha(e.palette.grey[900],.48)}})),go=styled(De,{shouldForwardProp:e=>e!=="isDragActive"&&e!=="disabled"&&e!=="hasError"})(({theme:e,isDragActive:o,disabled:r,hasError:t})=>({width:64,height:64,flexShrink:0,display:"flex",borderRadius:1,cursor:"pointer",alignItems:"center",color:e.palette.text.disabled,justifyContent:"center",backgroundColor:alpha(e.palette.grey[500],.08),border:`dashed 1px ${alpha(e.palette.grey[500],.16)}`,...o&&{opacity:.72},...r&&{opacity:.48,pointerEvents:"none"},...t&&{color:e.palette.error.main,borderColor:e.palette.error.main,backgroundColor:alpha(e.palette.error.main,.08)},"&:hover":{opacity:.72}})),uo=styled(De)(({theme:e})=>({padding:e.spacing(1),top:0,left:0,width:"100%",height:"100%",position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",transition:"all 0.3s ease-in-out",filter:"blur(0)","&:hover .single-file-preview-img":{filter:"blur(3px)",transition:"all 0.1s ease-in-out"},"&:hover .single-file-preview-hover-overlay":{opacity:1}})),fo=styled("img",{shouldForwardProp:e=>e!=="aspectRatio"&&e!=="isLoading"&&e!=="isUploading"&&e!=="maxWidth"&&e!=="maxHeight"&&e!=="cropSize"&&e!=="fill"})(({theme:e,aspectRatio:o,maxWidth:r,maxHeight:t,isLoading:l,isUploading:s,fill:i})=>({borderRadius:e.shape.borderRadius,objectFit:"cover",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%) scale(1)",filter:"blur(0)",zIndex:1,backgroundColor:e.palette.background.paper,...i&&{width:"100%",height:"100%"},...!i&&Math.abs(o)>=1&&{maxWidth:r,maxHeight:t,aspectRatio:Math.abs(o),width:"calc(100% - 16px)",height:void 0},...!i&&Math.abs(o)<1&&{maxWidth:r,maxHeight:t,aspectRatio:Math.abs(o),width:void 0,height:"calc(100% - 16px)"},transition:"all 0.3s ease-in-out",...l||s?{opacity:0,filter:"blur(1.5rem)",transform:"translate(-50%, -50%) scale(0.7)"}:{}})),xo=styled("img",{shouldForwardProp:e=>e!=="isLoading"&&e!=="isUploading"})(({isLoading:e,isUploading:o})=>({width:"100%",height:"100%",objectFit:"cover",top:0,left:0,filter:"blur(1.5rem)",transform:"scale(1.1)",position:"absolute",zIndex:0,transition:"opacity 0.3s ease-in-out",...e&&{opacity:0},...o&&{opacity:.7,filter:"blur(2rem)"}})),ho=styled(de)(({theme:e})=>({position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:alpha(e.palette.primary.darker,.75),zIndex:2,pointerEvents:"none",opacity:0,transition:"opacity 0.3s ease-in-out"})),bo=styled(de)({width:"100%",height:"100%",position:"relative",overflow:"hidden",borderRadius:"50%",justifyContent:"center",alignItems:"center"});styled(Ko)(({theme:e})=>({py:1,px:2,mt:3,textAlign:"left",borderStyle:"dashed",borderColor:"error.main",backgroundColor:alpha(e.palette.error.main,.08)}));var $e=styled(De,{shouldForwardProp:e=>e!=="isError"&&e!=="hasFile"})(({theme:e,isError:o,hasFile:r})=>({top:0,gap:e.spacing(1),left:0,width:"100%",height:"100%",zIndex:9,display:"flex",borderRadius:"50%",position:"absolute",alignItems:"center",color:e.palette.text.disabled,flexDirection:"column",justifyContent:"center",backgroundColor:alpha(e.palette.grey[500],.08),transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.shorter}),"&:hover":{opacity:.92},...o&&{color:e.palette.error.main},...r&&{zIndex:9,opacity:0,color:e.palette.common.white,backgroundColor:alpha(e.palette.common.black,.54)}})),Io=styled(de)({top:0,left:0,right:0,bottom:0,position:"absolute",zIndex:10,alignItems:"center",justifyContent:"center",opacity:.8});styled(de)(({theme:e})=>({padding:20,justifyContent:"center",alignItems:"center",gap:4,alignSelf:"stretch",borderRadius:12,background:e.palette.divider,color:e.palette.text.disabled,height:160}));var Po=styled(De,{shouldForwardProp:e=>e!=="isDragActive"&&e!=="isError"&&e!=="hasFile"})(({theme:e,isDragActive:o,disabled:r,isError:t,hasFile:l})=>({padding:e.spacing(1),margin:"auto",width:144,height:144,cursor:"pointer",overflow:"hidden",borderRadius:"50%",border:`1px dashed ${e.palette.divider}`,...o&&{opacity:.72},...r&&{opacity:.48,pointerEvents:"none"},...t&&{borderColor:"error.main"},...l&&{...t&&{bgcolor:alpha(e.palette.error.main,.08)},"&:hover .upload-placeholder":{opacity:1},"& img":{filter:"blur(0)"},"&:hover img":{filter:"blur(3px)"}}})),vo=styled("img")({width:"100%",height:"100%",borderRadius:"50%",objectFit:"cover",transition:"all 0.3s ease-in-out"}),Eo=styled(a)(({theme:e})=>({backgroundColor:alpha(e.palette.grey[900],.72),color:e.palette.common.white,"&:hover":{backgroundColor:alpha(e.palette.grey[600],.64),color:e.palette.common.white},"& svg":{width:14,height:14}}));var er=({onRemove:e,sx:o,file:r,disableDrag:t,attributes:l,listeners:s,innerWidth:i,isDragging:p})=>{let d=r?.id;return d?jsx(Yo,{anchorOrigin:{vertical:"top",horizontal:"left"},children:jsxs(mo,{width:i,isDragging:p,"data-testid":`preview-multi-img-${d}`,...j().inUp,sx:o,children:[jsx(a$2,{disableDrag:t,...l,...s}),jsx(Ee,{imageView:!0,file:r}),jsx(ke,{sx:{position:"absolute",right:3,top:3,zIndex:1},children:e&&jsx(Eo,{size:"small",label:"Remover arquivo",onClick:()=>e(r),icon:"DELETE_MARK_BUTTON_02"})})]})},`badge-${d}`):null},Fo=memo(er);var ar=({file:e$1,thumbnail:o,onRemove:r,sx:t,disableDrag:l=!1,disableTransitions:s=!1})=>{let i=e$1.size||0,p=e$1.name||e$1.id,d=e$1.id,m=typeof e$1=="string",a$1=l?70:80,{attributes:g,listeners:x$1,setNodeRef:I,transform:A,transition:P,isDragging:L}=useSortable({id:d,disabled:l}),h={transform:s?void 0:x.Transform.toString(A),transition:s?"none":P,opacity:s?.2:1,display:"inline-block",alignItems:"center",justifyContent:"center",width:`${a$1+8}px`,height:"68px"};return o&&e$1?jsx(He,{ref:I,style:h,children:jsx(Fo,{innerWidth:a$1,isDragging:L,sx:t,file:e$1,disableDrag:l,attributes:g,listeners:x$1,onRemove:r})}):jsx(He,{ref:I,style:{...h,height:"80px",width:`${a$1+38}px`},children:jsxs(po,{width:a$1+30,isDragging:L,"data-testid":`preview-multi-img-${d}`,...j().inUp,sx:t,children:[jsx(a$2,{disableDrag:l,...g,...x$1}),e$1&&jsx(Ee,{file:e$1}),jsxs(de,{flexGrow:1,sx:{width:"100%"},children:[jsx(a$3,{title:p,children:jsx(Qe,{variant:"subtitle2",noWrap:!0,children:p})}),jsx(Qe,{variant:"caption",sx:{color:"text.secondary"},children:m?"":e(i)})]}),jsx(ke,{children:r&&jsx(a,{size:"small",label:"Remover arquivo",onClick:()=>r(e$1),icon:"DELETE_MARK_BUTTON_02"})})]})})},Do=memo(ar);var vr=({thumbnail:e,files:o,onRemove:r,onReorder:t,sx:l})=>{let[s,i]=useState(!1),p=useSensors(useSensor(PointerSensor,{activationConstraint:{distance:8}}),useSensor(KeyboardSensor,{coordinateGetter:sortableKeyboardCoordinates})),d=useCallback(a=>{let{active:g,over:x}=a;if(!(!g||!x||g.id===x.id)&&t){let I=o.findIndex(({id:P})=>P===g.id),A=o.findIndex(({id:P})=>P===x.id);I!==-1&&A!==-1&&(t(I,A,o),i(!0),setTimeout(()=>{i(!1);},300));}},[o,t]),m=jsx(AnimatePresence,{initial:!1,children:o.map(a=>jsx(Do,{sx:l,id:`preview-file-${a.id}`,file:a,onRemove:r,thumbnail:e,disableDrag:!t,disableTransitions:s},`preview-file-${a.id}`))});return t?jsx(DndContext,{sensors:p,collisionDetection:closestCenter,onDragEnd:d,modifiers:[restrictToHorizontalAxis,restrictToParentElement,restrictToWindowEdges],children:jsx(SortableContext,{items:o.map(a=>a.id),strategy:horizontalListSortingStrategy,children:m})}):m},_e=memo(vr);var _o=forwardRef(({onLoading:e,aspectRatio:o,cropSize:r,...t},l)=>{let{maxWidth:s,maxHeight:i}=useMemo(()=>r&&typeof r=="object"?{maxWidth:r.width,maxHeight:r.height}:r&&typeof r=="number"?{maxWidth:r,maxHeight:r}:{maxWidth:"100%",maxHeight:"100%"},[r]);a$1(()=>{e?.(!0);}),useLayoutEffect(()=>{typeof l=="object"&&l?.current?e?.(!l.current.complete):e?.(!1);},[l,e]);function p(){e?.(!1);}return jsx(fo,{...t,maxWidth:s,maxHeight:i,ref:l,aspectRatio:o,onLoad:p,onError:p})});_o.displayName="LoadingPreviewImage";var So=_o;var _r=({file:e,aspectRatio:o=1,isUploading:r,isLoading:t,onLoading:l,cropSize:s,maxWidth:i,maxHeight:p,hoverAlt:d,fill:m})=>{let a=useRef(null),g=e?.id||"",x=e?.name||"",I=URL.createObjectURL(e);return g?jsxs(uo,{className:"single-file-preview-box",children:[jsx(So,{className:"single-file-preview-img",aspectRatio:o,cropSize:s,isLoading:t,isUploading:r,alt:x,src:I,ref:a,loading:"lazy",onLoading:l,onLoad:()=>l?.(!1),onError:()=>l?.(!1),maxWidth:i,maxHeight:p,fill:m},`image-preview-${g}`),jsx(xo,{className:"single-file-preview-bg",alt:x,src:I,isLoading:t,isUploading:r}),d&&jsx(ho,{className:"single-file-preview-hover-overlay",children:d})]}):null},qe=memo(_r);var Tr=["pdf"],Or=["txt"],yr=["psd"],Ur=["doc","docx"],Cr=["xls","xlsx"],Lr=["zip","rar","iso"],Mr=["ai","eps"],kr=["ppt","pptx"],zr=["wav","aif","mp3","aac"],Nr=["jpg","jpeg","gif","bmp","png","svg","webp"],Br=["m4v","avi","mpg","mp4","webm"];function Ve(e){let o,r=To(e);return Or.includes(r)?o="txt":Lr.includes(r)?o="zip":zr.includes(r)?o="audio":Nr.includes(r)?o="image":Br.includes(r)?o="video":Ur.includes(r)?o="word":Cr.includes(r)?o="excel":kr.includes(r)?o="powerpoint":Tr.includes(r)?o="pdf":yr.includes(r)?o="photoshop":Mr.includes(r)?o="illustrator":e?.startsWith("http")?o="image":o=To(e),o}function Oo(e){let o;switch(Ve(e)){case"folder":o="IC_FOLDER";break;case"txt":o="IC_TXT";break;case"zip":o="IC_ZIP";break;case"audio":o="IC_AUDIO";break;case"video":o="IC_VIDEO";break;case"word":o="IC_WORD";break;case"excel":o="IC_EXCEL";break;case"powerpoint":o="IC_POWER_POINT";break;case"pdf":o="IC_PDF";break;case"photoshop":o="IC_PTS";break;case"illustrator":o="IC_AI";break;case"image":o="IC_IMG";break;default:o="IC_FILE";}return o}function To(e){return e&&e.split(".").pop()||""}function oa(e){return e.split("/").pop()}var Ne={root:"mnl__file__thumbnail__root",img:"mnl__file__thumbnail__img",icon:"mnl__file__thumbnail__icon",removeBtn:"mnl__file__thumbnail__remove__button",downloadBtn:"mnl__file__thumbnail__download__button"},Ee=({sx:e,file:o,tooltip:r,onRemove:t,imageView:l,slotProps:s,onDownload:i,...p})=>{let d=URL.createObjectURL(o),m=o?.name||"",g=o.type.startsWith("image/")?"image":Ve(d),x=jsx(De,{component:"img",src:d,className:Ne.img,sx:{width:1,height:1,objectFit:"cover",borderRadius:"inherit",...s?.img}}),I=jsx(a$4,{icon:Oo(g),sx:{width:32,height:32,flexShrink:0,...e}}),A=jsxs(de,{component:"span",className:Ne.root,sx:{width:36,height:36,flexShrink:0,borderRadius:1.25,alignItems:"center",position:"relative",display:"inline-flex",justifyContent:"center",...e},...p,children:[g==="image"&&l?x:I,t&&jsx(Gr,{onClick:t,className:Ne.removeBtn,sx:s?.removeBtn,children:jsx(a$4,{icon:"CLOSE_MARK_BUTTON",width:24})}),i&&jsx(Vo,{onClick:i,className:Ne.downloadBtn,sx:s?.downloadBtn,size:"small",children:jsx(a$4,{icon:"ARROW_DOWN_CICLE",width:12})})]});return r?jsx(Hr,{arrow:!0,title:m,slotProps:{popper:{modifiers:[{name:"offset",options:{offset:[0,-12]}}]}},children:A}):A};var ca=e=>e.startsWith("image/"),yo=(e,o=.8)=>new Promise((r,t)=>{let l=document.createElement("canvas"),s=l.getContext("2d"),i=new Image;i.onload=()=>{l.width=i.width,l.height=i.height,s?(s.drawImage(i,0,0),l.toBlob(p=>{if(p){let d=new File([p],e.name.replace(/\.[^/.]+$/,".webp"),{type:"image/webp",lastModified:Date.now()});r(d);}else t(new Error("Falha ao converter para WebP"));},"image/webp",o)):t(new Error("N\xE3o foi poss\xEDvel obter contexto do canvas"));},i.onerror=()=>t(new Error("Falha ao carregar imagem")),i.src=URL.createObjectURL(e);}),Uo=(e,o=.8,r,t)=>new Promise((l,s)=>{let i=document.createElement("canvas"),p=i.getContext("2d"),d=new Image;d.onload=()=>{let{width:m,height:a}=d;r&&m>r&&(a=a*r/m,m=r),t&&a>t&&(m=m*t/a,a=t),i.width=m,i.height=a,p?(p.imageSmoothingEnabled=!0,p.imageSmoothingQuality="high",p.drawImage(d,0,0,m,a),i.toBlob(g=>{if(g){let x=new File([g],e.name.replace(/\.[^/.]+$/,".webp"),{type:"image/webp",lastModified:Date.now()});l(x);}else s(new Error("Falha ao comprimir imagem"));},"image/webp",o)):s(new Error("N\xE3o foi poss\xEDvel obter contexto do canvas"));},d.onerror=()=>s(new Error("Falha ao carregar imagem")),d.src=URL.createObjectURL(e);}),Co=e=>{let o=e.match(/filename\*=UTF-8''([^;]+)|filename="?([^";]+)"?/i);return o?.[1]||o?.[2]||""},Lo=e=>`UTF-8''${encodeURIComponent(e)}`;var Jr=({onFilesSelect:e$1,onFileSelect:o,onReorder:r,onRemove:t,uploadFiles:l,filesPreview:s,dropzoneOptions:i,enableCrop:p=!1,customAspectRatio:d,convertToWebp:m=!0,cropSize:a,maxFiles:g,compressionQuality:x=.8,maxCompressedWidth:I,maxCompressedHeight:A})=>{let{showErrorMessage:P}=a$8(),L=useMemo(()=>d||(a&&typeof a!="number"?a.width/a.height:1),[d,a]),[h,F]=useState([]),[v,b]=useState(!1),[S,C]=useState(null),[u,E]=useState(null),[c,R]=useState(""),[z,U]=useState(!1),[y,M]=useState([]),[B,K]=useState(0),[oe,j]=useState(0),ne=f=>{if(f.length<1)return;let w=f[0];C(w),K(T=>T+1);let D=new FileReader;D.onload=()=>{R(D.result),b(!0);},D.readAsDataURL(w);},ue=(f,w)=>{E(w);},se=async f=>!S||!u?null:new Promise(w=>{let D=document.createElement("canvas"),T=D.getContext("2d"),k=new Image;k.onload=async()=>{let{width:W,height:pe,x:Se,y:Go}=u,jo=Math.abs(L),Te=W,Oe=pe;a&&typeof a=="object"?(Te=a.width,Oe=a.height):a&&typeof a=="number"&&(Te=a,Oe=a/jo),D.width=Te,D.height=Oe,T?(T.drawImage(k,Se,Go,W,pe,0,0,Te,Oe),D.toBlob(async ro=>{if(ro){let Ze=new File([ro],S.name,{type:S.type,lastModified:Date.now()});if(m)try{Ze=await yo(Ze,x);}catch(Zo){P(Zo,"Erro ao converter para WebP");}let to=Ze;to.id=f,w(to);}else w(null);},"image/png")):w(null);},k.src=c;}),le=async()=>{if(!(!S||!u||y.length===0)){U(!0);try{let f=y[0],w=await se(f.id);if(w){let T=await l([w]);T&&(!e$1&&!o&&F(k=>[...k,...T]),e$1?.([...s||[],...T]),o?.(w));}b(!1),U(!1),R(""),C(null);let D=y.slice(1);M(D),ne(D);}catch(f){P(f,"Erro ao processar imagem"),U(!1);}}},Z=()=>{b(!1),U(!1),R(""),C(null),M([]),K(0),j(0);},J=async f=>{if(f.length===0)return;let w=Object.keys(i?.accept||{}).some(T=>T.includes("image/")),D=h.length+f.length;if(g&&D>g){P(new Error(`M\xE1ximo de ${g} arquivos`),"Erro ao fazer upload");return}try{if(w&&p){let k=f.filter(W=>W.type.startsWith("image/")).map((W,pe)=>{let Se=W;return Se.id=`temp-crop-${Date.now()}-${pe}`,Se});j(k.length),K(0),M(k),ne(k);}else {let T=[];for(let W of f)if(W.type.startsWith("image/")&&m)try{let pe=await Uo(W,x,I,A);T.push(pe);}catch(pe){P(pe,"Erro ao comprimir imagem"),T.push(W);}else T.push(W);let k=await l(T);k&&(!e$1&&!o&&F(W=>[...W,...k]),e$1?.([...s||[],...k]),o?.(k[0]));}}catch(T){P(T,"Erro ao processar arquivos");}},Q=f=>{if(!f.length)return;let w=f[0]?.errors[0]?.code,D=i?.maxSize||3145728;P(w==="file-too-large"?new Error(`O arquivo excede o tamanho m\xE1ximo de ${e(D)}`):w==="file-invalid-type"?new Error("Formato de arquivo n\xE3o suportado"):f[0]?.errors[0]||new Error("Erro ao enviar arquivo"),"Erro ao fazer upload");},{getRootProps:re,getInputProps:H,isDragActive:n,isDragReject:fe,fileRejections:te}=useDropzone({onDrop:J,onDropRejected:Q,...i}),we=f=>{if(!f){t||F([]),t?.(void 0);return}let w=h.filter(D=>D.id!==f.id);t||F(w),t?.(f);},xe=(f,w,D)=>{r?.(f,w,D);},be=useRef("");return useEffect(()=>{let f=s?.map(w=>w.id).join(",")||"";f!==be.current&&(be.current=f,F(s||[]));},[s]),{file:h?.[0],files:h,aspectRatio:L,dropzoneProps:{getRootProps:re,getInputProps:H,isDragActive:n,isDragReject:fe,fileRejections:te},cropState:{cropModalOpen:v,imagePreview:c,cropLoading:z,setCropModalOpen:b,onCropInitialized:ue,handleCropSave:le,handleCropCancel:Z,currentImageIndex:B,totalPendingImages:oe},setInitialFiles:F,handleRemove:we,handleReorder:xe}},X=Jr;var Ke=(n=>(n.APPLICATION_OCTET_STREAM="application/octet-stream",n.IMAGE_JPEG="image/jpeg",n.IMAGE_JPG="image/jpg",n.IMAGE_PNG="image/png",n.IMAGE_GIF="image/gif",n.IMAGE_WEBP="image/webp",n.IMAGE_SVG="image/svg+xml",n.IMAGE_BMP="image/bmp",n.IMAGE_TIFF="image/tiff",n.IMAGE_ICO="image/x-icon",n.IMAGE_AVIF="image/avif",n.APPLICATION_PDF="application/pdf",n.TEXT_PLAIN="text/plain",n.TEXT_CSV="text/csv",n.APPLICATION_RTF="application/rtf",n.APPLICATION_MSWORD="application/msword",n.APPLICATION_DOCX="application/vnd.openxmlformats-officedocument.wordprocessingml.document",n.APPLICATION_MSEXCEL="application/vnd.ms-excel",n.APPLICATION_XLSX="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",n.APPLICATION_MSPOWERPOINT="application/vnd.ms-powerpoint",n.APPLICATION_PPTX="application/vnd.openxmlformats-officedocument.presentationml.presentation",n.APPLICATION_ODT="application/vnd.oasis.opendocument.text",n.APPLICATION_ODS="application/vnd.oasis.opendocument.spreadsheet",n.APPLICATION_ODP="application/vnd.oasis.opendocument.presentation",n.APPLICATION_XML="application/xml",n.TEXT_XML="text/xml",n.TEXT_HTML="text/html",n.TEXT_CSS="text/css",n.APPLICATION_JSON="application/json",n.TEXT_JAVASCRIPT="text/javascript",n.APPLICATION_ZIP="application/zip",n.APPLICATION_GZIP="application/gzip",n.APPLICATION_RAR="application/vnd.rar",n.APPLICATION_7Z="application/x-7z-compressed",n.AUDIO_MPEG="audio/mpeg",n.AUDIO_WAV="audio/wav",n.AUDIO_OGG="audio/ogg",n.AUDIO_WEBM="audio/webm",n.AUDIO_AAC="audio/aac",n.VIDEO_MP4="video/mp4",n.VIDEO_MPEG="video/mpeg",n.VIDEO_OGG="video/ogg",n.VIDEO_WEBM="video/webm",n.VIDEO_QUICKTIME="video/quicktime",n))(Ke||{}),Be=(e=>(e["application/octet-stream"]="APPLICATION_OCTET_STREAM",e["image/jpeg"]="IMAGE_JPEG",e["image/jpg"]="IMAGE_JPG",e["image/png"]="IMAGE_PNG",e["image/gif"]="IMAGE_GIF",e["image/webp"]="IMAGE_WEBP",e["image/svg+xml"]="IMAGE_SVG",e["image/bmp"]="IMAGE_BMP",e["image/tiff"]="IMAGE_TIFF",e["image/x-icon"]="IMAGE_ICO",e["image/avif"]="IMAGE_AVIF",e["application/pdf"]="APPLICATION_PDF",e["text/plain"]="TEXT_PLAIN",e["text/csv"]="TEXT_CSV",e["application/rtf"]="APPLICATION_RTF",e["application/msword"]="APPLICATION_MSWORD",e["application/vnd.openxmlformats-officedocument.wordprocessingml.document"]="APPLICATION_DOCX",e["application/vnd.ms-excel"]="APPLICATION_MSEXCEL",e["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"]="APPLICATION_XLSX",e["application/vnd.ms-powerpoint"]="APPLICATION_MSPOWERPOINT",e["application/vnd.openxmlformats-officedocument.presentationml.presentation"]="APPLICATION_PPTX",e["application/vnd.oasis.opendocument.text"]="APPLICATION_ODT",e["application/vnd.oasis.opendocument.spreadsheet"]="APPLICATION_ODS",e["application/vnd.oasis.opendocument.presentation"]="APPLICATION_ODP",e["application/xml"]="APPLICATION_XML",e["text/xml"]="TEXT_XML",e["text/html"]="TEXT_HTML",e["text/css"]="TEXT_CSS",e["application/json"]="APPLICATION_JSON",e["text/javascript"]="TEXT_JAVASCRIPT",e["application/zip"]="APPLICATION_ZIP",e["application/gzip"]="APPLICATION_GZIP",e["application/vnd.rar"]="APPLICATION_RAR",e["application/x-7z-compressed"]="APPLICATION_7Z",e["audio/mpeg"]="AUDIO_MPEG",e["audio/wav"]="AUDIO_WAV",e["audio/ogg"]="AUDIO_OGG",e["audio/webm"]="AUDIO_WEBM",e["audio/aac"]="AUDIO_AAC",e["video/mp4"]="VIDEO_MP4",e["video/mpeg"]="VIDEO_MPEG",e["video/ogg"]="VIDEO_OGG",e["video/webm"]="VIDEO_WEBM",e["video/quicktime"]="VIDEO_QUICKTIME",e))(Be||{});var ot=({createFilesMutation:e,filesDetails:o})=>{let{showErrorMessage:r}=a$8(),[t,l]=useState(!1),[s,i]=useState(!1),[p,d]=useState(null),[m,a]=useState([]),g=useMemo(()=>m?.[0],[m]),x=s||t,I=useCallback(async h=>{if(!h.length){a([]),i(!1);return}i(!0);try{let v=(await Promise.all(h.map(async({url:b,id:S,name:C})=>{try{if(!b)return null;let u=await fetch(b);if(!u.ok)throw new Error(u.statusText);let E=await u.blob(),c=null;if(!C){let U=u.headers.get("content-disposition")||void 0;if(U){let y=Co(U);if(y)try{c=decodeURIComponent(y);}catch{c=y;}}}let R=c||C||S,z=new File([E],R,{type:E.type});return z.id=S,z.url=b,z}catch{return null}}))).filter(Boolean);a(v),i(!1);}catch(F){r(F,"Erro ao carregar arquivos"),a([]),i(!1);}},[r]),A=useRef("");useEffect(()=>{let h=o?.map(({id:F})=>F).join(",")||"";h!==A.current&&(async()=>(A.current=h,await I(o)))();},[o,I]);let P=async h=>{if(!h||!Array.isArray(h))throw new Error("Arquivos inv\xE1lidos");let F=h.filter(v=>v instanceof File);if(F?.length){l(!0);try{let v=F.map(u=>{let E=u.type||"application/octet-stream",c=Be[E];if(!c)throw new Error(`Tipo de arquivo n\xE3o suportado: ${E}`);return {file:u,mimeType:E,contentTypeEnum:c}}),b=await e({files:v.map(({file:u,contentTypeEnum:E})=>({content_type:E,name:u.name}))}).unwrap(),S=b.files.map((u,E)=>{let c=v[E].file,R=c;return R.id=u.id,R.url=URL.createObjectURL(c),R});return await(await Promise.all(b.files.map((u,E)=>{let{mimeType:c}=v[E],R=S[E];return fetch(u.url,{method:"PUT",headers:{"Content-Type":c,"Content-Disposition":`inline; filename*=${Lo(R.name)}`,"X-File-Id":u.id},body:R})}))).forEach(async u=>{if(!u.ok)throw new Error("Erro no upload do arquivo.")}),S}catch(v){throw d(v),r(v,"Erro no upload"),v}finally{l(!1);}}},L=useMemo(()=>p&&p instanceof Error?p.message:p,[p]);return {setFilesPreview:a,uploadFiles:P,filesPreview:m,filePreview:g,isLoadingPreview:s,isUploadingFiles:t,isUploadOrLoadingFiles:x,uploadErrorText:L}},q=ot;var tt=({sx:e,id:o,name:r,tabIndex:t,uploading:l,getRootProps:s,getInputProps:i,isDragActive:p,isError:d,disabled:m,dropZoneSxProps:a,dropZoneContent:g,children:x,...I})=>jsxs(Me,{children:[l&&jsx(a$7,{"data-testid":"uploading-progress-bar",sx:{zIndex:1}}),jsxs(De,{sx:{width:1,position:"relative",...e},children:[jsxs(so,{...s(),"data-testid":"drop-zone-styled-area",isError:d,isDragActive:p,disabled:!!m,sx:a,...I,children:[jsx("input",{...i(),id:o,tabIndex:t,name:r}),g]}),x]})]}),me=tt;var nt=({header:e,description:o,sx:r,...t})=>jsxs(de,{spacing:5,alignItems:"center",justifyContent:"center",direction:{xs:"column",md:"row"},sx:{width:1,textAlign:{xs:"center",md:"left"},...r},...t,children:[jsx(a$5,{sx:{width:220}}),jsxs("div",{children:[jsx(Qe,{gutterBottom:!0,variant:"h5",children:e||"Soltar ou selecionar arquivos"}),jsx(Qe,{variant:"body2",sx:{color:"text.secondary"},children:o||jsxs(Fragment,{children:["Solte os arquivos aqui ou clique",jsx(Qe,{variant:"body2",component:"span",sx:{mx:.5,color:"primary.main",textDecoration:"underline"},children:"procurar"}),"na sua m\xE1quina"]})})]})]}),ce=memo(nt);var mt=({onRemove:e,onReorder:o,onFilesSelect:r,createFilesMutation:t,filesDetails:l=[],id:s,disabled:i,error:p,helperText:d,thumbnail:m,dropZoneSxProps:a,uploading:g,tabIndex:x,maxFiles:I,placeholderAlt:A,placeholderProps:P,...L})=>{let{filesPreview:h,isUploadOrLoadingFiles:F,uploadErrorText:v,uploadFiles:b}=q({createFilesMutation:t,filesDetails:l}),{files:S,dropzoneProps:C,handleRemove:u,handleReorder:E}=X({onFilesSelect:r,onReorder:o,onRemove:e,filesPreview:h,dropzoneOptions:{multiple:!0,disabled:i,...L},maxFiles:I,uploadFiles:b}),{getRootProps:c,getInputProps:R,isDragActive:z,isDragReject:U}=C,y=!!S?.filter(B=>!!B.id).length,M=U||!!p||!!v;return jsxs(me,{id:s,uploading:g||F,disabled:i,dropZoneSxProps:a,tabIndex:x,getRootProps:c,getInputProps:R,isDragActive:z,isError:M,dropZoneContent:jsx(Fragment,{children:A?jsx(de,{children:A}):jsx(ce,{header:P?.header,description:P?.description})}),children:[jsx(O,{disabled:i,helperText:d,isError:M}),p?jsx(O,{helperText:p,isError:!0}):null,v?jsx(O,{helperText:v,isError:!0}):null,y&&jsx(De,{sx:{my:3},children:jsx(_e,{files:S,thumbnail:!!m,onRemove:e?u:void 0,onReorder:o?E:void 0})})]})},ct=memo(mt);var It=({onRemove:e,onReorder:o,onFilesSelect:r,createFilesMutation:t,filesDetails:l=[],id:s,disabled:i,error:p,helperText:d,dropZoneSxProps:m,placeholderProps:a,placeholderAlt:g,uploading:x,tabIndex:I,maxFiles:A,aspectRatio:P,enableCrop:L=!0,convertToWebp:h=!0,cropSize:F,name:v,label:b,...S})=>{let{filesPreview:C,isUploadOrLoadingFiles:u,uploadErrorText:E,uploadFiles:c}=q({createFilesMutation:t,filesDetails:l}),R=x||u,{files:z,dropzoneProps:U,cropState:y,aspectRatio:M,handleRemove:B,handleReorder:K}=X({onFilesSelect:r,onReorder:o,onRemove:e,filesPreview:C,dropzoneOptions:{accept:{"image/*":[".jpeg",".jpg",".png",".gif",".webp"]},multiple:!0,disabled:i,...S},enableCrop:L,customAspectRatio:P,convertToWebp:h,maxFiles:A,cropSize:F,uploadFiles:c}),{getRootProps:oe,getInputProps:j,isDragActive:ne,isDragReject:ue}=U,{cropModalOpen:se,imagePreview:le,cropLoading:Z,onCropInitialized:J,handleCropSave:Q,handleCropCancel:re,currentImageIndex:H,totalPendingImages:n}=y,fe=!!z?.filter(xe=>!!xe.id).length,te=ue||!!p||!!E,we=useMemo(()=>{let xe=b??"Ajustar Imagem",be=n>1||H>1?` (${H} de ${n})`:"";return `${xe}${be}`},[b,n,H]);return jsxs(me,{id:s,name:v,uploading:R,disabled:i,dropZoneSxProps:m,tabIndex:I,getRootProps:oe,getInputProps:j,isDragActive:ne,isError:te,dropZoneContent:jsx(Fragment,{children:g?jsx(de,{children:g}):jsx(ce,{header:a?.header,description:a?.description})}),children:[jsx(O,{disabled:i,helperText:d,isError:te}),p?jsx(O,{helperText:p,isError:!0}):null,E?jsx(O,{helperText:E,isError:!0}):null,fe&&jsx(De,{sx:{my:3,ml:.5},children:jsx(_e,{files:z,thumbnail:!0,onRemove:B,onReorder:o?K:void 0})}),jsx(a$6,{open:se,onClose:re,label:we,imageSrc:le,aspectRatio:M,onInitialized:J,onSave:Q,loading:Z,cropSize:F})]})},Pt=memo(It);var Dt=({onFileSelect:e$1,onRemove:o,createFilesMutation:r,fileDetails:t,id:l,disabled:s,error:i,helperText:p,sx:d,dropZoneSxProps:m$1,uploading:a,tabIndex:g,placeholderAlt:x,placeholderProps:I,...A})=>{let{filesPreview:P,isUploadOrLoadingFiles:L,uploadErrorText:h,uploadFiles:F}=q({createFilesMutation:r,filesDetails:t?[t]:[]}),v=L||a,{file:b,dropzoneProps:S,handleRemove:C}=X({uploadFiles:F,onFileSelect:e$1,onRemove:o,filesPreview:P,dropzoneOptions:{multiple:!1,disabled:s,...A}}),{getRootProps:u,getInputProps:E,isDragActive:c,isDragReject:R}=S,z=useCallback(B=>{B.stopPropagation(),C(b||void 0);},[b,C]),U=!!b,y=typeof b=="string",M=R||!!i||!!h;return jsxs(me,{id:l,uploading:v,disabled:s,dropZoneSxProps:m$1,tabIndex:g,getRootProps:u,getInputProps:E,isDragActive:c,isError:M,dropZoneContent:jsxs(Fragment,{children:[!U&&(x?jsx(de,{...I,children:x}):jsx(ce,{})),U&&jsxs(de,{component:m.div,...j().inUp,spacing:2,direction:"row",alignItems:"center",sx:{my:1,px:1,py:.75,borderRadius:.75,border:B=>`solid 1px ${B.palette.divider}`,...d},children:[jsx(Ee,{file:b}),jsxs(de,{flexGrow:1,sx:{minWidth:0},children:[jsx(Qe,{variant:"subtitle2",noWrap:!0,children:y?b:b.name}),jsx(Qe,{variant:"caption",sx:{color:"text.secondary"},children:y?"":e(b.size)})]}),o&&jsx(a$3,{title:"Remover arquivo",children:jsx(lo,{edge:"end",size:"small",disabled:s,"aria-label":"Remover arquivo",onClick:z,children:jsx(a$4,{icon:"DELETE_MARK_BUTTON_02",width:16})})})]})]}),children:[jsx(O,{disabled:s,helperText:p,isError:M}),i?jsx(O,{helperText:i,isError:!0}):null,h?jsx(O,{helperText:h,isError:!0}):null]})},Rt=memo(Dt);var Ct=({onRemove:e,onFileSelect:o,createFilesMutation:r,fileDetails:t,id:l,disabled:s,error:i,helperText:p,dropZoneSxProps:d,placeholderProps:m,placeholderAlt:a,hoverAlt:g,uploading:x,tabIndex:I,aspectRatio:A,enableCrop:P=!0,convertToWebp:L=!0,name:h,label:F,cropSize:v,sx:b,maxWidth:S,maxHeight:C,compressionQuality:u=.8,maxCompressedWidth:E,maxCompressedHeight:c,fill:R,...z})=>{let{filesPreview:U,isUploadOrLoadingFiles:y,uploadErrorText:M,uploadFiles:B}=q({createFilesMutation:r,filesDetails:t?[t]:[]}),[K,oe]=useState(!1),{file:j,dropzoneProps:ne,cropState:ue,handleRemove:se,aspectRatio:le}=X({onFileSelect:o,onRemove:e,dropzoneOptions:{accept:{"image/*":[".jpeg",".jpg",".png",".gif",".webp"]},multiple:!1,disabled:s,...z},filesPreview:U,enableCrop:P,customAspectRatio:A,convertToWebp:L,cropSize:v,uploadFiles:B,compressionQuality:u,maxCompressedWidth:E,maxCompressedHeight:c}),{getRootProps:Z,getInputProps:J,isDragActive:Q,isDragReject:re}=ne,{cropModalOpen:H,imagePreview:n,cropLoading:fe,onCropInitialized:te,handleCropSave:we,handleCropCancel:xe}=ue,be=useCallback(()=>{se(j||void 0);},[j,se]),f=!!j,w=re||!!i||!!M,D=x||y,T=f?{opacity:0}:{opacity:1},k=d?.width;return useEffect(()=>{f||oe(!1);},[f]),jsxs(Me,{sx:{...b,...k&&{width:k}},children:[(D||K)&&jsx(a$7,{}),jsxs(me,{id:l,uploading:D,disabled:s,dropZoneSxProps:d,tabIndex:I,getRootProps:Z,getInputProps:J,isDragActive:Q,isError:w,name:h,dropZoneContent:jsxs(Fragment,{children:[a?jsx(de,{sx:T,children:a}):jsx(ce,{sx:T,header:m?.title,description:m?.description}),f&&jsx(qe,{file:j,cropSize:v,isLoading:K,isUploading:D,onLoading:oe,aspectRatio:le,maxWidth:S,maxHeight:C,hoverAlt:g,fill:R})]}),children:[jsx(O,{disabled:s,helperText:p,isError:w}),i?jsx(O,{helperText:i,isError:!0}):null,M?jsx(O,{helperText:M,isError:!0}):null,f&&e&&jsx(co,{size:"small",onClick:be,disabled:s,label:"Remover arquivo",children:jsx(a$4,{icon:"DELETE_MARK_BUTTON_02",width:16})}),jsx(a$6,{open:H,onClose:xe,label:F??"Ajustar Imagem",imageSrc:n,aspectRatio:le,onInitialized:te,onSave:we,loading:fe,cropSize:v})]})]})},Lt=memo(Ct);var Gt=({onRemove:e,onFileSelect:o,createFilesMutation:r,fileDetails:t,disabled:l,label:s,id:i,tabIndex:p,error:d,helperText:m,sx:a,name:g,maxSize:x,uploading:I,aspectRatio:A=1,enableCrop:P=!0,convertToWebp:L=!0,cropSize:h,...F})=>{let[v,b]=useState(!1),{filesPreview:S,isUploadOrLoadingFiles:C,uploadErrorText:u,uploadFiles:E}=q({createFilesMutation:r,filesDetails:t?[t]:[]}),{file:c,dropzoneProps:R,cropState:z,handleRemove:U}=X({filesPreview:S,onFileSelect:o,onRemove:e,dropzoneOptions:{accept:{"image/*":[".jpeg",".jpg",".png",".gif",".webp"]},multiple:!1,disabled:l,maxSize:x,...F},enableCrop:P,customAspectRatio:A,convertToWebp:L,cropSize:h,uploadFiles:E}),{getRootProps:y,getInputProps:M,isDragActive:B,isDragReject:K}=R,{cropModalOpen:oe,imagePreview:j,cropLoading:ne,onCropInitialized:ue,handleCropSave:se,handleCropCancel:le}=z,Z=K||!!d||!!u,J=v||C||I,Q=!!e,re=useRef(t?.url||""),H=useRef();useEffect(()=>{if(!c){re.current="",H.current=void 0;return}if(H.current===c.id)return;H.current=c.id,b(!0);let te=URL.createObjectURL(c);return re.current=te,()=>{URL.revokeObjectURL(te);}},[c]);let n=()=>{b(!1);},fe=useCallback(()=>Q&&c?()=>U(c):y().onClick,[Q,c,y,U]);return jsxs(Fragment,{children:[jsxs(de,{sx:{alignItems:"center"},children:[jsxs(Po,{sx:a,isError:Z,isDragActive:B,hasFile:!!c,...y(),onClick:fe(),children:[jsxs(bo,{children:[J&&jsx(Io,{children:jsx(Wt,{size:135,thickness:2,color:"primary"})}),c&&jsx(vo,{alt:"Avatar Preview",src:re.current,onLoad:n,...J&&{sx:{filter:"blur(5px) !important",scale:1.2,opacity:.7}}}),!c&&!J&&jsxs($e,{isError:Z,hasFile:!1,children:[jsx(a$4,{icon:"ADD_IMAGE",width:32}),jsx(Qe,{variant:"caption",textAlign:"center",sx:{color:Z?"error.main":"text.disabled"},children:"Adicionar foto"})]}),c&&!J&&jsxs($e,{isError:Z,hasFile:!0,children:[jsx(a$4,{icon:Q?"DELETE_MARK_BUTTON_02":"ADD_IMAGE",width:32}),jsx(Qe,{variant:"caption",textAlign:"center",sx:{color:Z?"error.main":"common.white"},children:Q?"Remover foto":"Alterar foto"})]})]}),jsx("input",{name:g,id:i,tabIndex:p,...M()})]}),jsx(de,{sx:{alignItems:"center",mt:-.5},children:jsx(O,{helperText:m,disabled:l,isError:Z})}),u?jsx(O,{helperText:u,isError:!0}):null,d?jsx(O,{helperText:d,isError:!0}):null]}),oe&&j&&jsx(a$6,{open:oe,onClose:le,label:s??"Ajustar Imagem",imageSrc:j,aspectRatio:A,onInitialized:ue,onSave:se,loading:ne,cropSize:h,cropShape:"round"})]})},jt=memo(Gt);var Xt=({error:e,name:o,disabled:r,sx:t,...l})=>{let{getRootProps:s,getInputProps:i,isDragActive:p,isDragReject:d}=useDropzone({disabled:r,...l}),m=d||e;return jsxs(go,{...s(),isDragActive:p,hasError:!!m,disabled:!!r,sx:t,"data-testid":"upload-box",children:[jsx("input",{name:o,...i()}),"Selecionar arquivo"]})},qt=memo(Xt);
33
-
34
- export { O as a, _e as b, qe as c, Ve as d, Oo as e, To as f, oa as g, Ne as h, Ee as i, ca as j, yo as k, Uo as l, Co as m, Lo as n, X as o, Ke as p, Be as q, q as r, ct as s, Pt as t, Rt as u, Lt as v, jt as w, qt as x };
35
- //# sourceMappingURL=out.js.map
36
- //# sourceMappingURL=chunk-F4T3RPSV.js.map