@zydon/common 2.7.79 → 2.7.81

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 (179) hide show
  1. package/dist/{chunk-LQZSZV2W.js → chunk-6RC5O2YL.js} +2 -2
  2. package/dist/{chunk-FK4XGRYF.js → chunk-AVPFUSEB.js} +4 -4
  3. package/dist/chunk-AVPFUSEB.js.map +1 -0
  4. package/dist/chunk-BX2DSNRV.js +8 -0
  5. package/dist/chunk-BX2DSNRV.js.map +1 -0
  6. package/dist/{chunk-R76WTFYC.js → chunk-BYYU7ENX.js} +2 -2
  7. package/dist/{chunk-N4DW7EIC.js → chunk-DSFFQBLG.js} +2 -2
  8. package/dist/{chunk-LEMPYV5U.js → chunk-E6NUW3KZ.js} +2 -2
  9. package/dist/{chunk-UHXAPEIF.js → chunk-EDWQYAWG.js} +2 -2
  10. package/dist/chunk-F65ZXAGV.js +10 -0
  11. package/dist/chunk-F65ZXAGV.js.map +1 -0
  12. package/dist/chunk-FCXNL2OG.js +12 -0
  13. package/dist/chunk-FCXNL2OG.js.map +1 -0
  14. package/dist/{chunk-U7BH6DMJ.js → chunk-FYDTPVVK.js} +2 -2
  15. package/dist/{chunk-6UWD6IZZ.js → chunk-I5R4OVA5.js} +18 -17
  16. package/dist/chunk-I5R4OVA5.js.map +1 -0
  17. package/dist/{chunk-KEOOC3EL.js → chunk-J2PFUGFW.js} +2 -2
  18. package/dist/{chunk-ATVM2YRB.js → chunk-J7JX2QOP.js} +2 -2
  19. package/dist/chunk-JWIITCIZ.js +20 -0
  20. package/dist/chunk-JWIITCIZ.js.map +1 -0
  21. package/dist/{chunk-YKV6FK6D.js → chunk-LFZJKAV6.js} +2 -2
  22. package/dist/{chunk-SVJYA4Q6.js → chunk-MS6MTEJM.js} +4 -4
  23. package/dist/{chunk-VCHDZXTF.js → chunk-NB6Z5G2Q.js} +2 -2
  24. package/dist/{chunk-7HLCQRIH.js → chunk-O5HTDU3K.js} +3 -3
  25. package/dist/chunk-QGWIO2AX.js +18 -0
  26. package/dist/chunk-QGWIO2AX.js.map +1 -0
  27. package/dist/chunk-RTC7H5E5.js +10 -0
  28. package/dist/chunk-RTC7H5E5.js.map +1 -0
  29. package/dist/{chunk-RPPQBAVO.js → chunk-SHJKJLBQ.js} +2 -2
  30. package/dist/{chunk-XZFBTUAG.js → chunk-ULSLLFRH.js} +3 -3
  31. package/dist/{chunk-QXRGT442.js → chunk-UWW26H42.js} +5 -5
  32. package/dist/chunk-VJZTUPZB.js +12 -0
  33. package/dist/chunk-VJZTUPZB.js.map +1 -0
  34. package/dist/{chunk-NQNNMRLC.js → chunk-VPG46WNM.js} +5 -5
  35. package/dist/chunk-VPG46WNM.js.map +1 -0
  36. package/dist/chunk-VR3K2Y2C.js +11 -0
  37. package/dist/chunk-VR3K2Y2C.js.map +1 -0
  38. package/dist/chunk-W3CK33IH.js +10 -0
  39. package/dist/chunk-W3CK33IH.js.map +1 -0
  40. package/dist/{chunk-CWCEG2DZ.js → chunk-WVWLU3GP.js} +2 -2
  41. package/dist/chunk-X2GWFMP4.js +19 -0
  42. package/dist/chunk-X2GWFMP4.js.map +1 -0
  43. package/dist/{chunk-P6HORLPW.js → chunk-X64QHBVQ.js} +2 -2
  44. package/dist/components/ActionButton/index.js +2 -2
  45. package/dist/components/Autocomplete/index.d.ts +1 -1
  46. package/dist/components/Autocomplete/index.js +2 -2
  47. package/dist/components/AutocompleteDetailed/index.d.ts +1 -1
  48. package/dist/components/AutocompleteDetailed/index.js +2 -2
  49. package/dist/components/Avatar/index.d.ts +1 -1
  50. package/dist/components/Avatar/index.js +4 -4
  51. package/dist/components/Avatar/index.js.map +1 -1
  52. package/dist/components/AvatarButton/index.js +6 -6
  53. package/dist/components/BuilderLayout/index.js +2 -2
  54. package/dist/components/BuilderSidebar/index.js +1 -1
  55. package/dist/components/BulkEditModal/index.js +3 -3
  56. package/dist/components/CardBrand/index.d.ts +5 -2
  57. package/dist/components/CardBrand/index.js +1 -1
  58. package/dist/components/Common/index.js +3 -3
  59. package/dist/components/CopyButton/index.js +2 -2
  60. package/dist/components/CustomAvatar/index.d.ts +1 -1
  61. package/dist/components/CustomAvatar/index.js +1 -1
  62. package/dist/components/CustomAvatarGroup/index.d.ts +1 -1
  63. package/dist/components/CustomAvatarGroup/index.js +4 -4
  64. package/dist/components/CustomAvatarGroup/index.js.map +1 -1
  65. package/dist/components/DataCards/index.d.ts +4 -4
  66. package/dist/components/DataCards/index.js +4 -3
  67. package/dist/components/DataCards/index.js.map +1 -1
  68. package/dist/components/DataView/index.d.ts +5 -5
  69. package/dist/components/DataView/index.js +4 -4
  70. package/dist/components/DragButton/index.js +2 -2
  71. package/dist/components/Drawer/index.js +2 -2
  72. package/dist/components/DynamicDataView/index.js +9 -8
  73. package/dist/components/DynamicDataView/index.js.map +1 -1
  74. package/dist/components/EasyCropModal/index.js +3 -3
  75. package/dist/components/Error/index.js +1 -1
  76. package/dist/components/ExpandableGroup/index.js +1 -1
  77. package/dist/components/FileUpload/index.js +6 -6
  78. package/dist/components/FrameSkeleton/index.js +2 -2
  79. package/dist/components/HelpButton/index.js +2 -2
  80. package/dist/components/Icon/index.d.ts +1 -1
  81. package/dist/components/Icon/index.js +1 -1
  82. package/dist/components/IconButton/index.d.ts +1 -1
  83. package/dist/components/IconButton/index.js +2 -2
  84. package/dist/components/ImageCropModal/index.js +2 -2
  85. package/dist/components/Incrementer/index.js +3 -3
  86. package/dist/components/InfoCircle/index.js +1 -1
  87. package/dist/components/Label/index.d.ts +1 -1
  88. package/dist/components/Label/index.js +1 -1
  89. package/dist/components/ListBundles/index.js +2 -2
  90. package/dist/components/MaskedInput/index.d.ts +1 -1
  91. package/dist/components/MaskedInput/index.js +1 -1
  92. package/dist/components/MenuItem/index.js +1 -1
  93. package/dist/components/Modal/index.js +2 -2
  94. package/dist/components/MoreMenu/index.js +1 -1
  95. package/dist/components/NumberInput/index.d.ts +1 -1
  96. package/dist/components/NumberInput/index.js +1 -1
  97. package/dist/components/PageHeader/index.js +4 -4
  98. package/dist/components/PageHeader/index.js.map +1 -1
  99. package/dist/components/PasswordRules/index.js +1 -1
  100. package/dist/components/PopoverSelect/index.js +1 -1
  101. package/dist/components/Scrollbar/index.d.ts +1 -1
  102. package/dist/components/Scrollbar/index.js +1 -1
  103. package/dist/components/SearchInput/index.js +2 -2
  104. package/dist/components/SelectList/index.js +4 -4
  105. package/dist/components/SelectableCards/index.js +4 -4
  106. package/dist/components/SeoPreview/index.js +2 -2
  107. package/dist/components/StateDisplay/index.js +2 -2
  108. package/dist/components/Steps/index.js +1 -1
  109. package/dist/components/StyledTab/index.js +1 -1
  110. package/dist/components/SwapList/index.js +3 -3
  111. package/dist/components/TextMaxLine/index.d.ts +1 -1
  112. package/dist/components/TextMaxLine/index.js +1 -1
  113. package/dist/components/ToggleTheme/index.js +4 -4
  114. package/dist/components/WebhookCard/index.js +2 -2
  115. package/dist/components/carousel/index.js +2 -2
  116. package/dist/components/form/Address/index.js +5 -5
  117. package/dist/components/form/Autocomplete/index.js +3 -3
  118. package/dist/components/form/AutocompleteDetailed/index.js +2 -2
  119. package/dist/components/form/FileUpload/index.js +6 -6
  120. package/dist/components/form/Incrementer/index.js +3 -3
  121. package/dist/components/form/MaskedInput/index.js +2 -2
  122. package/dist/components/form/NumberInput/index.js +1 -1
  123. package/dist/components/form/Password/index.js +1 -1
  124. package/dist/components/form/SelectList/index.js +4 -4
  125. package/dist/components/form/SelectableCards/index.js +4 -4
  126. package/dist/components/form/Webhook/index.js +4 -4
  127. package/dist/components/lightbox/index.js +1 -1
  128. package/dist/components/table/index.js +2 -2
  129. package/dist/hooks/useSnackbar.d.ts +7 -7
  130. package/dist/hooks/useThemeToggle.js +3 -3
  131. package/dist/index.d.ts +2 -2
  132. package/dist/index.js +3 -3
  133. package/dist/layouts/Admin/index.js +1 -1
  134. package/dist/theme/core/index.d.ts +1 -1
  135. package/dist/theme/settings-provider.js +1 -1
  136. package/dist/theme/styles/index.d.ts +12 -12
  137. package/dist/theme/theme-provider.js +2 -2
  138. package/package.json +15 -13
  139. package/dist/chunk-2WG6OWB4.js +0 -8
  140. package/dist/chunk-2WG6OWB4.js.map +0 -1
  141. package/dist/chunk-6LXCHHW2.js +0 -12
  142. package/dist/chunk-6LXCHHW2.js.map +0 -1
  143. package/dist/chunk-6UWD6IZZ.js.map +0 -1
  144. package/dist/chunk-7R6ZYEQS.js +0 -11
  145. package/dist/chunk-7R6ZYEQS.js.map +0 -1
  146. package/dist/chunk-DHRVSWFW.js +0 -10
  147. package/dist/chunk-DHRVSWFW.js.map +0 -1
  148. package/dist/chunk-FK4XGRYF.js.map +0 -1
  149. package/dist/chunk-KIWSLR76.js +0 -10
  150. package/dist/chunk-KIWSLR76.js.map +0 -1
  151. package/dist/chunk-LNXA53QR.js +0 -12
  152. package/dist/chunk-LNXA53QR.js.map +0 -1
  153. package/dist/chunk-NQNNMRLC.js.map +0 -1
  154. package/dist/chunk-QLGWOE3Q.js +0 -19
  155. package/dist/chunk-QLGWOE3Q.js.map +0 -1
  156. package/dist/chunk-U4ZTAFZV.js +0 -18
  157. package/dist/chunk-U4ZTAFZV.js.map +0 -1
  158. package/dist/chunk-XWUVJ22J.js +0 -10
  159. package/dist/chunk-XWUVJ22J.js.map +0 -1
  160. package/dist/chunk-YHKVYGTG.js +0 -19
  161. package/dist/chunk-YHKVYGTG.js.map +0 -1
  162. package/dist/{chunk-LQZSZV2W.js.map → chunk-6RC5O2YL.js.map} +0 -0
  163. package/dist/{chunk-R76WTFYC.js.map → chunk-BYYU7ENX.js.map} +0 -0
  164. package/dist/{chunk-N4DW7EIC.js.map → chunk-DSFFQBLG.js.map} +0 -0
  165. package/dist/{chunk-LEMPYV5U.js.map → chunk-E6NUW3KZ.js.map} +0 -0
  166. package/dist/{chunk-UHXAPEIF.js.map → chunk-EDWQYAWG.js.map} +0 -0
  167. package/dist/{chunk-U7BH6DMJ.js.map → chunk-FYDTPVVK.js.map} +0 -0
  168. package/dist/{chunk-KEOOC3EL.js.map → chunk-J2PFUGFW.js.map} +0 -0
  169. package/dist/{chunk-ATVM2YRB.js.map → chunk-J7JX2QOP.js.map} +0 -0
  170. package/dist/{chunk-YKV6FK6D.js.map → chunk-LFZJKAV6.js.map} +0 -0
  171. package/dist/{chunk-SVJYA4Q6.js.map → chunk-MS6MTEJM.js.map} +0 -0
  172. package/dist/{chunk-VCHDZXTF.js.map → chunk-NB6Z5G2Q.js.map} +0 -0
  173. package/dist/{chunk-7HLCQRIH.js.map → chunk-O5HTDU3K.js.map} +0 -0
  174. package/dist/{chunk-RPPQBAVO.js.map → chunk-SHJKJLBQ.js.map} +0 -0
  175. package/dist/{chunk-XZFBTUAG.js.map → chunk-ULSLLFRH.js.map} +0 -0
  176. package/dist/{chunk-QXRGT442.js.map → chunk-UWW26H42.js.map} +0 -0
  177. package/dist/{chunk-CWCEG2DZ.js.map → chunk-WVWLU3GP.js.map} +0 -0
  178. package/dist/{chunk-P6HORLPW.js.map → chunk-X64QHBVQ.js.map} +0 -0
  179. package/dist/{index-5a5e5dc8.d.ts → index-c8f1e6e7.d.ts} +12 -12
