@e1011/es-kit 1.1.46 → 1.1.48

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 (46) hide show
  1. package/dist/hooks/esm/index.css +191 -191
  2. package/dist/hooks/index.css +191 -191
  3. package/dist/lib/cjs/src/core/ui/components/icon/IconBase.js +1 -1
  4. package/dist/lib/cjs/src/core/ui/components/icon/IconBase.js.map +1 -1
  5. package/dist/lib/cjs/src/core/utils/appState/peregrineMQ/index.js +1 -1
  6. package/dist/lib/cjs/src/core/utils/appState/peregrineMQ/index.js.map +1 -1
  7. package/dist/lib/cjs/src/core/utils/appState/peregrineMQ/usePeregrineMQ.react.js +1 -1
  8. package/dist/lib/cjs/src/core/utils/appState/peregrineMQ/usePeregrineMQ.react.js.map +1 -1
  9. package/dist/lib/cjs/src/core/utils/appState/store/store.vanillajs.js +1 -1
  10. package/dist/lib/cjs/src/core/utils/appState/store/store.vanillajs.js.map +1 -1
  11. package/dist/lib/esm/src/core/ui/components/icon/IconBase.js +1 -1
  12. package/dist/lib/esm/src/core/ui/components/icon/IconBase.js.map +1 -1
  13. package/dist/lib/esm/src/core/utils/appState/peregrineMQ/index.js +1 -1
  14. package/dist/lib/esm/src/core/utils/appState/peregrineMQ/index.js.map +1 -1
  15. package/dist/lib/esm/src/core/utils/appState/peregrineMQ/usePeregrineMQ.react.js +1 -1
  16. package/dist/lib/esm/src/core/utils/appState/peregrineMQ/usePeregrineMQ.react.js.map +1 -1
  17. package/dist/lib/esm/src/core/utils/appState/store/store.vanillajs.js +1 -1
  18. package/dist/lib/esm/src/core/utils/appState/store/store.vanillajs.js.map +1 -1
  19. package/dist/lib/tsconfig.tsbuildinfo +1 -1
  20. package/dist/types/src/core/ui/components/icon/IconBase.d.ts +2 -1
  21. package/dist/types/src/core/ui/components/icon/IconBase.d.ts.map +1 -1
  22. package/dist/types/src/core/utils/appState/peregrineMQ/index.d.ts +0 -1
  23. package/dist/types/src/core/utils/appState/peregrineMQ/index.d.ts.map +1 -1
  24. package/dist/types/src/core/utils/appState/peregrineMQ/usePeregrineMQ.react.d.ts +1 -3
  25. package/dist/types/src/core/utils/appState/peregrineMQ/usePeregrineMQ.react.d.ts.map +1 -1
  26. package/dist/types/src/core/utils/appState/store/store.stories.d.ts.map +1 -1
  27. package/dist/types/src/core/utils/appState/store/store.vanillajs.d.ts.map +1 -1
  28. package/dist/ui/esm/src/core/ui/components/icon/IconBase.js +1 -1
  29. package/dist/ui/esm/src/core/ui/components/icon/IconBase.js.map +1 -1
  30. package/dist/ui/src/core/ui/components/icon/IconBase.js +1 -1
  31. package/dist/ui/src/core/ui/components/icon/IconBase.js.map +1 -1
  32. package/dist/utils/esm/index.css +191 -191
  33. package/dist/utils/esm/src/core/utils/appState/peregrineMQ/index.js +1 -1
  34. package/dist/utils/esm/src/core/utils/appState/peregrineMQ/index.js.map +1 -1
  35. package/dist/utils/esm/src/core/utils/appState/peregrineMQ/usePeregrineMQ.react.js +1 -1
  36. package/dist/utils/esm/src/core/utils/appState/peregrineMQ/usePeregrineMQ.react.js.map +1 -1
  37. package/dist/utils/esm/src/core/utils/appState/store/store.vanillajs.js +1 -1
  38. package/dist/utils/esm/src/core/utils/appState/store/store.vanillajs.js.map +1 -1
  39. package/dist/utils/index.css +191 -191
  40. package/dist/utils/src/core/utils/appState/peregrineMQ/index.js +1 -1
  41. package/dist/utils/src/core/utils/appState/peregrineMQ/index.js.map +1 -1
  42. package/dist/utils/src/core/utils/appState/peregrineMQ/usePeregrineMQ.react.js +1 -1
  43. package/dist/utils/src/core/utils/appState/peregrineMQ/usePeregrineMQ.react.js.map +1 -1
  44. package/dist/utils/src/core/utils/appState/store/store.vanillajs.js +1 -1
  45. package/dist/utils/src/core/utils/appState/store/store.vanillajs.js.map +1 -1
  46. package/package.json +2 -1
