@coorpacademy/components 11.33.13-alpha.12 → 11.33.13-alpha.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/atom/button-menu/index.d.ts.map +1 -1
- package/es/atom/button-menu/index.js +5 -2
- package/es/atom/button-menu/index.js.map +1 -1
- package/es/atom/button-menu/types.d.ts +1 -6
- package/es/atom/button-menu/types.d.ts.map +1 -1
- package/es/atom/button-menu/types.js.map +1 -1
- package/es/molecule/bullet-point-menu-button/index.d.ts.map +1 -1
- package/es/molecule/bullet-point-menu-button/index.js +1 -0
- package/es/molecule/bullet-point-menu-button/index.js.map +1 -1
- package/lib/atom/button-menu/index.d.ts.map +1 -1
- package/lib/atom/button-menu/index.js +6 -3
- package/lib/atom/button-menu/index.js.map +1 -1
- package/lib/atom/button-menu/types.d.ts +1 -6
- package/lib/atom/button-menu/types.d.ts.map +1 -1
- package/lib/atom/button-menu/types.js.map +1 -1
- package/lib/molecule/bullet-point-menu-button/index.d.ts.map +1 -1
- package/lib/molecule/bullet-point-menu-button/index.js +1 -0
- package/lib/molecule/bullet-point-menu-button/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button-menu/index.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button-menu/index.tsx"],"names":[],"mappings":";AAMA,OAAkB,EAAC,eAAe,EAA+B,MAAM,SAAS,CAAC;AAgEjF,QAAA,MAAM,UAAU;YAAW,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiBzC,CAAC;AAIF,eAAe,UAAU,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _noop from "lodash/fp/noop";
|
|
1
2
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
3
|
import React, { useMemo, useCallback } from 'react';
|
|
3
4
|
import map from 'lodash/fp/map';
|
|
@@ -31,15 +32,17 @@ const Button = props => {
|
|
|
31
32
|
'data-name': dataName,
|
|
32
33
|
disabled,
|
|
33
34
|
label,
|
|
34
|
-
onClick,
|
|
35
|
+
onClick = _noop,
|
|
35
36
|
type = 'default',
|
|
36
37
|
buttonLinkType,
|
|
37
38
|
icon,
|
|
38
|
-
customStyle = {}
|
|
39
|
+
customStyle = {},
|
|
40
|
+
...rest
|
|
39
41
|
} = props;
|
|
40
42
|
const styleButton = classnames(style.button, type === 'default' && style.defaultStyle, type === 'defaultLeft' && style.defaultLeft, type === 'dangerous' && style.dangerous, type === 'dangerousLeft' && style.dangerousLeft, disabled && style.disabled);
|
|
41
43
|
const handleOnClick = useCallback(() => onClick(), [onClick]);
|
|
42
44
|
const buttonLinkProps = {
|
|
45
|
+
...rest,
|
|
43
46
|
'aria-label': label,
|
|
44
47
|
disabled,
|
|
45
48
|
label,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useMemo","useCallback","map","classnames","ButtonLink","style","propTypes","buttonPropTypes","DEFAULT_ICON_STYLE","THEMES","buildCustomIconByTheme","icon","theme","iconProps","custom","customProps","faIcon","Button","props","dataName","disabled","label","onClick","type","buttonLinkType","customStyle","styleButton","button","defaultStyle","defaultLeft","dangerous","dangerousLeft","handleOnClick","buttonLinkProps","className","createElement","_extends","process","env","NODE_ENV","ButtonMenu","buttons","buildButton","index","key","buttonList","convert","cap","buttonMenuContainer"],"sources":["../../../src/atom/button-menu/index.tsx"],"sourcesContent":["import React, {useMemo, useCallback} from 'react';\nimport map from 'lodash/fp/map';\nimport classnames from 'classnames';\nimport ButtonLink from '../button-link';\nimport style from './style.css';\nimport propTypes, {ButtonMenuProps, ButtonProps, buttonPropTypes} from './types';\nimport {DEFAULT_ICON_STYLE, THEMES} from './utils';\n\nconst buildCustomIconByTheme = (icon: ButtonProps['icon']) => {\n if (!icon) return;\n\n const {theme, ...iconProps} = icon;\n const custom = theme && THEMES[theme];\n if (!custom) return iconProps;\n\n const customProps = custom\n ? {\n ...DEFAULT_ICON_STYLE,\n faIcon: {...DEFAULT_ICON_STYLE.faIcon, ...custom}\n }\n : null;\n\n return {\n ...iconProps,\n ...customProps\n };\n};\n\nconst Button = (props: ButtonProps) => {\n const {\n 'data-name': dataName,\n disabled,\n label,\n onClick,\n type = 'default',\n buttonLinkType,\n icon,\n customStyle = {}\n } = props;\n const styleButton = classnames(\n style.button,\n type === 'default' && style.defaultStyle,\n type === 'defaultLeft' && style.defaultLeft,\n type === 'dangerous' && style.dangerous,\n type === 'dangerousLeft' && style.dangerousLeft,\n disabled && style.disabled\n );\n const handleOnClick = useCallback(() => onClick(), [onClick]);\n\n const buttonLinkProps = {\n 'aria-label': label,\n disabled,\n label,\n type: buttonLinkType,\n onClick: handleOnClick,\n 'data-name': dataName,\n className: styleButton,\n customStyle: {...customStyle}\n };\n\n const iconProps = buildCustomIconByTheme(icon);\n\n return <ButtonLink {...buttonLinkProps} icon={iconProps} />;\n};\n\nButton.propTypes = buttonPropTypes;\n\nconst ButtonMenu = (props: ButtonMenuProps) => {\n const {buttons, 'data-name': dataName} = props;\n const buildButton = useCallback((button: ButtonProps, index) => {\n return <Button {...button} key={button.label + index} />;\n }, []);\n\n const buttonList = useMemo(\n // @ts-expect-error (to avoid using map as any)\n () => map.convert({cap: false})(buildButton, buttons),\n [buttons, buildButton]\n );\n\n return (\n <div data-name={dataName} className={style.buttonMenuContainer}>\n {buttonList}\n </div>\n );\n};\n\nButtonMenu.propTypes = propTypes;\n\nexport default ButtonMenu;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useMemo","useCallback","map","classnames","ButtonLink","style","propTypes","buttonPropTypes","DEFAULT_ICON_STYLE","THEMES","buildCustomIconByTheme","icon","theme","iconProps","custom","customProps","faIcon","Button","props","dataName","disabled","label","onClick","_noop","type","buttonLinkType","customStyle","rest","styleButton","button","defaultStyle","defaultLeft","dangerous","dangerousLeft","handleOnClick","buttonLinkProps","className","createElement","_extends","process","env","NODE_ENV","ButtonMenu","buttons","buildButton","index","key","buttonList","convert","cap","buttonMenuContainer"],"sources":["../../../src/atom/button-menu/index.tsx"],"sourcesContent":["import React, {useMemo, useCallback} from 'react';\nimport map from 'lodash/fp/map';\nimport classnames from 'classnames';\nimport {noop} from 'lodash/fp';\nimport ButtonLink from '../button-link';\nimport style from './style.css';\nimport propTypes, {ButtonMenuProps, ButtonProps, buttonPropTypes} from './types';\nimport {DEFAULT_ICON_STYLE, THEMES} from './utils';\n\nconst buildCustomIconByTheme = (icon: ButtonProps['icon']) => {\n if (!icon) return;\n\n const {theme, ...iconProps} = icon;\n const custom = theme && THEMES[theme];\n if (!custom) return iconProps;\n\n const customProps = custom\n ? {\n ...DEFAULT_ICON_STYLE,\n faIcon: {...DEFAULT_ICON_STYLE.faIcon, ...custom}\n }\n : null;\n\n return {\n ...iconProps,\n ...customProps\n };\n};\n\nconst Button = (props: ButtonProps) => {\n const {\n 'data-name': dataName,\n disabled,\n label,\n onClick = noop,\n type = 'default',\n buttonLinkType,\n icon,\n customStyle = {},\n ...rest\n } = props;\n const styleButton = classnames(\n style.button,\n type === 'default' && style.defaultStyle,\n type === 'defaultLeft' && style.defaultLeft,\n type === 'dangerous' && style.dangerous,\n type === 'dangerousLeft' && style.dangerousLeft,\n disabled && style.disabled\n );\n const handleOnClick = useCallback(() => onClick(), [onClick]);\n\n const buttonLinkProps = {\n ...rest,\n 'aria-label': label,\n disabled,\n label,\n type: buttonLinkType,\n onClick: handleOnClick,\n 'data-name': dataName,\n className: styleButton,\n customStyle: {...customStyle}\n };\n\n const iconProps = buildCustomIconByTheme(icon);\n\n return <ButtonLink {...buttonLinkProps} icon={iconProps} />;\n};\n\nButton.propTypes = buttonPropTypes;\n\nconst ButtonMenu = (props: ButtonMenuProps) => {\n const {buttons, 'data-name': dataName} = props;\n const buildButton = useCallback((button: ButtonProps, index) => {\n return <Button {...button} key={button.label + index} />;\n }, []);\n\n const buttonList = useMemo(\n // @ts-expect-error (to avoid using map as any)\n () => map.convert({cap: false})(buildButton, buttons),\n [buttons, buildButton]\n );\n\n return (\n <div data-name={dataName} className={style.buttonMenuContainer}>\n {buttonList}\n </div>\n );\n};\n\nButtonMenu.propTypes = propTypes;\n\nexport default ButtonMenu;\n"],"mappings":";;AAAA,OAAOA,KAAK,IAAGC,OAAO,EAAEC,WAAW,QAAO,OAAO;AACjD,OAAOC,GAAG,MAAM,eAAe;AAC/B,OAAOC,UAAU,MAAM,YAAY;AAEnC,OAAOC,UAAU,MAAM,gBAAgB;AACvC,OAAOC,KAAK,MAAM,aAAa;AAC/B,OAAOC,SAAS,IAAiCC,eAAe,QAAO,SAAS;AAChF,SAAQC,kBAAkB,EAAEC,MAAM,QAAO,SAAS;AAElD,MAAMC,sBAAsB,GAAIC,IAAyB,IAAK;EAC5D,IAAI,CAACA,IAAI,EAAE;EAEX,MAAM;IAACC,KAAK;IAAE,GAAGC;EAAS,CAAC,GAAGF,IAAI;EAClC,MAAMG,MAAM,GAAGF,KAAK,IAAIH,MAAM,CAACG,KAAK,CAAC;EACrC,IAAI,CAACE,MAAM,EAAE,OAAOD,SAAS;EAE7B,MAAME,WAAW,GAAGD,MAAM,GACtB;IACE,GAAGN,kBAAkB;IACrBQ,MAAM,EAAE;MAAC,GAAGR,kBAAkB,CAACQ,MAAM;MAAE,GAAGF;IAAM;EAClD,CAAC,GACD,IAAI;EAER,OAAO;IACL,GAAGD,SAAS;IACZ,GAAGE;EACL,CAAC;AACH,CAAC;AAED,MAAME,MAAM,GAAIC,KAAkB,IAAK;EACrC,MAAM;IACJ,WAAW,EAAEC,QAAQ;IACrBC,QAAQ;IACRC,KAAK;IACLC,OAAO,GAAAC,KAAO;IACdC,IAAI,GAAG,SAAS;IAChBC,cA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AsC,aAAA,CAACpB,MAAM,EAAAqB,QAAA,KAAKT,MAAM;MAAEiB,GAAG,EAAEjB,MAAM,CAACR,KAAK,GAAGwB;IAAM,EAAE,CAAC;EAC1D,CAAC,EAAE,EAAE,CAAC;EAEN,MAAME,UAAU,GAAG/C,OAAO;EACxB;EACA,MAAME,GAAG,CAAC8C,OAAO,CAAC;IAACC,GAAG,EAAE;EAAK,CAAC,CAAC,CAACL,WAAW,EAAED,OAAO,CAAC,EACrD,CAACA,OAAO,EAAEC,WAAW,CACvB,CAAC;EAED,oBACE7C,KAAA,CAAAsC,aAAA;IAAK,aAAWlB,QAAS;IAACiB,SAAS,EAAE/B,KAAK,CAAC6C;EAAoB,GAC5DH,UACE,CAAC;AAEV,CAAC;AAEDL,UAAU,CAACpC,SAAS,GAAAiC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGnC,SAAS;AAEhC,eAAeoC,UAAU","ignoreList":[]}
|
|
@@ -56,17 +56,12 @@ declare const propTypes: {
|
|
|
56
56
|
};
|
|
57
57
|
export default propTypes;
|
|
58
58
|
export declare type Theme = 'archived' | 'published' | 'deleted';
|
|
59
|
-
export declare type ButtonProps = {
|
|
60
|
-
'data-name'?: string;
|
|
61
|
-
disabled?: boolean;
|
|
62
|
-
label: string;
|
|
63
|
-
onClick: () => void;
|
|
59
|
+
export declare type ButtonProps = Omit<ButtonLinkProps, 'type' | 'icon'> & {
|
|
64
60
|
type?: 'default' | 'defaultLeft' | 'dangerous' | 'dangerousLeft';
|
|
65
61
|
buttonLinkType?: ButtonLinkProps['type'];
|
|
66
62
|
icon?: IconType & {
|
|
67
63
|
theme?: Theme;
|
|
68
64
|
};
|
|
69
|
-
customStyle?: Record<string, string | number>;
|
|
70
65
|
};
|
|
71
66
|
export declare type ButtonMenuProps = {
|
|
72
67
|
buttons: ButtonProps[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atom/button-menu/types.ts"],"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AAsB,GAAG;IAAC,KAAK,EAAE,eAAe,CAAA;CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":["PropTypes","iconPropTypes","buttonPropTypes","string","disabled","bool","label","isRequired","onClick","func","type","oneOf","buttonLinkType","icon","shape","theme","customStyle","objectOf","oneOfType","number","propTypes","buttons","arrayOf"],"sources":["../../../src/atom/button-menu/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport {ButtonLinkProps, IconType, iconPropTypes} from '../button-link/types';\n\nexport const buttonPropTypes = {\n 'data-name': PropTypes.string,\n disabled: PropTypes.bool,\n label: PropTypes.string.isRequired,\n onClick: PropTypes.func.isRequired,\n type: PropTypes.oneOf(['default', 'defaultLeft', 'dangerous', 'dangerousLeft']),\n buttonLinkType: PropTypes.oneOf(['primary', 'secondary', 'tertiary', 'text', 'dangerous']),\n icon: PropTypes.shape({\n ...iconPropTypes,\n theme: PropTypes.oneOf(['archived', 'published', 'deleted'])\n }),\n customStyle: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number]))\n};\n\nconst propTypes = {\n buttons: PropTypes.arrayOf(PropTypes.shape(buttonPropTypes)).isRequired,\n 'data-name': PropTypes.string,\n 'aria-label': PropTypes.string\n};\n\nexport default propTypes;\n\nexport type Theme = 'archived' | 'published' | 'deleted';\n\nexport type ButtonProps =
|
|
1
|
+
{"version":3,"file":"types.js","names":["PropTypes","iconPropTypes","buttonPropTypes","string","disabled","bool","label","isRequired","onClick","func","type","oneOf","buttonLinkType","icon","shape","theme","customStyle","objectOf","oneOfType","number","propTypes","buttons","arrayOf"],"sources":["../../../src/atom/button-menu/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport {ButtonLinkProps, IconType, iconPropTypes} from '../button-link/types';\n\nexport const buttonPropTypes = {\n 'data-name': PropTypes.string,\n disabled: PropTypes.bool,\n label: PropTypes.string.isRequired,\n onClick: PropTypes.func.isRequired,\n type: PropTypes.oneOf(['default', 'defaultLeft', 'dangerous', 'dangerousLeft']),\n buttonLinkType: PropTypes.oneOf(['primary', 'secondary', 'tertiary', 'text', 'dangerous']),\n icon: PropTypes.shape({\n ...iconPropTypes,\n theme: PropTypes.oneOf(['archived', 'published', 'deleted'])\n }),\n customStyle: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number]))\n};\n\nconst propTypes = {\n buttons: PropTypes.arrayOf(PropTypes.shape(buttonPropTypes)).isRequired,\n 'data-name': PropTypes.string,\n 'aria-label': PropTypes.string\n};\n\nexport default propTypes;\n\nexport type Theme = 'archived' | 'published' | 'deleted';\n\nexport type ButtonProps = Omit<ButtonLinkProps, 'type' | 'icon'> & {\n type?: 'default' | 'defaultLeft' | 'dangerous' | 'dangerousLeft';\n buttonLinkType?: ButtonLinkProps['type'];\n icon?: IconType & {theme?: Theme};\n};\n\nexport type ButtonMenuProps = {\n buttons: ButtonProps[];\n 'data-name'?: string;\n 'aria-label'?: string;\n};\n\nexport type ButtonMenuPropsFixture = {props: ButtonMenuProps};\n"],"mappings":"AAAA,OAAOA,SAAS,MAAM,YAAY;AAClC,SAAmCC,aAAa,QAAO,sBAAsB;AAE7E,OAAO,MAAMC,eAAe,GAAG;EAC7B,WAAW,EAAEF,SAAS,CAACG,MAAM;EAC7BC,QAAQ,EAAEJ,SAAS,CAACK,IAAI;EACxBC,KAAK,EAAEN,SAAS,CAACG,MAAM,CAACI,UAAU;EAClCC,OAAO,EAAER,SAAS,CAACS,IAAI,CAACF,UAAU;EAClCG,IAAI,EAAEV,SAAS,CAACW,KAAK,CAAC,CAAC,SAAS,EAAE,aAAa,EAAE,WAAW,EAAE,eAAe,CAAC,CAAC;EAC/EC,cAAc,EAAEZ,SAAS,CAACW,KAAK,CAAC,CAAC,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC;EAC1FE,IAAI,EAAEb,SAAS,CAACc,KAAK,CAAC;IACpB,GAAGb,aAAa;IAChBc,KAAK,EAAEf,SAAS,CAACW,KAAK,CAAC,CAAC,UAAU,EAAE,WAAW,EAAE,SAAS,CAAC;EAC7D,CAAC,CAAC;EACFK,WAAW,EAAEhB,SAAS,CAACiB,QAAQ,CAACjB,SAAS,CAACkB,SAAS,CAAC,CAAClB,SAAS,CAACG,MAAM,EAAEH,SAAS,CAACmB,MAAM,CAAC,CAAC;AAC3F,CAAC;AAED,MAAMC,SAAS,GAAG;EAChBC,OAAO,EAAErB,SAAS,CAACsB,OAAO,CAACtB,SAAS,CAACc,KAAK,CAACZ,eAAe,CAAC,CAAC,CAACK,UAAU;EACvE,WAAW,EAAEP,SAAS,CAACG,MAAM;EAC7B,YAAY,EAAEH,SAAS,CAACG;AAC1B,CAAC;AAED,eAAeiB,SAAS","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/bullet-point-menu-button/index.tsx"],"names":[],"mappings":";AAKA,OAAkB,EAAC,0BAA0B,EAAC,MAAM,SAAS,CAAC;AAG9D,QAAA,MAAM,qBAAqB;YAAW,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/bullet-point-menu-button/index.tsx"],"names":[],"mappings":";AAKA,OAAkB,EAAC,0BAA0B,EAAC,MAAM,SAAS,CAAC;AAG9D,QAAA,MAAM,qBAAqB;YAAW,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4D/D,CAAC;AAIF,eAAe,qBAAqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useCallback","useState","useEffect","classnames","ButtonLinkIcon","ButtonMenu","propTypes","style","BulletPointMenuButton","props","disabled","buttonAriaLabel","menuAriaLabel","onClick","_noop","buttons","menuButtonClassName","isBulkMenu","visible","setVisible","handleOnClick","handleMouseDown","document","addEventListener","removeEventListener","menuProps","menu","createElement","className","bulletPointMenu","bulkBulletPointMenu","bulletPointButtonProps","size","icon","bulletPointWrapper","process","env","NODE_ENV"],"sources":["../../../src/molecule/bullet-point-menu-button/index.tsx"],"sourcesContent":["import React, {useCallback, useState, useEffect} from 'react';\nimport classnames from 'classnames';\nimport {noop} from 'lodash/fp';\nimport ButtonLinkIcon from '../../atom/button-link-icon';\nimport ButtonMenu from '../../atom/button-menu';\nimport propTypes, {BulletPointMenuButtonProps} from './types';\nimport style from './style.css';\n\nconst BulletPointMenuButton = (props: BulletPointMenuButtonProps) => {\n const {\n disabled = false,\n buttonAriaLabel,\n menuAriaLabel,\n onClick = noop,\n buttons,\n menuButtonClassName,\n isBulkMenu\n } = props;\n const [visible, setVisible] = useState(false);\n\n const handleOnClick = useCallback(() => {\n onClick();\n setVisible(true);\n }, [onClick]);\n\n useEffect(() => {\n const handleMouseDown = () => setVisible(false);\n document.addEventListener('mousedown', handleMouseDown);\n return () => {\n document.removeEventListener('mousedown', handleMouseDown);\n };\n }, []);\n\n const menuProps = {\n 'data-name': 'button-menu',\n buttons\n };\n\n const menu = (\n <div\n className={classnames(\n style.bulletPointMenu,\n isBulkMenu && style.bulkBulletPointMenu,\n visible && style.visible\n )}\n data-name=\"menu-wrapper\"\n aria-label={menuAriaLabel}\n >\n <ButtonMenu {...menuProps} />\n </div>\n );\n const bulletPointButtonProps = {\n size: 'default',\n 'aria-label': buttonAriaLabel,\n 'data-name': 'bullet-point-button',\n icon: 'bullet-point',\n onClick: handleOnClick,\n disabled,\n className: menuButtonClassName\n };\n\n return (\n <div className={style.bulletPointWrapper} data-name=\"bullet-point-wrapper\">\n <ButtonLinkIcon {...bulletPointButtonProps} />\n {menu}\n </div>\n );\n};\n\nBulletPointMenuButton.propTypes = propTypes;\n\nexport default BulletPointMenuButton;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAGC,WAAW,EAAEC,QAAQ,EAAEC,SAAS,QAAO,OAAO;AAC7D,OAAOC,UAAU,MAAM,YAAY;AAEnC,OAAOC,cAAc,MAAM,6BAA6B;AACxD,OAAOC,UAAU,MAAM,wBAAwB;AAC/C,OAAOC,SAAS,MAAoC,SAAS;AAC7D,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,qBAAqB,GAAIC,KAAiC,IAAK;EACnE,MAAM;IACJC,QAAQ,GAAG,KAAK;IAChBC,eAAe;IACfC,aAAa;IACbC,OAAO,GAAAC,KAAO;IACdC,OAAO;IACPC,mBAAmB;IACnBC;EACF,CAAC,GAAGR,KAAK;EACT,MAAM,CAACS,OAAO,EAAEC,UAAU,CAAC,GAAGlB,QAAQ,CAAC,KAAK,CAAC;EAE7C,MAAMmB,aAAa,GAAGpB,WAAW,CAAC,MAAM;
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useCallback","useState","useEffect","classnames","ButtonLinkIcon","ButtonMenu","propTypes","style","BulletPointMenuButton","props","disabled","buttonAriaLabel","menuAriaLabel","onClick","_noop","buttons","menuButtonClassName","isBulkMenu","visible","setVisible","handleOnClick","console","log","handleMouseDown","document","addEventListener","removeEventListener","menuProps","menu","createElement","className","bulletPointMenu","bulkBulletPointMenu","bulletPointButtonProps","size","icon","bulletPointWrapper","process","env","NODE_ENV"],"sources":["../../../src/molecule/bullet-point-menu-button/index.tsx"],"sourcesContent":["import React, {useCallback, useState, useEffect} from 'react';\nimport classnames from 'classnames';\nimport {noop} from 'lodash/fp';\nimport ButtonLinkIcon from '../../atom/button-link-icon';\nimport ButtonMenu from '../../atom/button-menu';\nimport propTypes, {BulletPointMenuButtonProps} from './types';\nimport style from './style.css';\n\nconst BulletPointMenuButton = (props: BulletPointMenuButtonProps) => {\n const {\n disabled = false,\n buttonAriaLabel,\n menuAriaLabel,\n onClick = noop,\n buttons,\n menuButtonClassName,\n isBulkMenu\n } = props;\n const [visible, setVisible] = useState(false);\n\n const handleOnClick = useCallback(() => {\n console.log('on click');\n onClick();\n setVisible(true);\n }, [onClick]);\n\n useEffect(() => {\n const handleMouseDown = () => setVisible(false);\n document.addEventListener('mousedown', handleMouseDown);\n return () => {\n document.removeEventListener('mousedown', handleMouseDown);\n };\n }, []);\n\n const menuProps = {\n 'data-name': 'button-menu',\n buttons\n };\n\n const menu = (\n <div\n className={classnames(\n style.bulletPointMenu,\n isBulkMenu && style.bulkBulletPointMenu,\n visible && style.visible\n )}\n data-name=\"menu-wrapper\"\n aria-label={menuAriaLabel}\n >\n <ButtonMenu {...menuProps} />\n </div>\n );\n const bulletPointButtonProps = {\n size: 'default',\n 'aria-label': buttonAriaLabel,\n 'data-name': 'bullet-point-button',\n icon: 'bullet-point',\n onClick: handleOnClick,\n disabled,\n className: menuButtonClassName\n };\n\n return (\n <div className={style.bulletPointWrapper} data-name=\"bullet-point-wrapper\">\n <ButtonLinkIcon {...bulletPointButtonProps} />\n {menu}\n </div>\n );\n};\n\nBulletPointMenuButton.propTypes = propTypes;\n\nexport default BulletPointMenuButton;\n"],"mappings":";AAAA,OAAOA,KAAK,IAAGC,WAAW,EAAEC,QAAQ,EAAEC,SAAS,QAAO,OAAO;AAC7D,OAAOC,UAAU,MAAM,YAAY;AAEnC,OAAOC,cAAc,MAAM,6BAA6B;AACxD,OAAOC,UAAU,MAAM,wBAAwB;AAC/C,OAAOC,SAAS,MAAoC,SAAS;AAC7D,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,qBAAqB,GAAIC,KAAiC,IAAK;EACnE,MAAM;IACJC,QAAQ,GAAG,KAAK;IAChBC,eAAe;IACfC,aAAa;IACbC,OAAO,GAAAC,KAAO;IACdC,OAAO;IACPC,mBAAmB;IACnBC;EACF,CAAC,GAAGR,KAAK;EACT,MAAM,CAACS,OAAO,EAAEC,UAAU,CAAC,GAAGlB,QAAQ,CAAC,KAAK,CAAC;EAE7C,MAAMmB,aAAa,GAAGpB,WAAW,CAAC,MAAM;IACtCqB,OAAO,CAACC,GAAG,CAAC,UAAU,CAAC;IACvBT,OAAO,CAAC,CAAC;IACTM,UAAU,CAA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
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button-menu/index.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/button-menu/index.tsx"],"names":[],"mappings":";AAMA,OAAkB,EAAC,eAAe,EAA+B,MAAM,SAAS,CAAC;AAgEjF,QAAA,MAAM,UAAU;YAAW,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiBzC,CAAC;AAIF,eAAe,UAAU,CAAC"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.default = void 0;
|
|
5
|
+
var _noop2 = _interopRequireDefault(require("lodash/fp/noop"));
|
|
5
6
|
var _react = _interopRequireWildcard(require("react"));
|
|
6
7
|
var _map = _interopRequireDefault(require("lodash/fp/map"));
|
|
7
8
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
@@ -9,9 +10,9 @@ var _buttonLink = _interopRequireDefault(require("../button-link"));
|
|
|
9
10
|
var _style = _interopRequireDefault(require("./style.css"));
|
|
10
11
|
var _types = _interopRequireWildcard(require("./types"));
|
|
11
12
|
var _utils = require("./utils");
|
|
12
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
13
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
14
14
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
15
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
16
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
16
17
|
const buildCustomIconByTheme = icon => {
|
|
17
18
|
if (!icon) return;
|
|
@@ -38,15 +39,17 @@ const Button = props => {
|
|
|
38
39
|
'data-name': dataName,
|
|
39
40
|
disabled,
|
|
40
41
|
label,
|
|
41
|
-
onClick,
|
|
42
|
+
onClick = _noop2.default,
|
|
42
43
|
type = 'default',
|
|
43
44
|
buttonLinkType,
|
|
44
45
|
icon,
|
|
45
|
-
customStyle = {}
|
|
46
|
+
customStyle = {},
|
|
47
|
+
...rest
|
|
46
48
|
} = props;
|
|
47
49
|
const styleButton = (0, _classnames.default)(_style.default.button, type === 'default' && _style.default.defaultStyle, type === 'defaultLeft' && _style.default.defaultLeft, type === 'dangerous' && _style.default.dangerous, type === 'dangerousLeft' && _style.default.dangerousLeft, disabled && _style.default.disabled);
|
|
48
50
|
const handleOnClick = (0, _react.useCallback)(() => onClick(), [onClick]);
|
|
49
51
|
const buttonLinkProps = {
|
|
52
|
+
...rest,
|
|
50
53
|
'aria-label': label,
|
|
51
54
|
disabled,
|
|
52
55
|
label,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_react","_interopRequireWildcard","require","_map","_interopRequireDefault","_classnames","_buttonLink","_style","_types","_utils","
|
|
1
|
+
{"version":3,"file":"index.js","names":["_react","_interopRequireWildcard","require","_map","_interopRequireDefault","_classnames","_buttonLink","_style","_types","_utils","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","buildCustomIconByTheme","icon","theme","iconProps","custom","THEMES","customProps","DEFAULT_ICON_STYLE","faIcon","Button","props","dataName","disabled","label","onClick","_noop2","type","buttonLinkType","customStyle","rest","styleButton","classnames","style","button","defaultStyle","defaultLeft","dangerous","dangerousLeft","handleOnClick","useCallback","buttonLinkProps","className","createElement","propTypes","process","env","NODE_ENV","buttonPropTypes","ButtonMenu","buttons","buildButton","index","key","buttonList","useMemo","map","convert","cap","buttonMenuContainer","_default","exports"],"sources":["../../../src/atom/button-menu/index.tsx"],"sourcesContent":["import React, {useMemo, useCallback} from 'react';\nimport map from 'lodash/fp/map';\nimport classnames from 'classnames';\nimport {noop} from 'lodash/fp';\nimport ButtonLink from '../button-link';\nimport style from './style.css';\nimport propTypes, {ButtonMenuProps, ButtonProps, buttonPropTypes} from './types';\nimport {DEFAULT_ICON_STYLE, THEMES} from './utils';\n\nconst buildCustomIconByTheme = (icon: ButtonProps['icon']) => {\n if (!icon) return;\n\n const {theme, ...iconProps} = icon;\n const custom = theme && THEMES[theme];\n if (!custom) return iconProps;\n\n const customProps = custom\n ? {\n ...DEFAULT_ICON_STYLE,\n faIcon: {...DEFAULT_ICON_STYLE.faIcon, ...custom}\n }\n : null;\n\n return {\n ...iconProps,\n ...customProps\n };\n};\n\nconst Button = (props: ButtonProps) => {\n const {\n 'data-name': dataName,\n disabled,\n label,\n onClick = noop,\n type = 'default',\n buttonLinkType,\n icon,\n customStyle = {},\n ...rest\n } = props;\n const styleButton = classnames(\n style.button,\n type === 'default' && style.defaultStyle,\n type === 'defaultLeft' && style.defaultLeft,\n type === 'dangerous' && style.dangerous,\n type === 'dangerousLeft' && style.dangerousLeft,\n disabled && style.disabled\n );\n const handleOnClick = useCallback(() => onClick(), [onClick]);\n\n const buttonLinkProps = {\n ...rest,\n 'aria-label': label,\n disabled,\n label,\n type: buttonLinkType,\n onClick: handleOnClick,\n 'data-name': dataName,\n className: styleButton,\n customStyle: {...customStyle}\n };\n\n const iconProps = buildCustomIconByTheme(icon);\n\n return <ButtonLink {...buttonLinkProps} icon={iconProps} />;\n};\n\nButton.propTypes = buttonPropTypes;\n\nconst ButtonMenu = (props: ButtonMenuProps) => {\n const {buttons, 'data-name': dataName} = props;\n const buildButton = useCallback((button: ButtonProps, index) => {\n return <Button {...button} key={button.label + index} />;\n }, []);\n\n const buttonList = useMemo(\n // @ts-expect-error (to avoid using map as any)\n () => map.convert({cap: false})(buildButton, buttons),\n [buttons, buildButton]\n );\n\n return (\n <div data-name={dataName} className={style.buttonMenuContainer}>\n {buttonList}\n </div>\n );\n};\n\nButtonMenu.propTypes = propTypes;\n\nexport default ButtonMenu;\n"],"mappings":";;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,IAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,WAAA,GAAAD,sBAAA,CAAAF,OAAA;AAEA,IAAAI,WAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,MAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,MAAA,GAAAP,uBAAA,CAAAC,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AAAmD,SAAAQ,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAV,wBAAAU,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAA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
|
|
57
57
|
export default propTypes;
|
|
58
58
|
export declare type Theme = 'archived' | 'published' | 'deleted';
|
|
59
|
-
export declare type ButtonProps = {
|
|
60
|
-
'data-name'?: string;
|
|
61
|
-
disabled?: boolean;
|
|
62
|
-
label: string;
|
|
63
|
-
onClick: () => void;
|
|
59
|
+
export declare type ButtonProps = Omit<ButtonLinkProps, 'type' | 'icon'> & {
|
|
64
60
|
type?: 'default' | 'defaultLeft' | 'dangerous' | 'dangerousLeft';
|
|
65
61
|
buttonLinkType?: ButtonLinkProps['type'];
|
|
66
62
|
icon?: IconType & {
|
|
67
63
|
theme?: Theme;
|
|
68
64
|
};
|
|
69
|
-
customStyle?: Record<string, string | number>;
|
|
70
65
|
};
|
|
71
66
|
export declare type ButtonMenuProps = {
|
|
72
67
|
buttons: ButtonProps[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atom/button-menu/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAC,eAAe,EAAE,QAAQ,EAAgB,MAAM,sBAAsB,CAAC;AAE9E,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;CAY3B,CAAC;AAEF,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAId,CAAC;AAEF,eAAe,SAAS,CAAC;AAEzB,oBAAY,KAAK,GAAG,UAAU,GAAG,WAAW,GAAG,SAAS,CAAC;AAEzD,oBAAY,WAAW,GAAG
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/atom/button-menu/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAC,eAAe,EAAE,QAAQ,EAAgB,MAAM,sBAAsB,CAAC;AAE9E,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;CAY3B,CAAC;AAEF,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAId,CAAC;AAEF,eAAe,SAAS,CAAC;AAEzB,oBAAY,KAAK,GAAG,UAAU,GAAG,WAAW,GAAG,SAAS,CAAC;AAEzD,oBAAY,WAAW,GAAG,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG;IACjE,IAAI,CAAC,EAAE,SAAS,GAAG,aAAa,GAAG,WAAW,GAAG,eAAe,CAAC;IACjE,cAAc,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;IACzC,IAAI,CAAC,EAAE,QAAQ,GAAG;QAAC,KAAK,CAAC,EAAE,KAAK,CAAA;KAAC,CAAC;CACnC,CAAC;AAEF,oBAAY,eAAe,GAAG;IAC5B,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,oBAAY,sBAAsB,GAAG;IAAC,KAAK,EAAE,eAAe,CAAA;CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":["_propTypes","_interopRequireDefault","require","_types","e","__esModule","default","buttonPropTypes","exports","PropTypes","string","disabled","bool","label","isRequired","onClick","func","type","oneOf","buttonLinkType","icon","shape","iconPropTypes","theme","customStyle","objectOf","oneOfType","number","propTypes","buttons","arrayOf","_default"],"sources":["../../../src/atom/button-menu/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport {ButtonLinkProps, IconType, iconPropTypes} from '../button-link/types';\n\nexport const buttonPropTypes = {\n 'data-name': PropTypes.string,\n disabled: PropTypes.bool,\n label: PropTypes.string.isRequired,\n onClick: PropTypes.func.isRequired,\n type: PropTypes.oneOf(['default', 'defaultLeft', 'dangerous', 'dangerousLeft']),\n buttonLinkType: PropTypes.oneOf(['primary', 'secondary', 'tertiary', 'text', 'dangerous']),\n icon: PropTypes.shape({\n ...iconPropTypes,\n theme: PropTypes.oneOf(['archived', 'published', 'deleted'])\n }),\n customStyle: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number]))\n};\n\nconst propTypes = {\n buttons: PropTypes.arrayOf(PropTypes.shape(buttonPropTypes)).isRequired,\n 'data-name': PropTypes.string,\n 'aria-label': PropTypes.string\n};\n\nexport default propTypes;\n\nexport type Theme = 'archived' | 'published' | 'deleted';\n\nexport type ButtonProps =
|
|
1
|
+
{"version":3,"file":"types.js","names":["_propTypes","_interopRequireDefault","require","_types","e","__esModule","default","buttonPropTypes","exports","PropTypes","string","disabled","bool","label","isRequired","onClick","func","type","oneOf","buttonLinkType","icon","shape","iconPropTypes","theme","customStyle","objectOf","oneOfType","number","propTypes","buttons","arrayOf","_default"],"sources":["../../../src/atom/button-menu/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport {ButtonLinkProps, IconType, iconPropTypes} from '../button-link/types';\n\nexport const buttonPropTypes = {\n 'data-name': PropTypes.string,\n disabled: PropTypes.bool,\n label: PropTypes.string.isRequired,\n onClick: PropTypes.func.isRequired,\n type: PropTypes.oneOf(['default', 'defaultLeft', 'dangerous', 'dangerousLeft']),\n buttonLinkType: PropTypes.oneOf(['primary', 'secondary', 'tertiary', 'text', 'dangerous']),\n icon: PropTypes.shape({\n ...iconPropTypes,\n theme: PropTypes.oneOf(['archived', 'published', 'deleted'])\n }),\n customStyle: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number]))\n};\n\nconst propTypes = {\n buttons: PropTypes.arrayOf(PropTypes.shape(buttonPropTypes)).isRequired,\n 'data-name': PropTypes.string,\n 'aria-label': PropTypes.string\n};\n\nexport default propTypes;\n\nexport type Theme = 'archived' | 'published' | 'deleted';\n\nexport type ButtonProps = Omit<ButtonLinkProps, 'type' | 'icon'> & {\n type?: 'default' | 'defaultLeft' | 'dangerous' | 'dangerousLeft';\n buttonLinkType?: ButtonLinkProps['type'];\n icon?: IconType & {theme?: Theme};\n};\n\nexport type ButtonMenuProps = {\n buttons: ButtonProps[];\n 'data-name'?: string;\n 'aria-label'?: string;\n};\n\nexport type ButtonMenuPropsFixture = {props: ButtonMenuProps};\n"],"mappings":";;;;AAAA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAA8E,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEvE,MAAMG,eAAe,GAAAC,OAAA,CAAAD,eAAA,GAAG;EAC7B,WAAW,EAAEE,kBAAS,CAACC,MAAM;EAC7BC,QAAQ,EAAEF,kBAAS,CAACG,IAAI;EACxBC,KAAK,EAAEJ,kBAAS,CAACC,MAAM,CAACI,UAAU;EAClCC,OAAO,EAAEN,kBAAS,CAACO,IAAI,CAACF,UAAU;EAClCG,IAAI,EAAER,kBAAS,CAACS,KAAK,CAAC,CAAC,SAAS,EAAE,aAAa,EAAE,WAAW,EAAE,eAAe,CAAC,CAAC;EAC/EC,cAAc,EAAEV,kBAAS,CAACS,KAAK,CAAC,CAAC,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC;EAC1FE,IAAI,EAAEX,kBAAS,CAACY,KAAK,CAAC;IACpB,GAAGC,oBAAa;IAChBC,KAAK,EAAEd,kBAAS,CAACS,KAAK,CAAC,CAAC,UAAU,EAAE,WAAW,EAAE,SAAS,CAAC;EAC7D,CAAC,CAAC;EACFM,WAAW,EAAEf,kBAAS,CAACgB,QAAQ,CAAChB,kBAAS,CAACiB,SAAS,CAAC,CAACjB,kBAAS,CAACC,MAAM,EAAED,kBAAS,CAACkB,MAAM,CAAC,CAAC;AAC3F,CAAC;AAED,MAAMC,SAAS,GAAG;EAChBC,OAAO,EAAEpB,kBAAS,CAACqB,OAAO,CAACrB,kBAAS,CAACY,KAAK,CAACd,eAAe,CAAC,CAAC,CAACO,UAAU;EACvE,WAAW,EAAEL,kBAAS,CAACC,MAAM;EAC7B,YAAY,EAAED,kBAAS,CAACC;AAC1B,CAAC;AAAC,IAAAqB,QAAA,GAAAvB,OAAA,CAAAF,OAAA,GAEasB,SAAS","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/bullet-point-menu-button/index.tsx"],"names":[],"mappings":";AAKA,OAAkB,EAAC,0BAA0B,EAAC,MAAM,SAAS,CAAC;AAG9D,QAAA,MAAM,qBAAqB;YAAW,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/bullet-point-menu-button/index.tsx"],"names":[],"mappings":";AAKA,OAAkB,EAAC,0BAA0B,EAAC,MAAM,SAAS,CAAC;AAG9D,QAAA,MAAM,qBAAqB;YAAW,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4D/D,CAAC;AAIF,eAAe,qBAAqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_react","_interopRequireWildcard","require","_classnames","_interopRequireDefault","_buttonLinkIcon","_buttonMenu","_types","_style","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","BulletPointMenuButton","props","disabled","buttonAriaLabel","menuAriaLabel","onClick","_noop2","buttons","menuButtonClassName","isBulkMenu","visible","setVisible","useState","handleOnClick","useCallback","useEffect","handleMouseDown","document","addEventListener","removeEventListener","menuProps","menu","createElement","className","classnames","style","bulletPointMenu","bulkBulletPointMenu","bulletPointButtonProps","size","icon","bulletPointWrapper","propTypes","process","env","NODE_ENV","_default","exports"],"sources":["../../../src/molecule/bullet-point-menu-button/index.tsx"],"sourcesContent":["import React, {useCallback, useState, useEffect} from 'react';\nimport classnames from 'classnames';\nimport {noop} from 'lodash/fp';\nimport ButtonLinkIcon from '../../atom/button-link-icon';\nimport ButtonMenu from '../../atom/button-menu';\nimport propTypes, {BulletPointMenuButtonProps} from './types';\nimport style from './style.css';\n\nconst BulletPointMenuButton = (props: BulletPointMenuButtonProps) => {\n const {\n disabled = false,\n buttonAriaLabel,\n menuAriaLabel,\n onClick = noop,\n buttons,\n menuButtonClassName,\n isBulkMenu\n } = props;\n const [visible, setVisible] = useState(false);\n\n const handleOnClick = useCallback(() => {\n onClick();\n setVisible(true);\n }, [onClick]);\n\n useEffect(() => {\n const handleMouseDown = () => setVisible(false);\n document.addEventListener('mousedown', handleMouseDown);\n return () => {\n document.removeEventListener('mousedown', handleMouseDown);\n };\n }, []);\n\n const menuProps = {\n 'data-name': 'button-menu',\n buttons\n };\n\n const menu = (\n <div\n className={classnames(\n style.bulletPointMenu,\n isBulkMenu && style.bulkBulletPointMenu,\n visible && style.visible\n )}\n data-name=\"menu-wrapper\"\n aria-label={menuAriaLabel}\n >\n <ButtonMenu {...menuProps} />\n </div>\n );\n const bulletPointButtonProps = {\n size: 'default',\n 'aria-label': buttonAriaLabel,\n 'data-name': 'bullet-point-button',\n icon: 'bullet-point',\n onClick: handleOnClick,\n disabled,\n className: menuButtonClassName\n };\n\n return (\n <div className={style.bulletPointWrapper} data-name=\"bullet-point-wrapper\">\n <ButtonLinkIcon {...bulletPointButtonProps} />\n {menu}\n </div>\n );\n};\n\nBulletPointMenuButton.propTypes = propTypes;\n\nexport default BulletPointMenuButton;\n"],"mappings":";;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,eAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,WAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,MAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,MAAA,GAAAJ,sBAAA,CAAAF,O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;EACnE,MAAM;IACJC,QAAQ,GAAG,KAAK;IAChBC,eAAe;IACfC,aAAa;IACbC,OAAO,GAAAC,MAAA,CAAApB,OAAO;IACdqB,OAAO;IACPC,mBAAmB;IACnBC;EACF,CAAC,GAAGR,KAAK;EACT,MAAM,CAACS,OAAO,EAAEC,UAAU,CAAC,GAAG,IAAAC,eAAQ,EAAC,KAAK,CAAC;EAE7C,MAAMC,aAAa,GAAG,IAAAC,kBAAW,EAAC,MAAM;
|
|
1
|
+
{"version":3,"file":"index.js","names":["_react","_interopRequireWildcard","require","_classnames","_interopRequireDefault","_buttonLinkIcon","_buttonMenu","_types","_style","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","BulletPointMenuButton","props","disabled","buttonAriaLabel","menuAriaLabel","onClick","_noop2","buttons","menuButtonClassName","isBulkMenu","visible","setVisible","useState","handleOnClick","useCallback","console","log","useEffect","handleMouseDown","document","addEventListener","removeEventListener","menuProps","menu","createElement","className","classnames","style","bulletPointMenu","bulkBulletPointMenu","bulletPointButtonProps","size","icon","bulletPointWrapper","propTypes","process","env","NODE_ENV","_default","exports"],"sources":["../../../src/molecule/bullet-point-menu-button/index.tsx"],"sourcesContent":["import React, {useCallback, useState, useEffect} from 'react';\nimport classnames from 'classnames';\nimport {noop} from 'lodash/fp';\nimport ButtonLinkIcon from '../../atom/button-link-icon';\nimport ButtonMenu from '../../atom/button-menu';\nimport propTypes, {BulletPointMenuButtonProps} from './types';\nimport style from './style.css';\n\nconst BulletPointMenuButton = (props: BulletPointMenuButtonProps) => {\n const {\n disabled = false,\n buttonAriaLabel,\n menuAriaLabel,\n onClick = noop,\n buttons,\n menuButtonClassName,\n isBulkMenu\n } = props;\n const [visible, setVisible] = useState(false);\n\n const handleOnClick = useCallback(() => {\n console.log('on click');\n onClick();\n setVisible(true);\n }, [onClick]);\n\n useEffect(() => {\n const handleMouseDown = () => setVisible(false);\n document.addEventListener('mousedown', handleMouseDown);\n return () => {\n document.removeEventListener('mousedown', handleMouseDown);\n };\n }, []);\n\n const menuProps = {\n 'data-name': 'button-menu',\n buttons\n };\n\n const menu = (\n <div\n className={classnames(\n style.bulletPointMenu,\n isBulkMenu && style.bulkBulletPointMenu,\n visible && style.visible\n )}\n data-name=\"menu-wrapper\"\n aria-label={menuAriaLabel}\n >\n <ButtonMenu {...menuProps} />\n </div>\n );\n const bulletPointButtonProps = {\n size: 'default',\n 'aria-label': buttonAriaLabel,\n 'data-name': 'bullet-point-button',\n icon: 'bullet-point',\n onClick: handleOnClick,\n disabled,\n className: menuButtonClassName\n };\n\n return (\n <div className={style.bulletPointWrapper} data-name=\"bullet-point-wrapper\">\n <ButtonLinkIcon {...bulletPointButtonProps} />\n {menu}\n </div>\n );\n};\n\nBulletPointMenuButton.propTypes = propTypes;\n\nexport default BulletPointMenuButton;\n"],"mappings":";;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,eAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,WAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,MAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,MAAA,GAAAJ,sBAAA,CAAAF,OAAA;AAAgC,SAAAO,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAT,wBAAAS,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,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AC,GAAA,CAAAC,QAAA,oBAAGH,cAAS;AAAC,IAAAI,QAAA,GAAAC,OAAA,CAAArD,OAAA,GAE7Bc,qBAAqB","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coorpacademy/components",
|
|
3
|
-
"version": "11.33.13-alpha.
|
|
3
|
+
"version": "11.33.13-alpha.14+4b5f20825",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -165,5 +165,5 @@
|
|
|
165
165
|
"last 2 versions",
|
|
166
166
|
"IE 11"
|
|
167
167
|
],
|
|
168
|
-
"gitHead": "
|
|
168
|
+
"gitHead": "4b5f20825269469aef5d614cd9aac311bb32bb21"
|
|
169
169
|
}
|