@5ive-souls/controls 0.0.1 → 0.0.3
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/5ive-souls-controls-0.0.3.tgz +0 -0
- package/dist/Section-Bw_kuHpK.js +754 -0
- package/dist/components/ClassNames.js +7 -0
- package/dist/components/DynamicForm/Builder/DynamicFormBuilder.js +64 -0
- package/dist/components/DynamicForm/Builder/Field/FieldBuilder.js +53 -0
- package/dist/components/DynamicForm/Builder/Section/SectionBuilder.js +16 -0
- package/dist/components/DynamicForm/Builder/index.js +8 -0
- package/dist/components/DynamicForm/DynamicForm.js +197 -0
- package/dist/components/DynamicForm/Interfaces/IField.js +0 -0
- package/dist/components/DynamicForm/Interfaces/IFieldGroup.js +0 -0
- package/dist/components/DynamicForm/Interfaces/IFormMetaData.js +0 -0
- package/dist/components/DynamicForm/Interfaces/IFormSection.js +0 -0
- package/dist/components/DynamicForm/Interfaces/index.js +0 -0
- package/dist/components/DynamicForm/index.js +10 -0
- package/dist/components/FiveSoulsProvider/FiveSouls.Types.js +4 -0
- package/dist/components/FiveSoulsProvider/FiveSoulsProvider.js +20 -0
- package/dist/components/FiveSoulsProvider/deviceContext.js +5 -0
- package/dist/components/FiveSoulsProvider/index.js +10 -0
- package/dist/components/FiveSoulsProvider/useDevice.js +10 -0
- package/dist/components/FlexBox/FlexBox.js +75 -0
- package/dist/components/FlexBox/FlexBoxItem/FlexBoxItem.js +15 -0
- package/dist/components/FlexBox/FlexBoxItem/index.js +4 -0
- package/dist/components/FlexBox/FlexBoxItemResizer/FlexBoxItemResizer.js +80 -0
- package/dist/components/FlexBox/FlexBoxItemResizer/index.js +4 -0
- package/dist/components/FlexBox/FlexBoxUtils.js +13 -0
- package/dist/components/FlexBox/ResizeUtils.js +31 -0
- package/dist/components/FlexBox/index.js +8 -0
- package/dist/components/Grid/Grid.js +97 -0
- package/dist/components/Grid/GridCell/GridCell.js +16 -0
- package/dist/components/Grid/GridCell/index.js +4 -0
- package/dist/components/Grid/GridContext.js +5 -0
- package/dist/components/Grid/GridUtils.js +10 -0
- package/dist/components/Grid/ResizableGridCell/ResizableGridCell.js +72 -0
- package/dist/components/Grid/ResizableGridCell/index.js +4 -0
- package/dist/components/Grid/index.js +12 -0
- package/dist/components/IComponentProps.js +0 -0
- package/dist/components/JumpList/JumpList.js +178 -0
- package/dist/components/JumpList/index.js +4 -0
- package/dist/components/RichText/RichText.js +32 -0
- package/dist/components/RichText/index.js +4 -0
- package/dist/components/Section/Section.js +12 -0
- package/dist/components/Section/SectionUtils.js +15 -0
- package/dist/components/Section/index.js +4 -0
- package/dist/components/ThemePicker/ThemePicker.js +92 -0
- package/dist/components/ThemePicker/Themes/Cornflower/Cornflower.js +32 -0
- package/dist/components/ThemePicker/Themes/Crimson/Crimson.js +32 -0
- package/dist/components/ThemePicker/Themes/Forest/Forest.js +32 -0
- package/dist/components/ThemePicker/Themes/Royal/Royal.js +32 -0
- package/dist/components/ThemePicker/Themes/index.js +18 -0
- package/dist/components/ThemePicker/index.js +20 -0
- package/dist/components/Wizard/Wizard.js +99 -0
- package/dist/components/Wizard/WizardPanel/WizardPanel.js +14 -0
- package/dist/components/Wizard/WizardPanel/index.js +4 -0
- package/dist/components/Wizard/index.js +6 -0
- package/dist/components/index.js +61 -0
- package/dist/createFluentIcon-CwLxkjIW.js +503 -0
- package/dist/main.d.ts +637 -0
- package/dist/main.js +61 -0
- package/package.json +75 -64
package/dist/main.d.ts
ADDED
|
@@ -0,0 +1,637 @@
|
|
|
1
|
+
import { BrandVariants } from '@fluentui/react-components';
|
|
2
|
+
import { default as default_2 } from 'react';
|
|
3
|
+
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
4
|
+
import { Theme } from '@fluentui/react-components';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Transient component, will not render anything but it's props are used by it's parent Grid component.
|
|
8
|
+
*/
|
|
9
|
+
export declare const ColumnDefinition: default_2.FunctionComponent<IGridSize>;
|
|
10
|
+
|
|
11
|
+
export declare const cornflower: BrandVariants;
|
|
12
|
+
|
|
13
|
+
export declare const cornflowerDark: Theme;
|
|
14
|
+
|
|
15
|
+
export declare const cornflowerLight: Theme;
|
|
16
|
+
|
|
17
|
+
export declare const crimson: BrandVariants;
|
|
18
|
+
|
|
19
|
+
export declare const crimsonDark: Theme;
|
|
20
|
+
|
|
21
|
+
export declare const crimsonLight: Theme;
|
|
22
|
+
|
|
23
|
+
export declare const enum Device {
|
|
24
|
+
Desktop = 0,
|
|
25
|
+
Tablet = 1,
|
|
26
|
+
Mobile = 2
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export declare const deviceContext: default_2.Context<IFiveSoulsProvider>;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* The `DynamicForm` component allows the consumer to display robust and feature rich input forms by defining the structure of
|
|
33
|
+
* the data requested instead of the UI.
|
|
34
|
+
*
|
|
35
|
+
* The `metaData` can be sourced from several locations, either by using the `DynamicFormBuilder` locally, in code, or even retrieved
|
|
36
|
+
* from a server.
|
|
37
|
+
*
|
|
38
|
+
* The data input in the form can be accessed via the `omSubmit` callback passed in. It will be invoked with an object containing all the data.
|
|
39
|
+
*
|
|
40
|
+
* Alternatively you can provide an Action URL and have the `DynamicForm` behave as a standard HTML form.
|
|
41
|
+
*/
|
|
42
|
+
export declare const DynamicForm: default_2.FunctionComponent<IDynamicFormProps>;
|
|
43
|
+
|
|
44
|
+
export declare class DynamicFormBuilder {
|
|
45
|
+
private _formData;
|
|
46
|
+
private _section;
|
|
47
|
+
private _line;
|
|
48
|
+
private _field;
|
|
49
|
+
private _sectionBuilder;
|
|
50
|
+
private _fieldBuilder;
|
|
51
|
+
private _defaultValues;
|
|
52
|
+
get Section(): SectionBuilder;
|
|
53
|
+
get Field(): FieldBuilder;
|
|
54
|
+
private constructor();
|
|
55
|
+
static Start(title?: string): DynamicFormBuilder;
|
|
56
|
+
Finish(): IFormMetaData;
|
|
57
|
+
AddSection(title: string): DynamicFormBuilder;
|
|
58
|
+
AddLine(callback: (builder: DynamicFormBuilder) => void): DynamicFormBuilder;
|
|
59
|
+
AddField(key: string, label?: string): DynamicFormBuilder;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export declare class FieldBuilder {
|
|
63
|
+
private _formBuilder;
|
|
64
|
+
private _field;
|
|
65
|
+
private _defaultValues;
|
|
66
|
+
constructor(formBuilder: DynamicFormBuilder, field: IField, defaultValues: unknown);
|
|
67
|
+
SetType(type?: "text" | "email" | "password" | "search" | "tel" | "url" | "date" | "datetime-local" | "month" | "number" | "time" | "week"): DynamicFormBuilder;
|
|
68
|
+
IsMultiLined(): DynamicFormBuilder;
|
|
69
|
+
IsRequired(): DynamicFormBuilder;
|
|
70
|
+
SetOptions(options: string[]): DynamicFormBuilder;
|
|
71
|
+
AsRadiogroup(): DynamicFormBuilder;
|
|
72
|
+
SetValidation(validation: string): DynamicFormBuilder;
|
|
73
|
+
SetHint(hint: string): DynamicFormBuilder;
|
|
74
|
+
IsBoolean(): DynamicFormBuilder;
|
|
75
|
+
DoesNotFill(): DynamicFormBuilder;
|
|
76
|
+
WithDefaultValue(value: string): DynamicFormBuilder;
|
|
77
|
+
/**
|
|
78
|
+
* Marks the current field dependant on the value of another field.
|
|
79
|
+
* @param key The key of the field this one is dependant on.
|
|
80
|
+
* @param value The expected value of the field. Can either be !=NULL for any value, true or false for a boolean field, or any string value.
|
|
81
|
+
* @param type What aspect of this field is controlled by the other fields value? Either visibility or enabled.
|
|
82
|
+
* @returns
|
|
83
|
+
*/
|
|
84
|
+
WithDependency(key: string, value: string | "!=NULL", type: "visibility" | "enabled"): DynamicFormBuilder;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* The FiveSoulsProvider provides UI responsiveness to the 5ive Souls components. It also acts as a FluentProvider allowing theming.
|
|
89
|
+
*/
|
|
90
|
+
export declare const FiveSoulsProvider: (props: IFiveSoulsProviderProps) => JSX_2.Element;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* The FlexBox component is a React wrapper around the CSS Flexible Box Layout Module.
|
|
94
|
+
*/
|
|
95
|
+
export declare const FlexBox: default_2.FunctionComponent<IFlexBoxProps>;
|
|
96
|
+
|
|
97
|
+
export declare const FlexBoxItem: default_2.FunctionComponent<IFlexBoxItemProps>;
|
|
98
|
+
|
|
99
|
+
export declare const FlexBoxItemResizer: default_2.FunctionComponent<IFlexBoxItemResizerProps>;
|
|
100
|
+
|
|
101
|
+
export declare const forest: BrandVariants;
|
|
102
|
+
|
|
103
|
+
export declare const forestDark: Theme;
|
|
104
|
+
|
|
105
|
+
export declare const forestLight: Theme;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* The `Grid` component is a React wrapper around the CSS Grid Layout Module. It provides an easy and intuitive way to define the Columns, Rows, and grid item placement.
|
|
109
|
+
*
|
|
110
|
+
* To add a Column or Row simplye provide a `ColumnDefintion` or `RowDefinition` as a child element of the `Grid`.
|
|
111
|
+
*/
|
|
112
|
+
export declare const Grid: default_2.FunctionComponent<IGridProps>;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* The `GridCell` component exposes properties simplifying defining the location of a CSS Grid Item.
|
|
116
|
+
*/
|
|
117
|
+
export declare const GridCell: default_2.FunctionComponent<IGridCellProps>;
|
|
118
|
+
|
|
119
|
+
export declare interface IComponentProps extends default_2.DetailedHTMLProps<default_2.HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export declare interface IDynamicFormProps extends IComponentProps {
|
|
123
|
+
/**
|
|
124
|
+
* Object that provides the Sections and Fields to be displayed.
|
|
125
|
+
*/
|
|
126
|
+
metaData: IFormMetaData;
|
|
127
|
+
/**
|
|
128
|
+
* Render the form as read-only. The fields and submit button cannot be interacted with.
|
|
129
|
+
* Next and Previous buttons still function.
|
|
130
|
+
*/
|
|
131
|
+
readonly?: boolean;
|
|
132
|
+
/**
|
|
133
|
+
* Value provided to the HTML Form element wrapping all the fields.
|
|
134
|
+
* Mutually exclusive with the onSubmit callback.
|
|
135
|
+
* @default false
|
|
136
|
+
*/
|
|
137
|
+
action?: string;
|
|
138
|
+
/**
|
|
139
|
+
* The target of the HTML Form when an action value has been provided.
|
|
140
|
+
*/
|
|
141
|
+
target?: string;
|
|
142
|
+
/**
|
|
143
|
+
* Callback invoked when the submit button on the final panel is pressed.
|
|
144
|
+
* @param results
|
|
145
|
+
* @returns
|
|
146
|
+
*/
|
|
147
|
+
onSubmit?: (results: unknown) => void;
|
|
148
|
+
/**
|
|
149
|
+
* Collections of strings that override the default values used by the Dynamic Form
|
|
150
|
+
*/
|
|
151
|
+
strings?: IDynamicFormStrings;
|
|
152
|
+
/**
|
|
153
|
+
* Collections of strings that override the default values used by Wizard used by the Dynamic Form.
|
|
154
|
+
*/
|
|
155
|
+
wizardStrings?: IWizardStrings;
|
|
156
|
+
/**
|
|
157
|
+
* Callback invoked when a field has it's value updated.
|
|
158
|
+
*/
|
|
159
|
+
onFieldChanged?: (key: string, oldValue: unknown, newValue: string) => void;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
declare interface IDynamicFormStrings {
|
|
163
|
+
/**
|
|
164
|
+
* Value used as the error message displayed below all missing fields when attempting to change sections.
|
|
165
|
+
*/
|
|
166
|
+
fieldRequired?: string;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export declare interface IField {
|
|
170
|
+
key: string;
|
|
171
|
+
label?: string;
|
|
172
|
+
type?: "text" | "email" | "password" | "search" | "tel" | "url" | "date" | "datetime-local" | "month" | "number" | "time" | "week";
|
|
173
|
+
multiLine?: boolean;
|
|
174
|
+
required?: boolean;
|
|
175
|
+
options?: string[];
|
|
176
|
+
asRadioGroup?: boolean;
|
|
177
|
+
validationMessage?: string;
|
|
178
|
+
hint?: string;
|
|
179
|
+
isBoolean?: boolean;
|
|
180
|
+
doNotFill?: boolean;
|
|
181
|
+
/**
|
|
182
|
+
* Key of the other field this field depends on.
|
|
183
|
+
*/
|
|
184
|
+
dependantOn?: string;
|
|
185
|
+
/**
|
|
186
|
+
* Value of the dependency key that will trigger the dependency type.
|
|
187
|
+
*/
|
|
188
|
+
dependantValue?: string | "!=NULL";
|
|
189
|
+
/**
|
|
190
|
+
* Defines what aspect of this field is effected by the dependant field.
|
|
191
|
+
*/
|
|
192
|
+
dependencyType?: "visibility" | "enabled";
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export declare interface IFieldGroup {
|
|
196
|
+
fields: IField[];
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export declare interface IFiveSoulsProvider {
|
|
200
|
+
device: Device;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
declare interface IFiveSoulsProviderProps {
|
|
204
|
+
children?: default_2.ReactNode;
|
|
205
|
+
/**
|
|
206
|
+
* Sets the value (in pixels) that is compared to the Windows inner width to determine if the device is a mobile.
|
|
207
|
+
*/
|
|
208
|
+
mobileThreshold?: number;
|
|
209
|
+
/**
|
|
210
|
+
* Sets the value (in pixels) that is compared to the Windows inner width to determine if the device is a tablet.
|
|
211
|
+
*/
|
|
212
|
+
tabletThreshold?: number;
|
|
213
|
+
/**
|
|
214
|
+
* Sets the theme used in a scope.
|
|
215
|
+
*/
|
|
216
|
+
theme?: Theme;
|
|
217
|
+
/**
|
|
218
|
+
* Sets the class name to be applied to the inner FluentProvider.
|
|
219
|
+
*/
|
|
220
|
+
className?: string;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
export declare interface IFlexBoxItemProps extends IComponentProps {
|
|
224
|
+
grow?: number;
|
|
225
|
+
shrink?: number;
|
|
226
|
+
basis?: string;
|
|
227
|
+
padding?: string | number;
|
|
228
|
+
minSize?: number;
|
|
229
|
+
maxSize?: number;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
export declare interface IFlexBoxItemResizerProps extends IComponentProps {
|
|
233
|
+
horizontal?: boolean;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export declare interface IFlexBoxProps extends IComponentProps {
|
|
237
|
+
childrenGap?: number | string;
|
|
238
|
+
horizontal?: boolean;
|
|
239
|
+
fill?: boolean;
|
|
240
|
+
alignItems?: "start" | "center" | "end";
|
|
241
|
+
justifyContent?: "start" | "center" | "end";
|
|
242
|
+
wrap?: boolean;
|
|
243
|
+
reverse?: boolean;
|
|
244
|
+
itemProps?: IFlexBoxItemProps;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export declare interface IFormMetaData {
|
|
248
|
+
title?: string;
|
|
249
|
+
sections: IFormSection[];
|
|
250
|
+
results: any;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export declare interface IFormSection {
|
|
254
|
+
title: string;
|
|
255
|
+
message?: string;
|
|
256
|
+
fields: (IField | IFieldGroup)[];
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
export declare interface IFormValidationState {
|
|
260
|
+
missingFields: number;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
export declare interface IGridCellProps extends IComponentProps {
|
|
264
|
+
/**
|
|
265
|
+
* The column in which this item should be placed. (Columns are 1 based not 0)
|
|
266
|
+
*/
|
|
267
|
+
column?: number;
|
|
268
|
+
/**
|
|
269
|
+
* The number of columns this item consumes. Defaults to 1.
|
|
270
|
+
*/
|
|
271
|
+
columnSpan?: number;
|
|
272
|
+
/**
|
|
273
|
+
* The row in which this item should be placed. (Rows are 1 based not 0)
|
|
274
|
+
*/
|
|
275
|
+
row?: number;
|
|
276
|
+
/**
|
|
277
|
+
* The number of rows this item consumes. Defaults to 1.
|
|
278
|
+
*/
|
|
279
|
+
rowSpan?: number;
|
|
280
|
+
/**
|
|
281
|
+
* Defines the placement of the item. Is a combination of `column`, `row`, `columnSpan`, and `rowSpan`.
|
|
282
|
+
* If this value is provided all other placement properties are ignored.
|
|
283
|
+
*/
|
|
284
|
+
area?: string;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
export declare interface IGridContext {
|
|
288
|
+
rows: IGridSize[];
|
|
289
|
+
columns: IGridSize[];
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
export declare interface IGridProps extends IComponentProps {
|
|
293
|
+
/**
|
|
294
|
+
* Specifies weather or not this grid will interrupt the line flow (Block) or not (Inline)
|
|
295
|
+
*/
|
|
296
|
+
inline?: boolean;
|
|
297
|
+
/**
|
|
298
|
+
* Specifies if the grid should consumer the maximum width and height of it's parent.
|
|
299
|
+
*/
|
|
300
|
+
fill?: boolean;
|
|
301
|
+
/**
|
|
302
|
+
* Specifies the default unit of measurement to be used on any child `RowDefinition`s or `ColumnDefinitions`s that do not specify their own unit.
|
|
303
|
+
*/
|
|
304
|
+
defaultUnit?: "fraction" | "pixel";
|
|
305
|
+
/**
|
|
306
|
+
* Specifies the default size to be used on any child `RowDefinition`s or `ColumnDefinitions`s that do not specify their own size.
|
|
307
|
+
*/
|
|
308
|
+
defaultUnitSize?: number;
|
|
309
|
+
/**
|
|
310
|
+
* Used to align the grid items when they do not use all available space on the main-axis
|
|
311
|
+
*/
|
|
312
|
+
justifyContent?: "space-evenly" | "space-around" | "space-between" | "center" | "start" | "end";
|
|
313
|
+
/**
|
|
314
|
+
* Used to align the grid items when they do not use all available space on the cross-axis.
|
|
315
|
+
*/
|
|
316
|
+
alignContent?: "space-evenly" | "space-around" | "space-between" | "center" | "start" | "end";
|
|
317
|
+
/**
|
|
318
|
+
* Specifies the gap between the columns/
|
|
319
|
+
*/
|
|
320
|
+
columnGap?: number | string;
|
|
321
|
+
/**
|
|
322
|
+
* Specifies the gap between the rows.
|
|
323
|
+
*/
|
|
324
|
+
rowGap?: number | string;
|
|
325
|
+
/**
|
|
326
|
+
* Specified the gap between both columns and rows.
|
|
327
|
+
*/
|
|
328
|
+
gap?: number | string;
|
|
329
|
+
/**
|
|
330
|
+
* Specifies the gap between the grid container and it's items.
|
|
331
|
+
*/
|
|
332
|
+
padding?: number | string;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
export declare interface IGridSize {
|
|
336
|
+
/**
|
|
337
|
+
* The numerical value representing the size of this item.
|
|
338
|
+
*/
|
|
339
|
+
size?: number;
|
|
340
|
+
/**
|
|
341
|
+
* The unit of measurement to apply to the `size` property.
|
|
342
|
+
*/
|
|
343
|
+
unit?: "fraction" | "pixel";
|
|
344
|
+
/**
|
|
345
|
+
* The maximum size (in Pixels).
|
|
346
|
+
* Only used when resizing with the `ResizableGridCell`.
|
|
347
|
+
*/
|
|
348
|
+
max?: number;
|
|
349
|
+
/**
|
|
350
|
+
* The minimum size (in Pixels).
|
|
351
|
+
* Only used when resizing with the `ResizableGridCell`.
|
|
352
|
+
*/
|
|
353
|
+
min?: number;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
export declare interface IJumpListProps<T extends object> extends IComponentProps {
|
|
357
|
+
/**
|
|
358
|
+
* Collection of items to be displayed.
|
|
359
|
+
*/
|
|
360
|
+
items?: T[];
|
|
361
|
+
/**
|
|
362
|
+
* Name\Key of the field to be used as the header to be used for grouping and sorting.
|
|
363
|
+
*/
|
|
364
|
+
headerProp: string;
|
|
365
|
+
/**
|
|
366
|
+
* Rendering function for the content of the list item, if not provided the value acquired from the `headerProp` will be used.
|
|
367
|
+
*/
|
|
368
|
+
renderItem?: (item: T, isSelected: boolean) => default_2.ReactNode;
|
|
369
|
+
/**
|
|
370
|
+
* Rendering function for an optional icon slot that appears before the item. Renders into a 36px by 36px area.
|
|
371
|
+
*/
|
|
372
|
+
renderIcon?: (item: T, isSelected: boolean) => default_2.ReactNode;
|
|
373
|
+
/**
|
|
374
|
+
* Callback invoked when the user makes a selection.
|
|
375
|
+
*/
|
|
376
|
+
onSelectionChanged?: (item?: T) => void;
|
|
377
|
+
/**
|
|
378
|
+
* Collection of string that override the default values used by the JumpList
|
|
379
|
+
*/
|
|
380
|
+
strings?: IJumpListStrings;
|
|
381
|
+
/**
|
|
382
|
+
* When enabled render UI to allow the user to filter the list of items.
|
|
383
|
+
*/
|
|
384
|
+
enableFiltering?: boolean;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
export declare interface IJumpListStrings {
|
|
388
|
+
/**
|
|
389
|
+
* Message displayed when no items have been provided.
|
|
390
|
+
*/
|
|
391
|
+
emptyList: string;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
export declare interface IResizableGridCellProps extends IGridCellProps {
|
|
395
|
+
/**
|
|
396
|
+
* If set to true, the cell will allow the column to beresized instead of the row.
|
|
397
|
+
*/
|
|
398
|
+
horizontal?: boolean;
|
|
399
|
+
/**
|
|
400
|
+
* The amount of space to put between the cell content and the resize handle.
|
|
401
|
+
* Consumers should not have to set this property as the parent `Grid` will attempt to use it's Gap, columnGap, or rowGap for this value.
|
|
402
|
+
*/
|
|
403
|
+
gap?: number | string;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
export declare interface IRichTextProps extends IComponentProps {
|
|
407
|
+
/**
|
|
408
|
+
* Value to be parsed and rendered respecting any predefined styling.
|
|
409
|
+
*/
|
|
410
|
+
text: string;
|
|
411
|
+
/**
|
|
412
|
+
* Applies a block display for the content.
|
|
413
|
+
*/
|
|
414
|
+
block?: boolean;
|
|
415
|
+
/**
|
|
416
|
+
* Applies the font family to the content.
|
|
417
|
+
*/
|
|
418
|
+
font?: "base" | "monospace" | "numeric";
|
|
419
|
+
/**
|
|
420
|
+
* Applies the italic font style to the content.
|
|
421
|
+
*/
|
|
422
|
+
italic?: boolean;
|
|
423
|
+
/**
|
|
424
|
+
* Applies font size and line height based on the theme typography tokens.
|
|
425
|
+
*/
|
|
426
|
+
size?: 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 1000;
|
|
427
|
+
/**
|
|
428
|
+
* Applies the strikethrough text decoration to the content.
|
|
429
|
+
*/
|
|
430
|
+
strikethrough?: boolean;
|
|
431
|
+
/**
|
|
432
|
+
* Aligns text based on the parent container.
|
|
433
|
+
*/
|
|
434
|
+
align?: "start" | "center" | "end" | "justify";
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
export declare interface ISectionProps extends IComponentProps {
|
|
438
|
+
/**
|
|
439
|
+
* Applies the overflow styling to the content.
|
|
440
|
+
*/
|
|
441
|
+
scrollable?: boolean;
|
|
442
|
+
/**
|
|
443
|
+
* Icon to be displayed in the upper left corner of the section header.
|
|
444
|
+
*/
|
|
445
|
+
icon?: default_2.ReactNode;
|
|
446
|
+
/**
|
|
447
|
+
* Content to be displayed in the upper middle of the section header.
|
|
448
|
+
*/
|
|
449
|
+
header?: default_2.ReactNode;
|
|
450
|
+
/**
|
|
451
|
+
* Determines if the section can be collapsed hiding it's content.
|
|
452
|
+
*/
|
|
453
|
+
collapsible?: boolean;
|
|
454
|
+
/**
|
|
455
|
+
* Applies styling to have the section consume 100% of it's parent's height and width.
|
|
456
|
+
*/
|
|
457
|
+
fill?: boolean;
|
|
458
|
+
/**
|
|
459
|
+
* Collection of properties to be used when this section is rendered as a child of the `Grid` component.
|
|
460
|
+
*/
|
|
461
|
+
cellProps?: IResizableGridCellProps & {
|
|
462
|
+
resizable?: boolean;
|
|
463
|
+
};
|
|
464
|
+
/**
|
|
465
|
+
* Collection of properties to be used when this section is rendered as a child of the `FlexBox` component.
|
|
466
|
+
*/
|
|
467
|
+
flexBoxItemProps?: IFlexBoxItemProps;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
export declare interface IThemePickerProps extends IComponentProps {
|
|
471
|
+
/**
|
|
472
|
+
* Initial selected theme, this value is ignored after first rendering.
|
|
473
|
+
*/
|
|
474
|
+
defaultTheme?: "Crimson" | "Forest" | "Cornflower" | "Royal";
|
|
475
|
+
/**
|
|
476
|
+
* Initial value for is dark mode, this value is ignored after first rendering.
|
|
477
|
+
*/
|
|
478
|
+
darkMode?: boolean;
|
|
479
|
+
/**
|
|
480
|
+
* Size of the color swatch.
|
|
481
|
+
*/
|
|
482
|
+
size?: "extra-small" | "small" | "medium" | "large";
|
|
483
|
+
/**
|
|
484
|
+
* The shape of the color swatch.
|
|
485
|
+
*/
|
|
486
|
+
shape?: "rounded" | "square" | "circular";
|
|
487
|
+
/**
|
|
488
|
+
* The amount of space between the color swatches.
|
|
489
|
+
*/
|
|
490
|
+
spacing?: "small" | "medium";
|
|
491
|
+
/**
|
|
492
|
+
* Callback triggered when the theme changes. (either color swatch change or dark mode change)
|
|
493
|
+
*/
|
|
494
|
+
themeSelected?: (theme: Theme) => void;
|
|
495
|
+
/**
|
|
496
|
+
* Collections of strings that override the default values used by the Theme Picker
|
|
497
|
+
*/
|
|
498
|
+
strings?: IThemePickerStrings;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
declare interface IThemePickerStrings {
|
|
502
|
+
/**
|
|
503
|
+
* Value used as a tool tip for the button to enable light mode.
|
|
504
|
+
*/
|
|
505
|
+
enableLightMode?: string;
|
|
506
|
+
/**
|
|
507
|
+
* Value used as a tool tip for the button to enable dark mode.
|
|
508
|
+
*/
|
|
509
|
+
enableDarkMode?: string;
|
|
510
|
+
/**
|
|
511
|
+
* Value used as the tool tip for the Cornflower blue based theme.
|
|
512
|
+
*/
|
|
513
|
+
cornflower?: string;
|
|
514
|
+
/**
|
|
515
|
+
* Value used as the tool tip for the Crimson red based theme.
|
|
516
|
+
*/
|
|
517
|
+
crimson?: string;
|
|
518
|
+
/**
|
|
519
|
+
* Value used as the tool tip for the forest green based theme.
|
|
520
|
+
*/
|
|
521
|
+
forest?: string;
|
|
522
|
+
/**
|
|
523
|
+
* Value used as the tool tip for the Royal purple based theme.
|
|
524
|
+
*/
|
|
525
|
+
royal?: string;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
export declare interface IWizardPanelProps extends IComponentProps {
|
|
529
|
+
title: string;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
export declare interface IWizardProps extends IComponentProps {
|
|
533
|
+
/**
|
|
534
|
+
* When set to true, disables the submit button.
|
|
535
|
+
*/
|
|
536
|
+
readonly?: boolean;
|
|
537
|
+
/**
|
|
538
|
+
* When set to true, changes the behavior of submit button to act as a submit (HTML Form) instead of a button.
|
|
539
|
+
*/
|
|
540
|
+
asForm?: boolean;
|
|
541
|
+
/**
|
|
542
|
+
* Callback invoked when the Wizard attempts to navigate to another panel.
|
|
543
|
+
* @param currentIndex Index of the current WizardPanel.
|
|
544
|
+
* @param newIndex Index of the WizardPanel being navigated to.
|
|
545
|
+
* @returns If true the navigation is canceled.
|
|
546
|
+
*/
|
|
547
|
+
onNavigatePanel?: (currentIndex: number, newIndex: number) => boolean;
|
|
548
|
+
/**
|
|
549
|
+
* Callback invoked when the submit button on the final WizardPanel is pressed.
|
|
550
|
+
*/
|
|
551
|
+
onSubmit?: () => unknown;
|
|
552
|
+
/**
|
|
553
|
+
* Collection of string that override the default values used by the WizardPanel
|
|
554
|
+
*/
|
|
555
|
+
strings?: IWizardStrings;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
declare interface IWizardStrings {
|
|
559
|
+
/**
|
|
560
|
+
* Value displayed on the button to go to the previous WizardPanel.
|
|
561
|
+
*/
|
|
562
|
+
previous?: string;
|
|
563
|
+
/**
|
|
564
|
+
* Value displayed on the button to go ot the next WizardPanel.
|
|
565
|
+
*/
|
|
566
|
+
next?: string;
|
|
567
|
+
/**
|
|
568
|
+
* Value displayed on the submit button.
|
|
569
|
+
*/
|
|
570
|
+
submit?: string;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
/**
|
|
574
|
+
* The `JumpList` component display a collection of items, that will then be grouped by the first letter of their `headerProp`.
|
|
575
|
+
* A button will be displayed between changing characters that when pressed will present the user with a surface that will allow them to jump to another header in the list.
|
|
576
|
+
*
|
|
577
|
+
* > The `JumpList` component supports a generic type argument that defines the type of items expected.
|
|
578
|
+
* > T define the generic type, use the following syntax.
|
|
579
|
+
* >
|
|
580
|
+
* > `<JumpList<TItemType> items={[]} headerProp="name" />`
|
|
581
|
+
*/
|
|
582
|
+
export declare const JumpList: <T extends object>(props: IJumpListProps<T>) => JSX_2.Element;
|
|
583
|
+
|
|
584
|
+
/**
|
|
585
|
+
* The `ResizableGridCell` component can be used in place of the `GridCell` compoent to allow the user to resize the row or column the cell resides it.
|
|
586
|
+
* By default this allows the row to be resized. This can be changed by setting the `horizontal` property to true.
|
|
587
|
+
*
|
|
588
|
+
* > At this time there is no way to define a Min or Max size for a row or column.
|
|
589
|
+
*/
|
|
590
|
+
export declare const ResizableGridCell: default_2.FunctionComponent<IResizableGridCellProps>;
|
|
591
|
+
|
|
592
|
+
/**
|
|
593
|
+
* The `RichText` component takes in a raw string value and will rendering applying styles based on pre-defined style markers.
|
|
594
|
+
*
|
|
595
|
+
* >Currently the Rich Text component only applies line breaks to the value. More to come.
|
|
596
|
+
*/
|
|
597
|
+
export declare const RichText: default_2.FunctionComponent<IRichTextProps>;
|
|
598
|
+
|
|
599
|
+
/**
|
|
600
|
+
* Transient component, will not render anything but it's props are used by it's parent Grid component.
|
|
601
|
+
*/
|
|
602
|
+
export declare const RowDefinition: default_2.FunctionComponent<IGridSize>;
|
|
603
|
+
|
|
604
|
+
export declare const royal: BrandVariants;
|
|
605
|
+
|
|
606
|
+
export declare const royalDark: Theme;
|
|
607
|
+
|
|
608
|
+
export declare const royalLight: Theme;
|
|
609
|
+
|
|
610
|
+
/**
|
|
611
|
+
* The `Section` component is a stylized content wrapper that provides header and collapsible capabilities. It can also be used as a `FlexBoxItem` and `GridCell`.
|
|
612
|
+
*/
|
|
613
|
+
export declare const Section: default_2.FunctionComponent<ISectionProps>;
|
|
614
|
+
|
|
615
|
+
export declare class SectionBuilder {
|
|
616
|
+
private _formBuilder;
|
|
617
|
+
private _section;
|
|
618
|
+
constructor(formBuilder: DynamicFormBuilder, section: IFormSection);
|
|
619
|
+
SetMessage(message?: string): DynamicFormBuilder;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
/**
|
|
623
|
+
* The ThemePicker component allows you to select from one of the 5ive Souls built in themes. Each theme comes in a dark and light mode.
|
|
624
|
+
*/
|
|
625
|
+
export declare const ThemePicker: default_2.FunctionComponent<IThemePickerProps>;
|
|
626
|
+
|
|
627
|
+
export declare const useDevice: () => Device;
|
|
628
|
+
|
|
629
|
+
/**
|
|
630
|
+
* The Wizard component holds a collection WizardPanels while displaying a single one.
|
|
631
|
+
* The user can navigate through them with either the navigation button on the bottom or by clicking on the headers in the bread crumb trail.
|
|
632
|
+
*/
|
|
633
|
+
export declare const Wizard: default_2.FunctionComponent<IWizardProps>;
|
|
634
|
+
|
|
635
|
+
export declare const WizardPanel: default_2.FunctionComponent<IWizardPanelProps>;
|
|
636
|
+
|
|
637
|
+
export { }
|
package/dist/main.js
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { DynamicForm as t } from "./components/DynamicForm/DynamicForm.js";
|
|
2
|
+
import { DynamicFormBuilder as m } from "./components/DynamicForm/Builder/DynamicFormBuilder.js";
|
|
3
|
+
import { FieldBuilder as x } from "./components/DynamicForm/Builder/Field/FieldBuilder.js";
|
|
4
|
+
import { SectionBuilder as l } from "./components/DynamicForm/Builder/Section/SectionBuilder.js";
|
|
5
|
+
import { Device as c } from "./components/FiveSoulsProvider/FiveSouls.Types.js";
|
|
6
|
+
import { FiveSoulsProvider as s } from "./components/FiveSoulsProvider/FiveSoulsProvider.js";
|
|
7
|
+
import { deviceContext as D } from "./components/FiveSoulsProvider/deviceContext.js";
|
|
8
|
+
import { useDevice as F } from "./components/FiveSoulsProvider/useDevice.js";
|
|
9
|
+
import { FlexBox as B } from "./components/FlexBox/FlexBox.js";
|
|
10
|
+
import { FlexBoxItem as v } from "./components/FlexBox/FlexBoxItem/FlexBoxItem.js";
|
|
11
|
+
import { FlexBoxItemResizer as L } from "./components/FlexBox/FlexBoxItemResizer/FlexBoxItemResizer.js";
|
|
12
|
+
import { ColumnDefinition as w, Grid as z, RowDefinition as C } from "./components/Grid/Grid.js";
|
|
13
|
+
import { GridCell as S } from "./components/Grid/GridCell/GridCell.js";
|
|
14
|
+
import { ResizableGridCell as P } from "./components/Grid/ResizableGridCell/ResizableGridCell.js";
|
|
15
|
+
import "./components/Grid/GridContext.js";
|
|
16
|
+
import { RichText as T } from "./components/RichText/RichText.js";
|
|
17
|
+
import { S as b } from "./Section-Bw_kuHpK.js";
|
|
18
|
+
import { ThemePicker as j } from "./components/ThemePicker/ThemePicker.js";
|
|
19
|
+
import { cornflower as A, cornflowerDark as E, cornflowerLight as H } from "./components/ThemePicker/Themes/Cornflower/Cornflower.js";
|
|
20
|
+
import { crimson as M, crimsonDark as N, crimsonLight as O } from "./components/ThemePicker/Themes/Crimson/Crimson.js";
|
|
21
|
+
import { forest as U, forestDark as V, forestLight as X } from "./components/ThemePicker/Themes/Forest/Forest.js";
|
|
22
|
+
import { royal as Z, royalDark as _, royalLight as $ } from "./components/ThemePicker/Themes/Royal/Royal.js";
|
|
23
|
+
import { Wizard as or } from "./components/Wizard/Wizard.js";
|
|
24
|
+
import { WizardPanel as tr } from "./components/Wizard/WizardPanel/WizardPanel.js";
|
|
25
|
+
import { JumpList as mr } from "./components/JumpList/JumpList.js";
|
|
26
|
+
export {
|
|
27
|
+
w as ColumnDefinition,
|
|
28
|
+
c as Device,
|
|
29
|
+
t as DynamicForm,
|
|
30
|
+
m as DynamicFormBuilder,
|
|
31
|
+
x as FieldBuilder,
|
|
32
|
+
s as FiveSoulsProvider,
|
|
33
|
+
B as FlexBox,
|
|
34
|
+
v as FlexBoxItem,
|
|
35
|
+
L as FlexBoxItemResizer,
|
|
36
|
+
z as Grid,
|
|
37
|
+
S as GridCell,
|
|
38
|
+
mr as JumpList,
|
|
39
|
+
P as ResizableGridCell,
|
|
40
|
+
T as RichText,
|
|
41
|
+
C as RowDefinition,
|
|
42
|
+
b as Section,
|
|
43
|
+
l as SectionBuilder,
|
|
44
|
+
j as ThemePicker,
|
|
45
|
+
or as Wizard,
|
|
46
|
+
tr as WizardPanel,
|
|
47
|
+
A as cornflower,
|
|
48
|
+
E as cornflowerDark,
|
|
49
|
+
H as cornflowerLight,
|
|
50
|
+
M as crimson,
|
|
51
|
+
N as crimsonDark,
|
|
52
|
+
O as crimsonLight,
|
|
53
|
+
D as deviceContext,
|
|
54
|
+
U as forest,
|
|
55
|
+
V as forestDark,
|
|
56
|
+
X as forestLight,
|
|
57
|
+
Z as royal,
|
|
58
|
+
_ as royalDark,
|
|
59
|
+
$ as royalLight,
|
|
60
|
+
F as useDevice
|
|
61
|
+
};
|