@evergis/react 4.0.101 → 4.0.103
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/dist/components/Dashboard/componentTypes.d.ts +20 -14
- package/dist/components/Dashboard/components/Chart/FillContext.d.ts +15 -0
- package/dist/components/Dashboard/components/Chart/styled.d.ts +1 -0
- package/dist/components/Dashboard/components/StackBar/index.d.ts +2 -0
- package/dist/components/Dashboard/components/StackBar/styled.d.ts +4 -1
- package/dist/components/Dashboard/containers/EditContainer/styled.d.ts +2 -0
- package/dist/components/Dashboard/containers/FiltersContainer/styled.d.ts +2 -0
- package/dist/components/Dashboard/containers/styled.d.ts +4 -1
- package/dist/components/Dashboard/hooks/index.d.ts +1 -1
- package/dist/components/Dashboard/hooks/useResizeBox.d.ts +17 -0
- package/dist/components/Dashboard/types.d.ts +17 -2
- package/dist/components/Dashboard/utils/getWrapperSizeStyle.d.ts +7 -2
- package/dist/index.js +155 -43
- package/dist/index.js.map +1 -1
- package/dist/react.esm.js +154 -43
- package/dist/react.esm.js.map +1 -1
- package/package.json +3 -3
- package/dist/components/Dashboard/components/Chart/ChartFillContext.d.ts +0 -8
- package/dist/components/Dashboard/hooks/useResizeWidth.d.ts +0 -12
|
@@ -124,6 +124,12 @@ export interface ElementUploaderConfig extends Omit<ConfigContainerChild, "optio
|
|
|
124
124
|
export interface ElementUploaderProps extends Omit<ContainerProps, "elementConfig"> {
|
|
125
125
|
elementConfig?: ElementUploaderConfig;
|
|
126
126
|
}
|
|
127
|
+
/**
|
|
128
|
+
* Опции размерной модели корневой обёртки — общие для всех контейнеров, которые проходят через
|
|
129
|
+
* `getWrapperSizeStyle`. Подмешивается к `<Name>ContainerOptions` вместо перечисления полей в
|
|
130
|
+
* каждом `Pick`, чтобы следующее размерное свойство не пришлось разносить по полутора десяткам мест.
|
|
131
|
+
*/
|
|
132
|
+
export type ContainerBoxOptions = Pick<ConfigOptions, "width" | "height" | "overflow">;
|
|
127
133
|
export type AddFeatureContainerOptions = Record<string, never>;
|
|
128
134
|
export type AddFeatureButtonOptions = Pick<ConfigOptions, "icon" | "title" | "layerName" | "geometryType">;
|
|
129
135
|
export interface AddFeatureButtonChild extends Omit<ConfigContainerChild, "options" | "type"> {
|
|
@@ -138,7 +144,7 @@ export interface AddFeatureContainerConfig extends Omit<ConfigContainerChild, "o
|
|
|
138
144
|
export interface AddFeatureContainerProps extends Omit<ContainerProps, "elementConfig"> {
|
|
139
145
|
elementConfig?: AddFeatureContainerConfig;
|
|
140
146
|
}
|
|
141
|
-
export type AttachmentContainerOptions = Pick<ConfigOptions, "expandable" | "expanded" | "viewMode" | "shownItems" | "otherItems" | "relatedDataSource" | "controls"
|
|
147
|
+
export type AttachmentContainerOptions = Pick<ConfigOptions, "expandable" | "expanded" | "viewMode" | "shownItems" | "otherItems" | "relatedDataSource" | "controls"> & ContainerBoxOptions;
|
|
142
148
|
export interface AttachmentContainerConfig extends Omit<ConfigContainerChild, "options" | "templateName"> {
|
|
143
149
|
templateName?: ContainerTemplate.Attachment;
|
|
144
150
|
options?: AttachmentContainerOptions;
|
|
@@ -146,7 +152,7 @@ export interface AttachmentContainerConfig extends Omit<ConfigContainerChild, "o
|
|
|
146
152
|
export interface AttachmentContainerProps extends Omit<ContainerProps, "elementConfig"> {
|
|
147
153
|
elementConfig?: AttachmentContainerConfig;
|
|
148
154
|
}
|
|
149
|
-
export type CameraContainerOptions = Pick<ConfigOptions, "expandable" | "expanded"
|
|
155
|
+
export type CameraContainerOptions = Pick<ConfigOptions, "expandable" | "expanded"> & ContainerBoxOptions;
|
|
150
156
|
export interface CameraContainerConfig extends Omit<ConfigContainerChild, "options" | "templateName"> {
|
|
151
157
|
templateName?: ContainerTemplate.Camera;
|
|
152
158
|
options?: CameraContainerOptions;
|
|
@@ -154,7 +160,7 @@ export interface CameraContainerConfig extends Omit<ConfigContainerChild, "optio
|
|
|
154
160
|
export interface CameraContainerProps extends Omit<ContainerProps, "elementConfig"> {
|
|
155
161
|
elementConfig?: CameraContainerConfig;
|
|
156
162
|
}
|
|
157
|
-
export type ChartContainerOptions = Pick<ConfigOptions, "twoColumns" | "hideEmpty" | "
|
|
163
|
+
export type ChartContainerOptions = Pick<ConfigOptions, "twoColumns" | "hideEmpty" | "fill"> & ContainerBoxOptions;
|
|
158
164
|
export interface ChartAliasChild extends Omit<ConfigContainerChild, "id"> {
|
|
159
165
|
id: "alias";
|
|
160
166
|
}
|
|
@@ -185,7 +191,7 @@ export interface ChartContainerConfig extends Omit<ConfigContainerChild, "option
|
|
|
185
191
|
export interface ChartContainerProps extends Omit<ContainerProps, "elementConfig"> {
|
|
186
192
|
elementConfig?: ChartContainerConfig;
|
|
187
193
|
}
|
|
188
|
-
export type ContainersGroupContainerOptions = Pick<ConfigOptions, "column" | "expandable" | "expanded" | "
|
|
194
|
+
export type ContainersGroupContainerOptions = Pick<ConfigOptions, "column" | "expandable" | "expanded" | "alignItems"> & ContainerBoxOptions;
|
|
189
195
|
export interface ContainersGroupContainerConfig extends Omit<ConfigContainerChild, "options" | "templateName"> {
|
|
190
196
|
templateName?: ContainerTemplate.ContainersGroup;
|
|
191
197
|
options?: ContainersGroupContainerOptions;
|
|
@@ -193,7 +199,7 @@ export interface ContainersGroupContainerConfig extends Omit<ConfigContainerChil
|
|
|
193
199
|
export interface ContainersGroupContainerProps extends Omit<ContainerProps, "elementConfig"> {
|
|
194
200
|
elementConfig?: ContainersGroupContainerConfig;
|
|
195
201
|
}
|
|
196
|
-
export type DataSourceContainerOptions = Pick<ConfigOptions, "column" | "relatedDataSource" | "innerTemplateName" | "expandable" | "expanded"
|
|
202
|
+
export type DataSourceContainerOptions = Pick<ConfigOptions, "column" | "relatedDataSource" | "innerTemplateName" | "expandable" | "expanded"> & ContainerBoxOptions;
|
|
197
203
|
export interface DataSourceContainerConfig extends Omit<ConfigContainerChild, "options" | "templateName"> {
|
|
198
204
|
templateName?: ContainerTemplate.DataSource;
|
|
199
205
|
options?: DataSourceContainerOptions;
|
|
@@ -205,7 +211,7 @@ export type DataSourceInnerContainerOptions = Pick<ConfigOptions, "relatedDataSo
|
|
|
205
211
|
export interface DataSourceInnerContainerConfig extends Omit<ConfigContainerChild, "options"> {
|
|
206
212
|
options?: DataSourceInnerContainerOptions;
|
|
207
213
|
}
|
|
208
|
-
export type DataSourceProgressContainerOptions = Pick<ConfigOptions, "maxValue" | "showTotal" | "relatedDataSource" | "innerTemplateName" | "expandable" | "expanded" | "shownItems" | "otherItems"
|
|
214
|
+
export type DataSourceProgressContainerOptions = Pick<ConfigOptions, "maxValue" | "showTotal" | "relatedDataSource" | "innerTemplateName" | "expandable" | "expanded" | "shownItems" | "otherItems"> & ContainerBoxOptions;
|
|
209
215
|
export interface DataSourceProgressContainerConfig extends Omit<ConfigContainerChild, "options" | "templateName"> {
|
|
210
216
|
templateName?: ContainerTemplate.DataSourceProgress;
|
|
211
217
|
options?: DataSourceProgressContainerOptions;
|
|
@@ -321,7 +327,7 @@ export interface ExportPdfContainerConfig extends Omit<ConfigContainerChild, "op
|
|
|
321
327
|
export interface ExportPdfContainerProps extends Omit<ContainerProps, "elementConfig"> {
|
|
322
328
|
elementConfig?: ExportPdfContainerConfig;
|
|
323
329
|
}
|
|
324
|
-
export type FiltersContainerOptions = Pick<ConfigOptions, "padding" | "bgColor" | "fontColor" | "fontSize" | "expandable" | "expanded"
|
|
330
|
+
export type FiltersContainerOptions = Pick<ConfigOptions, "padding" | "bgColor" | "fontColor" | "fontSize" | "expandable" | "expanded"> & ContainerBoxOptions;
|
|
325
331
|
/**
|
|
326
332
|
* Опции ребёнка FiltersContainer. Набор — объединение того, что реально читают все восемь
|
|
327
333
|
* реализаций фильтра: dropdown берёт `variants`/`noEmptyOption`, text — `searchFilterName`
|
|
@@ -349,7 +355,7 @@ export interface IconContainerConfig extends Omit<ConfigContainerChild, "options
|
|
|
349
355
|
export interface IconContainerProps extends Omit<ContainerProps, "elementConfig"> {
|
|
350
356
|
elementConfig?: IconContainerConfig;
|
|
351
357
|
}
|
|
352
|
-
export type ImageContainerOptions =
|
|
358
|
+
export type ImageContainerOptions = ContainerBoxOptions;
|
|
353
359
|
export interface ImageContainerConfig extends Omit<ConfigContainerChild, "options" | "templateName"> {
|
|
354
360
|
templateName?: ContainerTemplate.Image;
|
|
355
361
|
options?: ImageContainerOptions;
|
|
@@ -357,7 +363,7 @@ export interface ImageContainerConfig extends Omit<ConfigContainerChild, "option
|
|
|
357
363
|
export interface ImageContainerProps extends Omit<ContainerProps, "elementConfig"> {
|
|
358
364
|
elementConfig?: ImageContainerConfig;
|
|
359
365
|
}
|
|
360
|
-
export type LayersContainerOptions = Pick<ConfigOptions, "layerNames" | "expandable" | "expanded"
|
|
366
|
+
export type LayersContainerOptions = Pick<ConfigOptions, "layerNames" | "expandable" | "expanded"> & ContainerBoxOptions;
|
|
361
367
|
export interface LayersContainerConfig extends Omit<ConfigContainerChild, "options" | "templateName"> {
|
|
362
368
|
templateName?: ContainerTemplate.Layers;
|
|
363
369
|
options?: LayersContainerOptions;
|
|
@@ -365,7 +371,7 @@ export interface LayersContainerConfig extends Omit<ConfigContainerChild, "optio
|
|
|
365
371
|
export interface LayersContainerProps extends Omit<ContainerProps, "elementConfig"> {
|
|
366
372
|
elementConfig?: LayersContainerConfig;
|
|
367
373
|
}
|
|
368
|
-
export type OneColumnContainerOptions = Pick<ConfigOptions, "attributes" | "useProjectHiddenAttributes" | "hideEmpty" | "innerTemplateStyle"
|
|
374
|
+
export type OneColumnContainerOptions = Pick<ConfigOptions, "attributes" | "useProjectHiddenAttributes" | "hideEmpty" | "innerTemplateStyle"> & ContainerBoxOptions;
|
|
369
375
|
export interface OneColumnContainerConfig extends Omit<ConfigContainerChild, "options" | "templateName"> {
|
|
370
376
|
templateName?: ContainerTemplate.OneColumn;
|
|
371
377
|
options?: OneColumnContainerOptions;
|
|
@@ -400,7 +406,7 @@ export interface RoundedBackgroundContainerConfig extends Omit<ConfigContainerCh
|
|
|
400
406
|
export interface RoundedBackgroundContainerProps extends Omit<ContainerProps, "elementConfig"> {
|
|
401
407
|
elementConfig?: RoundedBackgroundContainerConfig;
|
|
402
408
|
}
|
|
403
|
-
export type SlideshowContainerOptions = Pick<ConfigOptions, "expandable" | "expanded"
|
|
409
|
+
export type SlideshowContainerOptions = Pick<ConfigOptions, "expandable" | "expanded"> & ContainerBoxOptions;
|
|
404
410
|
export interface SlideshowContainerConfig extends Omit<ConfigContainerChild, "options" | "templateName"> {
|
|
405
411
|
templateName?: ContainerTemplate.Slideshow;
|
|
406
412
|
options?: SlideshowContainerOptions;
|
|
@@ -421,7 +427,7 @@ export interface TabsContainerConfig extends Omit<ConfigContainerChild, "options
|
|
|
421
427
|
export interface TabsContainerProps extends Omit<ContainerProps, "elementConfig"> {
|
|
422
428
|
elementConfig?: TabsContainerConfig;
|
|
423
429
|
}
|
|
424
|
-
export type TaskContainerOptions = Pick<ConfigOptions, "title" | "relatedResources" | "center" | "icon" | "statusColors" | "responseFilters" | "useNotifications"
|
|
430
|
+
export type TaskContainerOptions = Pick<ConfigOptions, "title" | "relatedResources" | "center" | "icon" | "statusColors" | "responseFilters" | "useNotifications"> & ContainerBoxOptions;
|
|
425
431
|
export interface TaskContainerConfig extends Omit<ConfigContainerChild, "options" | "templateName"> {
|
|
426
432
|
templateName?: ContainerTemplate.Task;
|
|
427
433
|
options?: TaskContainerOptions;
|
|
@@ -437,7 +443,7 @@ export interface TitleContainerConfig extends Omit<ConfigContainerChild, "option
|
|
|
437
443
|
export interface TitleContainerProps extends Omit<ContainerProps, "elementConfig"> {
|
|
438
444
|
elementConfig?: TitleContainerConfig;
|
|
439
445
|
}
|
|
440
|
-
export type TwoColumnContainerOptions = Pick<ConfigOptions, "attributes" | "useProjectHiddenAttributes" | "hideEmpty" | "innerTemplateStyle"
|
|
446
|
+
export type TwoColumnContainerOptions = Pick<ConfigOptions, "attributes" | "useProjectHiddenAttributes" | "hideEmpty" | "innerTemplateStyle"> & ContainerBoxOptions;
|
|
441
447
|
export interface TwoColumnContainerConfig extends Omit<ConfigContainerChild, "options" | "templateName"> {
|
|
442
448
|
templateName?: ContainerTemplate.TwoColumn;
|
|
443
449
|
options?: TwoColumnContainerOptions;
|
|
@@ -445,7 +451,7 @@ export interface TwoColumnContainerConfig extends Omit<ConfigContainerChild, "op
|
|
|
445
451
|
export interface TwoColumnContainerProps extends Omit<ContainerProps, "elementConfig"> {
|
|
446
452
|
elementConfig?: TwoColumnContainerConfig;
|
|
447
453
|
}
|
|
448
|
-
export type UploadContainerOptions = Pick<ConfigOptions, "expandable" | "expanded"
|
|
454
|
+
export type UploadContainerOptions = Pick<ConfigOptions, "expandable" | "expanded"> & ContainerBoxOptions;
|
|
449
455
|
export interface UploadContainerConfig extends Omit<ConfigContainerChild, "options" | "templateName"> {
|
|
450
456
|
templateName?: ContainerTemplate.Upload;
|
|
451
457
|
options?: UploadContainerOptions;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Значение контекста вписывания тела графика в контейнер (`options.fill` контейнера Chart). */
|
|
2
|
+
export interface FillContextValue {
|
|
3
|
+
/** Вписать тело графика в контейнер: по ширине всегда, по высоте — при заданной высоте (object-fit: contain). */
|
|
4
|
+
fill: boolean;
|
|
5
|
+
/** У контейнера ограниченная высота ⇒ можно фитить по высоте (иначе только по ширине). */
|
|
6
|
+
fitHeight: boolean;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Контекст вписывания графика (`options.fill` контейнера Chart).
|
|
10
|
+
*
|
|
11
|
+
* Компонент `Chart` рендерится через `renderElement({ id: "chart" })` и получает только дочерний
|
|
12
|
+
* узел `{ id: "chart" }` — опции контейнера до него не доходят. `ChartContainer` оборачивает
|
|
13
|
+
* график в провайдер этого контекста, а `Chart` читает значение через `useContext`.
|
|
14
|
+
*/
|
|
15
|
+
export declare const FillContext: import('react').Context<FillContextValue>;
|
|
@@ -15,6 +15,7 @@ export declare const PieChartCenter: import('styled-components').StyledComponent
|
|
|
15
15
|
export declare const ChartWrapperContainer: import('styled-components').StyledComponent<"div", any, {
|
|
16
16
|
column: boolean;
|
|
17
17
|
}, never>;
|
|
18
|
+
export declare const ChartFillMeasure: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
18
19
|
export declare const Tooltip: import('styled-components').StyledComponent<"div", any, {
|
|
19
20
|
transform?: CSSProperties["transform"];
|
|
20
21
|
}, never>;
|
|
@@ -8,6 +8,8 @@ export declare const StackBar: FC<{
|
|
|
8
8
|
type: WidgetType;
|
|
9
9
|
alias: ConfigContainerChild;
|
|
10
10
|
options: ConfigOptions;
|
|
11
|
+
/** fill контейнера: полоса тянется на всю доступную высоту вместо толщины из options.height. */
|
|
12
|
+
fill?: boolean;
|
|
11
13
|
renderElement: ContainerProps["renderElement"];
|
|
12
14
|
renderTooltip: (data: PieChartData[]) => ReactElement | string;
|
|
13
15
|
}>;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
export declare const StackBarContainer: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps
|
|
1
|
+
export declare const StackBarContainer: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps & {
|
|
2
|
+
$fill?: boolean;
|
|
3
|
+
}, never>;
|
|
2
4
|
export declare const StackBarHeader: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps, never>;
|
|
3
5
|
export declare const StackBarSection: import('styled-components').StyledComponent<"div", any, {
|
|
4
6
|
$width: string;
|
|
5
7
|
$height?: string | number;
|
|
8
|
+
$fill?: boolean;
|
|
6
9
|
$color: string;
|
|
7
10
|
cornerRadius: number;
|
|
8
11
|
hasAnyFilter?: boolean;
|
|
@@ -2,9 +2,11 @@ export declare const CheckboxWrapper: import('styled-components').StyledComponen
|
|
|
2
2
|
fontColor?: string;
|
|
3
3
|
big?: boolean;
|
|
4
4
|
column?: boolean;
|
|
5
|
+
$fill?: boolean;
|
|
5
6
|
}, never>;
|
|
6
7
|
export declare const ChipsWrapper: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps & {
|
|
7
8
|
fontColor?: string;
|
|
8
9
|
big?: boolean;
|
|
9
10
|
column?: boolean;
|
|
11
|
+
$fill?: boolean;
|
|
10
12
|
}, never>;
|
|
@@ -21,9 +21,11 @@ export declare const BarChartContainer: import('styled-components').StyledCompon
|
|
|
21
21
|
}, never>;
|
|
22
22
|
export declare const AnyChartWrapper: import('styled-components').StyledComponent<"div", any, {
|
|
23
23
|
height?: number;
|
|
24
|
+
$fill?: boolean;
|
|
24
25
|
}, never>;
|
|
25
26
|
export declare const BarChartWrapper: import('styled-components').StyledComponent<"div", any, {
|
|
26
27
|
height?: number;
|
|
28
|
+
$fill?: boolean;
|
|
27
29
|
}, never>;
|
|
28
30
|
export declare const BarChartFilterHeader: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps & {
|
|
29
31
|
height?: string | number;
|
|
@@ -2,13 +2,16 @@ export declare const ContainerAlias: import('styled-components').StyledComponent
|
|
|
2
2
|
hasBottomMargin?: boolean;
|
|
3
3
|
}, never>;
|
|
4
4
|
export declare const ContainerAliasIcon: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
5
|
-
export declare const ContainerChart: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps
|
|
5
|
+
export declare const ContainerChart: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps & {
|
|
6
|
+
$fill?: boolean;
|
|
7
|
+
}, never>;
|
|
6
8
|
export declare const ContainerLegend: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps, never>;
|
|
7
9
|
export declare const ContainerUnits: import('styled-components').StyledComponent<"div", any, {}, never>;
|
|
8
10
|
export declare const ContainerValue: import('styled-components').StyledComponent<"div", any, import('@evergis/uilib-gl').FlexProps & {
|
|
9
11
|
fontColor?: string;
|
|
10
12
|
big?: boolean;
|
|
11
13
|
column?: boolean;
|
|
14
|
+
$fill?: boolean;
|
|
12
15
|
}, never>;
|
|
13
16
|
export declare const ContainerIcon: import('styled-components').StyledComponent<"span", any, import('@evergis/uilib-gl').IIconProps & {
|
|
14
17
|
$fontColor?: string;
|
|
@@ -25,7 +25,7 @@ export * from './useHideIfEmptyDataSource';
|
|
|
25
25
|
export * from './useProjectDashboardInit';
|
|
26
26
|
export * from './useRelatedDataSourceAttributes';
|
|
27
27
|
export * from './useRenderElement';
|
|
28
|
-
export * from './
|
|
28
|
+
export * from './useResizeBox';
|
|
29
29
|
export * from './useShownOtherItems';
|
|
30
30
|
export * from './useUpdateDataSource';
|
|
31
31
|
export * from './useWidgetConfig';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
/** Измеренный content-box наблюдаемого элемента: обе оси в пикселях либо `undefined` до первого замера. */
|
|
3
|
+
export interface ResizeBox {
|
|
4
|
+
width?: number;
|
|
5
|
+
height?: number;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Измеряет фактические ширину и высоту DOM-элемента и обновляет их на любой ресайз (ResizeObserver).
|
|
9
|
+
*
|
|
10
|
+
* Возвращает `[ref, box]`, где `box` — `{ width, height }` в пикселях (content-box) либо пустой объект,
|
|
11
|
+
* пока элемент ещё не измерен. Используется для «резинового» графика: d3-графикам нужны конкретные
|
|
12
|
+
* пиксельные размеры, а не CSS `100%`, а для вписывания (fit) нужны обе оси.
|
|
13
|
+
*
|
|
14
|
+
* `enabled: false` полностью отключает наблюдение — обычные (не fill) графики не измеряются
|
|
15
|
+
* и не вызывают лишних ре-рендеров.
|
|
16
|
+
*/
|
|
17
|
+
export declare const useResizeBox: (enabled: boolean) => [RefObject<HTMLDivElement>, ResizeBox];
|
|
@@ -21,6 +21,9 @@ export type AlignItems = (typeof ALIGN_ITEMS)[number];
|
|
|
21
21
|
/** Масштабирование изображения внутри своего бокса (CSS `object-fit`). */
|
|
22
22
|
export declare const OBJECT_FITS: readonly ["cover", "contain", "fill", "none", "scale-down"];
|
|
23
23
|
export type ObjectFit = (typeof OBJECT_FITS)[number];
|
|
24
|
+
/** Поведение контента, выходящего за бокс контейнера (CSS `overflow`). */
|
|
25
|
+
export declare const OVERFLOWS: readonly ["visible", "hidden", "scroll", "auto"];
|
|
26
|
+
export type Overflow = (typeof OVERFLOWS)[number];
|
|
24
27
|
/**
|
|
25
28
|
* CSS-размер контейнера: число — пиксели, строка — любое CSS-значение (`"100%"`, `"24rem"`,
|
|
26
29
|
* `"calc(100% - 1rem)"`). Значение `"100%"` включает fill-режим — контейнер занимает всю ячейку
|
|
@@ -157,13 +160,21 @@ export interface ConfigLayoutOptions {
|
|
|
157
160
|
width?: CssSize;
|
|
158
161
|
/** Высота корневой обёртки контейнера. `"100%"` — заполнить ячейку родителя. */
|
|
159
162
|
height?: CssSize;
|
|
163
|
+
/**
|
|
164
|
+
* Что делать с контентом, вылезающим за бокс контейнера (CSS `overflow`). Не задана — браузерный
|
|
165
|
+
* дефолт `visible`: контент вытекает и залезает на соседние слоты.
|
|
166
|
+
*
|
|
167
|
+
* Значения кроме `"visible"` обрезают и абсолютно спозиционированных потомков — у контейнера
|
|
168
|
+
* Filters с заданной высотой открытый список фильтра будет обрезан по боксу.
|
|
169
|
+
*/
|
|
170
|
+
overflow?: Overflow;
|
|
160
171
|
padding?: number;
|
|
161
172
|
radius?: number;
|
|
162
173
|
cornerRadius?: number;
|
|
163
174
|
column?: boolean;
|
|
164
175
|
twoColumns?: boolean;
|
|
165
|
-
/**
|
|
166
|
-
|
|
176
|
+
/** Вписать график контейнера Chart в контейнер: по ширине всегда, по высоте — при заданной высоте (object-fit: contain). */
|
|
177
|
+
fill?: boolean;
|
|
167
178
|
/** Горизонтальное выравнивание содержимого заголовка контейнера. */
|
|
168
179
|
align?: Alignment;
|
|
169
180
|
/** Выравнивание детей контейнера по поперечной оси. В ряду по умолчанию `center`. */
|
|
@@ -187,6 +198,10 @@ export interface MarkdownTagTypography {
|
|
|
187
198
|
fontSize?: FontSizeToken | string;
|
|
188
199
|
lineHeight?: string;
|
|
189
200
|
fontWeight?: number | string;
|
|
201
|
+
/** Отступ снизу — задаёт расстояние до следующего блока (между тегами). */
|
|
202
|
+
marginBottom?: string;
|
|
203
|
+
/** Отступ сверху — задаёт расстояние до предыдущего блока (между тегами). */
|
|
204
|
+
marginTop?: string;
|
|
190
205
|
}
|
|
191
206
|
/**
|
|
192
207
|
* Пер-тег типографика markdown-виджета. Отсутствующий тег или свойство —
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
2
|
import { CSSObject } from 'styled-components';
|
|
3
|
-
import { CssSize } from '../types';
|
|
3
|
+
import { CssSize, Overflow } from '../types';
|
|
4
4
|
/** Размер, при котором контейнер занимает всю ячейку родителя. */
|
|
5
5
|
export declare const FILL_SIZE = "100%";
|
|
6
6
|
export interface WrapperSizeParams {
|
|
@@ -10,6 +10,8 @@ export interface WrapperSizeParams {
|
|
|
10
10
|
width?: CssSize;
|
|
11
11
|
/** `options.height` контейнера. */
|
|
12
12
|
height?: CssSize;
|
|
13
|
+
/** `options.overflow` контейнера — что делать с контентом, вылезающим за бокс. */
|
|
14
|
+
overflow?: Overflow;
|
|
13
15
|
/** Внутренние дефолты обёртки контейнера: отступы, собственная высота и т.п. */
|
|
14
16
|
defaults?: CSSObject;
|
|
15
17
|
/** Ширина по умолчанию, если `options.width` не задан. Контейнеры передают `FILL_SIZE`, элементы — нет. */
|
|
@@ -26,5 +28,8 @@ export declare const isFillSize: (size?: CssSize) => boolean;
|
|
|
26
28
|
* конфликтующие внутренние дефолты обёртки, а контент лишается возможности её распирать
|
|
27
29
|
* (`min-width`/`min-height: 0`). Для fill-высоты добавляется `flex: 1 1 auto` — в колонке
|
|
28
30
|
* контейнер забирает остаток ячейки под заголовком, а не переполняет её на его высоту.
|
|
31
|
+
*
|
|
32
|
+
* `overflow` уходит в CSS как есть и ничем не подменяется: не задан — работает браузерный
|
|
33
|
+
* `visible`, то есть контент крупнее бокса вытекает на соседние слоты.
|
|
29
34
|
*/
|
|
30
|
-
export declare const getWrapperSizeStyle: ({ style, width: widthOption, height, defaults, defaultWidth, }: WrapperSizeParams) => CSSObject | undefined;
|
|
35
|
+
export declare const getWrapperSizeStyle: ({ style, width: widthOption, height, overflow, defaults, defaultWidth, }: WrapperSizeParams) => CSSObject | undefined;
|