@@ -173,7 +173,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
173
173
  float?: csstype.Property.Float | readonly NonNullable<csstype.Property.Float | undefined>[] | readonly csstype.Property.Float[] | undefined;
174
174
  floodColor?: readonly string[] | csstype.Property.FloodColor | readonly csstype.Property.FloodColor[] | undefined;
175
175
  floodOpacity?: readonly ((string & {}) | csstype.Globals)[] | csstype.Property.FloodOpacity | readonly NonNullable<csstype.Property.FloodOpacity | undefined>[] | undefined;
176
- fontFamily?: csstype.Property.FontFamily | readonly string[] | readonly csstype.Property.FontFamily[] | undefined;
176
+ fontFamily?: readonly string[] | csstype.Property.FontFamily | readonly csstype.Property.FontFamily[] | undefined;
177
177
  fontFeatureSettings?: readonly string[] | csstype.Property.FontFeatureSettings | readonly csstype.Property.FontFeatureSettings[] | undefined;
178
178
  fontKerning?: csstype.Property.FontKerning | readonly NonNullable<csstype.Property.FontKerning | undefined>[] | readonly csstype.Property.FontKerning[] | undefined;
179
179
  fontLanguageOverride?: readonly string[] | csstype.Property.FontLanguageOverride | readonly csstype.Property.FontLanguageOverride[] | undefined;
@@ -197,7 +197,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
197
197
  fontVariantNumeric?: readonly string[] | csstype.Property.FontVariantNumeric | readonly csstype.Property.FontVariantNumeric[] | undefined;
198
198
  fontVariantPosition?: csstype.Property.FontVariantPosition | readonly NonNullable<csstype.Property.FontVariantPosition | undefined>[] | readonly csstype.Property.FontVariantPosition[] | undefined;
199
199
  fontVariationSettings?: readonly string[] | csstype.Property.FontVariationSettings | readonly csstype.Property.FontVariationSettings[] | undefined;
200
- fontWeight?: csstype.Property.FontWeight | readonly NonNullable<csstype.Property.FontWeight | undefined>[] | readonly ((string & {}) | csstype.Globals | "bold" | "normal" | "bolder" | "lighter")[] | undefined;
200
+ fontWeight?: csstype.Property.FontWeight | readonly NonNullable<csstype.Property.FontWeight | undefined>[] | readonly ("bold" | (string & {}) | csstype.Globals | "normal" | "bolder" | "lighter")[] | undefined;
201
201
  fontWidth?: readonly string[] | csstype.Property.FontWidth | readonly csstype.Property.FontWidth[] | undefined;
202
202
  forcedColorAdjust?: csstype.Property.ForcedColorAdjust | readonly NonNullable<csstype.Property.ForcedColorAdjust | undefined>[] | readonly csstype.Property.ForcedColorAdjust[] | undefined;
203
203
  gridAutoColumns?: readonly (string | (string & {}))[] | csstype.Property.GridAutoColumns<string | number> | readonly NonNullable<csstype.Property.GridAutoColumns<string | number> | undefined>[] | undefined;
@@ -462,7 +462,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
462
462
  zIndex?: readonly ((string & {}) | csstype.Globals | "auto")[] | csstype.Property.ZIndex | readonly NonNullable<csstype.Property.ZIndex | undefined>[] | undefined;
463
463
  zoom?: csstype.Property.Zoom | readonly NonNullable<csstype.Property.Zoom | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal" | "reset")[] | undefined;
464
464
  all?: csstype.Globals | readonly NonNullable<csstype.Globals | undefined>[] | readonly csstype.Globals[] | undefined;
