@kwiz/fluentui 1.0.26 → 1.0.28

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,8 +1,12 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Label, makeStyles } from "@fluentui/react-components";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { makeStyles, tokens } from "@fluentui/react-components";
3
3
  import { ChevronRightRegular } from "@fluentui/react-icons";
4
4
  import * as React from 'react';
5
+ import { KnownClassNames } from "../styles/styles";
6
+ import { ButtonEX } from "./button";
7
+ import { DividerEX } from "./divider";
5
8
  import { Horizontal } from "./horizontal";
9
+ import { Section } from "./section";
6
10
  import { Vertical } from "./vertical";
7
11
  const useStyles = makeStyles({
8
12
  opened: {
@@ -10,18 +14,21 @@ const useStyles = makeStyles({
10
14
  transition: "transform 200ms ease-out"
11
15
  },
12
16
  header: {
13
- cursor: "pointer"
17
+ paddingLeft: 0
14
18
  },
15
19
  root: {
16
20
  maxHeight: "100%"
17
21
  },
18
22
  body: {
19
- overflow: "auto"
23
+ overflow: "auto",
24
+ },
25
+ indent: {
26
+ width: tokens.spacingHorizontalL
20
27
  }
21
28
  });
22
29
  export const AccordionEX = (props) => {
23
30
  const classes = useStyles();
24
31
  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)) }));
32
+ return (_jsx(Vertical, { main: true, css: [classes.root, KnownClassNames.accordion], children: props.groups.map(group => _jsxs(React.Fragment, { children: [_jsx(ButtonEX, { className: `${classes.header} ${KnownClassNames.accordionHeader} ${opened === group.key ? ` ${KnownClassNames.isOpen}` : ''}`, icon: _jsx(ChevronRightRegular, { className: opened === group.key ? classes.opened : '' }), title: group.title, showTitleWithIcon: true, dontCenterText: true, onClick: () => setOpened(group.key) }), _jsx(DividerEX, {}), group.key === opened && _jsxs(_Fragment, { children: [_jsxs(Horizontal, { main: true, css: [classes.body, KnownClassNames.accordionBodyWrapper], children: [_jsx(Section, { css: [classes.indent, KnownClassNames.accordionBodyIndent] }), _jsx(Vertical, { main: true, css: [KnownClassNames.accordionBody], children: group.content })] }), _jsx(DividerEX, {})] })] }, group.key)) }));
26
33
  };
27
34
  //# sourceMappingURL=accordion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"accordion.js","sourceRoot":"","sources":["../../src/controls/accordion.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,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,SAAS,EAAE,eAAe;QAC1B,UAAU,EAAE,0BAA0B;KACzC;IACD,MAAM,EAAE;QACJ,MAAM,EAAE,SAAS;KACpB;IACD,IAAI,EAAE;QACF,SAAS,EAAE,MAAM;KACpB;IACD,IAAI,EAAE;QACF,QAAQ,EAAE,MAAM;KACnB;CACJ,CAAC,CAAC;AAYH,MAAM,CAAC,MAAM,WAAW,GAAoC,CAAC,KAAK,EAAE,EAAE;IAClE,MAAM,OAAO,GAAG,SAAS,EAAE,CAAC;IAC5B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC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AE,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,GACrC,EACF,KAAC,SAAS,KAAG,EACZ,KAAK,CAAC,GAAG,KAAK,MAAM,IAAI,8BACrB,MAAC,UAAU,IAAC,IAAI,QAAC,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,eAAe,CAAC,oBAAoB,CAAC,aACtE,KAAC,OAAO,IAAC,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,eAAe,CAAC,mBAAmB,CAAC,GAAY,EAC/E,KAAC,QAAQ,IAAC,IAAI,QAAC,GAAG,EAAE,CAAC,eAAe,CAAC,aAAa,CAAC,YAC9C,KAAK,CAAC,OAAO,GACP,IACF,EACb,KAAC,SAAS,KAAG,IACd,KAfyC,KAAK,CAAC,GAAG,CAgBxC,CAAC,GACX,CACV,CAAC;AACN,CAAC,CAAA"}
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ interface IProps {
3
+ }
4
+ export declare const DividerEX: React.FunctionComponent<React.PropsWithChildren<IProps>>;
5
+ export {};
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Divider, makeStyles } from '@fluentui/react-components';
3
+ const useStyles = makeStyles({
4
+ separator: {
5
+ flexGrow: 0
6
+ }
7
+ });
8
+ export const DividerEX = (props) => {
9
+ const cssNames = useStyles();
10
+ return (_jsx(Divider, Object.assign({}, props, { className: cssNames.separator })));
11
+ };
12
+ //# sourceMappingURL=divider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"divider.js","sourceRoot":"","sources":["../../src/controls/divider.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAGjE,MAAM,SAAS,GAAG,UAAU,CAAC;IACzB,SAAS,EAAE;QACP,QAAQ,EAAE,CAAC;KACd;CACJ,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,SAAS,GAA6D,CAAC,KAAK,EAAE,EAAE;IACzF,MAAM,QAAQ,GAAG,SAAS,EAAE,CAAC;IAC7B,OAAO,CACH,KAAC,OAAO,oBAAK,KAAK,IAAE,SAAS,EAAE,QAAQ,CAAC,SAAS,IAAI,CACxD,CAAC;AACN,CAAC,CAAA"}
@@ -18,6 +18,6 @@ export declare class ErrorBoundary extends React.Component<React.PropsWithChildr
18
18
  marker: string | number;
