@brightlocal/ui-components 3.3.0 → 3.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.
Files changed (207) hide show
  1. package/AI_USAGE.md +22 -3
  2. package/README.md +177 -109
  3. package/component-meta.json +1307 -113
  4. package/dist/alert-dialog.cjs +1 -1
  5. package/dist/alert-dialog.d.ts +13 -2
  6. package/dist/alert-dialog.d.ts.map +1 -1
  7. package/dist/alert-dialog.js +4 -3
  8. package/dist/banner.cjs +1 -1
  9. package/dist/banner.d.ts +47 -11
  10. package/dist/banner.d.ts.map +1 -1
  11. package/dist/banner.js +156 -79
  12. package/dist/blocks/empty-state.cjs +1 -1
  13. package/dist/blocks/empty-state.d.ts +40 -5
  14. package/dist/blocks/empty-state.d.ts.map +1 -1
  15. package/dist/blocks/empty-state.js +59 -52
  16. package/dist/blocks/input-list.cjs +1 -1
  17. package/dist/blocks/input-list.d.ts +1 -0
  18. package/dist/blocks/input-list.d.ts.map +1 -1
  19. package/dist/blocks/input-list.js +39 -39
  20. package/dist/blocks/sidebar.cjs +1 -1
  21. package/dist/blocks/sidebar.d.ts +12 -6
  22. package/dist/blocks/sidebar.d.ts.map +1 -1
  23. package/dist/blocks/sidebar.js +64 -63
  24. package/dist/button.cjs +1 -1
  25. package/dist/button.d.ts.map +1 -1
  26. package/dist/button.js +47 -43
  27. package/dist/card.cjs +1 -1
  28. package/dist/card.d.ts +12 -0
  29. package/dist/card.d.ts.map +1 -1
  30. package/dist/card.js +115 -97
  31. package/dist/chart.cjs +6 -6
  32. package/dist/chart.d.ts +6 -10
  33. package/dist/chart.d.ts.map +1 -1
  34. package/dist/chart.js +281 -296
  35. package/dist/combobox.cjs +3 -3
  36. package/dist/combobox.d.ts.map +1 -1
  37. package/dist/combobox.js +430 -343
  38. package/dist/command.cjs +1 -1
  39. package/dist/command.d.ts +23 -2
  40. package/dist/command.d.ts.map +1 -1
  41. package/dist/command.js +212 -207
  42. package/dist/count-indicator.cjs +1 -0
  43. package/dist/count-indicator.d.ts +85 -0
  44. package/dist/count-indicator.d.ts.map +1 -0
  45. package/dist/count-indicator.js +72 -0
  46. package/dist/data-table.cjs +1 -1
  47. package/dist/data-table.d.ts +101 -11
  48. package/dist/data-table.d.ts.map +1 -1
  49. package/dist/data-table.js +593 -523
  50. package/dist/description-list.cjs +1 -0
  51. package/dist/description-list.d.ts +142 -0
  52. package/dist/description-list.d.ts.map +1 -0
  53. package/dist/description-list.js +173 -0
  54. package/dist/dialog.cjs +1 -1
  55. package/dist/dialog.d.ts +26 -3
  56. package/dist/dialog.d.ts.map +1 -1
  57. package/dist/dialog.js +62 -47
  58. package/dist/drawer.cjs +1 -1
  59. package/dist/drawer.d.ts +8 -4
  60. package/dist/drawer.d.ts.map +1 -1
  61. package/dist/drawer.js +37 -38
  62. package/dist/file-upload.cjs +1 -0
  63. package/dist/file-upload.d.ts +546 -0
  64. package/dist/file-upload.d.ts.map +1 -0
  65. package/dist/file-upload.js +1103 -0
  66. package/dist/global-layout.cjs +1 -1
  67. package/dist/global-layout.d.ts +7 -2
  68. package/dist/global-layout.d.ts.map +1 -1
  69. package/dist/global-layout.js +52 -52
  70. package/dist/hooks/use-file-dropzone.cjs +1 -0
  71. package/dist/hooks/use-file-dropzone.d.ts +75 -0
  72. package/dist/hooks/use-file-dropzone.d.ts.map +1 -0
  73. package/dist/hooks/use-file-dropzone.js +133 -0
  74. package/dist/hover-card.cjs +1 -1
  75. package/dist/hover-card.d.ts +29 -16
  76. package/dist/hover-card.d.ts.map +1 -1
  77. package/dist/hover-card.js +153 -36
  78. package/dist/index.cjs +1 -1
  79. package/dist/index.d.ts +4 -0
  80. package/dist/index.d.ts.map +1 -1
  81. package/dist/index.js +681 -623
  82. package/dist/input-chip.cjs +1 -1
  83. package/dist/input-chip.d.ts +30 -1
  84. package/dist/input-chip.d.ts.map +1 -1
  85. package/dist/input-chip.js +131 -115
  86. package/dist/input-group.cjs +1 -1
  87. package/dist/input-group.d.ts +37 -2
  88. package/dist/input-group.d.ts.map +1 -1
  89. package/dist/input-group.js +131 -114
  90. package/dist/input-password.cjs +1 -1
  91. package/dist/input-password.js +6 -6
  92. package/dist/lib/empty-canvas.cjs +1 -1
  93. package/dist/lib/empty-canvas.d.ts +27 -1
  94. package/dist/lib/empty-canvas.d.ts.map +1 -1
  95. package/dist/lib/empty-canvas.js +27 -23
  96. package/dist/lib/empty-chip.cjs +1 -1
  97. package/dist/lib/empty-chip.d.ts +19 -2
  98. package/dist/lib/empty-chip.d.ts.map +1 -1
  99. package/dist/lib/empty-chip.js +14 -9
  100. package/dist/lib/field-aria.cjs +1 -1
  101. package/dist/lib/field-aria.d.ts +4 -4
  102. package/dist/lib/field-aria.d.ts.map +1 -1
  103. package/dist/lib/field-aria.js +7 -5
  104. package/dist/lib/media-viewer-content.cjs +1 -1
  105. package/dist/lib/media-viewer-content.js +1 -1
  106. package/dist/lib/motion.cjs +1 -1
  107. package/dist/lib/motion.js +15 -10
  108. package/dist/lib/table-internal.cjs +1 -1
  109. package/dist/lib/table-internal.d.ts +19 -0
  110. package/dist/lib/table-internal.d.ts.map +1 -1
  111. package/dist/lib/table-internal.js +22 -7
  112. package/dist/list.cjs +1 -1
  113. package/dist/list.d.ts +230 -40
  114. package/dist/list.d.ts.map +1 -1
  115. package/dist/list.js +301 -66
  116. package/dist/logo-mark.cjs +1 -1
  117. package/dist/logo-mark.d.ts +18 -2
  118. package/dist/logo-mark.d.ts.map +1 -1
  119. package/dist/logo-mark.js +159 -79
  120. package/dist/media-empty.cjs +1 -1
  121. package/dist/media-empty.d.ts +50 -7
  122. package/dist/media-empty.d.ts.map +1 -1
  123. package/dist/media-empty.js +14 -13
  124. package/dist/media-viewer.cjs +1 -1
  125. package/dist/media-viewer.js +6 -6
  126. package/dist/multi-select-filter.cjs +1 -1
  127. package/dist/multi-select-filter.d.ts.map +1 -1
  128. package/dist/multi-select-filter.js +92 -101
  129. package/dist/pagination.cjs +1 -1
  130. package/dist/pagination.d.ts +11 -0
  131. package/dist/pagination.d.ts.map +1 -1
  132. package/dist/pagination.js +17 -17
  133. package/dist/relative-date.d.ts +6 -0
  134. package/dist/relative-date.d.ts.map +1 -1
  135. package/dist/resizable.d.ts +1 -1
  136. package/dist/result-count.cjs +1 -1
  137. package/dist/result-count.d.ts +13 -16
  138. package/dist/result-count.d.ts.map +1 -1
  139. package/dist/result-count.js +24 -33
  140. package/dist/route-progress.cjs +1 -1
  141. package/dist/route-progress.js +24 -23
  142. package/dist/sheet.cjs +1 -1
  143. package/dist/sheet.d.ts +22 -3
  144. package/dist/sheet.d.ts.map +1 -1
  145. package/dist/sheet.js +152 -125
  146. package/dist/single-select-filter.cjs +1 -1
  147. package/dist/single-select-filter.d.ts.map +1 -1
  148. package/dist/single-select-filter.js +67 -76
  149. package/dist/table.cjs +1 -1
  150. package/dist/table.d.ts.map +1 -1
  151. package/dist/table.js +77 -76
  152. package/dist/tabs.cjs +1 -1
  153. package/dist/tabs.d.ts +39 -3
  154. package/dist/tabs.d.ts.map +1 -1
  155. package/dist/tabs.js +127 -76
  156. package/dist/textarea.cjs +1 -1
  157. package/dist/textarea.d.ts +34 -0
  158. package/dist/textarea.d.ts.map +1 -1
  159. package/dist/textarea.js +115 -19
  160. package/dist/tooltip.cjs +1 -1
  161. package/dist/tooltip.d.ts.map +1 -1
  162. package/dist/tooltip.js +137 -131
  163. package/dist/typography-text.cjs +1 -1
  164. package/dist/typography-text.d.ts +6 -2
  165. package/dist/typography-text.d.ts.map +1 -1
  166. package/dist/typography-text.js +14 -13
  167. package/package.json +2 -3
  168. package/src/blocks/empty-state.tsx +108 -48
  169. package/src/blocks/input-list.tsx +15 -9
  170. package/src/blocks/sidebar.tsx +39 -16
  171. package/src/components/alert-dialog.tsx +18 -2
  172. package/src/components/banner.tsx +247 -68
  173. package/src/components/button.tsx +27 -10
  174. package/src/components/card.tsx +89 -7
  175. package/src/components/chart.tsx +47 -67
  176. package/src/components/combobox.tsx +221 -12
  177. package/src/components/command.tsx +83 -37
  178. package/src/components/count-indicator.tsx +188 -0
  179. package/src/components/data-table.tsx +506 -159
  180. package/src/components/description-list.tsx +445 -0
  181. package/src/components/dialog.tsx +74 -5
  182. package/src/components/drawer.tsx +52 -32
  183. package/src/components/file-upload.tsx +2574 -0
  184. package/src/components/global-layout.tsx +18 -5
  185. package/src/components/hover-card.tsx +395 -65
  186. package/src/components/input-chip.tsx +67 -2
  187. package/src/components/input-group.tsx +89 -6
  188. package/src/components/list.tsx +720 -72
  189. package/src/components/logo-mark.tsx +109 -25
  190. package/src/components/media-empty.tsx +62 -7
  191. package/src/components/multi-select-filter.tsx +9 -16
  192. package/src/components/pagination.tsx +15 -2
  193. package/src/components/relative-date.tsx +6 -0
  194. package/src/components/result-count.tsx +27 -54
  195. package/src/components/sheet.tsx +86 -8
  196. package/src/components/single-select-filter.tsx +9 -16
  197. package/src/components/table.tsx +16 -1
  198. package/src/components/tabs.tsx +223 -41
  199. package/src/components/textarea.tsx +271 -4
  200. package/src/components/tooltip.tsx +29 -2
  201. package/src/components/typography-text.tsx +7 -2
  202. package/src/hooks/use-file-dropzone.ts +325 -0
  203. package/src/index.ts +4 -0
  204. package/src/lib/empty-canvas.tsx +47 -20
  205. package/src/lib/empty-chip.tsx +38 -3
  206. package/src/lib/field-aria.tsx +11 -6
  207. package/src/lib/table-internal.ts +38 -0
