@wavelengthusaf/components 1.0.4 → 1.0.6

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/index.d.mts CHANGED
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import React__default, { ReactNode } from 'react';
3
+ import { TextFieldVariants } from '@mui/material';
3
4
 
4
5
  /**
5
6
  * Helper Functions
@@ -20,14 +21,171 @@ declare function concat(a: string, b: string): string;
20
21
  interface OutlinedButtonProps {
21
22
  id?: string;
22
23
  variant: "outlined" | "contained" | "text";
24
+ colorOne?: string;
25
+ colorTwo?: string;
23
26
  onClick?: any;
24
27
  margin?: string;
25
28
  padding?: string;
26
29
  autoFocus?: boolean;
27
30
  disabled?: boolean;
28
31
  children?: ReactNode;
32
+ data_test?: string;
29
33
  }
30
- declare function WLButton({ id, variant, margin, padding, autoFocus, disabled, onClick, children }: OutlinedButtonProps): React__default.JSX.Element;
34
+ declare function WavelengthButton({ id, variant, colorOne, colorTwo, margin, padding, autoFocus, disabled, onClick, children }: OutlinedButtonProps): React__default.JSX.Element;
35
+
36
+ interface ButtonProps {
37
+ onClick?: any;
38
+ children?: ReactNode;
39
+ }
40
+ interface IconProps {
41
+ text: string;
42
+ numIcon: string;
43
+ children: ReactNode;
44
+ active: boolean;
45
+ }
46
+ declare function ButtonIcon({ text, numIcon, children, active }: IconProps): React__default.JSX.Element;
47
+ interface ButtonMenuProps {
48
+ children: ReactNode;
49
+ }
50
+ declare function ButtonMenu({ children }: ButtonMenuProps): React__default.JSX.Element;
51
+ declare function WavelengthDropdownButton({ children, onClick }: ButtonProps): React__default.JSX.Element;
52
+
53
+ interface WavelengthAutocompleteProps {
54
+ label: string;
55
+ items?: any;
56
+ variant?: TextFieldVariants;
57
+ width?: number;
58
+ onChange?: (selectedValue: string) => void;
59
+ }
60
+ /**
61
+ * Returns the Best Matching String from a List; Defaults to the first item if no good match is found
62
+ * @param searchString - the string we want to look for
63
+ * @param choices - the list of strings we get to choose from (must be greater than 0)
64
+ * @returns - a string with the "best" match, or "" if no match is found
65
+ */
66
+ declare function findBestStringMatch(searchString: string, choices: string[]): string;
67
+ declare function WavelengthAutocomplete({ label, width, variant, items, onChange }: WavelengthAutocompleteProps): React__default.JSX.Element;
68
+
69
+ interface WavelengthBoxProps {
70
+ width?: number;
71
+ height?: number;
72
+ children: ReactNode;
73
+ }
74
+ declare function WavelengthBox({ width, height, children }: WavelengthBoxProps): React__default.JSX.Element;
75
+
76
+ interface WavelengthContentPlaceholderProps {
77
+ type?: "circle" | "rectangle";
78
+ width?: string | number;
79
+ height?: string | number;
80
+ txtcolor?: string;
81
+ bgcolor?: string;
82
+ children: ReactNode;
83
+ id?: string;
84
+ }
85
+ declare function WavelengthContentPlaceholder({ type, width, height, txtcolor, bgcolor, children, id }: WavelengthContentPlaceholderProps): React__default.JSX.Element;
86
+
87
+ interface WavelengthExampleComponentProps {
88
+ width?: number;
89
+ height?: number;
90
+ }
91
+ declare function WavelengthExampleComponent({ width, height }: WavelengthExampleComponentProps): React__default.JSX.Element;
92
+
93
+ interface SearchResult {
94
+ id: number | string;
95
+ title: string;
96
+ subtitle?: string;
97
+ }
98
+ interface SearchProps {
99
+ id?: string | number;
100
+ mode: "automatic" | "manual";
101
+ borderRadius?: number | string;
102
+ label?: string;
103
+ width?: string;
104
+ height?: string;
105
+ children?: ReactNode;
106
+ searchFunction: (value: string) => SearchResult[];
107
+ onSearchItemSelected: (selectedItem: SearchResult | string) => void;
108
+ }
109
+ declare function WavelengthSearch({ mode, width, height, label, borderRadius, children, searchFunction, onSearchItemSelected }: SearchProps): React__default.JSX.Element | undefined;
110
+
111
+ declare function SearchTextField(): React__default.JSX.Element;
112
+
113
+ declare function WavelengthFooter(): React__default.JSX.Element;
114
+
115
+ declare function WavelengthTitleBar(): React__default.JSX.Element;
116
+
117
+ interface BannerHeaderProps {
118
+ name?: string;
119
+ }
120
+ declare function BannerHeader({ name }: BannerHeaderProps): React__default.JSX.Element;
121
+
122
+ interface bee {
123
+ width?: number;
124
+ height?: number;
125
+ }
126
+ declare function BomberBeeIcon({ width, height }: bee): React__default.JSX.Element;
127
+
128
+ interface Old563EWSLogoProps {
129
+ width?: number;
130
+ height?: number;
131
+ }
132
+ declare function Old563EWSLogo({ width, height }: Old563EWSLogoProps): React__default.JSX.Element;
133
+
134
+ interface AceOfSpadesProps {
135
+ width?: string;
136
+ height?: string;
137
+ }
138
+ declare function AceOfSpadesComponent({ width, height }: AceOfSpadesProps): React__default.JSX.Element;
139
+
140
+ interface ArrowProps {
141
+ width?: number;
142
+ height?: number;
143
+ }
144
+ declare function ArrowIcon({ width, height }: ArrowProps): React__default.JSX.Element;
145
+
146
+ interface PortalProps {
147
+ width?: number;
148
+ height?: number;
149
+ }
150
+ declare function PortalIcon({ width, height }: PortalProps): React__default.JSX.Element;
151
+
152
+ interface SwarmProps {
153
+ width?: number;
154
+ height?: number;
155
+ }
156
+ declare function SwarmIcon({ width, height }: SwarmProps): React__default.JSX.Element;
157
+
158
+ declare function RapidrefIcon(): React__default.JSX.Element;
159
+
160
+ interface SquadronProps {
161
+ width?: number;
162
+ height?: number;
163
+ }
164
+ declare function SquadronIcon({ width, height }: SquadronProps): React__default.JSX.Element;
165
+
166
+ interface WavelengthProps {
167
+ width?: number;
168
+ height?: number;
169
+ }
170
+ declare function WavelengthIcon({ width, height }: WavelengthProps): React__default.JSX.Element;
171
+
172
+ interface DefaultProps {
173
+ width?: string;
174
+ height?: number;
175
+ }
176
+ declare function DefaultIcon({ width, height }: DefaultProps): React__default.JSX.Element;
177
+
178
+ interface HeaderProps {
179
+ numberOfPlanes: number;
180
+ trailDir?: "right" | "left";
181
+ color?: string;
182
+ }
183
+ declare function ManyPlanesComponent({ numberOfPlanes, trailDir, color }: HeaderProps): React__default.JSX.Element;
184
+
185
+ interface WavelengthPlaneTrailProps {
186
+ trailDir?: "right" | "left";
187
+ }
188
+ declare function WavelengthPlaneTrail({ trailDir }: WavelengthPlaneTrailProps): React__default.JSX.Element;
31
189
 