19
19
  };
20
20
  componentDidCatch(error: any, errorInfo: any): void;
21
- render(): string | number | boolean | Iterable<React.ReactNode> | import("react/jsx-runtime").JSX.Element;
21
+ render(): string | number | boolean | Iterable<React.ReactNode> | JSX.Element;
22
22
  }
23
23
  export {};
@@ -14,6 +14,12 @@ export declare const KnownClassNames: {
14
14
  vertical: string;
15
15
  horizontal: string;
16
16
  list: string;
17
+ accordion: string;
18
+ accordionHeader: string;
19
+ accordionBody: string;
20
+ accordionBodyWrapper: string;
21
+ accordionBodyIndent: string;
22
+ isOpen: string;
17
23
  };
18
24
  export declare const useCommonStyles: () => Record<"printShow" | "printHide", string>;
19
25
  export declare const widthMedium = 360;
@@ -53,7 +53,13 @@ export const KnownClassNames = {
53
53
  section: 'kfui-section',
54
54
  vertical: 'kfui-vertical',
55
55
  horizontal: 'kfui-horizontal',
56
- list: 'kfui-list'
56
+ list: 'kfui-list',
57
+ accordion: 'kfui-accordion',
58
+ accordionHeader: 'kfui-accordion-header',
59
+ accordionBody: 'kfui-accordion-body',
60
+ accordionBodyWrapper: 'kfui-accordion-body-wrapper',
61
+ accordionBodyIndent: 'kfui-accordion-indent',
62
+ isOpen: 'is-opened',
57
63
  };