package/dist/list.d.ts CHANGED
@@ -1,5 +1,6 @@
1
+ import { ChevronRight } from '@brightlocal/icons';
1
2
  import * as React from "react";
2
- declare const itemVariants: (props?: ({
3
+ declare const listItemVariants: (props?: ({
3
4
  variant?: "default" | "filled" | "outline" | "loading" | null | undefined;
4
5
  align?: "start" | "center" | null | undefined;
5
6
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
@@ -12,6 +13,31 @@ export type ListProps = React.ComponentProps<"ul"> & {
12
13
  * Data hook for automated testing (required).
13
14
  */
14
15
  dataHook: string;
16
+ /**
17
+ * Pulls the list out by the row's own inline padding, so the text of plain
18
+ * (`default`) rows lines up with the content edge of the card around it.
19
+ * @default false
20
+ */
21
+ inset?: boolean;
22
+ /**
23
+ * Draws a hairline between rows and drops the gap and the row radius, for
24
+ * plain (`default`) rows such as a drill-down list. For a single break
25
+ * between two groups, use `ListSeparator` instead.
26
+ * @default false
27
+ */
28
+ divided?: boolean;
29
+ /**
30
+ * Wraps the whole group in one rounded border, for a list that sits on its
31
+ * own as a box (e.g. inside a sheet or dialog). The rows inside stay plain:
32
+ * no gap, no row radius and no row border, so `ListItem variant="outline"`
33
+ * renders as a plain row here instead of doubling the border. Rows get
34
+ * balanced padding inside the box, 16px at the sides and 12px top and
35
+ * bottom (on the ListItemButton / ListItemLink for a pressable row). Pair it with
36
+ * `divided` for a 1px line between rows. For separate bordered rows, use
37
+ * `ListItem variant="outline"` on a list without `bordered`.
38
+ * @default false
39
+ */
40
+ bordered?: boolean;
15
41
  /**
16
42
  * Tracking element identifier for analytics.
17
43
  */
@@ -22,28 +48,33 @@ export type ListProps = React.ComponentProps<"ul"> & {
22
48
  trackingLabel?: string;
23
49
  };
24
50
  /**
25
- * Vertical list container for rendering a collection of Item rows.
51
+ * Vertical list container for rendering a collection of ListItem rows.
26
52
  *
27
53
  * @example
28
54
  * ```tsx
29
55
  * <List dataHook="keywords-list">
30
- * <Item variant="filled" dataHook="item-1">
31
- * <ItemContent>
32
- * <ItemTitle>Keyword</ItemTitle>
33
- * </ItemContent>
34
- * <ItemActions>
56
+ * <ListItem variant="filled" dataHook="item-1">
57
+ * <ListItemContent>
58
+ * <ListItemTitle>Keyword</ListItemTitle>
59
+ * </ListItemContent>
60
+ * <ListItemActions>
35
61
  * <Button variant="ghost" size="icon" dataHook="remove"><XIcon /></Button>
36
- * </ItemActions>
37
- * </Item>
62
+ * </ListItemActions>
63
+ * </ListItem>
38
64
  * </List>
39
65
  * ```
40
66
  */
67
+ declare const listVariants: (props?: ({
68
+ inset?: boolean | null | undefined;
69
+ divided?: boolean | null | undefined;
70
+ bordered?: boolean | null | undefined;
71
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
41
72
  declare const List: React.ForwardRefExoticComponent<Omit<ListProps, "ref"> & React.RefAttributes<HTMLUListElement>>;
42
73
  /**
43
- * Props for an individual Item row within a List.
74
+ * Props for an individual ListItem row within a List.
44
75
  * Extends native `<li>` props with CVA variant styling and optional testing/analytics attributes.
45
76
  */
46
- export type ItemProps = React.ComponentProps<"li"> & {
77
+ export type ListItemProps = React.ComponentProps<"li"> & {
47
78
  /**
48
79
  * Render as the child element instead of `<li>`.
49
80
  * Useful when the item is wrapped by another element (e.g. `<motion.li>`).
@@ -60,7 +91,7 @@ export type ItemProps = React.ComponentProps<"li"> & {
60
91
  variant?: "default" | "filled" | "outline" | "loading";
61
92
  /**
62
93
  * Cross-axis alignment of the row's children (media, content, actions).
63
- * Use `"start"` when ItemMedia (icon, avatar, step number) should pin to the
94
+ * Use `"start"` when ListItemMedia (icon, avatar, step number) should pin to the
64
95
  * first line of multi-line content instead of centering vertically.
65
96
  * @default "center"
66
97
  */
@@ -80,42 +111,79 @@ export type ItemProps = React.ComponentProps<"li"> & {
80
111
  };
81
112
  /**
82
113
  * Row component within a List. Supports `default`, `filled`, `outline`, and `loading` variants.
83
- * Compose with ItemMedia, ItemContent, ItemTitle, ItemDescription, and ItemActions.
114
+ * Compose with ListItemMedia, ListItemContent, ListItemTitle, ListItemDescription, and ListItemActions.
84
115
  */
85
- declare const Item: React.ForwardRefExoticComponent<Omit<ItemProps, "ref"> & React.RefAttributes<HTMLLIElement>>;
86
- /** Props for the ItemMedia sub-component — optional left-side media slot. */
87
- export type ItemMediaProps = React.ComponentProps<"div">;
116
+ declare const ListItem: React.ForwardRefExoticComponent<Omit<ListItemProps, "ref"> & React.RefAttributes<HTMLLIElement>>;
117
+ declare const listItemMediaVariants: (props?: ({
118
+ variant?: "default" | "image" | "icon" | null | undefined;
119
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
120
+ /** Props for the ListItemMedia sub-component — optional left-side media slot. */
121
+ export type ListItemMediaProps = React.ComponentProps<"div"> & {
122
+ /**
123
+ * How the media is framed.
124
+ * - `default` — the icon or avatar as it is
125
+ * - `icon` — a 40px bordered tile, for brand logos and icons
126
+ * - `image` — a 40px rounded crop, for thumbnails
127
+ * @default "default"
128
+ */
129
+ variant?: "default" | "icon" | "image";
130
+ };
88
131
  /**
89
- * Optional left-side media slot for icons or avatars.
132
+ * Optional left-side media slot for icons, avatars, logo tiles or thumbnails.
90
133
  */
91
- declare const ItemMedia: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
92
- /** Props for the ItemContent sub-component — flexible content area within an Item. */
93
- export type ItemContentProps = React.ComponentProps<"div">;
134
+ declare const ListItemMedia: React.ForwardRefExoticComponent<Omit<ListItemMediaProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
135
+ /** Props for the ListItemContent sub-component — flexible content area within an ListItem. */
136
+ export type ListItemContentProps = React.ComponentProps<"div">;
94
137
  /**
95
138
  * Flexible content area that grows to fill available space.
96
- * Place ItemTitle and ItemDescription inside.
139
+ * Place ListItemTitle and ListItemDescription inside.
97
140
  */
98
- declare const ItemContent: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
99
- /** Props for the ItemTitle sub-component — primary text label within an Item. */
100
- export type ItemTitleProps = React.ComponentProps<"div">;
141
+ declare const ListItemContent: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
142
+ /** Props for the ListItemTitle sub-component — primary text label within a ListItem. */
143
+ export type ListItemTitleProps = React.ComponentProps<"div"> & {
144
+ /**
145
+ * Render as the child element, e.g. a `<label>` that names the row's Switch.
146
+ * Works together with `truncate`.
147
+ */
148
+ asChild?: boolean;
149
+ /**
150
+ * Wrap the title to at most two lines and clamp the rest with an ellipsis.
151
+ * When it is clamped, hovering it (or focusing the row's ListItemButton /
152
+ * ListItemLink) shows the full title in a Tooltip. Two lines that fit get
153
+ * no tooltip.
154
+ * @default false
155
+ */
156
+ truncate?: boolean;
157
+ };
101
158
  /**
102
- * Primary text label within an Item.
159
+ * Primary text label within a ListItem.
103
160
  */
104
- declare const ItemTitle: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
105
- /** Props for the ItemDescription sub-component — supporting text beneath ItemTitle. */
106
- export type ItemDescriptionProps = React.ComponentProps<"div">;
161
+ declare const ListItemTitle: React.ForwardRefExoticComponent<Omit<ListItemTitleProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
162
+ /** Props for the ListItemDescription sub-component — supporting text beneath ListItemTitle. */
163
+ export type ListItemDescriptionProps = React.ComponentProps<"div"> & {
164
+ /**
165
+ * Wrap the description to at most two lines and clamp the rest with an
166
+ * ellipsis. When it is clamped, hovering it (or focusing the row's
167
+ * ListItemButton / ListItemLink) shows the full text in a Tooltip. Two lines
168
+ * that fit get no tooltip.
169
+ * @default false
170
+ */
171
+ truncate?: boolean;
172
+ };
107
173
  /**
108
- * Supporting description text beneath ItemTitle.
174
+ * Supporting description text beneath ListItemTitle.
109
175
  */
110
- declare const ItemDescription: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
111
- /** Props for the ItemActions sub-component — right-side slot for action controls. */
112
- export type ItemActionsProps = React.ComponentProps<"div">;
176
+ declare const ListItemDescription: React.ForwardRefExoticComponent<Omit<ListItemDescriptionProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
177
+ /** Props for the ListItemActions sub-component — right-side slot for action controls. */
178
+ export type ListItemActionsProps = React.ComponentProps<"div">;
113
179
  /**
114
- * Right-side slot for action controls such as remove buttons.
180
+ * Right-side slot for trailing content: an icon button, a menu, a Switch, a
181
+ * Badge or Status, a text Button, or several of them side by side. It is at
182
+ * least 36px square, so a single icon button keeps its place.
115
183
  */
116
- declare const ItemActions: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
117
- /** Props for the ItemSubheader sub-component — section heading within a List. */
118
- export type ItemSubheaderProps = React.ComponentProps<"li"> & {
184
+ declare const ListItemActions: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
185
+ /** Props for the ListSubheader sub-component — section heading within a List. */
186
+ export type ListSubheaderProps = React.ComponentProps<"li"> & {
119
187
  /**
120
188
  * Data hook for automated testing.
121
189
  */
@@ -128,11 +196,133 @@ export type ItemSubheaderProps = React.ComponentProps<"li"> & {
128
196
  * @example
129
197
  * ```tsx
130
198
  * <List dataHook="actions-list">
131
- * <ItemSubheader>Suggestions</ItemSubheader>
132
- * <Item variant="default" dataHook="item-1">...</Item>
199
+ * <ListSubheader>Suggestions</ListSubheader>
200
+ * <ListItem variant="default" dataHook="item-1">...</ListItem>
133
201
  * </List>
134
202
  * ```
135
203
  */
136
- declare const ItemSubheader: React.ForwardRefExoticComponent<Omit<ItemSubheaderProps, "ref"> & React.RefAttributes<HTMLLIElement>>;
137
- export { List, Item, ItemMedia, ItemContent, ItemTitle, ItemDescription, ItemActions, ItemSubheader, itemVariants, };
204
+ declare const ListSubheader: React.ForwardRefExoticComponent<Omit<ListSubheaderProps, "ref"> & React.RefAttributes<HTMLLIElement>>;
205
+ /** Props for ListItemButton — a row that runs an action (opens a sheet, a drill-down level). */
206
+ export type ListItemButtonProps = React.ComponentProps<"button"> & {
207
+ /**
208
+ * Data hook for automated testing.
209
+ */
210
+ dataHook?: string;
211
+ /**
212
+ * Tracking element identifier for analytics.
213
+ */
214
+ trackingEl?: string;
215
+ /**
216
+ * Tracking label for analytics context.
217
+ */
218
+ trackingLabel?: string;
219
+ };
220
+ /**
221
+ * Makes the whole row a button. Place it as the only child of an ListItem and put
222
+ * the row's parts (ListItemMedia, ListItemContent, ListItemValue, ListItemChevron) inside it.
223
+ *
224
+ * @example
225
+ * ```tsx
226
+ * <ListItem variant="default" dataHook="location">
227
+ * <ListItemButton dataHook="location-row" onClick={open}>
228
+ * <ListItemContent><ListItemTitle>Location</ListItemTitle></ListItemContent>
229
+ * <ListItemValue>London, UK</ListItemValue>
230
+ * <ListItemChevron />
231
+ * </ListItemButton>
232
+ * </ListItem>
233
+ * ```
234
+ */
235
+ declare const ListItemButton: React.ForwardRefExoticComponent<Omit<ListItemButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
236
+ /** Props for ListItemLink — a row that navigates. */
237
+ export type ListItemLinkProps = React.ComponentProps<"a"> & {
238
+ /**
239
+ * Render as the child element, e.g. a router `<Link>`.
240
+ */
241
+ asChild?: boolean;
242
+ /**
243
+ * Data hook for automated testing.
244
+ */
245
+ dataHook?: string;
246
+ /**
247
+ * Tracking element identifier for analytics.
248
+ */
249
+ trackingEl?: string;
250
+ /**
251
+ * Tracking label for analytics context.
252
+ */
253
+ trackingLabel?: string;
254
+ };
255
+ /**
256
+ * Makes the whole row a link. Place it as the only child of an ListItem; use
257
+ * `asChild` to render a router link.
258
+ *
259
+ * @example
260
+ * ```tsx
261
+ * <ListItem variant="outline" dataHook="billing">
262
+ * <ListItemLink asChild dataHook="billing-link">
263
+ * <NextLink href="/settings/billing">
264
+ * <ListItemContent><ListItemTitle>Billing</ListItemTitle></ListItemContent>
265
+ * <ListItemChevron />
266
+ * </NextLink>
267
+ * </ListItemLink>
268
+ * </ListItem>
269
+ * ```
270
+ */
271
+ declare const ListItemLink: React.ForwardRefExoticComponent<Omit<ListItemLinkProps, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
272
+ /** Props for ListItemValue — the current value shown at the end of a drill-down row. */
273
+ export type ListItemValueProps = React.ComponentProps<"span">;
274
+ /**
275
+ * The row's current value, before the chevron: muted, right-aligned, and cut
276
+ * off with an ellipsis past half the row so the title always keeps its room.
277
+ */
278
+ declare const ListItemValue: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
279
+ /** Props for ListItemChevron — the trailing arrow of a row that opens something. */
280
+ export type ListItemChevronProps = React.ComponentProps<typeof ChevronRight>;
281
+ /**
282
+ * Trailing chevron for a row that navigates or drills down. Decorative: the
283
+ * row's button or link carries the meaning.
284
+ */
285
+ declare const ListItemChevron: React.ForwardRefExoticComponent<Omit<import('@brightlocal/icons').WrappedLucideProps & React.RefAttributes<SVGSVGElement>, "ref"> & React.RefAttributes<SVGSVGElement>>;
286
+ /** Props for ListSeparator — a hairline between two rows or groups. */
287
+ export type ListSeparatorProps = React.ComponentProps<"li">;
288
+ /**
289
+ * A hairline between rows. Hidden from assistive tech so the list's item
290
+ * count stays the number of rows. For a line between every row, use
291
+ * `<List divided>` instead.
292
+ */
293
+ declare const ListSeparator: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React.RefAttributes<HTMLLIElement>>;
294
+ /** @deprecated Use `ListItem`. Removed in 4.0. */
295
+ declare const Item: React.ForwardRefExoticComponent<Omit<ListItemProps, "ref"> & React.RefAttributes<HTMLLIElement>>;
296
+ /** @deprecated Use `ListItemMedia`. Removed in 4.0. */
297
+ declare const ItemMedia: React.ForwardRefExoticComponent<Omit<ListItemMediaProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
298
+ /** @deprecated Use `ListItemContent`. Removed in 4.0. */
299
+ declare const ItemContent: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
300
+ /** @deprecated Use `ListItemTitle`. Removed in 4.0. */
301
+ declare const ItemTitle: React.ForwardRefExoticComponent<Omit<ListItemTitleProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
302
+ /** @deprecated Use `ListItemDescription`. Removed in 4.0. */
303
+ declare const ItemDescription: React.ForwardRefExoticComponent<Omit<ListItemDescriptionProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
304
+ /** @deprecated Use `ListItemActions`. Removed in 4.0. */
305
+ declare const ItemActions: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
306
+ /** @deprecated Use `ListSubheader`. Removed in 4.0. */
307
+ declare const ItemSubheader: React.ForwardRefExoticComponent<Omit<ListSubheaderProps, "ref"> & React.RefAttributes<HTMLLIElement>>;
308
+ /** @deprecated Use `listItemVariants`. Removed in 4.0. */
309
+ declare const itemVariants: (props?: ({
310
+ variant?: "default" | "filled" | "outline" | "loading" | null | undefined;
311
+ align?: "start" | "center" | null | undefined;
312
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
313
+ /** @deprecated Use `ListItemProps`. Removed in 4.0. */
314
+ export type ItemProps = ListItemProps;
315
+ /** @deprecated Use `ListItemMediaProps`. Removed in 4.0. */
316
+ export type ItemMediaProps = ListItemMediaProps;
317
+ /** @deprecated Use `ListItemContentProps`. Removed in 4.0. */
318
+ export type ItemContentProps = ListItemContentProps;
319
+ /** @deprecated Use `ListItemTitleProps`. Removed in 4.0. */
320
+ export type ItemTitleProps = ListItemTitleProps;
321
+ /** @deprecated Use `ListItemDescriptionProps`. Removed in 4.0. */
322
+ export type ItemDescriptionProps = ListItemDescriptionProps;
323
+ /** @deprecated Use `ListItemActionsProps`. Removed in 4.0. */
324
+ export type ItemActionsProps = ListItemActionsProps;
325
+ /** @deprecated Use `ListSubheaderProps`. Removed in 4.0. */
326
+ export type ItemSubheaderProps = ListSubheaderProps;
327
+ export { List, ListItem, ListItemButton, ListItemLink, ListItemMedia, ListItemContent, ListItemTitle, ListItemDescription, ListItemValue, ListItemChevron, ListItemActions, ListSubheader, ListSeparator, listVariants, listItemVariants, listItemMediaVariants, Item, ItemMedia, ItemContent, ItemTitle, ItemDescription, ItemActions, ItemSubheader, itemVariants, };
138
328
  //# sourceMappingURL=list.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/components/list.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,QAAA,MAAM,YAAY;;;8EA8BjB,CAAC;AAMF;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG;IACnD;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,QAAA,MAAM,IAAI,iGAYT,CAAC;AAOF;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG;IACnD;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAC;IACvD;;;;;OAKG;IACH,KAAK,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;IAC3B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF;;;GAGG;AACH,QAAA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