@zydon/common 2.7.63 → 2.7.65

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 (109) hide show
  1. package/README.md +1 -0
  2. package/dist/chunk-2CY62UZ5.js +21 -0
  3. package/dist/chunk-2CY62UZ5.js.map +1 -0
  4. package/dist/{chunk-5NIMUEW5.js → chunk-6FG5S5PI.js} +2 -2
  5. package/dist/{chunk-VPKUUY5Q.js → chunk-CU7PKEY2.js} +2 -2
  6. package/dist/{chunk-MP2LAJS5.js → chunk-KQTA6B4Y.js} +2 -2
  7. package/dist/chunk-QVUHCBI2.js +35 -0
  8. package/dist/chunk-QVUHCBI2.js.map +1 -0
  9. package/dist/chunk-RPPQBAVO.js +12 -0
  10. package/dist/chunk-RPPQBAVO.js.map +1 -0
  11. package/dist/components/AvatarButton/index.js +2 -2
  12. package/dist/components/Common/index.js +2 -2
  13. package/dist/components/DataView/index.js +2 -2
  14. package/dist/components/DatePicker/index.d.ts +2 -1
  15. package/dist/components/DatePicker/index.js +3 -3
  16. package/dist/components/DatePicker/index.js.map +1 -1
  17. package/dist/components/DragContainer/index.js +2 -2
  18. package/dist/components/DragContainer/index.js.map +1 -1
  19. package/dist/components/DynamicDataView/index.js +2 -2
  20. package/dist/components/FileUpload/index.js +1 -4
  21. package/dist/components/FrameSkeleton/index.d.ts +1 -0
  22. package/dist/components/FrameSkeleton/index.js +2 -2
  23. package/dist/components/FrameSkeleton/index.js.map +1 -1
  24. package/dist/components/ImageCropModal/index.js +14 -4
  25. package/dist/components/ImageCropModal/index.js.map +1 -1
  26. package/dist/components/Incrementer/index.d.ts +0 -3
  27. package/dist/components/ListBundles/index.d.ts +0 -8
  28. package/dist/components/SearchInput/index.js +1 -1
  29. package/dist/components/SelectList/index.d.ts +7 -0
  30. package/dist/components/SelectList/index.js +10 -0
  31. package/dist/components/SelectList/index.js.map +1 -0
  32. package/dist/components/SelectableCards/index.js +2 -2
  33. package/dist/components/StateDisplay/index.d.ts +0 -42
  34. package/dist/components/SwapList/index.js +1 -1
  35. package/dist/components/ToggleTheme/index.js +2 -2
  36. package/dist/components/carousel/index.d.ts +0 -18
  37. package/dist/components/form/Codes/index.d.ts +2 -1
  38. package/dist/components/form/Codes/index.js +4 -4
  39. package/dist/components/form/Codes/index.js.map +1 -1
  40. package/dist/components/form/FileUpload/index.d.ts +0 -200
  41. package/dist/components/form/FileUpload/index.js +2 -5
  42. package/dist/components/form/FileUpload/index.js.map +1 -1
  43. package/dist/components/form/SelectList/index.d.ts +13 -0
  44. package/dist/components/form/SelectList/index.js +16 -0
  45. package/dist/components/form/SelectList/index.js.map +1 -0
  46. package/dist/components/form/SelectableCards/index.js +2 -2
  47. package/dist/hooks/useMount.d.ts +0 -20
  48. package/dist/hooks/useSnackbar.d.ts +7 -7
  49. package/dist/hooks/useThemeToggle.js +2 -2
  50. package/dist/hooks/useUpload.js +6 -1
  51. package/dist/hooks/useUpload.js.map +1 -1
  52. package/dist/hooks/useUploadImage.js +7 -2
  53. package/dist/hooks/useUploadImage.js.map +1 -1
  54. package/dist/hooks/useWindowFocus.d.ts +0 -3
  55. package/dist/index.d.ts +3 -5
  56. package/dist/index.js +2 -6
  57. package/dist/index.js.map +1 -1
  58. package/dist/theme/core/index.d.ts +1 -1
  59. package/dist/theme/styles/index.d.ts +12 -76
  60. package/dist/theme/theme-provider.js +2 -2
  61. package/dist/theme/with-settings/index.d.ts +0 -4
  62. package/dist/types/sectionProps.d.ts +2 -0
  63. package/dist/types/selectList.d.ts +31 -0
  64. package/dist/types/selectList.js +3 -0
  65. package/dist/types/selectList.js.map +1 -0
  66. package/dist/utils/compare.d.ts +0 -21
  67. package/dist/utils/dnd.js +4 -4
  68. package/dist/utils/dnd.js.map +1 -1
  69. package/dist/utils/execution.d.ts +0 -70
  70. package/dist/utils/object.d.ts +0 -6
  71. package/dist/utils/paymentValidators.d.ts +0 -6
  72. package/dist/utils/popup.d.ts +0 -7
  73. package/dist/utils/string.d.ts +0 -5
  74. package/package.json +6 -1
  75. package/dist/chunk-33C6UWPV.js +0 -7
  76. package/dist/chunk-33C6UWPV.js.map +0 -1
  77. package/dist/chunk-6WGKIN5L.js +0 -18
  78. package/dist/chunk-6WGKIN5L.js.map +0 -1
  79. package/dist/chunk-DTIGB5NW.js +0 -10
  80. package/dist/chunk-DTIGB5NW.js.map +0 -1
  81. package/dist/chunk-IEGF6HVV.js +0 -43
  82. package/dist/chunk-IEGF6HVV.js.map +0 -1
  83. package/dist/chunk-JFZOAS75.js +0 -23
  84. package/dist/chunk-JFZOAS75.js.map +0 -1
  85. package/dist/chunk-KR3DUHA6.js +0 -16
  86. package/dist/chunk-KR3DUHA6.js.map +0 -1
  87. package/dist/chunk-OTVEMGF2.js +0 -12
  88. package/dist/chunk-OTVEMGF2.js.map +0 -1
  89. package/dist/chunk-SBMEL2IJ.js +0 -9
  90. package/dist/chunk-SBMEL2IJ.js.map +0 -1
  91. package/dist/chunk-VYNBVZSA.js +0 -37
  92. package/dist/chunk-VYNBVZSA.js.map +0 -1
  93. package/dist/chunk-WQSRNCNF.js +0 -5
  94. package/dist/chunk-WQSRNCNF.js.map +0 -1
  95. package/dist/chunk-YCEQDXLR.js +0 -8
  96. package/dist/chunk-YCEQDXLR.js.map +0 -1
  97. package/dist/components/form/UploadAvatarWithCrop/index.d.ts +0 -21
  98. package/dist/components/form/UploadAvatarWithCrop/index.js +0 -23
  99. package/dist/components/form/UploadAvatarWithCrop/index.js.map +0 -1
  100. package/dist/components/form/UploadWithCrop/index.d.ts +0 -21
  101. package/dist/components/form/UploadWithCrop/index.js +0 -29
  102. package/dist/components/form/UploadWithCrop/index.js.map +0 -1
  103. package/dist/components/upload/index.d.ts +0 -70
  104. package/dist/components/upload/index.js +0 -31
  105. package/dist/components/upload/index.js.map +0 -1
  106. package/dist/{chunk-5NIMUEW5.js.map → chunk-6FG5S5PI.js.map} +0 -0
  107. package/dist/{chunk-VPKUUY5Q.js.map → chunk-CU7PKEY2.js.map} +0 -0
  108. package/dist/{chunk-MP2LAJS5.js.map → chunk-KQTA6B4Y.js.map} +0 -0
  109. package/dist/{index-5a5e5dc8.d.ts → index-c8f1e6e7.d.ts} +12 -12
@@ -2,50 +2,25 @@ import * as _mui_material_styles_createTypography from '@mui/material/styles/cre
2
2
  import * as csstype from 'csstype';
3
3
  import { CSSObject, Theme } from '@mui/material/styles';
4
4
 
