@topconsultnpm/sdkui-react-beta 6.8.8 → 6.8.10

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.
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  interface AlertVariant {
2
3
  variant: string;
3
4
  color: string;
@@ -14,7 +15,7 @@ interface AlertModes {
14
15
  declare const ShowAlert: ({ mode, message, duration, title }: {
15
16
  mode: keyof AlertModes;
16
17
  message: string;
17
- duration?: number;
18
- title?: string;
18
+ duration?: number | undefined;
19
+ title?: string | undefined;
19
20
  }) => void;
20
21
  export default ShowAlert;
@@ -11,11 +11,282 @@ export declare const useContextMenu: () => {
11
11
  y: number;
12
12
  }>>;
13
13
  };
14
- export declare const Container: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
14
+ export declare const Container: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
15
15
  $top: number;
16
16
  $left: number;
17
- }>> & string;
18
- export declare const MenuOption: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
17
+ }>>;
18
+ export declare const MenuOption: import("styled-components").IStyledComponent<"web", {
19
+ ref?: React.LegacyRef<HTMLDivElement> | undefined;
20
+ key?: React.Key | null | undefined;
21
+ defaultChecked?: boolean | undefined;
22
+ defaultValue?: string | number | readonly string[] | undefined;
23
+ suppressContentEditableWarning?: boolean | undefined;
24
+ suppressHydrationWarning?: boolean | undefined;
25
+ accessKey?: string | undefined;
26
+ autoFocus?: boolean | undefined;
27
+ className?: string | undefined;
28
+ contentEditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
29
+ contextMenu?: string | undefined;
30
+ dir?: string | undefined;
31
+ draggable?: (boolean | "true" | "false") | undefined;
32
+ hidden?: boolean | undefined;
33
+ id?: string | undefined;
34
+ lang?: string | undefined;
35
+ nonce?: string | undefined;
36
+ placeholder?: string | undefined;
37
+ slot?: string | undefined;
38
+ spellCheck?: (boolean | "true" | "false") | undefined;
39
+ style?: React.CSSProperties | undefined;
40
+ tabIndex?: number | undefined;
41
+ title?: string | undefined;
42
+ translate?: "no" | "yes" | undefined;
43
+ radioGroup?: string | undefined;
44
+ role?: React.AriaRole | undefined;
45
+ about?: string | undefined;
46
+ content?: string | undefined;
47
+ datatype?: string | undefined;
48
+ inlist?: any;
49
+ prefix?: string | undefined;
50
+ property?: string | undefined;
51
+ rel?: string | undefined;
52
+ resource?: string | undefined;
53
+ rev?: string | undefined;
54
+ typeof?: string | undefined;
55
+ vocab?: string | undefined;
56
+ autoCapitalize?: string | undefined;
57
+ autoCorrect?: string | undefined;
58
+ autoSave?: string | undefined;
59
+ color?: string | undefined;
60
+ itemProp?: string | undefined;
61
+ itemScope?: boolean | undefined;
62
+ itemType?: string | undefined;
63
+ itemID?: string | undefined;
64
+ itemRef?: string | undefined;
65
+ results?: number | undefined;
66
+ security?: string | undefined;
67
+ unselectable?: "off" | "on" | undefined;
68
+ inputMode?: "none" | "numeric" | "decimal" | "search" | "text" | "tel" | "url" | "email" | undefined;
69
+ is?: string | undefined;
70
+ "aria-activedescendant"?: string | undefined;
71
+ "aria-atomic"?: (boolean | "true" | "false") | undefined;
72
+ "aria-autocomplete"?: "none" | "list" | "inline" | "both" | undefined;
73
+ "aria-braillelabel"?: string | undefined;
74
+ "aria-brailleroledescription"?: string | undefined;
75
+ "aria-busy"?: (boolean | "true" | "false") | undefined;
76
+ "aria-checked"?: boolean | "true" | "false" | "mixed" | undefined;
77
+ "aria-colcount"?: number | undefined;
78
+ "aria-colindex"?: number | undefined;
79
+ "aria-colindextext"?: string | undefined;
80
+ "aria-colspan"?: number | undefined;
81
+ "aria-controls"?: string | undefined;
82
+ "aria-current"?: boolean | "time" | "true" | "false" | "page" | "step" | "location" | "date" | undefined;
83
+ "aria-describedby"?: string | undefined;
84
+ "aria-description"?: string | undefined;
85
+ "aria-details"?: string | undefined;
86
+ "aria-disabled"?: (boolean | "true" | "false") | undefined;
87
+ "aria-dropeffect"?: "none" | "link" | "copy" | "execute" | "move" | "popup" | undefined;
88
+ "aria-errormessage"?: string | undefined;
89
+ "aria-expanded"?: (boolean | "true" | "false") | undefined;
90
+ "aria-flowto"?: string | undefined;
91
+ "aria-grabbed"?: (boolean | "true" | "false") | undefined;
92
+ "aria-haspopup"?: boolean | "dialog" | "menu" | "grid" | "listbox" | "tree" | "true" | "false" | undefined;
93
+ "aria-hidden"?: (boolean | "true" | "false") | undefined;
94
+ "aria-invalid"?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
95
+ "aria-keyshortcuts"?: string | undefined;
96
+ "aria-label"?: string | undefined;
97
+ "aria-labelledby"?: string | undefined;
98
+ "aria-level"?: number | undefined;
99
+ "aria-live"?: "off" | "assertive" | "polite" | undefined;
100
+ "aria-modal"?: (boolean | "true" | "false") | undefined;
101
+ "aria-multiline"?: (boolean | "true" | "false") | undefined;
102
+ "aria-multiselectable"?: (boolean | "true" | "false") | undefined;
103
+ "aria-orientation"?: "horizontal" | "vertical" | undefined;
104
+ "aria-owns"?: string | undefined;
105
+ "aria-placeholder"?: string | undefined;
106
+ "aria-posinset"?: number | undefined;
107
+ "aria-pressed"?: boolean | "true" | "false" | "mixed" | undefined;
108
+ "aria-readonly"?: (boolean | "true" | "false") | undefined;
109
+ "aria-relevant"?: "text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
110
+ "aria-required"?: (boolean | "true" | "false") | undefined;
111
+ "aria-roledescription"?: string | undefined;
112
+ "aria-rowcount"?: number | undefined;
113
+ "aria-rowindex"?: number | undefined;
114
+ "aria-rowindextext"?: string | undefined;
115
+ "aria-rowspan"?: number | undefined;
116
+ "aria-selected"?: (boolean | "true" | "false") | undefined;
117
+ "aria-setsize"?: number | undefined;
118
+ "aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
119
+ "aria-valuemax"?: number | undefined;
120
+ "aria-valuemin"?: number | undefined;
121
+ "aria-valuenow"?: number | undefined;
122
+ "aria-valuetext"?: string | undefined;
123
+ children?: React.ReactNode;
124
+ dangerouslySetInnerHTML?: {
125
+ __html: string | TrustedHTML;
126
+ } | undefined;
127
+ onCopy?: React.ClipboardEventHandler<HTMLDivElement> | undefined;
128
+ onCopyCapture?: React.ClipboardEventHandler<HTMLDivElement> | undefined;
129
+ onCut?: React.ClipboardEventHandler<HTMLDivElement> | undefined;
130
+ onCutCapture?: React.ClipboardEventHandler<HTMLDivElement> | undefined;
131
+ onPaste?: React.ClipboardEventHandler<HTMLDivElement> | undefined;
132
+ onPasteCapture?: React.ClipboardEventHandler<HTMLDivElement> | undefined;
133
+ onCompositionEnd?: React.CompositionEventHandler<HTMLDivElement> | undefined;
134
+ onCompositionEndCapture?: React.CompositionEventHandler<HTMLDivElement> | undefined;
135
+ onCompositionStart?: React.CompositionEventHandler<HTMLDivElement> | undefined;
136
+ onCompositionStartCapture?: React.CompositionEventHandler<HTMLDivElement> | undefined;
137
+ onCompositionUpdate?: React.CompositionEventHandler<HTMLDivElement> | undefined;
138
+ onCompositionUpdateCapture?: React.CompositionEventHandler<HTMLDivElement> | undefined;
139
+ onFocus?: React.FocusEventHandler<HTMLDivElement> | undefined;
140
+ onFocusCapture?: React.FocusEventHandler<HTMLDivElement> | undefined;
141
+ onBlur?: React.FocusEventHandler<HTMLDivElement> | undefined;
142
+ onBlurCapture?: React.FocusEventHandler<HTMLDivElement> | undefined;
143
+ onChange?: React.FormEventHandler<HTMLDivElement> | undefined;
144
+ onChangeCapture?: React.FormEventHandler<HTMLDivElement> | undefined;
145
+ onBeforeInput?: React.FormEventHandler<HTMLDivElement> | undefined;
146
+ onBeforeInputCapture?: React.FormEventHandler<HTMLDivElement> | undefined;
147
+ onInput?: React.FormEventHandler<HTMLDivElement> | undefined;
148
+ onInputCapture?: React.FormEventHandler<HTMLDivElement> | undefined;
149
+ onReset?: React.FormEventHandler<HTMLDivElement> | undefined;
150
+ onResetCapture?: React.FormEventHandler<HTMLDivElement> | undefined;
151
+ onSubmit?: React.FormEventHandler<HTMLDivElement> | undefined;
152
+ onSubmitCapture?: React.FormEventHandler<HTMLDivElement> | undefined;
153
+ onInvalid?: React.FormEventHandler<HTMLDivElement> | undefined;
154
+ onInvalidCapture?: React.FormEventHandler<HTMLDivElement> | undefined;
155
+ onLoad?: React.ReactEventHandler<HTMLDivElement> | undefined;
156
+ onLoadCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
157
+ onError?: React.ReactEventHandler<HTMLDivElement> | undefined;
158
+ onErrorCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
159
+ onKeyDown?: React.KeyboardEventHandler<HTMLDivElement> | undefined;
160
+ onKeyDownCapture?: React.KeyboardEventHandler<HTMLDivElement> | undefined;
161
+ onKeyPress?: React.KeyboardEventHandler<HTMLDivElement> | undefined;
162
+ onKeyPressCapture?: React.KeyboardEventHandler<HTMLDivElement> | undefined;
163
+ onKeyUp?: React.KeyboardEventHandler<HTMLDivElement> | undefined;
164
+ onKeyUpCapture?: React.KeyboardEventHandler<HTMLDivElement> | undefined;
165
+ onAbort?: React.ReactEventHandler<HTMLDivElement> | undefined;
166
+ onAbortCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
167
+ onCanPlay?: React.ReactEventHandler<HTMLDivElement> | undefined;
168
+ onCanPlayCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
169
+ onCanPlayThrough?: React.ReactEventHandler<HTMLDivElement> | undefined;
170
+ onCanPlayThroughCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
171
+ onDurationChange?: React.ReactEventHandler<HTMLDivElement> | undefined;
172
+ onDurationChangeCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
173
+ onEmptied?: React.ReactEventHandler<HTMLDivElement> | undefined;
174
+ onEmptiedCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
175
+ onEncrypted?: React.ReactEventHandler<HTMLDivElement> | undefined;
176
+ onEncryptedCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
177
+ onEnded?: React.ReactEventHandler<HTMLDivElement> | undefined;
178
+ onEndedCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
179
+ onLoadedData?: React.ReactEventHandler<HTMLDivElement> | undefined;
180
+ onLoadedDataCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
181
+ onLoadedMetadata?: React.ReactEventHandler<HTMLDivElement> | undefined;
182
+ onLoadedMetadataCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
183
+ onLoadStart?: React.ReactEventHandler<HTMLDivElement> | undefined;
184
+ onLoadStartCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
185
+ onPause?: React.ReactEventHandler<HTMLDivElement> | undefined;
186
+ onPauseCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
187
+ onPlay?: React.ReactEventHandler<HTMLDivElement> | undefined;
188
+ onPlayCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
189
+ onPlaying?: React.ReactEventHandler<HTMLDivElement> | undefined;
190
+ onPlayingCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
191
+ onProgress?: React.ReactEventHandler<HTMLDivElement> | undefined;
192
+ onProgressCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
193
+ onRateChange?: React.ReactEventHandler<HTMLDivElement> | undefined;
194
+ onRateChangeCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
195
+ onResize?: React.ReactEventHandler<HTMLDivElement> | undefined;
196
+ onResizeCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
197
+ onSeeked?: React.ReactEventHandler<HTMLDivElement> | undefined;
198
+ onSeekedCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
199
+ onSeeking?: React.ReactEventHandler<HTMLDivElement> | undefined;
200
+ onSeekingCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
201
+ onStalled?: React.ReactEventHandler<HTMLDivElement> | undefined;
202
+ onStalledCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
203
+ onSuspend?: React.ReactEventHandler<HTMLDivElement> | undefined;
204
+ onSuspendCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
205
+ onTimeUpdate?: React.ReactEventHandler<HTMLDivElement> | undefined;
206
+ onTimeUpdateCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
207
+ onVolumeChange?: React.ReactEventHandler<HTMLDivElement> | undefined;
208
+ onVolumeChangeCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
209
+ onWaiting?: React.ReactEventHandler<HTMLDivElement> | undefined;
210
+ onWaitingCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
211
+ onAuxClick?: React.MouseEventHandler<HTMLDivElement> | undefined;
212
+ onAuxClickCapture?: React.MouseEventHandler<HTMLDivElement> | undefined;
213
+ onClick?: React.MouseEventHandler<HTMLDivElement> | undefined;
214
+ onClickCapture?: React.MouseEventHandler<HTMLDivElement> | undefined;
215
+ onContextMenu?: React.MouseEventHandler<HTMLDivElement> | undefined;
216
+ onContextMenuCapture?: React.MouseEventHandler<HTMLDivElement> | undefined;
217
+ onDoubleClick?: React.MouseEventHandler<HTMLDivElement> | undefined;
218
+ onDoubleClickCapture?: React.MouseEventHandler<HTMLDivElement> | undefined;
219
+ onDrag?: React.DragEventHandler<HTMLDivElement> | undefined;
220
+ onDragCapture?: React.DragEventHandler<HTMLDivElement> | undefined;
221
+ onDragEnd?: React.DragEventHandler<HTMLDivElement> | undefined;
222
+ onDragEndCapture?: React.DragEventHandler<HTMLDivElement> | undefined;
223
+ onDragEnter?: React.DragEventHandler<HTMLDivElement> | undefined;
224
+ onDragEnterCapture?: React.DragEventHandler<HTMLDivElement> | undefined;
225
+ onDragExit?: React.DragEventHandler<HTMLDivElement> | undefined;
226
+ onDragExitCapture?: React.DragEventHandler<HTMLDivElement> | undefined;
227
+ onDragLeave?: React.DragEventHandler<HTMLDivElement> | undefined;
228
+ onDragLeaveCapture?: React.DragEventHandler<HTMLDivElement> | undefined;
229
+ onDragOver?: React.DragEventHandler<HTMLDivElement> | undefined;
230
+ onDragOverCapture?: React.DragEventHandler<HTMLDivElement> | undefined;
231
+ onDragStart?: React.DragEventHandler<HTMLDivElement> | undefined;
232
+ onDragStartCapture?: React.DragEventHandler<HTMLDivElement> | undefined;
233
+ onDrop?: React.DragEventHandler<HTMLDivElement> | undefined;
234
+ onDropCapture?: React.DragEventHandler<HTMLDivElement> | undefined;
235
+ onMouseDown?: React.MouseEventHandler<HTMLDivElement> | undefined;
236
+ onMouseDownCapture?: React.MouseEventHandler<HTMLDivElement> | undefined;
237
+ onMouseEnter?: React.MouseEventHandler<HTMLDivElement> | undefined;
238
+ onMouseLeave?: React.MouseEventHandler<HTMLDivElement> | undefined;
239
+ onMouseMove?: React.MouseEventHandler<HTMLDivElement> | undefined;
240
+ onMouseMoveCapture?: React.MouseEventHandler<HTMLDivElement> | undefined;
241
+ onMouseOut?: React.MouseEventHandler<HTMLDivElement> | undefined;
242
+ onMouseOutCapture?: React.MouseEventHandler<HTMLDivElement> | undefined;
243
+ onMouseOver?: React.MouseEventHandler<HTMLDivElement> | undefined;
244
+ onMouseOverCapture?: React.MouseEventHandler<HTMLDivElement> | undefined;
245
+ onMouseUp?: React.MouseEventHandler<HTMLDivElement> | undefined;
246
+ onMouseUpCapture?: React.MouseEventHandler<HTMLDivElement> | undefined;
247
+ onSelect?: React.ReactEventHandler<HTMLDivElement> | undefined;
248
+ onSelectCapture?: React.ReactEventHandler<HTMLDivElement> | undefined;
249
+ onTouchCancel?: React.TouchEventHandler<HTMLDivElement> | undefined;
250
+ onTouchCancelCapture?: React.TouchEventHandler<HTMLDivElement> | undefined;
251
+ onTouchEnd?: React.TouchEventHandler<HTMLDivElement> | undefined;
252
+ onTouchEndCapture?: React.TouchEventHandler<HTMLDivElement> | undefined;
253
+ onTouchMove?: React.TouchEventHandler<HTMLDivElement> | undefined;
254
+ onTouchMoveCapture?: React.TouchEventHandler<HTMLDivElement> | undefined;
255
+ onTouchStart?: React.TouchEventHandler<HTMLDivElement> | undefined;
256
+ onTouchStartCapture?: React.TouchEventHandler<HTMLDivElement> | undefined;
257
+ onPointerDown?: React.PointerEventHandler<HTMLDivElement> | undefined;
258
+ onPointerDownCapture?: React.PointerEventHandler<HTMLDivElement> | undefined;
259
+ onPointerMove?: React.PointerEventHandler<HTMLDivElement> | undefined;
260
+ onPointerMoveCapture?: React.PointerEventHandler<HTMLDivElement> | undefined;
261
+ onPointerUp?: React.PointerEventHandler<HTMLDivElement> | undefined;
262
+ onPointerUpCapture?: React.PointerEventHandler<HTMLDivElement> | undefined;
263
+ onPointerCancel?: React.PointerEventHandler<HTMLDivElement> | undefined;
264
+ onPointerCancelCapture?: React.PointerEventHandler<HTMLDivElement> | undefined;
265
+ onPointerEnter?: React.PointerEventHandler<HTMLDivElement> | undefined;
266
+ onPointerEnterCapture?: React.PointerEventHandler<HTMLDivElement> | undefined;
267
+ onPointerLeave?: React.PointerEventHandler<HTMLDivElement> | undefined;
268
+ onPointerLeaveCapture?: React.PointerEventHandler<HTMLDivElement> | undefined;
269
+ onPointerOver?: React.PointerEventHandler<HTMLDivElement> | undefined;
270
+ onPointerOverCapture?: React.PointerEventHandler<HTMLDivElement> | undefined;
271
+ onPointerOut?: React.PointerEventHandler<HTMLDivElement> | undefined;
272
+ onPointerOutCapture?: React.PointerEventHandler<HTMLDivElement> | undefined;
273
+ onGotPointerCapture?: React.PointerEventHandler<HTMLDivElement> | undefined;
274
+ onGotPointerCaptureCapture?: React.PointerEventHandler<HTMLDivElement> | undefined;
275
+ onLostPointerCapture?: React.PointerEventHandler<HTMLDivElement> | undefined;
276
+ onLostPointerCaptureCapture?: React.PointerEventHandler<HTMLDivElement> | undefined;
277
+ onScroll?: React.UIEventHandler<HTMLDivElement> | undefined;
278
+ onScrollCapture?: React.UIEventHandler<HTMLDivElement> | undefined;
279
+ onWheel?: React.WheelEventHandler<HTMLDivElement> | undefined;
280
+ onWheelCapture?: React.WheelEventHandler<HTMLDivElement> | undefined;
281
+ onAnimationStart?: React.AnimationEventHandler<HTMLDivElement> | undefined;
282
+ onAnimationStartCapture?: React.AnimationEventHandler<HTMLDivElement> | undefined;
283
+ onAnimationEnd?: React.AnimationEventHandler<HTMLDivElement> | undefined;
284
+ onAnimationEndCapture?: React.AnimationEventHandler<HTMLDivElement> | undefined;
285
+ onAnimationIteration?: React.AnimationEventHandler<HTMLDivElement> | undefined;
286
+ onAnimationIterationCapture?: React.AnimationEventHandler<HTMLDivElement> | undefined;
287
+ onTransitionEnd?: React.TransitionEventHandler<HTMLDivElement> | undefined;
288
+ onTransitionEndCapture?: React.TransitionEventHandler<HTMLDivElement> | undefined;
289
+ }>;
19
290
  interface ITMContextMenu {
20
291
  menuData: any[];
21
292
  onMenuItemClick?: (item: string) => void;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface ITMDropDownMenu {
2
3
  content: JSX.Element;
3
4
  color?: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ValidationItem } from "@topconsultnpm/sdk-ts-beta";
2
3
  export type Colors = 'error' | 'warning' | 'success' | 'info' | 'primary' | 'secondary' | 'tertiary' | 'standard';
3
4
  type IconModes = 'outside' | 'inside' | 'none';
@@ -1,43 +1,44 @@
1
1
  import React from 'react';
2
2
  declare const TMCard: ({ borderRadius, onClick, scrollX, scrollY, width, height, children, title, fontSize, fontWeight, showBorder, padding, scroll, backgroundColor, color }: {
3
- borderRadius?: boolean;
4
- onClick?: () => void;
5
- scrollX?: boolean;
6
- scrollY?: boolean;
7
- width?: string;
8
- height?: string;
9
- minWidth?: string;
10
- minHeight?: string;
3
+ borderRadius?: boolean | undefined;
4
+ onClick?: (() => void) | undefined;
5
+ scrollX?: boolean | undefined;
6
+ scrollY?: boolean | undefined;
7
+ width?: string | undefined;
8
+ height?: string | undefined;
9
+ minWidth?: string | undefined;
10
+ minHeight?: string | undefined;
11
11
  children?: React.ReactNode;
12
- title?: string;
13
- fontSize?: string;
14
- fontWeight?: string;
15
- showBorder?: boolean;
16
- padding?: boolean;
17
- scroll?: boolean;
18
- backgroundColor?: string;
19
- color?: string;
12
+ title?: string | undefined;
13
+ fontSize?: string | undefined;
14
+ fontWeight?: string | undefined;
15
+ showBorder?: boolean | undefined;
16
+ padding?: boolean | undefined;
17
+ scroll?: boolean | undefined;
18
+ backgroundColor?: string | undefined;
19
+ color?: string | undefined;
20
20
  }) => import("react/jsx-runtime").JSX.Element;
21
- declare const TMSplitterLayout: ({ animation, showSeparator, separatorColor, separatorSize, direction, children, start, min }: {
22
- animation?: boolean;
23
- separatorColor?: string;
24
- showSeparator?: boolean;
25
- separatorSize?: number;
26
- direction?: "horizontal" | "vertical";
21
+ declare const TMSplitterLayout: ({ animation, showSeparator, separatorColor, separatorActiveColor, separatorSize, direction, children, start, min, }: {
22
+ animation?: boolean | undefined;
23
+ separatorColor?: string | undefined;
24
+ separatorActiveColor?: string | undefined;
25
+ showSeparator?: boolean | undefined;
26
+ separatorSize?: number | undefined;
27
+ direction?: "horizontal" | "vertical" | undefined;
27
28
  children?: React.ReactNode;
28
- start?: string[];
29
- min?: string[];
29
+ start?: string[] | undefined;
30
+ min?: string[] | undefined;
30
31
  }) => import("react/jsx-runtime").JSX.Element;
31
32
  declare const TMLayoutItem: ({ onClick, children, width, minWidth, maxWidth, maxHeight, height, minHeight }: {
32
- onClick?: () => void;
33
+ onClick?: (() => void) | undefined;
33
34
  children: React.ReactNode;
34
- minWidth?: string;
35
- width?: string;
36
- maxWidth?: string;
37
- maxHeight?: string;
38
- fixed?: boolean;
39
- height?: string;
40
- minHeight?: string;
35
+ minWidth?: string | undefined;
36
+ width?: string | undefined;
37
+ maxWidth?: string | undefined;
38
+ maxHeight?: string | undefined;
39
+ fixed?: boolean | undefined;
40
+ height?: string | undefined;
41
+ minHeight?: string | undefined;
41
42
  }) => import("react/jsx-runtime").JSX.Element;
42
43
  export interface ITMLayoutContainerProps {
43
44
  children: React.ReactNode;
@@ -53,19 +53,20 @@ const StyledCardContext = styled.div `
53
53
  const TMCard = ({ borderRadius = true, onClick, scrollX = false, scrollY = false, width = '100%', height = '100%', children, title = '', fontSize = FontSize.defaultFontSize, fontWeight, showBorder = true, padding = true, scroll = false, backgroundColor, color }) => {
54
54
  return (_jsxs("div", { onClick: onClick, style: { width: width, height: height, fontSize: fontSize, overflow: 'hidden' }, children: [title.length > 0 && _jsx(StyledCardHeader, { "$borderRadius": borderRadius, "$fontWeight": fontWeight, "$backgroundColor": backgroundColor, "$color": color, children: title }), _jsxs(StyledCardContext, { "$scrollX": scrollX, "$scrollY": scrollY, "$scroll": scroll, "$padding": padding, "$showHeader": title.length > 0, style: { border: showBorder ? '2px solid #CAD9EB' : 'none', borderBottomLeftRadius: showBorder ? '3px' : '0', borderBottomRightRadius: showBorder ? '3px' : '0' }, children: [" ", children, " "] })] }));
55
55
  };
56
- const TMSplitterLayout = ({ animation = false, showSeparator = true, separatorColor = '#e4e4e4', separatorSize = 4, direction = 'horizontal', children, start = ['50%', '50%'], min = ['150px', '150px'] }) => {
56
+ const TMSplitterLayout = ({ animation = false, showSeparator = true, separatorColor = '#e4e4e4', separatorActiveColor = 'orange', separatorSize = 4, direction = 'horizontal', children, start = ['50%', '50%'], min = ['150px', '150px'], }) => {
57
57
  function isReactFragment(variableToInspect) {
58
- if (variableToInspect.type) {
59
- return variableToInspect.type === React.Fragment;
60
- }
61
- return variableToInspect === React.Fragment;
58
+ return variableToInspect?.type === React.Fragment;
62
59
  }
63
60
  const sepRef = useRef(null);
64
61
  const firstDivRef = useRef(null);
65
- const secondDivRef = useRef(null);
66
62
  const containerRef = useRef(null);
63
+ const secondDivRef = useRef(null);
67
64
  const [isFrag, setIsFrag] = useState(isReactFragment(React.Children.toArray(children)[1]));
68
- useEffect(() => { setIsFrag(isReactFragment(React.Children.toArray(children)[1])); }, [isReactFragment(React.Children.toArray(children)[1])]);
65
+ const [separatorBgColor, setSeparatorBgColor] = useState(separatorColor);
66
+ const [isResizing, setIsResizing] = useState(false);
67
+ useEffect(() => {
68
+ setIsFrag(isReactFragment(React.Children.toArray(children)[1]));
69
+ }, [children]);
69
70
  useEffect(() => {
70
71
  const firstDiv = firstDivRef.current;
71
72
  const secondDiv = secondDivRef.current;
@@ -73,91 +74,121 @@ const TMSplitterLayout = ({ animation = false, showSeparator = true, separatorCo
73
74
  const containerDiv = containerRef.current;
74
75
  let xCord = 0;
75
76
  let yCord = 0;
77
+ let overlay = document.createElement('div');
78
+ let previewCont = document.getElementById('tm-preview-container');
79
+ overlay.style.width = '100%';
80
+ overlay.style.height = '100%';
81
+ overlay.style.position = 'absolute';
82
+ overlay.style.top = '0px';
83
+ overlay.style.left = '0px';
84
+ overlay.style.backgroundColor = 'transparent';
85
+ overlay.style.zIndex = '2000';
86
+ const minFirstSize = parseFloat(min[0]);
87
+ const minSecondSize = parseFloat(min[1]);
88
+ const updateDimensions = (tempX, tempY) => {
89
+ const containerSize = direction === 'horizontal' ? containerDiv.offsetWidth : containerDiv.offsetHeight;
90
+ const firstSize = direction === 'horizontal' ? firstDiv.offsetWidth : firstDiv.offsetHeight;
91
+ const secondSize = direction === 'horizontal' ? secondDiv.offsetWidth : secondDiv.offsetHeight;
92
+ if (direction === 'horizontal') {
93
+ const newFirstSize = firstSize + tempX;
94
+ const newSecondSize = secondSize - tempX;
95
+ if (newFirstSize >= minFirstSize && newSecondSize >= minSecondSize) {
96
+ firstDiv.style.width = `${(newFirstSize / containerSize) * 100}%`;
97
+ secondDiv.style.width = `${(newSecondSize / containerSize) * 100}%`;
98
+ }
99
+ xCord += tempX;
100
+ }
101
+ else {
102
+ const newFirstSize = firstSize + tempY;
103
+ const newSecondSize = secondSize - tempY;
104
+ if (newFirstSize >= minFirstSize && newSecondSize >= minSecondSize) {
105
+ firstDiv.style.height = `${(newFirstSize / containerSize) * 100}%`;
106
+ secondDiv.style.height = `${(newSecondSize / containerSize) * 100}%`;
107
+ }
108
+ yCord += tempY;
109
+ }
110
+ };
76
111
  const onMouseMoveSep = (e) => {
77
- if (!sepDiv || !firstDiv || !secondDiv || !containerDiv)
78
- return;
79
112
  const containerRect = containerDiv.getBoundingClientRect();
80
- const minClientX = containerRect.left;
81
- const maxClientX = containerRect.right;
113
+ if (e.clientX < containerRect.left ||
114
+ e.clientX > containerRect.right ||
115
+ e.clientY < containerRect.top ||
116
+ e.clientY > containerRect.bottom) {
117
+ return;
118
+ }
82
119
  if (direction === 'horizontal') {
83
- let clientX = e.clientX < minClientX ? minClientX : e.clientX > maxClientX ? maxClientX : e.clientX;
84
- let tempX = clientX - xCord;
85
- xCord = clientX;
86
- firstDiv.style.width = `calc(${firstDiv.style.width} + ${tempX}px)`;
87
- secondDiv.style.width = `calc(${secondDiv.style.width} - ${tempX}px)`;
120
+ const tempX = e.clientX - xCord;
121
+ updateDimensions(tempX, 0);
122
+ xCord = e.clientX;
88
123
  }
89
124
  else {
90
- const minClientY = containerRect.top;
91
- const maxClientY = containerRect.bottom;
92
- let clientY = e.clientY < minClientY ? minClientY : e.clientY > maxClientY ? maxClientY : e.clientY;
93
- let tempY = clientY - yCord;
94
- yCord = clientY;
95
- firstDiv.style.height = `calc(${firstDiv.style.height} + ${tempY}px)`;
96
- secondDiv.style.height = `calc(${secondDiv.style.height} - ${tempY}px)`;
125
+ const tempY = e.clientY - yCord;
126
+ updateDimensions(0, tempY);
127
+ yCord = e.clientY;
97
128
  }
98
129
  };
99
130
  const onTouchMoveSep = (e) => {
100
- if (!sepDiv || !firstDiv || !secondDiv || !containerDiv)
101
- return;
102
131
  const containerRect = containerDiv.getBoundingClientRect();
103
- const minClientX = containerRect.left;
104
- const maxClientX = containerRect.right;
105
- const minClientY = containerRect.top;
106
- const maxClientY = containerRect.bottom;
132
+ const touch = e.touches[0];
133
+ if (touch.clientX < containerRect.left ||
134
+ touch.clientX > containerRect.right ||
135
+ touch.clientY < containerRect.top ||
136
+ touch.clientY > containerRect.bottom) {
137
+ return;
138
+ }
107
139
  if (direction === 'horizontal') {
108
- let clientX = e.touches[0].clientX;
109
- clientX = clientX < minClientX ? minClientX : clientX > maxClientX ? maxClientX : clientX;
110
- let tempX = clientX - xCord;
111
- xCord = clientX;
112
- firstDiv.style.width = `calc(${firstDiv.style.width} + ${tempX}px)`;
113
- secondDiv.style.width = `calc(${secondDiv.style.width} - ${tempX}px)`;
140
+ const tempX = touch.clientX - xCord;
141
+ updateDimensions(tempX, 0);
142
+ xCord = touch.clientX;
114
143
  }
115
144
  else {
116
- let clientY = e.touches[0].clientY;
117
- clientY = clientY < minClientY ? minClientY : clientY > maxClientY ? maxClientY : clientY;
118
- let tempY = clientY - yCord;
119
- yCord = clientY;
120
- firstDiv.style.height = `calc(${firstDiv.style.height} + ${tempY}px)`;
121
- secondDiv.style.height = `calc(${secondDiv.style.height} - ${tempY}px)`;
145
+ const tempY = touch.clientY - yCord;
146
+ updateDimensions(0, tempY);
147
+ yCord = touch.clientY;
122
148
  }
123
149
  };
124
150
  const onMouseUpSep = () => {
125
- sepDiv.style.userSelect = 'auto';
126
- firstDiv.style.userSelect = 'auto';
127
- secondDiv.style.userSelect = 'auto';
128
- sepDiv.style.backgroundColor = separatorColor;
129
- if (animation)
151
+ setSeparatorBgColor(separatorColor);
152
+ document.body.style.userSelect = 'auto';
153
+ if (animation) {
130
154
  firstDiv.style.transition = 'ease 300ms';
131
- if (animation)
132
155
  secondDiv.style.transition = 'ease 300ms';
133
- document.removeEventListener('mousemove', onMouseMoveSep);
134
- document.removeEventListener('touchmove', onTouchMoveSep);
156
+ }
157
+ window.removeEventListener('mousemove', onMouseMoveSep);
158
+ window.removeEventListener('touchmove', onTouchMoveSep);
159
+ window.removeEventListener('mouseup', onMouseUpSep);
160
+ window.removeEventListener('touchend', onMouseUpSep);
161
+ overlay.remove();
162
+ setIsResizing(false);
135
163
  };
136
164
  const onMouseDownSep = (e) => {
137
- sepDiv.style.userSelect = 'none';
138
- firstDiv.style.userSelect = 'none';
139
- secondDiv.style.userSelect = 'none';
140
- if (animation)
141
- firstDiv.style.transition = 'none';
142
- if (animation)
143
- secondDiv.style.transition = 'none';
144
- if (direction === 'horizontal') {
145
- xCord = e.clientX;
165
+ setIsResizing(true);
166
+ if (previewCont) {
167
+ previewCont.appendChild(overlay);
146
168
  }
147
- else {
148
- yCord = e.clientY;
149
- }
150
- sepDiv.style.backgroundColor = TMColors.tertiary;
151
- document.addEventListener('mousemove', onMouseMoveSep);
152
- document.addEventListener('mouseup', onMouseUpSep);
153
- document.addEventListener('touchmove', onTouchMoveSep);
154
- document.addEventListener('touchend', onMouseUpSep);
169
+ xCord = 'clientX' in e ? e.clientX : e.touches[0].clientX;
170
+ yCord = 'clientY' in e ? e.clientY : e.touches[0].clientY;
171
+ setSeparatorBgColor(separatorActiveColor);
172
+ document.body.style.userSelect = 'none';
173
+ firstDiv.style.transition = 'none';
174
+ secondDiv.style.transition = 'none';
175
+ window.addEventListener('mousemove', onMouseMoveSep);
176
+ window.addEventListener('mouseup', onMouseUpSep);
177
+ window.addEventListener('touchmove', onTouchMoveSep);
178
+ window.addEventListener('touchend', onMouseUpSep);
155
179
  };
156
180
  sepDiv?.addEventListener('mousedown', onMouseDownSep);
157
181
  sepDiv?.addEventListener('touchstart', onMouseDownSep);
158
- return () => { sepDiv?.removeEventListener('mousedown', onMouseDownSep); sepDiv?.removeEventListener('touchstart', onMouseDownSep); };
159
- }, [firstDivRef, secondDivRef, sepRef, isFrag, containerRef]);
160
- return (_jsxs("div", { ref: containerRef, style: { display: 'flex', width: '100%', height: '100%', flexDirection: direction === 'vertical' ? 'column' : 'row', alignItems: 'flex-start', justifyContent: 'flex-start', position: 'relative' }, children: [_jsx("div", { style: { transition: animation ? 'ease 300ms' : 'none', overflow: 'hidden', height: direction === 'vertical' ? start[0] : '100%', minHeight: direction === 'vertical' ? min[0] : '100%', minWidth: direction === 'vertical' ? '100%' : min[0], width: direction === 'vertical' ? '100%' : start[0] }, ref: firstDivRef, children: React.Children.toArray(children)?.[0] }), !isFrag && _jsx("div", { ref: sepRef, style: { display: showSeparator ? 'block' : 'none', minWidth: direction === 'vertical' ? '100%' : `${separatorSize}px`, minHeight: direction === 'vertical' ? `${separatorSize}px` : '100%', backgroundColor: separatorColor, cursor: direction === 'vertical' ? 's-resize' : 'e-resize' } }), _jsx("div", { style: { transition: animation ? 'ease 300ms' : 'none', overflow: 'hidden', height: direction === 'vertical' ? start[1] : '100%', minHeight: direction === 'vertical' ? min[1] : '100%', minWidth: direction === 'vertical' ? '100%' : min[1], width: direction === 'vertical' ? '100%' : start[1] }, ref: secondDivRef, children: React.Children.toArray(children)?.[1] })] }));
182
+ return () => {
183
+ sepDiv?.removeEventListener('mousedown', onMouseDownSep);
184
+ sepDiv?.removeEventListener('touchstart', onMouseDownSep);
185
+ window.removeEventListener('mousemove', onMouseMoveSep);
186
+ window.removeEventListener('mouseup', onMouseUpSep);
187
+ window.removeEventListener('touchmove', onTouchMoveSep);
188
+ window.removeEventListener('touchend', onMouseUpSep);
189
+ };
190
+ }, [direction, isFrag, separatorColor, separatorActiveColor, min, animation]);
191
+ return (_jsxs("div", { ref: containerRef, style: { display: 'flex', width: '100%', height: '100%', flexDirection: direction === 'vertical' ? 'column' : 'row', position: 'relative', }, children: [_jsxs("div", { style: { position: 'relative', transition: 'ease 300ms', overflow: 'hidden', height: direction === 'vertical' ? start[0] : '100%', width: direction === 'horizontal' ? start[0] : '100%', minHeight: direction === 'vertical' ? min[0] : '100%', minWidth: direction === 'horizontal' ? min[0] : '100%', }, ref: firstDivRef, children: [" ", React.Children.toArray(children)[0], " ", isResizing && _jsx("div", { style: { position: 'absolute', top: '0px', left: '0px', zIndex: 1000, backgroundColor: 'transparent', width: '100%', height: '100%' } }), " "] }), !isFrag && (_jsx("div", { ref: sepRef, style: { display: showSeparator ? 'block' : 'none', backgroundColor: separatorBgColor, cursor: direction === 'vertical' ? 's-resize' : 'e-resize', minWidth: direction === 'horizontal' ? `${separatorSize}px` : '100%', minHeight: direction === 'vertical' ? `${separatorSize}px` : '100%', } })), _jsxs("div", { style: { position: 'relative', transition: 'ease 300ms', overflow: 'hidden', height: direction === 'vertical' ? start[1] : '100%', width: direction === 'horizontal' ? start[1] : '100%', minHeight: direction === 'vertical' ? min[1] : '100%', minWidth: direction === 'horizontal' ? min[1] : '100%', }, ref: secondDivRef, children: [" ", React.Children.toArray(children)[1], " ", isResizing && _jsx("div", { style: { position: 'absolute', top: '0px', left: '0px', zIndex: 1000, backgroundColor: 'transparent', width: '100%', height: '100%' } }), " "] })] }));
161
192
  };
162
193
  const TMLayoutItem = ({ onClick, children, width = '100%', minWidth, maxWidth, maxHeight, height = '100%', minHeight }) => {
163
194
  return (_jsx(StyledLayoutItem, { onClick: onClick, "$height": height, "$maxHeight": maxHeight, "$minHeight": minHeight, "$width": width, "$minWidth": minWidth, "$maxWidth": maxWidth, children: children }));
@@ -15,7 +15,7 @@ export interface ITMRightSidebarProps {
15
15
  }
16
16
  declare const TMRightSidebar: React.FC<ITMRightSidebarProps>;
17
17
  export default TMRightSidebar;
18
- export declare const StyledAnimatedComponentScaleColor: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
19
- $delay?: string;
20
- $scale?: number;
21
- }>> & string;
18
+ export declare const StyledAnimatedComponentScaleColor: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
19
+ $delay?: string | undefined;
20
+ $scale?: number | undefined;
21
+ }>>;