@spteck/react-controls-v2 2.6.9 → 2.7.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/dist/components/NewsCard/INewsCardProps.d.ts +7 -0
- package/dist/components/NewsCardCompact/INewsCardCompactProps.d.ts +7 -0
- package/dist/components/NewsFeed/DraggableFeedCard.d.ts +25 -0
- package/dist/components/NewsFeed/INewsFeedProps.d.ts +16 -0
- package/dist/index.cjs +34 -34
- package/dist/index.js +3101 -2974
- package/package.json +1 -1
|
@@ -32,5 +32,12 @@ export interface INewsCardProps extends IBaseProps {
|
|
|
32
32
|
showAuthorDate?: boolean;
|
|
33
33
|
/** Hide view / like stats in the meta row. Defaults to `true` (shown). */
|
|
34
34
|
showStats?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Show a settings gear button on the card. Clicking it opens a panel where
|
|
37
|
+
* the viewer can toggle image, body text, author/date, and stats visibility,
|
|
38
|
+
* and set headline / body line clamp values. State is local to each instance.
|
|
39
|
+
* @default false
|
|
40
|
+
*/
|
|
41
|
+
showCardSettings?: boolean;
|
|
35
42
|
}
|
|
36
43
|
//# sourceMappingURL=INewsCardProps.d.ts.map
|
|
@@ -37,5 +37,12 @@ export interface INewsCardCompactProps extends IBaseProps {
|
|
|
37
37
|
showAuthorDate?: boolean;
|
|
38
38
|
/** Hide view / like stats in the meta row. Defaults to `true` (shown). */
|
|
39
39
|
showStats?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Show a settings gear button on the card. Clicking it opens a panel where
|
|
42
|
+
* the viewer can toggle image, body text, author/date, and stats visibility,
|
|
43
|
+
* and set headline / body line clamp values. State is local to each instance.
|
|
44
|
+
* @default false
|
|
45
|
+
*/
|
|
46
|
+
showCardSettings?: boolean;
|
|
40
47
|
}
|
|
41
48
|
//# sourceMappingURL=INewsCardCompactProps.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface IDraggableFeedCardProps {
|
|
3
|
+
/** Unique id that matches the item id used in SortableContext. */
|
|
4
|
+
id: string;
|
|
5
|
+
/** When false the wrapper renders children as-is with no dnd behaviour. */
|
|
6
|
+
draggable?: boolean;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
/** Additional style applied to the outer wrapper (e.g. grid column span). */
|
|
9
|
+
wrapperStyle?: React.CSSProperties;
|
|
10
|
+
/** Additional className applied to the outer wrapper (e.g. masonry item class). */
|
|
11
|
+
wrapperClassName?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* DraggableFeedCard
|
|
15
|
+
*
|
|
16
|
+
* A thin sortable wrapper around any news card.
|
|
17
|
+
* When `draggable` is true it:
|
|
18
|
+
* - registers itself with @dnd-kit/sortable via `useSortable`
|
|
19
|
+
* - renders a drag handle (ReOrderDotsVertical icon) in the top-right corner,
|
|
20
|
+
* visible only on hover or while dragging
|
|
21
|
+
* - only attaches the pointer listeners to the handle so card clicks still work
|
|
22
|
+
* - applies CSS transform/transition during drag for smooth reordering
|
|
23
|
+
*/
|
|
24
|
+
export declare const DraggableFeedCard: React.FC<IDraggableFeedCardProps>;
|
|
25
|
+
//# sourceMappingURL=DraggableFeedCard.d.ts.map
|
|
@@ -34,6 +34,10 @@ export interface INewsFeedLayoutProps {
|
|
|
34
34
|
height?: number | string;
|
|
35
35
|
headlineLines?: number;
|
|
36
36
|
bodyLines?: number;
|
|
37
|
+
/** Show a settings gear button on every card allowing per-card display customisation. */
|
|
38
|
+
showCardSettings?: boolean;
|
|
39
|
+
/** When true, each card renders a drag handle and the layout is sortable. */
|
|
40
|
+
draggable?: boolean;
|
|
37
41
|
}
|
|
38
42
|
export interface INewsFeedProps extends IBaseProps {
|
|
39
43
|
/** Collection of news items to display */
|
|
@@ -77,5 +81,17 @@ export interface INewsFeedProps extends IBaseProps {
|
|
|
77
81
|
* @default false
|
|
78
82
|
*/
|
|
79
83
|
showCardSettings?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Enable drag-and-drop reordering of cards.
|
|
86
|
+
* Supported layouts: `grid`, `list`, `masonry`, `feature`.
|
|
87
|
+
* Has no effect on `marquee`, `filmstrip`, `carousel`, and `trending`.
|
|
88
|
+
* @default false
|
|
89
|
+
*/
|
|
90
|
+
draggable?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Called after the user drops a card into a new position.
|
|
93
|
+
* Receives the full re-ordered items array so the parent can persist the new order.
|
|
94
|
+
*/
|
|
95
|
+
onItemsReorder?: (reorderedItems: INewsFeedItem[]) => void;
|
|
80
96
|
}
|
|
81
97
|
//# sourceMappingURL=INewsFeedProps.d.ts.map
|