@kwiz/fluentui 1.0.15 → 1.0.19

Sign up to get free protection for your applications and to get access to all the features.
Files changed (131) hide show
  1. package/.github/workflows/npm-publish.yml +34 -0
  2. package/LICENSE +21 -21
  3. package/README.md +26 -26
  4. package/package.json +72 -72
  5. package/src/_modules/config.ts +9 -9
  6. package/src/_modules/constants.ts +3 -3
  7. package/src/controls/accordion.tsx +48 -0
  8. package/src/controls/button.tsx +169 -169
  9. package/src/controls/centered.tsx +22 -22
  10. package/src/controls/date.tsx +39 -39
  11. package/src/controls/dropdown.tsx +51 -51
  12. package/src/controls/error-boundary.tsx +41 -41
  13. package/src/controls/field-editor.tsx +40 -40
  14. package/src/controls/file-upload.tsx +67 -67
  15. package/src/controls/horizontal.tsx +34 -34
  16. package/src/controls/input.tsx +60 -60
  17. package/src/controls/kwizoverflow.tsx +103 -102
  18. package/src/controls/list.tsx +117 -117
  19. package/src/controls/loading.tsx +10 -10
  20. package/src/controls/please-wait.tsx +32 -32
  21. package/src/controls/prompt.tsx +96 -96
  22. package/src/controls/search.tsx +65 -65
  23. package/src/controls/section.tsx +51 -51
  24. package/src/controls/svg.tsx +120 -120
  25. package/src/controls/toolbar.tsx +48 -48
  26. package/src/controls/vertical-content.tsx +49 -49
  27. package/src/controls/vertical.tsx +34 -34
  28. package/src/helpers/context.ts +39 -39
  29. package/src/helpers/hooks.tsx +335 -335
  30. package/src/index.ts +26 -25
  31. package/src/styles/styles.ts +87 -87
  32. package/src/styles/theme.ts +90 -90
  33. package/dist/_modules/build.d.ts +0 -2
  34. package/dist/_modules/build.js +0 -3
  35. package/dist/_modules/build.js.map +0 -1
  36. package/dist/_modules/config.d.ts +0 -1
  37. package/dist/_modules/config.js +0 -9
  38. package/dist/_modules/config.js.map +0 -1
  39. package/dist/_modules/constants.d.ts +0 -2
  40. package/dist/_modules/constants.js +0 -3
  41. package/dist/_modules/constants.js.map +0 -1
  42. package/dist/_modules/exports-index.d.ts +0 -1
  43. package/dist/_modules/exports-index.js +0 -2
  44. package/dist/_modules/exports-index.js.map +0 -1
  45. package/dist/controls/button.d.ts +0 -28
  46. package/dist/controls/button.js +0 -113
  47. package/dist/controls/button.js.map +0 -1
  48. package/dist/controls/centered.d.ts +0 -5
  49. package/dist/controls/centered.js +0 -14
  50. package/dist/controls/centered.js.map +0 -1
  51. package/dist/controls/date.d.ts +0 -8
  52. package/dist/controls/date.js +0 -32
  53. package/dist/controls/date.js.map +0 -1
  54. package/dist/controls/dropdown.d.ts +0 -29
  55. package/dist/controls/dropdown.js +0 -27
  56. package/dist/controls/dropdown.js.map +0 -1
  57. package/dist/controls/error-boundary.d.ts +0 -23
  58. package/dist/controls/error-boundary.js +0 -33
  59. package/dist/controls/error-boundary.js.map +0 -1
  60. package/dist/controls/exports-index.d.ts +0 -17
  61. package/dist/controls/exports-index.js +0 -18
  62. package/dist/controls/exports-index.js.map +0 -1
  63. package/dist/controls/field-editor.d.ts +0 -13
  64. package/dist/controls/field-editor.js +0 -15
  65. package/dist/controls/field-editor.js.map +0 -1
  66. package/dist/controls/file-upload.d.ts +0 -18
  67. package/dist/controls/file-upload.js +0 -41
  68. package/dist/controls/file-upload.js.map +0 -1
  69. package/dist/controls/horizontal.d.ts +0 -8
  70. package/dist/controls/horizontal.js +0 -23
  71. package/dist/controls/horizontal.js.map +0 -1
  72. package/dist/controls/input.d.ts +0 -13
  73. package/dist/controls/input.js +0 -43
  74. package/dist/controls/input.js.map +0 -1
  75. package/dist/controls/kwizoverflow.d.ts +0 -13
  76. package/dist/controls/kwizoverflow.js +0 -45
  77. package/dist/controls/kwizoverflow.js.map +0 -1
  78. package/dist/controls/list.d.ts +0 -21
  79. package/dist/controls/list.js +0 -72
  80. package/dist/controls/list.js.map +0 -1
  81. package/dist/controls/loading copy.d.ts +0 -5
  82. package/dist/controls/loading copy.js +0 -7
  83. package/dist/controls/loading copy.js.map +0 -1
  84. package/dist/controls/loading.d.ts +0 -5
  85. package/dist/controls/loading.js +0 -7
  86. package/dist/controls/loading.js.map +0 -1
  87. package/dist/controls/please-wait.d.ts +0 -18
  88. package/dist/controls/please-wait.js +0 -16
  89. package/dist/controls/please-wait.js.map +0 -1
  90. package/dist/controls/prompt.d.ts +0 -32
  91. package/dist/controls/prompt.js +0 -31
  92. package/dist/controls/prompt.js.map +0 -1
  93. package/dist/controls/search.d.ts +0 -13
  94. package/dist/controls/search.js +0 -47
  95. package/dist/controls/search.js.map +0 -1
  96. package/dist/controls/section.d.ts +0 -14
  97. package/dist/controls/section.js +0 -27
  98. package/dist/controls/section.js.map +0 -1
  99. package/dist/controls/svg.d.ts +0 -23
  100. package/dist/controls/svg.js +0 -45
  101. package/dist/controls/svg.js.map +0 -1
  102. package/dist/controls/toolbar.d.ts +0 -12
  103. package/dist/controls/toolbar.js +0 -23
  104. package/dist/controls/toolbar.js.map +0 -1
  105. package/dist/controls/vertical-content.d.ts +0 -6
  106. package/dist/controls/vertical-content.js +0 -37
  107. package/dist/controls/vertical-content.js.map +0 -1
  108. package/dist/controls/vertical.d.ts +0 -8
  109. package/dist/controls/vertical.js +0 -23
  110. package/dist/controls/vertical.js.map +0 -1
  111. package/dist/exports-index.d.ts +0 -3
  112. package/dist/exports-index.js +0 -4
  113. package/dist/exports-index.js.map +0 -1
  114. package/dist/helpers/context.d.ts +0 -26
  115. package/dist/helpers/context.js +0 -15
  116. package/dist/helpers/context.js.map +0 -1
  117. package/dist/helpers/hooks.d.ts +0 -62
  118. package/dist/helpers/hooks.js +0 -287
  119. package/dist/helpers/hooks.js.map +0 -1
  120. package/dist/index.d.ts +0 -24
  121. package/dist/index.js +0 -24
  122. package/dist/index.js.map +0 -1
  123. package/dist/styles/exports-index.d.ts +0 -2
  124. package/dist/styles/exports-index.js +0 -3
  125. package/dist/styles/exports-index.js.map +0 -1
  126. package/dist/styles/styles.d.ts +0 -19
  127. package/dist/styles/styles.js +0 -79
  128. package/dist/styles/styles.js.map +0 -1
  129. package/dist/styles/theme.d.ts +0 -6
  130. package/dist/styles/theme.js +0 -77
  131. package/dist/styles/theme.js.map +0 -1
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- interface IProps {
3
- }
4
- export declare const Loading: React.FunctionComponent<IProps>;
5
- export {};
@@ -1,7 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { LOGO_ANIM_SMALL } from '@kwiz/common';
3
- import { Centered } from './centered';
4
- export const Loading = (props) => {
5
- return (_jsx(Centered, { children: _jsx("img", { src: LOGO_ANIM_SMALL, alt: "loading", style: { width: '15vw' } }) }));
6
- };
7
- //# sourceMappingURL=loading.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"loading.js","sourceRoot":"","sources":["../../src/controls/loading.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAKtC,MAAM,CAAC,MAAM,OAAO,GAAoC,CAAC,KAAK,EAAE,EAAE;IAC9D,OAAO,CACH,KAAC,QAAQ,cAAC,cAAK,GAAG,EAAE,eAAe,EAAE,GAAG,EAAC,SAAS,EAAC,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,GAAI,GAAW,CAC7F,CAAC;AACN,CAAC,CAAA"}
@@ -1,18 +0,0 @@
1
- import React from 'react';
2
- import { IPrompterProps } from './prompt';
3
- interface IProps {
4
- step?: number;
5
- max?: number;
6
- /** do not wrap in a dialog */
7
- contentOnly?: boolean;
8
- cancelText?: string;
9
- onCancel?: () => void;
10
- label?: string;
11
- }
12
- export declare const PleaseWait: React.FunctionComponent<React.PropsWithChildren<IProps>>;
13
- export declare const PleaseWaitPrompt: (props: {
14
- message: string;
15
- step?: number;
16
- max?: number;
17
- }) => IPrompterProps;
18
- export {};
@@ -1,16 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Field, ProgressBar } from '@fluentui/react-components';
3
- import { isFunction } from '@kwiz/common';
4
- import { Prompter } from './prompt';
5
- export const PleaseWait = (props) => {
6
- const field = _jsx(Field, { validationMessage: props.label || "please wait...", validationState: "none", children: _jsx(ProgressBar, { value: props.step, max: props.max }) });
7
- return (props.contentOnly
8
- ? field
9
- : _jsx(Prompter, { hideOk: true, hideCancel: !isFunction(props.onCancel), cancelButtonText: props.cancelText || 'cancel', onCancel: props.onCancel, children: field }));
10
- };
11
- export const PleaseWaitPrompt = (props) => ({
12
- //title: 'please wait...',
13
- hideOk: true, hideCancel: true,
14
- children: _jsx(Field, { validationMessage: props.message, validationState: "none", children: _jsx(ProgressBar, { value: props.step, max: props.max }) })
15
- });
16
- //# sourceMappingURL=please-wait.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"please-wait.js","sourceRoot":"","sources":["../../src/controls/please-wait.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAkB,QAAQ,EAAE,MAAM,UAAU,CAAC;AAUpD,MAAM,CAAC,MAAM,UAAU,GAA6D,CAAC,KAAK,EAAE,EAAE;IAC1F,MAAM,KAAK,GAAG,KAAC,KAAK,IAAC,iBAAiB,EAAE,KAAK,CAAC,KAAK,IAAI,gBAAgB,EAAE,eAAe,EAAC,MAAM,YAC3F,KAAC,WAAW,IAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,GAAI,GAC9C,CAAC;IACT,OAAO,CAAC,KAAK,CAAC,WAAW;QACrB,CAAC,CAAC,KAAK;QACP,CAAC,CAAC,KAAC,QAAQ,IAAC,MAAM,QACd,UAAU,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,QAAQ,CAAC,EACvC,gBAAgB,EAAE,KAAK,CAAC,UAAU,IAAI,QAAQ,EAC9C,QAAQ,EAAE,KAAK,CAAC,QAAQ,YAAG,KAAK,GAAY,CACnD,CAAC;AACN,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAAwD,EAAkB,EAAE,CAAC,CAAC;IAC3G,0BAA0B;IAC1B,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI;IAC9B,QAAQ,EAAE,KAAC,KAAK,IAAC,iBAAiB,EAAE,KAAK,CAAC,OAAO,EAAE,eAAe,EAAC,MAAM,YACrE,KAAC,WAAW,IAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,GAAI,GAC9C;CACX,CAAC,CAAC"}
@@ -1,32 +0,0 @@
1
- import { DialogModalType } from '@fluentui/react-components';
2
- import React from 'react';
3
- import { ButtonEXProps } from './button';
4
- export interface IPrompterProps {
5
- hideOk?: boolean;
6
- hideCancel?: boolean;
7
- showCancelInTitle?: boolean;
8
- /** return false to prevent closing the dialog. */
9
- onOK?: () => Promise<void> | void;
10
- onCancel?: () => void;
11
- okButtonText?: string;
12
- cancelButtonText?: string;
13
- title?: string | JSX.Element;
14
- okButtonProps?: Partial<ButtonEXProps>;
15
- cancelButtonProps?: Partial<ButtonEXProps>;
16
- children?: JSX.Element;
17
- /** allow to epand the dialog to be wider */
18
- maxWidth?: number | string;
19
- /** additional button actions at the bottom */
20
- actions?: JSX.Element[];
21
- /** dialog title actions */
22
- titleActions?: JSX.Element[];
23
- /** specify a specific mount node for this dialog */
24
- mountNode?: HTMLElement | null | {
25
- element?: HTMLElement | null;
26
- className?: string;
27
- };
28
- modalType?: DialogModalType;
29
- /** do not fire ok/cancel on esc/enter press */
30
- disableKeyboardActions?: boolean;
31
- }
32
- export declare const Prompter: React.ForwardRefExoticComponent<IPrompterProps & React.RefAttributes<HTMLDivElement>>;
@@ -1,31 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Dialog, DialogActions, DialogBody, DialogContent, DialogSurface, DialogTitle, DialogTrigger } from '@fluentui/react-components';
3
- import { DismissRegular } from '@fluentui/react-icons';
4
- import { isNotEmptyArray, isNullOrEmptyString } from '@kwiz/common';
5
- import React from 'react';
6
- import { useKWIZFluentContext } from '../helpers/context';
7
- import { useKeyDown } from '../helpers/hooks';
8
- import { ButtonEX, ButtonEXSecondary } from './button';
9
- export const Prompter = React.forwardRef((props, ref) => {
10
- const ctx = useKWIZFluentContext();
11
- const disableKeyboardActions = React.useRef(props.disableKeyboardActions);
12
- disableKeyboardActions.current = props.disableKeyboardActions;
13
- let okProps = Object.assign(Object.assign({}, (props.okButtonProps || {})), { onClick: () => props.onOK(), title: props.okButtonText || 'yes' });
14
- let cancelProps = Object.assign(Object.assign({}, (props.cancelButtonProps || {})), { onClick: () => props.onCancel(), title: props.cancelButtonText || 'no' });
15
- useKeyDown({
16
- onEnter: () => !disableKeyboardActions.current && props.onOK(),
17
- onEscape: () => !disableKeyboardActions.current && props.onCancel(),
18
- });
19
- const actions = [];
20
- if (!props.hideOk)
21
- actions.push(_jsx(DialogTrigger, { disableButtonEnhancement: true, children: _jsx(ButtonEXSecondary, Object.assign({}, okProps)) }, 'ok'));
22
- if (!props.hideCancel)
23
- actions.push(_jsx(DialogTrigger, { disableButtonEnhancement: true, children: _jsx(ButtonEXSecondary, Object.assign({}, cancelProps)) }, 'cancel'));
24
- if (isNotEmptyArray(props.actions))
25
- actions.push(...props.actions);
26
- const titleActions = props.titleActions ? [...props.titleActions] : [];
27
- if (props.showCancelInTitle)
28
- titleActions.push(_jsx(DialogTrigger, { disableButtonEnhancement: true, children: _jsx(ButtonEX, Object.assign({}, cancelProps, { icon: _jsx(DismissRegular, {}) })) }, 'cancel'));
29
- return (_jsx(Dialog, { open: true, modalType: props.modalType, children: _jsx(DialogSurface, { mountNode: props.mountNode || ctx.mountNode, style: !isNullOrEmptyString(props.maxWidth) ? { maxWidth: props.maxWidth } : undefined, children: _jsxs(DialogBody, { children: [(!isNullOrEmptyString(props.title) || isNotEmptyArray(titleActions)) && _jsx(DialogTitle, { action: titleActions, children: props.title }), _jsx(DialogContent, { ref: ref, children: props.children }), isNotEmptyArray(actions) && _jsx(DialogActions, { fluid: actions.length > 2, children: actions })] }) }) }));
30
- });
31
- //# sourceMappingURL=prompt.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"prompt.js","sourceRoot":"","sources":["../../src/controls/prompt.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,aAAa,EAAmB,aAAa,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC1J,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAiB,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAkCtE,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAAmC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACtF,MAAM,GAAG,GAAG,oBAAoB,EAAE,CAAC;IACnC,MAAM,sBAAsB,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC;IAC1E,sBAAsB,CAAC,OAAO,GAAG,KAAK,CAAC,sBAAsB,CAAC;IAE9D,IAAI,OAAO,mCACJ,CAAC,KAAK,CAAC,aAAoB,IAAI,EAAE,CAAC,KACrC,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,EAC3B,KAAK,EAAE,KAAK,CAAC,YAAY,IAAI,KAAK,GACrC,CAAC;IACF,IAAI,WAAW,mCACR,CAAC,KAAK,CAAC,iBAAwB,IAAI,EAAE,CAAC,KACzC,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,Q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C,SAAS,IAAI,GAAG,CAAC,SAAS,EACtD,KAAK,EAAE,CAAC,mBAAmB,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS,YACtF,MAAC,UAAU,eACN,CAAC,CAAC,mBAAmB,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,eAAe,CAAC,YAAY,CAAC,CAAC,IAAI,KAAC,WAAW,IACjF,MAAM,EAAE,YAAY,YACtB,KAAK,CAAC,KAAK,GAAe,EAC5B,KAAC,aAAa,IAAC,GAAG,EAAE,GAAG,YAClB,KAAK,CAAC,QAAQ,GACH,EACf,eAAe,CAAC,OAAO,CAAC,IAAI,KAAC,aAAa,IAAC,KAAK,EAAE,OAAO,CAAC,MAAM,GAAG,CAAC,YAChE,OAAO,GACI,IACP,GACD,GACX,CACZ,CAAC;AACN,CAAC,CAAC,CAAC"}
@@ -1,13 +0,0 @@
1
- import { InputProps } from '@fluentui/react-components';
2
- import React from 'react';
3
- interface IProps extends InputProps {
4
- main?: boolean;
5
- delay?: number;
6
- /** if changing the value in the caller - change this prop to reset */
7
- resetValue?: string;
8
- onChangeDeferred?: (newValue: string) => void;
9
- onChangeSync?: (newValue: string) => void;
10
- }
11
- /** value is set on first load. to change the value after it was first set - change the compoenet's key. */
12
- export declare const Search: React.FunctionComponent<React.PropsWithChildren<IProps>>;
13
- export {};
@@ -1,47 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Input, makeStyles } from '@fluentui/react-components';
3
- import { DismissRegular, SearchRegular } from "@fluentui/react-icons";
4
- import { debounce, isFunction, isNullOrEmptyString } from '@kwiz/common';
5
- import React, { useState } from 'react';
6
- import { GetLogger } from '../_modules/config';
7
- import { useStateEX } from '../helpers/hooks';
8
- import { mixins } from '../styles/styles';
9
- const logger = GetLogger("Search");
10
- const useStyles = makeStyles({
11
- main: mixins.main,
12
- clickable: mixins.clickable,
13
- });
14
- /** value is set on first load. to change the value after it was first set - change the compoenet's key. */
15
- export const Search = (props) => {
16
- const cssNames = useStyles();
17
- const [resetKey, setResetKey] = useState(1);
18
- let delay = props.delay || 1;
19
- //cannot call debounce every render, since it won't be the same debounced instance...
20
- var notifyParent = React.useMemo(() => debounce(v => {
21
- logger.log(`Set: ${v}`);
22
- props.onChangeDeferred(v);
23
- }, delay * 1000), [delay]);
24
- let [value, setValue] = useStateEX(props.value, {
25
- onChange: newValue => {
26
- if (isFunction(props.onChangeSync))
27
- props.onChangeSync(newValue);
28
- if (isFunction(props.onChangeDeferred))
29
- notifyParent(newValue);
30
- return newValue;
31
- }
32
- });
33
- //once props change, reset this control value to match
34
- React.useEffect(() => {
35
- setValue(props.resetValue);
36
- //todo: bug: setting value does not sync into the text box
37
- setResetKey(resetKey + 1);
38
- }, [props.resetValue]);
39
- return (_jsx(Input, Object.assign({}, props, { value: value, onChange: (e, data) => setValue(data.value), className: props.main ? cssNames.main : undefined, contentBefore: !isNullOrEmptyString(value) ? undefined : _jsx(SearchRegular, {}), contentAfter: isNullOrEmptyString(value)
40
- ? undefined
41
- : _jsx(DismissRegular, { className: cssNames.clickable, onClick: () => {
42
- setValue("");
43
- //todo: bug: setting value does not sync into the text box
44
- setResetKey(resetKey + 1);
45
- } }) }), resetKey));
46
- };
47
- //# sourceMappingURL=search.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"search.js","sourceRoot":"","sources":["../../src/controls/search.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAc,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MA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,CAAC,CAAC;IAEH,sDAAsD;IACtD,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACjB,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QAC3B,0DAA0D;QAC1D,WAAW,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAA;IAC7B,CAAC,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;IAEvB,OAAO,CACH,KAAC,KAAK,oBAAoB,KAAK,IAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,EACtF,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EACjD,aAAa,EAAE,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAC,aAAa,KAAG,EAC1E,YAAY,EAAE,mBAAmB,CAAC,KAAK,CAAC;YACpC,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,KAAC,cAAc,IAAC,SAAS,EAAE,QAAQ,CAAC,SAAS,EAAE,OAAO,EAAE,GAAG,EAAE;oBAC3D,QAAQ,CAAC,EAAE,CAAC,CAAC;oBACb,0DAA0D;oBAC1D,WAAW,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAA;gBAC7B,CAAC,GAAI,KATD,QAAQ,CAUZ,CACX,CAAC;AACN,CAAC,CAAA"}
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
- export interface ISectionProps {
3
- main?: boolean;
4
- css?: string[];
5
- style?: React.CSSProperties;
6
- onClick?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
7
- rootProps?: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
8
- title?: string;
9
- left?: boolean;
10
- right?: boolean;
11
- }
12
- export declare const Section: React.ForwardRefExoticComponent<ISectionProps & {
13
- children?: React.ReactNode | undefined;
14
- } & React.RefAttributes<HTMLDivElement>>;
@@ -1,27 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { makeStyles, mergeClasses, tokens } from '@fluentui/react-components';
3
- import { isFunction, isNotEmptyArray } from '@kwiz/common';
4
- import React from 'react';
5
- import { KnownClassNames, mixins } from '../styles/styles';
6
- const useStyles = makeStyles({
7
- main: mixins.main,
8
- clickable: mixins.clickable,
9
- left: Object.assign(Object.assign({}, mixins.float), { float: "left", marginRight: tokens.spacingHorizontalXXL }),
10
- right: Object.assign(Object.assign({}, mixins.float), { float: "right", marginRight: tokens.spacingHorizontalXXL })
11
- });
12
- export const Section = React.forwardRef((props, ref) => {
13
- const cssNames = useStyles();
14
- let css = [KnownClassNames.section];
15
- if (props.main)
16
- css.push(cssNames.main);
17
- if (isFunction(props.onClick))
18
- css.push(cssNames.clickable);
19
- if (props.left)
20
- css.push(cssNames.left);
21
- else if (props.right)
22
- css.push(cssNames.right);
23
- if (isNotEmptyArray(props.css))
24
- css.push(...props.css);
25
- return (_jsx("div", Object.assign({ ref: ref }, (props.rootProps || {}), { title: props.title, style: props.style, className: mergeClasses(...css), onClick: props.onClick, children: props.children })));
26
- });
27
- //# sourceMappingURL=section.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"section.js","sourceRoot":"","sources":["../../src/controls/section.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE3D,MAAM,SAAS,GAAG,UAAU,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC,IAAI;IACjB,SAAS,EAAE,MAAM,CAA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N,CAAC,CAAC,CAAC"}
@@ -1,23 +0,0 @@
1
- import React from 'react';
2
- interface IProps {
3
- size: number;
4
- }
5
- export declare const YouTubeIcon: React.FunctionComponent<React.PropsWithChildren<IProps>>;
6
- export declare const MermaidIcon: React.FunctionComponent<React.PropsWithChildren<IProps>>;
7
- export declare const TeamsIcon: React.FunctionComponent<React.PropsWithChildren<IProps>>;
8
- export declare const SVGLinkIcon: (props: {
9
- size: number;
10
- }) => import("react/jsx-runtime").JSX.Element;
11
- export declare const SVGSplitIcon: (props: {
12
- size: number;
13
- }) => import("react/jsx-runtime").JSX.Element;
14
- export declare const HubSpotIcon: (props: {
15
- size: number;
16
- }) => import("react/jsx-runtime").JSX.Element;
17
- export declare const GetSVGLinkIcon: (props: {
18
- size: number;
19
- }) => string;
20
- export declare const GetSVGSplitIcon: (props: {
21
- size: number;
22
- }) => string;
23
- export {};
@@ -1,45 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { tokens } from '@fluentui/react-components';
3
- export const YouTubeIcon = (props) => {
4
- return (_jsx("svg", { height: `${props.size}px`, width: `${props.size}px`, version: "1.1", id: "Layer_1", xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", viewBox: "0 0 461.001 461.001", xmlSpace: "preserve", children: _jsx("g", { children: _jsx("path", { style: { fill: "#F61C0D" }, d: "M365.257,67.393H95.744C42.866,67.393,0,110.259,0,163.137v134.728\r\nc0,52.878,42.866,95.744,95.744,95.744h269.513c52.878,0,95.744-42.866,95.744-95.744V163.137\r\nC461.001,110.259,418.135,67.393,365.257,67.393z M300.506,237.056l-126.06,60.123c-3.359,1.602-7.239-0.847-7.239-4.568V168.607\r\nc0-3.774,3.982-6.22,7.348-4.514l126.06,63.881C304.363,229.873,304.298,235.248,300.506,237.056z" }) }) }));
5
- };
6
- export const MermaidIcon = (props) => {
7
- return (_jsxs("svg", { height: `${props.size}px`, width: `${props.size}px`, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 490.16 490.16", children: [_jsx("defs", { children: _jsx("style", { children: `.mm-cls-1{fill:#ff3670;}.mm-cls-2{fill:#fff;}` }) }), _jsx("rect", { className: "mm-cls-1", width: "490.16", height: "490.16", rx: "84.61" }), _jsx("path", { className: "mm-cls-2", d: "M407.48,111.18A165.2,165.2,0,0,0,245.08,220,165.2,165.2,0,0,0,82.68,111.18a165.5,165.5,0,0,0,72.06,143.64,88.81,88.81,0,0,1,38.53,73.45v50.86H296.9V328.27a88.8,88.8,0,0,1,38.52-73.45,165.41,165.41,0,0,0,72.06-143.64Z" }), _jsx("path", { className: "mm-cls-2", d: "M160.63,328.27a56.09,56.09,0,0,0-24.27-46.49,198.74,198.74,0,0,1-28.54-23.66A196.87,196.87,0,0,1,82.53,227V379.13h78.1Z" }), _jsx("path", { className: "mm-cls-2", d: "M329.53,328.27a56.09,56.09,0,0,1,24.27-46.49,198.74,198.74,0,0,0,28.54-23.66A196.87,196.87,0,0,0,407.63,227V379.13h-78.1Z" })] }));
8
- };
9
- export const TeamsIcon = (props) => {
10
- return (_jsxs("svg", { height: `${props.size}px`, width: `${props.size}px`, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 2228.833 2073.333", children: [_jsx("path", { fill: "#5059C9", d: "M1554.637,777.5h575.713c54.391,0,98.483,44.092,98.483,98.483c0,0,0,0,0,0v524.398 c0,199.901-162.051,361.952-361.952,361.952h0h-1.711c-199.901,0.028-361.975-162-362.004-361.901c0-0.017,0-0.034,0-0.052V828.971 C1503.167,800.544,1526.211,777.5,1554.637,777.5L1554.637,777.5z" }), _jsx("circle", { fill: "#5059C9", cx: "1943.75", cy: "440.583", r: "233.25" }), _jsx("circle", { fill: "#7B83EB", cx: "1218.083", cy: "336.917", r: "336.917" }), _jsx("path", { fill: "#7B83EB", d: "M1667.323,777.5H717.01c-53.743,1.33-96.257,45.931-95.01,99.676v598.105 c-7.505,322.519,247.657,590.16,570.167,598.053c322.51-7.893,577.671-275.534,570.167-598.053V877.176 C1763.579,823.431,1721.066,778.83,1667.323,777.5z" }), _jsx("path", { opacity: ".1", d: "M1244,777.5v838.145c-0.258,38.435-23.549,72.964-59.09,87.598 c-11.316,4.787-23.478,7.254-35.765,7.257H667.613c-6.738-17.105-12.958-34.21-18.142-51.833 c-18.144-59.477-27.402-121.307-27.472-183.49V877.02c-1.246-53.659,41.198-98.19,94.855-99.52H1244z" }), _jsx("path", { opacity: ".2", d: "M1192.167,777.5v889.978c-0.002,12.287-2.47,24.449-7.257,35.765 c-14.634,35.541-49.163,58.833-87.598,59.09H691.975c-8.812-17.105-17.105-34.21-24.362-51.833 c-7.257-17.623-12.958-34.21-18.142-51.833c-18.144-59.476-27.402-121.307-27.472-183.49V877.02 c-1.246-53.659,41.198-98.19,94.855-99.52H1192.167z" }), _jsx("path", { opacity: ".2", d: "M1192.167,777.5v786.312c-0.395,52.223-42.632,94.46-94.855,94.855h-447.84 c-18.144-59.476-27.402-121.307-27.472-183.49V877.02c-1.246-53.659,41.198-98.19,94.855-99.52H1192.167z" }), _jsx("path", { opacity: ".2", d: "M1140.333,777.5v786.312c-0.395,52.223-42.632,94.46-94.855,94.855H649.472 c-18.144-59.476-27.402-121.307-27.472-183.49V877.02c-1.246-53.659,41.198-98.19,94.855-99.52H1140.333z" }), _jsx("path", { opacity: ".1", d: "M1244,509.522v163.275c-8.812,0.518-17.105,1.037-25.917,1.037 c-8.812,0-17.105-0.518-25.917-1.037c-17.496-1.161-34.848-3.937-51.833-8.293c-104.963-24.857-191.679-98.469-233.25-198.003 c-7.153-16.715-12.706-34.071-16.587-51.833h258.648C1201.449,414.866,1243.801,457.217,1244,509.522z" }), _jsx("path", { opacity: ".2", d: "M1192.167,561.355v111.442c-17.496-1.161-34.848-3.937-51.833-8.293 c-104.963-24.857-191.679-98.469-233.25-198.003h190.228C1149.616,466.699,1191.968,509.051,1192.167,561.355z" }), _jsx("path", { opacity: ".2", d: "M1192.167,561.355v111.442c-17.496-1.161-34.848-3.937-51.833-8.293 c-104.963-24.857-191.679-98.469-233.25-198.003h190.228C1149.616,466.699,1191.968,509.051,1192.167,561.355z" }), _jsx("path", { opacity: ".2", d: "M1140.333,561.355v103.148c-104.963-24.857-191.679-98.469-233.25-198.003 h138.395C1097.783,466.699,1140.134,509.051,1140.333,561.355z" }), _jsxs("linearGradient", { id: "a", gradientUnits: "userSpaceOnUse", x1: "198.099", y1: "1683.0726", x2: "942.2344", y2: "394.2607", gradientTransform: "matrix(1 0 0 -1 0 2075.3333)", children: [_jsx("stop", { offset: "0", stopColor: "#5a62c3" }), _jsx("stop", { offset: ".5", stopColor: "#4d55bd" }), _jsx("stop", { offset: "1", stopColor: "#3940ab" })] }), _jsx("path", { fill: "url(#a)", d: "M95.01,466.5h950.312c52.473,0,95.01,42.538,95.01,95.01v950.312c0,52.473-42.538,95.01-95.01,95.01 H95.01c-52.473,0-95.01-42.538-95.01-95.01V561.51C0,509.038,42.538,466.5,95.01,466.5z" }), _jsx("path", { fill: "#FFF", d: "M820.211,828.193H630.241v517.297H509.211V828.193H320.123V727.844h500.088V828.193z" })] }));
11
- };
12
- export const SVGLinkIcon = (props) => {
13
- return (_jsx("svg", { fill: tokens.colorNeutralForeground1, height: `${props.size}px`, width: `${props.size}px`, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 490.16 490.16", children: _jsx("g", { children: _jsxs("g", { children: [_jsx("path", { d: "M409.657,32.474c-43.146-43.146-113.832-43.146-156.978,0l-84.763,84.762c29.07-8.262,60.589-6.12,88.129,6.732\r\n\t\t\tl44.063-44.064c17.136-17.136,44.982-17.136,62.118,0c17.136,17.136,17.136,44.982,0,62.118l-55.386,55.386l-36.414,36.414\r\n\t\t\tc-17.136,17.136-44.982,17.136-62.119,0l-47.43,47.43c11.016,11.017,23.868,19.278,37.332,24.48\r\n\t\t\tc36.415,14.382,78.643,8.874,110.467-16.219c3.06-2.447,6.426-5.201,9.18-8.262l57.222-57.222l34.578-34.578\r\n\t\t\tC453.109,146.306,453.109,75.926,409.657,32.474z" }), _jsx("path", { d: "M184.135,320.114l-42.228,42.228c-17.136,17.137-44.982,17.137-62.118,0c-17.136-17.136-17.136-44.981,0-62.118\r\n\t\t\tl91.8-91.799c17.136-17.136,44.982-17.136,62.119,0l47.43-47.43c-11.016-11.016-23.868-19.278-37.332-24.48\r\n\t\t\tc-38.25-15.3-83.232-8.262-115.362,20.502c-1.53,1.224-3.06,2.754-4.284,3.978l-91.8,91.799\r\n\t\t\tc-43.146,43.146-43.146,113.832,0,156.979c43.146,43.146,113.832,43.146,156.978,0l82.927-83.845\r\n\t\t\tC230.035,335.719,220.243,334.496,184.135,320.114z" })] }) }) }));
14
- };
15
- export const SVGSplitIcon = (props) => {
16
- return _jsx("svg", { fill: tokens.colorNeutralForeground1, height: `${props.size}px`, width: `${props.size}px`, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 17 17", children: _jsx("path", { d: "M10.646 13.146l0.707 0.707-2.853 2.854-2.854-2.854 0.707-0.707 1.647 1.647v-3.772h1v3.772l1.646-1.647zM8 2.207v3.772h1v-3.772l1.646 1.646 0.707-0.707-2.853-2.853-2.854 2.853 0.707 0.707 1.647-1.646zM0 8v1h17v-1h-17z" }) });
17
- };
18
- export const HubSpotIcon = (props) => {
19
- return _jsx("svg", { fill: tokens.colorNeutralForeground1, height: `${props.size}px`, width: `${props.size}px`, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", children: _jsx("path", { d: "M267.4 211.6c-25.1 23.7-40.8 57.3-40.8 94.6 0 29.3 9.7 56.3 26 78L203.1 434c-4.4-1.6-9.1-2.5-14-2.5-10.8 0-20.9 4.2-28.5 11.8-7.6 7.6-11.8 17.8-11.8 28.6s4.2 20.9 11.8 28.5c7.6 7.6 17.8 11.6 28.5 11.6 10.8 0 20.9-3.9 28.6-11.6 7.6-7.6 11.8-17.8 11.8-28.5 0-4.2-.6-8.2-1.9-12.1l50-50.2c22 16.9 49.4 26.9 79.3 26.9 71.9 0 130-58.3 130-130.2 0-65.2-47.7-119.2-110.2-128.7V116c17.5-7.4 28.2-23.8 28.2-42.9 0-26.1-20.9-47.9-47-47.9S311.2 47 311.2 73.1c0 19.1 10.7 35.5 28.2 42.9v61.2c-15.2 2.1-29.6 6.7-42.7 13.6-27.6-20.9-117.5-85.7-168.9-124.8 1.2-4.4 2-9 2-13.8C129.8 23.4 106.3 0 77.4 0 48.6 0 25.2 23.4 25.2 52.2c0 28.9 23.4 52.3 52.2 52.3 9.8 0 18.9-2.9 26.8-7.6l163.2 114.7zm89.5 163.6c-38.1 0-69-30.9-69-69s30.9-69 69-69 69 30.9 69 69-30.9 69-69 69z" }) });
20
- };
21
- //get icons as html
22
- export const GetSVGLinkIcon = (props) => {
23
- return (`<svg fill="${tokens.colorNeutralForeground1}" height="${props.size}px" width="${props.size}px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 490.16 490.16">
24
- <g>
25
- <g>
26
- <path d="M409.657,32.474c-43.146-43.146-113.832-43.146-156.978,0l-84.763,84.762c29.07-8.262,60.589-6.12,88.129,6.732
27
- l44.063-44.064c17.136-17.136,44.982-17.136,62.118,0c17.136,17.136,17.136,44.982,0,62.118l-55.386,55.386l-36.414,36.414
28
- c-17.136,17.136-44.982,17.136-62.119,0l-47.43,47.43c11.016,11.017,23.868,19.278,37.332,24.48
29
- c36.415,14.382,78.643,8.874,110.467-16.219c3.06-2.447,6.426-5.201,9.18-8.262l57.222-57.222l34.578-34.578
30
- C453.109,146.306,453.109,75.926,409.657,32.474z"/>
31
- <path d="M184.135,320.114l-42.228,42.228c-17.136,17.137-44.982,17.137-62.118,0c-17.136-17.136-17.136-44.981,0-62.118
32
- l91.8-91.799c17.136-17.136,44.982-17.136,62.119,0l47.43-47.43c-11.016-11.016-23.868-19.278-37.332-24.48
33
- c-38.25-15.3-83.232-8.262-115.362,20.502c-1.53,1.224-3.06,2.754-4.284,3.978l-91.8,91.799
34
- c-43.146,43.146-43.146,113.832,0,156.979c43.146,43.146,113.832,43.146,156.978,0l82.927-83.845
35
- C230.035,335.719,220.243,334.496,184.135,320.114z"/>
36
- </g>
37
- </g>
38
- </svg>`);
39
- };
40
- export const GetSVGSplitIcon = (props) => {
41
- return `<svg fill="${tokens.colorNeutralForeground1}" height="${props.size}px" width="${props.size}px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 17 17">
42
- <path d="M10.646 13.146l0.707 0.707-2.853 2.854-2.854-2.854 0.707-0.707 1.647 1.647v-3.772h1v3.772l1.646-1.647zM8 2.207v3.772h1v-3.772l1.646 1.646 0.707-0.707-2.853-2.853-2.854 2.853 0.707 0.707 1.647-1.646zM0 8v1h17v-1h-17z" />
43
- </svg>`;
44
- };
45
- //# sourceMappingURL=svg.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"svg.js","sourceRoot":"","sources":["../../src/controls/svg.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAMpD,MAAM,CAAC,MAAM,WAAW,GAA6D,CAAC,KAAK,EAAE,EAAE;IAC3F,OAAO,CACH,cAAK,MAAM,EAAE,GAAG,KAAK,CAAC,IAAI,IAAI,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC,IAAI,IAAI,EAAE,OAAO,EAAC,KAAK,EAAC,EAAE,EAAC,SAAS,EAAC,KAAK,EAAC,4BAA4B,EAAC,UAAU,EAAC,8BAA8B,EAC7J,OAAO,EAAC,qBAAqB,EAAC,QAAQ,EAAC,UAAU,YACjD,sBACI,eAAM,KAAK,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,CAAC,EAAC,kYAG2C,GAAE,GACjF,GACF,CACT,CAAC;AACN,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,WAAW,GAA6D,CAAC,KAAK,EAAE,EAAE;IAC3F,OAAO,CACH,eAAK,MAAM,EAAE,GAAG,KAAK,CAAC,IAAI,IAAI,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC,IAAI,IAAI,EAAE,KAAK,EA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,KAAuB,EAAE,EAAE;IACpD,OAAO,cAAK,IAAI,EAAE,MAAM,CAAC,uBAAuB,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC,IAAI,IAAI,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC,IAAI,IAAI,EAAE,KAAK,EAAC,4BAA4B,EAAC,OAAO,EAAC,WAAW,YACzJ,eAAM,CAAC,EAAC,yNAAyN,GAAG,GAClO,CAAC;AACX,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAuB,EAAE,EAAE;IACnD,OAAO,cAAK,IAAI,EAAE,MAAM,CAAC,uBAAuB,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC,IAAI,IAAI,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC,IAAI,IAAI,EAAE,KAAK,EAAC,4BAA4B,EAAC,OAAO,EAAC,aAAa,YAC3J,eAAM,CAAC,EAAC,kvBAAkvB,GAAG,GAC3vB,CAAC;AACX,CAAC,CAAA;AAGD,mBAAmB;AACnB,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAuB,EAAE,EAAE;IACtD,OAAO,CACH,cAAc,MAAM,CAAC,uBAAuB,aAAa,KAAK,CAAC,IAAI,cAAc,KAAK,CAAC,IAAI;;;;;;;;;;;;;;;eAepF,CACV,CAAC;AACN,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,KAAuB,EAAE,EAAE;IACvD,OAAO,cAAc,MAAM,CAAC,uBAAuB,aAAa,KAAK,CAAC,IAAI,cAAc,KAAK,CAAC,IAAI;;OAE/F,CAAC;AACR,CAAC,CAAA"}
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- interface IProps {
3
- /** toolbar buttons that may render or render in overflow */
4
- buttonGroups: {
5
- elm: JSX.Element;
6
- overflowElement?: JSX.Element;
7
- }[][];
8
- /** side buttons that will always render, never overflow */
9
- sideButtons?: JSX.Element;
10
- }
11
- export declare const ToolbarEX: React.FunctionComponent<IProps>;
12
- export {};
@@ -1,23 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Toolbar, ToolbarDivider, ToolbarGroup } from '@fluentui/react-components';
3
- import { useCommonStyles } from '../styles/styles';
4
- import { KWIZOverflow } from './kwizoverflow';
5
- export const ToolbarEX = (props) => {
6
- const commonCssNames = useCommonStyles();
7
- let elements = [];
8
- props.buttonGroups.forEach((group, groupIndex) => {
9
- group.forEach((button, buttonIndex) => {
10
- const mapped = Object.assign(Object.assign({}, button), { id: `m${groupIndex}-${buttonIndex}` });
11
- if (buttonIndex === 0 && groupIndex > 0 && props.buttonGroups[groupIndex - 1].length > 0) {
12
- //first button, not first group, and previous group was not empty
13
- //add divider
14
- mapped.overflowElement = mapped.overflowElement || mapped.elm;
15
- //this way if button rendes it is with the divider, but if it is in overflow - there will be no divider
16
- mapped.elm = _jsxs("span", { children: [_jsx(ToolbarDivider, { style: { display: 'inline-flex' } }), mapped.elm] });
17
- }
18
- elements.push(mapped);
19
- });
20
- });
21
- return (_jsx(KWIZOverflow, { className: commonCssNames.printHide, items: elements, getKey: e => e.id, renderItem: (e, i, overflow) => overflow && e.overflowElement || e.elm, getPriority: e => e.priority || -1, groupWrapper: children => _jsxs(Toolbar, { "aria-label": "Default", style: { justifyContent: "space-between" }, children: [_jsx(ToolbarGroup, { role: "presentation", children: children }), _jsx(ToolbarGroup, { role: "presentation", children: props.sideButtons })] }) }));
22
- };
23
- //# sourceMappingURL=toolbar.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"toolbar.js","sourceRoot":"","sources":["../../src/controls/toolbar.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAEnF,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAQ9C,MAAM,CAAC,MAAM,SAAS,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YAAY,EAAE,QAAQ,CAAC,EAAE,CAAC,MAAC,OAAO,kBAAY,SAAS,EAAC,KAAK,EAAE,EAAE,cAAc,EAAE,eAAe,EAAE,aAC9F,KAAC,YAAY,IAAC,IAAI,EAAC,cAAc,YAC5B,QAAQ,GACE,EACf,KAAC,YAAY,IAAC,IAAI,EAAC,cAAc,YAC5B,KAAK,CAAC,WAAW,GACP,IACT,GACZ,CAAC,CAAC;AACZ,CAAC,CAAA"}
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- interface IProps {
3
- css?: string[];
4
- }
5
- export declare const VerticalContent: React.FunctionComponent<React.PropsWithChildren<IProps>>;
6
- export {};
@@ -1,37 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { makeStyles, mergeClasses } from '@fluentui/react-components';
3
- import { isNotEmptyArray } from '@kwiz/common';
4
- import React from 'react';
5
- import { useWindowSize } from '../helpers/hooks';
6
- const useStyles = makeStyles({
7
- verticalContainer: {
8
- position: "relative",
9
- ['& > div']: {
10
- position: "absolute",
11
- transform: "rotate(90deg)"
12
- }
13
- }
14
- });
15
- export const VerticalContent = (props) => {
16
- const classes = useStyles();
17
- let css = [classes.verticalContainer];
18
- const size = useWindowSize();
19
- let div = React.useRef();
20
- let rotate = React.useRef();
21
- if (isNotEmptyArray(props.css))
22
- css.push(...props.css);
23
- React.useEffect(() => {
24
- if (div.current && rotate.current) {
25
- let rootDiv = div.current;
26
- let rotateDiv = rotate.current;
27
- rootDiv.style.height = `${rotateDiv.clientWidth}px`;
28
- rootDiv.style.width = `${rotateDiv.clientHeight}px`;
29
- rootDiv.style.minHeight = `${rotateDiv.clientWidth}px`;
30
- rootDiv.style.minWidth = `${rotateDiv.clientHeight}px`;
31
- rotateDiv.style.top = `${(rotateDiv.clientWidth - rotateDiv.clientHeight) / 2}px`;
32
- rotateDiv.style.left = `-${(rotateDiv.clientWidth - rotateDiv.clientHeight) / 2}px`;
33
- }
34
- }, [div, rotate, size.height, size.width]);
35
- return (_jsx("div", { ref: div, className: mergeClasses(...css), children: _jsx("div", { ref: rotate, children: props.children }) }));
36
- };
37
- //# sourceMappingURL=vertical-content.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"vertical-content.js","sourceRoot":"","sources":["../../src/controls/vertical-content.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,MAAM,SAAS,GAAG,UAAU,CAAC;IACzB,iBAAiB,EAAE;QACf,QAAQ,EAAE,UAAU;QACpB,CAAC,SAAS,CAAC,EAAE;YACT,QAAQ,EAAE,UAAU;YACpB,SAAS,EAAE,eAAe;SAC7B;KACJ;CACJ,CAAC,CAAC;AAKH,MAAM,CAAC,MAAM,eAAe,GAA6D,CAAC,KAAK,EAAE,EAAE;IAC/F,MAAM,OAAO,GAAG,SAAS,EAAE,CAAC;IAC5B,IAAI,GAAG,GAAa,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAChD,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC;IAE7B,IAAI,GAAG,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;IACzB,IAAI,MAAM,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;IAE5B,IAAI,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC;QAAE,GAAG,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;IAEvD,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACjB,IAAI,GAAG,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YAChC,IAAI,OAAO,GAAI,GAAG,CAAC,OAA0B,CAAC;YAC9C,IAAI,SAAS,GAAI,MAAM,CAAC,OAA0B,CAAC;YACnD,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,GAAG,SAAS,CAAC,WAAW,IAAI,CAAC;YACpD,OAAO,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,SAAS,CAAC,YAAY,IAAI,CAAC;YACpD,OAAO,CAAC,KAAK,CAAC,SAAS,GAAG,GAAG,SAAS,CAAC,WAAW,IAAI,CAAC;YACvD,OAAO,CAAC,KAAK,CAAC,QAAQ,GAAG,GAAG,SAAS,CAAC,YAAY,IAAI,CAAC;YAEvD,SAAS,CAAC,KAAK,CAAC,GAAG,GAAG,GAAG,CAAC,SAAS,CAAC,WAAW,GAAG,SAAS,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC;YAClF,SAAS,CAAC,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,WAAW,GAAG,SAAS,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC;QACxF,CAAC;IACL,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAE3C,OAAO,CACH,cAAK,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,YAAY,CAAC,GAAG,GAAG,CAAC,YAC1C,cAAK,GAAG,EAAE,MAAM,YACX,KAAK,CAAC,QAAQ,GACb,GACJ,CACT,CAAC;AACN,CAAC,CAAA"}
@@ -1,8 +0,0 @@
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 Vertical: React.FunctionComponent<React.PropsWithChildren<IProps>>;
8
- export {};
@@ -1,23 +0,0 @@
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
- vertical: Object.assign(Object.assign({}, mixins.flex), { flexDirection: 'column' }),
8
- wrap: mixins.wrap,
9
- nogap: mixins.nogap
10
- });
11
- export const Vertical = (props) => {
12
- const cssNames = useStyles();
13
- let css = [KnownClassNames.vertical];
14
- css.push(cssNames.vertical);
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=vertical.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"vertical.js","sourceRoot":"","sources":["../../src/controls/vertical.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,QAAQ,kCACD,MAAM,CAAC,IAAI,KACd,aAAa,EAAE,QAAQ,GAC1B;IACD,IAAI,EAAE,MAAM,CAAC,IAAI;IACjB,KAAK,EAAE,MAAM,CAAC,KAAK;CACtB,CAAC,CAAA;AAMF,MAAM,CAAC,MAAM,QAAQ,GAA6D,CAAC,KAAK,EAAE,EAAE;IACxF,MAAM,QAAQ,GAAG,SAAS,EAAE,CAAC;IAC7B,IAAI,GAAG,GAAa,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;IAE/C,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC5B,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"}
@@ -1,3 +0,0 @@
1
- export * from './_modules/exports-index';
2
- export * from './controls/exports-index';
3
- export * from './styles/exports-index';
@@ -1,4 +0,0 @@
1
- export * from './_modules/exports-index';
2
- export * from './controls/exports-index';
3
- export * from './styles/exports-index';
4
- //# sourceMappingURL=exports-index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"exports-index.js","sourceRoot":"","sources":["../src/exports-index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC"}
@@ -1,26 +0,0 @@
1
- import React from "react";
2
- export interface iKWIZFluentContext {
3
- /**
4
- * Where the portal children are mounted on DOM
5
- *
6
- * @default a new element on document.body without any styling
7
- */
8
- mountNode?: HTMLElement | null | {
9
- element?: HTMLElement | null;
10
- className?: string;
11
- };
12
- /**
13
- * Controls the colors and borders of the input.
14
- *
15
- * @default 'underline'
16
- */
17
- inputAppearance?: 'outline' | 'underline' | 'filled-darker' | 'filled-lighter';
18
- /**
19
- * A button can be rounded, circular, or square.
20
- *
21
- * @default 'rounded'
22
- */
23
- buttonShape?: 'rounded' | 'circular' | 'square';
24
- }
25
- export declare const KWIZFluentContext: React.Context<iKWIZFluentContext>;
26
- export declare function useKWIZFluentContext(): iKWIZFluentContext;
@@ -1,15 +0,0 @@
1
- import { isNullOrUndefined } from "@kwiz/common";
2
- import React from "react";
3
- //create context
4
- export const KWIZFluentContext = React.createContext(null);
5
- //use context from within controls
6
- export function useKWIZFluentContext() {
7
- let ctx = React.useContext(KWIZFluentContext) || {};
8
- //set defaults
9
- if (isNullOrUndefined(ctx.inputAppearance))
10
- ctx.inputAppearance = "underline";
11
- if (isNullOrUndefined(ctx.buttonShape))
12
- ctx.buttonShape = "circular";
13
- return ctx;
14
- }
15
- //# sourceMappingURL=context.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/helpers/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,MAAM,OAAO,CAAC;AA2B1B,gBAAgB;AAChB,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,CAAC,aAAa,CAAqB,IAAI,CAAC,CAAC;AAC/E,kCAAkC;AAClC,MAAM,UAAU,oBAAoB;IAChC,IAAI,GAAG,GAAG,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC;IACpD,cAAc;IACd,IAAI,iBAAiB,CAAC,GAAG,CAAC,eAAe,CAAC;QACtC,GAAG,CAAC,eAAe,GAAG,WAAW,CAAC;IACtC,IAAI,iBAAiB,CAAC,GAAG,CAAC,WAAW,CAAC;QAClC,GAAG,CAAC,WAAW,GAAG,UAAU,CAAC;IACjC,OAAO,GAAG,CAAC;AACf,CAAC"}
@@ -1,62 +0,0 @@
1
- import { ToastIntent } from "@fluentui/react-components";
2
- import { MutableRefObject, SetStateAction } from "react";
3
- import { iKWIZFluentContext } from "./context";
4
- /** Empty array ensures that effect is only run on mount */
5
- export declare const useEffectOnlyOnMount: any[];
6
- /** set state on steroids. provide promise callback after render, onChange transformer and automatic skip-set when value not changed */
7
- export declare function useStateEX<ValueType>(initialValue: ValueType, options?: {
8
- onChange?: (newValue: SetStateAction<ValueType>) => SetStateAction<ValueType>;
9
- skipUpdateIfSame?: boolean;
10
- name?: string;
11
- }): [
12
- ValueType,
13
- (newValue: SetStateAction<ValueType>) => Promise<ValueType>,
14
- MutableRefObject<ValueType>
15
- ];
16
- export declare function useTrackFocus(props: {
17
- onFocus: () => void;
18
- onLoseFocus: () => void;
19
- ref?: MutableRefObject<HTMLElement>;
20
- }): MutableRefObject<HTMLElement>;
21
- export declare function useWindowSize(): {
22
- width: number;
23
- height: number;
24
- };
25
- export declare function useIsInPrint(): boolean;
26
- /** set block message if you want to block nav.
27
- * - call setMessage to add a blocker message
28
- * - call onNav when you have internal navigation (open / close popups)
29
- * - render the navPrompt control to your page
30
- * FYI for page unload, most modern browsers won't show your message but a generic one instead. */
31
- export declare function useBlockNav(): {
32
- setMessage: (id: string, message?: string) => void;
33
- onNav: (nav: () => void) => void;
34
- navPrompt: import("react/jsx-runtime").JSX.Element;
35
- };
36
- export declare function useKeyDown(options: {
37
- elm?: HTMLElement | Document;
38
- onEnter?: (e: KeyboardEvent) => void;
39
- onEscape?: (e: KeyboardEvent) => void;
40
- onKeyDown?: (e: KeyboardEvent) => void;
41
- }): void;
42
- export declare function useToast(): {
43
- control: import("react/jsx-runtime").JSX.Element;
44
- dispatch: (info: {
45
- title?: string;
46
- body?: string;
47
- subtitle?: string;
48
- titleAction?: {
49
- text: string;
50
- onClick: () => void;
51
- };
52
- footerActions?: {
53
- text: string;
54
- onClick: () => void;
55
- }[];
56
- intent?: ToastIntent;
57
- }) => void;
58
- };
59
- export declare function useKWIZFluentContextProvider(options: {
60
- root?: React.MutableRefObject<HTMLDivElement>;
61
- ctx?: iKWIZFluentContext;
62
- }): iKWIZFluentContext;