@platform-blocks/ui 0.4.0 → 0.5.0
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/lib/cjs/index.js +469 -169
- package/lib/cjs/index.js.map +1 -1
- package/lib/components/Avatar/Avatar.d.ts +1 -1
- package/lib/components/Avatar/types.d.ts +3 -3
- package/lib/components/Carousel/types.d.ts +18 -0
- package/lib/components/DataTable/DataTable.d.ts +1 -1
- package/lib/components/DataTable/types.d.ts +2 -0
- package/lib/components/Slider/types.d.ts +29 -1
- package/lib/esm/index.js +469 -169
- package/lib/esm/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { AvatarProps } from './types';
|
|
3
|
-
export declare function Avatar({ size, src, fallback, backgroundColor, textColor, online,
|
|
3
|
+
export declare function Avatar({ size, src, fallback, backgroundColor, textColor, online, indicatorColor, style, accessibilityLabel, label, description, gap, showText, }: AvatarProps): React.JSX.Element;
|
|
@@ -14,9 +14,9 @@ export interface AvatarProps {
|
|
|
14
14
|
textColor?: string;
|
|
15
15
|
/** Whether to show online status indicator */
|
|
16
16
|
online?: boolean;
|
|
17
|
-
/**
|
|
18
|
-
|
|
19
|
-
/**
|
|
17
|
+
/** Color override for the status indicator */
|
|
18
|
+
indicatorColor?: string;
|
|
19
|
+
/** Style override for the avatar container */
|
|
20
20
|
style?: ViewStyle;
|
|
21
21
|
/** Accessibility label for the avatar image */
|
|
22
22
|
accessibilityLabel?: string;
|
|
@@ -20,6 +20,24 @@ export interface CarouselProps extends SpacingProps {
|
|
|
20
20
|
loop?: boolean;
|
|
21
21
|
/** Number of visible items per page */
|
|
22
22
|
itemsPerPage?: number;
|
|
23
|
+
/** Number of slides to advance per snap (defaults to itemsPerPage for backwards compatibility) */
|
|
24
|
+
slidesToScroll?: number;
|
|
25
|
+
/** Align the visible slides within the viewport when there is extra space */
|
|
26
|
+
align?: 'start' | 'center' | 'end';
|
|
27
|
+
/** Contain leading/trailing space by trimming or keeping snap points */
|
|
28
|
+
containScroll?: false | 'trimSnaps' | 'keepSnaps';
|
|
29
|
+
/** Initial slide index to show on mount */
|
|
30
|
+
startIndex?: number;
|
|
31
|
+
/** Allow momentum scrolling without forced snaps */
|
|
32
|
+
dragFree?: boolean;
|
|
33
|
+
/** Permit gestures to skip over multiple snap points (default true) */
|
|
34
|
+
skipSnaps?: boolean;
|
|
35
|
+
/** Drag distance (in px) required before a swipe is committed */
|
|
36
|
+
dragThreshold?: number;
|
|
37
|
+
/** Duration (ms) for programmatic scroll animations */
|
|
38
|
+
duration?: number;
|
|
39
|
+
/** Embla-style breakpoint overrides applied via media queries */
|
|
40
|
+
breakpoints?: Record<string, Partial<CarouselProps>>;
|
|
23
41
|
/**
|
|
24
42
|
* Explicit slide size. Accepts:
|
|
25
43
|
* - percentage string: e.g. "70%"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { DataTableProps } from './types';
|
|
3
3
|
export type { DataTableProps, DataTableColumn, DataTableFilter, DataTableSort, DataTablePagination, SortDirection, FilterType, ColumnDataType } from './types';
|
|
4
|
-
export declare const DataTable: <T>({ id, data, columns, loading, error, emptyMessage, searchable, searchPlaceholder, searchValue: controlledSearchValue, onSearchChange, sortBy, onSortChange, filters, onFilterChange, pagination, onPaginationChange, selectable, selectedRows, onSelectionChange, getRowId, onRowClick, editMode, onEditModeChange, onCellEdit, bulkActions, variant, density, height, virtual, style, hoverHighlight, enableColumnResizing, rowFeatureToggle, initialHiddenColumns, onColumnVisibilityChange, onColumnSettings, showColumnVisibilityManager, rowsPerPageOptions, showRowsPerPageControl, rowActions, actionsColumnWidth, fullWidth, rowBorderWidth, rowBorderColor, rowBorderStyle, columnBorderWidth, columnBorderColor, columnBorderStyle, showOuterBorder, outerBorderWidth, outerBorderColor, expandableRowRender, initialExpandedRows, expandedRows: controlledExpandedRows, onExpandedRowsChange, allowMultipleExpanded, expandIcon, collapseIcon, ...props }: DataTableProps<T>) => React.JSX.Element;
|
|
4
|
+
export declare const DataTable: <T>({ id, data, columns, loading, error, emptyMessage, searchable, searchPlaceholder, searchValue: controlledSearchValue, onSearchChange, sortBy, onSortChange, filters, onFilterChange, pagination, onPaginationChange, selectable, selectedRows, onSelectionChange, getRowId, onRowClick, editMode, onEditModeChange, onCellEdit, bulkActions, variant, striped: stripedProp, density, height, virtual, style, hoverHighlight, enableColumnResizing, rowFeatureToggle, initialHiddenColumns, onColumnVisibilityChange, onColumnSettings, showColumnVisibilityManager, rowsPerPageOptions, showRowsPerPageControl, rowActions, actionsColumnWidth, fullWidth, rowBorderWidth, rowBorderColor, rowBorderStyle, columnBorderWidth, columnBorderColor, columnBorderStyle, showOuterBorder, outerBorderWidth, outerBorderColor, expandableRowRender, initialExpandedRows, expandedRows: controlledExpandedRows, onExpandedRowsChange, allowMultipleExpanded, expandIcon, collapseIcon, ...props }: DataTableProps<T>) => React.JSX.Element;
|
|
5
5
|
export default DataTable;
|
|
@@ -169,6 +169,8 @@ export interface DataTableProps<T = any> extends SpacingProps {
|
|
|
169
169
|
}>;
|
|
170
170
|
/** Width of the actions column */
|
|
171
171
|
actionsColumnWidth?: number;
|
|
172
|
+
/** Force striped row backgrounds regardless of variant */
|
|
173
|
+
striped?: boolean;
|
|
172
174
|
/** Custom header background color */
|
|
173
175
|
headerBackgroundColor?: string;
|
|
174
176
|
/** Show enhanced loading skeletons instead of basic loading text */
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { ViewStyle } from 'react-native';
|
|
2
3
|
import { BaseInputProps } from '../Input/types';
|
|
3
|
-
import { ColorValue, SizeValue } from '../../core/theme/types';
|
|
4
|
+
import { ColorValue, SizeValue, PlatformBlocksTheme } from '../../core/theme/types';
|
|
5
|
+
export type SliderColorScheme = keyof PlatformBlocksTheme['colors'] | (string & {});
|
|
4
6
|
export interface SliderTick {
|
|
5
7
|
/** Tick value */
|
|
6
8
|
value: number;
|
|
@@ -34,6 +36,18 @@ export interface SliderProps extends Omit<BaseInputProps, 'value' | 'onChangeTex
|
|
|
34
36
|
trackSize?: number;
|
|
35
37
|
/** Thumb size */
|
|
36
38
|
thumbSize?: number;
|
|
39
|
+
/** Theme color palette or custom color to drive active elements */
|
|
40
|
+
colorScheme?: SliderColorScheme;
|
|
41
|
+
/** Additional styling for the inactive track */
|
|
42
|
+
trackStyle?: ViewStyle;
|
|
43
|
+
/** Additional styling for the active track */
|
|
44
|
+
activeTrackStyle?: ViewStyle;
|
|
45
|
+
/** Additional styling for the thumb */
|
|
46
|
+
thumbStyle?: ViewStyle;
|
|
47
|
+
/** Override inactive tick color */
|
|
48
|
+
tickColor?: ColorValue;
|
|
49
|
+
/** Override active tick color */
|
|
50
|
+
activeTickColor?: ColorValue;
|
|
37
51
|
/** Input label (above the slider) */
|
|
38
52
|
label?: React.ReactNode;
|
|
39
53
|
/** Value label formatter function, set to null to disable value label */
|
|
@@ -97,6 +111,12 @@ export interface SliderTrackProps {
|
|
|
97
111
|
activeWidth?: number;
|
|
98
112
|
activeLeft?: number;
|
|
99
113
|
isRange?: boolean;
|
|
114
|
+
trackColor?: ColorValue;
|
|
115
|
+
activeTrackColor?: ColorValue;
|
|
116
|
+
trackStyle?: ViewStyle;
|
|
117
|
+
activeTrackStyle?: ViewStyle;
|
|
118
|
+
trackHeight?: number;
|
|
119
|
+
thumbSize?: number;
|
|
100
120
|
}
|
|
101
121
|
export interface SliderTicksProps {
|
|
102
122
|
ticks: Array<{
|
|
@@ -110,6 +130,10 @@ export interface SliderTicksProps {
|
|
|
110
130
|
size: 'sm' | 'md' | 'lg';
|
|
111
131
|
orientation: 'horizontal' | 'vertical';
|
|
112
132
|
keyPrefix?: string;
|
|
133
|
+
trackHeight?: number;
|
|
134
|
+
thumbSize?: number;
|
|
135
|
+
activeTickColor?: ColorValue;
|
|
136
|
+
tickColor?: ColorValue;
|
|
113
137
|
}
|
|
114
138
|
export interface SliderThumbProps {
|
|
115
139
|
position: number;
|
|
@@ -120,6 +144,9 @@ export interface SliderThumbProps {
|
|
|
120
144
|
isDragging: boolean;
|
|
121
145
|
zIndex?: number;
|
|
122
146
|
panHandlers?: any;
|
|
147
|
+
thumbColor?: ColorValue;
|
|
148
|
+
thumbStyle?: ViewStyle;
|
|
149
|
+
thumbSize?: number;
|
|
123
150
|
}
|
|
124
151
|
export interface SliderLabelProps {
|
|
125
152
|
label: React.ReactNode;
|
|
@@ -130,4 +157,5 @@ export interface SliderValueLabelProps {
|
|
|
130
157
|
size: 'sm' | 'md' | 'lg';
|
|
131
158
|
orientation: 'horizontal' | 'vertical';
|
|
132
159
|
isCard?: boolean;
|
|
160
|
+
thumbSize?: number;
|
|
133
161
|
}
|