465
- animation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal" | "reverse" | "none" | "auto" | "alternate" | "alternate-reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
465
+ animation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ("reverse" | (string & {}) | csstype.Globals | "none" | "auto" | "normal" | "alternate" | "alternate-reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
466
466
  animationRange?: readonly (string | (string & {}))[] | csstype.Property.AnimationRange<string | number> | readonly NonNullable<csstype.Property.AnimationRange<string | number> | undefined>[] | undefined;
467
467
  background?: readonly (string | (string & {}))[] | csstype.Property.Background<string | number> | readonly NonNullable<csstype.Property.Background<string | number> | undefined>[] | undefined;
468
468
  border?: readonly (string | (string & {}))[] | csstype.Property.Border<string | number> | readonly NonNullable<csstype.Property.Border<string | number> | undefined>[] | undefined;
@@ -474,7 +474,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
474
474
  borderBlockWidth?: readonly (string | (string & {}))[] | csstype.Property.BorderBlockWidth<string | number> | readonly NonNullable<csstype.Property.BorderBlockWidth<string | number> | undefined>[] | undefined;
475
475
  borderBottom?: readonly (string | (string & {}))[] | csstype.Property.BorderBottom<string | number> | readonly NonNullable<csstype.Property.BorderBottom<string | number> | undefined>[] | undefined;
476
476
  borderColor?: readonly string[] | csstype.Property.BorderColor | readonly csstype.Property.BorderColor[] | undefined;
477
- borderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ((string & {}) | csstype.Globals | "repeat" | "none" | "round" | "space" | "stretch")[] | undefined;
477
+ borderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ("repeat" | (string & {}) | csstype.Globals | "none" | "round" | "space" | "stretch")[] | undefined;
478
478
  borderInline?: readonly (string | (string & {}))[] | csstype.Property.BorderInline<string | number> | readonly NonNullable<csstype.Property.BorderInline<string | number> | undefined>[] | undefined;
479
479
  borderInlineColor?: readonly string[] | csstype.Property.BorderInlineColor | readonly csstype.Property.BorderInlineColor[] | undefined;
480
480
  borderInlineEnd?: readonly (string | (string & {}))[] | csstype.Property.BorderInlineEnd<string | number> | readonly NonNullable<csstype.Property.BorderInlineEnd<string | number> | undefined>[] | undefined;
@@ -509,7 +509,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
509
509
  marginBlock?: readonly (string | (string & {}))[] | csstype.Property.MarginBlock<string | number> | readonly NonNullable<csstype.Property.MarginBlock<string | number> | undefined>[] | undefined;
510
510
  marginInline?: readonly (string | (string & {}))[] | csstype.Property.MarginInline<string | number> | readonly NonNullable<csstype.Property.MarginInline<string | number> | undefined>[] | undefined;
511
511
  mask?: readonly (string | (string & {}))[] | csstype.Property.Mask<string | number> | readonly NonNullable<csstype.Property.Mask<string | number> | undefined>[] | undefined;
512
- maskBorder?: csstype.Property.MaskBorder | readonly NonNullable<csstype.Property.MaskBorder | undefined>[] | readonly ((string & {}) | csstype.Globals | "repeat" | "none" | "round" | "space" | "alpha" | "luminance" | "stretch")[] | undefined;
512
+ maskBorder?: csstype.Property.MaskBorder | readonly NonNullable<csstype.Property.MaskBorder | undefined>[] | readonly ("repeat" | (string & {}) | csstype.Globals | "none" | "round" | "space" | "alpha" | "luminance" | "stretch")[] | undefined;
513
513
  motion?: readonly (string | (string & {}))[] | csstype.Property.Offset<string | number> | readonly NonNullable<csstype.Property.Offset<string | number> | undefined>[] | undefined;
514
514
  offset?: readonly (string | (string & {}))[] | csstype.Property.Offset<string | number> | readonly NonNullable<csstype.Property.Offset<string | number> | undefined>[] | undefined;
515
515
  outline?: readonly (string | (string & {}))[] | csstype.Property.Outline<string | number> | readonly NonNullable<csstype.Property.Outline<string | number> | undefined>[] | undefined;
@@ -758,8 +758,8 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
758
758
  WebkitUserModify?: csstype.Property.WebkitUserModify | readonly NonNullable<csstype.Property.WebkitUserModify | undefined>[] | readonly csstype.Property.WebkitUserModify[] | undefined;
759
759
  WebkitUserSelect?: csstype.Property.WebkitUserSelect | readonly NonNullable<csstype.Property.WebkitUserSelect | undefined>[] | readonly csstype.Property.WebkitUserSelect[] | undefined;
760
760
  WebkitWritingMode?: csstype.Property.WritingMode | readonly NonNullable<csstype.Property.WritingMode | undefined>[] | readonly csstype.Property.WritingMode[] | undefined;
761
- MozAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal" | "reverse" | "none" | "auto" | "alternate" | "alternate-reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
762
- MozBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ((string & {}) | csstype.Globals | "repeat" | "none" | "round" | "space" | "stretch")[] | undefined;
761
+ MozAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ("reverse" | (string & {}) | csstype.Globals | "none" | "auto" | "normal" | "alternate" | "alternate-reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
762
+ MozBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ("repeat" | (string & {}) | csstype.Globals | "none" | "round" | "space" | "stretch")[] | undefined;
763
763
  MozColumnRule?: readonly (string | (string & {}))[] | csstype.Property.ColumnRule<string | number> | readonly NonNullable<csstype.Property.ColumnRule<string | number> | undefined>[] | undefined;
764
764
  MozColumns?: readonly (string | (string & {}))[] | csstype.Property.Columns<string | number> | readonly NonNullable<csstype.Property.Columns<string | number> | undefined>[] | undefined;
765
765
  MozOutlineRadius?: readonly (string | (string & {}))[] | csstype.Property.MozOutlineRadius<string | number> | readonly NonNullable<csstype.Property.MozOutlineRadius<string | number> | undefined>[] | undefined;
@@ -771,16 +771,16 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
771
771
  msScrollSnapX?: readonly string[] | csstype.Property.MsScrollSnapX | readonly csstype.Property.MsScrollSnapX[] | undefined;
772
772
  msScrollSnapY?: readonly string[] | csstype.Property.MsScrollSnapY | readonly csstype.Property.MsScrollSnapY[] | undefined;
773
773
  msTransition?: readonly string[] | csstype.Property.Transition<string & {}> | readonly csstype.Property.Transition<string & {}>[] | undefined;
774
- WebkitAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal" | "reverse" | "none" | "auto" | "alternate" | "alternate-reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
774
+ WebkitAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ("reverse" | (string & {}) | csstype.Globals | "none" | "auto" | "normal" | "alternate" | "alternate-reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
775
775
  WebkitBorderBefore?: readonly (string | (string & {}))[] | csstype.Property.WebkitBorderBefore<string | number> | readonly NonNullable<csstype.Property.WebkitBorderBefore<string | number> | undefined>[] | undefined;
776
- WebkitBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ((string & {}) | csstype.Globals | "repeat" | "none" | "round" | "space" | "stretch")[] | undefined;
776
+ WebkitBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ("repeat" | (string & {}) | csstype.Globals | "none" | "round" | "space" | "stretch")[] | undefined;
777
777
  WebkitBorderRadius?: readonly (string | (string & {}))[] | csstype.Property.BorderRadius<string | number> | readonly NonNullable<csstype.Property.BorderRadius<string | number> | undefined>[] | undefined;
778
778
  WebkitColumnRule?: readonly (string | (string & {}))[] | csstype.Property.ColumnRule<string | number> | readonly NonNullable<csstype.Property.ColumnRule<string | number> | undefined>[] | undefined;
779
779
  WebkitColumns?: readonly (string | (string & {}))[] | csstype.Property.Columns<string | number> | readonly NonNullable<csstype.Property.Columns<string | number> | undefined>[] | undefined;
780
780
  WebkitFlex?: readonly (string | (string & {}))[] | csstype.Property.Flex<string | number> | readonly NonNullable<csstype.Property.Flex<string | number> | undefined>[] | undefined;
781
781
  WebkitFlexFlow?: readonly string[] | csstype.Property.FlexFlow | readonly csstype.Property.FlexFlow[] | undefined;
782
782
  WebkitMask?: readonly (string | (string & {}))[] | csstype.Property.WebkitMask<string | number> | readonly NonNullable<csstype.Property.WebkitMask<string | number> | undefined>[] | undefined;
783
- WebkitMaskBoxImage?: csstype.Property.MaskBorder | readonly NonNullable<csstype.Property.MaskBorder | undefined>[] | readonly ((string & {}) | csstype.Globals | "repeat" | "none" | "round" | "space" | "alpha" | "luminance" | "stretch")[] | undefined;
783
+ WebkitMaskBoxImage?: csstype.Property.MaskBorder | readonly NonNullable<csstype.Property.MaskBorder | undefined>[] | readonly ("repeat" | (string & {}) | csstype.Globals | "none" | "round" | "space" | "alpha" | "luminance" | "stretch")[] | undefined;
784
784
  WebkitTextEmphasis?: readonly string[] | csstype.Property.TextEmphasis | readonly csstype.Property.TextEmphasis[] | undefined;
785
785
  WebkitTextStroke?: readonly (string | (string & {}))[] | csstype.Property.WebkitTextStroke<string | number> | readonly NonNullable<csstype.Property.WebkitTextStroke<string | number> | undefined>[] | undefined;
786
786
  WebkitTransition?: readonly string[] | csstype.Property.Transition<string & {}> | readonly csstype.Property.Transition<string & {}>[] | undefined;
@@ -861,7 +861,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
861
861
  MozUserFocus?: csstype.Property.MozUserFocus | readonly NonNullable<csstype.Property.MozUserFocus | undefined>[] | readonly csstype.Property.MozUserFocus[] | undefined;
862
862
  MozUserInput?: csstype.Property.MozUserInput | readonly NonNullable<csstype.Property.MozUserInput | undefined>[] | readonly csstype.Property.MozUserInput[] | undefined;
863
863
  msImeMode?: csstype.Property.ImeMode | readonly NonNullable<csstype.Property.ImeMode | undefined>[] | readonly csstype.Property.ImeMode[] | undefined;
864
- OAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal" | "reverse" | "none" | "auto" | "alternate" | "alternate-reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
864
+ OAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ("reverse" | (string & {}) | csstype.Globals | "none" | "auto" | "normal" | "alternate" | "alternate-reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
865
865
  OAnimationDelay?: readonly string[] | csstype.Property.AnimationDelay<string & {}> | readonly csstype.Property.AnimationDelay<string & {}>[] | undefined;
866
866
  OAnimationDirection?: readonly string[] | csstype.Property.AnimationDirection | readonly csstype.Property.AnimationDirection[] | undefined;
867
867
  OAnimationDuration?: readonly string[] | csstype.Property.AnimationDuration<string & {}> | readonly csstype.Property.AnimationDuration<string & {}>[] | undefined;
@@ -871,7 +871,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
871
871
  OAnimationPlayState?: readonly string[] | csstype.Property.AnimationPlayState | readonly csstype.Property.AnimationPlayState[] | undefined;
872
872
  OAnimationTimingFunction?: readonly string[] | csstype.Property.AnimationTimingFunction | readonly csstype.Property.AnimationTimingFunction[] | undefined;
873
873
  OBackgroundSize?: readonly (string | (string & {}))[] | csstype.Property.BackgroundSize<string | number> | readonly NonNullable<csstype.Property.BackgroundSize<string | number> | undefined>[] | undefined;
874
- OBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ((string & {}) | csstype.Globals | "repeat" | "none" | "round" | "space" | "stretch")[] | undefined;
874
+ OBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ("repeat" | (string & {}) | csstype.Globals | "none" | "round" | "space" | "stretch")[] | undefined;
875
875
  OObjectFit?: csstype.Property.ObjectFit | readonly NonNullable<csstype.Property.ObjectFit | undefined>[] | readonly csstype.Property.ObjectFit[] | undefined;
876
876
  OObjectPosition?: readonly (string | (string & {}))[] | csstype.Property.ObjectPosition<string | number> | readonly NonNullable<csstype.Property.ObjectPosition<string | number> | undefined>[] | undefined;
877
877
  OTabSize?: readonly (string | (string & {}))[] | csstype.Property.TabSize<string | number> | readonly NonNullable<csstype.Property.TabSize<string | number> | undefined>[] | undefined;
@@ -1,9 +1,9 @@
1
- export { b as default } from '../chunk-U4ZTAFZV.js';
1
+ export { b as default } from '../chunk-QGWIO2AX.js';
2
2
  import '../chunk-373WGZZL.js';
3
3
  import '../chunk-TWSAWMZ3.js';
4
4
  import '../chunk-ROVD7OGE.js';
5
5
  import '../chunk-WUFEPE2G.js';
6
- export { b as useSettingsContext } from '../chunk-2WG6OWB4.js';
6
+ export { b as useSettingsContext } from '../chunk-BX2DSNRV.js';
7
7
  import '../chunk-6W52DPH4.js';
8
8
  import '../chunk-EQYL7U3J.js';
9
9
  export { a as THEME_CONFIG } from '../chunk-GLRLKFPS.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zydon/common",
3
- "version": "2.7.79",
3
+ "version": "2.7.81",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "./dist/index.js",
@@ -91,12 +91,13 @@
91
91
  },
92
92
  "sideEffects": false,
93
93
  "devDependencies": {
94
- "@emotion/react": "^11.13.3",
95
- "@emotion/styled": "^11.13.0",
96
- "@mui/lab": "5.0.0-alpha.173",
97
- "@mui/material": "^5.16.7",
98
- "@mui/x-data-grid-premium": "^7.14.0",
99
- "@mui/x-date-pickers-pro": "^7.14.0",
94
+ "@emotion/react": "^11.14.0",
95
+ "@emotion/styled": "^11.14.1",
96
+ "@mui/lab": "5.0.0-alpha.177",
97
+ "@mui/material": "^5.18.0",
98
+ "@mui/system": "^5.18.0",
99
+ "@mui/x-data-grid-premium": "^7.29.12",
100
+ "@mui/x-date-pickers-pro": "^7.29.4",
100
101
  "@testing-library/dom": "10.0.0",
101
102
  "@testing-library/jest-dom": "^6.6.3",
102
103
  "@testing-library/react": "^16.1.0",
@@ -169,12 +170,13 @@
169
170
  "yet-another-react-lightbox": "^3.21.4"
170
171
  },
171
172
  "peerDependencies": {
172
- "@emotion/react": "^11.13.3",
173
- "@emotion/styled": "^11.13.0",
174
- "@mui/lab": "^5.0.0-alpha.173",
175
- "@mui/material": "^5.16.7",
176
- "@mui/x-data-grid-premium": "^7.14.0",
177
- "@mui/x-date-pickers-pro": "^7.14.0",
173
+ "@emotion/react": "^11.14.0",
174
+ "@emotion/styled": "^11.14.1",
175
+ "@mui/lab": "^5.0.0-alpha.177",
176
+ "@mui/material": "^5.16.7 || ^5.17.0 || ^5.18.0",
177
+ "@mui/system": "^5.15.14 || ^5.16.0 || ^5.17.0 || ^5.18.0",
178
+ "@mui/x-data-grid-premium": "^7.29.12",
179
+ "@mui/x-date-pickers-pro": "^7.29.4",
178
180
  "react": "^17.0.0 || ^18.0.0 || ^19.0.0",
179
181
  "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0",
180
182
  "react-hook-form": "^7.53.0"
@@ -1,8 +0,0 @@
1
- import { createContext, memo, useContext, useState, useMemo } from 'react';
2
- import { jsx } from 'react/jsx-runtime';
3
-
4
- var o=createContext(void 0),E=()=>{let t=useContext(o);if(!t)throw new Error("useSettingsContext deve ser usado dentro de um SettingsProvider");return t},V=({children:t,primaryColor:r,fontFamily:s,compactLayout:i,colorScheme:S,contrast:a,navColor:d,navLayout:u,cssVarPrefix:g,storageKey:x})=>{let[e,C]=useState(()=>({primaryColor:r,fontFamily:s,compactLayout:i,colorScheme:S,contrast:a,navColor:d,navLayout:u,cssVarPrefix:g,storageKey:x})),l=p=>{C(n=>({...n,...p,primaryColor:n.primaryColor}));},m=useMemo(()=>({settings:e,updateSettings:l}),[e]);return jsx(o.Provider,{value:m,children:t})},M=memo(V);
5
-
6
- export { o as a, E as b, M as c };
7
- //# sourceMappingURL=out.js.map
8
- //# sourceMappingURL=chunk-2WG6OWB4.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/theme/settings-provider.tsx"],"names":["createContext","memo","useContext","useMemo","useState","jsx","SettingsContext","useSettingsContext","context","SettingsProvider","children","primaryColor","fontFamily","compactLayout","colorScheme","contrast","navColor","navLayout","cssVarPrefix","storageKey","settings","setSettings","handleUpdateSettings","newSettings","prevSettings","contextValue","settings_provider_default"],"mappings":"AAAA,OACE,iBAAAA,EACA,QAAAC,EAEA,cAAAC,EACA,WAAAC,EACA,YAAAC,MACK,QA8DH,cAAAC,MAAA,oBAxDG,IAAMC,EAAkBN,EAC7B,MACF,EAEaO,EAAqB,IAA4B,CAC5D,IAAMC,EAAUN,EAAWI,CAAe,EAE1C,GAAI,CAACE,EACH,MAAM,IAAI,MACR,iEACF,EAGF,OAAOA,CACT,EAIMC,EAAmB,CAAC,CACxB,SAAAC,EACA,aAAAC,EACA,WAAAC,EACA,cAAAC,EACA,YAAAC,EACA,SAAAC,EACA,SAAAC,EACA,UAAAC,EACA,aAAAC,EACA,WAAAC,CACF,IAAwC,CACtC,GAAM,CAACC,EAAUC,CAAW,EAAIjB,EAAwB,KAAO,CAC7D,aAAAO,EACA,WAAAC,EACA,cAAAC,EACA,YAAAC,EACA,SAAAC,EACA,SAAAC,EACA,UAAAC,EACA,aAAAC,EACA,WAAAC,CACF,EAAE,EAEIG,EAAwBC,GAAwC,CACpEF,EAAYG,IAAiB,CAC3B,GAAGA,EACH,GAAGD,EACH,aAAcC,EAAa,YAC7B,EAAE,CACJ,EAEMC,EAAetB,EACnB,KAAO,CAAE,SAAAiB,EAAU,eAAgBE,CAAqB,GACxD,CAACF,CAAQ,CACX,EAEA,OACEf,EAACC,EAAgB,SAAhB,CAAyB,MAAOmB,EAC9B,SAAAf,EACH,CAEJ,EAEOgB,EAAQzB,EAAKQ,CAAgB","sourcesContent":["import {\n createContext,\n memo,\n PropsWithChildren,\n useContext,\n useMemo,\n useState,\n} from 'react';\n\nimport { SettingsState } from 'types/settings';\n\nimport { SettingsContextValue } from './props';\n\nexport const SettingsContext = createContext<SettingsContextValue | undefined>(\n undefined,\n);\n\nexport const useSettingsContext = (): SettingsContextValue => {\n const context = useContext(SettingsContext);\n\n if (!context) {\n throw new Error(\n 'useSettingsContext deve ser usado dentro de um SettingsProvider',\n );\n }\n\n return context;\n};\n\n// ----------------------------------------------------------------------\n\nconst SettingsProvider = ({\n children,\n primaryColor,\n fontFamily,\n compactLayout,\n colorScheme,\n contrast,\n navColor,\n navLayout,\n cssVarPrefix,\n storageKey,\n}: PropsWithChildren<SettingsState>) => {\n const [settings, setSettings] = useState<SettingsState>(() => ({\n primaryColor,\n fontFamily,\n compactLayout,\n colorScheme,\n contrast,\n navColor,\n navLayout,\n cssVarPrefix,\n storageKey,\n }));\n\n const handleUpdateSettings = (newSettings: Partial<SettingsState>) => {\n setSettings(prevSettings => ({\n ...prevSettings,\n ...newSettings,\n primaryColor: prevSettings.primaryColor,\n }));\n };\n\n const contextValue = useMemo(\n () => ({ settings, updateSettings: handleUpdateSettings }),\n [settings],\n );\n\n return (\n <SettingsContext.Provider value={contextValue}>\n {children}\n </SettingsContext.Provider>\n );\n};\n\nexport default memo(SettingsProvider);\n"]}
@@ -1,12 +0,0 @@
1
- import { a } from './chunk-RPO7AI5K.js';
2
- import { forwardRef } from 'react';
3
- import u from '@mui/material/Link';
4
- import T from '@mui/material/Typography';
5
- import { useTheme } from '@mui/material/styles';
6
- import { jsx } from 'react/jsx-runtime';
7
-
8
- function x(o){return Math.round(parseFloat(o)*16)}function y(o){let e=useTheme(),t=a(),p=e.breakpoints.up(t==="xl"?"lg":t),h=(o==="h1"||o==="h2"||o==="h3"||o==="h4"||o==="h5"||o==="h6")&&e.typography[o][p]?e.typography[o][p]:e.typography[o],r=x(h.fontSize),i=Number(e.typography[o].lineHeight)*r,{fontWeight:f,letterSpacing:n}=e.typography[o];return {fontSize:r,lineHeight:i,fontWeight:f,letterSpacing:n}}var g=forwardRef(({asLink:o,variant:e="body1",line:t=2,persistent:p=!1,children:s,sx:h,...r},i)=>{let{lineHeight:f}=y(e),n={overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitLineClamp:t,WebkitBoxOrient:"vertical",...p&&{height:f*t},...h};return o?jsx(u,{color:"inherit",ref:i,variant:e,sx:{...n},...r,children:s}):jsx(T,{ref:i,variant:e,sx:{...n},...r,children:s})});g.displayName="TextMaxLine";var W=g;
9
-
10
- export { W as a };
11
- //# sourceMappingURL=out.js.map
12
- //# sourceMappingURL=chunk-6LXCHHW2.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/TextMaxLine/index.tsx","../src/components/TextMaxLine/useTypography.ts"],"names":["forwardRef","Link","Typography","useTheme","remToPx","value","useTypography_default","variant","theme","breakpoints","useWidth","key","getFont","fontSize","lineHeight","fontWeight","letterSpacing","jsx","TextMaxLine","asLink","line","persistent","children","sx","other","ref","styles","TextMaxLine_default"],"mappings":"wCAAA,OAAS,c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H,EAKFL,EAACf,EAAA,CAAW,IAAKuB,EAAK,QAASlB,EAAS,GAAI,CAAE,GAAGmB,CAAO,EAAI,GAAGF,EAC5D,SAAAF,EACH,CAEJ,CACF,EAEAJ,EAAY,YAAc,cAE1B,IAAOS,EAAQT","sourcesContent":["import { forwardRef } from 'react';\nimport Link from '@mui/material/Link';\nimport Typography from '@mui/material/Typography';\n\nimport { TextMaxLineProps } from './props';\nimport useTypography from './useTypography';\n\nconst TextMaxLine = forwardRef<HTMLAnchorElement, TextMaxLineProps>(\n (\n {\n asLink,\n variant = 'body1',\n line = 2,\n persistent = false,\n children,\n sx,\n ...other\n },\n ref,\n ) => {\n const { lineHeight } = useTypography(variant);\n\n const styles = {\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n display: '-webkit-box',\n WebkitLineClamp: line,\n WebkitBoxOrient: 'vertical',\n ...(persistent && {\n height: lineHeight * line,\n }),\n ...sx,\n } as const;\n\n if (asLink) {\n return (\n <Link\n color=\"inherit\"\n ref={ref}\n variant={variant}\n sx={{ ...styles }}\n {...other}\n >\n {children}\n </Link>\n );\n }\n\n return (\n <Typography ref={ref} variant={variant} sx={{ ...styles }} {...other}>\n {children}\n </Typography>\n );\n },\n);\n\nTextMaxLine.displayName = 'TextMaxLine';\n\nexport default TextMaxLine;\n","import { useTheme } from '@mui/material/styles';\nimport { Variant } from '@mui/material/styles/createTypography';\n\nimport { useWidth } from 'hooks/useResponsive';\n\n// ----------------------------------------------------------------------\n\nfunction remToPx(value: string) {\n return Math.round(parseFloat(value) * 16);\n}\n\nexport default function (variant: Variant) {\n const theme = useTheme();\n\n const breakpoints = useWidth();\n\n const key = theme.breakpoints.up(breakpoints === 'xl' ? 'lg' : breakpoints);\n\n const hasResponsive =\n variant === 'h1' ||\n variant === 'h2' ||\n variant === 'h3' ||\n variant === 'h4' ||\n variant === 'h5' ||\n variant === 'h6';\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const getFont: any =\n hasResponsive && theme.typography[variant][key]\n ? theme.typography[variant][key]\n : theme.typography[variant];\n\n const fontSize = remToPx(getFont.fontSize);\n\n const lineHeight = Number(theme.typography[variant].lineHeight) * fontSize;\n\n const { fontWeight, letterSpacing } = theme.typography[variant];\n\n return { fontSize, lineHeight, fontWeight, letterSpacing };\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/DataView/index.tsx","../src/components/DataView/contants.ts","../src/components/DataView/DesktopFooter.tsx","../src/components/DataView/EnhancedMoreActions.tsx","../src/components/DataView/Toolbar.tsx"],"names":["useCallback","useMemo","useState","Button","CircularProgress","Divider","Stack","Typography","DATAGRID_ACTIONS","memo","jsx","jsxs","DesktopFooter","rowCount","page","rowsPerPage","onPaginationChange","DesktopPaginationContainer","Pagination_default","newPage","newRowsPerPage","DesktopFooter_default","Children","cloneElement","isValidElement","createEnhanceMoreActions","children","onClose","child","originalOnClick","enhancedProps","args","childProps","EnhancedMoreActions","EnhancedMoreActions_default","forwardRef","GridToolbarColumnsButton","ColumnsButton","props","ref","Icon_default","Toolbar","setFilterButtonEl","handleColumnsButtonRef","button","Portal_default","Toolbar_default","Fragment","DataView","title","headerContent","breakpoint","columns","rows","mobileRender","paginationModel","actions","moreActions","onAdd","onSearch","searchValue","onSearchChange","slots","slotProps","loading","fetching","containerProps","hideFooter","hideHeader","showColumnButton","others","popover","usePopover_default","isMobile","useResponsive_default","filterButtonEl","showSearch","showAdd","showActions","showMoreActions","showHeaderMoreActions","showTopbarMoreActions","showActionsContainer","showTopbar","FooterComponent","dataGridSlots","Container","Header","ActionsContainer","ActionsDivider","Topbar","ToolbarActionsDivider","MenuPopover_default","SearchContainer","SearchInput_default","e","Result_default","FixedProgressBar_default","Scrollbar_default","row","MobilePaginationContainer","DataGrid_default","DataView_default"],"mappings":"0fAAA,OAAS,eAAAA,GAAa,WAAAC,GAAS,YAAAC,OAAgB,QAC/C,OAAOC,MAAY,uBACnB,OAAOC,OAAsB,iCAC7B,OAAOC,OAAa,wBACpB,OAAO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AWjC,EACX,QAAStD,EAACN,GAAA,CAAiB,GAAI,CAAE,EAAG,YAAa,EAAG,EACpD,QAASiD,EAAK,SAAW,EACzB,MACE3C,EAACJ,GAAA,CAAM,KAAM,EAAG,WAAW,SAAS,eAAe,SAChD,SAAAwD,GAAO,cACNpD,EAACoD,EAAM,cAAN,EAAoB,EAErBpD,EAACH,GAAA,CAAW,QAAQ,QAAQ,MAAM,iBAAiB,sCAEnD,EAEJ,EAGF,UAAAG,EAACwF,EAAA,CAAU,YAAW,GACnB,SAAA7C,EAAK,IAAI8C,GAAO7C,EAAa6C,CAAG,CAAC,EACpC,EAEC,CAAChC,GACAzD,EAAC0F,EAAA,CACC,SAAA1F,EAACQ,EAAA,CACC,MAAOL,EACP,KAAM0C,EAAgB,KACtB,YAAaA,EAAgB,SAC7B,aAAcpC,GACZH,EAAmBG,EAASoC,EAAgB,QAAQ,EAEtD,oBAAqBnC,GACnBJ,EAAmBuC,EAAgB,KAAMnC,CAAc,EAE3D,EACF,GAEJ,EAEAV,EAAC2F,GAAA,CACC,QAASjD,EACT,KAAMC,EACN,MAAOgC,GACP,UAAW,CACT,MAAO,CAAE,SAAUV,EAAe,EAClC,QAAS,CACP,kBAAAjC,GACA,gBAAiB,EACnB,EACA,GAAGqB,EACL,EACA,mBAAoB,GACpB,aAAc,IAAM,GACpB,QAASC,EACT,SAAUC,EACV,WAAYE,EACX,GAAGG,GACN,IAvLGN,EAAU,UAAY,MAyL7B,CAEJ,EAEOsC,GAAQtD","sourcesContent":["import { useCallback, useMemo, useState } from 'react';\nimport Button from '@mui/material/Button';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport Divider from '@mui/material/Divider';\nimport Stack from '@mui/material/Stack';\nimport Typography from '@mui/material/Typography';\nimport { GridSlotsComponentsProps } from '@mui/x-data-grid-premium';\n\nimport DataGrid from 'components/DataGrid';\nimport FixedProgressBar from 'components/FixedProgressBar';\nimport Icon from 'components/Icon';\nimport MenuPopover from 'components/MenuPopover';\nimport Result from 'components/Result';\nimport Scrollbar from 'components/Scrollbar';\nimport SearchInput from 'components/SearchInput';\nimport usePopover from 'hooks/usePopover';\nimport useResponsive from 'hooks/useResponsive';\n\nimport { DATAGRID_ACTIONS } from './contants';\nimport DesktopFooter from './DesktopFooter';\nimport EnhancedMoreActions from './EnhancedMoreActions';\nimport Pagination from './Pagination';\nimport { DataGridSlotsProps, DataViewProps } from './props';\nimport {\n ActionsContainer,\n ActionsDivider,\n Container,\n Header,\n MobilePaginationContainer,\n SearchContainer,\n ToolbarActionsDivider,\n Topbar,\n} from './styles';\nimport Toolbar from './Toolbar';\n\nconst DataView = ({\n title,\n headerContent,\n breakpoint = 'md',\n columns,\n rows = [],\n mobileRender,\n rowCount = 0,\n paginationModel = { page: 0, pageSize: 25 },\n onPaginationChange,\n actions,\n moreActions,\n onAdd,\n onSearch,\n searchValue,\n onSearchChange,\n slots,\n slotProps,\n loading,\n fetching,\n containerProps = { height: 562, maxHeight: 562 },\n hideFooter,\n hideHeader = false,\n showColumnButton = false,\n ...others\n}: DataViewProps) => {\n const popover = usePopover();\n const isMobile = useResponsive('down', breakpoint);\n const [filterButtonEl, setFilterButtonEl] =\n useState<HTMLButtonElement | null>(null);\n\n const showSearch = !!onSearch;\n const showAdd = !!onAdd;\n const showActions = !!actions;\n const showMoreActions = !!moreActions;\n const showHeaderMoreActions = isMobile && showMoreActions;\n const showTopbarMoreActions = !isMobile && showMoreActions;\n const showActionsContainer = showActions || showAdd || showHeaderMoreActions;\n const showTopbar =\n showTopbarMoreActions || showSearch || showColumnButton || !isMobile;\n\n const FooterComponent = useCallback(\n () => (\n <DesktopFooter\n rowCount={rowCount}\n page={paginationModel.page}\n rowsPerPage={paginationModel.pageSize}\n onPaginationChange={onPaginationChange}\n />\n ),\n [rowCount, paginationModel, onPaginationChange],\n );\n\n const dataGridSlots: DataGridSlotsProps = useMemo(\n () => ({\n ...slots,\n footer: FooterComponent as unknown as DataGridSlotsProps['footer'],\n ...(showColumnButton &&\n !slots?.toolbar && {\n toolbar: Toolbar as unknown as DataGridSlotsProps['toolbar'],\n }),\n }),\n [slots, FooterComponent, showColumnButton],\n );\n\n return (\n <Container\n key={loading ? 'loading' : 'data'}\n breakpoint={breakpoint}\n {...containerProps}\n flex={loading ? 1 : undefined}\n minHeight={!loading && rows.length === 0 ? 562 : undefined}\n >\n {!hideHeader && (\n <>\n <Header breakpoint={breakpoint}>\n <Typography variant=\"overline\" color=\"text.secondary\" noWrap>\n {title}\n </Typography>\n\n {showActionsContainer && (\n <ActionsContainer breakpoint={breakpoint}>\n {showActions && actions}\n\n {showAdd && (\n <>\n {showActions && (\n <ActionsDivider orientation=\"vertical\" flexItem />\n )}\n\n <Button\n startIcon={<Icon icon=\"SIMPLE_ADD\" />}\n variant=\"contained\"\n onClick={onAdd}\n >\n Adicionar\n </Button>\n </>\n )}\n\n {showHeaderMoreActions && (\n <>\n {(showActions || showAdd) && (\n <ActionsDivider orientation=\"vertical\" flexItem />\n )}\n\n <Button\n color=\"inherit\"\n startIcon={<Icon icon=\"MORE_BOLD\" />}\n size=\"small\"\n onClick={popover.onOpen}\n >\n Mais\n </Button>\n </>\n )}\n </ActionsContainer>\n )}\n </Header>\n\n {showTopbar && (\n <Topbar breakpoint={breakpoint}>\n <Stack\n flex={1}\n direction=\"row\"\n alignItems=\"center\"\n id={DATAGRID_ACTIONS}\n gap={0.5}\n >\n {showMoreActions && (\n <>\n {showTopbarMoreActions && (\n <>\n <Button\n color=\"inherit\"\n startIcon={<Icon icon=\"MORE_BOLD\" />}\n size=\"small\"\n onClick={popover.onOpen}\n >\n Mais\n </Button>\n\n {!isMobile && (\n <ToolbarActionsDivider\n orientation=\"vertical\"\n flexItem\n />\n )}\n </>\n )}\n\n {(showTopbarMoreActions || showHeaderMoreActions) && (\n <MenuPopover\n open={popover.open}\n anchorEl={popover.open}\n onClose={popover.onClose}\n sx={{\n minWidth: 160,\n }}\n disabledArrow={true}\n >\n <EnhancedMoreActions onClose={popover.onClose}>\n {moreActions}\n </EnhancedMoreActions>\n </MenuPopover>\n )}\n </>\n )}\n </Stack>\n\n {showSearch && (\n <SearchContainer breakpoint={breakpoint}>\n <SearchInput\n value={searchValue}\n placeholder=\"Buscar\"\n onSearch={onSearch}\n onChange={e => onSearchChange?.(e.target.value)}\n size=\"small\"\n fullWidth\n iconPosition=\"start\"\n />\n </SearchContainer>\n )}\n </Topbar>\n )}\n </>\n )}\n\n {!showTopbar && !hideHeader && <Divider sx={{ mt: 2 }} />}\n\n {headerContent && headerContent}\n\n {isMobile ? (\n <Result\n isFetching={fetching}\n fetching={<FixedProgressBar />}\n isLoading={loading}\n loading={<CircularProgress sx={{ m: '160px auto' }} />}\n isEmpty={rows.length === 0}\n empty={\n <Stack flex={1} alignItems=\"center\" justifyContent=\"center\">\n {slots?.noRowsOverlay ? (\n <slots.noRowsOverlay />\n ) : (\n <Typography variant=\"body2\" color=\"text.secondary\">\n Nenhum registro encontrado\n </Typography>\n )}\n </Stack>\n }\n >\n <Scrollbar fillContent>\n {rows.map(row => mobileRender(row))}\n </Scrollbar>\n\n {!hideFooter && (\n <MobilePaginationContainer>\n <Pagination\n count={rowCount}\n page={paginationModel.page}\n rowsPerPage={paginationModel.pageSize}\n onPageChange={newPage =>\n onPaginationChange(newPage, paginationModel.pageSize)\n }\n onRowsPerPageChange={newRowsPerPage =>\n onPaginationChange(paginationModel.page, newRowsPerPage)\n }\n />\n </MobilePaginationContainer>\n )}\n </Result>\n ) : (\n <DataGrid\n columns={columns}\n rows={rows}\n slots={dataGridSlots}\n slotProps={{\n panel: { anchorEl: filterButtonEl },\n toolbar: {\n setFilterButtonEl,\n showQuickFilter: true,\n } as unknown as GridSlotsComponentsProps['toolbar'],\n ...slotProps,\n }}\n columnHeaderHeight={48}\n getRowHeight={() => 68}\n loading={loading}\n fetching={fetching}\n hideFooter={hideFooter}\n {...others}\n />\n )}\n </Container>\n );\n};\n\nexport default DataView;\nexport {\n ActionsContainer,\n ActionsDivider,\n Container,\n DesktopFooter,\n EnhancedMoreActions,\n Header,\n MobilePaginationContainer,\n SearchContainer,\n Toolbar,\n ToolbarActionsDivider,\n Topbar,\n};\n","export const DATAGRID_ACTIONS = 'datagrid-actions';\n","import { memo } from 'react';\nimport Stack from '@mui/material/Stack';\nimport Typography from '@mui/material/Typography';\n\nimport Pagination from './Pagination';\nimport { DesktopFooterProps } from './props';\nimport { DesktopPaginationContainer } from './styles';\n\nconst DesktopFooter = ({\n rowCount,\n page,\n rowsPerPage,\n onPaginationChange,\n}: DesktopFooterProps) => {\n return (\n <DesktopPaginationContainer>\n <Stack direction=\"row\" alignItems=\"center\" gap={0.5}>\n <Typography variant=\"body2\" color=\"text.disabled\">\n Total de itens:\n </Typography>\n <Typography variant=\"body2\">{rowCount}</Typography>\n </Stack>\n\n <Pagination\n count={rowCount}\n page={page}\n rowsPerPage={rowsPerPage}\n onPageChange={newPage => onPaginationChange(newPage, rowsPerPage)}\n onRowsPerPageChange={newRowsPerPage =>\n onPaginationChange(page, newRowsPerPage)\n }\n />\n </DesktopPaginationContainer>\n );\n};\n\nexport default memo(DesktopFooter);\n","import {\n Children,\n cloneElement,\n isValidElement,\n memo,\n ReactElement,\n ReactNode,\n} from 'react';\n\nimport { EnhancedMoreActionsProps } from './props';\n\nconst createEnhanceMoreActions = (\n children: ReactNode,\n onClose: () => void,\n): ReactNode => {\n return Children.map(children, child => {\n if (!isValidElement(child)) {\n return child;\n }\n\n const originalOnClick = (\n child.props as { onClick?: (...args: unknown[]) => void }\n ).onClick;\n\n const enhancedProps: {\n onClick?: (...args: unknown[]) => void;\n children?: ReactNode;\n } = {};\n\n enhancedProps.onClick = (...args: unknown[]) => {\n onClose();\n if (originalOnClick) {\n originalOnClick(...args);\n }\n };\n\n const childProps = child.props as { children?: ReactNode };\n if (childProps?.children) {\n enhancedProps.children = createEnhanceMoreActions(\n childProps.children,\n onClose,\n );\n }\n\n return cloneElement(child as ReactElement, enhancedProps);\n });\n};\n\nconst EnhancedMoreActions = ({\n children,\n onClose,\n}: EnhancedMoreActionsProps) => {\n if (!children) return null;\n return createEnhanceMoreActions(children, onClose);\n};\n\nexport default memo(EnhancedMoreActions);\n","import { forwardRef, useCallback } from 'react';\nimport Button, { ButtonProps } from '@mui/material/Button';\nimport { GridToolbarColumnsButton } from '@mui/x-data-grid-premium';\n\nimport Icon from 'components/Icon';\nimport Portal from 'components/Portal';\n\nimport { DATAGRID_ACTIONS } from './contants';\nimport { ToolbarProps } from './props';\n\nconst ColumnsButton = forwardRef<HTMLButtonElement, ButtonProps>(\n ({ children, ...props }, ref) => (\n <Button\n {...props}\n ref={ref}\n color=\"inherit\"\n startIcon={<Icon icon=\"COLUMNS\" />}\n >\n {children ?? 'Colunas'}\n </Button>\n ),\n);\n\nColumnsButton.displayName = 'ColumnsButton';\n\nconst Toolbar = ({ setFilterButtonEl }: ToolbarProps) => {\n const handleColumnsButtonRef = useCallback(\n (button: HTMLButtonElement | null) => {\n setFilterButtonEl(button);\n },\n [setFilterButtonEl],\n );\n\n return (\n <Portal container={DATAGRID_ACTIONS}>\n <GridToolbarColumnsButton\n ref={handleColumnsButtonRef}\n slotProps={{\n button: {\n color: 'inherit',\n startIcon: <Icon icon=\"COLUMNS\" />,\n children: 'Colunas',\n },\n }}\n />\n </Portal>\n );\n};\n\nexport default Toolbar;\n"]}
@@ -1,11 +0,0 @@
1
- import { forwardRef } from 'react';
2
- import m from '@mui/material/Avatar';
3
- import v from '@mui/material/Badge';
4
- import { useTheme } from '@mui/material/styles';
5
- import { jsxs, jsx } from 'react/jsx-runtime';
6
-
7
- var t=r=>r&&r.charAt(0).toUpperCase(),C=r=>["A","N","H","L","Q"].includes(t(r))?"primary":["F","G","T","I","J"].includes(t(r))?"info":["K","D","Y","B","O"].includes(t(r))?"success":["P","E","R","S","U"].includes(t(r))?"warning":["V","W","X","M","Z"].includes(t(r))?"error":"default",d=forwardRef(({color:r,name:o="",BadgeProps:i,children:n,sx:s,...c},u)=>{let e=useTheme(),l=t(o),g=C(o),a=r||g,f=a==="default"?jsxs(m,{ref:u,sx:s,...c,children:[o&&l,n]}):jsxs(m,{ref:u,sx:{color:e.palette[a]?.contrastText,backgroundColor:e.palette[a]?.main,fontWeight:e.typography.fontWeightMedium,...s},...c,children:[o&&l,n]});return i?jsx(v,{overlap:"circular",anchorOrigin:{vertical:"bottom",horizontal:"right"},...i,children:f}):f});d.displayName="CustomAvatar";var W=d;
8
-
9
- export { W as a };
10
- //# sourceMappingURL=out.js.map
11
- //# sourceMappingURL=chunk-7R6ZYEQS.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/CustomAvatar/index.tsx"],"names":["forwardRef","Avatar","Badge","useTheme","jsx","jsxs","getCharAtName","name","getColorByName","CustomAvatar","color","BadgeProps","children","sx","other","ref","theme","charAtName","colorByName","colr","renderContent","CustomAvatar_default"],"mappings":"AAAA,OAAS,cAAAA,MAAkB,QAC3B,OAAOC,MAAY,uBACnB,OAAOC,MAAW,sBAClB,OAAS,YAAAC,MAAgB,uBA2BjB,OAqBF,OAAAC,EArBE,QAAAC,MAAA,oBAvBR,IAAMC,EAAiBC,GAAiBA,GAAQA,EAAK,OAAO,CAAC,EAAE,YAAY,EAErEC,EAAkBD,GAClB,CAAC,IAAK,IAAK,IAAK,IAAK,GAAG,EAAE,SAASD,EAAcC,CAAI,CAAC,EAAU,UAChE,CAAC,IAAK,IAAK,IAAK,IAAK,GAAG,EAAE,SAASD,EAAcC,CAAI,CAAC,EAAU,OAChE,CAAC,IAAK,IAAK,IAAK,IAAK,GAAG,EAAE,SAASD,EAAcC,CAAI,CAAC,EAAU,UAChE,CAAC,IAAK,IAAK,IAAK,IAAK,GAAG,EAAE,SAASD,EAAcC,CAAI,CAAC,EAAU,UAChE,CAAC,IAAK,IAAK,IAAK,IAAK,GAAG,EAAE,SAASD,EAAcC,CAAI,CAAC,EAAU,QAC7D,UAGHE,EAAeT,EACnB,CAAC,CAAE,MAAAU,EAAO,KAAAH,EAAO,GAAI,WAAAI,EAAY,SAAAC,EAAU,GAAAC,EAAI,GAAGC,CAAM,EAAGC,IAAQ,CACjE,IAAMC,EAAQb,EAAS,EAEjBc,EAAaX,EAAcC,CAAI,EAE/BW,EAAcV,EAAeD,CAAI,EAEjCY,EAAOT,GAASQ,EAEhBE,EACJD,IAAS,UACPd,EAACJ,EAAA,CAAO,IAAKc,EAAK,GAAIF,EAAK,GAAGC,EAC3B,UAAAP,GAAQU,EACRL,GACH,EAEAP,EAACJ,EAAA,CACC,IAAKc,EACL,GAAI,CACF,MAAOC,EAAM,QAAQG,CAAI,GAAG,aAC5B,gBAAiBH,EAAM,QAAQG,CAAI,GAAG,KACtC,WAAYH,EAAM,WAAW,iBAC7B,GAAGH,CACL,EACC,GAAGC,EAEH,UAAAP,GAAQU,EACRL,GACH,EAGJ,OAAOD,EACLP,EAACF,EAAA,CACC,QAAQ,WACR,aAAc,CAAE,SAAU,SAAU,WAAY,OAAQ,EACvD,GAAGS,EAEH,SAAAS,EACH,EAEAA,CAEJ,CACF,EAEAX,EAAa,YAAc,eAE3B,IAAOY,EAAQZ","sourcesContent":["import { forwardRef } from 'react';\nimport Avatar from '@mui/material/Avatar';\nimport Badge from '@mui/material/Badge';\nimport { useTheme } from '@mui/material/styles';\n\nimport { CustomAvatarProps } from './props';\n\nconst getCharAtName = (name: string) => name && name.charAt(0).toUpperCase();\n\nconst getColorByName = (name: string) => {\n if (['A', 'N', 'H', 'L', 'Q'].includes(getCharAtName(name))) return 'primary';\n if (['F', 'G', 'T', 'I', 'J'].includes(getCharAtName(name))) return 'info';\n if (['K', 'D', 'Y', 'B', 'O'].includes(getCharAtName(name))) return 'success';\n if (['P', 'E', 'R', 'S', 'U'].includes(getCharAtName(name))) return 'warning';\n if (['V', 'W', 'X', 'M', 'Z'].includes(getCharAtName(name))) return 'error';\n return 'default';\n};\n\nconst CustomAvatar = forwardRef<HTMLDivElement, CustomAvatarProps>(\n ({ color, name = '', BadgeProps, children, sx, ...other }, ref) => {\n const theme = useTheme();\n\n const charAtName = getCharAtName(name);\n\n const colorByName = getColorByName(name);\n\n const colr = color || colorByName;\n\n const renderContent =\n colr === 'default' ? (\n <Avatar ref={ref} sx={sx} {...other}>\n {name && charAtName}\n {children}\n </Avatar>\n ) : (\n <Avatar\n ref={ref}\n sx={{\n color: theme.palette[colr]?.contrastText,\n backgroundColor: theme.palette[colr]?.main,\n fontWeight: theme.typography.fontWeightMedium,\n ...sx,\n }}\n {...other}\n >\n {name && charAtName}\n {children}\n </Avatar>\n );\n\n return BadgeProps ? (\n <Badge\n overlap=\"circular\"\n anchorOrigin={{ vertical: 'bottom', horizontal: 'right' }}\n {...BadgeProps}\n >\n {renderContent}\n </Badge>\n ) : (\n renderContent\n );\n },\n);\n\nCustomAvatar.displayName = 'CustomAvatar';\n\nexport default CustomAvatar;\n"]}
@@ -1,10 +0,0 @@
1
- import { forwardRef, useState } from 'react';
2
- import { IMaskMixin } from 'react-imask';
3
- import f from '@mui/material/TextField';
4
- import { jsx } from 'react/jsx-runtime';
5
-
6
- var k=IMaskMixin(t=>{let{inputRef:e,"data-value":n,defaultValue:u,tabIndex:p,name:s,...a}=t;return jsx(f,{inputRef:e,fullWidth:!0,...a,inputProps:{...a.inputProps,name:s,tabIndex:p},value:n,"data-testid":"masked-input-wrapper"})}),d=forwardRef(({onChange:t,name:e,...n},u)=>{let[p,s]=useState("");return jsx(k,{inputRef:u,name:e,"data-value":p,...n,onAccept:(a,o)=>{s(a),t({target:{name:e,value:o._unmaskedValue}});}})});d.displayName="MaskedInput";var P=d;
7
-
8
- export { P as a };
9
- //# sourceMappingURL=out.js.map
10
- //# sourceMappingURL=chunk-DHRVSWFW.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/MaskedInput/index.tsx"],"names":["forwardRef","useState","IMaskMixin","TextField","jsx","MaskedStyledInput","props","inputRef","value","defaultValue","tabIndex","name","other","MaskedInput","onChange","others","ref","maskedValue","setMaskedValue","v","mask","MaskedInput_default"],"mappings":"AAEA,OAAS,cAAAA,EAAY,YAAAC,MAAgB,QACrC,OAAS,cAAAC,MAAkB,cAC3B,OAAOC,MAAmC,0BAetC,cAAAC,MAAA,oBAXJ,IAAMC,EAAoBH,EAAWI,GAAS,CAC5C,GAAM,CACJ,SAAAC,EACA,aAAcC,EACd,aAAAC,EACA,SAAAC,EACA,KAAAC,EACA,GAAGC,CACL,EAAIN,EAEJ,OACEF,EAACD,EAAA,CACC,SAAUI,EACV,UAAS,GACR,GAAIK,EACL,WAAY,CACV,GAAGA,EAAM,WACT,KAAAD,EACA,SAAAD,CACF,EACA,MAAOF,EACP,cAAY,uBACd,CAEJ,CAAC,EAEKK,EAAcb,EAClB,CAAC,CAAE,SAAAc,EAAU,KAAAH,EAAM,GAAGI,CAAO,EAAGC,IAAQ,CACtC,GAAM,CAACC,EAAaC,CAAc,EAAIjB,EAAS,EAAE,EACjD,OACEG,EAACC,EAAA,CACC,SAAUW,EACV,KAAML,EACN,aAAYM,EACX,GAAIF,EACL,SAAU,CAACI,EAAQC,IAAc,CAC/BF,EAAeC,CAAC,EAEhBL,EAAS,CACP,OAAQ,CACN,KAAAH,EACA,MAAOS,EAAK,cACd,CACF,CAAC,CACH,EACF,CAEJ,CACF,EAEAP,EAAY,YAAc,cAE1B,IAAOQ,EAAQR","sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { forwardRef, useState } from 'react';\nimport { IMaskMixin } from 'react-imask';\nimport TextField, { TextFieldProps } from '@mui/material/TextField';\n\nimport { MaskedInputProps } from './props';\n\nconst MaskedStyledInput = IMaskMixin(props => {\n const {\n inputRef,\n 'data-value': value,\n defaultValue,\n tabIndex,\n name,\n ...other\n } = props as any;\n\n return (\n <TextField\n inputRef={inputRef}\n fullWidth\n {...(other as TextFieldProps)}\n inputProps={{\n ...other.inputProps,\n name,\n tabIndex,\n }}\n value={value}\n data-testid=\"masked-input-wrapper\"\n />\n );\n});\n\nconst MaskedInput = forwardRef<HTMLDivElement, MaskedInputProps>(\n ({ onChange, name, ...others }, ref) => {\n const [maskedValue, setMaskedValue] = useState('');\n return (\n <MaskedStyledInput\n inputRef={ref}\n name={name}\n data-value={maskedValue}\n {...(others as any)}\n onAccept={(v: any, mask: any) => {\n setMaskedValue(v);\n\n onChange({\n target: {\n name,\n value: mask._unmaskedValue,\n },\n });\n }}\n />\n );\n },\n);\n\nMaskedInput.displayName = 'MaskedInput';\n\nexport default MaskedInput;\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/Label/index.tsx","../src/components/Label/classes.ts","../src/components/Label/styles.ts"],"names":["forwardRef","Box","useTheme","labelClasses","lighten","styled","StyledLabel","theme","color","variant","defaultColor","stylesMode","styleColors","jsx","jsxs","sentenceCase","string","Label","children","startIcon","endIcon","sx","other","ref","iconStyles","Label_default"],"mappings":"wCAAA,OAAS,cAAAA,MAAkB,QAC3B,OAAOC,MAAS,oBAChB,OAAS,YAAAC,MAAgB,uBCFlB,IAAMC,EAAe,CAC1B,KAAM,mBACN,KAAM,kBACR,ECHA,OAAOF,MAAS,oBAEhB,OAAS,WAAAG,EAAS,UAAAC,MAAc,uBAMzB,IAAMC,EAAcD,EAAOJ,CAAG,EAAE,CAAC,CACtC,MAAAM,EACA,WAAY,CAAE,MAAAC,EAAO,QAAAC,CAAQ,CAC/B,IAMM,CACJ,IAAMC,EAAe,CACnB,GAAIF,IAAU,WAAa,CAIzB,GAAIC,IAAY,UAAY,CAC1B,MAAOF,EAAM,KAAK,QAAQ,OAAO,MACjC,gBAAiBA,EAAM,KAAK,QAAQ,KAAK,QACzC,CAACI,EAAW,IAAI,EAAG,CAAE,MAAOJ,EAAM,KAAK,QAAQ,KAAK,GAAG,CAAE,CAC3D,EAIA,GAAIE,IAAY,YAAc,CAC5B,gBAAiB,cACjB,MAAOF,EAAM,KAAK,QAAQ,KAAK,QAC/B,OAAQ,aAAaA,EAAM,KAAK,QAAQ,KAAK,SAC/C,EAIA,GAAIE,IAAY,QAAU,CACxB,MAAOF,E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ACH,GAAGE,CACL,CACF,CAAC,EFrEK,OAcI,OAAAC,EAdJ,QAAAC,MAAA,oBA9BN,IAAMC,EAAgBC,GACbA,EAAO,OAAO,CAAC,EAAE,YAAY,EAAIA,EAAO,MAAM,CAAC,EAGlDC,EAAQjB,EACZ,CACE,CACE,SAAAkB,EACA,MAAAV,EAAQ,UACR,QAAAC,EAAU,OACV,UAAAU,EACA,QAAAC,EACA,GAAAC,EACA,GAAGC,CACL,EACAC,IACG,CACH,IAAMhB,EAAQL,EAAS,EAEjBsB,EAAa,CACjB,MAAO,GACP,OAAQ,GACR,aAAc,CACZ,MAAO,EACP,OAAQ,EACR,UAAW,OACb,CACF,EAEA,OACEV,EAACR,EAAA,CACC,IAAKiB,EACL,UAAU,OACV,UAAWpB,EAAa,KACxB,WAAY,CAAE,MAAAK,EAAO,QAAAC,CAAQ,EAC7B,GAAI,CACF,GAAIU,GAAa,CAAE,GAAI,GAAK,EAC5B,GAAIC,GAAW,CAAE,GAAI,GAAK,EAC1B,GAAGC,CACL,EACA,MAAOd,EACN,GAAGe,EAEH,UAAAH,GACCN,EAACZ,EAAA,CACC,UAAU,OACV,UAAWE,EAAa,KACxB,GAAI,CAAE,GAAI,IAAM,GAAGqB,CAAW,EAE7B,SAAAL,EACH,EAGD,OAAOD,GAAa,SAAWH,EAAaG,CAAQ,EAAIA,EAExDE,GACCP,EAACZ,EAAA,CACC,UAAU,OACV,UAAWE,EAAa,KACxB,GAAI,CAAE,GAAI,IAAM,GAAGqB,CAAW,EAE7B,SAAAJ,EACH,GAEJ,CAEJ,CACF,EAEAH,EAAM,YAAc,QAEpB,IAAOQ,EAAQR","sourcesContent":["import { forwardRef } from 'react';\nimport Box from '@mui/material/Box';\nimport { useTheme } from '@mui/material/styles';\n\nimport { labelClasses } from './classes';\nimport type { LabelProps } from './props';\nimport { StyledLabel } from './styles';\n\nconst sentenceCase = (string: string) => {\n return string.charAt(0).toUpperCase() + string.slice(1);\n};\n\nconst Label = forwardRef<HTMLSpanElement, LabelProps>(\n (\n {\n children,\n color = 'default',\n variant = 'soft',\n startIcon,\n endIcon,\n sx,\n ...other\n },\n ref,\n ) => {\n const theme = useTheme();\n\n const iconStyles = {\n width: 16,\n height: 16,\n '& svg, img': {\n width: 1,\n height: 1,\n objectFit: 'cover',\n },\n };\n\n return (\n <StyledLabel\n ref={ref}\n component=\"span\"\n className={labelClasses.root}\n ownerState={{ color, variant }}\n sx={{\n ...(startIcon && { pl: 0.75 }),\n ...(endIcon && { pr: 0.75 }),\n ...sx,\n }}\n theme={theme}\n {...other}\n >\n {startIcon && (\n <Box\n component=\"span\"\n className={labelClasses.icon}\n sx={{ mr: 0.75, ...iconStyles }}\n >\n {startIcon}\n </Box>\n )}\n\n {typeof children === 'string' ? sentenceCase(children) : children}\n\n {endIcon && (\n <Box\n component=\"span\"\n className={labelClasses.icon}\n sx={{ ml: 0.75, ...iconStyles }}\n >\n {endIcon}\n </Box>\n )}\n </StyledLabel>\n );\n },\n);\n\nLabel.displayName = 'Label';\n\nexport default Label;\n","export const labelClasses = {\n root: 'mnl__label__root',\n icon: 'mnl__label__icon',\n};\n","import Box from '@mui/material/Box';\nimport type { Theme } from '@mui/material/styles';\nimport { lighten, styled } from '@mui/material/styles';\n\nimport { stylesMode } from 'theme/styles';\n\nimport type { LabelColor, LabelVariant } from './props';\n\nexport const StyledLabel = styled(Box)(({\n theme,\n ownerState: { color, variant },\n}: {\n theme: Theme;\n ownerState: {\n color: LabelColor;\n variant: LabelVariant;\n };\n}) => {\n const defaultColor = {\n ...(color === 'default' && {\n /**\n * @variant filled\n */\n ...(variant === 'filled' && {\n color: theme.vars.palette.common.white,\n backgroundColor: theme.vars.palette.text.primary,\n [stylesMode.dark]: { color: theme.vars.palette.grey[800] },\n }),\n /**\n * @variant outlined\n */\n ...(variant === 'outlined' && {\n backgroundColor: 'transparent',\n color: theme.vars.palette.text.primary,\n border: `2px solid ${theme.vars.palette.text.primary}`,\n }),\n /**\n * @variant soft\n */\n ...(variant === 'soft' && {\n color: theme.vars.palette.text.secondary,\n border: `1px solid ${lighten(theme.palette.grey[500], 0.32)}`,\n }),\n /**\n * @variant inverted\n */\n ...(variant === 'inverted' && {\n color: theme.vars.palette.grey[800],\n backgroundColor: theme.vars.palette.grey[300],\n }),\n }),\n };\n\n const styleColors = {\n ...(color !== 'default' && {\n /**\n * @variant filled\n */\n ...(variant === 'filled' && {\n color: theme.vars.palette[color].contrastText,\n backgroundColor: theme.vars.palette[color].main,\n }),\n /**\n * @variant outlined\n */\n ...(variant === 'outlined' && {\n backgroundColor: 'transparent',\n color: theme.vars.palette[color].main,\n border: `2px solid ${theme.vars.palette[color].main}`,\n }),\n /**\n * @variant soft\n */\n ...(variant === 'soft' && {\n color: theme.vars.palette[color].dark,\n backgroundColor: lighten(theme.palette[color].main, 0.84),\n [stylesMode.dark]: { color: theme.vars.palette[color].light },\n }),\n /**\n * @variant inverted\n */\n ...(variant === 'inverted' && {\n color: theme.vars.palette[color].darker,\n backgroundColor: theme.vars.palette[color].lighter,\n }),\n }),\n };\n\n return {\n height: 24,\n minWidth: 24,\n lineHeight: 0,\n cursor: 'default',\n alignItems: 'center',\n whiteSpace: 'nowrap',\n display: 'inline-flex',\n justifyContent: 'center',\n padding: theme.spacing(0, 0.75),\n fontSize: theme.typography.pxToRem(12),\n fontWeight: theme.typography.fontWeightBold,\n borderRadius: theme.shape.borderRadius * 0.75,\n transition: theme.transitions.create('all', {\n duration: theme.transitions.duration.shorter,\n }),\n ...defaultColor,\n ...styleColors,\n };\n});\n"]}
@@ -1,10 +0,0 @@
1
- import { forwardRef, useState, useRef, useEffect } from 'react';
2
- import { NumericFormat } from 'react-number-format';
3
- import B from '@mui/material/TextField';
4
- import { jsx } from 'react/jsx-runtime';
5
-
6
- var s=forwardRef(({decimalScale:c=0,fixedDecimalScale:m=!0,prefix:d,suffix:I,allowNegative:N,minValue:u,maxValue:n=1/0,maxLength:T,value:b,inputProps:g,InputProps:y,size:S,disabled:h,name:t,helperText:x,error:R,fullWidth:v,label:w,required:D,onChange:r,tabIndex:F,placeholder:P,margin:k,className:E,delay:l},L)=>{let[V,q]=useState(Date.now()),e=useRef(null),i=()=>q(Date.now()),z=(C,o)=>{if(!r)return;e.current&&clearTimeout(e.current);let f=()=>{let{floatValue:a}=C,p=a||0;if(u!==void 0&&u>p){r({target:{name:t,value:u},event:o}),i();return}if(a!==void 0&&n<p){r({target:{name:t,value:n},event:o}),i();return}r({target:{name:t,value:a},event:o});};l===0?f():e.current=setTimeout(f,l||1e3);};return useEffect(()=>()=>{e.current&&clearTimeout(e.current);},[]),jsx(NumericFormat,{getInputRef:L,value:b,prefix:d,suffix:I,decimalSeparator:",",thousandSeparator:".",decimalScale:c,fixedDecimalScale:m,autoComplete:"off",allowNegative:N,maxLength:T,onValueChange:z,customInput:B,InputProps:{...y},inputProps:{...g,name:t,tabIndex:F},disabled:h,size:S,helperText:x,error:R,fullWidth:v,label:w,required:D,placeholder:P,margin:k,className:E},V)});s.displayName="NumberInput";var Y=s;
7
-
8
- export { Y as a };
9
- //# sourceMappingURL=out.js.map
10
- //# sourceMappingURL=chunk-KIWSLR76.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/NumberInput/index.tsx"],"names":["forwardRef","useEffect","useRef","useState","NumericFormat","TextField","jsx","NumberInput","decimalScale","fixedDecimalScale","prefix","suffix","allowNegative","minValue","maxValue","maxLength","value","inputProps","InputProps","size","disabled","name","helperText","error","fullWidth","label","required","onChange","tabIndex","placeholder","margin","className","delay","ref","inputkey","setInputKey","delayTimer","reRenderInput","handleChange","values","event","executeChange","floatValue","comparisonValue","NumberInput_default"],"mappings":"AAAA,OAAS,cAAAA,EAAY,aAAAC,EAAW,UAAAC,EAAQ,YAAAC,MAAgB,QACxD,OAEE,iBAAAC,MAEK,sBACP,OAAOC,MAAe,0BAwFhB,cAAAC,MAAA,oBApFN,IAAMC,EAAcP,EAClB,CACE,CACE,aAAAQ,EAAe,EACf,kBAAAC,EAAoB,GACpB,OAAA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EACR,OAAQC,EACR,iBAAiB,IACjB,kBAAkB,IAClB,aAAcH,EACd,kBAAmBC,EACnB,aAAa,MACb,cAAeG,EACf,UAAWG,EACX,cAAeuB,EACf,YAAajC,EACb,WAAY,CACV,GAAGa,CACL,EACA,WAAY,CAAE,GAAGD,EAAY,KAAAI,EAAM,SAAAO,CAAS,EAC5C,SAAUR,EACV,KAAMD,EACN,WAAYG,EACZ,MAAOC,EACP,UAAWC,EACX,MAAOC,EACP,SAAUC,EACV,YAAaG,EACb,OAAQC,EACR,UAAWC,GA3BNG,CA4BP,CAEJ,CACF,EAEA3B,EAAY,YAAc,cAE1B,IAAOqC,EAAQrC","sourcesContent":["import { forwardRef, useEffect, useRef, useState } from 'react';\nimport {\n NumberFormatValues,\n NumericFormat,\n SourceInfo,\n} from 'react-number-format';\nimport TextField from '@mui/material/TextField';\n\nimport { NumberInputProps } from 'types/numberInputProps';\n\nconst NumberInput = forwardRef<HTMLDivElement, NumberInputProps>(\n (\n {\n decimalScale = 0,\n fixedDecimalScale = true,\n prefix,\n suffix,\n allowNegative,\n minValue,\n maxValue = Infinity,\n maxLength,\n value,\n inputProps,\n InputProps,\n size,\n disabled,\n name,\n helperText,\n error,\n fullWidth,\n label,\n required,\n onChange,\n tabIndex,\n placeholder,\n margin,\n className,\n delay,\n },\n ref,\n ) => {\n const [inputkey, setInputKey] = useState(Date.now());\n const delayTimer = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n const reRenderInput = () => setInputKey(Date.now());\n\n const handleChange = (values: NumberFormatValues, event: SourceInfo) => {\n if (!onChange) return;\n\n if (delayTimer.current) clearTimeout(delayTimer.current);\n\n const executeChange = () => {\n const { floatValue } = values;\n const comparisonValue = floatValue || 0;\n\n if (minValue !== undefined && minValue > comparisonValue) {\n onChange({ target: { name, value: minValue }, event });\n reRenderInput();\n\n return;\n }\n\n if (floatValue !== undefined && maxValue < comparisonValue) {\n onChange({ target: { name, value: maxValue }, event });\n reRenderInput();\n\n return;\n }\n\n onChange({\n target: {\n name,\n value: floatValue,\n },\n event,\n });\n };\n\n if (delay === 0) {\n executeChange();\n } else {\n delayTimer.current = setTimeout(executeChange, delay || 1000);\n }\n };\n\n useEffect(() => {\n return () => {\n if (delayTimer.current) {\n clearTimeout(delayTimer.current);\n }\n };\n }, []);\n\n return (\n <NumericFormat\n key={inputkey}\n getInputRef={ref}\n value={value}\n prefix={prefix}\n suffix={suffix}\n decimalSeparator=\",\"\n thousandSeparator=\".\"\n decimalScale={decimalScale}\n fixedDecimalScale={fixedDecimalScale}\n autoComplete=\"off\"\n allowNegative={allowNegative}\n maxLength={maxLength}\n onValueChange={handleChange}\n customInput={TextField}\n InputProps={{\n ...InputProps,\n }}\n inputProps={{ ...inputProps, name, tabIndex }}\n disabled={disabled}\n size={size}\n helperText={helperText}\n error={error}\n fullWidth={fullWidth}\n label={label}\n required={required}\n placeholder={placeholder}\n margin={margin}\n className={className}\n />\n );\n },\n);\n\nNumberInput.displayName = 'NumberInput';\n\nexport default NumberInput;\n"]}
@@ -1,12 +0,0 @@
1
- import { a } from './chunk-NQNNMRLC.js';
2
- import { forwardRef, useMemo } from 'react';
3
- import M from '@mui/material/Box';
4
- import w from '@mui/material/CircularProgress';
5
- import R from '@mui/material/IconButton';
6
- import { jsx } from 'react/jsx-runtime';
7
-
8
- var p=forwardRef(({icon:o,label:n,loading:r=!1,disabled:u=!1,iconProps:i={},children:e,color:a$1="primary.main",boxProps:f={},tooltipProps:l,...B},I)=>{if(!o&&!e)throw new Error("IconButton: icon or children is required");l&&process.env.NODE_ENV==="development"&&console.warn("IconButton: tooltipProps \xE9 obsoleto. Remova a prop.");let m=useMemo(()=>o?jsx(a,{icon:o,...i}):e,[o,e,i]),d=useMemo(()=>r?jsx(w,{size:20,color:"inherit"}):m,[r,m]);return jsx(M,{color:a$1,...f,children:jsx(R,{ref:I,color:"inherit","aria-label":n,title:n,disabled:r||u,...B,children:d})})});p.displayName="IconButton";var x=p;
9
-
10
- export { x as a };
11
- //# sourceMappingURL=out.js.map
12
- //# sourceMappingURL=chunk-LNXA53QR.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/IconButton/index.tsx"],"names":["forwardRef","useMemo","Box","CircularProgress","MuiIconButton","jsx","IconButton","icon","label","loading","disabled","iconProps","children","color","boxProps","tooltipProps","props","ref","content","Icon_default","loadingContent","IconButton_default"],"mappings":"wCAAA,OAAS,cAAAA,EAAY,WAAAC,MAAe,QACpC,OAAOC,MAAS,oBAChB,OAAOC,MAAsB,iCAC7B,OAAOC,MAAmB,2BA8BN,cAAAC,MAAA,oBAxBpB,IAAMC,EAAaN,EACjB,CACE,CACE,KAAAO,EACA,MAAAC,EACA,QAAAC,EAAU,GACV,SAAAC,EAAW,GACX,UAAAC,EAAY,CAAC,EACb,SAAAC,EACA,MAAAC,EAAQ,eACR,SAAAC,EAAW,CAAC,EACZ,aAAAC,EACA,GAAGC,CACL,EACAC,IACG,CACH,GAAI,CAACV,GAAQ,CAACK,EACZ,MAAM,IAAI,MAAM,0CAA0C,EACxDG,GAAgB,QAAQ,IAAI,WAAa,eAE3C,QAAQ,KAAK,wDAAqD,EAGpE,IAAMG,EAAUjB,EACd,IAAOM,EAAOF,EAACc,EAAA,CAAK,KAAMZ,EAAO,GAAGI,EAAW,EAAKC,EACpD,CAACL,EAAMK,EAAUD,CAAS,CAC5B,EAEMS,EAAiBnB,EACrB,IACEQ,EAAUJ,EAACF,EAAA,CAAiB,KAAM,GAAI,MAAM,UAAU,EAAKe,EAC7D,CAACT,EAASS,CAAO,CACnB,EAEA,OACEb,EAACH,EAAA,CAAI,MAAOW,EAAQ,GAAGC,EACrB,SAAAT,EAACD,EAAA,CACC,IAAKa,EACL,MAAM,UACN,aAAYT,EACZ,MAAOA,EACP,SAAUC,GAAWC,EACpB,GAAGM,EAEH,SAAAI,EACH,EACF,CAEJ,CACF,EAEAd,EAAW,YAAc,aAEzB,IAAOe,EAAQf","sourcesContent":["import { forwardRef, useMemo } from 'react';\nimport Box from '@mui/material/Box';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport MuiIconButton from '@mui/material/IconButton';\n\nimport Icon from 'components/Icon';\n\nimport { IconButtonProps } from './props';\n\nconst IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(\n (\n {\n icon,\n label,\n loading = false,\n disabled = false,\n iconProps = {},\n children,\n color = 'primary.main',\n boxProps = {},\n tooltipProps,\n ...props\n },\n ref,\n ) => {\n if (!icon && !children)\n throw new Error('IconButton: icon or children is required');\n if (tooltipProps && process.env.NODE_ENV === 'development') {\n // eslint-disable-next-line no-console\n console.warn('IconButton: tooltipProps é obsoleto. Remova a prop.');\n }\n\n const content = useMemo(\n () => (icon ? <Icon icon={icon} {...iconProps} /> : children),\n [icon, children, iconProps],\n );\n\n const loadingContent = useMemo(\n () =>\n loading ? <CircularProgress size={20} color=\"inherit\" /> : content,\n [loading, content],\n );\n\n return (\n <Box color={color} {...boxProps}>\n <MuiIconButton\n ref={ref as React.Ref<HTMLButtonElement>}\n color=\"inherit\"\n aria-label={label}\n title={label}\n disabled={loading || disabled}\n {...props}\n >\n {loadingContent}\n </MuiIconButton>\n </Box>\n );\n },\n);\n\nIconButton.displayName = 'IconButton';\n\nexport default IconButton;\n"]}