@limetry/ui 1.2.87 → 1.2.93
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/badge.d.ts +33 -0
- package/dist/components/badge.d.ts.map +1 -0
- package/dist/components/button.d.ts +47 -0
- package/dist/components/button.d.ts.map +1 -0
- package/dist/components/card.d.ts +55 -0
- package/dist/components/card.d.ts.map +1 -0
- package/dist/components/drawer-menu.d.ts +20 -0
- package/dist/components/drawer-menu.d.ts.map +1 -0
- package/dist/components/drawer-menu.types.d.ts +100 -0
- package/dist/components/drawer-menu.types.d.ts.map +1 -0
- package/dist/components/drawer-menu.web.d.ts +20 -0
- package/dist/components/drawer-menu.web.d.ts.map +1 -0
- package/dist/components/icons.d.ts +81 -0
- package/dist/components/icons.d.ts.map +1 -0
- package/dist/components/icons.web.d.ts +81 -0
- package/dist/components/icons.web.d.ts.map +1 -0
- package/dist/components/input.d.ts +75 -0
- package/dist/components/input.d.ts.map +1 -0
- package/dist/components/logo.d.ts +18 -0
- package/dist/components/logo.d.ts.map +1 -0
- package/dist/components/logo.web.d.ts +17 -0
- package/dist/components/logo.web.d.ts.map +1 -0
- package/dist/components/page-header.d.ts +78 -0
- package/dist/components/page-header.d.ts.map +1 -0
- package/dist/components/site-footer.d.ts +5 -0
- package/dist/components/site-footer.d.ts.map +1 -0
- package/dist/components/site-footer.types.d.ts +19 -0
- package/dist/components/site-footer.types.d.ts.map +1 -0
- package/dist/components/site-footer.web.d.ts +7 -0
- package/dist/components/site-footer.web.d.ts.map +1 -0
- package/dist/components/site-header.d.ts +13 -0
- package/dist/components/site-header.d.ts.map +1 -0
- package/dist/components/site-header.types.d.ts +50 -0
- package/dist/components/site-header.types.d.ts.map +1 -0
- package/dist/components/site-header.web.d.ts +14 -0
- package/dist/components/site-header.web.d.ts.map +1 -0
- package/dist/components/stat-card.d.ts +42 -0
- package/dist/components/stat-card.d.ts.map +1 -0
- package/dist/components/theme-toggle.d.ts +12 -0
- package/dist/components/theme-toggle.d.ts.map +1 -0
- package/dist/components/theme-toggle.web.d.ts +24 -0
- package/dist/components/theme-toggle.web.d.ts.map +1 -0
- package/dist/index.cjs +121 -19
- package/dist/index.d.ts +20 -503
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +120 -20
- package/dist/lib/cn.d.ts +12 -0
- package/dist/lib/cn.d.ts.map +1 -0
- package/dist/lib/site-footer-links.d.ts +67 -0
- package/dist/lib/site-footer-links.d.ts.map +1 -0
- package/dist/navigation/types.d.ts +87 -0
- package/dist/navigation/types.d.ts.map +1 -0
- package/package.json +23 -9
- package/src/components/logo.tsx +59 -0
- package/src/components/logo.web.tsx +61 -0
- package/src/components/site-footer.tsx +92 -0
- package/src/components/site-footer.types.ts +21 -0
- package/src/components/site-footer.web.tsx +101 -0
- package/src/components/site-header.web.tsx +2 -2
- package/src/index.ts +2 -0
- package/src/lib/site-footer-links.test.ts +1 -0
- package/src/lib/site-footer-links.ts +1 -0
- package/tailwind.config.ts +2 -2
- package/dist/index.d.cts +0 -504
package/dist/index.d.ts
CHANGED
|
@@ -1,504 +1,21 @@
|
|
|
1
|
-
import React$1, { ReactNode } from 'react';
|
|
2
|
-
import { PressableProps, ViewProps, TextInputProps } from 'react-native';
|
|
3
|
-
import { ClassValue } from 'clsx';
|
|
4
|
-
|
|
5
1
|
/**
|
|
6
|
-
*
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
*
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
*/
|
|
27
|
-
className?: string;
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
* Self-start rounded label chip.
|
|
31
|
-
*
|
|
32
|
-
* @param props - Label text, variant, and className.
|
|
33
|
-
* @returns A styled badge `View`.
|
|
34
|
-
*/
|
|
35
|
-
declare function Badge({ children, variant, className, }: BadgeProps): React.JSX.Element;
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Pressable button with variant and size presets for NativeWind surfaces.
|
|
39
|
-
*/
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Visual treatment for {@link Button}.
|
|
43
|
-
*/
|
|
44
|
-
type ButtonVariant = "primary" | "secondary" | "ghost" | "destructive" | "outline";
|
|
45
|
-
/**
|
|
46
|
-
* Padding and type scale for {@link Button}.
|
|
47
|
-
*/
|
|
48
|
-
type ButtonSize = "sm" | "md" | "lg";
|
|
49
|
-
/**
|
|
50
|
-
* Props for {@link Button}, extending React Native `PressableProps`.
|
|
51
|
-
*/
|
|
52
|
-
type ButtonProps = PressableProps & {
|
|
53
|
-
/**
|
|
54
|
-
* Button label string or custom children.
|
|
55
|
-
*/
|
|
56
|
-
children: ReactNode;
|
|
57
|
-
/**
|
|
58
|
-
* Color / border treatment; defaults to `"primary"`.
|
|
59
|
-
*/
|
|
60
|
-
variant?: ButtonVariant;
|
|
61
|
-
/**
|
|
62
|
-
* Padding and text size; defaults to `"md"`.
|
|
63
|
-
*/
|
|
64
|
-
size?: ButtonSize;
|
|
65
|
-
/**
|
|
66
|
-
* Extra classes merged onto the pressable root.
|
|
67
|
-
*/
|
|
68
|
-
className?: string;
|
|
69
|
-
/**
|
|
70
|
-
* Extra classes merged onto the string-label `Text` child.
|
|
71
|
-
*/
|
|
72
|
-
textClassName?: string;
|
|
73
|
-
};
|
|
74
|
-
/**
|
|
75
|
-
* Accessible pressable button that wraps string children in styled `Text`.
|
|
76
|
-
*
|
|
77
|
-
* @param props - Variant, size, class names, and Pressable props.
|
|
78
|
-
* @returns A `Pressable` root with optional styled label text.
|
|
79
|
-
*/
|
|
80
|
-
declare function Button({ children, variant, size, className, textClassName, disabled, ...props }: ButtonProps): React.JSX.Element;
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Bordered content card and title/description header for dashboard layouts.
|
|
84
|
-
*/
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* Props for {@link Card}.
|
|
88
|
-
*/
|
|
89
|
-
type CardProps = ViewProps & {
|
|
90
|
-
/**
|
|
91
|
-
* Card body content.
|
|
92
|
-
*/
|
|
93
|
-
children: ReactNode;
|
|
94
|
-
/**
|
|
95
|
-
* Extra classes merged onto the card surface.
|
|
96
|
-
*/
|
|
97
|
-
className?: string;
|
|
98
|
-
};
|
|
99
|
-
/**
|
|
100
|
-
* Elevated surface container with border and padding.
|
|
101
|
-
*
|
|
102
|
-
* @param props - Children, className, and View props.
|
|
103
|
-
* @returns A styled card `View`.
|
|
104
|
-
*/
|
|
105
|
-
declare function Card({ children, className, ...props }: CardProps): React.JSX.Element;
|
|
106
|
-
/**
|
|
107
|
-
* Props for {@link CardHeader}.
|
|
108
|
-
*/
|
|
109
|
-
type CardHeaderProps = {
|
|
110
|
-
/**
|
|
111
|
-
* Primary card title.
|
|
112
|
-
*/
|
|
113
|
-
title: string;
|
|
114
|
-
/**
|
|
115
|
-
* Optional supporting description under the title.
|
|
116
|
-
*/
|
|
117
|
-
description?: string;
|
|
118
|
-
/**
|
|
119
|
-
* Optional action slot aligned to the trailing edge.
|
|
120
|
-
*/
|
|
121
|
-
action?: ReactNode;
|
|
122
|
-
/**
|
|
123
|
-
* Extra classes on the header row.
|
|
124
|
-
*/
|
|
125
|
-
className?: string;
|
|
126
|
-
};
|
|
127
|
-
/**
|
|
128
|
-
* Title row for use inside {@link Card}, with optional description and action.
|
|
129
|
-
*
|
|
130
|
-
* @param props - Title, description, action, and className.
|
|
131
|
-
* @returns A header row suitable for card tops.
|
|
132
|
-
*/
|
|
133
|
-
declare function CardHeader({ title, description, action, className, }: CardHeaderProps): React.JSX.Element;
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
* Lucide icon wrappers for React Native / NativeWind consumers.
|
|
137
|
-
*
|
|
138
|
-
* Resolves stroke color from Tailwind text classes via the active color scheme
|
|
139
|
-
* because `lucide-react-native` expects a `color` prop rather than CSS classes.
|
|
140
|
-
*/
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Shared props for exported icon components.
|
|
144
|
-
*/
|
|
145
|
-
type IconProps = {
|
|
146
|
-
/**
|
|
147
|
-
* Tailwind / NativeWind classes that may encode text color for stroke resolution.
|
|
148
|
-
*/
|
|
149
|
-
className?: string;
|
|
150
|
-
};
|
|
151
|
-
/**
|
|
152
|
-
* Shield / security icon for native surfaces.
|
|
153
|
-
*
|
|
154
|
-
* @param props - Optional className for layout and color hints.
|
|
155
|
-
* @returns Native shield icon.
|
|
156
|
-
*/
|
|
157
|
-
declare function ShieldIcon({ className }: IconProps): React$1.JSX.Element;
|
|
158
|
-
/**
|
|
159
|
-
* Key / credentials icon for native surfaces.
|
|
160
|
-
*
|
|
161
|
-
* @param props - Optional className for layout and color hints.
|
|
162
|
-
* @returns Native key icon.
|
|
163
|
-
*/
|
|
164
|
-
declare function KeyIcon({ className }: IconProps): React$1.JSX.Element;
|
|
165
|
-
/**
|
|
166
|
-
* Rules / policy icon (Zap) for native surfaces.
|
|
167
|
-
*
|
|
168
|
-
* @param props - Optional className for layout and color hints.
|
|
169
|
-
* @returns Native rules icon.
|
|
170
|
-
*/
|
|
171
|
-
declare function RulesIcon({ className }: IconProps): React$1.JSX.Element;
|
|
172
|
-
/**
|
|
173
|
-
* Chart / analytics icon for native surfaces.
|
|
174
|
-
*
|
|
175
|
-
* @param props - Optional className for layout and color hints.
|
|
176
|
-
* @returns Native chart icon.
|
|
177
|
-
*/
|
|
178
|
-
declare function ChartIcon({ className }: IconProps): React$1.JSX.Element;
|
|
179
|
-
/**
|
|
180
|
-
* User / account icon for native surfaces.
|
|
181
|
-
*
|
|
182
|
-
* @param props - Optional className for layout and color hints.
|
|
183
|
-
* @returns Native user icon.
|
|
184
|
-
*/
|
|
185
|
-
declare function UserIcon({ className }: IconProps): React$1.JSX.Element;
|
|
186
|
-
/**
|
|
187
|
-
* Home / dashboard icon for native surfaces.
|
|
188
|
-
*
|
|
189
|
-
* @param props - Optional className for layout and color hints.
|
|
190
|
-
* @returns Native home icon.
|
|
191
|
-
*/
|
|
192
|
-
declare function HomeIcon({ className }: IconProps): React$1.JSX.Element;
|
|
193
|
-
/**
|
|
194
|
-
* Terminal / CLI icon for native surfaces.
|
|
195
|
-
*
|
|
196
|
-
* @param props - Optional className for layout and color hints.
|
|
197
|
-
* @returns Native terminal icon.
|
|
198
|
-
*/
|
|
199
|
-
declare function TerminalIcon({ className }: IconProps): React$1.JSX.Element;
|
|
200
|
-
/**
|
|
201
|
-
* Hamburger menu icon for native surfaces.
|
|
202
|
-
*
|
|
203
|
-
* @param props - Optional className for layout and color hints.
|
|
204
|
-
* @returns Native menu icon.
|
|
205
|
-
*/
|
|
206
|
-
declare function MenuIcon({ className }: IconProps): React$1.JSX.Element;
|
|
207
|
-
/**
|
|
208
|
-
* Close / dismiss icon for native surfaces.
|
|
209
|
-
*
|
|
210
|
-
* @param props - Optional className for layout and color hints.
|
|
211
|
-
* @returns Native close icon.
|
|
212
|
-
*/
|
|
213
|
-
declare function XIcon({ className }: IconProps): React$1.JSX.Element;
|
|
214
|
-
|
|
215
|
-
/**
|
|
216
|
-
* Labeled text fields and form section headings for NativeWind forms.
|
|
217
|
-
*/
|
|
218
|
-
|
|
219
|
-
/**
|
|
220
|
-
* Props for {@link Input}, extending React Native `TextInputProps`.
|
|
221
|
-
*/
|
|
222
|
-
type InputProps = TextInputProps & {
|
|
223
|
-
/**
|
|
224
|
-
* Optional field label rendered above the control.
|
|
225
|
-
*/
|
|
226
|
-
label?: string;
|
|
227
|
-
/**
|
|
228
|
-
* Helper text shown when `error` is absent.
|
|
229
|
-
*/
|
|
230
|
-
hint?: string;
|
|
231
|
-
/**
|
|
232
|
-
* Validation message; when set, overrides `hint` and styles the border red.
|
|
233
|
-
*/
|
|
234
|
-
error?: string;
|
|
235
|
-
/**
|
|
236
|
-
* Extra classes on the outer field wrapper.
|
|
237
|
-
*/
|
|
238
|
-
containerClassName?: string;
|
|
239
|
-
/**
|
|
240
|
-
* Extra classes on the `TextInput`.
|
|
241
|
-
*/
|
|
242
|
-
className?: string;
|
|
243
|
-
};
|
|
244
|
-
/**
|
|
245
|
-
* Single-line (or host-controlled) text input with label, hint, and error.
|
|
246
|
-
*
|
|
247
|
-
* @param props - Label/hint/error, container classes, and TextInput props.
|
|
248
|
-
* @returns A labeled field column.
|
|
249
|
-
*/
|
|
250
|
-
declare function Input({ label, hint, error, containerClassName, className, editable, ...props }: InputProps): React.JSX.Element;
|
|
251
|
-
/**
|
|
252
|
-
* Props for {@link TextArea}.
|
|
253
|
-
*/
|
|
254
|
-
type TextAreaProps = InputProps & {
|
|
255
|
-
/**
|
|
256
|
-
* Approximate visible line count (`numberOfLines`); defaults to `4`.
|
|
257
|
-
*/
|
|
258
|
-
rows?: number;
|
|
259
|
-
};
|
|
260
|
-
/**
|
|
261
|
-
* Multiline text field built on {@link Input} with mono-friendly styling.
|
|
262
|
-
*
|
|
263
|
-
* @param props - Input props plus optional `rows`.
|
|
264
|
-
* @returns A multiline labeled field.
|
|
265
|
-
*/
|
|
266
|
-
declare function TextArea({ label, hint, error, containerClassName, className, rows, ...props }: TextAreaProps): React.JSX.Element;
|
|
267
|
-
/**
|
|
268
|
-
* Props for {@link FormSection}.
|
|
269
|
-
*/
|
|
270
|
-
type FormSectionProps = {
|
|
271
|
-
/**
|
|
272
|
-
* Section heading above the child fields.
|
|
273
|
-
*/
|
|
274
|
-
title: string;
|
|
275
|
-
/**
|
|
276
|
-
* Field controls rendered under the title.
|
|
277
|
-
*/
|
|
278
|
-
children: ReactNode;
|
|
279
|
-
};
|
|
280
|
-
/**
|
|
281
|
-
* Groups related form controls under a section title.
|
|
282
|
-
*
|
|
283
|
-
* @param props - Title and child fields.
|
|
284
|
-
* @returns A titled form block.
|
|
285
|
-
*/
|
|
286
|
-
declare function FormSection({ title, children }: FormSectionProps): React.JSX.Element;
|
|
287
|
-
|
|
288
|
-
/**
|
|
289
|
-
* Page chrome helpers: headers, empty placeholders, and alert banners.
|
|
290
|
-
*/
|
|
291
|
-
|
|
292
|
-
/**
|
|
293
|
-
* Props for {@link PageHeader}.
|
|
294
|
-
*/
|
|
295
|
-
type PageHeaderProps = {
|
|
296
|
-
/**
|
|
297
|
-
* Page title.
|
|
298
|
-
*/
|
|
299
|
-
title: string;
|
|
300
|
-
/**
|
|
301
|
-
* Optional subtitle under the title.
|
|
302
|
-
*/
|
|
303
|
-
description?: string;
|
|
304
|
-
/**
|
|
305
|
-
* Optional trailing action (for example a primary button).
|
|
306
|
-
*/
|
|
307
|
-
action?: ReactNode;
|
|
308
|
-
/**
|
|
309
|
-
* Extra classes on the header row.
|
|
310
|
-
*/
|
|
311
|
-
className?: string;
|
|
312
|
-
};
|
|
313
|
-
/**
|
|
314
|
-
* Top-of-page title row with optional description and action slot.
|
|
315
|
-
*
|
|
316
|
-
* @param props - Title, description, action, and className.
|
|
317
|
-
* @returns A page header row.
|
|
318
|
-
*/
|
|
319
|
-
declare function PageHeader({ title, description, action, className, }: PageHeaderProps): React.JSX.Element;
|
|
320
|
-
/**
|
|
321
|
-
* Props for {@link EmptyState}.
|
|
322
|
-
*/
|
|
323
|
-
type EmptyStateProps = {
|
|
324
|
-
/**
|
|
325
|
-
* Empty-state heading.
|
|
326
|
-
*/
|
|
327
|
-
title: string;
|
|
328
|
-
/**
|
|
329
|
-
* Supporting explanation centered under the title.
|
|
330
|
-
*/
|
|
331
|
-
description: string;
|
|
332
|
-
/**
|
|
333
|
-
* Optional CTA rendered below the description.
|
|
334
|
-
*/
|
|
335
|
-
action?: ReactNode;
|
|
336
|
-
};
|
|
337
|
-
/**
|
|
338
|
-
* Dashed placeholder for lists or tables with no rows yet.
|
|
339
|
-
*
|
|
340
|
-
* @param props - Title, description, and optional action.
|
|
341
|
-
* @returns A centered empty-state block.
|
|
342
|
-
*/
|
|
343
|
-
declare function EmptyState({ title, description, action, }: EmptyStateProps): React.JSX.Element;
|
|
344
|
-
/**
|
|
345
|
-
* Props for {@link AlertBanner}.
|
|
346
|
-
*/
|
|
347
|
-
type AlertBannerProps = {
|
|
348
|
-
/**
|
|
349
|
-
* Banner message text.
|
|
350
|
-
*/
|
|
351
|
-
message: string;
|
|
352
|
-
/**
|
|
353
|
-
* Semantic coloring; defaults to `"info"`.
|
|
354
|
-
*/
|
|
355
|
-
variant?: "success" | "error" | "info";
|
|
356
|
-
};
|
|
357
|
-
/**
|
|
358
|
-
* Inline status banner for success, error, or informational messages.
|
|
359
|
-
*
|
|
360
|
-
* @param props - Message and optional variant.
|
|
361
|
-
* @returns A bordered alert strip.
|
|
362
|
-
*/
|
|
363
|
-
declare function AlertBanner({ message, variant, }: AlertBannerProps): React.JSX.Element;
|
|
364
|
-
|
|
365
|
-
/**
|
|
366
|
-
* Metric summary card with optional trend change and trailing icon.
|
|
367
|
-
*/
|
|
368
|
-
|
|
369
|
-
/**
|
|
370
|
-
* Props for {@link StatCard}.
|
|
371
|
-
*/
|
|
372
|
-
type StatCardProps = {
|
|
373
|
-
/**
|
|
374
|
-
* Short metric label above the value.
|
|
375
|
-
*/
|
|
376
|
-
label: string;
|
|
377
|
-
/**
|
|
378
|
-
* Primary numeric or string metric.
|
|
379
|
-
*/
|
|
380
|
-
value: string | number;
|
|
381
|
-
/**
|
|
382
|
-
* Optional change caption under the value (for example `"+12%"`).
|
|
383
|
-
*/
|
|
384
|
-
change?: string;
|
|
385
|
-
/**
|
|
386
|
-
* Colors the change caption; defaults to `"neutral"`.
|
|
387
|
-
*/
|
|
388
|
-
trend?: "up" | "down" | "neutral";
|
|
389
|
-
/**
|
|
390
|
-
* Optional icon rendered opposite the label.
|
|
391
|
-
*/
|
|
392
|
-
icon?: ReactNode;
|
|
393
|
-
/**
|
|
394
|
-
* Extra classes on the card surface.
|
|
395
|
-
*/
|
|
396
|
-
className?: string;
|
|
397
|
-
};
|
|
398
|
-
/**
|
|
399
|
-
* Dashboard metric tile showing label, value, and optional trend text.
|
|
400
|
-
*
|
|
401
|
-
* @param props - Label, value, optional change/trend/icon, and className.
|
|
402
|
-
* @returns A bordered metric card.
|
|
403
|
-
*/
|
|
404
|
-
declare function StatCard({ label, value, change, trend, icon, className, }: StatCardProps): React.JSX.Element;
|
|
405
|
-
|
|
406
|
-
/**
|
|
407
|
-
* Merges conditional class names with Tailwind conflict resolution.
|
|
408
|
-
*
|
|
409
|
-
* Combines `clsx` for conditional lists and `tailwind-merge` so later utilities
|
|
410
|
-
* override earlier conflicting ones (for example `p-2` vs `p-4`).
|
|
411
|
-
*
|
|
412
|
-
* @param inputs - Class values accepted by `clsx` (strings, arrays, objects).
|
|
413
|
-
* @returns A single space-separated class string safe for NativeWind / Tailwind.
|
|
414
|
-
*/
|
|
415
|
-
declare function cn(...inputs: ClassValue[]): string;
|
|
416
|
-
|
|
417
|
-
/**
|
|
418
|
-
* Navigation item model and active-route helpers for drawer / tab chrome.
|
|
419
|
-
*
|
|
420
|
-
* Path matching strips Expo / Next route-group segments (for example `/(app)`)
|
|
421
|
-
* so highlight logic works against public pathnames.
|
|
422
|
-
*/
|
|
423
|
-
/**
|
|
424
|
-
* A single navigable link, optionally nested under a section.
|
|
425
|
-
*/
|
|
426
|
-
type NavItem = {
|
|
427
|
-
/**
|
|
428
|
-
* Destination path (may include route-group segments that are normalized away).
|
|
429
|
-
*/
|
|
430
|
-
href: string;
|
|
431
|
-
/**
|
|
432
|
-
* Human-readable label shown in drawers and tabs.
|
|
433
|
-
*/
|
|
434
|
-
label: string;
|
|
435
|
-
/**
|
|
436
|
-
* Optional icon id consumed by drawer `renderIcon` callbacks.
|
|
437
|
-
*/
|
|
438
|
-
icon?: string;
|
|
439
|
-
/**
|
|
440
|
-
* When true, the item is eligible for mobile bottom-tab presentation.
|
|
441
|
-
*/
|
|
442
|
-
mobileTab?: boolean;
|
|
443
|
-
/**
|
|
444
|
-
* Nested items (for example Docs sections). Drawers render an expand/collapse group.
|
|
445
|
-
*/
|
|
446
|
-
children?: NavItem[];
|
|
447
|
-
};
|
|
448
|
-
/**
|
|
449
|
-
* Strips Expo / Next route-group segments like `/(app)` from a path.
|
|
450
|
-
*
|
|
451
|
-
* @param pathname - Raw router pathname that may include parenthesized groups.
|
|
452
|
-
* @returns Normalized path beginning with `/`, or `"/"` when empty after stripping.
|
|
453
|
-
*/
|
|
454
|
-
declare function normalizePathname(pathname: string): string;
|
|
455
|
-
/**
|
|
456
|
-
* Returns true when pathname matches the item href or a nested child path.
|
|
457
|
-
*
|
|
458
|
-
* Root (`"/"`) matches only the exact root path. Other targets match equality
|
|
459
|
-
* or a prefix followed by `/`.
|
|
460
|
-
*
|
|
461
|
-
* @param pathname - Current location pathname.
|
|
462
|
-
* @param href - Nav item href to test.
|
|
463
|
-
* @returns Whether the pathname is active for that href.
|
|
464
|
-
*/
|
|
465
|
-
declare function isNavItemActive(pathname: string, href: string): boolean;
|
|
466
|
-
/**
|
|
467
|
-
* True when pathname matches this item or any descendant.
|
|
468
|
-
*
|
|
469
|
-
* @param pathname - Current location pathname.
|
|
470
|
-
* @param item - Nav item that may contain nested `children`.
|
|
471
|
-
* @returns Whether this item or a child is active for the pathname.
|
|
472
|
-
*/
|
|
473
|
-
declare function isNavItemOrChildActive(pathname: string, item: NavItem): boolean;
|
|
474
|
-
/**
|
|
475
|
-
* Returns the href of the single most specific nav item for pathname (longest match;
|
|
476
|
-
* deepest item wins ties). Used so only one drawer row gets active highlight.
|
|
477
|
-
*
|
|
478
|
-
* @param pathname - Current location pathname.
|
|
479
|
-
* @param items - Top-level nav tree to search.
|
|
480
|
-
* @returns Winning item `href`, or `null` when nothing matches.
|
|
481
|
-
*/
|
|
482
|
-
declare function findActiveNavHref(pathname: string, items: NavItem[]): string | null;
|
|
483
|
-
/**
|
|
484
|
-
* True when this specific NavItem is the single active highlighted leaf/target for pathname.
|
|
485
|
-
* If this item is a section/folder container and has an active child, it returns false so
|
|
486
|
-
* only the specific child page gets the active highlight.
|
|
487
|
-
*
|
|
488
|
-
* @param pathname - Current location pathname.
|
|
489
|
-
* @param item - Candidate nav item.
|
|
490
|
-
* @param activeHref - Result of {@link findActiveNavHref}, or `null` when none.
|
|
491
|
-
* @returns Whether this item alone should receive the active highlight styles.
|
|
492
|
-
*/
|
|
493
|
-
declare function isItemHighlighted(pathname: string, item: NavItem, activeHref: string | null): boolean;
|
|
494
|
-
/**
|
|
495
|
-
* True when this href is the single highlighted drawer item for pathname.
|
|
496
|
-
*
|
|
497
|
-
* @param pathname - Current location pathname.
|
|
498
|
-
* @param href - Href to compare against the winning active item.
|
|
499
|
-
* @param items - Top-level nav tree used to resolve the active href.
|
|
500
|
-
* @returns Whether `href` equals the single highlighted nav href.
|
|
501
|
-
*/
|
|
502
|
-
declare function isHighlightedNavItem(pathname: string, href: string, items: NavItem[]): boolean;
|
|
503
|
-
|
|
504
|
-
export { AlertBanner, Badge, Button, Card, CardHeader, ChartIcon, EmptyState, FormSection, HomeIcon, Input, KeyIcon, MenuIcon, type NavItem, PageHeader, RulesIcon, ShieldIcon, StatCard, TerminalIcon, TextArea, UserIcon, XIcon, cn, findActiveNavHref, isHighlightedNavItem, isItemHighlighted, isNavItemActive, isNavItemOrChildActive, normalizePathname };
|
|
2
|
+
* Shared NativeWind / React Native UI primitives for Limetry web and Expo apps
|
|
3
|
+
* (`\@limetry/ui`).
|
|
4
|
+
*
|
|
5
|
+
* Re-exports buttons, form controls, layout chrome, navigation helpers, and
|
|
6
|
+
* platform-resolved Lucide icon wrappers used by `\@limetry/web` and the Expo app.
|
|
7
|
+
*
|
|
8
|
+
* @packageDocumentation
|
|
9
|
+
*/
|
|
10
|
+
export { Badge } from "./components/badge";
|
|
11
|
+
export { Button } from "./components/button";
|
|
12
|
+
export { Card, CardHeader } from "./components/card";
|
|
13
|
+
export { ChartIcon, HomeIcon, KeyIcon, MenuIcon, RulesIcon, ShieldIcon, TerminalIcon, UserIcon, XIcon, } from "./components/icons";
|
|
14
|
+
export { FormSection, Input, TextArea } from "./components/input";
|
|
15
|
+
export { Logo } from "./components/logo";
|
|
16
|
+
export { AlertBanner, EmptyState, PageHeader } from "./components/page-header";
|
|
17
|
+
export { SiteFooter } from "./components/site-footer";
|
|
18
|
+
export { StatCard } from "./components/stat-card";
|
|
19
|
+
export { cn } from "./lib/cn";
|
|
20
|
+
export { findActiveNavHref, isHighlightedNavItem, isItemHighlighted, isNavItemActive, isNavItemOrChildActive, type NavItem, normalizePathname, } from "./navigation/types";
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AACpD,OAAO,EACL,SAAS,EACT,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,SAAS,EACT,UAAU,EACV,YAAY,EACZ,QAAQ,EACR,KAAK,GACN,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AACjE,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AACxC,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAC9E,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AACjD,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAA;AAC7B,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,eAAe,EACf,sBAAsB,EACtB,KAAK,OAAO,EACZ,iBAAiB,GAClB,MAAM,oBAAoB,CAAA"}
|