@interopio/groups-ui-react 2.1.0 → 2.2.1
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.
- package/README.md +1 -1
- package/dist/cjs/defaultComponents/buttons/OverflowButton.d.ts +4 -0
- package/dist/cjs/defaultComponents/popups/TabOverflowPopup.d.ts +4 -0
- package/dist/cjs/index.d.ts +6 -4
- package/dist/cjs/index.js +92 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/api.d.ts +10 -1
- package/dist/cjs/types/defaultComponents.d.ts +2 -0
- package/dist/cjs/types/internal.d.ts +19 -0
- package/dist/cjs/webGroupsManager.d.ts +2 -0
- package/dist/cjs/webGroupsStore.d.ts +3 -1
- package/dist/esm/defaultComponents/buttons/OverflowButton.d.ts +4 -0
- package/dist/esm/defaultComponents/popups/TabOverflowPopup.d.ts +4 -0
- package/dist/esm/index.d.ts +6 -4
- package/dist/esm/index.js +91 -6
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/api.d.ts +10 -1
- package/dist/esm/types/defaultComponents.d.ts +2 -0
- package/dist/esm/types/internal.d.ts +19 -0
- package/dist/esm/webGroupsManager.d.ts +2 -0
- package/dist/esm/webGroupsStore.d.ts +3 -1
- package/dist/styles/groups.css +129 -5
- package/dist/styles/vars.css +44 -16
- package/package.json +3 -2
package/dist/esm/types/api.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { Bounds, ButtonProps, ToggleButtonProps } from "./internal";
|
|
2
|
+
import { Bounds, ButtonProps, OverflowedTabInfo, ToggleButtonProps } from "./internal";
|
|
3
3
|
import { CustomButtonProps } from "./defaultComponents";
|
|
4
4
|
export interface ChannelProps {
|
|
5
5
|
visible: boolean;
|
|
@@ -40,6 +40,13 @@ export interface BelowTabsProps {
|
|
|
40
40
|
frameId: string;
|
|
41
41
|
selectedWindow: string;
|
|
42
42
|
}
|
|
43
|
+
export interface TabOverflowPopupProps {
|
|
44
|
+
frameId: string;
|
|
45
|
+
select: (windowId: string) => void;
|
|
46
|
+
close: (windowId: string) => void;
|
|
47
|
+
hiddenTabsToTheLeft: OverflowedTabInfo[];
|
|
48
|
+
hiddenTabsToTheRight: OverflowedTabInfo[];
|
|
49
|
+
}
|
|
43
50
|
export interface CaptionEditorProps {
|
|
44
51
|
show: boolean;
|
|
45
52
|
text?: string;
|
|
@@ -99,6 +106,7 @@ export interface AfterTabsProps {
|
|
|
99
106
|
selectedWindow: string;
|
|
100
107
|
}
|
|
101
108
|
export interface TabHeaderButtonsProps {
|
|
109
|
+
overflow?: ButtonProps;
|
|
102
110
|
feedback?: ButtonProps;
|
|
103
111
|
clone?: ButtonProps;
|
|
104
112
|
sticky?: ToggleButtonProps;
|
|
@@ -138,6 +146,7 @@ export interface GroupProps {
|
|
|
138
146
|
After?: React.ComponentType<AfterTabsProps>;
|
|
139
147
|
Buttons?: React.ComponentType<TabHeaderButtonsProps>;
|
|
140
148
|
Below?: React.ComponentType<BelowTabsProps>;
|
|
149
|
+
OverflowPopup?: React.ComponentType<TabOverflowPopupProps>;
|
|
141
150
|
};
|
|
142
151
|
html?: {
|
|
143
152
|
Buttons?: React.ComponentType<HtmlButtonsProps>;
|
|
@@ -32,6 +32,8 @@ export interface UnlockButtonProps extends ButtonProps {
|
|
|
32
32
|
}
|
|
33
33
|
export interface MinimizeButtonProps extends ButtonProps {
|
|
34
34
|
}
|
|
35
|
+
export interface OverflowButtonProps extends ButtonProps {
|
|
36
|
+
}
|
|
35
37
|
export interface MaximizeButtonProps extends ButtonProps {
|
|
36
38
|
}
|
|
37
39
|
export interface RestoreButtonProps extends ButtonProps {
|
|
@@ -32,6 +32,7 @@ export interface GroupWrapperProps {
|
|
|
32
32
|
onCreateAfterTabsComponentRequested?: (options: CreateFrameElementRequestOptions) => void;
|
|
33
33
|
onUpdateAfterTabsComponentRequested?: (options: CreateFrameElementRequestOptions) => void;
|
|
34
34
|
onCreateTabHeaderButtonsRequested?: (options: CreateButtonsOptions) => void;
|
|
35
|
+
onCreateTabOverflowPopupRequested?: (options: CreateTabOverflowPopupRequestOptions) => void;
|
|
35
36
|
onCreateBelowTabsRequested?: (options: CreateFrameElementRequestOptions) => void;
|
|
36
37
|
onUpdateBelowTabsRequested?: (options: CreateFrameElementRequestOptions) => void;
|
|
37
38
|
onUpdateFrameRequested?: (options: UpdateFrameRequestOptions) => void;
|
|
@@ -50,6 +51,7 @@ export interface GroupWrapperProps {
|
|
|
50
51
|
onRemoveTabRequested?: (options: RemoveRequestOptions) => void;
|
|
51
52
|
onRemoveAfterTabsComponentRequested?: (options: RemoveRequestOptions) => void;
|
|
52
53
|
onRemoveTabHeaderButtonsRequested?: (options: RemoveRequestOptions) => void;
|
|
54
|
+
onRemoveTabOverflowPopupRequested?: (options: RemoveRequestOptions) => void;
|
|
53
55
|
onRemoveBelowTabsRequested?: (options: RemoveRequestOptions) => void;
|
|
54
56
|
onShowCaptionEditorRequested?: (targetType: TargetType, targetId: string, text: string) => void;
|
|
55
57
|
onCommitCaptionEditingRequested?: (targetType: TargetType, targetId: string) => void;
|
|
@@ -128,6 +130,10 @@ export interface UpdateCustomButtonOptions {
|
|
|
128
130
|
imageData: string;
|
|
129
131
|
}
|
|
130
132
|
export interface CreateButtonsOptions extends CreateFrameElementRequestOptions {
|
|
133
|
+
overflow: {
|
|
134
|
+
tooltip: string;
|
|
135
|
+
visible: boolean;
|
|
136
|
+
};
|
|
131
137
|
feedback: {
|
|
132
138
|
tooltip: string;
|
|
133
139
|
visible: boolean;
|
|
@@ -185,6 +191,14 @@ export interface CreateElementRequestOptions extends BaseElementOptions {
|
|
|
185
191
|
export interface CreateFrameElementRequestOptions extends CreateElementRequestOptions {
|
|
186
192
|
selectedWindow: string;
|
|
187
193
|
}
|
|
194
|
+
export interface OverflowedTabInfo {
|
|
195
|
+
title: string;
|
|
196
|
+
windowId: string;
|
|
197
|
+
}
|
|
198
|
+
export interface CreateTabOverflowPopupRequestOptions extends CreateElementRequestOptions {
|
|
199
|
+
hiddenTabsToTheLeft: OverflowedTabInfo[];
|
|
200
|
+
hiddenTabsToTheRight: OverflowedTabInfo[];
|
|
201
|
+
}
|
|
188
202
|
export interface CreateFrameLoadingAnimationRequestOptions extends CreateFrameElementRequestOptions {
|
|
189
203
|
show: boolean;
|
|
190
204
|
}
|
|
@@ -197,6 +211,7 @@ export declare enum TargetType {
|
|
|
197
211
|
HtmlButtons = "html"
|
|
198
212
|
}
|
|
199
213
|
export declare enum StandardButtons {
|
|
214
|
+
Overflow = "overflow",
|
|
200
215
|
Feedback = "feedback",
|
|
201
216
|
Clone = "clone",
|
|
202
217
|
Sticky = "sticky",
|
|
@@ -244,6 +259,9 @@ export interface ElementCreationWrapperState {
|
|
|
244
259
|
tabHeaderButtons: {
|
|
245
260
|
[targetId: string]: CreateButtonsOptions;
|
|
246
261
|
};
|
|
262
|
+
tabOverflowPopups: {
|
|
263
|
+
[targetId: string]: CreateTabOverflowPopupRequestOptions;
|
|
264
|
+
};
|
|
247
265
|
belowTabsZones: {
|
|
248
266
|
[targetId: string]: CreateFrameElementRequestOptions;
|
|
249
267
|
};
|
|
@@ -266,6 +284,7 @@ export interface ExternalLibraryFactory {
|
|
|
266
284
|
onCaptionEditorVisibleChanged(targetType: TargetType, targetId: string, visible: boolean): void;
|
|
267
285
|
onCaptionEditorBoundsChanged(targetType: TargetType, targetId: string, bounds: Bounds): void;
|
|
268
286
|
commitCaptionEditing(targetType: TargetType, targetId: string, text: string): void;
|
|
287
|
+
selectTab(windowId: string): void;
|
|
269
288
|
}
|
|
270
289
|
export interface WebGroupsManager {
|
|
271
290
|
init: (factory?: any) => void;
|
|
@@ -19,6 +19,7 @@ declare class WebGroupsManagerDecorator {
|
|
|
19
19
|
onMinimizeButtonClick(targetType: TargetType, targetId: string): void;
|
|
20
20
|
onLockButtonClick(targetType: TargetType, targetId: string): void;
|
|
21
21
|
onUnlockButtonClick(targetType: TargetType, targetId: string): void;
|
|
22
|
+
onOverflowButtonClick(targetType: TargetType, targetId: string): void;
|
|
22
23
|
onFeedbackButtonClick(targetType: TargetType, targetId: string): void;
|
|
23
24
|
onCloneButtonClick(targetType: TargetType, targetId: string): void;
|
|
24
25
|
onStickyButtonClick(targetType: TargetType, targetId: string): void;
|
|
@@ -34,6 +35,7 @@ declare class WebGroupsManagerDecorator {
|
|
|
34
35
|
commitCaptionEditing(targetType: TargetType, targetId: string, text: string): void;
|
|
35
36
|
onCommitCaptionEditingRequested(targetType: TargetType, targetId: string, callback: () => void): () => void;
|
|
36
37
|
requestCommitCaptionEditing(targetType: TargetType, targetId: string): void;
|
|
38
|
+
selectTab(windowId: string): void;
|
|
37
39
|
}
|
|
38
40
|
declare const _default: WebGroupsManagerDecorator;
|
|
39
41
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CreateElementRequestOptions, CreateFrameCaptionBarRequestOptions, CreateFrameElementRequestOptions, CreateGroupCaptionBarRequestOptions, CreateButtonsOptions, CreateTabRequestOptions, ElementCreationWrapperState, RemoveRequestOptions, TargetType, UpdateFrameCaptionBarRequestOptions, UpdateGroupCaptionBarRequestOptions, UpdateStandardButtonRequestOptions, UpdateFrameRequestOptions, CreateFrameLoadingAnimationRequestOptions, UpdateCustomButtonsRequestOptions } from "./types/internal";
|
|
1
|
+
import { CreateElementRequestOptions, CreateFrameCaptionBarRequestOptions, CreateFrameElementRequestOptions, CreateGroupCaptionBarRequestOptions, CreateButtonsOptions, CreateTabRequestOptions, ElementCreationWrapperState, RemoveRequestOptions, TargetType, UpdateFrameCaptionBarRequestOptions, UpdateGroupCaptionBarRequestOptions, UpdateStandardButtonRequestOptions, UpdateFrameRequestOptions, CreateFrameLoadingAnimationRequestOptions, UpdateCustomButtonsRequestOptions, CreateTabOverflowPopupRequestOptions } from "./types/internal";
|
|
2
2
|
declare class WebGroupsStore {
|
|
3
3
|
private listeners;
|
|
4
4
|
private state;
|
|
@@ -19,6 +19,7 @@ declare class WebGroupsStore {
|
|
|
19
19
|
onCreateTabHeaderButtonsRequested: (options: CreateButtonsOptions) => void;
|
|
20
20
|
onCreateBelowTabsComponentRequested: (options: CreateFrameElementRequestOptions) => void;
|
|
21
21
|
onCreateHtmlButtonsRequested: (options: CreateButtonsOptions) => void;
|
|
22
|
+
onCreateTabOverflowPopupRequested: (options: CreateTabOverflowPopupRequestOptions) => void;
|
|
22
23
|
onUpdateHtmlButtonsRequested: (options: CreateButtonsOptions) => void;
|
|
23
24
|
onUpdateGroupCaptionBarRequested: (options: UpdateGroupCaptionBarRequestOptions) => void;
|
|
24
25
|
onUpdateFrameCaptionBarRequested: (options: UpdateFrameCaptionBarRequestOptions) => void;
|
|
@@ -45,6 +46,7 @@ declare class WebGroupsStore {
|
|
|
45
46
|
onRemoveTabHeaderButtonsRequested: (options: RemoveRequestOptions) => void;
|
|
46
47
|
onRemoveBelowTabsRequested: (options: RemoveRequestOptions) => void;
|
|
47
48
|
onRemoveHtmlButtonsRequested: (options: RemoveRequestOptions) => void;
|
|
49
|
+
onRemoveTabOverflowPopupRequested: (options: RemoveRequestOptions) => void;
|
|
48
50
|
onShowCaptionEditorRequested: (targetType: TargetType, targetId: string, text: string) => void;
|
|
49
51
|
onCommitCaptionEditingRequested: (targetType: TargetType, targetId: string) => void;
|
|
50
52
|
onHideCaptionEditorRequested: (targetType: TargetType, targetId: string) => void;
|
package/dist/styles/groups.css
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@import "vars.css";
|
|
2
|
+
@import "../../node_modules/overlayscrollbars/styles/overlayscrollbars.css";
|
|
2
3
|
|
|
3
4
|
* {
|
|
4
5
|
box-sizing: border-box;
|
|
@@ -235,6 +236,10 @@ input {
|
|
|
235
236
|
content: "\e91f";
|
|
236
237
|
}
|
|
237
238
|
|
|
239
|
+
.t42-standard-button-overflow::before {
|
|
240
|
+
content: "\e91d";
|
|
241
|
+
}
|
|
242
|
+
|
|
238
243
|
.t42-standard-button-sticky::before {
|
|
239
244
|
content: var(--sticky-icon-off);
|
|
240
245
|
display: block;
|
|
@@ -434,8 +439,9 @@ input {
|
|
|
434
439
|
list-style-type: none;
|
|
435
440
|
position: relative;
|
|
436
441
|
padding: 0px;
|
|
437
|
-
margin:
|
|
442
|
+
margin: 0px;
|
|
438
443
|
border-top-right-radius: var(--border-radius-4);
|
|
444
|
+
-webkit-app-region: drag;
|
|
439
445
|
}
|
|
440
446
|
|
|
441
447
|
.t42-react-tab {
|
|
@@ -453,6 +459,7 @@ input {
|
|
|
453
459
|
position: relative;
|
|
454
460
|
padding: 0px var(--spacing-8);
|
|
455
461
|
margin-right: var(--spacing-2);
|
|
462
|
+
margin-top: var(--spacing-4);
|
|
456
463
|
width: 150px;
|
|
457
464
|
min-width: var(--t42-tab-bar-tab-min-width);
|
|
458
465
|
max-width: var(--t42-tab-bar-tab-width);
|
|
@@ -460,9 +467,8 @@ input {
|
|
|
460
467
|
border-top-right-radius: var(--spacing-4);
|
|
461
468
|
border-top-left-radius: var(--spacing-4);
|
|
462
469
|
transition-property: padding;
|
|
463
|
-
|
|
464
470
|
container-type: size;
|
|
465
|
-
|
|
471
|
+
-webkit-app-region: no-drag;
|
|
466
472
|
}
|
|
467
473
|
|
|
468
474
|
.t42-tab::before {
|
|
@@ -619,14 +625,69 @@ input {
|
|
|
619
625
|
width: var(--t42-approaching-edge-size);
|
|
620
626
|
}
|
|
621
627
|
|
|
628
|
+
.t42-sizing-border-group {
|
|
629
|
+
pointer-events: none;
|
|
630
|
+
list-style-type: none;
|
|
631
|
+
display: flex;
|
|
632
|
+
margin: 0px;
|
|
633
|
+
padding: 0px;
|
|
634
|
+
flex-grow: 0;
|
|
635
|
+
flex-shrink: 0;
|
|
636
|
+
position: absolute;
|
|
637
|
+
overflow: hidden;
|
|
638
|
+
z-index: 100;
|
|
639
|
+
background-color: var(--t42-sizing-border-group-color);
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
.t42-vertical-sizing-border-group {
|
|
643
|
+
flex-direction: column;
|
|
644
|
+
cursor: ew-resize;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
.t42-horizontal-sizing-border-group {
|
|
648
|
+
flex-direction: row;
|
|
649
|
+
cursor: ns-resize;
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
.t42-sizing-border-group:hover {
|
|
653
|
+
background-color: var(--t42-hover-sizing-border-group-color);
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
.t42-active-sizing-border-group {
|
|
657
|
+
z-index: 200;
|
|
658
|
+
background-color: var(--t42-active-sizing-border-group-color);
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
.t42-active-sizing-border-group:hover {
|
|
662
|
+
background-color: var(--t42-active-sizing-border-group-color);
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
.t42-sizing-border {
|
|
666
|
+
pointer-events: auto;
|
|
667
|
+
margin: 0px;
|
|
668
|
+
padding: 0px;
|
|
669
|
+
flex-shrink: 0;
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
.t42-frame-sizing-border {
|
|
673
|
+
flex-grow: 0;
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
.t42-cross-sizing-border {
|
|
677
|
+
flex-grow: 1;
|
|
678
|
+
cursor: ne-resize;
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
.t42-active-sizing-border {
|
|
682
|
+
background-color: transparent;
|
|
683
|
+
}
|
|
684
|
+
|
|
622
685
|
.t42-skip-focus {
|
|
623
686
|
/* We used non-standard rule to have non-empty style */
|
|
624
687
|
-moz-user-focus: ignore;
|
|
625
688
|
}
|
|
626
689
|
|
|
627
|
-
|
|
628
690
|
@keyframes clipMe {
|
|
629
|
-
|
|
630
691
|
0%,
|
|
631
692
|
100% {
|
|
632
693
|
clip: rect(0, 25vh, 2px, 0);
|
|
@@ -727,3 +788,66 @@ input {
|
|
|
727
788
|
width: 0;
|
|
728
789
|
}
|
|
729
790
|
}
|
|
791
|
+
|
|
792
|
+
.os-scrollbar-horizontal {
|
|
793
|
+
z-index: 1001;
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
.t42-tabs-overflow .t42-tab {
|
|
797
|
+
flex-shrink: 0;
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
.t42-tabs-overflow .t42-tabs {
|
|
801
|
+
overflow: auto;
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
.t42-page-popup {
|
|
805
|
+
position: absolute;
|
|
806
|
+
z-index: 999;
|
|
807
|
+
margin-top: var(--t42-wg-tab-over-top-offset);
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
.t42-tab-overflow-popup {
|
|
811
|
+
display: flex;
|
|
812
|
+
flex-direction: column;
|
|
813
|
+
min-width: var(--t42-wg-tab-over-min-width);
|
|
814
|
+
max-width: var(--t42-wg-tab-over-max-width);
|
|
815
|
+
max-height: var(--t42-wg-tab-over-max-height);
|
|
816
|
+
padding: var(--t42-wg-tab-over-padding);
|
|
817
|
+
border-radius: var(--t42-wg-tab-over-border-radius);
|
|
818
|
+
overflow: auto;
|
|
819
|
+
background-color: var(--t42-wg-tab-over-background);
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
.t42-tab-overflow-popup li {
|
|
823
|
+
display: flex;
|
|
824
|
+
gap: var(--t42-wg-tab-over-item-gap);
|
|
825
|
+
align-items: center;
|
|
826
|
+
height: var(--t42-wg-tab-over-item-height);
|
|
827
|
+
padding: var(--t42-wg-tab-over-item-padding);
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
.t42-tab-overflow-popup li span {
|
|
831
|
+
flex-grow: 1;
|
|
832
|
+
overflow: hidden;
|
|
833
|
+
text-wrap: nowrap;
|
|
834
|
+
text-overflow: clip;
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
.t42-tab-overflow-popup li:not(.title):hover {
|
|
838
|
+
color: var(--t42-wg-tab-over-item-color-hover);
|
|
839
|
+
background-color: var(--t42-wg-tab-over-item-background-hover);
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
.t42-tab-overflow-popup hr {
|
|
843
|
+
height: var(--t42-wg-tab-over-separator-size);
|
|
844
|
+
margin: var(--t42-wg-tab-over-separator-space);
|
|
845
|
+
border: 0;
|
|
846
|
+
background-color: var(--t42-wg-tab-over-separator-color);
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
.t42-tab-overflow-popup .title {
|
|
850
|
+
color: var(--t42-wg-tab-over-item-title-color);
|
|
851
|
+
font-size: var(--t42-wg-tab-over-item-title-size);
|
|
852
|
+
letter-spacing: var(--t42-wg-tab-over-item-title-spacing);
|
|
853
|
+
}
|