@kwiz/fluentui 1.0.21 → 1.0.22

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. package/.github/workflows/npm-publish.yml +2 -2
  2. package/dist/_modules/config.d.ts +1 -0
  3. package/dist/_modules/config.js +9 -0
  4. package/dist/_modules/config.js.map +1 -0
  5. package/dist/_modules/constants.d.ts +2 -0
  6. package/dist/_modules/constants.js +3 -0
  7. package/dist/_modules/constants.js.map +1 -0
  8. package/dist/controls/accordion.d.ts +13 -0
  9. package/dist/controls/accordion.js +27 -0
  10. package/dist/controls/accordion.js.map +1 -0
  11. package/dist/controls/button.d.ts +28 -0
  12. package/dist/controls/button.js +113 -0
  13. package/dist/controls/button.js.map +1 -0
  14. package/dist/controls/centered.d.ts +5 -0
  15. package/dist/controls/centered.js +14 -0
  16. package/dist/controls/centered.js.map +1 -0
  17. package/dist/controls/date.d.ts +8 -0
  18. package/dist/controls/date.js +32 -0
  19. package/dist/controls/date.js.map +1 -0
  20. package/dist/controls/dropdown.d.ts +31 -0
  21. package/dist/controls/dropdown.js +28 -0
  22. package/dist/controls/dropdown.js.map +1 -0
  23. package/dist/controls/error-boundary.d.ts +23 -0
  24. package/dist/controls/error-boundary.js +33 -0
  25. package/dist/controls/error-boundary.js.map +1 -0
  26. package/dist/controls/field-editor.d.ts +13 -0
  27. package/dist/controls/field-editor.js +15 -0
  28. package/dist/controls/field-editor.js.map +1 -0
  29. package/dist/controls/file-upload.d.ts +18 -0
  30. package/dist/controls/file-upload.js +41 -0
  31. package/dist/controls/file-upload.js.map +1 -0
  32. package/dist/controls/horizontal.d.ts +8 -0
  33. package/dist/controls/horizontal.js +23 -0
  34. package/dist/controls/horizontal.js.map +1 -0
  35. package/dist/controls/input.d.ts +13 -0
  36. package/dist/controls/input.js +43 -0
  37. package/dist/controls/input.js.map +1 -0
  38. package/dist/controls/kwizoverflow.d.ts +14 -0
  39. package/dist/controls/kwizoverflow.js +45 -0
  40. package/dist/controls/kwizoverflow.js.map +1 -0
  41. package/dist/controls/list.d.ts +21 -0
  42. package/dist/controls/list.js +72 -0
  43. package/dist/controls/list.js.map +1 -0
  44. package/dist/controls/loading.d.ts +5 -0
  45. package/dist/controls/loading.js +7 -0
  46. package/dist/controls/loading.js.map +1 -0
  47. package/dist/controls/please-wait.d.ts +18 -0
  48. package/dist/controls/please-wait.js +16 -0
  49. package/dist/controls/please-wait.js.map +1 -0
  50. package/dist/controls/prompt.d.ts +32 -0
  51. package/dist/controls/prompt.js +31 -0
  52. package/dist/controls/prompt.js.map +1 -0
  53. package/dist/controls/search.d.ts +13 -0
  54. package/dist/controls/search.js +47 -0
  55. package/dist/controls/search.js.map +1 -0
  56. package/dist/controls/section.d.ts +14 -0
  57. package/dist/controls/section.js +27 -0
  58. package/dist/controls/section.js.map +1 -0
  59. package/dist/controls/svg.d.ts +23 -0
  60. package/dist/controls/svg.js +45 -0
  61. package/dist/controls/svg.js.map +1 -0
  62. package/dist/controls/toolbar.d.ts +12 -0
  63. package/dist/controls/toolbar.js +23 -0
  64. package/dist/controls/toolbar.js.map +1 -0
  65. package/dist/controls/vertical-content.d.ts +6 -0
  66. package/dist/controls/vertical-content.js +37 -0
  67. package/dist/controls/vertical-content.js.map +1 -0
  68. package/dist/controls/vertical.d.ts +8 -0
  69. package/dist/controls/vertical.js +23 -0
  70. package/dist/controls/vertical.js.map +1 -0
  71. package/dist/helpers/context.d.ts +26 -0
  72. package/dist/helpers/context.js +15 -0
  73. package/dist/helpers/context.js.map +1 -0
  74. package/dist/helpers/hooks.d.ts +62 -0
  75. package/dist/helpers/hooks.js +287 -0
  76. package/dist/helpers/hooks.js.map +1 -0
  77. package/dist/index.d.ts +25 -0
  78. package/dist/index.js +25 -0
  79. package/dist/index.js.map +1 -0
  80. package/dist/styles/styles.d.ts +19 -0
  81. package/dist/styles/styles.js +79 -0
  82. package/dist/styles/styles.js.map +1 -0
  83. package/dist/styles/theme.d.ts +6 -0
  84. package/dist/styles/theme.js +77 -0
  85. package/dist/styles/theme.js.map +1 -0
  86. package/package.json +1 -1