32
190
  type ThemeProperties = {
33
191
  name?: string;
@@ -35,4 +193,20 @@ type ThemeProperties = {
35
193
  declare const WavelengthAppTheme: React.Context<ThemeProperties>;
36
194
  declare const useThemeContext: () => ThemeProperties;
37
195
 
38
- export { type ThemeProperties, WLButton, WavelengthAppTheme, add, concat, useThemeContext };
196
+ interface WavelengthConfirmationModalProps {
197
+ show: boolean;
198
+ setShow: (show: boolean) => void;
199
+ textObj: Record<string, string>;
200
+ handleConfirmationModalOnConfirmProp: () => void;
201
+ }
202
+ declare function WavelengthConfirmationModal(props: WavelengthConfirmationModalProps): React__default.JSX.Element;
203
+
204
+ interface WavelengthContentModalProps {
205
+ show: boolean;
206
+ setShow: (show: boolean) => void;
207
+ textObj: Record<string, string>;
208
+ handleContentModalOnConfirmProp: () => void;
209
+ }
210
+ declare function WavelengthContentModal(props: WavelengthContentModalProps): React__default.JSX.Element;
211
+
212
+ export { AceOfSpadesComponent, ArrowIcon, BannerHeader, BomberBeeIcon, ButtonIcon, ButtonMenu, DefaultIcon, ManyPlanesComponent, Old563EWSLogo, PortalIcon, RapidrefIcon, type SearchResult, SearchTextField, SquadronIcon, SwarmIcon, type ThemeProperties, WavelengthAppTheme, WavelengthAutocomplete, WavelengthBox, WavelengthButton, WavelengthConfirmationModal, WavelengthContentModal, WavelengthContentPlaceholder, WavelengthDropdownButton, WavelengthExampleComponent, WavelengthFooter, WavelengthIcon, WavelengthPlaneTrail, WavelengthSearch, WavelengthTitleBar, add, concat, findBestStringMatch, useThemeContext };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import React__default, { ReactNode } from 'react';
3
+ import { TextFieldVariants } from '@mui/material';
3
4
 
4
5
  /**
5
6
  * Helper Functions
@@ -20,14 +21,171 @@ declare function concat(a: string, b: string): string;
20
21
  interface OutlinedButtonProps {
21
22
  id?: string;
22
23
  variant: "outlined" | "contained" | "text";
24
+ colorOne?: string;
25
+ colorTwo?: string;
23
26
  onClick?: any;
24
27
  margin?: string;
25
28
  padding?: string;
26
29
  autoFocus?: boolean;
27
30
  disabled?: boolean;
28
31
  children?: ReactNode;
32
+ data_test?: string;
29
33
  }
30
- declare function WLButton({ id, variant, margin, padding, autoFocus, disabled, onClick, children }: OutlinedButtonProps): React__default.JSX.Element;
34
+ declare function WavelengthButton({ id, variant, colorOne, colorTwo, margin, padding, autoFocus, disabled, onClick, children }: OutlinedButtonProps): React__default.JSX.Element;
35
+
36
+ interface ButtonProps {
37
+ onClick?: any;
38
+ children?: ReactNode;
39
+ }
40
+ interface IconProps {
41
+ text: string;
42
+ numIcon: string;
43
+ children: ReactNode;
44
+ active: boolean;
45
+ }
46
+ declare function ButtonIcon({ text, numIcon, children, active }: IconProps): React__default.JSX.Element;
47
+ interface ButtonMenuProps {
48
+ children: ReactNode;
49
+ }
50
+ declare function ButtonMenu({ children }: ButtonMenuProps): React__default.JSX.Element;
51
+ declare function WavelengthDropdownButton({ children, onClick }: ButtonProps): React__default.JSX.Element;
52
+
53
+ interface WavelengthAutocompleteProps {
54
+ label: string;
55
+ items?: any;
56
+ variant?: TextFieldVariants;
57
+ width?: number;
58
+ onChange?: (selectedValue: string) => void;
59
+ }
60
+ /**
61
+ * Returns the Best Matching String from a List; Defaults to the first item if no good match is found
62
+ * @param searchString - the string we want to look for
63
+ * @param choices - the list of strings we get to choose from (must be greater than 0)
64
+ * @returns - a string with the "best" match, or "" if no match is found
65
+ */
66
+ declare function findBestStringMatch(searchString: string, choices: string[]): string;
67
+ declare function WavelengthAutocomplete({ label, width, variant, items, onChange }: WavelengthAutocompleteProps): React__default.JSX.Element;
68
+
69
+ interface WavelengthBoxProps {
70
+ width?: number;
71
+ height?: number;
72
+ children: ReactNode;
73
+ }
74
+ declare function WavelengthBox({ width, height, children }: WavelengthBoxProps): React__default.JSX.Element;
75
+
76
+ interface WavelengthContentPlaceholderProps {
77
+ type?: "circle" | "rectangle";
78
+ width?: string | number;
79
+ height?: string | number;
80
+ txtcolor?: string;
81
+ bgcolor?: string;
82
+ children: ReactNode;
83
+ id?: string;
84
+ }
85
+ declare function WavelengthContentPlaceholder({ type, width, height, txtcolor, bgcolor, children, id }: WavelengthContentPlaceholderProps): React__default.JSX.Element;
86
+
87
+ interface WavelengthExampleComponentProps {
88
+ width?: number;
89
+ height?: number;
90
+ }
91
+ declare function WavelengthExampleComponent({ width, height }: WavelengthExampleComponentProps): React__default.JSX.Element;
92
+
93
+ interface SearchResult {
94
+ id: number | string;
95
+ title: string;
96
+ subtitle?: string;
97
+ }
98
+ interface SearchProps {
99
+ id?: string | number;
100
+ mode: "automatic" | "manual";
101
+ borderRadius?: number | string;
102
+ label?: string;
103
+ width?: string;
104
+ height?: string;
105
+ children?: ReactNode;
106
+ searchFunction: (value: string) => SearchResult[];
107
+ onSearchItemSelected: (selectedItem: SearchResult | string) => void;
108
+ }
109
+ declare function WavelengthSearch({ mode, width, height, label, borderRadius, children, searchFunction, onSearchItemSelected }: SearchProps): React__default.JSX.Element | undefined;
110
+
111
+ declare function SearchTextField(): React__default.JSX.Element;
112
+
113
+ declare function WavelengthFooter(): React__default.JSX.Element;
114
+
115
+ declare function WavelengthTitleBar(): React__default.JSX.Element;
116
+
117
+ interface BannerHeaderProps {
118
+ name?: string;
119
+ }
120
+ declare function BannerHeader({ name }: BannerHeaderProps): React__default.JSX.Element;
121
+
122
+ interface bee {
123
+ width?: number;
124
+ height?: number;
125
+ }
126
+ declare function BomberBeeIcon({ width, height }: bee): React__default.JSX.Element;
127
+
128
+ interface Old563EWSLogoProps {
129
+ width?: number;
130
+ height?: number;
131
+ }
132
+ declare function Old563EWSLogo({ width, height }: Old563EWSLogoProps): React__default.JSX.Element;
133
+
134
+ interface AceOfSpadesProps {
135
+ width?: string;
136
+ height?: string;
137
+ }
138
+ declare function AceOfSpadesComponent({ width, height }: AceOfSpadesProps): React__default.JSX.Element;
139
+
140
+ interface ArrowProps {
141
+ width?: number;
142
+ height?: number;
143
+ }
144
+ declare function ArrowIcon({ width, height }: ArrowProps): React__default.JSX.Element;
145
+
146
+ interface PortalProps {
147
+ width?: number;
148
+ height?: number;
149
+ }
150
+ declare function PortalIcon({ width, height }: PortalProps): React__default.JSX.Element;
151
+
152
+ interface SwarmProps {
153
+ width?: number;
154
+ height?: number;
155
+ }
156
+ declare function SwarmIcon({ width, height }: SwarmProps): React__default.JSX.Element;
157
+
158
+ declare function RapidrefIcon(): React__default.JSX.Element;
159
+
160
+ interface SquadronProps {
161
+ width?: number;
162
+ height?: number;
163
+ }
164
+ declare function SquadronIcon({ width, height }: SquadronProps): React__default.JSX.Element;
165
+
166
+ interface WavelengthProps {
167
+ width?: number;
168
+ height?: number;
169
+ }
170
+ declare function WavelengthIcon({ width, height }: WavelengthProps): React__default.JSX.Element;
171
+
172
+ interface DefaultProps {
173
+ width?: string;
174
+ height?: number;
175
+ }
176
+ declare function DefaultIcon({ width, height }: DefaultProps): React__default.JSX.Element;
177
+
178
+ interface HeaderProps {
179
+ numberOfPlanes: number;
180
+ trailDir?: "right" | "left";
181
+ color?: string;
182
+ }
183
+ declare function ManyPlanesComponent({ numberOfPlanes, trailDir, color }: HeaderProps): React__default.JSX.Element;
184
+
185
+ interface WavelengthPlaneTrailProps {
186
+ trailDir?: "right" | "left";
187
+ }
188
+ declare function WavelengthPlaneTrail({ trailDir }: WavelengthPlaneTrailProps): React__default.JSX.Element;
31
189
 
32
190
  type ThemeProperties = {
33
191
  name?: string;
@@ -35,4 +193,20 @@ type ThemeProperties = {
35
193
  declare const WavelengthAppTheme: React.Context<ThemeProperties>;
36
194
  declare const useThemeContext: () => ThemeProperties;
37
195
 
38
- export { type ThemeProperties, WLButton, WavelengthAppTheme, add, concat, useThemeContext };
196
+ interface WavelengthConfirmationModalProps {
197
+ show: boolean;
198
+ setShow: (show: boolean) => void;
199
+ textObj: Record<string, string>;
200
+ handleConfirmationModalOnConfirmProp: () => void;
201
+ }
202
+ declare function WavelengthConfirmationModal(props: WavelengthConfirmationModalProps): React__default.JSX.Element;
203
+
204
+ interface WavelengthContentModalProps {
205
+ show: boolean;
206
+ setShow: (show: boolean) => void;
207
+ textObj: Record<string, string>;
208
+ handleContentModalOnConfirmProp: () => void;
209
+ }
210
+ declare function WavelengthContentModal(props: WavelengthContentModalProps): React__default.JSX.Element;
211
+
212
+ export { AceOfSpadesComponent, ArrowIcon, BannerHeader, BomberBeeIcon, ButtonIcon, ButtonMenu, DefaultIcon, ManyPlanesComponent, Old563EWSLogo, PortalIcon, RapidrefIcon, type SearchResult, SearchTextField, SquadronIcon, SwarmIcon, type ThemeProperties, WavelengthAppTheme, WavelengthAutocomplete, WavelengthBox, WavelengthButton, WavelengthConfirmationModal, WavelengthContentModal, WavelengthContentPlaceholder, WavelengthDropdownButton, WavelengthExampleComponent, WavelengthFooter, WavelengthIcon, WavelengthPlaneTrail, WavelengthSearch, WavelengthTitleBar, add, concat, findBestStringMatch, useThemeContext };