@bpfdev/oly-ui 1.0.1
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/README.md +371 -0
- package/dist/index.d.mts +195 -0
- package/dist/index.d.ts +195 -0
- package/dist/index.js +3532 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +3497 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +60 -0
- package/tailwind.preset.js +11 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ButtonProps, PaletteMode, Direction } from '@mui/material';
|
|
3
|
+
import { ReactNode, ReactElement } from 'react';
|
|
4
|
+
import { GridColDef } from '@mui/x-data-grid';
|
|
5
|
+
|
|
6
|
+
interface AddCommentInputProps {
|
|
7
|
+
value: string;
|
|
8
|
+
setValue: (s: string) => void;
|
|
9
|
+
handleAddComment: () => void;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
buttonLabel?: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
declare const AddCommentInput: ({ value, setValue, handleAddComment, placeholder, buttonLabel, }: AddCommentInputProps) => react_jsx_runtime.JSX.Element;
|
|
15
|
+
|
|
16
|
+
interface FalconMultiSelectOption {
|
|
17
|
+
id: number;
|
|
18
|
+
name: string;
|
|
19
|
+
}
|
|
20
|
+
interface FalconMultiSelectProps {
|
|
21
|
+
label: string;
|
|
22
|
+
/** Currently selected items (controlled) */
|
|
23
|
+
data: FalconMultiSelectOption[];
|
|
24
|
+
/** Callback when selection is applied or cleared */
|
|
25
|
+
setData: (value: FalconMultiSelectOption[]) => void;
|
|
26
|
+
/** Full list of options to choose from */
|
|
27
|
+
list: FalconMultiSelectOption[];
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
declare const FalconMultiSelect: ({ label, data, setData, list }: FalconMultiSelectProps) => react_jsx_runtime.JSX.Element;
|
|
31
|
+
|
|
32
|
+
interface AdvancedFiltersDialogProps {
|
|
33
|
+
open: boolean;
|
|
34
|
+
onClose: () => void;
|
|
35
|
+
locationOptions?: FalconMultiSelectOption[];
|
|
36
|
+
businessAreaOptions?: FalconMultiSelectOption[];
|
|
37
|
+
selectedLocations?: FalconMultiSelectOption[];
|
|
38
|
+
selectedBusinessAreas?: FalconMultiSelectOption[];
|
|
39
|
+
onLocationsChange?: (value: FalconMultiSelectOption[]) => void;
|
|
40
|
+
onBusinessAreasChange?: (value: FalconMultiSelectOption[]) => void;
|
|
41
|
+
onApply?: () => void;
|
|
42
|
+
onCancel?: () => void;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
declare const AdvancedFiltersDialog: ({ open, onClose, locationOptions, businessAreaOptions, selectedLocations, selectedBusinessAreas, onLocationsChange, onBusinessAreasChange, onApply, onCancel, }: AdvancedFiltersDialogProps) => react_jsx_runtime.JSX.Element;
|
|
46
|
+
|
|
47
|
+
interface ButtonWithIconProps extends ButtonProps {
|
|
48
|
+
children: ReactNode;
|
|
49
|
+
icon?: ReactElement;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
declare const ButtonWithIcon: ({ size, variant, children, icon, ...props }: ButtonWithIconProps) => react_jsx_runtime.JSX.Element;
|
|
53
|
+
|
|
54
|
+
interface FalconButtonProps extends ButtonProps {
|
|
55
|
+
loading?: boolean;
|
|
56
|
+
iconPlacement?: 'start' | 'end';
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
declare const FalconButton: ({ loading, disabled, children, size, variant, type, fullWidth, className, ...props }: FalconButtonProps) => react_jsx_runtime.JSX.Element;
|
|
60
|
+
|
|
61
|
+
interface FalconDIstrictFilterOption {
|
|
62
|
+
id: string | number;
|
|
63
|
+
label: string;
|
|
64
|
+
}
|
|
65
|
+
interface FalconDIstrictFilterProps {
|
|
66
|
+
label?: string;
|
|
67
|
+
options?: FalconDIstrictFilterOption[];
|
|
68
|
+
value?: FalconDIstrictFilterOption[];
|
|
69
|
+
onChange?: (value: FalconDIstrictFilterOption[]) => void;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/** District filter — full implementation can be migrated from apps/docs. */
|
|
73
|
+
declare const FalconDIstrictFilter: ({ label, options, value, onChange, }: FalconDIstrictFilterProps) => react_jsx_runtime.JSX.Element;
|
|
74
|
+
|
|
75
|
+
interface FalconGrayButtonProps {
|
|
76
|
+
text: string;
|
|
77
|
+
Icon?: ReactNode;
|
|
78
|
+
onClick?: () => void;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
declare const FalconGrayButton: ({ text, Icon, onClick, }: FalconGrayButtonProps) => react_jsx_runtime.JSX.Element;
|
|
82
|
+
|
|
83
|
+
interface FalconPaginationProps {
|
|
84
|
+
pageNo: number;
|
|
85
|
+
setPageNo: (n: number) => void;
|
|
86
|
+
perPage: number;
|
|
87
|
+
setPerPage: (n: number) => void;
|
|
88
|
+
totalItems: number;
|
|
89
|
+
perPageOptions?: number[];
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
declare const FalconPagination: ({ pageNo, setPageNo, perPage, setPerPage, totalItems, perPageOptions, }: FalconPaginationProps) => react_jsx_runtime.JSX.Element;
|
|
93
|
+
|
|
94
|
+
interface FalconSelectOption {
|
|
95
|
+
value: string;
|
|
96
|
+
label: string;
|
|
97
|
+
}
|
|
98
|
+
interface FalconSelectProps {
|
|
99
|
+
label: string;
|
|
100
|
+
value: string;
|
|
101
|
+
onChange: (value: string) => void;
|
|
102
|
+
options: string[] | FalconSelectOption[];
|
|
103
|
+
disabled?: boolean;
|
|
104
|
+
clearable?: boolean;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
declare const FalconSelect: ({ label, value, onChange, options, disabled, clearable, }: FalconSelectProps) => react_jsx_runtime.JSX.Element;
|
|
108
|
+
|
|
109
|
+
interface FalconSingleSwitchProps {
|
|
110
|
+
color?: 'success' | 'warning' | 'error' | 'info' | 'primary' | 'secondary' | 'default';
|
|
111
|
+
setStatus?: (status: boolean) => void;
|
|
112
|
+
value?: boolean;
|
|
113
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>, checked: boolean) => void;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
declare const FalconSingleSwitch: ({ color, setStatus, value, onChange, }: FalconSingleSwitchProps) => react_jsx_runtime.JSX.Element;
|
|
117
|
+
|
|
118
|
+
interface FalconTableProps<T = Record<string, unknown>> {
|
|
119
|
+
rows: T[];
|
|
120
|
+
getRowId: (row: T) => string | number;
|
|
121
|
+
columns: GridColDef[];
|
|
122
|
+
pageSizeOptions?: number[];
|
|
123
|
+
initialState?: {
|
|
124
|
+
pagination?: {
|
|
125
|
+
paginationModel: {
|
|
126
|
+
pageSize: number;
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
declare const FalconTable: <T extends Record<string, unknown>>({ rows, getRowId, columns, pageSizeOptions, }: FalconTableProps<T>) => react_jsx_runtime.JSX.Element;
|
|
133
|
+
|
|
134
|
+
interface FalconTicketColumsFilterProps {
|
|
135
|
+
columns?: {
|
|
136
|
+
id: string;
|
|
137
|
+
label: string;
|
|
138
|
+
}[];
|
|
139
|
+
selected?: string[];
|
|
140
|
+
onSelectionChange?: (selected: string[]) => void;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/** Column filter UI — full implementation can be migrated from apps/docs. */
|
|
144
|
+
declare const FalconTicketColumsFilter: ({ columns, selected, onSelectionChange, }: FalconTicketColumsFilterProps) => react_jsx_runtime.JSX.Element;
|
|
145
|
+
|
|
146
|
+
interface FalconTicketFilterProps {
|
|
147
|
+
children: ReactNode;
|
|
148
|
+
label?: string;
|
|
149
|
+
open?: boolean;
|
|
150
|
+
onOpenChange?: (open: boolean) => void;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
declare const FalconTicketFilter: ({ children, label, open: controlledOpen, onOpenChange, }: FalconTicketFilterProps) => react_jsx_runtime.JSX.Element;
|
|
154
|
+
|
|
155
|
+
interface HeatMapLegendItem {
|
|
156
|
+
label: string;
|
|
157
|
+
color: string;
|
|
158
|
+
}
|
|
159
|
+
interface HeatMapChartLegendProps {
|
|
160
|
+
title: string;
|
|
161
|
+
items: HeatMapLegendItem[];
|
|
162
|
+
gradientId: string;
|
|
163
|
+
gradientStops: {
|
|
164
|
+
offset: string;
|
|
165
|
+
color: string;
|
|
166
|
+
}[];
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
declare const HeatMapChartLegend: ({ title, items, gradientId, gradientStops, }: HeatMapChartLegendProps) => react_jsx_runtime.JSX.Element;
|
|
170
|
+
|
|
171
|
+
interface ProgressBarNumberProps {
|
|
172
|
+
number: number;
|
|
173
|
+
progress: 0 | 50 | 100;
|
|
174
|
+
numColor: string;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
declare const ProgressBarNumber: ({ number, progress, numColor, }: ProgressBarNumberProps) => react_jsx_runtime.JSX.Element;
|
|
178
|
+
|
|
179
|
+
type Settings = {
|
|
180
|
+
mode: PaletteMode;
|
|
181
|
+
direction: Direction;
|
|
182
|
+
navHidden?: boolean;
|
|
183
|
+
appBarBlur: boolean;
|
|
184
|
+
navCollapsed: boolean;
|
|
185
|
+
layout?: 'vertical' | 'horizontal';
|
|
186
|
+
lastLayout?: 'vertical' | 'horizontal';
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
interface Props {
|
|
190
|
+
settings: Settings;
|
|
191
|
+
children: ReactNode;
|
|
192
|
+
}
|
|
193
|
+
declare const ThemeComponent: (props: Props) => react_jsx_runtime.JSX.Element;
|
|
194
|
+
|
|
195
|
+
export { AddCommentInput, type AddCommentInputProps, AdvancedFiltersDialog, type AdvancedFiltersDialogProps, ButtonWithIcon, type ButtonWithIconProps, FalconButton, type FalconButtonProps, FalconDIstrictFilter, type FalconDIstrictFilterOption, type FalconDIstrictFilterProps, FalconGrayButton, type FalconGrayButtonProps, FalconMultiSelect, type FalconMultiSelectOption, type FalconMultiSelectProps, FalconPagination, type FalconPaginationProps, FalconSelect, type FalconSelectOption, type FalconSelectProps, FalconSingleSwitch, type FalconSingleSwitchProps, FalconTable, type FalconTableProps, ThemeComponent as FalconThemeProvider, FalconTicketColumsFilter, type FalconTicketColumsFilterProps, FalconTicketFilter, type FalconTicketFilterProps, HeatMapChartLegend, type HeatMapChartLegendProps, type HeatMapLegendItem, ProgressBarNumber, type ProgressBarNumberProps };
|