5
- /**
6
- * Usage:
7
- * ...hideScrollX,
8
- * ...hideScrollY,
9
- */
10
5
  declare const hideScrollX: CSSObject;
11
6
  declare const hideScrollY: CSSObject;
12
- /**
13
- * Usage:
14
- * ...textGradient(`to right, ${theme.vars.palette.text.primary}, ${alpha(theme.vars.palette.text.primary, 0.2)}`
15
- */
16
7
  declare function textGradient(color: string): CSSObject;
17
- /**
18
- * Usage:
19
- * ...borderGradient({ color: `to right, ${theme.vars.palette.text.primary}, ${alpha(theme.vars.palette.text.primary, 0.2)}`, padding: '4px' }),
20
- */
21
8
  type BorderGradientProps = {
22
9
  color?: string;
23
10
  padding?: string;
24
11
  };
25
12
  declare function borderGradient(props?: BorderGradientProps): CSSObject;
26
- /**
27
- * Usage:
28
- * ...bgGradient({ color: `to right, ${theme.vars.palette.grey[900]} 25%, ${varAlpha(theme.vars.palette.primary.darkerChannel, 0.88)}`, imgUrl: '/assets/background/overlay.png' }),
29
- */
30
13
  type BgGradientProps = {
31
14
  color: string;
32
15
  imgUrl?: string;
33
16
  };
34
17
  declare function bgGradient({ color, imgUrl }: BgGradientProps): CSSObject;
35
- /**
36
- * Usage:
37
- * ...bgBlur({ color: `varAlpha(theme.vars.palette.background.paperChannel, 0.8)`, imgUrl: '/assets/background/overlay.png', blur: 6 }),
38
- */
39
18
  type BgBlurProps = {
40
19
  color: string;
41
20
  blur?: number;
42
21
  imgUrl?: string;
43
22
  };
44
23
  declare function bgBlur({ color, blur, imgUrl }: BgBlurProps): CSSObject;