@@ -17,8 +17,7 @@ jobs:
17
17
  with:
18
18
  node-version: 20
19
19
  - run: npm ci
20
- - run: npm run __update-kwiz-packages
21
- - run: npm run build
20
+ - run: npm test
22
21
 
23
22
  publish-npm:
24
23
  needs: build
@@ -30,6 +29,7 @@ jobs:
30
29
  node-version: 20
31
30
  registry-url: https://registry.npmjs.org/
32
31
  - run: npm ci
32
+ - run: npm run build
33
33
  - run: npm publish
34
34
  env:
35
35
  NODE_AUTH_TOKEN: ${{secrets.KWIZ_NPM_TOKEN}}
@@ -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,2 @@
1
+ export declare var BuildNumber: string;
2
+ export declare const ReleaseStatus = "npm";
@@ -0,0 +1,3 @@
1
+ export var BuildNumber = 'unset';
2
+ export const ReleaseStatus = "npm";
3
+ //# sourceMappingURL=constants.js.map
@@ -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,13 @@
1
+ import * as React from 'react';
2
+ interface iProps {
3
+ /** optional: send the key for the group you want to open by default */
4
+ opened?: string;
5
+ groups: {
6
+ key: string;
7
+ title: string;
8
+ icon?: JSX.Element;
9
+ content: JSX.Element;
10
+ }[];
11
+ }
12
+ export declare const AccordionEX: React.FunctionComponent<iProps>;
13
+ export {};
@@ -0,0 +1,27 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Label, makeStyles } from "@fluentui/react-components";
3
+ import { ChevronRightRegular } from "@fluentui/react-icons";
4
+ import * as React from 'react';
5
+ import { Horizontal } from "./horizontal";
6
+ import { Vertical } from "./vertical";
7
+ const useStyles = makeStyles({
8
+ opened: {
9
+ transform: "rotate(90deg)",
10
+ transition: "transform 200ms ease-out"
11
+ },
12
+ header: {
13
+ cursor: "pointer"
14
+ },
15
+ root: {
16
+ maxHeight: "100%"
17
+ },
18
+ body: {
19
+ overflow: "auto"
20
+ }
21
+ });
22
+ export const AccordionEX = (props) => {
23
+ const classes = useStyles();
24
+ const [opened, setOpened] = React.useState(props.opened || props.groups[0].key);
25
+ return (_jsx(Vertical, { main: true, css: [classes.root], children: props.groups.map(group => _jsxs(React.Fragment, { children: [_jsxs(Horizontal, { css: [classes.header], onClick: () => setOpened(group.key), children: [_jsx(ChevronRightRegular, { className: opened === group.key && classes.opened }), _jsx(Label, { children: group.title })] }), group.key === opened && _jsx(Vertical, { main: true, css: [classes.body], children: group.content })] }, group.key)) }));
26
+ };
27
+ //# sourceMappingURL=accordion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accordion.js","sourceRoot":"","sources":["../../src/controls/accordion.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,4B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AC,GAAG,KAAK,MAAM,IAAI,KAAC,QAAQ,IAAC,IAAI,QAAC,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,YACtD,KAAK,CAAC,OAAO,GACP,KAPiC,KAAK,CAAC,GAAG,CAQxC,CAAC,GACX,CACV,CAAC;AACN,CAAC,CAAA"}
@@ -0,0 +1,28 @@
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 ButtonEXDangerSubtle: React.ForwardRefExoticComponent<ButtonEXProps & React.RefAttributes<HTMLButtonElement>>;
24
+ export declare const CompoundButtonEX: React.ForwardRefExoticComponent<CompoundButtonEXProps & React.RefAttributes<HTMLButtonElement>>;
25
+ export declare const CompoundButtonEXSecondary: React.ForwardRefExoticComponent<CompoundButtonEXProps & React.RefAttributes<HTMLButtonElement>>;
26
+ export declare const CompoundButtonEXPrimary: React.ForwardRefExoticComponent<CompoundButtonEXProps & React.RefAttributes<HTMLButtonElement>>;
27
+ export declare const CompoundButtonEXDanger: React.ForwardRefExoticComponent<CompoundButtonEXProps & React.RefAttributes<HTMLButtonElement>>;
28
+ export {};
@@ -0,0 +1,113 @@
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 { useKWIZFluentContext } from '../helpers/context';
6
+ import { useCommonStyles, widthMedium } from '../styles/styles';
7
+ const useStyles = makeStyles({
8
+ buttonNoCenter: {
9
+ justifyContent: 'flex-start',
10
+ '& *': {
11
+ /* a button with no center that has content of a vertical, or multiple labels */
12
+ alignItems: 'flex-start'
13
+ }
14
+ },
15
+ danger: {
16
+ backgroundColor: tokens.colorStatusDangerBackground1,
17
+ color: tokens.colorStatusWarningForeground2,
18
+ [`& .${compoundButtonClassNames.secondaryContent}`]: {
19
+ color: tokens.colorStatusWarningForeground1
20
+ }
21
+ },
22
+ success: {
23
+ color: tokens.colorStatusSuccessForeground1,
24
+ [`& .${compoundButtonClassNames.secondaryContent}`]: {
25
+ color: tokens.colorStatusSuccessForeground1,
26
+ }
27
+ },
28
+ primarySubtle: {
29
+ color: tokens.colorBrandForeground1,
30
+ [`& .${compoundButtonClassNames.secondaryContent}`]: {
31
+ color: tokens.colorBrandForeground1,
32
+ }
33
+ },
34
+ dangerSubtle: {
35
+ color: tokens.colorStatusWarningForeground2,
36
+ [`& .${compoundButtonClassNames.secondaryContent}`]: {
37
+ color: tokens.colorStatusWarningForeground1
38
+ }
39
+ }
40
+ });
41
+ export const ButtonEX = React.forwardRef((props, ref) => {
42
+ const [hover, setHover] = React.useState(false);
43
+ const trackHover = !isNullOrEmptyString(props.hoverTitle) || !isNullOrUndefined(props.hoverIcon);
44
+ const title = hover && !isNullOrEmptyString(props.hoverTitle) ? props.hoverTitle
45
+ : props.title || props['aria-label'];
46
+ const icon = hover && !isNullOrUndefined(props.hoverIcon) ? props.hoverIcon : props.icon;
47
+ let hasIcon = !isNullOrUndefined(icon);
48
+ let hasText = props.children || !hasIcon || (hasIcon && props.showTitleWithIcon === true);
49
+ const commonCssNames = useCommonStyles();
50
+ const cssNames = useStyles();
51
+ let css = [];
52
+ if (props.hideOnPrint)
53
+ PushNoDuplicate(css, commonCssNames.printHide);
54
+ if (props.dontCenterText)
55
+ PushNoDuplicate(css, cssNames.buttonNoCenter);
56
+ if (!isNullOrEmptyString(props.className))
57
+ css.push(...props.className.split(' '));
58
+ let btn = _jsx(Button, Object.assign({ ref: ref, appearance: 'subtle' }, props, { className: mergeClasses(...css), "aria-label": title, title: undefined, icon: icon, onMouseEnter: trackHover ? (e) => {
59
+ setHover(true);
60
+ if (isFunction(props.onMouseEnter))
61
+ props.onMouseEnter(e);
62
+ } : props.onMouseEnter, onMouseLeave: trackHover ? (e) => {
63
+ setHover(false);
64
+ if (isFunction(props.onMouseLeave))
65
+ props.onMouseLeave(e);
66
+ } : props.onMouseLeave, children: props.children ||
67
+ //no icon? will show the title by default
68
+ (hasText && capitalizeFirstLetter(title)) }));
69
+ if (!hasText || props.children) //icon only or when content is different than props.title
70
+ btn = _jsx(Tooltip, { showDelay: 1000, relationship: 'label', withArrow: true, appearance: 'inverted', content: title, children: btn });
71
+ return (props.dontStretch ? _jsx("div", { children: btn }) : btn);
72
+ });
73
+ export const ButtonEXSecondary = React.forwardRef((props, ref) => {
74
+ const ctx = useKWIZFluentContext();
75
+ return (_jsx(ButtonEX, Object.assign({ ref: ref, appearance: 'secondary', shape: ctx.buttonShape }, props)));
76
+ });
77
+ export const ButtonEXPrimary = React.forwardRef((props, ref) => {
78
+ return (_jsx(ButtonEXSecondary, Object.assign({ ref: ref, appearance: 'primary' }, props, { children: props.children })));
79
+ });
80
+ export const ButtonEXDanger = React.forwardRef((props, ref) => {
81
+ const cssNames = useStyles();
82
+ return (_jsx(ButtonEXSecondary, Object.assign({ ref: ref, className: props.disabled ? undefined : cssNames.danger }, props, { children: props.children })));
83
+ });
84
+ export const ButtonEXSuccess = React.forwardRef((props, ref) => {
85
+ const cssNames = useStyles();
86
+ return (_jsx(ButtonEX, Object.assign({ ref: ref, className: cssNames.success }, props, { children: props.children })));
87
+ });
88
+ export const ButtonEXPrimarySubtle = React.forwardRef((props, ref) => {
89
+ const cssNames = useStyles();
90
+ return (_jsx(ButtonEX, Object.assign({ ref: ref, className: props.disabled ? undefined : cssNames.primarySubtle }, props, { children: props.children })));
91
+ });
92
+ export const ButtonEXDangerSubtle = React.forwardRef((props, ref) => {
93
+ const cssNames = useStyles();
94
+ return (_jsx(ButtonEX, Object.assign({ ref: ref, className: props.disabled ? undefined : cssNames.dangerSubtle }, props, { children: props.children })));
95
+ });
96
+ export const CompoundButtonEX = React.forwardRef((props, ref) => {
97
+ let title = props.title || props['aria-label'];
98
+ let tooltip = isString(props.secondaryContent) ? props.secondaryContent : title;
99
+ let max = typeof (props.width) === "undefined" ? widthMedium : props.width;
100
+ 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) })) }));
101
+ });
102
+ export const CompoundButtonEXSecondary = React.forwardRef((props, ref) => {
103
+ const ctx = useKWIZFluentContext();
104
+ return (_jsx(CompoundButtonEX, Object.assign({ ref: ref, appearance: 'secondary', shape: ctx.buttonShape }, props)));
105
+ });
106
+ export const CompoundButtonEXPrimary = React.forwardRef((props, ref) => {
107
+ return (_jsx(CompoundButtonEXSecondary, Object.assign({ ref: ref, appearance: 'primary' }, props, { children: props.children })));
108
+ });
109
+ export const CompoundButtonEXDanger = React.forwardRef((props, ref) => {
110
+ const cssNames = useStyles();
111
+ return (_jsx(CompoundButtonEXSecondary, Object.assign({ ref: ref, className: cssNames.danger }, props, { children: props.children })));
112
+ });
113
+ //# 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,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,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,KAAK,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ACH,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,5 @@
1
+ import React from 'react';
2
+ interface IProps {
3
+ }
4
+ export declare const Centered: React.FunctionComponent<React.PropsWithChildren<IProps>>;
5
+ export {};
@@ -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,8 @@
1
+ import { DatePickerProps } from '@fluentui/react-datepicker-compat';
2
+ import * as React from 'react';
3
+ interface IProps extends DatePickerProps {
4
+ onOK?: () => void;
5
+ onCancel?: () => void;
6
+ }
7
+ export declare const DatePickerEx: React.FunctionComponent<React.PropsWithChildren<IProps>>;
8
+ export {};
@@ -0,0 +1,32 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { DatePicker } from '@fluentui/react-datepicker-compat';
3
+ import { CalendarCancelRegular } from '@fluentui/react-icons';
4
+ import { isDate, isFunction, isNullOrEmptyString } from '@kwiz/common';
5
+ import * as React from 'react';
6
+ import { useKWIZFluentContext } from '../helpers/context';
7
+ export const DatePickerEx = (props) => {
8
+ const ctx = useKWIZFluentContext();
9
+ const [showClear, setShowClear] = React.useState(isDate(props.value));
10
+ const reset = React.useCallback(() => {
11
+ setShowClear(false);
12
+ if (isFunction(props.onSelectDate))
13
+ props.onSelectDate(undefined);
14
+ }, [showClear]);
15
+ return (_jsx(DatePicker, Object.assign({ appearance: ctx.inputAppearance, mountNode: ctx.mountNode }, props, { onSelectDate: (date) => {
16
+ setShowClear(isDate(date));
17
+ if (isFunction(props.onSelectDate))
18
+ props.onSelectDate(date);
19
+ }, onChange: (e, data) => {
20
+ setShowClear(!isNullOrEmptyString(data.value));
21
+ if (isFunction(props.onChange))
22
+ props.onChange(e, data);
23
+ }, onKeyDown: isFunction(props.onOK) || isFunction(props.onCancel)
24
+ ? e => {
25
+ if (isFunction(props.onOK) && e.key === "Enter")
26
+ props.onOK();
27
+ else if (isFunction(props.onCancel) && e.key === "Escape")
28
+ props.onCancel();
29
+ }
30
+ : undefined, contentBefore: showClear && _jsx(CalendarCancelRegular, { title: 'Clear', onClick: () => reset() }) })));
31
+ };
32
+ //# sourceMappingURL=date.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date.js","sourceRoot":"","sources":["../../src/controls/date.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAmB,MAAM,mCAAmC,CAAC;AAChF,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACvE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAO1D,MAAM,CAAC,MAAM,YAAY,GAA6D,CAAC,KAAK,EAAE,EAAE;IAC5F,MAAM,GAAG,GAAG,oBAAoB,EAAE,CAAC;IACnC,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;IACtE,MAAM,KAAK,GAAG,KAAK,CAAC,WAAW,CAAC,GAAG,EAAE;QACjC,YAAY,CAAC,KAAK,CAAC,CAAC;QACpB,IAAI,UAAU,CAAC,KAAK,CAAC,YAAY,CAAC;YAAE,KAAK,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;IACtE,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;IAEhB,OAAO,CACH,KAAC,UAAU,kBAAC,UAAU,EAAE,GAAG,CAAC,eAAe,EAAE,SAAS,EAAE,GAAG,CAAC,SAAS,IAAM,KAAK,IAC5E,YAAY,EAAE,CAAC,IAAI,EAAE,EAAE;YACnB,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;YAC3B,IAAI,UAAU,CAAC,KAAK,CAAC,YAAY,CAAC;gBAAE,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QACjE,CAAC,EACD,QAAQ,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE;YAClB,YAAY,CAAC,CAAC,mBAAmB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;YAC/C,IAAI,UAAU,CAAC,KAAK,CAAC,QAAQ,CAAC;gBAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;QAC5D,CAAC,EACD,SAAS,EAAE,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,QAAQ,CAAC;YAC3D,CAAC,CAAC,CAAC,CAAC,EAAE;gBACF,IAAI,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,KAAK,OAAO;oBAAE,KAAK,CAAC,IAAI,EAAE,CAAC;qBACzD,IAAI,UAAU,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,GAAG,KAAK,QAAQ;oBAAE,KAAK,CAAC,QAAQ,EAAE,CAAC;YAChF,CAAC;YACD,CAAC,CAAC,SAAS,EAEf,aAAa,EAAE,SAAS,IAAI,KAAC,qBAAqB,IAAC,KAAK,EAAC,OAAO,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,EAAE,GAAI,IAC7F,CACL,CAAC;AACN,CAAC,CAAA"}
@@ -0,0 +1,31 @@
1
+ import { DropdownProps } from '@fluentui/react-components';
2
+ import React from 'react';
3
+ type ForwardProps = Omit<DropdownProps, "onSelect" | "selectedOptions" | "clearable">;
4
+ interface IProps<dataType, keyType extends string = string> extends ForwardProps {
5
+ required?: boolean;
6
+ selected: keyType | keyType[];
7
+ items: {
8
+ key: keyType;
9
+ value: string;
10
+ data?: dataType;
11
+ /** display complex controls in the drop down */
12
+ option?: JSX.Element;
13
+ }[];
14
+ onSelect: (
15
+ /** the specific option that was selected/unselected */
16
+ option: {
17
+ key: keyType;
18
+ value: string;
19
+ data?: dataType;
20
+ },
21
+ /** only sent for multi select - all selected options, in case of multi select */
22
+ options?: {
23
+ key: keyType;
24
+ value: string;
25
+ data?: dataType;
26
+ }[]) => void;
27
+ }
28
+ /** issue: figure out how to use forward ref with typed controls */
29
+ export declare function DropdownEXTypedNoForwardRef<keyType extends string = string, dataType = never>(props: IProps<dataType, keyType>, ref: React.ForwardedRef<HTMLButtonElement>): import("react/jsx-runtime").JSX.Element;
30
+ export declare const DropdownEX: React.ForwardRefExoticComponent<IProps<unknown, string> & React.RefAttributes<HTMLButtonElement>>;
31
+ export {};
@@ -0,0 +1,28 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Dropdown, Option } from '@fluentui/react-components';
3
+ import { filterEmptyEntries, firstOrNull, isNullOrUndefined } from '@kwiz/common';
4
+ import React from 'react';
5
+ import { useKWIZFluentContext } from '../helpers/context';
6
+ /** issue: figure out how to use forward ref with typed controls */
7
+ export function DropdownEXTypedNoForwardRef(props, ref) {
8
+ const ctx = useKWIZFluentContext();
9
+ const selected = Array.isArray(props.selected) ? props.selected : isNullOrUndefined(props.selected) ? [] : [props.selected];
10
+ //sometimes control will lose value when re-rendered
11
+ //use case: public forms when editing other fields after the dropdown was set
12
+ //re-set the text value manually to fix
13
+ let text = filterEmptyEntries((Array.isArray(props.selected) ? props.selected : [props.selected]).map(s => {
14
+ let v = firstOrNull(props.items, i => i.key === s);
15
+ return v ? v.value : '';
16
+ })).join(', ');
17
+ return (_jsx(Dropdown, Object.assign({}, props, { onSelect: undefined, ref: ref, clearable: !props.required && !props.multiselect, appearance: ctx.inputAppearance, mountNode: ctx.mountNode, selectedOptions: selected, value: text, onOptionSelect: (e, data) => {
18
+ let o = firstOrNull(props.items, i => i.key === data.optionValue);
19
+ if (props.multiselect) {
20
+ let current = data.selectedOptions.map(s => firstOrNull(props.items, i => i.key === s));
21
+ props.onSelect(o, current);
22
+ }
23
+ else
24
+ props.onSelect(o);
25
+ }, children: props.items.map(i => _jsx(Option, { value: i.key, text: i.value, children: i.option ? i.option : i.value }, i.key)) })));
26
+ }
27
+ export const DropdownEX = React.forwardRef(DropdownEXTypedNoForwardRef);
28
+ //# 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,EAAiB,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAC7E,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAClF,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAmB1D,mEAAmE;AACnE,MAAM,UAAU,2BAA2B,CAAoD,KAAgC,EAAE,GAA0C;IACvK,MAAM,GAAG,GAAG,oBAAoB,EAAE,CAAC;IACnC,MAAM,QAAQ,GAAc,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,iBAAiB,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAEvI,oDAAoD;IACpD,6EAA6E;IAC7E,uCAAuC;IACvC,IAAI,IAAI,GAAG,kBAAkB,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE;QACtG,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G,EAAE,IAAI,EAAE,CAAC,CAAC,KAAK,YAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,IAAlE,CAAC,CAAC,GAAG,CAAuE,CAAC,IACzG,CAEd,CAAC;AACN,CAAC;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC,2BAA2B,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 | Iterable<React.ReactNode> | import("react/jsx-runtime").JSX.Element;
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,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, 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,O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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,CAAC,IAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,iBAAiB,EAAE,KAAK,CAAC,iBAAi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,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,8 @@
1
+ import React from 'react';
2
+ import { ISectionProps } from './section';
3
+ interface IProps extends ISectionProps {
4
+ wrap?: boolean;
5
+ nogap?: boolean;
6
+ }
7
+ export declare const Horizontal: React.FunctionComponent<React.PropsWithChildren<IProps>>;
8
+ export {};
@@ -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 {};