@kwiz/fluentui 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +21 -0
- package/README.md +1 -0
- package/dist/_modules/build.d.ts +2 -0
- package/dist/_modules/build.js +3 -0
- package/dist/_modules/build.js.map +1 -0
- package/dist/_modules/config.d.ts +1 -0
- package/dist/_modules/config.js +9 -0
- package/dist/_modules/config.js.map +1 -0
- package/dist/_modules/constants.d.ts +2 -0
- package/dist/_modules/constants.js +3 -0
- package/dist/_modules/constants.js.map +1 -0
- package/dist/_modules/exports-index.d.ts +1 -0
- package/dist/_modules/exports-index.js +2 -0
- package/dist/_modules/exports-index.js.map +1 -0
- package/dist/controls/button.d.ts +27 -0
- package/dist/controls/button.js +100 -0
- package/dist/controls/button.js.map +1 -0
- package/dist/controls/centered.d.ts +5 -0
- package/dist/controls/centered.js +14 -0
- package/dist/controls/centered.js.map +1 -0
- package/dist/controls/dropdown.d.ts +18 -0
- package/dist/controls/dropdown.js +13 -0
- package/dist/controls/dropdown.js.map +1 -0
- package/dist/controls/error-boundary.d.ts +23 -0
- package/dist/controls/error-boundary.js +33 -0
- package/dist/controls/error-boundary.js.map +1 -0
- package/dist/controls/exports-index.d.ts +17 -0
- package/dist/controls/exports-index.js +18 -0
- package/dist/controls/exports-index.js.map +1 -0
- package/dist/controls/field-editor.d.ts +13 -0
- package/dist/controls/field-editor.js +15 -0
- package/dist/controls/field-editor.js.map +1 -0
- package/dist/controls/file-upload.d.ts +18 -0
- package/dist/controls/file-upload.js +41 -0
- package/dist/controls/file-upload.js.map +1 -0
- package/dist/controls/horizontal.d.ts +8 -0
- package/dist/controls/horizontal.js +23 -0
- package/dist/controls/horizontal.js.map +1 -0
- package/dist/controls/input.d.ts +13 -0
- package/dist/controls/input.js +41 -0
- package/dist/controls/input.js.map +1 -0
- package/dist/controls/list.d.ts +21 -0
- package/dist/controls/list.js +72 -0
- package/dist/controls/list.js.map +1 -0
- package/dist/controls/loading.d.ts +5 -0
- package/dist/controls/loading.js +7 -0
- package/dist/controls/loading.js.map +1 -0
- package/dist/controls/please-wait.d.ts +17 -0
- package/dist/controls/please-wait.js +16 -0
- package/dist/controls/please-wait.js.map +1 -0
- package/dist/controls/prompt.d.ts +16 -0
- package/dist/controls/prompt.js +21 -0
- package/dist/controls/prompt.js.map +1 -0
- package/dist/controls/search.d.ts +13 -0
- package/dist/controls/search.js +47 -0
- package/dist/controls/search.js.map +1 -0
- package/dist/controls/section.d.ts +14 -0
- package/dist/controls/section.js +27 -0
- package/dist/controls/section.js.map +1 -0
- package/dist/controls/svg.d.ts +23 -0
- package/dist/controls/svg.js +45 -0
- package/dist/controls/svg.js.map +1 -0
- package/dist/controls/vertical-content.d.ts +6 -0
- package/dist/controls/vertical-content.js +37 -0
- package/dist/controls/vertical-content.js.map +1 -0
- package/dist/controls/vertical.d.ts +8 -0
- package/dist/controls/vertical.js +23 -0
- package/dist/controls/vertical.js.map +1 -0
- package/dist/exports-index.d.ts +3 -0
- package/dist/exports-index.js +4 -0
- package/dist/exports-index.js.map +1 -0
- package/dist/helpers/hooks.d.ts +22 -0
- package/dist/helpers/hooks.js +173 -0
- package/dist/helpers/hooks.js.map +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -0
- package/dist/styles/exports-index.d.ts +2 -0
- package/dist/styles/exports-index.js +3 -0
- package/dist/styles/exports-index.js.map +1 -0
- package/dist/styles/styles.d.ts +19 -0
- package/dist/styles/styles.js +79 -0
- package/dist/styles/styles.js.map +1 -0
- package/dist/styles/theme.d.ts +6 -0
- package/dist/styles/theme.js +77 -0
- package/dist/styles/theme.js.map +1 -0
- package/package.json +71 -0
- package/src/_modules/config.ts +9 -0
- package/src/_modules/constants.ts +3 -0
- package/src/controls/button.tsx +154 -0
- package/src/controls/centered.tsx +23 -0
- package/src/controls/dropdown.tsx +28 -0
- package/src/controls/error-boundary.tsx +42 -0
- package/src/controls/field-editor.tsx +42 -0
- package/src/controls/file-upload.tsx +68 -0
- package/src/controls/horizontal.tsx +35 -0
- package/src/controls/input.tsx +59 -0
- package/src/controls/list.tsx +118 -0
- package/src/controls/loading.tsx +11 -0
- package/src/controls/please-wait.tsx +32 -0
- package/src/controls/prompt.tsx +59 -0
- package/src/controls/search.tsx +66 -0
- package/src/controls/section.tsx +52 -0
- package/src/controls/svg.tsx +120 -0
- package/src/controls/vertical-content.tsx +50 -0
- package/src/controls/vertical.tsx +35 -0
- package/src/helpers/hooks.ts +189 -0
- package/src/index.ts +19 -0
- package/src/styles/styles.ts +87 -0
- package/src/styles/theme.ts +91 -0
package/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2024 KWIZ Corp
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
"# fluentui"
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"build.js","sourceRoot":"","sources":["../../src/_modules/build.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,MAAM,GAAG,aAAa,CAAC;AACpC,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const GetLogger: (name: string) => import("@kwiz/common").ConsoleLogger;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { config } from "@kwiz/common";
|
2
|
+
import { BuildNumber, ReleaseStatus } from "./constants";
|
3
|
+
export const { logger: GetLogger } = config({
|
4
|
+
BuildNumber: BuildNumber,
|
5
|
+
IsLocalDev: false,
|
6
|
+
ReleaseStatus: ReleaseStatus,
|
7
|
+
ProjectName: "[fluentui]"
|
8
|
+
});
|
9
|
+
//# sourceMappingURL=config.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/_modules/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEzD,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC;IACxC,WAAW,EAAE,WAAW;IACxB,UAAU,EAAE,KAAK;IACjB,aAAa,EAAE,aAAa;IAC5B,WAAW,EAAE,YAAY;CAC5B,CAAC,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/_modules/constants.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,IAAI,WAAW,GAAG,OAAO,CAAC;AACjC,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './config';
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"exports-index.js","sourceRoot":"","sources":["../../src/_modules/exports-index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import { ButtonProps, CompoundButtonProps } from '@fluentui/react-components';
|
2
|
+
import React from 'react';
|
3
|
+
interface IProps {
|
4
|
+
title: string;
|
5
|
+
showTitleWithIcon?: boolean;
|
6
|
+
dontStretch?: boolean;
|
7
|
+
hideOnPrint?: boolean;
|
8
|
+
dontCenterText?: boolean;
|
9
|
+
hoverIcon?: JSX.Element;
|
10
|
+
hoverTitle?: string;
|
11
|
+
}
|
12
|
+
interface IPropsCompound extends IProps {
|
13
|
+
width?: string | number;
|
14
|
+
}
|
15
|
+
export type ButtonEXProps = IProps & ButtonProps;
|
16
|
+
export type CompoundButtonEXProps = IPropsCompound & CompoundButtonProps;
|
17
|
+
export declare const ButtonEX: React.ForwardRefExoticComponent<ButtonEXProps & React.RefAttributes<HTMLButtonElement>>;
|
18
|
+
export declare const ButtonEXSecondary: React.ForwardRefExoticComponent<ButtonEXProps & React.RefAttributes<HTMLButtonElement>>;
|
19
|
+
export declare const ButtonEXPrimary: React.ForwardRefExoticComponent<ButtonEXProps & React.RefAttributes<HTMLButtonElement>>;
|
20
|
+
export declare const ButtonEXDanger: React.ForwardRefExoticComponent<ButtonEXProps & React.RefAttributes<HTMLButtonElement>>;
|
21
|
+
export declare const ButtonEXSuccess: React.ForwardRefExoticComponent<ButtonEXProps & React.RefAttributes<HTMLButtonElement>>;
|
22
|
+
export declare const ButtonEXPrimarySubtle: React.ForwardRefExoticComponent<ButtonEXProps & React.RefAttributes<HTMLButtonElement>>;
|
23
|
+
export declare const CompoundButtonEX: React.ForwardRefExoticComponent<CompoundButtonEXProps & React.RefAttributes<HTMLButtonElement>>;
|
24
|
+
export declare const CompoundButtonEXSecondary: React.ForwardRefExoticComponent<CompoundButtonEXProps & React.RefAttributes<HTMLButtonElement>>;
|
25
|
+
export declare const CompoundButtonEXPrimary: React.ForwardRefExoticComponent<CompoundButtonEXProps & React.RefAttributes<HTMLButtonElement>>;
|
26
|
+
export declare const CompoundButtonEXDanger: React.ForwardRefExoticComponent<CompoundButtonEXProps & React.RefAttributes<HTMLButtonElement>>;
|
27
|
+
export {};
|
@@ -0,0 +1,100 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import { Button, CompoundButton, compoundButtonClassNames, makeStyles, mergeClasses, tokens, Tooltip } from '@fluentui/react-components';
|
3
|
+
import { capitalizeFirstLetter, isFunction, isNullOrEmptyString, isNullOrUndefined, isString, PushNoDuplicate } from '@kwiz/common';
|
4
|
+
import React from 'react';
|
5
|
+
import { useCommonStyles, widthMedium } from '../styles/styles';
|
6
|
+
const useStyles = makeStyles({
|
7
|
+
buttonNoCenter: {
|
8
|
+
justifyContent: 'flex-start',
|
9
|
+
'& *': {
|
10
|
+
/* a button with no center that has content of a vertical, or multiple labels */
|
11
|
+
alignItems: 'flex-start'
|
12
|
+
}
|
13
|
+
},
|
14
|
+
danger: {
|
15
|
+
backgroundColor: tokens.colorStatusDangerBackground1,
|
16
|
+
color: tokens.colorStatusWarningForeground2,
|
17
|
+
[`& .${compoundButtonClassNames.secondaryContent}`]: {
|
18
|
+
color: tokens.colorStatusWarningForeground1
|
19
|
+
}
|
20
|
+
},
|
21
|
+
success: {
|
22
|
+
color: tokens.colorStatusSuccessForeground1,
|
23
|
+
[`& .${compoundButtonClassNames.secondaryContent}`]: {
|
24
|
+
color: tokens.colorStatusSuccessForeground1,
|
25
|
+
}
|
26
|
+
},
|
27
|
+
primarySubtle: {
|
28
|
+
color: tokens.colorBrandForeground1,
|
29
|
+
[`& .${compoundButtonClassNames.secondaryContent}`]: {
|
30
|
+
color: tokens.colorBrandForeground1,
|
31
|
+
}
|
32
|
+
},
|
33
|
+
});
|
34
|
+
export const ButtonEX = React.forwardRef((props, ref) => {
|
35
|
+
const [hover, setHover] = React.useState(false);
|
36
|
+
const trackHover = !isNullOrEmptyString(props.hoverTitle) || !isNullOrUndefined(props.hoverIcon);
|
37
|
+
const title = hover && !isNullOrEmptyString(props.hoverTitle) ? props.hoverTitle
|
38
|
+
: props.title || props['aria-label'];
|
39
|
+
const icon = hover && !isNullOrUndefined(props.hoverIcon) ? props.hoverIcon : props.icon;
|
40
|
+
let hasIcon = !isNullOrUndefined(icon);
|
41
|
+
let hasText = props.children || !hasIcon || (hasIcon && props.showTitleWithIcon === true);
|
42
|
+
const commonCssNames = useCommonStyles();
|
43
|
+
const cssNames = useStyles();
|
44
|
+
let css = [];
|
45
|
+
if (props.hideOnPrint)
|
46
|
+
PushNoDuplicate(css, commonCssNames.printHide);
|
47
|
+
if (props.dontCenterText)
|
48
|
+
PushNoDuplicate(css, cssNames.buttonNoCenter);
|
49
|
+
if (!isNullOrEmptyString(props.className))
|
50
|
+
css.push(...props.className.split(' '));
|
51
|
+
let btn = _jsx(Button, Object.assign({ ref: ref, appearance: 'subtle' }, props, { className: mergeClasses(...css), "aria-label": title, title: undefined, icon: icon, onMouseEnter: trackHover ? (e) => {
|
52
|
+
setHover(true);
|
53
|
+
if (isFunction(props.onMouseEnter))
|
54
|
+
props.onMouseEnter(e);
|
55
|
+
} : props.onMouseEnter, onMouseLeave: trackHover ? (e) => {
|
56
|
+
setHover(false);
|
57
|
+
if (isFunction(props.onMouseLeave))
|
58
|
+
props.onMouseLeave(e);
|
59
|
+
} : props.onMouseLeave, children: props.children ||
|
60
|
+
//no icon? will show the title by default
|
61
|
+
(hasText && capitalizeFirstLetter(title)) }));
|
62
|
+
if (!hasText || props.children) //icon only or when content is different than props.title
|
63
|
+
btn = _jsx(Tooltip, { showDelay: 1000, relationship: 'label', withArrow: true, appearance: 'inverted', content: title, children: btn });
|
64
|
+
return (props.dontStretch ? _jsx("div", { children: btn }) : btn);
|
65
|
+
});
|
66
|
+
export const ButtonEXSecondary = React.forwardRef((props, ref) => {
|
67
|
+
return (_jsx(ButtonEX, Object.assign({ ref: ref, appearance: 'secondary', shape: 'circular' }, props)));
|
68
|
+
});
|
69
|
+
export const ButtonEXPrimary = React.forwardRef((props, ref) => {
|
70
|
+
return (_jsx(ButtonEXSecondary, Object.assign({ ref: ref, appearance: 'primary' }, props, { children: props.children })));
|
71
|
+
});
|
72
|
+
export const ButtonEXDanger = React.forwardRef((props, ref) => {
|
73
|
+
const cssNames = useStyles();
|
74
|
+
return (_jsx(ButtonEXSecondary, Object.assign({ ref: ref, className: props.disabled ? undefined : cssNames.danger }, props, { children: props.children })));
|
75
|
+
});
|
76
|
+
export const ButtonEXSuccess = React.forwardRef((props, ref) => {
|
77
|
+
const cssNames = useStyles();
|
78
|
+
return (_jsx(ButtonEX, Object.assign({ ref: ref, className: cssNames.success }, props, { children: props.children })));
|
79
|
+
});
|
80
|
+
export const ButtonEXPrimarySubtle = React.forwardRef((props, ref) => {
|
81
|
+
const cssNames = useStyles();
|
82
|
+
return (_jsx(ButtonEX, Object.assign({ ref: ref, className: props.disabled ? undefined : cssNames.primarySubtle }, props, { children: props.children })));
|
83
|
+
});
|
84
|
+
export const CompoundButtonEX = React.forwardRef((props, ref) => {
|
85
|
+
let title = props.title || props['aria-label'];
|
86
|
+
let tooltip = isString(props.secondaryContent) ? props.secondaryContent : title;
|
87
|
+
let max = typeof (props.width) === "undefined" ? widthMedium : props.width;
|
88
|
+
return (_jsx(Tooltip, { showDelay: 1000, relationship: 'label', withArrow: true, appearance: 'inverted', content: tooltip, children: _jsx(CompoundButton, Object.assign({ ref: ref, appearance: 'subtle', style: { justifyContent: "flex-start", maxWidth: max } }, props, { "aria-label": tooltip, title: undefined, children: props.children || capitalizeFirstLetter(title) })) }));
|
89
|
+
});
|
90
|
+
export const CompoundButtonEXSecondary = React.forwardRef((props, ref) => {
|
91
|
+
return (_jsx(CompoundButtonEX, Object.assign({ ref: ref, appearance: 'secondary', shape: 'circular' }, props)));
|
92
|
+
});
|
93
|
+
export const CompoundButtonEXPrimary = React.forwardRef((props, ref) => {
|
94
|
+
return (_jsx(CompoundButtonEXSecondary, Object.assign({ ref: ref, appearance: 'primary' }, props, { children: props.children })));
|
95
|
+
});
|
96
|
+
export const CompoundButtonEXDanger = React.forwardRef((props, ref) => {
|
97
|
+
const cssNames = useStyles();
|
98
|
+
return (_jsx(CompoundButtonEXSecondary, Object.assign({ ref: ref, className: cssNames.danger }, props, { children: props.children })));
|
99
|
+
});
|
100
|
+
//# sourceMappingURL=button.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../src/controls/button.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAe,cAAc,EAAE,wBAAwB,EAAuB,UAAU,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAC3K,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpI,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAkBhE,MAAM,SAAS,GAAG,UAAU,CAAC;IACzB,cAAc,EAAE;QACZ,cAAc,EAAE,YAAY;QAC5B,KAAK,EAAE;YACH,gFAAgF;YAChF,UAAU,EAAE,YAAY;SAC3B;KACJ;IACD,MAAM,EAAE;QACJ,eAAe,EAAE,MAAM,CAAC,4BAA4B;QACpD,KAAK,EAAE,MAAM,CAAC,6BAA6B;QAE3C,CAAC,MAAM,wBAAwB,CAAC,gBAAgB,EAAE,CAAC,EAAE;YACjD,KAAK,EAAE,MAAM,CAAC,6BAA6B;SAC9C;KACJ;IACD,OAAO,EAAE;QACL,KAAK,EAAE,MAAM,CAAC,6BAA6B;QAE3C,CAAC,MAAM,wBAAwB,CAAC,gBAAgB,EAAE,CAAC,EAAE;YACjD,KAAK,EAAE,MAAM,CAAC,6BAA6B;SAC9C;KACJ;IACD,aAAa,EAAE;QACX,KAA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cAAc,EAAE,YAAY,EAAE,QAAQ,EAAE,GAAG,EAAE,IAAM,KAAK,kBAAc,OAAO,EAAE,KAAK,EAAE,SAAS,YACjJ,KAAK,CAAC,QAAQ,IAAI,qBAAqB,CAAC,KAAK,CAAC,IAAkB,GAC/D,CACb,CAAC;AACN,CAAC,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,KAAK,CAAC,UAAU,CAA6C,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACjH,OAAO,CACH,KAAC,gBAAgB,kBAAC,GAAG,EAAE,GAAG,EAAE,UAAU,EAAC,WAAW,EAAC,KAAK,EAAC,UAAU,IAAK,KAAK,EAAqB,CACrG,CAAC;AACN,CAAC,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,KAAK,CAAC,UAAU,CAA6C,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IAC/G,OAAO,CACH,KAAC,yBAAyB,kBAAC,GAAG,EAAE,GAAG,EAAE,UAAU,EAAC,SAAS,IAAK,KAAK,cAAG,KAAK,CAAC,QAAQ,IAA6B,CACpH,CAAC;AACN,CAAC,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,KAAK,CAAC,UAAU,CAA6C,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IAC9G,MAAM,QAAQ,GAAG,SAAS,EAAE,CAAC;IAC7B,OAAO,CACH,KAAC,yBAAyB,kBAAC,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,QAAQ,CAAC,MAAM,IAAM,KAAK,cAAG,KAAK,CAAC,QAAQ,IAA6B,CAC3H,CAAC;AACN,CAAC,CAAC,CAAC"}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import { makeStyles } from '@fluentui/react-components';
|
3
|
+
import { Horizontal } from './horizontal';
|
4
|
+
import { Vertical } from './vertical';
|
5
|
+
const useStyles = makeStyles({
|
6
|
+
center: {
|
7
|
+
justifyContent: 'center'
|
8
|
+
},
|
9
|
+
});
|
10
|
+
export const Centered = (props) => {
|
11
|
+
const cssNames = useStyles();
|
12
|
+
return (_jsx(Vertical, { main: true, css: [cssNames.center], children: _jsx(Horizontal, { css: [cssNames.center], children: props.children }) }));
|
13
|
+
};
|
14
|
+
//# sourceMappingURL=centered.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"centered.js","sourceRoot":"","sources":["../../src/controls/centered.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAExD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,SAAS,GAAG,UAAU,CAAC;IACzB,MAAM,EAAE;QACJ,cAAc,EAAE,QAAQ;KAC3B;CACJ,CAAC,CAAA;AAIF,MAAM,CAAC,MAAM,QAAQ,GAA6D,CAAC,KAAK,EAAE,EAAE;IACxF,MAAM,QAAQ,GAAG,SAAS,EAAE,CAAC;IAC7B,OAAO,CACH,KAAC,QAAQ,IAAC,IAAI,QAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,YACjC,KAAC,UAAU,IAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,YAC7B,KAAK,CAAC,QAAQ,GACN,GACN,CACd,CAAC;AACN,CAAC,CAAA"}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
interface IProps<dataType, keyType extends string = string> {
|
3
|
+
selected: keyType[];
|
4
|
+
items: {
|
5
|
+
key: keyType;
|
6
|
+
value: string;
|
7
|
+
data?: dataType;
|
8
|
+
option?: JSX.Element;
|
9
|
+
}[];
|
10
|
+
onSelect: (item: {
|
11
|
+
key: keyType;
|
12
|
+
value: string;
|
13
|
+
data?: dataType;
|
14
|
+
}) => void;
|
15
|
+
placeholder?: string;
|
16
|
+
}
|
17
|
+
export declare const DropdownEX: React.ForwardRefExoticComponent<IProps<unknown, string> & React.RefAttributes<HTMLButtonElement>>;
|
18
|
+
export {};
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import { Dropdown, Option } from '@fluentui/react-components';
|
3
|
+
import { filterEmptyEntries, firstOrNull } from '@kwiz/common';
|
4
|
+
import React from 'react';
|
5
|
+
function $DropdownEX(props, ref) {
|
6
|
+
let text = filterEmptyEntries(props.selected.map(s => {
|
7
|
+
let v = firstOrNull(props.items, i => i.key === s);
|
8
|
+
return v ? v.value : '';
|
9
|
+
})).join(', ');
|
10
|
+
return (_jsx(Dropdown, { placeholder: props.placeholder, ref: ref, appearance: 'underline', selectedOptions: props.selected, value: text, children: props.items.map(i => _jsx(Option, { value: i.key, onClick: () => { props.onSelect(i); }, text: i.value, children: i.option ? i.option : i.value }, i.key)) }));
|
11
|
+
}
|
12
|
+
export const DropdownEX = React.forwardRef($DropdownEX);
|
13
|
+
//# sourceMappingURL=dropdown.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"dropdown.js","sourceRoot":"","sources":["../../src/controls/dropdown.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,SAAS,WAAW,CAAoD,KAAgC,EAAE,GAA0C;IAChJ,IAAI,IAAI,GAAG,kBAAkB,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE;QACjD,IAAI,CAAC,GAAG,WAAW,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;QACnD,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAA;IAC3B,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACf,OAAO,CACH,KAAC,QAAQ,IAAC,WAAW,EAAE,KAAK,CAAC,WAAW,EAAE,GAAG,EAAE,GAAG,EAAE,UAAU,EAAC,WAAW,EAAC,eAAe,EAAE,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,YAClH,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,KAAC,MAAM,IAAa,KAAK,EAAE,CAAC,CAAC,GAAG,EAClD,OAAO,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EACrC,IAAI,EAAE,CAAC,CAAC,KAAK,YACf,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,IAHI,CAAC,CAAC,GAAG,CAGC,CAAC,GACnC,CAEd,CAAC;AACN,CAAC;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC"}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import * as React from "react";
|
2
|
+
interface iProps {
|
3
|
+
errorComponent?: JSX.Element;
|
4
|
+
/** If changeMarker changes, it will check the error again */
|
5
|
+
changeMarker: string | number;
|
6
|
+
}
|
7
|
+
interface iState {
|
8
|
+
hasError: boolean;
|
9
|
+
marker: string | number;
|
10
|
+
}
|
11
|
+
export declare class ErrorBoundary extends React.Component<React.PropsWithChildren<iProps>, iState> {
|
12
|
+
constructor(props: iProps);
|
13
|
+
static getDerivedStateFromError(error: any): {
|
14
|
+
hasError: boolean;
|
15
|
+
};
|
16
|
+
static getDerivedStateFromProps(props: iProps, state: iState): {
|
17
|
+
hasError: boolean;
|
18
|
+
marker: string | number;
|
19
|
+
};
|
20
|
+
componentDidCatch(error: any, errorInfo: any): void;
|
21
|
+
render(): string | number | boolean | JSX.Element | Iterable<React.ReactNode>;
|
22
|
+
}
|
23
|
+
export {};
|
@@ -0,0 +1,33 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import * as React from "react";
|
3
|
+
import { GetLogger } from "../_modules/config";
|
4
|
+
const logger = GetLogger("ErrorBoundary");
|
5
|
+
export class ErrorBoundary extends React.Component {
|
6
|
+
constructor(props) {
|
7
|
+
super(props);
|
8
|
+
this.state = { hasError: false, marker: props.changeMarker };
|
9
|
+
}
|
10
|
+
static getDerivedStateFromError(error) {
|
11
|
+
// Update state so the next render will show the fallback UI.
|
12
|
+
return { hasError: true };
|
13
|
+
}
|
14
|
+
static getDerivedStateFromProps(props, state) {
|
15
|
+
if (props.changeMarker !== state.marker)
|
16
|
+
return { hasError: false, marker: props.changeMarker };
|
17
|
+
else
|
18
|
+
return null;
|
19
|
+
}
|
20
|
+
componentDidCatch(error, errorInfo) {
|
21
|
+
// You can also log the error to an error reporting service
|
22
|
+
logger.error(error);
|
23
|
+
logger.error(errorInfo);
|
24
|
+
}
|
25
|
+
render() {
|
26
|
+
if (this.state.hasError) {
|
27
|
+
// You can render any custom fallback UI
|
28
|
+
return this.props.errorComponent || _jsx("h1", { children: "Something went wrong." });
|
29
|
+
}
|
30
|
+
return this.props.children;
|
31
|
+
}
|
32
|
+
}
|
33
|
+
//# sourceMappingURL=error-boundary.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"error-boundary.js","sourceRoot":"","sources":["../../src/controls/error-boundary.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,MAAM,MAAM,GAAG,SAAS,CAAC,eAAe,CAAC,CAAC;AAQ1C,MAAM,OAAO,aAAc,SAAQ,KAAK,CAAC,SAAkD;IACvF,YAAY,KAAa;QACrB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,YAAY,EAAE,CAAC;IACjE,CAAC;IAED,MAAM,CAAC,wBAAwB,CAAC,KAAK;QACjC,6DAA6D;QAC7D,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC9B,CAAC;IACD,MAAM,CAAC,wBAAwB,CAAC,KAAa,EAAE,KAAa;QACxD,IAAI,KAAK,CAAC,YAAY,KAAK,KAAK,CAAC,MAAM;YACnC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,YAAY,EAAE,CAAC;;YACtD,OAAO,IAAI,CAAC;IACrB,CAAC;IAED,iBAAiB,CAAC,KAAK,EAAE,SAAS;QAC9B,2DAA2D;QAC3D,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACpB,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IAC5B,CAAC;IAED,MAAM;QACF,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;YACtB,wCAAwC;YACxC,OAAO,IAAI,CAAC,KAAK,CAAC,cAAc,IAAI,iDAA8B,CAAC;QACvE,CAAC;QAED,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;IAC/B,CAAC;CACJ"}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
export * from './button';
|
2
|
+
export * from './centered';
|
3
|
+
export * from './dropdown';
|
4
|
+
export * from './error-boundary';
|
5
|
+
export * from './field-editor';
|
6
|
+
export * from './file-upload';
|
7
|
+
export * from './horizontal';
|
8
|
+
export * from './input';
|
9
|
+
export * from './list';
|
10
|
+
export * from './loading';
|
11
|
+
export * from './please-wait';
|
12
|
+
export * from './prompt';
|
13
|
+
export * from './search';
|
14
|
+
export * from './section';
|
15
|
+
export * from './svg';
|
16
|
+
export * from './vertical-content';
|
17
|
+
export * from './vertical';
|
@@ -0,0 +1,18 @@
|
|
1
|
+
export * from './button';
|
2
|
+
export * from './centered';
|
3
|
+
export * from './dropdown';
|
4
|
+
export * from './error-boundary';
|
5
|
+
export * from './field-editor';
|
6
|
+
export * from './file-upload';
|
7
|
+
export * from './horizontal';
|
8
|
+
export * from './input';
|
9
|
+
export * from './list';
|
10
|
+
export * from './loading';
|
11
|
+
export * from './please-wait';
|
12
|
+
export * from './prompt';
|
13
|
+
export * from './search';
|
14
|
+
export * from './section';
|
15
|
+
export * from './svg';
|
16
|
+
export * from './vertical-content';
|
17
|
+
export * from './vertical';
|
18
|
+
//# sourceMappingURL=exports-index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"exports-index.js","sourceRoot":"","sources":["../../src/controls/exports-index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,OAAO,CAAC;AACtB,cAAc,oBAAoB,CAAC;AACnC,cAAc,YAAY,CAAC"}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
interface IProps {
|
3
|
+
required?: boolean;
|
4
|
+
error?: string;
|
5
|
+
value: string;
|
6
|
+
onChange: (newValue: string) => void;
|
7
|
+
css: string[];
|
8
|
+
label: string;
|
9
|
+
description?: string;
|
10
|
+
type?: "text" | "multiline";
|
11
|
+
}
|
12
|
+
export declare const FieldEditor: React.FunctionComponent<IProps>;
|
13
|
+
export {};
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import { Field, mergeClasses, Textarea } from '@fluentui/react-components';
|
3
|
+
import { isNullOrUndefined } from '@kwiz/common';
|
4
|
+
import { GetLogger } from '../_modules/config';
|
5
|
+
import { InputEx } from './input';
|
6
|
+
const logger = GetLogger('FieldEditor');
|
7
|
+
export const FieldEditor = (props) => {
|
8
|
+
if (isNullOrUndefined(props.value)) {
|
9
|
+
logger.error(`${props.label}: value should not be null`);
|
10
|
+
}
|
11
|
+
return (_jsx(Field, { required: props.required, validationMessage: props.error || props.description, validationState: props.error ? "error" : "none", children: props.type === "multiline"
|
12
|
+
? _jsx(Textarea, { className: props.css && mergeClasses(...props.css), required: props.required, placeholder: props.label, value: props.value || "", onChange: (e, data) => props.onChange(data.value) })
|
13
|
+
: _jsx(InputEx, { className: props.css && mergeClasses(...props.css), required: props.required, appearance: 'underline', placeholder: props.label, value: props.value || "", onChange: (e, data) => props.onChange(data.value) }) }));
|
14
|
+
};
|
15
|
+
//# sourceMappingURL=field-editor.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"field-editor.js","sourceRoot":"","sources":["../../src/controls/field-editor.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEjD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC,MAAM,MAAM,GAAG,SAAS,CAAC,aAAa,CAAC,CAAC;AAYxC,MAAM,CAAC,MAAM,WAAW,GAAoC,CAAC,KAAK,EAAE,EAAE;IAClE,IAAI,iBAAiB,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;QACjC,MAAM,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,KAAK,4BAA4B,CAAC,CAAC;IAC7D,CAAC;IACD,OAAO,CACH,KAAC,KAAK,IAAC,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAC3B,iBAAiB,EAAE,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,WAAW,EACnD,eAAe,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,YAC9C,KAAK,CAAC,IAAI,KAAK,WAAW;YACvB,CAAC,CAAC,KAAC,QAAQ,IAAC,SAAS,EAAE,KAAK,CAAC,GAAG,IAAI,YAAY,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,EAC1D,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,WAAW,EAAE,KAAK,CAAC,KAAK,EACxB,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,EAAE,EACxB,QAAQ,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,GACnD;YACF,CAAC,CAAC,KAAC,OAAO,IAAC,SAAS,EAAE,KAAK,CAAC,GAAG,IAAI,YAAY,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,EACzD,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,UAAU,EAAC,WAAW,EACtB,WAAW,EAAE,KAAK,CAAC,KAAK,EACxB,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,EAAE,EACxB,QAAQ,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,GAAI,GACzD,CACX,CAAC;AACN,CAAC,CAAA"}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { ButtonProps } from "@fluentui/react-components";
|
2
|
+
import * as React from "react";
|
3
|
+
interface iProps {
|
4
|
+
showTitleWithIcon?: boolean;
|
5
|
+
title?: string;
|
6
|
+
/** Passing this will turn the button into a compound button */
|
7
|
+
secondaryContent?: string;
|
8
|
+
limitFileTypes?: string[];
|
9
|
+
allowMultiple?: boolean;
|
10
|
+
icon?: JSX.Element;
|
11
|
+
onChange?: (newFile: File | FileList) => void;
|
12
|
+
/** only works for single file, reads it as base64 */
|
13
|
+
asBase64?: (base64: string) => void;
|
14
|
+
buttonProps?: ButtonProps;
|
15
|
+
disabled?: boolean;
|
16
|
+
}
|
17
|
+
export declare const FileUpload: React.ForwardRefExoticComponent<iProps & React.RefAttributes<HTMLButtonElement>>;
|
18
|
+
export {};
|
@@ -0,0 +1,41 @@
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
+
import { isFunction, isNotEmptyArray, isNullOrEmptyString } from '@kwiz/common';
|
3
|
+
import * as React from "react";
|
4
|
+
import { ButtonEX, CompoundButtonEXSecondary } from "./button";
|
5
|
+
export const FileUpload = React.forwardRef((props, ref) => {
|
6
|
+
const hiddenFileInput = React.useRef(null);
|
7
|
+
const isMulti = props.allowMultiple === true;
|
8
|
+
return _jsxs(_Fragment, { children: [isNullOrEmptyString(props.secondaryContent)
|
9
|
+
? _jsx(ButtonEX, Object.assign({ ref: ref }, (props.buttonProps || {}), { icon: props.icon, showTitleWithIcon: props.showTitleWithIcon, onClick: () => {
|
10
|
+
hiddenFileInput.current.value = "";
|
11
|
+
hiddenFileInput.current.click();
|
12
|
+
}, title: props.title, disabled: props.disabled }))
|
13
|
+
: _jsx(CompoundButtonEXSecondary, Object.assign({ ref: ref }, (props.buttonProps || {}), { icon: props.icon, secondaryContent: props.secondaryContent, onClick: () => {
|
14
|
+
hiddenFileInput.current.value = "";
|
15
|
+
hiddenFileInput.current.click();
|
16
|
+
}, title: props.title, disabled: props.disabled })), _jsx("input", { type: "file", ref: hiddenFileInput, style: { display: "none" }, multiple: isMulti, accept: isNotEmptyArray(props.limitFileTypes) ? props.limitFileTypes.map(ft => `.${ft}`).join() : undefined, onChange: (e) => {
|
17
|
+
if (e.target.files && e.target.files.length > 0) {
|
18
|
+
if (isMulti) {
|
19
|
+
if (isFunction(props.onChange)) {
|
20
|
+
props.onChange(e.target.files);
|
21
|
+
}
|
22
|
+
}
|
23
|
+
else {
|
24
|
+
const fileUploaded = e.target.files && e.target.files[0];
|
25
|
+
if (isFunction(props.onChange)) {
|
26
|
+
props.onChange(fileUploaded);
|
27
|
+
}
|
28
|
+
if (isFunction(props.asBase64) && fileUploaded) {
|
29
|
+
const reader = new FileReader();
|
30
|
+
reader.onloadend = () => {
|
31
|
+
console.log(reader.result);
|
32
|
+
if (!isNullOrEmptyString(reader.result))
|
33
|
+
props.asBase64(reader.result);
|
34
|
+
};
|
35
|
+
reader.readAsDataURL(fileUploaded);
|
36
|
+
}
|
37
|
+
}
|
38
|
+
}
|
39
|
+
} })] });
|
40
|
+
});
|
41
|
+
//# sourceMappingURL=file-upload.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"file-upload.js","sourceRoot":"","sources":["../../src/controls/file-upload.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAChF,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAiB/D,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CAA8B,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACnF,MAAM,eAAe,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC3C,MAAM,OAAO,GAAG,KAAK,CAAC,aAAa,KAAK,IAAI,CAAC;IAC7C,OAAO,8BACF,mBAAmB,CAAC,KAAK,CAAC,gBAAgB,CAAC;gBACxC,CAAC,CAAC,KAAC,QAAQ,kBAAC,GAAG,EAAE,GAAG,IAAM,CAAC,KAAK,CAAC,WAAW,IAAI,EAAE,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EAAE,CAAC;4BACV,IAAI,UAAU,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;gCAC7B,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;4BACnC,CAAC;wBACL,CAAC;6BACI,CAAC;4BACF,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;4BACzD,IAAI,UAAU,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;gCAC7B,KAAK,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;4BACjC,CAAC;4BACD,IAAI,UAAU,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,YAAY,EAAE,CAAC;gCAC7C,MAAM,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;gCAChC,MAAM,CAAC,SAAS,GAAG,GAAG,EAAE;oCACpB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;oCAC3B,IAAI,CAAC,mBAAmB,CAAC,MAAM,CAAC,MAAM,CAAC;wCACnC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAgB,CAAC,CAAC;gCAChD,CAAC,CAAC;gCACF,MAAM,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;4BACvC,CAAC;wBACL,CAAC;oBACL,CAAC;gBACL,CAAC,GACH,IACH,CAAC;AACR,CAAC,CAAC,CAAC"}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import { makeStyles } from '@fluentui/react-components';
|
3
|
+
import { isNotEmptyArray } from '@kwiz/common';
|
4
|
+
import { KnownClassNames, mixins } from '../styles/styles';
|
5
|
+
import { Section } from './section';
|
6
|
+
const useStyles = makeStyles({
|
7
|
+
horizontal: Object.assign(Object.assign({}, mixins.flex), { flexDirection: 'row' }),
|
8
|
+
wrap: mixins.wrap,
|
9
|
+
nogap: mixins.nogap
|
10
|
+
});
|
11
|
+
export const Horizontal = (props) => {
|
12
|
+
const cssNames = useStyles();
|
13
|
+
let css = [KnownClassNames.horizontal];
|
14
|
+
css.push(cssNames.horizontal);
|
15
|
+
if (props.wrap)
|
16
|
+
css.push(cssNames.wrap);
|
17
|
+
if (props.nogap)
|
18
|
+
css.push(cssNames.nogap);
|
19
|
+
if (isNotEmptyArray(props.css))
|
20
|
+
css.push(...props.css);
|
21
|
+
return (_jsx(Section, Object.assign({}, props, { css: css })));
|
22
|
+
};
|
23
|
+
//# sourceMappingURL=horizontal.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"horizontal.js","sourceRoot":"","sources":["../../src/controls/horizontal.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAiB,OAAO,EAAE,MAAM,WAAW,CAAC;AAEnD,MAAM,SAAS,GAAG,UAAU,CAAC;IACzB,UAAU,kCACH,MAAM,CAAC,IAAI,KACd,aAAa,EAAE,KAAK,GACvB;IACD,IAAI,EAAE,MAAM,CAAC,IAAI;IACjB,KAAK,EAAE,MAAM,CAAC,KAAK;CACtB,CAAC,CAAA;AAMF,MAAM,CAAC,MAAM,UAAU,GAA6D,CAAC,KAAK,EAAE,EAAE;IAC1F,MAAM,QAAQ,GAAG,SAAS,EAAE,CAAC;IAC7B,IAAI,GAAG,GAAa,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;IAEjD,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;IAC9B,IAAI,KAAK,CAAC,IAAI;QACV,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC5B,IAAI,KAAK,CAAC,KAAK;QACX,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE7B,IAAI,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC;QAAE,GAAG,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;IAEvD,OAAO,CACH,KAAC,OAAO,oBAAK,KAAK,IAAE,GAAG,EAAE,GAAG,IAAI,CACnC,CAAC;AACN,CAAC,CAAA"}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { InputProps, TextareaProps } from '@fluentui/react-components';
|
2
|
+
import React from 'react';
|
3
|
+
interface IProps extends InputProps {
|
4
|
+
onOK?: () => void;
|
5
|
+
onCancel?: () => void;
|
6
|
+
}
|
7
|
+
export declare const InputEx: React.FunctionComponent<React.PropsWithChildren<IProps>>;
|
8
|
+
interface IPropsTextArea extends TextareaProps {
|
9
|
+
fullSize?: boolean;
|
10
|
+
growNoShrink?: boolean;
|
11
|
+
}
|
12
|
+
export declare const TextAreaEx: React.FunctionComponent<React.PropsWithChildren<IPropsTextArea>>;
|
13
|
+
export {};
|
@@ -0,0 +1,41 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import { Input, makeStyles, mergeClasses, Textarea } from '@fluentui/react-components';
|
3
|
+
import { isFunction } from '@kwiz/common';
|
4
|
+
import React from 'react';
|
5
|
+
export const InputEx = (props) => {
|
6
|
+
return (_jsx(Input, Object.assign({ appearance: 'underline' }, props, { onKeyDown: isFunction(props.onOK) || isFunction(props.onCancel)
|
7
|
+
? e => {
|
8
|
+
if (isFunction(props.onOK) && e.key === "Enter")
|
9
|
+
props.onOK();
|
10
|
+
else if (isFunction(props.onCancel) && e.key === "Escape")
|
11
|
+
props.onCancel();
|
12
|
+
}
|
13
|
+
: undefined })));
|
14
|
+
};
|
15
|
+
const fullSize = {
|
16
|
+
width: '100% !important',
|
17
|
+
maxHeight: '100% !important'
|
18
|
+
};
|
19
|
+
const useStyles = makeStyles({
|
20
|
+
fullSizeTextArea: Object.assign(Object.assign({}, fullSize), { ['& > textarea']: fullSize }),
|
21
|
+
});
|
22
|
+
export const TextAreaEx = (props) => {
|
23
|
+
const cssNames = useStyles();
|
24
|
+
let css = [];
|
25
|
+
if (props.fullSize)
|
26
|
+
css.push(cssNames.fullSizeTextArea);
|
27
|
+
const textAreaRef = React.useRef(null);
|
28
|
+
const recalcHeight = React.useCallback(() => {
|
29
|
+
if (textAreaRef.current && props.growNoShrink) {
|
30
|
+
if (textAreaRef.current.scrollHeight > textAreaRef.current.clientHeight)
|
31
|
+
textAreaRef.current.style.minHeight = textAreaRef.current.scrollHeight + 'px';
|
32
|
+
}
|
33
|
+
}, [textAreaRef]);
|
34
|
+
let style = Object.assign({ height: '100%' }, props.style);
|
35
|
+
return (_jsx(Textarea, Object.assign({ ref: textAreaRef, className: mergeClasses(...css) }, props, { style: style, onChange: (e, d) => {
|
36
|
+
if (props.onChange)
|
37
|
+
props.onChange(e, d);
|
38
|
+
recalcHeight();
|
39
|
+
} })));
|
40
|
+
};
|
41
|
+
//# sourceMappingURL=input.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"input.js","sourceRoot":"","sources":["../../src/controls/input.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAgB,KAAK,EAAc,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAiB,MAAM,4BAA4B,CAAC;AAChI,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,MAAM,CAAC,MAAM,OAAO,GAA6D,CAAC,KAAK,EAAE,EAAE;IACvF,OAAO,CACH,KAAC,KAAK,kBAAC,UAAU,EAAC,WAAW,IAAK,KAAK,IACnC,SAAS,EAAE,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,QAAQ,CAAC;YAC3D,CAAC,CAAC,CAAC,CAAC,EAAE;gBACF,IA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,EAAE,MAAM,IAAK,KAAK,CAAC,KAAK,CAAE,CAAC;IACpE,OAAO,CACH,KAAC,QAAQ,kBAAC,GAAG,EAAE,WAAW,EAAE,SAAS,EAAE,YAAY,CAAC,GAAG,GAAG,CAAC,IAAM,KAAK,IAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;YACrG,IAAI,KAAK,CAAC,QAAQ;gBAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;YACzC,YAAY,EAAE,CAAC;QACnB,CAAC,IAAI,CACR,CAAC;AACN,CAAC,CAAA"}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
export interface iListItem {
|
3
|
+
key: string | number;
|
4
|
+
media?: JSX.Element | string;
|
5
|
+
header: string;
|
6
|
+
headerMedia?: JSX.Element | string;
|
7
|
+
content?: string | JSX.Element | (string | JSX.Element)[];
|
8
|
+
onClickOnMedia?: boolean;
|
9
|
+
onClick?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
10
|
+
selected?: boolean;
|
11
|
+
}
|
12
|
+
interface IProps {
|
13
|
+
selectable?: boolean;
|
14
|
+
items: iListItem[];
|
15
|
+
showAllHeaderMedia?: boolean;
|
16
|
+
/** allow multiline content */
|
17
|
+
multiline?: boolean;
|
18
|
+
dark?: boolean;
|
19
|
+
}
|
20
|
+
export declare const ListEx: (props: IProps) => import("react/jsx-runtime").JSX.Element;
|
21
|
+
export {};
|