45
- /**
46
- * Usage:
47
- * ...maxLine({ line: 2, persistent: theme.typography.caption }),
48
- */
49
24
  type MediaFontSize = {
50
25
  [key: string]: {
51
26
  fontSize: React.CSSProperties['fontSize'];
@@ -56,10 +31,6 @@ type MaxLineProps = {
56
31
  persistent?: Partial<React.CSSProperties>;
57
32
  };
58
33
  declare function maxLine({ line, persistent }: MaxLineProps): CSSObject;
59
- /**
60
- * Usage:
61
- * ...paper({ theme, color: varAlpha(theme.vars.palette.background.paperChannel, 0.9), dropdown: true }),
62
- */
63
34
  type PaperProps = {
64
35
  theme: Theme;
65
36
  color?: string;
@@ -193,7 +164,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
193
164
  flexShrink?: readonly ((string & {}) | csstype.Globals)[] | csstype.Property.FlexShrink | readonly NonNullable<csstype.Property.FlexShrink | undefined>[] | undefined;
194
165
  flexWrap?: csstype.Property.FlexWrap | readonly NonNullable<csstype.Property.FlexWrap | undefined>[] | readonly csstype.Property.FlexWrap[] | undefined;
195
166
  float?: csstype.Property.Float | readonly NonNullable<csstype.Property.Float | undefined>[] | readonly csstype.Property.Float[] | undefined;
196
- fontFamily?: csstype.Property.FontFamily | readonly string[] | readonly csstype.Property.FontFamily[] | undefined;
167
+ fontFamily?: readonly string[] | csstype.Property.FontFamily | readonly csstype.Property.FontFamily[] | undefined;
197
168
  fontFeatureSettings?: readonly string[] | csstype.Property.FontFeatureSettings | readonly csstype.Property.FontFeatureSettings[] | undefined;
198
169
  fontKerning?: csstype.Property.FontKerning | readonly NonNullable<csstype.Property.FontKerning | undefined>[] | readonly csstype.Property.FontKerning[] | undefined;
199
170
  fontLanguageOverride?: readonly string[] | csstype.Property.FontLanguageOverride | readonly csstype.Property.FontLanguageOverride[] | undefined;
@@ -218,7 +189,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
218
189
  fontVariantNumeric?: readonly string[] | csstype.Property.FontVariantNumeric | readonly csstype.Property.FontVariantNumeric[] | undefined;
219
190
  fontVariantPosition?: csstype.Property.FontVariantPosition | readonly NonNullable<csstype.Property.FontVariantPosition | undefined>[] | readonly csstype.Property.FontVariantPosition[] | undefined;
220
191
  fontVariationSettings?: readonly string[] | csstype.Property.FontVariationSettings | readonly csstype.Property.FontVariationSettings[] | undefined;
221
- fontWeight?: csstype.Property.FontWeight | readonly NonNullable<csstype.Property.FontWeight | undefined>[] | readonly ((string & {}) | csstype.Globals | "bold" | "normal" | "bolder" | "lighter")[] | undefined;
192
+ fontWeight?: csstype.Property.FontWeight | readonly NonNullable<csstype.Property.FontWeight | undefined>[] | readonly ("bold" | (string & {}) | csstype.Globals | "normal" | "bolder" | "lighter")[] | undefined;
222
193
  forcedColorAdjust?: csstype.Property.ForcedColorAdjust | readonly NonNullable<csstype.Property.ForcedColorAdjust | undefined>[] | readonly csstype.Property.ForcedColorAdjust[] | undefined;
223
194
  gridAutoColumns?: readonly (string | (string & {}))[] | csstype.Property.GridAutoColumns<string | number> | readonly NonNullable<csstype.Property.GridAutoColumns<string | number> | undefined>[] | undefined;
224
195
  gridAutoFlow?: readonly string[] | csstype.Property.GridAutoFlow | readonly csstype.Property.GridAutoFlow[] | undefined;
@@ -445,7 +416,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
445
416
  zIndex?: readonly ((string & {}) | csstype.Globals | "auto")[] | csstype.Property.ZIndex | readonly NonNullable<csstype.Property.ZIndex | undefined>[] | undefined;
446
417
  zoom?: csstype.Property.Zoom | readonly NonNullable<csstype.Property.Zoom | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal" | "reset")[] | undefined;
447
418
  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 | "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;
419
+ 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;
449
420
  animationRange?: readonly (string | (string & {}))[] | csstype.Property.AnimationRange<string | number> | readonly NonNullable<csstype.Property.AnimationRange<string | number> | undefined>[] | undefined;
450
421
  background?: readonly (string | (string & {}))[] | csstype.Property.Background<string | number> | readonly NonNullable<csstype.Property.Background<string | number> | undefined>[] | undefined;
451
422
  border?: readonly (string | (string & {}))[] | csstype.Property.Border<string | number> | readonly NonNullable<csstype.Property.Border<string | number> | undefined>[] | undefined;
@@ -454,7 +425,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
454
425
  borderBlockStart?: readonly (string | (string & {}))[] | csstype.Property.BorderBlockStart<string | number> | readonly NonNullable<csstype.Property.BorderBlockStart<string | number> | undefined>[] | undefined;
455
426
  borderBottom?: readonly (string | (string & {}))[] | csstype.Property.BorderBottom<string | number> | readonly NonNullable<csstype.Property.BorderBottom<string | number> | undefined>[] | undefined;
456
427
  borderColor?: readonly string[] | csstype.Property.BorderColor | readonly csstype.Property.BorderColor[] | undefined;
457
- borderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ((string & {}) | csstype.Globals | "repeat" | "none" | "round" | "space" | "stretch")[] | undefined;
428
+ borderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ("repeat" | (string & {}) | csstype.Globals | "none" | "round" | "space" | "stretch")[] | undefined;
458
429
  borderInline?: readonly (string | (string & {}))[] | csstype.Property.BorderInline<string | number> | readonly NonNullable<csstype.Property.BorderInline<string | number> | undefined>[] | undefined;
459
430
  borderInlineEnd?: readonly (string | (string & {}))[] | csstype.Property.BorderInlineEnd<string | number> | readonly NonNullable<csstype.Property.BorderInlineEnd<string | number> | undefined>[] | undefined;
460
431
  borderInlineStart?: readonly (string | (string & {}))[] | csstype.Property.BorderInlineStart<string | number> | readonly NonNullable<csstype.Property.BorderInlineStart<string | number> | undefined>[] | undefined;
@@ -486,7 +457,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
486
457
  marginBlock?: readonly (string | (string & {}))[] | csstype.Property.MarginBlock<string | number> | readonly NonNullable<csstype.Property.MarginBlock<string | number> | undefined>[] | undefined;
487
458
  marginInline?: readonly (string | (string & {}))[] | csstype.Property.MarginInline<string | number> | readonly NonNullable<csstype.Property.MarginInline<string | number> | undefined>[] | undefined;
488
459
  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 ((string & {}) | csstype.Globals | "repeat" | "none" | "round" | "space" | "alpha" | "luminance" | "stretch")[] | undefined;
460
+ maskBorder?: csstype.Property.MaskBorder | readonly NonNullable<csstype.Property.MaskBorder | undefined>[] | readonly ("repeat" | (string & {}) | csstype.Globals | "none" | "round" | "space" | "alpha" | "luminance" | "stretch")[] | undefined;
490
461
  motion?: readonly (string | (string & {}))[] | csstype.Property.Offset<string | number> | readonly NonNullable<csstype.Property.Offset<string | number> | undefined>[] | undefined;
491
462
  offset?: readonly (string | (string & {}))[] | csstype.Property.Offset<string | number> | readonly NonNullable<csstype.Property.Offset<string | number> | undefined>[] | undefined;
492
463
  outline?: readonly (string | (string & {}))[] | csstype.Property.Outline<string | number> | readonly NonNullable<csstype.Property.Outline<string | number> | undefined>[] | undefined;
@@ -729,8 +700,8 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
729
700
  WebkitUserModify?: csstype.Property.WebkitUserModify | readonly NonNullable<csstype.Property.WebkitUserModify | undefined>[] | readonly csstype.Property.WebkitUserModify[] | undefined;
730
701
  WebkitUserSelect?: csstype.Property.UserSelect | readonly NonNullable<csstype.Property.UserSelect | undefined>[] | readonly csstype.Property.UserSelect[] | undefined;
731
702
  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 | "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;
703
+ 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;
704
+ MozBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ("repeat" | (string & {}) | csstype.Globals | "none" | "round" | "space" | "stretch")[] | undefined;
734
705
  MozColumnRule?: readonly (string | (string & {}))[] | csstype.Property.ColumnRule<string | number> | readonly NonNullable<csstype.Property.ColumnRule<string | number> | undefined>[] | undefined;
735
706
  MozColumns?: readonly (string | (string & {}))[] | csstype.Property.Columns<string | number> | readonly NonNullable<csstype.Property.Columns<string | number> | undefined>[] | undefined;
736
707
  MozOutlineRadius?: readonly (string | (string & {}))[] | csstype.Property.MozOutlineRadius<string | number> | readonly NonNullable<csstype.Property.MozOutlineRadius<string | number> | undefined>[] | undefined;
@@ -741,16 +712,16 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
741
712
  msScrollSnapX?: readonly string[] | csstype.Property.MsScrollSnapX | readonly csstype.Property.MsScrollSnapX[] | undefined;
742
713
  msScrollSnapY?: readonly string[] | csstype.Property.MsScrollSnapY | readonly csstype.Property.MsScrollSnapY[] | undefined;
743
714
  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 | "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;
715
+ 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;
745
716
  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 ((string & {}) | csstype.Globals | "repeat" | "none" | "round" | "space" | "stretch")[] | undefined;
717
+ WebkitBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ("repeat" | (string & {}) | csstype.Globals | "none" | "round" | "space" | "stretch")[] | undefined;
747
718
  WebkitBorderRadius?: readonly (string | (string & {}))[] | csstype.Property.BorderRadius<string | number> | readonly NonNullable<csstype.Property.BorderRadius<string | number> | undefined>[] | undefined;
748
719
  WebkitColumnRule?: readonly (string | (string & {}))[] | csstype.Property.ColumnRule<string | number> | readonly NonNullable<csstype.Property.ColumnRule<string | number> | undefined>[] | undefined;
749
720
  WebkitColumns?: readonly (string | (string & {}))[] | csstype.Property.Columns<string | number> | readonly NonNullable<csstype.Property.Columns<string | number> | undefined>[] | undefined;
750
721
  WebkitFlex?: readonly (string | (string & {}))[] | csstype.Property.Flex<string | number> | readonly NonNullable<csstype.Property.Flex<string | number> | undefined>[] | undefined;
751
722
  WebkitFlexFlow?: readonly string[] | csstype.Property.FlexFlow | readonly csstype.Property.FlexFlow[] | undefined;
752
723
  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 ((string & {}) | csstype.Globals | "repeat" | "none" | "round" | "space" | "alpha" | "luminance" | "stretch")[] | undefined;
724
+ WebkitMaskBoxImage?: csstype.Property.MaskBorder | readonly NonNullable<csstype.Property.MaskBorder | undefined>[] | readonly ("repeat" | (string & {}) | csstype.Globals | "none" | "round" | "space" | "alpha" | "luminance" | "stretch")[] | undefined;
754
725
  WebkitTextEmphasis?: readonly string[] | csstype.Property.TextEmphasis | readonly csstype.Property.TextEmphasis[] | undefined;
755
726
  WebkitTextStroke?: readonly (string | (string & {}))[] | csstype.Property.WebkitTextStroke<string | number> | readonly NonNullable<csstype.Property.WebkitTextStroke<string | number> | undefined>[] | undefined;
756
727
  WebkitTransition?: readonly string[] | csstype.Property.Transition<string & {}> | readonly csstype.Property.Transition<string & {}>[] | undefined;
@@ -831,7 +802,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
831
802
  MozTransitionTimingFunction?: readonly string[] | csstype.Property.TransitionTimingFunction | readonly csstype.Property.TransitionTimingFunction[] | undefined;
832
803
  MozUserInput?: csstype.Property.MozUserInput | readonly NonNullable<csstype.Property.MozUserInput | undefined>[] | readonly csstype.Property.MozUserInput[] | undefined;
833
804
  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 | "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;
805
+ 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;
835
806
  OAnimationDelay?: readonly string[] | csstype.Property.AnimationDelay<string & {}> | readonly csstype.Property.AnimationDelay<string & {}>[] | undefined;
836
807
  OAnimationDirection?: readonly string[] | csstype.Property.AnimationDirection | readonly csstype.Property.AnimationDirection[] | undefined;
837
808
  OAnimationDuration?: readonly string[] | csstype.Property.AnimationDuration<string & {}> | readonly csstype.Property.AnimationDuration<string & {}>[] | undefined;
@@ -841,7 +812,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
841
812
  OAnimationPlayState?: readonly string[] | csstype.Property.AnimationPlayState | readonly csstype.Property.AnimationPlayState[] | undefined;
842
813
  OAnimationTimingFunction?: readonly string[] | csstype.Property.AnimationTimingFunction | readonly csstype.Property.AnimationTimingFunction[] | undefined;
843
814
  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 ((string & {}) | csstype.Globals | "repeat" | "none" | "round" | "space" | "stretch")[] | undefined;
815
+ OBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ("repeat" | (string & {}) | csstype.Globals | "none" | "round" | "space" | "stretch")[] | undefined;
845
816
  OObjectFit?: csstype.Property.ObjectFit | readonly NonNullable<csstype.Property.ObjectFit | undefined>[] | readonly csstype.Property.ObjectFit[] | undefined;
846
817
  OObjectPosition?: readonly (string | (string & {}))[] | csstype.Property.ObjectPosition<string | number> | readonly NonNullable<csstype.Property.ObjectPosition<string | number> | undefined>[] | undefined;
847
818
  OTabSize?: readonly (string | (string & {}))[] | csstype.Property.TabSize<string | number> | readonly NonNullable<csstype.Property.TabSize<string | number> | undefined>[] | undefined;
@@ -1024,10 +995,6 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
1024
995
  ":valid"?: unknown;
1025
996
  ":visited"?: unknown;
1026
997
  };
1027
- /**
1028
- * Usage:
1029
- * ...menuItem(theme)
1030
- */
1031
998
  declare function menuItem(theme: Theme): {
1032
999
  [x: string]: unknown;
1033
1000
  padding: string;
@@ -1872,21 +1839,9 @@ declare const mediaQueries: {
1872
1839
  upLg: string;
1873
1840
  upXl: string;
1874
1841
  };
1875
- /**
1876
- * Set font family
1877
- */
1878
1842
  declare function setFont(fontName: string): string;
1879
- /**
1880
- * Converts rem to px
1881
- */
1882
1843
  declare function remToPx(value: string): number;
1883
- /**
1884
- * Converts px to rem
1885
- */
1886
1844
  declare function pxToRem(value: number): string;
1887
- /**
1888
- * Responsive font sizes
1889
- */
1890
1845
  declare function responsiveFontSizes({ sm, md, lg, }: {
1891
1846
  sm: number;
1892
1847
  md: number;
@@ -1896,34 +1851,15 @@ declare function responsiveFontSizes({ sm, md, lg, }: {
1896
1851
  fontSize: string;
1897
1852
  };
1898
1853
  };
1899
- /**
1900
- * Converts a hex color to RGB channels
1901
- */
1902
1854
  declare function hexToRgbChannel(hex: string): string;
1903
- /**
1904
- * Converts a hex color to RGBA channels with optional alpha support
1905
- * Supports:
1906
- * - 6-digit hex: "#FF0000" -> "255 0 0"
1907
- * - 8-digit hex: "#FF000080" -> "255 0 0 / 0.5"
1908
- * - 6-digit hex with explicit alpha: hexToRgbaChannel("#FF0000", 0.5) -> "255 0 0 / 0.5"
1909
- */
1910
1855
  declare function hexToRgbaChannel(hex: string, alpha?: number): string;
1911
- /**
1912
- * Converts a hex color to RGB channels
1913
- */
1914
1856
  declare function createPaletteChannel(hexPalette: Record<string, string>): {
1915
1857
  [x: string]: string;
1916
1858
  };
1917
- /**
1918
- * Color definition with optional alpha
1919
- */
1920
1859
  interface ColorWithAlpha {
1921
1860
  color: string;
1922
1861
  alpha?: number;
1923
1862
  }
1924
- /**
1925
- * Color with alpha channel
1926
- */
1927
1863
  declare function varAlpha(color: string, opacity?: number): string;
1928
1864
 
1929
1865
  export { BgBlurProps, BgGradientProps, BorderGradientProps, ColorWithAlpha, MaxLineProps, MediaFontSize, bgBlur, bgGradient, borderGradient, createPaletteChannel, hexToRgbChannel, hexToRgbaChannel, hideScrollX, hideScrollY, maxLine, mediaQueries, menuItem, paper, pxToRem, remToPx, responsiveFontSizes, setFont, stylesMode, textGradient, varAlpha };
@@ -1,11 +1,11 @@
1
- export { b as default } from '../chunk-VPKUUY5Q.js';
1
+ export { b as default } from '../chunk-CU7PKEY2.js';
2
2
  import '../chunk-LDGBS7ZI.js';
3
- import '../chunk-WUFEPE2G.js';
4
3
  export { b as useSettingsContext } from '../chunk-2WG6OWB4.js';
5
4
  import '../chunk-6W52DPH4.js';
6
5
  import '../chunk-TWSAWMZ3.js';
7
6
  import '../chunk-ROVD7OGE.js';
8
7
  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
@@ -4,10 +4,6 @@ import { S as SettingsState } from '../../settings-583c107c.js';
4
4
  import { T as ThemeUpdateOptions } from '../../types-b8e8c021.js';
5
5
  import '@mui/material/styles/createTypography';
6
6
 
7
- /**
8
- * [1] settings @primaryColor
9
- * [2] settings @contrast
10
- */
11
7
  declare function updateCoreWithSettings(theme: ThemeUpdateOptions, settings: SettingsState): ThemeUpdateOptions;
12
8
  declare function updateComponentsWithSettings(settings: SettingsState): {
13
9
  components: Components<Omit<Theme, "palette" | "components"> & _mui_material_styles.CssVarsTheme>;
@@ -1,3 +1,4 @@
1
+ import { StackProps } from '@mui/material/Stack';
1
2
  import { MutableRefObject, ReactNode } from 'react';
2
3
 
3
4
  interface SectionProps {
@@ -7,6 +8,7 @@ interface SectionProps {
7
8
  subTitle?: string;
8
9
  isRequired?: boolean;
9
10
  child: ReactNode;
11
+ sectionContentProps?: StackProps;
10
12
  }
11
13
 
12
14
  export { SectionProps };
@@ -0,0 +1,31 @@
1
+ import { ReactNode } from 'react';
2
+
3
+ interface SelectListProps {
4
+ label?: ReactNode;
5
+ value?: string | string[];
6
+ multiple?: boolean;
7
+ options: {
8
+ label: ReactNode;
9
+ value: string;
10
+ disabled?: boolean;
11
+ startContent?: ReactNode;
12
+ }[];
13
+ total?: number;
14
+ onChange: (value: string | string[]) => void;
15
+ pagination?: {
16
+ page: number;
17
+ perPage: number;
18
+ onChange: (page: number, perPage: number) => void;
19
+ };
20
+ onSearch?: (search?: string) => void;
21
+ onAdd?: VoidFunction;
22
+ loading?: boolean;
23
+ loadingView?: ReactNode;
24
+ fetching?: boolean;
25
+ fetchingView?: ReactNode;
26
+ emptyView?: ReactNode;
27
+ helperText?: ReactNode;
28
+ error?: boolean;
29
+ }
30
+
31
+ export { SelectListProps };
@@ -0,0 +1,3 @@
1
+
2
+ //# sourceMappingURL=out.js.map
3
+ //# sourceMappingURL=selectList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":""}
@@ -1,26 +1,5 @@
1
1
  export { default as isEqual } from 'react-fast-compare';
2
2
 
3
- /**
4
- * Realiza comparação profunda entre dois valores com tratamento especial para Sets.
5
- *
6
- * Esta função utiliza react-fast-compare como base, mas adiciona lógica especial
7
- * para Sets que contêm objetos, já que react-fast-compare pode não comparar
8
- * corretamente Sets com objetos complexos em algumas situações.
9
- *
10
- * @param a - Primeiro valor a ser comparado
11
- * @param b - Segundo valor a ser comparado
12
- * @returns true se os valores são profundamente iguais, false caso contrário
13
- *
14
- * @example
15
- * ```typescript
16
- * const set1 = new Set([{id: 1}, {id: 2}]);
17
- * const set2 = new Set([{id: 1}, {id: 2}]);
18
- * deepCompareWithSets(set1, set2); // true
19
- *
20
- * deepCompareWithSets([1, 2, 3], [1, 2, 3]); // true
21
- * deepCompareWithSets({a: 1}, {a: 1}); // true
22
- * ```
23
- */
24
3
  declare const deepCompareWithSets: (a: unknown, b: unknown) => boolean;
25
4
 
26
5
  export { deepCompareWithSets };
package/dist/utils/dnd.js CHANGED
@@ -1,11 +1,11 @@
1
- export { x as CSS, r as add, b as canUseDOM, y as findFirstFocusableNode, w as getEventCoordinates, i as getOwnerDocument, e as getWindow, t as hasViewportRelativeCoordinates, f as isDocument, g as isHTMLElement, u as isKeyboardEvent, d as isNode, h as isSVGElement, v as isTouchEvent, c as isWindow, s as subtract, a as useCombinedRefs, k as useEvent, l as useInterval, j as useIsomorphicLayoutEffect, m as useLatestValue, n as useLazyMemo, o as useNodeRef, p as usePrevious, q as useUniqueId } from '../chunk-33C6UWPV.js';
2
- import i, { useState, useCallback } from 'react';
1
+ export * from '@dnd-kit/accessibility';
3
2
  export * from '@dnd-kit/core';
4
3
  export * from '@dnd-kit/modifiers';
5
4
  export * from '@dnd-kit/sortable';
5
+ export * from '@dnd-kit/utilities';
6
6
 
7
- var c={display:"none"};function q(e){let{id:n,value:t}=e;return i.createElement("div",{id:n,style:c},t)}function z(e){let{id:n,announcement:t,ariaLiveType:r="assertive"}=e,o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return i.createElement("div",{id:n,style:o,role:"status","aria-live":r,"aria-atomic":!0},t)}function B(){let[e,n]=useState("");return {announce:useCallback(r=>{r!=null&&n(r);},[]),announcement:e}}var u=(e,n)=>{if(e?.data?.current)return e.data.current[n]},G=e=>u(e,"index")||0;
7
+ var t=(e,r)=>{if(e?.data?.current)return e.data.current[r]},n=e=>t(e,"index")||0;
8
8
 
9
- export { q as HiddenText, z as LiveRegion, u as getData, G as getIndex, B as useAnnouncement };
9
+ export { t as getData, n as getIndex };
10
10
  //# sourceMappingURL=out.js.map
11
11
  //# sourceMappingURL=dnd.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../node_modules/@dnd-kit/accessibility/src/components/HiddenText/HiddenText.tsx","../../node_modules/@dnd-kit/accessibility/src/components/LiveRegion/LiveRegion.tsx","../../node_modules/@dnd-kit/accessibility/src/hooks/useAnnouncement.ts","../../src/utils/dnd.ts"],"names":["hiddenStyles","display","HiddenText","id","value","React","style","LiveRegion","announcement","ariaLiveType","visuallyHidden","position","top","left","width","height","margin","border","padding","overflow","clip","clipPath","whiteSpace","role","useAnnouncement","setAnnouncement","useState","announce","useCallback","getData","data","propName","getIndex"],"mappings":"sQAOA,IAAMA,EAAoC,CACxCC,QAAS,MAD+B,WAI1BC,EAAAA,EAAAA,IAAW,CAACC,GAAAA,EAAIC,MAAAA,KAC9B,OACEC,EAAAA,cAAA,MAAA,CAAKF,GAAIA,EAAIG,MAAON,GACjBI,CADH,CAIH,UCTeG,EAAAA,EAAAA,IAAW,CAACJ,GAAAA,EAAIK,aAAAA,EAAcC,aAAAA,EAAe,eAErDC,EAAsC,CAC1CC,SAAU,QACVC,IAAK,EACLC,KAAM,EACNC,MAAO,EACPC,OAAQ,EACRC,OAAQ,GACRC,OAAQ,EACRC,QAAS,EACTC,SAAU,SACVC,KAAM,gBACNC,SAAU,cACVC,WAAY,UAGd,OACEjB,EAAAA,cAAA,MAAA,CACEF,GAAIA,EACJG,MAAOI,EACPa,KAAK,qBACMd,oBAGVD,CAPH,CAUH,UClCegB,GAAAA,CACd,GAAM,CAAChB,EAAciB,CAAf,EAAkCC,EAAS,EAAD,EAOhD,MAAO,CAACC,SANSC,EAAaxB,GAAD,CACvBA,GAAS,MACXqB,EAAgBrB,CAAD,GAEhB,CAAA,CAJyB,EAMVI,aAAAA,EACnB,CCRD,WAAc,gBACd,WAAc,qBACd,WAAc,oBAGP,IAAMqB,EAAU,CACrBC,EACAC,IACkB,CAClB,GAAKD,GAAM,MAAM,QAEjB,OAAOA,EAAK,KAAK,QAAQC,CAAQ,CACnC,EAEaC,EAAYF,GAChBD,EAAgBC,EAAM,OAAO,GAAK","sourcesContent":["import React from 'react';\n\ninterface Props {\n id: string;\n value: string;\n}\n\nconst hiddenStyles: React.CSSProperties = {\n display: 'none',\n};\n\nexport function HiddenText({id, value}: Props) {\n return (\n <div id={id} style={hiddenStyles}>\n {value}\n </div>\n );\n}\n","import React from 'react';\n\nexport interface Props {\n id: string;\n announcement: string;\n ariaLiveType?: \"polite\" | \"assertive\" | \"off\";\n}\n\nexport function LiveRegion({id, announcement, ariaLiveType = \"assertive\"}: Props) {\n // Hide element visually but keep it readable by screen readers\n const visuallyHidden: React.CSSProperties = {\n position: 'fixed',\n top: 0,\n left: 0,\n width: 1,\n height: 1,\n margin: -1,\n border: 0,\n padding: 0,\n overflow: 'hidden',\n clip: 'rect(0 0 0 0)',\n clipPath: 'inset(100%)',\n whiteSpace: 'nowrap',\n };\n \n return (\n <div\n id={id}\n style={visuallyHidden}\n role=\"status\"\n aria-live={ariaLiveType}\n aria-atomic\n >\n {announcement}\n </div>\n );\n}\n","import {useCallback, useState} from 'react';\n\nexport function useAnnouncement() {\n const [announcement, setAnnouncement] = useState('');\n const announce = useCallback((value: string | undefined) => {\n if (value != null) {\n setAnnouncement(value);\n }\n }, []);\n\n return {announce, announcement} as const;\n}\n","import { Active, Over } from '@dnd-kit/core';\n\nexport * from '@dnd-kit/accessibility';\nexport * from '@dnd-kit/core';\nexport * from '@dnd-kit/modifiers';\nexport * from '@dnd-kit/sortable';\nexport * from '@dnd-kit/utilities';\n\nexport const getData = <T>(\n data: Active | Over | undefined,\n propName: string,\n): T | undefined => {\n if (!data?.data?.current) return undefined;\n\n return data.data.current[propName];\n};\n\nexport const getIndex = (data: Active | Over | undefined) => {\n return getData<number>(data, 'index') || 0;\n};\n"]}
1
+ {"version":3,"sources":["../../src/utils/dnd.ts"],"names":["getData","data","propName","getIndex"],"mappings":"AAEA,WAAc,yBACd,WAAc,gBACd,WAAc,qBACd,WAAc,oBACd,WAAc,qBAEP,IAAMA,EAAU,CACrBC,EACAC,IACkB,CAClB,GAAKD,GAAM,MAAM,QAEjB,OAAOA,EAAK,KAAK,QAAQC,CAAQ,CACnC,EAEaC,EAAYF,GAChBD,EAAgBC,EAAM,OAAO,GAAK","sourcesContent":["import { Active, Over } from '@dnd-kit/core';\n\nexport * from '@dnd-kit/accessibility';\nexport * from '@dnd-kit/core';\nexport * from '@dnd-kit/modifiers';\nexport * from '@dnd-kit/sortable';\nexport * from '@dnd-kit/utilities';\n\nexport const getData = <T>(\n data: Active | Over | undefined,\n propName: string,\n): T | undefined => {\n if (!data?.data?.current) return undefined;\n\n return data.data.current[propName];\n};\n\nexport const getIndex = (data: Active | Over | undefined) => {\n return getData<number>(data, 'index') || 0;\n};\n"]}
@@ -1,76 +1,6 @@
1
1
  import * as lodash from 'lodash';
2
2
 
3
- /**
4
- * Executa imediatamente uma função e retorna seu resultado.
5
- *
6
- * Esta função utilitária é usada para avaliar expressões de forma "eager" (ansiosa),
7
- * executando a função fornecida imediatamente e retornando seu valor. É útil em
8
- * situações onde você quer forçar a execução imediata de uma função que poderia
9
- * ser avaliada de forma lazy (preguiçosa).
10
- *
11
- * @template T - O tipo do valor retornado pela função
12
- * @param fn - A função a ser executada imediatamente
13
- * @returns O resultado da execução da função
14
- *
15
- * @example
16
- * ```typescript
17
- * // Execução imediata de uma computação
18
- * const result = eager(() => {
19
- * console.log('Executando agora!');
20
- * return 42;
21
- * }); // result = 42, e o console.log é executado imediatamente
22
- *
23
- * // Útil para inicialização de valores
24
- * const config = eager(() => ({
25
- * apiUrl: process.env.API_URL || 'http://localhost:3000',
26
- * timeout: 5000
27
- * }));
28
- *
29
- * // Forçar execução de side effects
30
- * eager(() => {
31
- * localStorage.setItem('initialized', 'true');
32
- * return null;
33
- * });
34
- * ```
35
- */
36
3
  declare const eager: <T>(fn: () => T) => T;
37
- /**
38
- * Adia a execução de uma função para o próximo ciclo do event loop.
39
- *
40
- * Esta função utiliza setTimeout com delay 0 para agendar a execução da função
41
- * fornecida para o próximo tick do event loop. É útil para quebrar operações
42
- * síncronas longas ou para garantir que o DOM seja atualizado antes da execução.
43
- *
44
- * @template T - O tipo do valor retornado pela função
45
- * @param fn - A função a ser executada de forma adiada
46
- * @returns Uma Promise que resolve com o resultado da função
47
- *
48
- * @example
49
- * ```typescript
50
- * // Adiar execução para permitir atualização do DOM
51
- * const updateUI = async () => {
52
- * setLoading(true);
53
- *
54
- * const result = await defer(() => {
55
- * return processLargeDataset(data);
56
- * });
57
- *
58
- * setLoading(false);
59
- * return result;
60
- * };
61
- *
62
- * // Quebrar operação síncrona longa
63
- * const processInChunks = async (items: any[]) => {
64
- * for (let i = 0; i < items.length; i += 100) {
65
- * const chunk = items.slice(i, i + 100);
66
- * processChunk(chunk);
67
- *
68
- * // Permite que outras tarefas sejam executadas
69
- * await defer(() => {});
70
- * }
71
- * };
72
- * ```
73
- */
74
4
  declare const defer: <T>(fn: () => T) => Promise<T>;
75
5
  declare const debounce: {
76
6
  <T extends (...args: any) => any>(func: T, wait: number | undefined, options: lodash.DebounceSettingsLeading): lodash.DebouncedFuncLeading<T>;
@@ -1,9 +1,3 @@
1
- /**
2
- * Define uma propriedade aninhada em um objeto usando notação de ponto
3
- * @param obj - O objeto onde definir a propriedade
4
- * @param path - O caminho da propriedade usando notação de ponto (ex: 'a.b.c')
5
- * @param value - O valor a ser definido
6
- */
7
1
  declare const setNestedProperty: (obj: Record<string, unknown>, path: string, value: unknown) => void;
8
2
 
9
3
  export { setNestedProperty };
@@ -1,9 +1,3 @@
1
- /**
2
- * Implementa o algoritmo de Luhn para validação de números de cartão de crédito.
3
- * Retorna true se o número for válido ou uma mensagem de erro caso contrário.
4
- *
5
- * @param cardNumber Número do cartão (com ou sem espaços)
6
- */
7
1
  declare const validateCardNumber: (cardNumber: string) => boolean | string;
8
2
  declare const validateExpirationDate: (value: string) => true | "Mês inválido" | "Cartão expirado";
9
3
 
@@ -1,10 +1,3 @@
1
- /**
2
- * Abre uma janela popup centralizada, ajustando para múltiplos monitores e zoom.
3
- * @param {string} url URL que será carregada na popup
4
- * @param {number} desiredWidth Largura desejada da popup (px)
5
- * @param {number} desiredHeight Altura desejada da popup (px)
6
- * @returns {Window|null} Referência à janela criada, ou null se bloqueada
7
- */
8
1
  declare const openCenteredPopup: (url: string, desiredWidth?: number, desiredHeight?: number) => Window | null;
9
2
 
10
3
  export { openCenteredPopup };
@@ -1,8 +1,3 @@
1
- /**
2
- * Extrai as iniciais de um nome ou texto
3
- * @param name - Nome ou texto para extrair as iniciais
4
- * @returns String com as iniciais (máximo 2 caracteres)
5
- */
6
1
  declare const getInitials: (name: string) => string;
7
2
 
8
3
  export { getInitials };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zydon/common",
3
- "version": "2.7.63",
3
+ "version": "2.7.65",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "./dist/index.js",
@@ -104,6 +104,7 @@
104
104
  "@types/color": "^3.0.6",
105
105
  "@types/invariant": "^2.2.37",
106
106
  "@types/jest": "^30.0.0",
107
+ "@types/jest-axe": "^3.5.9",
107
108
  "@types/lodash": "^4.17.20",
108
109
  "@types/node": "^20.0.0",
109
110
  "@types/react": "^18.3.4",
@@ -116,6 +117,7 @@
116
117
  "autoprefixer": "^10.4.20",
117
118
  "eslint": "^8.47.0",
118
119
  "eslint-config-prettier": "^9.0.0",
120
+ "eslint-plugin-jsx-a11y": "^6.10.2",
119
121
  "eslint-plugin-prettier": "^5.0.0",
120
122
  "eslint-plugin-react": "^7.33.2",
121
123
  "eslint-plugin-react-hooks": "^4.6.0",
@@ -123,6 +125,7 @@
123
125
  "eslint-plugin-simple-import-sort": "^12.1.1",
124
126
  "identity-obj-proxy": "^3.0.0",
125
127
  "jest": "^29.7.0",
128
+ "jest-axe": "^10.0.0",
126
129
  "jest-environment-jsdom": "^29.7.0",
127
130
  "jest-junit": "^16.0.0",
128
131
  "jest-util": "^30.0.5",
@@ -138,9 +141,11 @@
138
141
  "vite": "^6.0.7"
139
142
  },
140
143
  "dependencies": {
144
+ "@dnd-kit/accessibility": "^3.1.1",
141
145
  "@dnd-kit/core": "^6.3.1",
142
146
  "@dnd-kit/modifiers": "^9.0.0",
143
147
  "@dnd-kit/sortable": "^10.0.0",
148
+ "@dnd-kit/utilities": "^3.2.2",
144
149
  "browser-image-compression": "^2.0.2",
145
150
  "card-validator": "^10.0.3",
146
151
  "color": "^4.2.3",
@@ -1,7 +0,0 @@
1
- import { useMemo, useLayoutEffect, useEffect, useRef, useCallback } from 'react';
2
-
3
- function Y(){for(var n=arguments.length,t=new Array(n),e=0;e<n;e++)t[e]=arguments[e];return useMemo(()=>u=>{t.forEach(r=>r(u));},t)}var D=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function a(n){let t=Object.prototype.toString.call(n);return t==="[object Window]"||t==="[object global]"}function b(n){return "nodeType"in n}function c(n){var t,e;return n?a(n)?n:b(n)&&(t=(e=n.ownerDocument)==null?void 0:e.defaultView)!=null?t:window:window}function j(n){let{Document:t}=c(n);return n instanceof t}function C(n){return a(n)?!1:n instanceof c(n).HTMLElement}function L(n){return n instanceof c(n).SVGElement}function x(n){return n?a(n)?n.document:b(n)?j(n)?n:C(n)||L(n)?n.ownerDocument:document:document:document}var E=D?useLayoutEffect:useEffect;function M(n){let t=useRef(n);return E(()=>{t.current=n;}),useCallback(function(){for(var e=arguments.length,u=new Array(e),r=0;r<e;r++)u[r]=arguments[r];return t.current==null?void 0:t.current(...u)},[])}function A(){let n=useRef(null),t=useCallback((u,r)=>{n.current=setInterval(u,r);},[]),e=useCallback(()=>{n.current!==null&&(clearInterval(n.current),n.current=null);},[]);return [t,e]}function I(n,t){t===void 0&&(t=[n]);let e=useRef(n);return E(()=>{e.current!==n&&(e.current=n);},t),e}function v(n,t){let e=useRef();return useMemo(()=>{let u=n(e.current);return e.current=u,u},[...t])}function N(n){let t=M(n),e=useRef(null),u=useCallback(r=>{r!==e.current&&t?.(r,e.current),e.current=r;},[]);return [e,u]}function F(n){let t=useRef();return useEffect(()=>{t.current=n;},[n]),t.current}var f={};function H(n,t){return useMemo(()=>{if(t)return t;let e=f[n]==null?0:f[n]+1;return f[n]=e,n+"-"+e},[n,t])}function S(n){return function(t){for(var e=arguments.length,u=new Array(e>1?e-1:0),r=1;r<e;r++)u[r-1]=arguments[r];return u.reduce((s,T)=>{let y=Object.entries(T);for(let[d,p]of y){let m=s[d];m!=null&&(s[d]=m+n*p);}return s},{...t})}}var W=S(1),q=S(-1);function O(n){return "clientX"in n&&"clientY"in n}function z(n){if(!n)return !1;let{KeyboardEvent:t}=c(n.target);return t&&n instanceof t}function V(n){if(!n)return !1;let{TouchEvent:t}=c(n.target);return t&&n instanceof t}function G(n){if(V(n)){if(n.touches&&n.touches.length){let{clientX:t,clientY:e}=n.touches[0];return {x:t,y:e}}else if(n.changedTouches&&n.changedTouches.length){let{clientX:t,clientY:e}=n.changedTouches[0];return {x:t,y:e}}}return O(n)?{x:n.clientX,y:n.clientY}:null}var w=Object.freeze({Translate:{toString(n){if(!n)return;let{x:t,y:e}=n;return "translate3d("+(t?Math.round(t):0)+"px, "+(e?Math.round(e):0)+"px, 0)"}},Scale:{toString(n){if(!n)return;let{scaleX:t,scaleY:e}=n;return "scaleX("+t+") scaleY("+e+")"}},Transform:{toString(n){if(n)return [w.Translate.toString(n),w.Scale.toString(n)].join(" ")}},Transition:{toString(n){let{property:t,duration:e,easing:u}=n;return t+" "+e+"ms "+u}}}),h="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function K(n){return n.matches(h)?n:n.querySelector(h)}
4
-
5
- export { Y as a, D as b, a as c, b as d, c as e, j as f, C as g, L as h, x as i, E as j, M as k, A as l, I as m, v as n, N as o, F as p, H as q, W as r, q as s, O as t, z as u, V as v, G as w, w as x, K as y };
6
- //# sourceMappingURL=out.js.map
7
- //# sourceMappingURL=chunk-33C6UWPV.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../node_modules/@dnd-kit/utilities/src/hooks/useCombinedRefs.ts","../node_modules/@dnd-kit/utilities/src/execution-context/canUseDOM.ts","../node_modules/@dnd-kit/utilities/src/type-guards/isWindow.ts","../node_modules/@dnd-kit/utilities/src/type-guards/isNode.ts","../node_modules/@dnd-kit/utilities/src/execution-context/getWindow.ts","../node_modules/@dnd-kit/utilities/src/type-guards/isDocument.ts","../node_modules/@dnd-kit/utilities/src/type-guards/isHTMLElement.ts","../node_modules/@dnd-kit/utilities/src/type-guards/isSVGElement.ts","../node_modules/@dnd-kit/utilities/src/execution-context/getOwnerDocument.ts","../node_modules/@dnd-kit/utilities/src/hooks/useIsomorphicLayoutEffect.ts","../node_modules/@dnd-kit/utilities/src/hooks/useEvent.ts","../node_modules/@dnd-kit/utilities/src/hooks/useInterval.ts","../node_modules/@dnd-kit/utilities/src/hooks/useLatestValue.ts","../node_modules/@dnd-kit/utilities/src/hooks/useLazyMemo.ts","../node_modules/@dnd-kit/utilities/src/hooks/useNodeRef.ts","../node_modules/@dnd-kit/utilities/src/hooks/usePrevious.ts","../node_modules/@dnd-kit/utilities/src/hooks/useUniqueId.ts","../node_modules/@dnd-kit/utilities/src/adjustment.ts","../node_modules/@dnd-kit/utilities/src/event/hasViewportRelativeCoordinates.ts","../node_modules/@dnd-kit/utilities/src/event/isKeyboardEvent.ts","../node_modules/@dnd-kit/utilities/src/event/isTouchEvent.ts","../node_modules/@dnd-kit/utilities/src/coordinates/getEventCoordinates.ts","../node_modules/@dnd-kit/utilities/src/css.ts","../node_modules/@dnd-kit/utilities/src/focus/findFirstFocusableNode.ts"],"names":["useCombinedRefs","refs","useMemo","node","forEach","ref","canUseDOM","window","document","createElement","isWindow","element","elementString","Object","prototype","toString","call","isNode","getWindow","target","_target$ownerDocument","_target$ownerDocument2","ownerDocument","defaultView","isDocument","Document","isHTMLElement","HTMLElement","isSVGElement","SVGElement","getOwnerDocument","useIsomorphicLayoutEffect","useLayoutEffect","useEffect","useEvent","handler","handlerRef","useRef","current","useCallback","args","useInterval","intervalRef","set","listener","duration","setInterval","clear","clearInterval","useLatestValue","value","dependencies","valueRef","useLazyMemo","callback","newValue","useNodeRef","onChange","onChangeHandler","setNodeRef","usePrevious","ids","useUniqueId","prefix","id","createAdjustmentFn","modifier","object","adjustments","reduce","accumulator","adjustment","entries","key","valueAdjustment","add","subtract","hasViewportRelativeCoordinates","event","isKeyboardEvent","KeyboardEvent","isTouchEvent","TouchEvent","getEventCoordinates","touches","length","clientX","x","clientY","y","changedTouches","CSS","freeze","Translate","transform","Math","round","Scale","scaleX","scaleY","Transform","join","Transition","_ref","property","easing","SELECTOR","findFirstFocusableNode","matches","querySelector"],"mappings":"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","sourcesContent":["import {useMemo} from 'react';\n\nexport function useCombinedRefs<T>(\n ...refs: ((node: T) => void)[]\n): (node: T) => void {\n return useMemo(\n () => (node: T) => {\n refs.forEach((ref) => ref(node));\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n refs\n );\n}\n","// https://github.com/facebook/react/blob/master/packages/shared/ExecutionEnvironment.js\nexport const canUseDOM =\n typeof window !== 'undefined' &&\n typeof window.document !== 'undefined' &&\n typeof window.document.createElement !== 'undefined';\n","export function isWindow(element: Object): element is typeof window {\n const elementString = Object.prototype.toString.call(element);\n return (\n elementString === '[object Window]' ||\n // In Electron context the Window object serializes to [object global]\n elementString === '[object global]'\n );\n}\n","export function isNode(node: Object): node is Node {\n return 'nodeType' in node;\n}\n","import {isWindow} from '../type-guards/isWindow';\nimport {isNode} from '../type-guards/isNode';\n\nexport function getWindow(target: Event['target']): typeof window {\n if (!target) {\n return window;\n }\n\n if (isWindow(target)) {\n return target;\n }\n\n if (!isNode(target)) {\n return window;\n }\n\n return target.ownerDocument?.defaultView ?? window;\n}\n","import {getWindow} from '../execution-context/getWindow';\n\nexport function isDocument(node: Node): node is Document {\n const {Document} = getWindow(node);\n\n return node instanceof Document;\n}\n","import {getWindow} from '../execution-context/getWindow';\n\nimport {isWindow} from './isWindow';\n\nexport function isHTMLElement(node: Node | Window): node is HTMLElement {\n if (isWindow(node)) {\n return false;\n }\n\n return node instanceof getWindow(node).HTMLElement;\n}\n","import {getWindow} from '../execution-context/getWindow';\n\nexport function isSVGElement(node: Node): node is SVGElement {\n return node instanceof getWindow(node).SVGElement;\n}\n","import {\n isWindow,\n isHTMLElement,\n isDocument,\n isNode,\n isSVGElement,\n} from '../type-guards';\n\nexport function getOwnerDocument(target: Event['target']): Document {\n if (!target) {\n return document;\n }\n\n if (isWindow(target)) {\n return target.document;\n }\n\n if (!isNode(target)) {\n return document;\n }\n\n if (isDocument(target)) {\n return target;\n }\n\n if (isHTMLElement(target) || isSVGElement(target)) {\n return target.ownerDocument;\n }\n\n return document;\n}\n","import {useEffect, useLayoutEffect} from 'react';\n\nimport {canUseDOM} from '../execution-context';\n\n/**\n * A hook that resolves to useEffect on the server and useLayoutEffect on the client\n * @param callback {function} Callback function that is invoked when the dependencies of the hook change\n */\nexport const useIsomorphicLayoutEffect = canUseDOM\n ? useLayoutEffect\n : useEffect;\n","import {useCallback, useRef} from 'react';\n\nimport {useIsomorphicLayoutEffect} from './useIsomorphicLayoutEffect';\n\nexport function useEvent<T extends Function>(handler: T | undefined) {\n const handlerRef = useRef<T | undefined>(handler);\n\n useIsomorphicLayoutEffect(() => {\n handlerRef.current = handler;\n });\n\n return useCallback(function (...args: any) {\n return handlerRef.current?.(...args);\n }, []);\n}\n","import {useCallback, useRef} from 'react';\n\nexport function useInterval() {\n const intervalRef = useRef<number | null>(null);\n\n const set = useCallback((listener: Function, duration: number) => {\n intervalRef.current = setInterval(listener, duration);\n }, []);\n\n const clear = useCallback(() => {\n if (intervalRef.current !== null) {\n clearInterval(intervalRef.current);\n intervalRef.current = null;\n }\n }, []);\n\n return [set, clear] as const;\n}\n","import {useRef} from 'react';\nimport type {DependencyList} from 'react';\n\nimport {useIsomorphicLayoutEffect} from './useIsomorphicLayoutEffect';\n\nexport function useLatestValue<T extends any>(\n value: T,\n dependencies: DependencyList = [value]\n) {\n const valueRef = useRef<T>(value);\n\n useIsomorphicLayoutEffect(() => {\n if (valueRef.current !== value) {\n valueRef.current = value;\n }\n }, dependencies);\n\n return valueRef;\n}\n","import {useMemo, useRef} from 'react';\n\nexport function useLazyMemo<T>(\n callback: (prevValue: T | undefined) => T,\n dependencies: any[]\n) {\n const valueRef = useRef<T>();\n\n return useMemo(\n () => {\n const newValue = callback(valueRef.current);\n valueRef.current = newValue;\n\n return newValue;\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [...dependencies]\n );\n}\n","import {useRef, useCallback} from 'react';\n\nimport {useEvent} from './useEvent';\n\nexport function useNodeRef(\n onChange?: (\n newElement: HTMLElement | null,\n previousElement: HTMLElement | null\n ) => void\n) {\n const onChangeHandler = useEvent(onChange);\n const node = useRef<HTMLElement | null>(null);\n const setNodeRef = useCallback(\n (element: HTMLElement | null) => {\n if (element !== node.current) {\n onChangeHandler?.(element, node.current);\n }\n\n node.current = element;\n },\n //eslint-disable-next-line\n []\n );\n\n return [node, setNodeRef] as const;\n}\n","import {useRef, useEffect} from 'react';\n\nexport function usePrevious<T>(value: T) {\n const ref = useRef<T>();\n\n useEffect(() => {\n ref.current = value;\n }, [value]);\n\n return ref.current;\n}\n","import {useMemo} from 'react';\n\nlet ids: Record<string, number> = {};\n\nexport function useUniqueId(prefix: string, value?: string) {\n return useMemo(() => {\n if (value) {\n return value;\n }\n\n const id = ids[prefix] == null ? 0 : ids[prefix] + 1;\n ids[prefix] = id;\n\n return `${prefix}-${id}`;\n }, [prefix, value]);\n}\n","function createAdjustmentFn(modifier: number) {\n return <T extends Record<U, number>, U extends string>(\n object: T,\n ...adjustments: Partial<T>[]\n ): T => {\n return adjustments.reduce<T>(\n (accumulator, adjustment) => {\n const entries = Object.entries(adjustment) as [U, number][];\n\n for (const [key, valueAdjustment] of entries) {\n const value = accumulator[key];\n\n if (value != null) {\n accumulator[key] = (value + modifier * valueAdjustment) as T[U];\n }\n }\n\n return accumulator;\n },\n {\n ...object,\n }\n );\n };\n}\n\nexport const add = createAdjustmentFn(1);\nexport const subtract = createAdjustmentFn(-1);\n","export function hasViewportRelativeCoordinates(\n event: Event\n): event is Event & Pick<PointerEvent, 'clientX' | 'clientY'> {\n return 'clientX' in event && 'clientY' in event;\n}\n","import {getWindow} from '../execution-context';\n\nexport function isKeyboardEvent(\n event: Event | undefined | null\n): event is KeyboardEvent {\n if (!event) {\n return false;\n }\n\n const {KeyboardEvent} = getWindow(event.target);\n\n return KeyboardEvent && event instanceof KeyboardEvent;\n}\n","import {getWindow} from '../execution-context';\n\nexport function isTouchEvent(\n event: Event | undefined | null\n): event is TouchEvent {\n if (!event) {\n return false;\n }\n\n const {TouchEvent} = getWindow(event.target);\n\n return TouchEvent && event instanceof TouchEvent;\n}\n","import type {Coordinates} from './types';\nimport {isTouchEvent, hasViewportRelativeCoordinates} from '../event';\n\n/**\n * Returns the normalized x and y coordinates for mouse and touch events.\n */\nexport function getEventCoordinates(event: Event): Coordinates | null {\n if (isTouchEvent(event)) {\n if (event.touches && event.touches.length) {\n const {clientX: x, clientY: y} = event.touches[0];\n\n return {\n x,\n y,\n };\n } else if (event.changedTouches && event.changedTouches.length) {\n const {clientX: x, clientY: y} = event.changedTouches[0];\n\n return {\n x,\n y,\n };\n }\n }\n\n if (hasViewportRelativeCoordinates(event)) {\n return {\n x: event.clientX,\n y: event.clientY,\n };\n }\n\n return null;\n}\n","export type Transform = {\n x: number;\n y: number;\n scaleX: number;\n scaleY: number;\n};\n\nexport interface Transition {\n property: string;\n easing: string;\n duration: number;\n}\n\nexport const CSS = Object.freeze({\n Translate: {\n toString(transform: Transform | null) {\n if (!transform) {\n return;\n }\n\n const {x, y} = transform;\n\n return `translate3d(${x ? Math.round(x) : 0}px, ${\n y ? Math.round(y) : 0\n }px, 0)`;\n },\n },\n Scale: {\n toString(transform: Transform | null) {\n if (!transform) {\n return;\n }\n\n const {scaleX, scaleY} = transform;\n\n return `scaleX(${scaleX}) scaleY(${scaleY})`;\n },\n },\n Transform: {\n toString(transform: Transform | null) {\n if (!transform) {\n return;\n }\n\n return [\n CSS.Translate.toString(transform),\n CSS.Scale.toString(transform),\n ].join(' ');\n },\n },\n Transition: {\n toString({property, duration, easing}: Transition) {\n return `${property} ${duration}ms ${easing}`;\n },\n },\n});\n","const SELECTOR =\n 'a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]';\n\nexport function findFirstFocusableNode(\n element: HTMLElement\n): HTMLElement | null {\n if (element.matches(SELECTOR)) {\n return element;\n }\n\n return element.querySelector(SELECTOR);\n}\n"]}