58
64
  export const useCommonStyles = makeStyles({
59
65
  printShow: {
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../src/styles/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,UAAU,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAE9E,MAAM,KAAQ,MAAM,CAsDnB;AAtDD,WAAc,MAAM;IACH,WAAI,GAAiB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EAAE,iBAAiB;SAC7B;KACJ;CACJ,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAAC;AAC/B,+BAA+B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kwiz/fluentui",
3
- "version": "1.0.26",
3
+ "version": "1.0.28",
4
4
  "description": "KWIZ common controls for FluentUI",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,7 +1,11 @@
1
- import { Label, makeStyles } from "@fluentui/react-components";
1
+ import { makeStyles, tokens } from "@fluentui/react-components";
2
2
  import { ChevronRightRegular } from "@fluentui/react-icons";
3
3
  import * as React from 'react';
4
+ import { KnownClassNames } from "../styles/styles";
5
+ import { ButtonEX } from "./button";
6
+ import { DividerEX } from "./divider";
4
7
  import { Horizontal } from "./horizontal";
8
+ import { Section } from "./section";
5
9
  import { Vertical } from "./vertical";
6
10
 
7
11
  const useStyles = makeStyles({
@@ -10,13 +14,16 @@ const useStyles = makeStyles({
10
14
  transition: "transform 200ms ease-out"
11
15
  },
12
16
  header: {
13
- cursor: "pointer"
17
+ paddingLeft: 0
14
18
  },
15
19
  root: {
16
20
  maxHeight: "100%"
17
21
  },
18
22
  body: {
19
- overflow: "auto"
23
+ overflow: "auto",
24
+ },
25
+ indent: {
26
+ width: tokens.spacingHorizontalL
20
27
  }
21
28
  });
22
29
 
@@ -33,15 +40,23 @@ interface iProps {
33
40
  export const AccordionEX: React.FunctionComponent<iProps> = (props) => {
34
41
  const classes = useStyles();
35
42
  const [opened, setOpened] = React.useState(props.opened || props.groups[0].key);
36
- return (<Vertical main css={[classes.root]}>
43
+ return (<Vertical main css={[classes.root, KnownClassNames.accordion]}>
37
44
  {props.groups.map(group => <React.Fragment key={group.key}>
38
- <Horizontal css={[classes.header]} onClick={() => setOpened(group.key)}>
39
- <ChevronRightRegular className={opened === group.key && classes.opened} />
40
- <Label>{group.title}</Label>
41
- </Horizontal>
42
- {group.key === opened && <Vertical main css={[classes.body]}>
43
- {group.content}
44
- </Vertical>}
45
+ <ButtonEX className={`${classes.header} ${KnownClassNames.accordionHeader} ${opened === group.key ? ` ${KnownClassNames.isOpen}` : ''}`}
46
+ icon={<ChevronRightRegular className={opened === group.key ? classes.opened : ''} />}
47
+ title={group.title} showTitleWithIcon dontCenterText
48
+ onClick={() => setOpened(group.key)}
49
+ />
50
+ <DividerEX />
51
+ {group.key === opened && <>
52
+ <Horizontal main css={[classes.body, KnownClassNames.accordionBodyWrapper]}>
53
+ <Section css={[classes.indent, KnownClassNames.accordionBodyIndent]}></Section>
54
+ <Vertical main css={[KnownClassNames.accordionBody]}>
55
+ {group.content}
56
+ </Vertical>
57
+ </Horizontal>
58
+ <DividerEX />
59
+ </>}
45
60
  </React.Fragment>)}
46
61
  </Vertical>
47
62
  );
@@ -0,0 +1,16 @@
1
+ import { Divider, makeStyles } from '@fluentui/react-components';
2
+ import React from 'react';
3
+
4
+ const useStyles = makeStyles({
5
+ separator: {
6
+ flexGrow: 0
7
+ }
8
+ });
9
+ interface IProps {
10
+ }
11
+ export const DividerEX: React.FunctionComponent<React.PropsWithChildren<IProps>> = (props) => {
12
+ const cssNames = useStyles();
13
+ return (
14
+ <Divider {...props} className={cssNames.separator} />
15
+ );
16
+ }
@@ -61,7 +61,13 @@ export const KnownClassNames = {
61
61
  section: 'kfui-section',
62
62
  vertical: 'kfui-vertical',
63
63
  horizontal: 'kfui-horizontal',
64
- list: 'kfui-list'
64
+ list: 'kfui-list',
65
+ accordion: 'kfui-accordion',
66
+ accordionHeader: 'kfui-accordion-header',
67
+ accordionBody: 'kfui-accordion-body',
68
+ accordionBodyWrapper: 'kfui-accordion-body-wrapper',
69
+ accordionBodyIndent: 'kfui-accordion-indent',
70
+ isOpen: 'is-opened',
65
71
  }
66
72
  export const useCommonStyles = makeStyles({
67
73
  printShow: {