@marktiderman/genesis-ui-native 2.0.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/chunk-BAU4YQZV.js +760 -0
- package/dist/chunk-BAU4YQZV.js.map +1 -0
- package/dist/chunk-DGUM43GV.js +10 -0
- package/dist/chunk-DGUM43GV.js.map +1 -0
- package/dist/chunk-HNIEFTEL.js +43 -0
- package/dist/chunk-HNIEFTEL.js.map +1 -0
- package/dist/chunk-N4WHTQIO.js +20 -0
- package/dist/chunk-N4WHTQIO.js.map +1 -0
- package/dist/chunk-OHZD7KRO.js +11 -0
- package/dist/chunk-OHZD7KRO.js.map +1 -0
- package/dist/chunk-PTJ2KCLM.js +160 -0
- package/dist/chunk-PTJ2KCLM.js.map +1 -0
- package/dist/chunk-TXJT55JC.js +2213 -0
- package/dist/chunk-TXJT55JC.js.map +1 -0
- package/dist/chunk-ULS7I6ZS.js +183 -0
- package/dist/chunk-ULS7I6ZS.js.map +1 -0
- package/dist/chunk-ZVF6PONU.js +522 -0
- package/dist/chunk-ZVF6PONU.js.map +1 -0
- package/dist/components/index.d.ts +908 -0
- package/dist/components/index.js +8 -0
- package/dist/components/index.js.map +1 -0
- package/dist/data/index.d.ts +117 -0
- package/dist/data/index.js +770 -0
- package/dist/data/index.js.map +1 -0
- package/dist/hooks/index.d.ts +31 -0
- package/dist/hooks/index.js +5 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -0
- package/dist/layouts/index.d.ts +364 -0
- package/dist/layouts/index.js +8 -0
- package/dist/layouts/index.js.map +1 -0
- package/dist/utils.d.ts +5 -0
- package/dist/utils.js +4 -0
- package/dist/utils.js.map +1 -0
- package/package.json +127 -0
- package/src/components/__tests__/accordion.test.tsx +122 -0
- package/src/components/__tests__/chip-group.test.tsx +45 -0
- package/src/components/__tests__/combobox.test.tsx +97 -0
- package/src/components/__tests__/drawer.test.tsx +98 -0
- package/src/components/__tests__/empty-state.test.tsx +66 -0
- package/src/components/__tests__/header-card.test.tsx +31 -0
- package/src/components/__tests__/layout.test.tsx +109 -0
- package/src/components/__tests__/list-item.test.tsx +31 -0
- package/src/components/__tests__/number-input.test.tsx +46 -0
- package/src/components/__tests__/pagination.test.tsx +43 -0
- package/src/components/__tests__/search-bar.test.tsx +41 -0
- package/src/components/__tests__/segmented-empty-alert.test.tsx +79 -0
- package/src/components/__tests__/slider.test.tsx +134 -0
- package/src/components/__tests__/stepper.test.tsx +25 -0
- package/src/components/__tests__/toast.test.tsx +63 -0
- package/src/components/accordion.tsx +223 -0
- package/src/components/alert.tsx +131 -0
- package/src/components/avatar.tsx +68 -0
- package/src/components/badge.tsx +80 -0
- package/src/components/button.tsx +118 -0
- package/src/components/card.tsx +120 -0
- package/src/components/checkbox.tsx +60 -0
- package/src/components/chip-group.tsx +127 -0
- package/src/components/combobox.tsx +137 -0
- package/src/components/date-time-picker.tsx +127 -0
- package/src/components/dialog.tsx +131 -0
- package/src/components/drawer.tsx +131 -0
- package/src/components/dropdown-menu.tsx +133 -0
- package/src/components/empty-state.tsx +161 -0
- package/src/components/header-card.tsx +116 -0
- package/src/components/index.ts +259 -0
- package/src/components/inline-alert.tsx +150 -0
- package/src/components/input.tsx +51 -0
- package/src/components/label.tsx +35 -0
- package/src/components/layout/box.tsx +115 -0
- package/src/components/layout/flex.ts +24 -0
- package/src/components/layout/grid.tsx +73 -0
- package/src/components/layout/index.ts +27 -0
- package/src/components/layout/inline.tsx +63 -0
- package/src/components/layout/spacing.ts +116 -0
- package/src/components/layout/stack.tsx +58 -0
- package/src/components/list-item.tsx +108 -0
- package/src/components/number-input.tsx +119 -0
- package/src/components/pagination.tsx +132 -0
- package/src/components/popover.tsx +198 -0
- package/src/components/progress.tsx +50 -0
- package/src/components/radio-group.tsx +92 -0
- package/src/components/refresh-control.tsx +73 -0
- package/src/components/search-bar.tsx +128 -0
- package/src/components/section-list.tsx +54 -0
- package/src/components/segmented-control.tsx +79 -0
- package/src/components/select.tsx +178 -0
- package/src/components/separator.tsx +31 -0
- package/src/components/sheet.tsx +192 -0
- package/src/components/skeleton.tsx +104 -0
- package/src/components/slider.tsx +223 -0
- package/src/components/stepper.tsx +96 -0
- package/src/components/switch.tsx +35 -0
- package/src/components/tabs.tsx +147 -0
- package/src/components/text.tsx +62 -0
- package/src/components/textarea.tsx +52 -0
- package/src/components/toast.tsx +228 -0
- package/src/components/toggle.tsx +85 -0
- package/src/components/tooltip.tsx +104 -0
- package/src/data/NativeDataFilters.tsx +100 -0
- package/src/data/NativeDataPageShell.tsx +111 -0
- package/src/data/NativeDetailPanel.tsx +130 -0
- package/src/data/NativeEmptyState.tsx +46 -0
- package/src/data/NativeResourceForm.tsx +157 -0
- package/src/data/NativeResourceFormField.tsx +280 -0
- package/src/data/NativeResourcePage.tsx +505 -0
- package/src/data/index.ts +9 -0
- package/src/hooks/index.ts +16 -0
- package/src/hooks/use-genesis-extension.ts +81 -0
- package/src/hooks/use-reduced-motion.ts +32 -0
- package/src/hooks/use-theme-mode.ts +31 -0
- package/src/index.ts +5 -0
- package/src/layouts/__tests__/auth.test.tsx +150 -0
- package/src/layouts/__tests__/nav-bar.test.tsx +86 -0
- package/src/layouts/__tests__/notifications-page.test.tsx +94 -0
- package/src/layouts/__tests__/screen-container.test.tsx +79 -0
- package/src/layouts/__tests__/settings-page.test.tsx +107 -0
- package/src/layouts/__tests__/settings-sub-page.test.tsx +53 -0
- package/src/layouts/auth.tsx +352 -0
- package/src/layouts/index.ts +61 -0
- package/src/layouts/nav-bar.tsx +200 -0
- package/src/layouts/notifications-page.tsx +274 -0
- package/src/layouts/screen-container.tsx +213 -0
- package/src/layouts/settings-page.tsx +195 -0
- package/src/layouts/settings-sub-page.tsx +183 -0
- package/src/nativewind.d.ts +40 -0
- package/src/utils.ts +6 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { Box, Grid, Inline, NativeAccordion, NativeAccordionContent, NativeAccordionItem, NativeAccordionTrigger, NativeAvatar, NativeBanner, NativeChip, NativeChipGroup, NativeCombobox, NativeDatePicker, NativeDialog, NativeDialogContent, NativeDialogDescription, NativeDialogFooter, NativeDialogHeader, NativeDialogTitle, NativeDrawer, NativeDropdownMenu, NativeDropdownMenuContent, NativeDropdownMenuItem, NativeDropdownMenuTrigger, NativeHeaderCard, NativeInlineAlert, NativeNumberInput, NativePagination, NativePopover, NativePopoverContent, NativePopoverTrigger, NativeProgress, NativeRadioGroup, NativeRadioGroupItem, NativeRangeSlider, NativeRefreshControl, NativeSearchBar, NativeSegmentedControl, NativeSheet, NativeSlider, NativeStepper, NativeTabs, NativeTabsContent, NativeTabsList, NativeTabsTrigger, NativeTimePicker, NativeToastProvider, NativeToggle, NativeTooltip, NativeTooltipContent, NativeTooltipTrigger, Stack, spaceScale, spacingClass, toggleVariants, useToast } from '../chunk-TXJT55JC.js';
|
|
2
|
+
export { NativeAlert, NativeAlertDescription, NativeAlertTitle, NativeBadge, NativeCard, NativeCardContent, NativeCardDescription, NativeCardFooter, NativeCardHeader, NativeCardTitle, NativeCheckbox, NativeLabel, NativeSelect, NativeSelectContent, NativeSelectItem, NativeSelectTrigger, NativeSeparator, NativeSkeleton, NativeSwitch, NativeTextarea, alertVariants, badgeTextVariants, badgeVariants } from '../chunk-ZVF6PONU.js';
|
|
3
|
+
export { NativeEmptyState, NativeListItem, NativeListItemDivider, NativeSectionListHeader } from '../chunk-ULS7I6ZS.js';
|
|
4
|
+
export { NativeButton, NativeInput, NativeText, buttonTextVariants, buttonVariants, textVariants } from '../chunk-PTJ2KCLM.js';
|
|
5
|
+
import '../chunk-OHZD7KRO.js';
|
|
6
|
+
import '../chunk-DGUM43GV.js';
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
4
|
+
import { ResourceFormFieldDef, BaseRecord } from '@marktiderman/genesis-core';
|
|
5
|
+
import { Control, UseFormReturn } from 'react-hook-form';
|
|
6
|
+
import { UseResourceOptions } from '@marktiderman/genesis-core/hooks';
|
|
7
|
+
|
|
8
|
+
interface NativeEmptyStateProps {
|
|
9
|
+
message?: string;
|
|
10
|
+
action?: React.ReactNode;
|
|
11
|
+
hasFilters?: boolean;
|
|
12
|
+
onClearFilters?: () => void;
|
|
13
|
+
}
|
|
14
|
+
declare function NativeEmptyState({ message, action, hasFilters, onClearFilters, }: NativeEmptyStateProps): react_jsx_runtime.JSX.Element;
|
|
15
|
+
|
|
16
|
+
interface NativeDataFiltersProps {
|
|
17
|
+
search: string;
|
|
18
|
+
onSearchChange: (value: string) => void;
|
|
19
|
+
searchPlaceholder?: string;
|
|
20
|
+
statusChips?: {
|
|
21
|
+
options: string[];
|
|
22
|
+
selected: string[];
|
|
23
|
+
onChange: (values: string[]) => void;
|
|
24
|
+
};
|
|
25
|
+
sort?: {
|
|
26
|
+
value: string;
|
|
27
|
+
options: Array<{
|
|
28
|
+
value: string;
|
|
29
|
+
label: string;
|
|
30
|
+
}>;
|
|
31
|
+
onChange: (sort: string) => void;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
declare function NativeDataFilters({ search, onSearchChange, searchPlaceholder, statusChips, sort, }: NativeDataFiltersProps): react_jsx_runtime.JSX.Element;
|
|
35
|
+
|
|
36
|
+
interface NativeDataPageShellProps {
|
|
37
|
+
title: string;
|
|
38
|
+
subtitle?: string;
|
|
39
|
+
headerRight?: ReactNode;
|
|
40
|
+
isLoading?: boolean;
|
|
41
|
+
isEmpty?: boolean;
|
|
42
|
+
hasError?: boolean;
|
|
43
|
+
errorMessage?: string;
|
|
44
|
+
onRetry?: () => void;
|
|
45
|
+
emptyMessage?: string;
|
|
46
|
+
emptyState?: ReactNode;
|
|
47
|
+
children: ReactNode;
|
|
48
|
+
}
|
|
49
|
+
declare function NativeDataPageShell({ title, subtitle, headerRight, isLoading, isEmpty, hasError, errorMessage, onRetry, emptyMessage, emptyState, children, }: NativeDataPageShellProps): react_jsx_runtime.JSX.Element;
|
|
50
|
+
|
|
51
|
+
interface NativeDetailField<T = Record<string, unknown>> {
|
|
52
|
+
key: Extract<keyof T, string>;
|
|
53
|
+
label: string;
|
|
54
|
+
render?: (value: unknown, item: T) => ReactNode;
|
|
55
|
+
}
|
|
56
|
+
interface NativeDetailPanelProps<T = Record<string, unknown>> {
|
|
57
|
+
item: T;
|
|
58
|
+
titleField?: Extract<keyof T, string>;
|
|
59
|
+
fields?: NativeDetailField<T>[];
|
|
60
|
+
onEdit?: (item: T) => void;
|
|
61
|
+
onDelete?: (item: T) => void;
|
|
62
|
+
children?: ReactNode;
|
|
63
|
+
}
|
|
64
|
+
declare function NativeDetailPanel<T extends Record<string, unknown>>({ item, titleField, fields, onEdit, onDelete, children, }: NativeDetailPanelProps<T>): react_jsx_runtime.JSX.Element;
|
|
65
|
+
|
|
66
|
+
interface NativeResourceFormFieldRendererProps {
|
|
67
|
+
field: ResourceFormFieldDef;
|
|
68
|
+
control: Control<Record<string, unknown>>;
|
|
69
|
+
action: "create" | "edit";
|
|
70
|
+
autoFocus?: boolean;
|
|
71
|
+
watchedValues?: Record<string, unknown>;
|
|
72
|
+
}
|
|
73
|
+
declare function NativeResourceFormFieldRenderer({ field, control, action, autoFocus, watchedValues, }: NativeResourceFormFieldRendererProps): react_jsx_runtime.JSX.Element | null;
|
|
74
|
+
|
|
75
|
+
interface NativeResourceFormProps {
|
|
76
|
+
resource: string;
|
|
77
|
+
action: "create" | "edit";
|
|
78
|
+
fields?: ResourceFormFieldDef[];
|
|
79
|
+
item?: Record<string, unknown>;
|
|
80
|
+
listData?: Record<string, unknown>[];
|
|
81
|
+
title?: string;
|
|
82
|
+
layout?: "inline" | "screen";
|
|
83
|
+
onSuccess?: (data: Record<string, unknown>) => void;
|
|
84
|
+
onError?: (error: Error) => void;
|
|
85
|
+
renderForm?: (form: UseFormReturn<Record<string, unknown>>, fields: ResourceFormFieldDef[]) => ReactNode;
|
|
86
|
+
}
|
|
87
|
+
declare function NativeResourceForm({ resource, action, fields, item, listData, title, layout, onSuccess, onError, renderForm, }: NativeResourceFormProps): react_jsx_runtime.JSX.Element;
|
|
88
|
+
|
|
89
|
+
interface NativeCardFieldDef<T> {
|
|
90
|
+
key: Extract<keyof T, string>;
|
|
91
|
+
label?: string;
|
|
92
|
+
render?: (value: unknown, item: T) => ReactNode;
|
|
93
|
+
position?: "title" | "badge" | "subtitle" | "meta";
|
|
94
|
+
}
|
|
95
|
+
interface NativeResourcePageProps<T extends BaseRecord = BaseRecord> {
|
|
96
|
+
resource: string;
|
|
97
|
+
resourceOptions?: UseResourceOptions<T>;
|
|
98
|
+
title: string;
|
|
99
|
+
subtitle?: string;
|
|
100
|
+
cardFields?: Array<string | NativeCardFieldDef<T>>;
|
|
101
|
+
renderItem?: (item: T) => ReactNode;
|
|
102
|
+
searchFields?: string[];
|
|
103
|
+
searchPlaceholder?: string;
|
|
104
|
+
statusFilter?: string | {
|
|
105
|
+
field: string;
|
|
106
|
+
options?: string[];
|
|
107
|
+
};
|
|
108
|
+
onItemPress?: (item: T) => void;
|
|
109
|
+
titleField?: Extract<keyof T, string>;
|
|
110
|
+
onCreatePress?: () => void;
|
|
111
|
+
createLabel?: string;
|
|
112
|
+
headerRight?: ReactNode;
|
|
113
|
+
emptyState?: ReactNode;
|
|
114
|
+
}
|
|
115
|
+
declare function NativeResourcePage<T extends BaseRecord = BaseRecord>({ resource, resourceOptions, title, subtitle, cardFields, renderItem, searchFields, searchPlaceholder, statusFilter, onItemPress, titleField, onCreatePress, createLabel, headerRight, emptyState, }: NativeResourcePageProps<T>): react_jsx_runtime.JSX.Element;
|
|
116
|
+
|
|
117
|
+
export { type NativeCardFieldDef, NativeDataFilters, type NativeDataFiltersProps, NativeDataPageShell, type NativeDataPageShellProps, type NativeDetailField, NativeDetailPanel, type NativeDetailPanelProps, NativeEmptyState, type NativeEmptyStateProps, NativeResourceForm, NativeResourceFormFieldRenderer, type NativeResourceFormFieldRendererProps, type NativeResourceFormProps, NativeResourcePage, type NativeResourcePageProps };
|