@ssa-ui-kit/core 3.24.0 → 3.24.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/dist/ai/source-map.md +21 -18
- package/dist/components/Calendar/consts.d.ts +2 -0
- package/dist/components/Carousel/Carousel.d.ts +8 -2
- package/dist/components/Carousel/FullImageModal.d.ts +12 -0
- package/dist/components/Carousel/styles.d.ts +5 -0
- package/dist/components/Carousel/types.d.ts +17 -4
- package/dist/components/Charts/FunnelChart/FunnelChart.d.ts +4 -3
- package/dist/components/Charts/FunnelChart/types.d.ts +11 -1
- package/dist/components/Charts/FunnelChart/utils.d.ts +12 -1
- package/dist/index.js +346 -170
- package/dist/index.mjs +321 -145
- package/dist/tsbuildcache +1 -1
- package/package.json +3 -3
package/dist/ai/source-map.md
CHANGED
|
@@ -4,7 +4,7 @@ Generated from the TypeScript program at build time — do not edit by hand.
|
|
|
4
4
|
|
|
5
5
|
**Everything below is imported from the package root:** `import { X } from '@ssa-ui-kit/core'`
|
|
6
6
|
|
|
7
|
-
190 components · 20 contexts · 23 hooks · 17 functions · 16 constants ·
|
|
7
|
+
190 components · 20 contexts · 23 hooks · 17 functions · 16 constants · 315 exported types
|
|
8
8
|
|
|
9
9
|
## Reading this file
|
|
10
10
|
|
|
@@ -1034,10 +1034,11 @@ Shows a set of images one at a time, with optional thumbnails, dot indicators, p
|
|
|
1034
1034
|
- `showDots?: boolean` `= true` — Show the dot indicators (see `controlsPosition`).
|
|
1035
1035
|
- `showArrows?: boolean` `= true` — Show the previous/next buttons (see `controlsPosition`).
|
|
1036
1036
|
- `controlsPosition?: CarouselControlsPosition` `= 'overlay'` — Where the dots and arrows sit. `overlay` draws them over the bottom of the slide; `below` puts them in a 32px…
|
|
1037
|
-
- `allowOpenFull?: boolean` `= false` — Show a button that opens the current image (`fullSrc ?? src`) in a new tab
|
|
1037
|
+
- `allowOpenFull?: boolean` `= false` — Show a button that opens the current image (`fullSrc ?? src`), in a new tab or a modal (see `openFullMode`).…
|
|
1038
|
+
- `openFullMode?: CarouselOpenFullMode` `= 'newTab'` — Where the `allowOpenFull` button opens the image. `modal` shows it over a dimmed page at its natural size,…
|
|
1038
1039
|
- `aspectRatio?: number` `= 1` — Width-to-height ratio of the slide. The slide always fills the container's width; this sets its height.…
|
|
1039
1040
|
- `height?: Property.Height<string | number>` — Fixed slide height (number = px). Overrides `aspectRatio`.
|
|
1040
|
-
- `fit?: CarouselFit` `= '
|
|
1041
|
+
- `fit?: CarouselFit` `= 'cover'` — How images fill the slide frame.
|
|
1041
1042
|
- `index?: number` — Index of the current slide (controlled).
|
|
1042
1043
|
- `defaultIndex?: number` `= 0` — Index of the slide shown first (uncontrolled).
|
|
1043
1044
|
- `onIndexChange?: (index: number) => void` — Called whenever the current slide changes.
|
|
@@ -1092,8 +1093,9 @@ Compact numeric indicator for displaying counts or notification badges.
|
|
|
1092
1093
|
#### FunnelChart
|
|
1093
1094
|
Stage diagram drawn as a funnel or a triangle
|
|
1094
1095
|
|
|
1095
|
-
- `data: FunnelChartItem[]` — Levels from top to bottom. Every level has the same height.
|
|
1096
|
+
- `data: FunnelChartItem[]` — Levels from top to bottom. Every level has the same height unless `proportional` is set.
|
|
1096
1097
|
- `type?: FunnelChartType` `= 'funnel'` — Shape of the chart
|
|
1098
|
+
- `proportional?: boolean` `= false` — Size each level's height in proportion to its value, so bigger values get bigger levels. Zero and tiny values…
|
|
1097
1099
|
- `withPointer?: boolean` `= false` — Render a leader line and a label beside each level
|
|
1098
1100
|
- `withTooltip?: boolean` `= true` — Show a tooltip when a level is hovered
|
|
1099
1101
|
- `withLabels?: boolean` `= true` — Show the labels inside the levels. Pointer labels are controlled by `withPointer`.
|
|
@@ -2356,20 +2358,21 @@ _Names only — read the `.d.ts` for their shape._
|
|
|
2356
2358
|
`CalendarHighlightColor` · `CalendarProps` · `CalendarRange` · `CalendarType` · `CalendarVariant`
|
|
2357
2359
|
`CalendarView` · `CalendarWeek` · `CandlestickChartFeatures` · `CandlestickChartProps`
|
|
2358
2360
|
`CardListProps` · `CardProps` · `CarouselControlsPosition` · `CarouselFit` · `CarouselItem`
|
|
2359
|
-
`
|
|
2360
|
-
`
|
|
2361
|
-
`
|
|
2362
|
-
`
|
|
2363
|
-
`
|
|
2364
|
-
`
|
|
2365
|
-
`
|
|
2366
|
-
`
|
|
2367
|
-
`
|
|
2368
|
-
`
|
|
2369
|
-
`
|
|
2370
|
-
`
|
|
2371
|
-
`
|
|
2372
|
-
`
|
|
2361
|
+
`CarouselOpenFullMode` · `CarouselProps` · `CarouselThumbnailsPosition` · `CheckboxProps`
|
|
2362
|
+
`ChildrenDataProps` · `ChipColor` · `ChipProps` · `ChipSize` · `ChipVariant`
|
|
2363
|
+
`CollapsibleNavBarExtendedProps` · `CollapsibleNavBarGroup` · `CollapsibleNavBarHeader`
|
|
2364
|
+
`CollapsibleNavBarItem` · `ColoredButtonTextProps` · `ColorsKeys` · `ColumnFreezeApi`
|
|
2365
|
+
`ColumnFreezeMenuProps` · `ColumnFreezeOptions` · `ColumnId` · `ColumnResizeApi`
|
|
2366
|
+
`ColumnResizeHandleProps` · `ColumnResizeMode` · `ColumnResizeOptions` · `CommonProps`
|
|
2367
|
+
`ContextType` · `ControlledButtonProps` · `CounterProps` · `CounterSizes` · `CounterVariants`
|
|
2368
|
+
`CustomIconProps` · `CustomTagStyles` · `DatePickerContextProps` · `DatePickerFormat`
|
|
2369
|
+
`DatePickerProps` · `DateRangePickerContextProps` · `DateRangePickerFormBridgeProps`
|
|
2370
|
+
`DateRangePickerFormBridgeValue` · `DateRangePickerOnChangeDates` · `DateRangePickerProps`
|
|
2371
|
+
`DateRangePresetValue` · `DateRangePreset` · `DateTimeTuple` · `DeprecatedOpenStateProps`
|
|
2372
|
+
`DropdownContextType` · `DropdownOptionProps` · `DropdownPositions` · `DropdownProps`
|
|
2373
|
+
`DropdownToggleProps` · `DynamicAlertParams` · `DynamicNotificationParams` · `DynamicToastParams`
|
|
2374
|
+
`FieldContextValue` · `FieldControlProps` · `FieldDescriptionProps` · `FieldErrorProps`
|
|
2375
|
+
`FieldLabelProps` · `FieldProps` · `FieldSuccessProps` · `FileAttachmentFile`
|
|
2373
2376
|
`FileAttachmentProps` · `FileRejectionReason` · `FileUploadProgressEntry` · `FileUploadProgress`
|
|
2374
2377
|
`FileUploadProps` · `Filter` · `FiltersMultiSelectEmptyProps` · `FiltersMultiSelectOptionProps`
|
|
2375
2378
|
`FiltersMultiSelectProps` · `FloatingSurfaceColor` · `FloatingSurfaceSize` · `Format`
|
|
@@ -25,6 +25,8 @@ export declare const HOUR_GUTTER_WIDTH = 64;
|
|
|
25
25
|
export declare const DAY_EVENT_GAP = 5;
|
|
26
26
|
/** Shortest an event is drawn, however brief. */
|
|
27
27
|
export declare const DAY_EVENT_MIN_HEIGHT = 15;
|
|
28
|
+
/** Set on the details layer to its `eventDetailsDisplay`, for styling. */
|
|
29
|
+
export declare const DETAILS_DISPLAY_ATTRIBUTE = "data-calendar-details";
|
|
28
30
|
/** Stripe colour per palette entry. */
|
|
29
31
|
export declare const getEventColor: (theme: Theme, color: CalendarColor) => `rgb${string}` | undefined;
|
|
30
32
|
/** Outline, 8% tint and badge gradient of a whole-day highlight. */
|
|
@@ -7,8 +7,8 @@ import { CarouselProps } from './types';
|
|
|
7
7
|
* The carousel always fills its container's width. The slide's height comes
|
|
8
8
|
* from `aspectRatio` (square by default, as in the design) or from a fixed
|
|
9
9
|
* `height`, never from the images — so the layout does not jump between
|
|
10
|
-
* slides or while images load. Images are
|
|
11
|
-
* (`fit="
|
|
10
|
+
* slides or while images load. Images are cropped to fill the frame
|
|
11
|
+
* (`fit="cover"`, the default) or letterboxed inside it (`fit="contain"`).
|
|
12
12
|
*
|
|
13
13
|
* Thumbnails are a fixed 52px. A `left`/`right` strip is exactly as tall as
|
|
14
14
|
* the slide and a `bottom` strip exactly as wide; extra thumbnails scroll and
|
|
@@ -49,6 +49,12 @@ import { CarouselProps } from './types';
|
|
|
49
49
|
*
|
|
50
50
|
* @example
|
|
51
51
|
* ```tsx
|
|
52
|
+
* // Open full size in a modal on the same page
|
|
53
|
+
* <Carousel items={items} allowOpenFull openFullMode="modal" />
|
|
54
|
+
* ```
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```tsx
|
|
52
58
|
* // Autoplay: 3s per slide, 600ms slide animation
|
|
53
59
|
* <Carousel items={items} autoPlay autoPlayInterval={3000} transitionDuration={600} />
|
|
54
60
|
* ```
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type FullImageModalProps = {
|
|
2
|
+
src: string;
|
|
3
|
+
alt?: string;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* The full-size image over a dimmed page, at its natural size but never more
|
|
8
|
+
* than 80% of the viewport. Escape, a click outside and the close button
|
|
9
|
+
* close it; focus moves in and returns to the open button.
|
|
10
|
+
*/
|
|
11
|
+
export declare const FullImageModal: ({ src, alt, onClose }: FullImageModalProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -17,6 +17,11 @@ export declare const dots: import("@emotion/react").SerializedStyles;
|
|
|
17
17
|
export declare const dot: (theme: Theme, active: boolean) => import("@emotion/react").SerializedStyles;
|
|
18
18
|
export declare const arrows: import("@emotion/react").SerializedStyles;
|
|
19
19
|
export declare const squareButton: (theme: Theme) => import("@emotion/react").SerializedStyles;
|
|
20
|
+
export declare const fullOverlay: (theme: Theme) => import("@emotion/react").SerializedStyles;
|
|
21
|
+
/** Shrinks to the image, which stops at 80% of the viewport either way. */
|
|
22
|
+
export declare const fullDialog: import("@emotion/react").SerializedStyles;
|
|
23
|
+
export declare const fullImage: import("@emotion/react").SerializedStyles;
|
|
24
|
+
export declare const fullClose: import("@emotion/react").SerializedStyles;
|
|
20
25
|
export declare const openFull: import("@emotion/react").SerializedStyles;
|
|
21
26
|
/**
|
|
22
27
|
* The vertical strip is taken out of flow so that it never stretches the
|
|
@@ -18,7 +18,7 @@ export type CarouselItem = {
|
|
|
18
18
|
*/
|
|
19
19
|
thumbnailSrc?: string;
|
|
20
20
|
/**
|
|
21
|
-
* Full-size image opened
|
|
21
|
+
* Full-size image opened by the `allowOpenFull` button.
|
|
22
22
|
* Falls back to `src`.
|
|
23
23
|
*/
|
|
24
24
|
fullSrc?: string;
|
|
@@ -32,6 +32,11 @@ export type CarouselThumbnailsPosition = 'left' | 'right' | 'bottom' | false;
|
|
|
32
32
|
* own row under it.
|
|
33
33
|
*/
|
|
34
34
|
export type CarouselControlsPosition = 'overlay' | 'below';
|
|
35
|
+
/**
|
|
36
|
+
* Where the `allowOpenFull` button opens the image: a new browser tab, or a
|
|
37
|
+
* modal over the current page.
|
|
38
|
+
*/
|
|
39
|
+
export type CarouselOpenFullMode = 'newTab' | 'modal';
|
|
35
40
|
/**
|
|
36
41
|
* How an image fills the slide frame. Mirrors CSS `object-fit`.
|
|
37
42
|
*/
|
|
@@ -71,11 +76,19 @@ export type CarouselProps = {
|
|
|
71
76
|
*/
|
|
72
77
|
controlsPosition?: CarouselControlsPosition;
|
|
73
78
|
/**
|
|
74
|
-
* Show a button that opens the current image (`fullSrc ?? src`) in a new
|
|
75
|
-
* tab. It appears when the slide is hovered
|
|
79
|
+
* Show a button that opens the current image (`fullSrc ?? src`), in a new
|
|
80
|
+
* tab or a modal (see `openFullMode`). It appears when the slide is hovered
|
|
81
|
+
* or focused.
|
|
76
82
|
* @default false
|
|
77
83
|
*/
|
|
78
84
|
allowOpenFull?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Where the `allowOpenFull` button opens the image. `modal` shows it over a
|
|
87
|
+
* dimmed page at its natural size, capped at 80% of the viewport's width
|
|
88
|
+
* and height; autoplay pauses while it is open.
|
|
89
|
+
* @default 'newTab'
|
|
90
|
+
*/
|
|
91
|
+
openFullMode?: CarouselOpenFullMode;
|
|
79
92
|
/**
|
|
80
93
|
* Width-to-height ratio of the slide. The slide always fills the
|
|
81
94
|
* container's width; this sets its height. Ignored when `height` is set.
|
|
@@ -88,7 +101,7 @@ export type CarouselProps = {
|
|
|
88
101
|
height?: CSSProperties['height'];
|
|
89
102
|
/**
|
|
90
103
|
* How images fill the slide frame.
|
|
91
|
-
* @default '
|
|
104
|
+
* @default 'cover'
|
|
92
105
|
*/
|
|
93
106
|
fit?: CarouselFit;
|
|
94
107
|
/**
|
|
@@ -2,8 +2,9 @@ import { FunnelChartProps } from './types';
|
|
|
2
2
|
/**
|
|
3
3
|
* FunnelChart - Stage diagram drawn as a funnel or a triangle
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
* non-decreasing values never collapse or distort the shape.
|
|
5
|
+
* By default every level has the same height regardless of its value, so zero
|
|
6
|
+
* or non-decreasing values never collapse or distort the shape. Set
|
|
7
|
+
* `proportional` to size levels by value instead. The chart scales
|
|
7
8
|
* to fit its container — give the container a height, or it falls back to the
|
|
8
9
|
* shape's own aspect ratio.
|
|
9
10
|
*
|
|
@@ -21,4 +22,4 @@ import { FunnelChartProps } from './types';
|
|
|
21
22
|
* />
|
|
22
23
|
* ```
|
|
23
24
|
*/
|
|
24
|
-
export declare const FunnelChart: ({ data, type, withPointer, withTooltip, withLabels, renderLabel, renderPointerLabel, renderTooltip, tooltipProps, className, "aria-label": ariaLabel, }: FunnelChartProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare const FunnelChart: ({ data, type, proportional, withPointer, withTooltip, withLabels, renderLabel, renderPointerLabel, renderTooltip, tooltipProps, className, "aria-label": ariaLabel, }: FunnelChartProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -16,13 +16,23 @@ export interface FunnelChartItem {
|
|
|
16
16
|
export type FunnelChartRender = (item: FunnelChartItem, index: number) => ReactNode;
|
|
17
17
|
/** Props for the FunnelChart component */
|
|
18
18
|
export interface FunnelChartProps {
|
|
19
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* Levels from top to bottom. Every level has the same height unless
|
|
21
|
+
* `proportional` is set.
|
|
22
|
+
*/
|
|
20
23
|
data: FunnelChartItem[];
|
|
21
24
|
/**
|
|
22
25
|
* Shape of the chart
|
|
23
26
|
* @default 'funnel'
|
|
24
27
|
*/
|
|
25
28
|
type?: FunnelChartType;
|
|
29
|
+
/**
|
|
30
|
+
* Size each level's height in proportion to its value, so bigger values
|
|
31
|
+
* get bigger levels. Zero and tiny values keep a minimum height (40% of
|
|
32
|
+
* an equal level) so their labels still fit; non-numeric values count as 0.
|
|
33
|
+
* @default false
|
|
34
|
+
*/
|
|
35
|
+
proportional?: boolean;
|
|
26
36
|
/**
|
|
27
37
|
* Render a leader line and a label beside each level
|
|
28
38
|
* @default false
|
|
@@ -8,6 +8,13 @@ type Point = {
|
|
|
8
8
|
radius: number;
|
|
9
9
|
};
|
|
10
10
|
export declare const roundedPolygonPath: (points: Point[]) => string;
|
|
11
|
+
/**
|
|
12
|
+
* Splits `total` between levels in proportion to `values`. Levels that would
|
|
13
|
+
* fall below the minimum get the minimum, and the rest share what is left in
|
|
14
|
+
* proportion to their values. Non-numeric and negative values count as 0;
|
|
15
|
+
* when nothing is positive every level gets the same height.
|
|
16
|
+
*/
|
|
17
|
+
export declare const getProportionalHeights: (values: (number | string)[], total: number) => number[];
|
|
11
18
|
export interface FunnelBand {
|
|
12
19
|
top: number;
|
|
13
20
|
bottom: number;
|
|
@@ -21,5 +28,9 @@ export interface FunnelGeometry {
|
|
|
21
28
|
/** Half-width of the shape at a given distance from the top */
|
|
22
29
|
halfWidthAt: (y: number) => number;
|
|
23
30
|
}
|
|
24
|
-
|
|
31
|
+
/**
|
|
32
|
+
* Shape and level bands. Pass `heights` (summing to `DESIGN_HEIGHT`) to size
|
|
33
|
+
* the levels; otherwise they are equal.
|
|
34
|
+
*/
|
|
35
|
+
export declare const getGeometry: (type: FunnelChartType, levels: number, heights?: number[]) => FunnelGeometry;
|
|
25
36
|
export {};
|