@@ -1,11 +1,32 @@
1
- .errorBoundary-module_errorBoundary__gk9ps {
2
- background: #EFEFEF;
3
- width: 100%;
4
- height: 100%;
1
+ .icon-module_icon-base-parent__nOMvW {
2
+ line-height: 1px !important;
5
3
  }
6
4
 
7
- .errorBoundary-module_StyledIcon__IYHiU {
8
- margin-right: 10px;
5
+ .icon-module_icon-base__S0tHf {
6
+ min-width: var(--min-width);
7
+ min-height: var(--min-height);
8
+ width: var(--width) !important;
9
+ height: var(--height) !important;
10
+ line-height: 1px !important;
11
+ background-color: var(--icon-color);
12
+ color: var(--icon-content-color);
13
+ background-repeat: no-repeat;
14
+ mask-image: var(--icon-url);
15
+ -webkit-mask-image: var(--icon-url);
16
+ mask-repeat: no-repeat;
17
+ -webkit-mask-repeat: no-repeat;
18
+ mask-size: contain;
19
+ -webkit-mask-size: contain;
20
+ mask-position: center;
21
+ -webkit-mask-position: center;
22
+ display: inline-block;
23
+ will-change: transform;
24
+ transform: translate3d(0, 0, 0);
25
+ }
26
+ .icon-module_icon-base__S0tHf svg {
27
+ fill: var(--icon-content-color);
28
+ width: var(--height);
29
+ height: var(--width);
9
30
  }
10
31
  .CollapsibleContainer-module_collapsible-container__u0Jmm {
11
32
  transform-origin: 0% 0%;
@@ -40,55 +61,6 @@
40
61
  max-width: var(--prop-value);
41
62
  opacity: 1;
42
63
  }
43
- .icon-module_icon-base-parent__nOMvW {
44
- line-height: 1px !important;
45
- }
46
-
47
- .icon-module_icon-base__S0tHf {
48
- min-width: var(--min-width);
49
- min-height: var(--min-height);
50
- width: var(--width) !important;
51
- height: var(--height) !important;
52
- line-height: 1px !important;
53
- background-color: var(--icon-color);
54
- color: var(--icon-content-color);
55
- background-repeat: no-repeat;
56
- mask-image: var(--icon-url);
57
- -webkit-mask-image: var(--icon-url);
58
- mask-repeat: no-repeat;
59
- -webkit-mask-repeat: no-repeat;
60
- mask-size: contain;
61
- -webkit-mask-size: contain;
62
- mask-position: center;
63
- -webkit-mask-position: center;
64
- display: inline-block;
65
- will-change: transform;
66
- transform: translate3d(0, 0, 0);
67
- }
68
- .icon-module_icon-base__S0tHf svg {
69
- fill: var(--icon-content-color);
70
- width: var(--height);
71
- height: var(--width);
72
- }
73
- .divider-module_divider-line__6CesR {
74
- position: relative;
75
- display: block;
76
- transition: opacity, width, height 250ms ease-in-out;
77
- background-color: var(--color);
78
- opacity: var(--opacity);
79
- }
80
- .divider-module_divider-line__6CesR.divider-module_vertical__qSVWD {
81
- height: var(--length);
82
- left: var(--left);
83
- width: var(--width);
84
- margin: var(--margin);
85
- }
86
- .divider-module_divider-line__6CesR.divider-module_horizontal__Gz-Oj {
87
- width: var(--length);
88
- left: var(--left);
89
- height: var(--height);
90
- margin: var(--margin);
91
- }
92
64
  .field-module_field__UfKm3 {
93
65
  opacity: 1;
94
66
  pointer-events: auto;
@@ -163,6 +135,34 @@
163
135
  .field-module_field__UfKm3 label {
164
136
  text-align: left;
165
137
  }
138
+ .errorBoundary-module_errorBoundary__gk9ps {
139
+ background: #EFEFEF;
140
+ width: 100%;
141
+ height: 100%;
142
+ }
143
+
144
+ .errorBoundary-module_StyledIcon__IYHiU {
145
+ margin-right: 10px;
146
+ }
147
+ .divider-module_divider-line__6CesR {
148
+ position: relative;
149
+ display: block;
150
+ transition: opacity, width, height 250ms ease-in-out;
151
+ background-color: var(--color);
152
+ opacity: var(--opacity);
153
+ }
154
+ .divider-module_divider-line__6CesR.divider-module_vertical__qSVWD {
155
+ height: var(--length);
156
+ left: var(--left);
157
+ width: var(--width);
158
+ margin: var(--margin);
159
+ }
160
+ .divider-module_divider-line__6CesR.divider-module_horizontal__Gz-Oj {
161
+ width: var(--length);
162
+ left: var(--left);
163
+ height: var(--height);
164
+ margin: var(--margin);
165
+ }
166
166
  .layoutBox-module_layout-box__ZIID8 {
167
167
  display: flex;
168
168
  position: relative;
@@ -432,97 +432,115 @@
432
432
  --divider-line: #4a4b4b;
433
433
  }
434
434
 
435
- .popup-module_overflow-hidden__uimg4, .popup-module_text-truncate__y-5c1 {
435
+ .tooltip-module_overflow-hidden__YDzdx, .tooltip-module_text-truncate__CPvp3 {
436
436
  overflow: hidden !important;
437
437
  }
438
438
 
439
- .popup-module_text-nowrap__eDCv3, .popup-module_text-truncate__y-5c1 {
439
+ .tooltip-module_text-nowrap__g6kzP, .tooltip-module_text-truncate__CPvp3 {
440
440
  white-space: nowrap !important;
441
441
  }
442
442
 
443
- .popup-module_text-ellipsis__yu8nx, .popup-module_text-truncate__y-5c1 {
443
+ .tooltip-module_text-ellipsis__AYivV, .tooltip-module_text-truncate__CPvp3 {
444
444
  text-overflow: ellipsis !important;
445
445
  }
446
446
 
447
- .popup-module_popup-container__PJ0oQ {
448
- --popup-width: 60vw;
449
- --popup-height: 50vh;
447
+ .tooltip-module_popover-tooltip__sAhKa {
450
448
  position: fixed;
451
- width: var(--popup-width);
452
- height: var(--popup-height);
453
- --slideXFrom: 0;
454
- --slideYFrom: 0;
449
+ z-index: 999;
455
450
  will-change: opacity;
456
- transition: opacity 300ms ease-in-out;
451
+ transition: opacity 450ms ease;
457
452
  opacity: 0;
458
453
  visibility: hidden;
459
- pointer-events: none;
454
+ border-radius: 4px;
455
+ background-color: #1B1D1D;
456
+ box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.16);
460
457
  }
461
- .popup-module_popup-container__PJ0oQ .popup-module_popup-container-inner__n83Cz {
462
- position: relative;
463
- flex-direction: column;
464
- align-items: start;
458
+ .tooltip-module_popover-tooltip__sAhKa span, .tooltip-module_popover-tooltip__sAhKa p, .tooltip-module_popover-tooltip__sAhKa h3 {
459
+ margin: 0;
460
+ padding: 0;
461
+ }
462
+ .tooltip-module_popover-tooltip__sAhKa p {
463
+ display: -webkit-box;
464
+ -webkit-line-clamp: 4; /* number of lines to show */
465
+ line-clamp: 4;
466
+ -webkit-box-orient: vertical;
467
+ margin: 0;
465
468
  width: 100%;
466
- height: 100%;
467
- overflow-x: clip;
468
- background-color: #090A0A;
469
- border-radius: 4px;
470
- box-shadow: 0px 10px 20px 4px rgba(0, 0, 0, 0.15);
471
- transition: transform 350ms ease-out;
472
- will-change: transform;
473
- transform: translateX(var(--slideXFrom)) translateY(var(--slideYFrom));
469
+ white-space: normal;
470
+ overflow: auto;
474
471
  }
475
- .popup-module_popup-container__PJ0oQ .popup-module_popup-container-inner__n83Cz button {
476
- margin-bottom: 0;
472
+ .tooltip-module_popover-tooltip__sAhKa[data-show] {
473
+ opacity: 1;
474
+ visibility: visible;
477
475
  }
478
- .popup-module_popup-container__PJ0oQ .popup-module_popup-container-inner__n83Cz .popup-module_close-button__-8sZx {
476
+ .tooltip-module_popover-tooltip__sAhKa[data-show=false] {
477
+ opacity: 0;
478
+ visibility: hidden;
479
+ }
480
+ .tooltip-module_popover-tooltip__sAhKa[data-popper-placement^=top] .tooltip-module_arrow__pqqOi {
481
+ bottom: -16px;
482
+ }
483
+ .tooltip-module_popover-tooltip__sAhKa[data-popper-placement^=top] .tooltip-module_arrow__pqqOi .tooltip-module_arrow-inner__IqzxY {
484
+ transform: rotate(0deg);
485
+ }
486
+ .tooltip-module_popover-tooltip__sAhKa[data-popper-placement^=bottom] .tooltip-module_arrow__pqqOi {
487
+ top: -16px;
488
+ }
489
+ .tooltip-module_popover-tooltip__sAhKa[data-popper-placement^=bottom] .tooltip-module_arrow__pqqOi .tooltip-module_arrow-inner__IqzxY {
490
+ transform: rotate(180deg);
491
+ }
492
+ .tooltip-module_popover-tooltip__sAhKa[data-popper-placement^=left] .tooltip-module_arrow__pqqOi {
493
+ right: -16px;
494
+ }
495
+ .tooltip-module_popover-tooltip__sAhKa[data-popper-placement^=left] .tooltip-module_arrow__pqqOi .tooltip-module_arrow-inner__IqzxY {
496
+ transform: rotate(-90deg);
497
+ }
498
+ .tooltip-module_popover-tooltip__sAhKa[data-popper-placement^=right] .tooltip-module_arrow__pqqOi {
499
+ left: -16px;
500
+ }
501
+ .tooltip-module_popover-tooltip__sAhKa[data-popper-placement^=right] .tooltip-module_arrow__pqqOi .tooltip-module_arrow-inner__IqzxY {
502
+ transform: rotate(90deg);
503
+ }
504
+ .tooltip-module_popover-tooltip__sAhKa .tooltip-module_arrow__pqqOi {
505
+ position: absolute;
506
+ }
507
+ .tooltip-module_popover-tooltip__sAhKa .tooltip-module_arrow__pqqOi .tooltip-module_arrow-inner__IqzxY {
508
+ content: "";
509
+ border-width: 8px;
510
+ border-style: solid;
511
+ border-color: #1B1D1D transparent transparent transparent;
512
+ }
513
+
514
+ .tooltip-module_close-button__o8OBN {
479
515
  cursor: pointer;
480
516
  line-height: 1px;
481
517
  background-color: rgba(255, 255, 255, 0);
482
518
  }
483
- .popup-module_popup-container__PJ0oQ .popup-module_popup-container-inner__n83Cz .popup-module_close-button__-8sZx .icon-base {
519
+ .tooltip-module_close-button__o8OBN .icon-base {
484
520
  background-color: #FDDA0D;
485
521
  width: 9px !important;
486
522
  height: 9px !important;
487
523
  line-height: 1px !important;
488
524
  }
489
- .popup-module_popup-container__PJ0oQ .popup-module_popup-container-inner__n83Cz .popup-module_close-button__-8sZx:hover .icon-base {
525
+ .tooltip-module_close-button__o8OBN:hover .icon-base {
490
526
  background-color: #FFEA00;
491
527
  }
492
- .popup-module_popup-container__PJ0oQ .popup-module_popup-container-inner__n83Cz .popup-module_popup-container-inner-div__sDNBm {
493
- width: 100%;
494
- height: 100%;
495
- padding: 24px;
496
- overflow-y: auto;
497
- display: flex;
498
- }
499
- .popup-module_popup-container__PJ0oQ .popup-module_popup-container-inner__n83Cz .popup-module_popup-container-inner-div__sDNBm > * {
500
- overflow-y: auto;
501
- }
502
- .popup-module_popup-container__PJ0oQ[data-show] {
503
- opacity: 1;
504
- visibility: visible;
505
- pointer-events: all;
506
- }
507
- .popup-module_popup-container__PJ0oQ[data-show] .popup-module_popup-container-inner__n83Cz {
508
- transform: translateX(0) translateY(0);
528
+
529
+ .cui-theme-dark .tooltip-module_popover-tooltip__sAhKa {
530
+ background-color: #1B1D1D;
531
+ color: #F4F4F4;
509
532
  }
510
- .popup-module_popup-container__PJ0oQ[data-show=false] {
511
- opacity: 0;
512
- visibility: hidden;
513
- pointer-events: none;
533
+ .cui-theme-dark .tooltip-module_popover-tooltip__sAhKa .tooltip-module_arrow-inner__IqzxY {
534
+ border-color: #1B1D1D transparent transparent transparent;
514
535
  }
515
- .popup-module_popup-container__PJ0oQ[data-show=false] .popup-module_popup-container-inner__n83Cz {
516
- transform: translateX(var(--slideXFrom)) translateY(var(--slideYFrom));
536
+ .cui-theme-light {
537
+ color: #1B1D1D;
517
538
  }
518
-
519
- .cui-theme-dark .popup-module_popup-container-inner__n83Cz {
520
- background-color: #090A0A;
521
- color: #F4F4F4;
539
+ .cui-theme-light .tooltip-module_popover-tooltip__sAhKa {
540
+ background-color: #515757;
522
541
  }
523
- .cui-theme-light .popup-module_popup-container-inner__n83Cz {
524
- background-color: #090A0A;
525
- color: #F4F4F4;
542
+ .cui-theme-light .tooltip-module_popover-tooltip__sAhKa .tooltip-module_arrow-inner__IqzxY {
543
+ border-color: #515757 transparent transparent transparent;
526
544
  }
527
545
  :root {
528
546
  --divider-line: #4a4b4b;
@@ -715,115 +733,97 @@
715
733
  --divider-line: #4a4b4b;
716
734
  }
717
735
 
718
- .tooltip-module_overflow-hidden__YDzdx, .tooltip-module_text-truncate__CPvp3 {
736
+ .popup-module_overflow-hidden__uimg4, .popup-module_text-truncate__y-5c1 {
719
737
  overflow: hidden !important;
720
738
  }
721
739
 
722
- .tooltip-module_text-nowrap__g6kzP, .tooltip-module_text-truncate__CPvp3 {
740
+ .popup-module_text-nowrap__eDCv3, .popup-module_text-truncate__y-5c1 {
723
741
  white-space: nowrap !important;
724
742
  }
725
743
 
726
- .tooltip-module_text-ellipsis__AYivV, .tooltip-module_text-truncate__CPvp3 {
744
+ .popup-module_text-ellipsis__yu8nx, .popup-module_text-truncate__y-5c1 {
727
745
  text-overflow: ellipsis !important;
728
746
  }
729
747
 
730
- .tooltip-module_popover-tooltip__sAhKa {
748
+ .popup-module_popup-container__PJ0oQ {
749
+ --popup-width: 60vw;
750
+ --popup-height: 50vh;
731
751
  position: fixed;
732
- z-index: 999;
752
+ width: var(--popup-width);
753
+ height: var(--popup-height);
754
+ --slideXFrom: 0;
755
+ --slideYFrom: 0;
733
756
  will-change: opacity;
734
- transition: opacity 450ms ease;
757
+ transition: opacity 300ms ease-in-out;
735
758
  opacity: 0;
736
759
  visibility: hidden;
737
- border-radius: 4px;
738
- background-color: #1B1D1D;
739
- box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.16);
740
- }
741
- .tooltip-module_popover-tooltip__sAhKa span, .tooltip-module_popover-tooltip__sAhKa p, .tooltip-module_popover-tooltip__sAhKa h3 {
742
- margin: 0;
743
- padding: 0;
760
+ pointer-events: none;
744
761
  }
745
- .tooltip-module_popover-tooltip__sAhKa p {
746
- display: -webkit-box;
747
- -webkit-line-clamp: 4; /* number of lines to show */
748
- line-clamp: 4;
749
- -webkit-box-orient: vertical;
750
- margin: 0;
762
+ .popup-module_popup-container__PJ0oQ .popup-module_popup-container-inner__n83Cz {
763
+ position: relative;
764
+ flex-direction: column;
765
+ align-items: start;
751
766
  width: 100%;
752
- white-space: normal;
753
- overflow: auto;
754
- }
755
- .tooltip-module_popover-tooltip__sAhKa[data-show] {
756
- opacity: 1;
757
- visibility: visible;
758
- }
759
- .tooltip-module_popover-tooltip__sAhKa[data-show=false] {
760
- opacity: 0;
761
- visibility: hidden;
762
- }
763
- .tooltip-module_popover-tooltip__sAhKa[data-popper-placement^=top] .tooltip-module_arrow__pqqOi {
764
- bottom: -16px;
765
- }
766
- .tooltip-module_popover-tooltip__sAhKa[data-popper-placement^=top] .tooltip-module_arrow__pqqOi .tooltip-module_arrow-inner__IqzxY {
767
- transform: rotate(0deg);
768
- }
769
- .tooltip-module_popover-tooltip__sAhKa[data-popper-placement^=bottom] .tooltip-module_arrow__pqqOi {
770
- top: -16px;
771
- }
772
- .tooltip-module_popover-tooltip__sAhKa[data-popper-placement^=bottom] .tooltip-module_arrow__pqqOi .tooltip-module_arrow-inner__IqzxY {
773
- transform: rotate(180deg);
774
- }
775
- .tooltip-module_popover-tooltip__sAhKa[data-popper-placement^=left] .tooltip-module_arrow__pqqOi {
776
- right: -16px;
777
- }
778
- .tooltip-module_popover-tooltip__sAhKa[data-popper-placement^=left] .tooltip-module_arrow__pqqOi .tooltip-module_arrow-inner__IqzxY {
779
- transform: rotate(-90deg);
780
- }
781
- .tooltip-module_popover-tooltip__sAhKa[data-popper-placement^=right] .tooltip-module_arrow__pqqOi {
782
- left: -16px;
783
- }
784
- .tooltip-module_popover-tooltip__sAhKa[data-popper-placement^=right] .tooltip-module_arrow__pqqOi .tooltip-module_arrow-inner__IqzxY {
785
- transform: rotate(90deg);
786
- }
787
- .tooltip-module_popover-tooltip__sAhKa .tooltip-module_arrow__pqqOi {
788
- position: absolute;
767
+ height: 100%;
768
+ overflow-x: clip;
769
+ background-color: #090A0A;
770
+ border-radius: 4px;
771
+ box-shadow: 0px 10px 20px 4px rgba(0, 0, 0, 0.15);
772
+ transition: transform 350ms ease-out;
773
+ will-change: transform;
774
+ transform: translateX(var(--slideXFrom)) translateY(var(--slideYFrom));
789
775
  }
790
- .tooltip-module_popover-tooltip__sAhKa .tooltip-module_arrow__pqqOi .tooltip-module_arrow-inner__IqzxY {
791
- content: "";
792
- border-width: 8px;
793
- border-style: solid;
794
- border-color: #1B1D1D transparent transparent transparent;
776
+ .popup-module_popup-container__PJ0oQ .popup-module_popup-container-inner__n83Cz button {
777
+ margin-bottom: 0;
795
778
  }
796
-
797
- .tooltip-module_close-button__o8OBN {
779
+ .popup-module_popup-container__PJ0oQ .popup-module_popup-container-inner__n83Cz .popup-module_close-button__-8sZx {
798
780
  cursor: pointer;
799
781
  line-height: 1px;
800
782
  background-color: rgba(255, 255, 255, 0);
801
783
  }
802
- .tooltip-module_close-button__o8OBN .icon-base {
784
+ .popup-module_popup-container__PJ0oQ .popup-module_popup-container-inner__n83Cz .popup-module_close-button__-8sZx .icon-base {
803
785
  background-color: #FDDA0D;
804
786
  width: 9px !important;
805
787
  height: 9px !important;
806
788
  line-height: 1px !important;
807
789
  }
808
- .tooltip-module_close-button__o8OBN:hover .icon-base {
790
+ .popup-module_popup-container__PJ0oQ .popup-module_popup-container-inner__n83Cz .popup-module_close-button__-8sZx:hover .icon-base {
809
791
  background-color: #FFEA00;
810
792
  }
811
-
812
- .cui-theme-dark .tooltip-module_popover-tooltip__sAhKa {
813
- background-color: #1B1D1D;
814
- color: #F4F4F4;
793
+ .popup-module_popup-container__PJ0oQ .popup-module_popup-container-inner__n83Cz .popup-module_popup-container-inner-div__sDNBm {
794
+ width: 100%;
795
+ height: 100%;
796
+ padding: 24px;
797
+ overflow-y: auto;
798
+ display: flex;
815
799
  }
816
- .cui-theme-dark .tooltip-module_popover-tooltip__sAhKa .tooltip-module_arrow-inner__IqzxY {
817
- border-color: #1B1D1D transparent transparent transparent;
800
+ .popup-module_popup-container__PJ0oQ .popup-module_popup-container-inner__n83Cz .popup-module_popup-container-inner-div__sDNBm > * {
801
+ overflow-y: auto;
818
802
  }
819
- .cui-theme-light {
820
- color: #1B1D1D;
803
+ .popup-module_popup-container__PJ0oQ[data-show] {
804
+ opacity: 1;
805
+ visibility: visible;
806
+ pointer-events: all;
821
807
  }
822
- .cui-theme-light .tooltip-module_popover-tooltip__sAhKa {
823
- background-color: #515757;
808
+ .popup-module_popup-container__PJ0oQ[data-show] .popup-module_popup-container-inner__n83Cz {
809
+ transform: translateX(0) translateY(0);
824
810
  }
825
- .cui-theme-light .tooltip-module_popover-tooltip__sAhKa .tooltip-module_arrow-inner__IqzxY {
826
- border-color: #515757 transparent transparent transparent;
811
+ .popup-module_popup-container__PJ0oQ[data-show=false] {
812
+ opacity: 0;
813
+ visibility: hidden;
814
+ pointer-events: none;
815
+ }
816
+ .popup-module_popup-container__PJ0oQ[data-show=false] .popup-module_popup-container-inner__n83Cz {
817
+ transform: translateX(var(--slideXFrom)) translateY(var(--slideYFrom));
818
+ }
819
+
820
+ .cui-theme-dark .popup-module_popup-container-inner__n83Cz {
821
+ background-color: #090A0A;
822
+ color: #F4F4F4;
823
+ }
824
+ .cui-theme-light .popup-module_popup-container-inner__n83Cz {
825
+ background-color: #090A0A;
826
+ color: #F4F4F4;
827
827
  }
828
828
  :root {
829
829
  --divider-line: #4a4b4b;
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("../../../../../_virtual/_rollupPluginBabelHelpers.js"),o=require("react"),i=require("./icon.module.scss.js"),r=require("./unifyIconUrl.js");const n=o.memo((n=>{let{iconUrl:t,minWidth:c,minHeight:s,size:l,fontSize:u,width:a,height:m,color:h="currentColor",className:d="",children:p,style:b,onClick:f,...g}=n;const y=t&&r.unifyIconUrl(t),I=o.useMemo((()=>({"--min-width":c||l||a||"auto","--min-height":s||l||m||"auto","--width":l||a||"1rem","--height":l||m||"1rem",...u?{fontSize:u}:{},...y?{"--icon-url":`url(${y})`}:{},...y?{"--icon-color":h}:{"--icon-content-color":h},...f?{cursor:"pointer"}:{},...b})),[c,l,a,s,m,u,y,h,f,b]),q=o.useMemo((()=>f?{onClick:f,role:"button",tabIndex:-1}:{}),[f]);return React.createElement("span",e.extends({},g,q,{className:`${i.default["icon-base"]} icon-base ${d}`,style:I}),!y&&p&&p)}));n.displayName="IconBase",exports.IconBase=n;
1
+ "use strict";var e=require("../../../../../_virtual/_rollupPluginBabelHelpers.js"),o=require("react"),i=require("./icon.module.scss.js"),n=require("./unifyIconUrl.js");const r=o.memo((r=>{let{iconUrl:t,minWidth:c,minHeight:s,size:l,fontSize:u,width:a,height:m,color:h="currentColor",className:d="",children:p,icon:b,style:f,onClick:g,...y}=r;const I=t&&n.unifyIconUrl(t),q=o.useMemo((()=>({"--min-width":c||l||a||"auto","--min-height":s||l||m||"auto","--width":l||a||"1rem","--height":l||m||"1rem",...u?{fontSize:u}:{},...I?{"--icon-url":`url(${I})`}:{},...I?{"--icon-color":h}:{"--icon-content-color":h},...g?{cursor:"pointer"}:{},...f})),[c,l,a,s,m,u,I,h,g,f]),j=o.useMemo((()=>g?{onClick:g,role:"button",tabIndex:-1}:{}),[g]);return React.createElement("span",e.extends({},y,j,{className:`${i.default["icon-base"]} icon-base ${d}`,style:q}),!I&&p&&p,!I&&b&&b)}));r.displayName="IconBase",exports.IconBase=r;
2
2
  //# sourceMappingURL=IconBase.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IconBase.js","sources":["../../../../../../../../src/core/ui/components/icon/IconBase.tsx"],"sourcesContent":["import { CSSProperties, memo, useMemo, FC, PropsWithChildren, MouseEvent, KeyboardEvent } from 'react'\n\nimport classes from './icon.module.scss'\nimport { unifyIconUrl } from './unifyIconUrl'\n\n\nexport type IconBaseProps = PropsWithChildren<unknown> & {\n id?: string\n iconUrl?: string | null\n minWidth?: string | null\n minHeight?: string | null\n width?: string | null\n height?: string | null\n size?: string | null\n fontSize?: string | null\n color?: string | null\n className?: string | null\n style?: CSSProperties | null\n onClick?: (event: MouseEvent | KeyboardEvent) => void\n}\n\nexport const IconBase: FC<IconBaseProps> = memo<IconBaseProps>(({\n iconUrl, minWidth, minHeight, size,\n fontSize, width, height, color = 'currentColor', className = '', children, style, onClick, ...props\n}: IconBaseProps) => {\n const unifiedIconUrl = iconUrl && unifyIconUrl(iconUrl)\n\n const styles = useMemo(() => (\n {\n '--min-width': minWidth || size || width || 'auto',\n '--min-height': minHeight || size || height || 'auto',\n '--width': size || width || '1rem',\n '--height': size || height || '1rem',\n ...(fontSize ? { fontSize } : {}),\n ...(unifiedIconUrl ? { '--icon-url': `url(${unifiedIconUrl})` } : {}),\n ...(unifiedIconUrl ? { '--icon-color': color } : { '--icon-content-color': color }),\n ...(onClick ? { cursor: 'pointer' } : {}),\n ...style,\n }\n ), [minWidth, size, width, minHeight, height, fontSize, unifiedIconUrl, color, onClick, style])\n\n const onClickProps = useMemo(() => (onClick ? ({\n onClick,\n role: 'button',\n tabIndex: -1,\n }) : {}), [onClick])\n\n return (\n <span\n {...props}\n {...onClickProps}\n className={`${classes['icon-base']} icon-base ${className}`}\n style={styles as CSSProperties}\n >\n {(!unifiedIconUrl && children) && children}\n </span>\n )\n})\n\nIconBase.displayName = 'IconBase'\n"],"names":["IconBase","memo","_ref","iconUrl","minWidth","minHeight","size","fontSize","width","height","color","className","children","style","onClick","props","unifiedIconUrl","unifyIconUrl","styles","useMemo","cursor","onClickProps","role","tabIndex","React","createElement","_extends","extends","classes","default","displayName"],"mappings":"8KAqBaA,EAA8BC,EAAIA,MAAgBC,IAG1C,IAH2CC,QAC9DA,EAAOC,SAAEA,EAAQC,UAAEA,EAASC,KAAEA,EAAIC,SAClCA,EAAQC,MAAEA,EAAKC,OAAEA,EAAMC,MAAEA,EAAQ,eAAcC,UAAEA,EAAY,GAAEC,SAAEA,EAAQC,MAAEA,EAAKC,QAAEA,KAAYC,GAChFb,EACd,MAAMc,EAAiBb,GAAWc,EAAYA,aAACd,GAEzCe,EAASC,EAAAA,SAAQ,KACrB,CACE,cAAef,GAAYE,GAAQE,GAAS,OAC5C,eAAgBH,GAAaC,GAAQG,GAAU,OAC/C,UAAWH,GAAQE,GAAS,OAC5B,WAAYF,GAAQG,GAAU,UAC1BF,EAAW,CAAEA,YAAa,MAC1BS,EAAiB,CAAE,aAAc,OAAOA,MAAsB,MAC9DA,EAAiB,CAAE,eAAgBN,GAAU,CAAE,uBAAwBA,MACvEI,EAAU,CAAEM,OAAQ,WAAc,MACnCP,KAEJ,CAACT,EAAUE,EAAME,EAAOH,EAAWI,EAAQF,EAAUS,EAAgBN,EAAOI,EAASD,IAElFQ,EAAeF,WAAQ,IAAOL,EAAW,CAC7CA,UACAQ,KAAM,SACNC,UAAW,GACR,CAAG,GAAE,CAACT,IAEX,OACEU,MAAAC,cAAA,OAAAC,EAAAC,QACMZ,CAAAA,EAAAA,EACAM,EAAY,CAChBV,UAAW,GAAGiB,EAAOC,QAAC,0BAA0BlB,IAChDE,MAAOK,KAEJF,GAAkBJ,GAAaA,EAC7B,IAIXZ,EAAS8B,YAAc"}
1
+ {"version":3,"file":"IconBase.js","sources":["../../../../../../../../src/core/ui/components/icon/IconBase.tsx"],"sourcesContent":["import { CSSProperties, memo, useMemo, FC, PropsWithChildren, MouseEvent, KeyboardEvent, ReactNode } from 'react'\n\nimport classes from './icon.module.scss'\nimport { unifyIconUrl } from './unifyIconUrl'\n\n\nexport type IconBaseProps = PropsWithChildren<unknown> & {\n id?: string\n iconUrl?: string | null\n minWidth?: string | null\n minHeight?: string | null\n width?: string | null\n height?: string | null\n size?: string | null\n fontSize?: string | null\n color?: string | null\n className?: string | null\n style?: CSSProperties | null\n onClick?: (event: MouseEvent | KeyboardEvent) => void\n icon?: ReactNode\n}\n\nexport const IconBase: FC<IconBaseProps> = memo<IconBaseProps>(({\n iconUrl, minWidth, minHeight, size,\n fontSize, width, height, color = 'currentColor', className = '', children, icon, style, onClick, ...props\n}: IconBaseProps) => {\n const unifiedIconUrl = iconUrl && unifyIconUrl(iconUrl)\n\n const styles = useMemo(() => (\n {\n '--min-width': minWidth || size || width || 'auto',\n '--min-height': minHeight || size || height || 'auto',\n '--width': size || width || '1rem',\n '--height': size || height || '1rem',\n ...(fontSize ? { fontSize } : {}),\n ...(unifiedIconUrl ? { '--icon-url': `url(${unifiedIconUrl})` } : {}),\n ...(unifiedIconUrl ? { '--icon-color': color } : { '--icon-content-color': color }),\n ...(onClick ? { cursor: 'pointer' } : {}),\n ...style,\n }\n ), [minWidth, size, width, minHeight, height, fontSize, unifiedIconUrl, color, onClick, style])\n\n const onClickProps = useMemo(() => (onClick ? ({\n onClick,\n role: 'button',\n tabIndex: -1,\n }) : {}), [onClick])\n\n return (\n <span\n {...props}\n {...onClickProps}\n className={`${classes['icon-base']} icon-base ${className}`}\n style={styles as CSSProperties}\n >\n {(!unifiedIconUrl && children) && children}\n {(!unifiedIconUrl && icon) && icon}\n </span>\n )\n})\n\nIconBase.displayName = 'IconBase'\n"],"names":["IconBase","memo","_ref","iconUrl","minWidth","minHeight","size","fontSize","width","height","color","className","children","icon","style","onClick","props","unifiedIconUrl","unifyIconUrl","styles","useMemo","cursor","onClickProps","role","tabIndex","React","createElement","_extends","extends","classes","default","displayName"],"mappings":"8KAsBaA,EAA8BC,EAAIA,MAAgBC,IAG1C,IAH2CC,QAC9DA,EAAOC,SAAEA,EAAQC,UAAEA,EAASC,KAAEA,EAAIC,SAClCA,EAAQC,MAAEA,EAAKC,OAAEA,EAAMC,MAAEA,EAAQ,eAAcC,UAAEA,EAAY,GAAEC,SAAEA,EAAQC,KAAEA,EAAIC,MAAEA,EAAKC,QAAEA,KAAYC,GACtFd,EACd,MAAMe,EAAiBd,GAAWe,EAAYA,aAACf,GAEzCgB,EAASC,EAAAA,SAAQ,KACrB,CACE,cAAehB,GAAYE,GAAQE,GAAS,OAC5C,eAAgBH,GAAaC,GAAQG,GAAU,OAC/C,UAAWH,GAAQE,GAAS,OAC5B,WAAYF,GAAQG,GAAU,UAC1BF,EAAW,CAAEA,YAAa,MAC1BU,EAAiB,CAAE,aAAc,OAAOA,MAAsB,MAC9DA,EAAiB,CAAE,eAAgBP,GAAU,CAAE,uBAAwBA,MACvEK,EAAU,CAAEM,OAAQ,WAAc,MACnCP,KAEJ,CAACV,EAAUE,EAAME,EAAOH,EAAWI,EAAQF,EAAUU,EAAgBP,EAAOK,EAASD,IAElFQ,EAAeF,WAAQ,IAAOL,EAAW,CAC7CA,UACAQ,KAAM,SACNC,UAAW,GACR,CAAG,GAAE,CAACT,IAEX,OACEU,MAAAC,cAAA,OAAAC,EAAAC,QACMZ,CAAAA,EAAAA,EACAM,EAAY,CAChBX,UAAW,GAAGkB,EAAOC,QAAC,0BAA0BnB,IAChDG,MAAOK,KAEJF,GAAkBL,GAAaA,GAC/BK,GAAkBJ,GAASA,EACzB,IAIXb,EAAS+B,YAAc"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./peregrineMQ.js");const r=new e.PeregrineMQ;exports.PeregrineMQ=e.PeregrineMQ,exports.PeregrineMQClearError=e.PeregrineMQClearError,exports.default=r,exports.peregrineMQInstance=r;
1
+ "use strict";var e=require("./peregrineMQ.js");const r=new e.PeregrineMQ;exports.PeregrineMQ=e.PeregrineMQ,exports.PeregrineMQClearError=e.PeregrineMQClearError,exports.peregrineMQInstance=r;
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../../../../src/core/utils/appState/peregrineMQ/index.ts"],"sourcesContent":["import { PeregrineMQ } from './peregrineMQ'\n\nexport { PeregrineMQ, PeregrineMQClearError } from './peregrineMQ'\n\nexport const peregrineMQInstance = new PeregrineMQ()\n\nexport default peregrineMQInstance\n\n\nexport type * from './peregrineMQ.types'\nexport * from './usePeregrineMQ.react'\n"],"names":["peregrineMQInstance","PeregrineMQ"],"mappings":"4GAIaA,EAAsB,IAAIC,EAAWA"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../../../../src/core/utils/appState/peregrineMQ/index.ts"],"sourcesContent":["import { PeregrineMQ } from './peregrineMQ'\n\nexport { PeregrineMQ, PeregrineMQClearError } from './peregrineMQ'\n\nexport const peregrineMQInstance = new PeregrineMQ()\n\nexport type * from './peregrineMQ.types'\nexport * from './usePeregrineMQ.react'\n"],"names":["peregrineMQInstance","PeregrineMQ"],"mappings":"qDAIaA,EAAsB,IAAIC,EAAWA"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react");exports.usePeregrineMQ=(r,s,u)=>{const t=e.useCallback(u,[u]),c=e.useRef();return e.useEffect((()=>(c.current=r.subscribe(s,t),()=>{c?.current?.()})),[t,s,r]),[c,r.publish]};
1
+ "use strict";var e=require("react");exports.usePeregrineMQ=(r,u,s)=>{const t=e.useCallback(s,[s]),c=e.useRef();return e.useEffect((()=>(c.current=r.subscribe(u,t),()=>{c?.current?.()})),[t,u,r]),[c.current,r.publish]};
2
2
  //# sourceMappingURL=usePeregrineMQ.react.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"usePeregrineMQ.react.js","sources":["../../../../../../../../src/core/utils/appState/peregrineMQ/usePeregrineMQ.react.ts"],"sourcesContent":["import { useCallback, useEffect, useRef } from 'react'\n\nimport { PeregrineMQ } from './peregrineMQ'\nimport { Callback } from './peregrineMQ.types'\n\nexport type usePeregrineMQReturnType = [\n { current?: () => boolean },\n <T>(channel: string, data?: T) => boolean\n]\n\nexport const usePeregrineMQ = (\n peregrineInstance: PeregrineMQ, channel: string, callback: Callback,\n): usePeregrineMQReturnType => {\n const memCallback = useCallback(callback, [callback])\n\n const unsubscribeRef = useRef<ReturnType<typeof peregrineInstance.subscribe>>()\n\n useEffect(() => {\n unsubscribeRef.current = peregrineInstance.subscribe(channel, memCallback)\n\n return (): void => {\n unsubscribeRef?.current?.()\n }\n }, [memCallback, channel, peregrineInstance])\n\n return [unsubscribeRef, peregrineInstance.publish]\n}\n"],"names":["usePeregrineMQ","peregrineInstance","channel","callback","memCallback","useCallback","unsubscribeRef","useRef","useEffect","current","subscribe","publish"],"mappings":"2DAU8BA,CAC5BC,EAAgCC,EAAiBC,KAEjD,MAAMC,EAAcC,EAAWA,YAACF,EAAU,CAACA,IAErCG,EAAiBC,EAAAA,SAUvB,OARAC,EAAAA,WAAU,KACRF,EAAeG,QAAUR,EAAkBS,UAAUR,EAASE,GAEvD,KACLE,GAAgBG,WAAW,IAE5B,CAACL,EAAaF,EAASD,IAEnB,CAACK,EAAgBL,EAAkBU,QAAQ"}
1
+ {"version":3,"file":"usePeregrineMQ.react.js","sources":["../../../../../../../../src/core/utils/appState/peregrineMQ/usePeregrineMQ.react.ts"],"sourcesContent":["import { useCallback, useEffect, useRef } from 'react'\n\nimport { PeregrineMQ } from './peregrineMQ'\nimport { Callback } from './peregrineMQ.types'\n\nexport type usePeregrineMQReturnType = [\n (() => boolean) | undefined,\n <T>(channel: string, data?: T) => boolean\n]\n\nexport const usePeregrineMQ = (\n peregrineInstance: PeregrineMQ, channel: string, callback: Callback,\n): usePeregrineMQReturnType => {\n const memCallback = useCallback(callback, [callback])\n\n const unsubscribeRef = useRef<ReturnType<typeof peregrineInstance.subscribe>>()\n\n useEffect(() => {\n unsubscribeRef.current = peregrineInstance.subscribe(channel, memCallback)\n\n return (): void => {\n unsubscribeRef?.current?.()\n }\n }, [memCallback, channel, peregrineInstance])\n\n return [unsubscribeRef.current, peregrineInstance.publish]\n}\n"],"names":["usePeregrineMQ","peregrineInstance","channel","callback","memCallback","useCallback","unsubscribeRef","useRef","useEffect","current","subscribe","publish"],"mappings":"2DAU8BA,CAC5BC,EAAgCC,EAAiBC,KAEjD,MAAMC,EAAcC,EAAWA,YAACF,EAAU,CAACA,IAErCG,EAAiBC,EAAAA,SAUvB,OARAC,EAAAA,WAAU,KACRF,EAAeG,QAAUR,EAAkBS,UAAUR,EAASE,GAEvD,KACLE,GAAgBG,WAAW,IAE5B,CAACL,EAAaF,EAASD,IAEnB,CAACK,EAAeG,QAASR,EAAkBU,QAAQ"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("../../../../../_virtual/_rollupPluginBabelHelpers.js"),r=require("../../helpers/other.js");exports.createStore=(t,n,o)=>{let s=t;const l=new Set,c=()=>s,u=function(){var r=e.asyncToGenerator((function*(e){s=e;for(const e of l){const r=e?.selector,t=r?r(s):s;void 0!==e.previousValue&&e.previousValue===t||(e.previousValue=t,yield e(t))}return s}));return function(e){return r.apply(this,arguments)}}(),i={getState:c,setState:u,subscribe:(e,r)=>{if(r&&e.selector&&e.selector!==r)throw new Error("Error, mismatch selector, listener.selector !== selector.");return r&&!e.selector&&(e.selector=r),e.selector&&(e.previousValue=e.selector(c())),l.add(e),()=>l.delete(e)},unsubscribe:e=>{l.delete(e)}},a=n?Object.entries(n)?.reduce(((t,n)=>{let[s,l]=n;return{...t,[s]:e.asyncToGenerator((function*(){const e=r.isFunctionAsync(l);e&&u({...c(),[`${s}Error`]:null,[`${s}Pending`]:!0});try{for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];const r=yield l(c,u,...n);return o&&u(o(c(),s,...n)),e&&u({...c(),[`${s}Pending`]:!1}),r}catch(r){throw e&&u({...c(),[`${s}Pending`]:!1,[`${s}Error`]:r}),r}}))}}),{}):null,d={...i,...a?{actions:{...a}}:{}};return d};
1
+ "use strict";var e=require("../../../../../_virtual/_rollupPluginBabelHelpers.js"),r=require("../../helpers/other.js");exports.createStore=(t,n,o)=>{let s=t;const l=new Set,c=()=>s,u=function(){var r=e.asyncToGenerator((function*(e){s=e;for(const e of l){const r=e?.selector,t=r?r(s):s;void 0!==e.previousValue&&e.previousValue===t||(e.previousValue=t,yield e(t))}return s}));return function(e){return r.apply(this,arguments)}}(),i={getState:c,setState:u,subscribe:(e,r)=>{if(r&&e.selector&&e.selector!==r)throw new Error("Error, mismatch selector, listener.selector !== selector.");return r&&!e.selector&&(e.selector=r),e.selector&&(e.previousValue=e.selector(c())),l.add(e),()=>l.delete(e)},unsubscribe:e=>{l.delete(e)}},a=n?Object.entries(n)?.reduce(((t,n)=>{let[s,l]=n;return t[s]=e.asyncToGenerator((function*(){const e=r.isFunctionAsync(l);e&&u({...c(),[`${s}Error`]:null,[`${s}Pending`]:!0});try{for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];const r=yield l(c,u,...n);return o&&u(o(c(),s,...n)),e&&u({...c(),[`${s}Pending`]:!1}),r}catch(r){throw e&&u({...c(),[`${s}Pending`]:!1,[`${s}Error`]:r}),r}})),t}),{}):null,d={...i,...a?{actions:{...a}}:{}};return d};
2
2
  //# sourceMappingURL=store.vanillajs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"store.vanillajs.js","sources":["../../../../../../../../src/core/utils/appState/store/store.vanillajs.ts"],"sourcesContent":["\n// TinyStore, inspired by https://github.com/jherr/syncexternalstore/blob/main/csr/src/store.js\n\nimport { isFunctionAsync } from '../../helpers'\n\n/**\n * Represents the callback function for a store listener.\n */\nexport type ListenerCallBack<T> = (state: Partial<T>) => void\n\n/**\n * Represents a selector function that transforms the store state.\n */\n// export type Selector<T> = (state: Partial<T>) => Partial<T>;\nexport type SelectedValueType<T> = Partial<T> | Partial<keyof T>\n| string | number | boolean | undefined | string[] | number[] | boolean[] | undefined[];\nexport type Selector<T> = (state: Partial<T>) => SelectedValueType<T>;\n\n\n/**\n * Represents a listener for the store.\n */\nexport type Listener<T> = {\n selector?: Selector<T>\n previousValue?: SelectedValueType<T>\n} & ListenerCallBack<T>\n\n/**\n * Represents a store.\n */\nexport type Store<T> = {\n /**\n * Get the current state of the store.\n * @returns The current state of the store.\n */\n getState: () => Partial<T>\n /**\n * Set the state of the store.\n * @param state - The new state to set.\n * @returns A promise that resolves to the new state.\n */\n setState: (state: Partial<T>) => Promise<Partial<T>>\n /**\n * Subscribe a listener to the store.\n * @param listener - The listener function to be subscribed.\n * @param selector - Optional selector function to transform the store state.\n * @returns A function to unsubscribe the listener.\n */\n subscribe: (listener: Listener<T>, selector?: Selector<T>) => () => void\n /**\n * Unubscribe a listener from the store.\n * @param listener - The listener function to be unsubscribed.\n */\n unsubscribe: (listener: Listener<T>) => void\n}\n// & { actions?: { [actionName: string]: ActionHandlerCaller } }\n\n// TODO infer actionNames from createStore arguments\n/**\n * Represents a store with additional actions.\n */\nexport type StoreWithActions<T> = Store<T> & { actions: { [actionName: string]: ActionHandlerCaller<T> } }\n\n/**\n * Represents an action handler function.\n */\nexport type ActionHandler<T> = (\n getState: Store<T>['getState'], // Function to get the current state of the store\n setState: Store<T>['setState'], // Function to set the state of the store\n ...rest: unknown[]\n) => void | Partial<T> | Promise<void | Partial<T>>\n\n/**\n * Represents an reducer function.\n */\nexport type Reducer<T> = (\n state: Partial<T>,\n action: string,\n ...rest: unknown[]\n) => Partial<T>\n\n\n/**\n * Represents a function that calls an action handler.\n */\nexport type ActionHandlerCaller<T> = (...args: unknown[]) => void | Partial<T> | Promise<void | Partial<T>>\n\n\ntype Actions<T> = { [key: string]: ActionHandler<T>}\n/**\n * Creates a new store.\n * @param initialState - The initial state of the store.\n * @param actions - Optional actions for the store.\n * @returns The created store.\n */\nexport const createStore = <T>(\n initialState: Partial<T>,\n actions?: Actions<T>,\n reducer?: Reducer<T>,\n): Store<T> | StoreWithActions<T> => {\n let currentState: Partial<T> = initialState\n const listeners = new Set<Listener<T>>()\n\n /**\n * Gets the current state of the store.\n * @returns The current state of the store.\n */\n const getState = (): Partial<T> => currentState\n\n // TODO debounce, batch? what is the meaningful time between setState ofr UI to be rendered and registerd by User?\n /**\n * Sets the state of the store.\n * @param newState - The new state to set.\n * @returns A promise that resolves to the new state.\n */\n const setState = async (newState: Partial<T>): Promise<Partial<T>> => {\n currentState = newState\n\n // eslint-disable-next-line no-restricted-syntax\n for (const listener of listeners) {\n // has Listener selector?\n const selector: Selector<T> | undefined = listener?.selector\n\n // TODO compare selected value to the previous values of that listener/selector pair\n // if listener.previousValue === selector(currentState) no call\n // else listener.previousValue = selector(currentState) and call\n // l1 cache, weak references?\n const newValue: SelectedValueType<T> = selector ? selector(currentState) : currentState\n\n // TODO plugin equality\n if (listener.previousValue === undefined || listener.previousValue !== newValue) {\n listener.previousValue = newValue\n // eslint-disable-next-line no-await-in-loop\n await listener(newValue as Partial<T>)\n }\n }\n return currentState\n }\n\n /**\n * Represents the basic API of the store.\n */\n const storeBaseicApi: Store<T> = {\n /**\n * Get the current state of the store.\n * @returns The current state of the store.\n */\n getState,\n /**\n * Set the state of the store.\n * @param state - The new state to set.\n * @returns A promise that resolves to the new state.\n */\n setState,\n /**\n * Subscribe a listener to the store.\n * @param listener - The listener function to be subscribed.\n * @returns A function to unsubscribe the listener.\n */\n subscribe: (listener: Listener<T>, selector?: Selector<T>) => {\n if (selector && listener.selector && listener.selector !== selector) {\n throw new Error('Error, mismatch selector, listener.selector !== selector.')\n }\n if (selector && !listener.selector) {\n // eslint-disable-next-line no-param-reassign\n listener.selector = selector\n }\n\n if (listener.selector) {\n // setting the previousValue for the next cache/equality check\n // eslint-disable-next-line no-param-reassign\n listener.previousValue = listener.selector(getState())\n }\n\n listeners.add(listener)\n return () => listeners.delete(listener)\n },\n /**\n * Unsubscribe a listener from the store.\n * @param listener - The listener function to be unsubscribed.\n */\n unsubscribe: (listener: Listener<T>) => {\n listeners.delete(listener)\n },\n }\n\n /**\n * Resolves the actions and creates action handlers.\n */\n const resolvedActions: Actions<T> | null | undefined\n = actions ? Object.entries(actions)?.reduce(\n (\n aggregator: Record<string, ActionHandlerCaller<T>>,\n [actionName, actionHandler]: [string, ActionHandler<T>],\n ) => ({\n ...aggregator,\n [actionName]: async(...rest: unknown[]): Promise<void | Partial<T>> => {\n // TODO try to not call subscriber too many times becuase of Error and Pending values\n const isAsync = isFunctionAsync(actionHandler as () => unknown)\n\n if (isAsync) {\n setState({\n ...getState(),\n [`${actionName}Error`]: null,\n [`${actionName}Pending`]: true,\n })\n }\n\n try {\n const resultOfAction = await actionHandler(getState, setState, ...rest)\n\n // TODO try to mutate state only once with the results, that means pass custom setState to action,\n // so that it would matk pending and error already inside action\n if (reducer) {\n setState(reducer(getState(), actionName, ...rest))\n }\n\n if (isAsync) {\n setState({ ...getState(), [`${actionName}Pending`]: false })\n }\n\n return resultOfAction\n } catch (error) {\n if (isAsync) {\n setState({\n ...getState(),\n [`${actionName}Pending`]: false,\n [`${actionName}Error`]: error,\n })\n }\n throw error\n }\n },\n }),\n {},\n ) : null\n\n /**\n * Represents the store combined with actions.\n */\n const storeCombinedWithActions = {\n ...storeBaseicApi,\n ...(resolvedActions ? { actions: { ...resolvedActions } } : {}),\n }\n\n return resolvedActions\n ? storeCombinedWithActions as StoreWithActions<T>\n : storeCombinedWithActions as Store<T>\n}\n"],"names":["createStore","initialState","actions","reducer","currentState","listeners","Set","getState","setState","_ref","_asyncToGenerator","newState","listener","selector","newValue","undefined","previousValue","_x","apply","this","arguments","storeBaseicApi","subscribe","Error","add","delete","unsubscribe","resolvedActions","Object","entries","reduce","aggregator","_ref2","actionName","actionHandler","isAsync","isFunctionAsync","_len","length","rest","Array","_key","resultOfAction","error","storeCombinedWithActions"],"mappings":"2IA+F2BA,CACzBC,EACAC,EACAC,KAEA,IAAIC,EAA2BH,EAC/B,MAAMI,EAAY,IAAIC,IAMhBC,EAAWA,IAAkBH,EAQ7BI,EAAQ,WAAA,IAAAC,EAAAC,oBAAG,UAAOC,GACtBP,EAAeO,EAGf,IAAK,MAAMC,KAAYP,EAAW,CAEhC,MAAMQ,EAAoCD,GAAUC,SAM9CC,EAAiCD,EAAWA,EAAST,GAAgBA,OAG5CW,IAA3BH,EAASI,eAA+BJ,EAASI,gBAAkBF,IACrEF,EAASI,cAAgBF,QAEnBF,EAASE,GAEnB,CACA,OAAOV,KACR,OAtBKI,SAAQS,GAAA,OAAAR,EAAAS,MAAAC,KAAAC,UAAA,EAAA,GA2BRC,EAA2B,CAK/Bd,WAMAC,WAMAc,UAAWA,CAACV,EAAuBC,KACjC,GAAIA,GAAYD,EAASC,UAAYD,EAASC,WAAaA,EACzD,MAAM,IAAIU,MAAM,6DAclB,OAZIV,IAAaD,EAASC,WAExBD,EAASC,SAAWA,GAGlBD,EAASC,WAGXD,EAASI,cAAgBJ,EAASC,SAASN,MAG7CF,EAAUmB,IAAIZ,GACP,IAAMP,EAAUoB,OAAOb,EAAS,EAMzCc,YAAcd,IACZP,EAAUoB,OAAOb,EAAS,GAOxBe,EACFzB,EAAU0B,OAAOC,QAAQ3B,IAAU4B,QACnC,CACEC,EAAkDC,KAAA,IACjDC,EAAYC,GAA0CF,EAAA,MACnD,IACDD,EACHE,CAACA,GAAUvB,EAAAA,kBAAG,YAEZ,MAAMyB,EAAUC,kBAAgBF,GAE5BC,GACF3B,EAAS,IACJD,IACH,CAAC,GAAG0B,UAAoB,KACxB,CAAC,GAAGA,aAAsB,IAI9B,IAAI,IAAA,IAAAI,EAAAjB,UAAAkB,OAZiBC,EAAIC,IAAAA,MAAAH,GAAAI,EAAA,EAAAA,EAAAJ,EAAAI,IAAJF,EAAIE,GAAArB,UAAAqB,GAavB,MAAMC,QAAuBR,EAAc3B,EAAUC,KAAa+B,GAYlE,OARIpC,GACFK,EAASL,EAAQI,IAAY0B,KAAeM,IAG1CJ,GACF3B,EAAS,IAAKD,IAAY,CAAC,GAAG0B,aAAsB,IAG/CS,CACR,CAAC,MAAOC,GAQP,MAPIR,GACF3B,EAAS,IACJD,IACH,CAAC,GAAG0B,aAAsB,EAC1B,CAAC,GAAGA,UAAoBU,IAGtBA,CACR,KAEH,GACD,CAAA,GACE,KAKAC,EAA2B,IAC5BvB,KACCM,EAAkB,CAAEzB,QAAS,IAAKyB,IAAsB,IAG9D,OACIiB,CACoC"}
1
+ {"version":3,"file":"store.vanillajs.js","sources":["../../../../../../../../src/core/utils/appState/store/store.vanillajs.ts"],"sourcesContent":["\n// TinyStore, inspired by https://github.com/jherr/syncexternalstore/blob/main/csr/src/store.js\n\nimport { isFunctionAsync } from '../../helpers'\n\n/**\n * Represents the callback function for a store listener.\n */\nexport type ListenerCallBack<T> = (state: Partial<T>) => void\n\n/**\n * Represents a selector function that transforms the store state.\n */\n// export type Selector<T> = (state: Partial<T>) => Partial<T>;\nexport type SelectedValueType<T> = Partial<T> | Partial<keyof T>\n| string | number | boolean | undefined | string[] | number[] | boolean[] | undefined[];\nexport type Selector<T> = (state: Partial<T>) => SelectedValueType<T>;\n\n\n/**\n * Represents a listener for the store.\n */\nexport type Listener<T> = {\n selector?: Selector<T>\n previousValue?: SelectedValueType<T>\n} & ListenerCallBack<T>\n\n/**\n * Represents a store.\n */\nexport type Store<T> = {\n /**\n * Get the current state of the store.\n * @returns The current state of the store.\n */\n getState: () => Partial<T>\n /**\n * Set the state of the store.\n * @param state - The new state to set.\n * @returns A promise that resolves to the new state.\n */\n setState: (state: Partial<T>) => Promise<Partial<T>>\n /**\n * Subscribe a listener to the store.\n * @param listener - The listener function to be subscribed.\n * @param selector - Optional selector function to transform the store state.\n * @returns A function to unsubscribe the listener.\n */\n subscribe: (listener: Listener<T>, selector?: Selector<T>) => () => void\n /**\n * Unubscribe a listener from the store.\n * @param listener - The listener function to be unsubscribed.\n */\n unsubscribe: (listener: Listener<T>) => void\n}\n// & { actions?: { [actionName: string]: ActionHandlerCaller } }\n\n// TODO infer actionNames from createStore arguments\n/**\n * Represents a store with additional actions.\n */\nexport type StoreWithActions<T> = Store<T> & { actions: { [actionName: string]: ActionHandlerCaller<T> } }\n\n// export type PendingAction<A> = `${A}Pending`\n// export type ErrorAction<A> = `${A}Error`\n// export type ActionName<A> = `${A}`\n\n// export type ActionsReturnType<A, TActionHandler> = Record<ActionName<A>, TActionHandler>\n\n// export type ActionsStateReturnType<A>\n// = Partial<Record<PendingAction<A>, boolean>> & Partial<Record<ErrorAction<A>, boolean>>\n\n\n// function invert<T, ActionName extends string>(\n// arr: ActionName[], state: Partial<T>, actionHandler: ActionHandlerCaller<T>,\n// ): Partial<T> & ActionsStateReturnType<ActionName> {\n// arr.forEach((x) => {\n// state[`${x}Error`] = true\n// state[`${x}Pending`] = true\n// })\n\n// return state as (Partial<T> & ActionsStateReturnType<ActionName>)\n// }\n\n// function invert2<T, A extends string>(\n// arr: A[], actions: ActionsReturnType<A>, actionHandler: ActionHandlerCaller<T>,\n// ): ActionsReturnType<A, ActionHandlerCaller<T>> {\n// arr.forEach((x) => {\n// actions[`${x}`] = actionHandler\n// })\n\n// return actions as ActionsReturnType<A>\n// }\n\n// function invert3<T, A extends string>(\n// arr: A[], actions: ActionsReturnType<A>, state: Partial<T>, actionHandler: ActionHandlerCaller<T>,\n// ): [Partial<T> & ActionsStateReturnType<A>, ActionsReturnType<A, ActionHandlerCaller<T>>] {\n// arr.forEach((x) => {\n// state[`${x}Error`] = actionHandler\n// state[`${x}Pending`] = actionHandler\n// actions[`${x}`] = actionHandler\n// })\n\n// return [state, actions] as [Partial<T> & ActionsStateReturnType<A>, ActionsReturnType<A, ActionHandlerCaller<T>>]\n// }\n\n// const example = invert(['foo', 'bar', 'baz'], {}, () => {})\n// const example2 = invert2(['foo', 'bar', 'baz'], {}, () => {})\n// const example3 = invert3(['foo', 'bar', 'baz'], {}, () => {})\n\n\n\n/**\n * Represents an action handler function.\n */\nexport type ActionHandler<T> = (\n getState: Store<T>['getState'], // Function to get the current state of the store\n setState: Store<T>['setState'], // Function to set the state of the store\n ...rest: unknown[]\n) => void | Partial<T> | Promise<void | Partial<T>>\n\n/**\n * Represents an reducer function.\n */\nexport type Reducer<T> = (\n state: Partial<T>,\n action: string,\n ...rest: unknown[]\n) => Partial<T>\n\n\n/**\n * Represents a function that calls an action handler.\n */\nexport type ActionHandlerCaller<T> = (...args: unknown[]) => void | Partial<T> | Promise<void | Partial<T>>\n\n\ntype Actions<T> = { [key: string]: ActionHandler<T>}\n/**\n * Creates a new store.\n * @param initialState - The initial state of the store.\n * @param actions - Optional actions for the store.\n * @returns The created store.\n */\nexport const createStore = <T>(\n initialState: Partial<T>,\n actions?: Actions<T>,\n reducer?: Reducer<T>,\n): Store<T> | StoreWithActions<T> => {\n let currentState: Partial<T> = initialState\n const listeners = new Set<Listener<T>>()\n\n /**\n * Gets the current state of the store.\n * @returns The current state of the store.\n */\n const getState = (): Partial<T> => currentState\n\n // TODO debounce, batch? what is the meaningful time between setState ofr UI to be rendered and registerd by User?\n /**\n * Sets the state of the store.\n * @param newState - The new state to set.\n * @returns A promise that resolves to the new state.\n */\n const setState = async (newState: Partial<T>): Promise<Partial<T>> => {\n currentState = newState\n\n // eslint-disable-next-line no-restricted-syntax\n for (const listener of listeners) {\n // has Listener selector?\n const selector: Selector<T> | undefined = listener?.selector\n\n // TODO compare selected value to the previous values of that listener/selector pair\n // if listener.previousValue === selector(currentState) no call\n // else listener.previousValue = selector(currentState) and call\n // l1 cache, weak references?\n const newValue: SelectedValueType<T> = selector ? selector(currentState) : currentState\n\n // TODO plugin equality\n if (listener.previousValue === undefined || listener.previousValue !== newValue) {\n listener.previousValue = newValue\n // eslint-disable-next-line no-await-in-loop\n await listener(newValue as Partial<T>)\n }\n }\n return currentState\n }\n\n /**\n * Represents the basic API of the store.\n */\n const storeBaseicApi: Store<T> = {\n /**\n * Get the current state of the store.\n * @returns The current state of the store.\n */\n getState,\n /**\n * Set the state of the store.\n * @param state - The new state to set.\n * @returns A promise that resolves to the new state.\n */\n setState,\n /**\n * Subscribe a listener to the store.\n * @param listener - The listener function to be subscribed.\n * @returns A function to unsubscribe the listener.\n */\n subscribe: (listener: Listener<T>, selector?: Selector<T>) => {\n if (selector && listener.selector && listener.selector !== selector) {\n throw new Error('Error, mismatch selector, listener.selector !== selector.')\n }\n if (selector && !listener.selector) {\n // eslint-disable-next-line no-param-reassign\n listener.selector = selector\n }\n\n if (listener.selector) {\n // setting the previousValue for the next cache/equality check\n // eslint-disable-next-line no-param-reassign\n listener.previousValue = listener.selector(getState())\n }\n\n listeners.add(listener)\n return () => listeners.delete(listener)\n },\n /**\n * Unsubscribe a listener from the store.\n * @param listener - The listener function to be unsubscribed.\n */\n unsubscribe: (listener: Listener<T>) => {\n listeners.delete(listener)\n },\n }\n\n /**\n * Resolves the actions and creates action handlers.\n */\n const resolvedActions: Actions<T> | null | undefined\n = actions ? Object.entries(actions)?.reduce(\n (\n aggregator: Record<string, ActionHandlerCaller<T>>,\n [actionName, actionHandler]: [string, ActionHandler<T>],\n ) => {\n // eslint-disable-next-line no-param-reassign\n aggregator[actionName] = async(...rest: unknown[]): Promise<void | Partial<T>> => {\n // TODO try to not call subscriber too many times becuase of Error and Pending values\n const isAsync = isFunctionAsync(actionHandler as () => unknown)\n\n if (isAsync) {\n setState({\n ...getState(),\n [`${actionName}Error`]: null,\n [`${actionName}Pending`]: true,\n })\n }\n\n try {\n const resultOfAction = await actionHandler(getState, setState, ...rest)\n\n // TODO try to mutate state only once with the results, that means pass custom setState to action,\n // so that it would matk pending and error already inside action\n if (reducer) {\n setState(reducer(getState(), actionName, ...rest))\n }\n\n if (isAsync) {\n setState({ ...getState(), [`${actionName}Pending`]: false })\n }\n\n return resultOfAction\n } catch (error) {\n if (isAsync) {\n setState({\n ...getState(),\n [`${actionName}Pending`]: false,\n [`${actionName}Error`]: error,\n })\n }\n throw error\n }\n }\n\n return aggregator\n },\n {},\n ) : null\n\n /**\n * Represents the store combined with actions.\n */\n const storeCombinedWithActions = {\n ...storeBaseicApi,\n ...(resolvedActions ? { actions: { ...resolvedActions } } : {}),\n }\n\n return resolvedActions\n ? storeCombinedWithActions as StoreWithActions<T>\n // ? storeCombinedWithActions as StoreWithActions<T> & ActionsStateReturnType<A>\n : storeCombinedWithActions as Store<T>\n}\n"],"names":["createStore","initialState","actions","reducer","currentState","listeners","Set","getState","setState","_ref","_asyncToGenerator","newState","listener","selector","newValue","undefined","previousValue","_x","apply","this","arguments","storeBaseicApi","subscribe","Error","add","delete","unsubscribe","resolvedActions","Object","entries","reduce","aggregator","_ref2","actionName","actionHandler","isAsync","isFunctionAsync","_len","length","rest","Array","_key","resultOfAction","error","storeCombinedWithActions"],"mappings":"2IAgJ2BA,CACzBC,EACAC,EACAC,KAEA,IAAIC,EAA2BH,EAC/B,MAAMI,EAAY,IAAIC,IAMhBC,EAAWA,IAAkBH,EAQ7BI,EAAQ,WAAA,IAAAC,EAAAC,oBAAG,UAAOC,GACtBP,EAAeO,EAGf,IAAK,MAAMC,KAAYP,EAAW,CAEhC,MAAMQ,EAAoCD,GAAUC,SAM9CC,EAAiCD,EAAWA,EAAST,GAAgBA,OAG5CW,IAA3BH,EAASI,eAA+BJ,EAASI,gBAAkBF,IACrEF,EAASI,cAAgBF,QAEnBF,EAASE,GAEnB,CACA,OAAOV,KACR,OAtBKI,SAAQS,GAAA,OAAAR,EAAAS,MAAAC,KAAAC,UAAA,EAAA,GA2BRC,EAA2B,CAK/Bd,WAMAC,WAMAc,UAAWA,CAACV,EAAuBC,KACjC,GAAIA,GAAYD,EAASC,UAAYD,EAASC,WAAaA,EACzD,MAAM,IAAIU,MAAM,6DAclB,OAZIV,IAAaD,EAASC,WAExBD,EAASC,SAAWA,GAGlBD,EAASC,WAGXD,EAASI,cAAgBJ,EAASC,SAASN,MAG7CF,EAAUmB,IAAIZ,GACP,IAAMP,EAAUoB,OAAOb,EAAS,EAMzCc,YAAcd,IACZP,EAAUoB,OAAOb,EAAS,GAOxBe,EACFzB,EAAU0B,OAAOC,QAAQ3B,IAAU4B,QACnC,CACEC,EAAkDC,KAE/C,IADFC,EAAYC,GAA0CF,EAyCvD,OAtCAD,EAAWE,GAAWvB,EAAAA,kBAAG,YAEvB,MAAMyB,EAAUC,kBAAgBF,GAE5BC,GACF3B,EAAS,IACJD,IACH,CAAC,GAAG0B,UAAoB,KACxB,CAAC,GAAGA,aAAsB,IAI9B,IAAI,IAAA,IAAAI,EAAAjB,UAAAkB,OAZ4BC,EAAIC,IAAAA,MAAAH,GAAAI,EAAA,EAAAA,EAAAJ,EAAAI,IAAJF,EAAIE,GAAArB,UAAAqB,GAalC,MAAMC,QAAuBR,EAAc3B,EAAUC,KAAa+B,GAYlE,OARIpC,GACFK,EAASL,EAAQI,IAAY0B,KAAeM,IAG1CJ,GACF3B,EAAS,IAAKD,IAAY,CAAC,GAAG0B,aAAsB,IAG/CS,CACR,CAAC,MAAOC,GAQP,MAPIR,GACF3B,EAAS,IACJD,IACH,CAAC,GAAG0B,aAAsB,EAC1B,CAAC,GAAGA,UAAoBU,IAGtBA,CACR,KAGKZ,CAAU,GAEnB,CAAA,GACE,KAKAa,EAA2B,IAC5BvB,KACCM,EAAkB,CAAEzB,QAAS,IAAKyB,IAAsB,IAG9D,OACIiB,CAEoC"}
@@ -1,2 +1,2 @@
1
- import{extends as o}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import{memo as e,useMemo as t}from"react";import i from"./icon.module.scss.js";import{unifyIconUrl as r}from"./unifyIconUrl.js";const n=e((e=>{let{iconUrl:n,minWidth:c,minHeight:l,size:s,fontSize:a,width:m,height:u,color:h="currentColor",className:p="",children:d,style:f,onClick:b,...g}=e;const y=n&&r(n),j=t((()=>({"--min-width":c||s||m||"auto","--min-height":l||s||u||"auto","--width":s||m||"1rem","--height":s||u||"1rem",...a?{fontSize:a}:{},...y?{"--icon-url":`url(${y})`}:{},...y?{"--icon-color":h}:{"--icon-content-color":h},...b?{cursor:"pointer"}:{},...f})),[c,s,m,l,u,a,y,h,b,f]),w=t((()=>b?{onClick:b,role:"button",tabIndex:-1}:{}),[b]);return React.createElement("span",o({},g,w,{className:`${i["icon-base"]} icon-base ${p}`,style:j}),!y&&d&&d)}));n.displayName="IconBase";export{n as IconBase};
1
+ import{extends as o}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import{memo as e,useMemo as t}from"react";import i from"./icon.module.scss.js";import{unifyIconUrl as n}from"./unifyIconUrl.js";const r=e((e=>{let{iconUrl:r,minWidth:c,minHeight:l,size:s,fontSize:a,width:m,height:u,color:h="currentColor",className:p="",children:d,icon:f,style:b,onClick:g,...y}=e;const j=r&&n(r),w=t((()=>({"--min-width":c||s||m||"auto","--min-height":l||s||u||"auto","--width":s||m||"1rem","--height":s||u||"1rem",...a?{fontSize:a}:{},...j?{"--icon-url":`url(${j})`}:{},...j?{"--icon-color":h}:{"--icon-content-color":h},...g?{cursor:"pointer"}:{},...b})),[c,s,m,l,u,a,j,h,g,b]),x=t((()=>g?{onClick:g,role:"button",tabIndex:-1}:{}),[g]);return React.createElement("span",o({},y,x,{className:`${i["icon-base"]} icon-base ${p}`,style:w}),!j&&d&&d,!j&&f&&f)}));r.displayName="IconBase";export{r as IconBase};
2
2
  //# sourceMappingURL=IconBase.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IconBase.js","sources":["../../../../../../../../src/core/ui/components/icon/IconBase.tsx"],"sourcesContent":["import { CSSProperties, memo, useMemo, FC, PropsWithChildren, MouseEvent, KeyboardEvent } from 'react'\n\nimport classes from './icon.module.scss'\nimport { unifyIconUrl } from './unifyIconUrl'\n\n\nexport type IconBaseProps = PropsWithChildren<unknown> & {\n id?: string\n iconUrl?: string | null\n minWidth?: string | null\n minHeight?: string | null\n width?: string | null\n height?: string | null\n size?: string | null\n fontSize?: string | null\n color?: string | null\n className?: string | null\n style?: CSSProperties | null\n onClick?: (event: MouseEvent | KeyboardEvent) => void\n}\n\nexport const IconBase: FC<IconBaseProps> = memo<IconBaseProps>(({\n iconUrl, minWidth, minHeight, size,\n fontSize, width, height, color = 'currentColor', className = '', children, style, onClick, ...props\n}: IconBaseProps) => {\n const unifiedIconUrl = iconUrl && unifyIconUrl(iconUrl)\n\n const styles = useMemo(() => (\n {\n '--min-width': minWidth || size || width || 'auto',\n '--min-height': minHeight || size || height || 'auto',\n '--width': size || width || '1rem',\n '--height': size || height || '1rem',\n ...(fontSize ? { fontSize } : {}),\n ...(unifiedIconUrl ? { '--icon-url': `url(${unifiedIconUrl})` } : {}),\n ...(unifiedIconUrl ? { '--icon-color': color } : { '--icon-content-color': color }),\n ...(onClick ? { cursor: 'pointer' } : {}),\n ...style,\n }\n ), [minWidth, size, width, minHeight, height, fontSize, unifiedIconUrl, color, onClick, style])\n\n const onClickProps = useMemo(() => (onClick ? ({\n onClick,\n role: 'button',\n tabIndex: -1,\n }) : {}), [onClick])\n\n return (\n <span\n {...props}\n {...onClickProps}\n className={`${classes['icon-base']} icon-base ${className}`}\n style={styles as CSSProperties}\n >\n {(!unifiedIconUrl && children) && children}\n </span>\n )\n})\n\nIconBase.displayName = 'IconBase'\n"],"names":["IconBase","memo","_ref","iconUrl","minWidth","minHeight","size","fontSize","width","height","color","className","children","style","onClick","props","unifiedIconUrl","unifyIconUrl","styles","useMemo","cursor","onClickProps","role","tabIndex","React","createElement","_extends","classes","displayName"],"mappings":"qNAqBaA,EAA8BC,GAAoBC,IAG1C,IAH2CC,QAC9DA,EAAOC,SAAEA,EAAQC,UAAEA,EAASC,KAAEA,EAAIC,SAClCA,EAAQC,MAAEA,EAAKC,OAAEA,EAAMC,MAAEA,EAAQ,eAAcC,UAAEA,EAAY,GAAEC,SAAEA,EAAQC,MAAEA,EAAKC,QAAEA,KAAYC,GAChFb,EACd,MAAMc,EAAiBb,GAAWc,EAAad,GAEzCe,EAASC,GAAQ,KACrB,CACE,cAAef,GAAYE,GAAQE,GAAS,OAC5C,eAAgBH,GAAaC,GAAQG,GAAU,OAC/C,UAAWH,GAAQE,GAAS,OAC5B,WAAYF,GAAQG,GAAU,UAC1BF,EAAW,CAAEA,YAAa,MAC1BS,EAAiB,CAAE,aAAc,OAAOA,MAAsB,MAC9DA,EAAiB,CAAE,eAAgBN,GAAU,CAAE,uBAAwBA,MACvEI,EAAU,CAAEM,OAAQ,WAAc,MACnCP,KAEJ,CAACT,EAAUE,EAAME,EAAOH,EAAWI,EAAQF,EAAUS,EAAgBN,EAAOI,EAASD,IAElFQ,EAAeF,GAAQ,IAAOL,EAAW,CAC7CA,UACAQ,KAAM,SACNC,UAAW,GACR,CAAG,GAAE,CAACT,IAEX,OACEU,MAAAC,cAAA,OAAAC,EACMX,CAAAA,EAAAA,EACAM,EAAY,CAChBV,UAAW,GAAGgB,EAAQ,0BAA0BhB,IAChDE,MAAOK,KAEJF,GAAkBJ,GAAaA,EAC7B,IAIXZ,EAAS4B,YAAc"}
1
+ {"version":3,"file":"IconBase.js","sources":["../../../../../../../../src/core/ui/components/icon/IconBase.tsx"],"sourcesContent":["import { CSSProperties, memo, useMemo, FC, PropsWithChildren, MouseEvent, KeyboardEvent, ReactNode } from 'react'\n\nimport classes from './icon.module.scss'\nimport { unifyIconUrl } from './unifyIconUrl'\n\n\nexport type IconBaseProps = PropsWithChildren<unknown> & {\n id?: string\n iconUrl?: string | null\n minWidth?: string | null\n minHeight?: string | null\n width?: string | null\n height?: string | null\n size?: string | null\n fontSize?: string | null\n color?: string | null\n className?: string | null\n style?: CSSProperties | null\n onClick?: (event: MouseEvent | KeyboardEvent) => void\n icon?: ReactNode\n}\n\nexport const IconBase: FC<IconBaseProps> = memo<IconBaseProps>(({\n iconUrl, minWidth, minHeight, size,\n fontSize, width, height, color = 'currentColor', className = '', children, icon, style, onClick, ...props\n}: IconBaseProps) => {\n const unifiedIconUrl = iconUrl && unifyIconUrl(iconUrl)\n\n const styles = useMemo(() => (\n {\n '--min-width': minWidth || size || width || 'auto',\n '--min-height': minHeight || size || height || 'auto',\n '--width': size || width || '1rem',\n '--height': size || height || '1rem',\n ...(fontSize ? { fontSize } : {}),\n ...(unifiedIconUrl ? { '--icon-url': `url(${unifiedIconUrl})` } : {}),\n ...(unifiedIconUrl ? { '--icon-color': color } : { '--icon-content-color': color }),\n ...(onClick ? { cursor: 'pointer' } : {}),\n ...style,\n }\n ), [minWidth, size, width, minHeight, height, fontSize, unifiedIconUrl, color, onClick, style])\n\n const onClickProps = useMemo(() => (onClick ? ({\n onClick,\n role: 'button',\n tabIndex: -1,\n }) : {}), [onClick])\n\n return (\n <span\n {...props}\n {...onClickProps}\n className={`${classes['icon-base']} icon-base ${className}`}\n style={styles as CSSProperties}\n >\n {(!unifiedIconUrl && children) && children}\n {(!unifiedIconUrl && icon) && icon}\n </span>\n )\n})\n\nIconBase.displayName = 'IconBase'\n"],"names":["IconBase","memo","_ref","iconUrl","minWidth","minHeight","size","fontSize","width","height","color","className","children","icon","style","onClick","props","unifiedIconUrl","unifyIconUrl","styles","useMemo","cursor","onClickProps","role","tabIndex","React","createElement","_extends","classes","displayName"],"mappings":"qNAsBaA,EAA8BC,GAAoBC,IAG1C,IAH2CC,QAC9DA,EAAOC,SAAEA,EAAQC,UAAEA,EAASC,KAAEA,EAAIC,SAClCA,EAAQC,MAAEA,EAAKC,OAAEA,EAAMC,MAAEA,EAAQ,eAAcC,UAAEA,EAAY,GAAEC,SAAEA,EAAQC,KAAEA,EAAIC,MAAEA,EAAKC,QAAEA,KAAYC,GACtFd,EACd,MAAMe,EAAiBd,GAAWe,EAAaf,GAEzCgB,EAASC,GAAQ,KACrB,CACE,cAAehB,GAAYE,GAAQE,GAAS,OAC5C,eAAgBH,GAAaC,GAAQG,GAAU,OAC/C,UAAWH,GAAQE,GAAS,OAC5B,WAAYF,GAAQG,GAAU,UAC1BF,EAAW,CAAEA,YAAa,MAC1BU,EAAiB,CAAE,aAAc,OAAOA,MAAsB,MAC9DA,EAAiB,CAAE,eAAgBP,GAAU,CAAE,uBAAwBA,MACvEK,EAAU,CAAEM,OAAQ,WAAc,MACnCP,KAEJ,CAACV,EAAUE,EAAME,EAAOH,EAAWI,EAAQF,EAAUU,EAAgBP,EAAOK,EAASD,IAElFQ,EAAeF,GAAQ,IAAOL,EAAW,CAC7CA,UACAQ,KAAM,SACNC,UAAW,GACR,CAAG,GAAE,CAACT,IAEX,OACEU,MAAAC,cAAA,OAAAC,EACMX,CAAAA,EAAAA,EACAM,EAAY,CAChBX,UAAW,GAAGiB,EAAQ,0BAA0BjB,IAChDG,MAAOK,KAEJF,GAAkBL,GAAaA,GAC/BK,GAAkBJ,GAASA,EACzB,IAIXb,EAAS6B,YAAc"}