@coorpacademy/components 11.37.0 → 11.38.0

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.
Files changed (40) hide show
  1. package/es/organism/header-with-actions/index.d.ts +15 -73
  2. package/es/organism/header-with-actions/index.d.ts.map +1 -1
  3. package/es/organism/header-with-actions/index.js +77 -5
  4. package/es/organism/header-with-actions/index.js.map +1 -1
  5. package/es/organism/header-with-actions/types.d.ts +38 -81
  6. package/es/organism/header-with-actions/types.d.ts.map +1 -1
  7. package/es/organism/header-with-actions/types.js +25 -12
  8. package/es/organism/header-with-actions/types.js.map +1 -1
  9. package/es/organism/skill-edition/index.d.ts.map +1 -1
  10. package/es/organism/skill-edition/index.js +0 -1
  11. package/es/organism/skill-edition/index.js.map +1 -1
  12. package/es/template/back-office/brand-update/index.d.ts +15 -73
  13. package/es/template/back-office/brand-update/index.d.ts.map +1 -1
  14. package/es/template/back-office/brand-update/index.js +4 -6
  15. package/es/template/back-office/brand-update/index.js.map +1 -1
  16. package/es/template/back-office/brand-update/style.css +4 -4
  17. package/es/template/back-office/brand-update/utils.d.ts +38 -10
  18. package/es/template/back-office/brand-update/utils.js +19 -0
  19. package/es/template/back-office/brand-update/utils.js.map +1 -1
  20. package/lib/organism/header-with-actions/index.d.ts +15 -73
  21. package/lib/organism/header-with-actions/index.d.ts.map +1 -1
  22. package/lib/organism/header-with-actions/index.js +75 -3
  23. package/lib/organism/header-with-actions/index.js.map +1 -1
  24. package/lib/organism/header-with-actions/types.d.ts +38 -81
  25. package/lib/organism/header-with-actions/types.d.ts.map +1 -1
  26. package/lib/organism/header-with-actions/types.js +25 -12
  27. package/lib/organism/header-with-actions/types.js.map +1 -1
  28. package/lib/organism/skill-edition/index.d.ts.map +1 -1
  29. package/lib/organism/skill-edition/index.js +0 -1
  30. package/lib/organism/skill-edition/index.js.map +1 -1
  31. package/lib/template/back-office/brand-update/index.d.ts +15 -73
  32. package/lib/template/back-office/brand-update/index.d.ts.map +1 -1
  33. package/lib/template/back-office/brand-update/index.js +4 -6
  34. package/lib/template/back-office/brand-update/index.js.map +1 -1
  35. package/lib/template/back-office/brand-update/style.css +4 -4
  36. package/lib/template/back-office/brand-update/utils.d.ts +38 -10
  37. package/lib/template/back-office/brand-update/utils.js +19 -0
  38. package/lib/template/back-office/brand-update/utils.js.map +1 -1
  39. package/locales/.mtslconfig.json +1 -0
  40. package/package.json +2 -2
@@ -4,10 +4,7 @@ declare const HeaderWithActions: {
4
4
  (props: HeaderWithActionsProps): JSX.Element;
5
5
  propTypes: {
6
6
  closeButton: import("prop-types").Requireable<import("prop-types").InferProps<{
7
- size: import("prop-types").Validator<string>;
8
- icon: import("prop-types").Validator<string>;
9
- 'data-name': import("prop-types").Validator<string>;
10
- 'aria-label': import("prop-types").Validator<string>;
7
+ 'aria-label': import("prop-types").Requireable<string>;
11
8
  onClick: import("prop-types").Validator<(...args: any[]) => any>;
12
9
  }>>;
13
10
  title: import("prop-types").Validator<string>;
@@ -20,80 +17,25 @@ declare const HeaderWithActions: {
20
17
  display: import("prop-types").Validator<boolean>;
21
18
  label: import("prop-types").Requireable<string>;
22
19
  }>>>;
23
- bulletPointMenuButton: import("prop-types").Requireable<import("prop-types").InferProps<{
24
- 'data-name': import("prop-types").Requireable<string>;
20
+ actionButtons: import("prop-types").Validator<(import("prop-types").InferProps<{
21
+ type: import("prop-types").Validator<string>;
22
+ label: import("prop-types").Validator<string>;
23
+ onClick: import("prop-types").Validator<(...args: any[]) => any>;
25
24
  disabled: import("prop-types").Requireable<boolean>;
26
- buttonAriaLabel: import("prop-types").Requireable<string>;
27
- menuAriaLabel: import("prop-types").Requireable<string>;
25
+ iconName: import("prop-types").Requireable<string>;
26
+ iconColor: import("prop-types").Requireable<string>;
27
+ }> | null | undefined)[]>;
28
+ bulletPointMenuButton: import("prop-types").Requireable<import("prop-types").InferProps<{
28
29
  buttons: import("prop-types").Validator<(import("prop-types").InferProps<{
29
- 'data-name': import("prop-types").Requireable<string>;
30
- disabled: import("prop-types").Requireable<boolean>;
30
+ dataName: import("prop-types").Requireable<string>;
31
31
  label: import("prop-types").Validator<string>;
32
- onClick: import("prop-types").Requireable<(...args: any[]) => any>;
33
- type: import("prop-types").Requireable<string>;
34
- buttonLinkType: import("prop-types").Requireable<string>;
35
- icon: import("prop-types").Requireable<import("prop-types").InferProps<{
36
- theme: import("prop-types").Requireable<string>;
37
- position: import("prop-types").Requireable<string>;
38
- type: import("prop-types").Requireable<string>;
39
- faIcon: import("prop-types").Requireable<import("prop-types").InferProps<{
40
- name: import("prop-types").Validator<string>;
41
- color: import("prop-types").Requireable<string>;
42
- backgroundColor: import("prop-types").Requireable<string>;
43
- size: import("prop-types").Requireable<number>;
44
- customStyle: import("prop-types").Requireable<{
45
- [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
46
- }>;
47
- }>>;
48
- }>>;
49
- customStyle: import("prop-types").Requireable<{
50
- [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
51
- }>;
52
- customLabelClassName: import("prop-types").Requireable<string>;
32
+ iconName: import("prop-types").Validator<string>;
33
+ iconColor: import("prop-types").Validator<string>;
34
+ onClick: import("prop-types").Validator<(...args: any[]) => any>;
53
35
  }> | null | undefined)[]>;
54
- onClick: import("prop-types").Requireable<(...args: any[]) => any>;
55
- menuButtonClassName: import("prop-types").Requireable<string>;
56
- isBulkMenu: import("prop-types").Requireable<boolean>;
36
+ buttonAriaLabel: import("prop-types").Requireable<string>;
37
+ disabled: import("prop-types").Validator<boolean>;
57
38
  }>>;
58
- actionButtons: import("prop-types").Validator<(import("prop-types").InferProps<{
59
- type: import("prop-types").Requireable<string>;
60
- usage: import("prop-types").Requireable<string>;
61
- label: import("prop-types").Requireable<string>;
62
- content: import("prop-types").Requireable<import("prop-types").ReactNodeLike>;
63
- 'aria-label': import("prop-types").Requireable<string>;
64
- tooltipText: import("prop-types").Requireable<string>;
65
- tooltipPlacement: import("prop-types").Requireable<string>;
66
- 'data-name': import("prop-types").Requireable<string>;
67
- 'data-testid': import("prop-types").Requireable<string>;
68
- icon: import("prop-types").Requireable<import("prop-types").InferProps<{
69
- position: import("prop-types").Requireable<string>;
70
- type: import("prop-types").Requireable<string>;
71
- faIcon: import("prop-types").Requireable<import("prop-types").InferProps<{
72
- name: import("prop-types").Validator<string>;
73
- color: import("prop-types").Requireable<string>;
74
- backgroundColor: import("prop-types").Requireable<string>;
75
- size: import("prop-types").Requireable<number>;
76
- customStyle: import("prop-types").Requireable<{
77
- [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
78
- }>;
79
- }>>;
80
- }>>;
81
- onClick: import("prop-types").Requireable<(...args: any[]) => any>;
82
- link: import("prop-types").Requireable<import("prop-types").InferProps<{
83
- href: import("prop-types").Requireable<string>;
84
- download: import("prop-types").Requireable<boolean>;
85
- target: import("prop-types").Requireable<string>;
86
- }>>;
87
- hoverBackgroundColor: import("prop-types").Requireable<string>;
88
- hoverColor: import("prop-types").Requireable<string>;
89
- disabled: import("prop-types").Requireable<boolean>;
90
- className: import("prop-types").Requireable<string>;
91
- customStyle: import("prop-types").Requireable<{
92
- [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
93
- }>;
94
- useTitle: import("prop-types").Requireable<boolean>;
95
- customLabelClassName: import("prop-types").Requireable<string>;
96
- }> | null | undefined)[]>;
97
39
  };
98
40
  };
99
41
  export default HeaderWithActions;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/header-with-actions/index.tsx"],"names":[],"mappings":";AAQA,OAAmC,EAAC,sBAAsB,EAAC,MAAM,SAAS,CAAC;AAO3E,QAAA,MAAM,iBAAiB;YAAW,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCvD,CAAC;AAIF,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/header-with-actions/index.tsx"],"names":[],"mappings":";AAOA,OAAmC,EACjC,sBAAsB,EAGvB,MAAM,SAAS,CAAC;AAuEjB,QAAA,MAAM,iBAAiB;YAAW,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0CvD,CAAC;AAIF,eAAe,iBAAiB,CAAC"}
@@ -6,13 +6,81 @@ import ButtonLink from '../../atom/button-link';
6
6
  import ButtonLinkIcon from '../../atom/button-link-icon';
7
7
  import Tag from '../../atom/tag';
8
8
  import BulletPointMenuButton from '../../molecule/bullet-point-menu-button';
9
- import headerWithActionsPropTypes from './types';
9
+ import HeaderWithActionsPropTypes from './types';
10
10
  import style from './style.css';
11
11
  const getDataName = suffix => `header-with-actions-${suffix}`;
12
12
  // @ts-expect-error (need to get the index)
13
13
  const uncappedMap = map.convert({
14
14
  cap: false
15
15
  });
16
+ const buildCloseButton = ({
17
+ onClick,
18
+ ariaLabel
19
+ }) => {
20
+ return {
21
+ size: 'default',
22
+ icon: 'close',
23
+ 'data-name': 'close-button',
24
+ 'aria-label': ariaLabel,
25
+ onClick
26
+ };
27
+ };
28
+ const buildButtonMenu = ({
29
+ dataName,
30
+ label,
31
+ iconName,
32
+ iconColor,
33
+ onClick
34
+ }) => {
35
+ return {
36
+ 'data-name': dataName,
37
+ label,
38
+ buttonLinkType: 'tertiary',
39
+ icon: {
40
+ position: 'left',
41
+ faIcon: {
42
+ name: iconName,
43
+ color: iconColor,
44
+ size: 14
45
+ }
46
+ },
47
+ onClick,
48
+ type: iconName === 'trash' ? 'dangerousLeft' : 'defaultLeft'
49
+ };
50
+ };
51
+ const buildActionButton = ({
52
+ type,
53
+ label,
54
+ onClick,
55
+ disabled,
56
+ iconName,
57
+ iconColor
58
+ }) => {
59
+ const base = {
60
+ type,
61
+ label,
62
+ onClick,
63
+ disabled,
64
+ customStyle: {
65
+ fontWeight: '600',
66
+ borderRadius: '12px'
67
+ }
68
+ };
69
+ if (iconName && iconColor) {
70
+ return {
71
+ ...base,
72
+ icon: {
73
+ position: 'left',
74
+ faIcon: {
75
+ name: iconName,
76
+ color: iconColor,
77
+ size: 14
78
+ }
79
+ }
80
+ };
81
+ }
82
+ return base;
83
+ };
16
84
  const HeaderWithActions = props => {
17
85
  const {
18
86
  closeButton,
@@ -28,7 +96,10 @@ const HeaderWithActions = props => {
28
96
  }, /*#__PURE__*/React.createElement("div", {
29
97
  className: style.titleAndButtonWrapper,
30
98
  "data-name": getDataName('title-and-button-wrapper')
31
- }, /*#__PURE__*/React.createElement(ButtonLinkIcon, _extends({}, closeButton, {
99
+ }, /*#__PURE__*/React.createElement(ButtonLinkIcon, _extends({}, buildCloseButton({
100
+ onClick: closeButton.onClick,
101
+ ariaLabel: closeButton['aria-label']
102
+ }), {
32
103
  className: style.button
33
104
  })), /*#__PURE__*/React.createElement("div", {
34
105
  className: style.titleWrapper
@@ -44,13 +115,14 @@ const HeaderWithActions = props => {
44
115
  className: style.buttonsWrapper,
45
116
  "data-name": getDataName('buttons-wrapper')
46
117
  }, bulletPointMenuButton && !isEmpty(bulletPointMenuButton.buttons) ? /*#__PURE__*/React.createElement(BulletPointMenuButton, _extends({}, bulletPointMenuButton, {
47
- buttonAriaLabel: "More actions"
118
+ buttons: uncappedMap(buildButtonMenu, bulletPointMenuButton.buttons),
119
+ "data-name": getDataName('bullet-point-menu-button')
48
120
  })) : null, uncappedMap((action, key) => {
49
- return /*#__PURE__*/React.createElement(ButtonLink, _extends({}, action, {
121
+ return /*#__PURE__*/React.createElement(ButtonLink, _extends({}, buildActionButton(action), {
50
122
  key: key
51
123
  }));
52
124
  }, actionButtons)));
53
125
  };
54
- HeaderWithActions.propTypes = process.env.NODE_ENV !== "production" ? headerWithActionsPropTypes : {};
126
+ HeaderWithActions.propTypes = process.env.NODE_ENV !== "production" ? HeaderWithActionsPropTypes : {};
55
127
  export default HeaderWithActions;
56
128
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","isEmpty","map","ButtonLink","ButtonLinkIcon","Tag","BulletPointMenuButton","headerWithActionsPropTypes","style","getDataName","suffix","uncappedMap","convert","cap","HeaderWithActions","props","closeButton","title","tag","saveStatus","bulletPointMenuButton","actionButtons","createElement","className","headerWrapper","titleAndButtonWrapper","_extends","button","titleWrapper","statusWrapper","display","label","buttonsWrapper","buttons","buttonAriaLabel","action","key","propTypes","process","env","NODE_ENV"],"sources":["../../../src/organism/header-with-actions/index.tsx"],"sourcesContent":["import React from 'react';\nimport isEmpty from 'lodash/fp/isEmpty';\nimport map from 'lodash/fp/map';\nimport ButtonLink from '../../atom/button-link';\nimport ButtonLinkIcon from '../../atom/button-link-icon';\nimport Tag from '../../atom/tag';\nimport {ButtonLinkProps} from '../../atom/button-link/types';\nimport BulletPointMenuButton from '../../molecule/bullet-point-menu-button';\nimport headerWithActionsPropTypes, {HeaderWithActionsProps} from './types';\nimport style from './style.css';\n\nconst getDataName = (suffix: string) => `header-with-actions-${suffix}`;\n// @ts-expect-error (need to get the index)\nconst uncappedMap = map.convert({cap: false});\n\nconst HeaderWithActions = (props: HeaderWithActionsProps) => {\n const {closeButton, title, tag, saveStatus, bulletPointMenuButton, actionButtons} = props;\n\n return (\n <div className={style.headerWrapper} data-name={getDataName('wrapper')}>\n <div\n className={style.titleAndButtonWrapper}\n data-name={getDataName('title-and-button-wrapper')}\n >\n <ButtonLinkIcon {...closeButton} className={style.button} />\n <div className={style.titleWrapper}>\n <div className={style.statusWrapper}>\n <Tag {...tag} />\n {saveStatus.display && saveStatus.label ? (\n <p className={style.saveStatus}>{saveStatus.label}</p>\n ) : null}\n </div>\n <h3 className={style.title} aria-label={title} data-name={getDataName('title')}>\n {title}\n </h3>\n </div>\n </div>\n <div className={style.buttonsWrapper} data-name={getDataName('buttons-wrapper')}>\n {bulletPointMenuButton && !isEmpty(bulletPointMenuButton.buttons) ? (\n <BulletPointMenuButton {...bulletPointMenuButton} buttonAriaLabel=\"More actions\" />\n ) : null}\n {uncappedMap((action: ButtonLinkProps, key: string) => {\n return <ButtonLink {...action} key={key} />;\n }, actionButtons)}\n </div>\n </div>\n );\n};\n\nHeaderWithActions.propTypes = headerWithActionsPropTypes;\n\nexport default HeaderWithActions;\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,OAAO,MAAM,mBAAmB;AACvC,OAAOC,GAAG,MAAM,eAAe;AAC/B,OAAOC,UAAU,MAAM,wBAAwB;AAC/C,OAAOC,cAAc,MAAM,6BAA6B;AACxD,OAAOC,GAAG,MAAM,gBAAgB;AAEhC,OAAOC,qBAAqB,MAAM,yCAAyC;AAC3E,OAAOC,0BAA0B,MAAgC,SAAS;AAC1E,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,WAAW,GAAIC,MAAc,IAAK,uBAAuBA,MAAM,EAAE;AACvE;AACA,MAAMC,WAAW,GAAGT,GAAG,CAACU,OAAO,CAAC;EAACC,GAAG,EAAE;AAAK,CAAC,CAAC;AAE7C,MAAMC,iBAAiB,GAAIC,KAA6B,IAAK;EAC3D,MAAM;IAACC,WAAW;IAAEC,KAAK;IAAEC,GAAG;IAAEC,UAAU;IAAEC,qBAAqB;IAAEC;EAAa,CAAC,GAAGN,KAAK;EAEzF,oBACEf,KAAA,CAAAsB,aAAA;IAAKC,SAAS,EAAEf,KAAK,CAACgB,aAAc;IAAC,aAAWf,WAAW,CAAC,SAAS;EAAE,gBACrET,KAAA,CAAAsB,aAAA;IACEC,SAAS,EAAEf,KAAK,CAACiB,qBAAsB;IACvC,aAAWhB,WAAW,CAAC,0BAA0B;EAAE,gBAEnDT,KAAA,CAAAsB,aAAA,CAAClB,cAAc,EAAAsB,QAAA,KAAKV,WAAW;IAAEO,SAAS,EAAEf,KAAK,CAACmB;EAAO,EAAE,CAAC,eAC5D3B,KAAA,CAAAsB,aAAA;IAAKC,SAAS,EAAEf,KAAK,CAACoB;EAAa,gBACjC5B,KAAA,CAAAsB,aAAA;IAAKC,SAAS,EAAEf,KAAK,CAACqB;EAAc,gBAClC7B,KAAA,CAAAsB,aAAA,CAACjB,GAAG,EAAKa,GAAM,CAAC,EACfC,UAAU,CAACW,OAAO,IAAIX,UAAU,CAACY,KAAK,gBACrC/B,KAAA,CAAAsB,aAAA;IAAGC,SAAS,EAAEf,KAAK,CAACW;EAAW,GAAEA,UAAU,CAACY,KAAS,CAAC,GACpD,IACD,CAAC,eACN/B,KAAA,CAAAsB,aAAA;IAAIC,SAAS,EAAEf,KAAK,CAACS,KAAM;IAAC,cAAYA,KAAM;IAAC,aAAWR,WAAW,CAAC,OAAO;EAAE,GAC5EQ,KACC,CACD,CACF,CAAC,eACNjB,KAAA,CAAAsB,aAAA;IAAKC,SAAS,EAAEf,KAAK,CAACwB,cAAe;IAAC,aAAWvB,WAAW,CAAC,iBAAiB;EAAE,GAC7EW,qBAAqB,IAAI,CAACnB,OAAO,CAACmB,qBAAqB,CAACa,OAAO,CAAC,gBAC/DjC,KAAA,CAAAsB,aAAA,CAAChB,qBAAqB,EAAAoB,QAAA,KAAKN,qBAAqB;IAAEc,eAAe,EAAC;EAAc,EAAE,CAAC,GACjF,IAAI,EACPvB,WAAW,CAAC,CAACwB,MAAuB,EAAEC,GAAW,KAAK;IACrD,oBAAOpC,KAAA,CAAAsB,aAAA,CAACnB,UAAU,EAAAuB,QAAA,KAAKS,MAAM;MAAEC,GAAG,EAAEA;IAAI,EAAE,CAAC;EAC7C,CAAC,EAAEf,aAAa,CACb,CACF,CAAC;AAEV,CAAC;AAEDP,iBAAiB,CAACuB,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGjC,0BAA0B;AAExD,eAAeO,iBAAiB","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["React","isEmpty","map","ButtonLink","ButtonLinkIcon","Tag","BulletPointMenuButton","HeaderWithActionsPropTypes","style","getDataName","suffix","uncappedMap","convert","cap","buildCloseButton","onClick","ariaLabel","size","icon","buildButtonMenu","dataName","label","iconName","iconColor","buttonLinkType","position","faIcon","name","color","type","buildActionButton","disabled","base","customStyle","fontWeight","borderRadius","HeaderWithActions","props","closeButton","title","tag","saveStatus","bulletPointMenuButton","actionButtons","createElement","className","headerWrapper","titleAndButtonWrapper","_extends","button","titleWrapper","statusWrapper","display","buttonsWrapper","buttons","action","key","propTypes","process","env","NODE_ENV"],"sources":["../../../src/organism/header-with-actions/index.tsx"],"sourcesContent":["import React from 'react';\nimport isEmpty from 'lodash/fp/isEmpty';\nimport map from 'lodash/fp/map';\nimport ButtonLink from '../../atom/button-link';\nimport ButtonLinkIcon from '../../atom/button-link-icon';\nimport Tag from '../../atom/tag';\nimport BulletPointMenuButton from '../../molecule/bullet-point-menu-button';\nimport HeaderWithActionsPropTypes, {\n HeaderWithActionsProps,\n ButtonMenuProps,\n ButtonActionProps\n} from './types';\nimport style from './style.css';\n\nconst getDataName = (suffix: string) => `header-with-actions-${suffix}`;\n// @ts-expect-error (need to get the index)\nconst uncappedMap = map.convert({cap: false});\n\nconst buildCloseButton = ({onClick, ariaLabel}: {onClick: () => void; ariaLabel: string}) => {\n return {\n size: 'default',\n icon: 'close',\n 'data-name': 'close-button',\n 'aria-label': ariaLabel,\n onClick\n };\n};\n\nconst buildButtonMenu = ({dataName, label, iconName, iconColor, onClick}: ButtonMenuProps) => {\n return {\n 'data-name': dataName,\n label,\n buttonLinkType: 'tertiary',\n icon: {\n position: 'left' as const,\n faIcon: {\n name: iconName,\n color: iconColor,\n size: 14\n }\n },\n onClick,\n type: iconName === 'trash' ? 'dangerousLeft' : 'defaultLeft'\n };\n};\n\nconst buildActionButton = ({\n type,\n label,\n onClick,\n disabled,\n iconName,\n iconColor\n}: ButtonActionProps) => {\n const base = {\n type,\n label,\n onClick,\n disabled,\n customStyle: {\n fontWeight: '600',\n borderRadius: '12px'\n }\n };\n\n if (iconName && iconColor) {\n return {\n ...base,\n icon: {\n position: 'left' as const,\n faIcon: {\n name: iconName,\n color: iconColor,\n size: 14\n }\n }\n };\n }\n\n return base;\n};\n\nconst HeaderWithActions = (props: HeaderWithActionsProps) => {\n const {closeButton, title, tag, saveStatus, bulletPointMenuButton, actionButtons} = props;\n\n return (\n <div className={style.headerWrapper} data-name={getDataName('wrapper')}>\n <div\n className={style.titleAndButtonWrapper}\n data-name={getDataName('title-and-button-wrapper')}\n >\n <ButtonLinkIcon\n {...buildCloseButton({\n onClick: closeButton.onClick,\n ariaLabel: closeButton['aria-label']\n })}\n className={style.button}\n />\n <div className={style.titleWrapper}>\n <div className={style.statusWrapper}>\n <Tag {...tag} />\n {saveStatus.display && saveStatus.label ? (\n <p className={style.saveStatus}>{saveStatus.label}</p>\n ) : null}\n </div>\n <h3 className={style.title} aria-label={title} data-name={getDataName('title')}>\n {title}\n </h3>\n </div>\n </div>\n <div className={style.buttonsWrapper} data-name={getDataName('buttons-wrapper')}>\n {bulletPointMenuButton && !isEmpty(bulletPointMenuButton.buttons) ? (\n <BulletPointMenuButton\n {...bulletPointMenuButton}\n buttons={uncappedMap(buildButtonMenu, bulletPointMenuButton.buttons)}\n data-name={getDataName('bullet-point-menu-button')}\n />\n ) : null}\n {uncappedMap((action: ButtonActionProps, key: string) => {\n return <ButtonLink {...buildActionButton(action)} key={key} />;\n }, actionButtons)}\n </div>\n </div>\n );\n};\n\nHeaderWithActions.propTypes = HeaderWithActionsPropTypes;\n\nexport default HeaderWithActions;\n"],"mappings":";AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,OAAO,MAAM,mBAAmB;AACvC,OAAOC,GAAG,MAAM,eAAe;AAC/B,OAAOC,UAAU,MAAM,wBAAwB;AAC/C,OAAOC,cAAc,MAAM,6BAA6B;AACxD,OAAOC,GAAG,MAAM,gBAAgB;AAChC,OAAOC,qBAAqB,MAAM,yCAAyC;AAC3E,OAAOC,0BAA0B,MAI1B,SAAS;AAChB,OAAOC,KAAK,MAAM,aAAa;AAE/B,MAAMC,WAAW,GAAIC,MAAc,IAAK,uBAAuBA,MAAM,EAAE;AACvE;AACA,MAAMC,WAAW,GA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AW,CAAC,iBAAiB;EAAE,GAC7EiC,qBAAqB,IAAI,CAACzC,OAAO,CAACyC,qBAAqB,CAACY,OAAO,CAAC,gBAC/DtD,KAAA,CAAA4C,aAAA,CAACtC,qBAAqB,EAAA0C,QAAA,KAChBN,qBAAqB;IACzBY,OAAO,EAAE3C,WAAW,CAACQ,eAAe,EAAEuB,qBAAqB,CAACY,OAAO,CAAE;IACrE,aAAW7C,WAAW,CAAC,0BAA0B;EAAE,EACpD,CAAC,GACA,IAAI,EACPE,WAAW,CAAC,CAAC4C,MAAyB,EAAEC,GAAW,KAAK;IACvD,oBAAOxD,KAAA,CAAA4C,aAAA,CAACzC,UAAU,EAAA6C,QAAA,KAAKlB,iBAAiB,CAACyB,MAAM,CAAC;MAAEC,GAAG,EAAEA;IAAI,EAAE,CAAC;EAChE,CAAC,EAAEb,aAAa,CACb,CACF,CAAC;AAEV,CAAC;AAEDP,iBAAiB,CAACqB,SAAS,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,oBAAGrD,0BAA0B;AAExD,eAAe6B,iBAAiB","ignoreList":[]}
@@ -1,12 +1,7 @@
1
1
  import PropTypes from 'prop-types';
2
- import { BulletPointMenuButtonProps } from '../../molecule/bullet-point-menu-button/types';
3
- import { ButtonLinkProps } from '../../atom/button-link/types';
4
- declare const headerWithActionsPropTypes: {
2
+ declare const HeaderWithActionsPropTypes: {
5
3
  closeButton: PropTypes.Requireable<PropTypes.InferProps<{
6
- size: PropTypes.Validator<string>;
7
- icon: PropTypes.Validator<string>;
8
- 'data-name': PropTypes.Validator<string>;
9
- 'aria-label': PropTypes.Validator<string>;
4
+ 'aria-label': PropTypes.Requireable<string>;
10
5
  onClick: PropTypes.Validator<(...args: any[]) => any>;
11
6
  }>>;
12
7
  title: PropTypes.Validator<string>;
@@ -19,82 +14,27 @@ declare const headerWithActionsPropTypes: {
19
14
  display: PropTypes.Validator<boolean>;
20
15
  label: PropTypes.Requireable<string>;
21
16
  }>>>;
22
- bulletPointMenuButton: PropTypes.Requireable<PropTypes.InferProps<{
23
- 'data-name': PropTypes.Requireable<string>;
17
+ actionButtons: PropTypes.Validator<(PropTypes.InferProps<{
18
+ type: PropTypes.Validator<string>;
19
+ label: PropTypes.Validator<string>;
20
+ onClick: PropTypes.Validator<(...args: any[]) => any>;
24
21
  disabled: PropTypes.Requireable<boolean>;
25
- buttonAriaLabel: PropTypes.Requireable<string>;
26
- menuAriaLabel: PropTypes.Requireable<string>;
22
+ iconName: PropTypes.Requireable<string>;
23
+ iconColor: PropTypes.Requireable<string>;
24
+ }> | null | undefined)[]>;
25
+ bulletPointMenuButton: PropTypes.Requireable<PropTypes.InferProps<{
27
26
  buttons: PropTypes.Validator<(PropTypes.InferProps<{
28
- 'data-name': PropTypes.Requireable<string>;
29
- disabled: PropTypes.Requireable<boolean>;
27
+ dataName: PropTypes.Requireable<string>;
30
28
  label: PropTypes.Validator<string>;
31
- onClick: PropTypes.Requireable<(...args: any[]) => any>;
32
- type: PropTypes.Requireable<string>;
33
- buttonLinkType: PropTypes.Requireable<string>;
34
- icon: PropTypes.Requireable<PropTypes.InferProps<{
35
- theme: PropTypes.Requireable<string>;
36
- position: PropTypes.Requireable<string>;
37
- type: PropTypes.Requireable<string>;
38
- faIcon: PropTypes.Requireable<PropTypes.InferProps<{
39
- name: PropTypes.Validator<string>;
40
- color: PropTypes.Requireable<string>;
41
- backgroundColor: PropTypes.Requireable<string>;
42
- size: PropTypes.Requireable<number>;
43
- customStyle: PropTypes.Requireable<{
44
- [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
45
- }>;
46
- }>>;
47
- }>>;
48
- customStyle: PropTypes.Requireable<{
49
- [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
50
- }>;
51
- customLabelClassName: PropTypes.Requireable<string>;
29
+ iconName: PropTypes.Validator<string>;
30
+ iconColor: PropTypes.Validator<string>;
31
+ onClick: PropTypes.Validator<(...args: any[]) => any>;
52
32
  }> | null | undefined)[]>;
53
- onClick: PropTypes.Requireable<(...args: any[]) => any>;
54
- menuButtonClassName: PropTypes.Requireable<string>;
55
- isBulkMenu: PropTypes.Requireable<boolean>;
33
+ buttonAriaLabel: PropTypes.Requireable<string>;
34
+ disabled: PropTypes.Validator<boolean>;
56
35
  }>>;
57
- actionButtons: PropTypes.Validator<(PropTypes.InferProps<{
58
- type: PropTypes.Requireable<string>;
59
- usage: PropTypes.Requireable<string>;
60
- label: PropTypes.Requireable<string>;
61
- content: PropTypes.Requireable<PropTypes.ReactNodeLike>;
62
- 'aria-label': PropTypes.Requireable<string>;
63
- tooltipText: PropTypes.Requireable<string>;
64
- tooltipPlacement: PropTypes.Requireable<string>;
65
- 'data-name': PropTypes.Requireable<string>;
66
- 'data-testid': PropTypes.Requireable<string>;
67
- icon: PropTypes.Requireable<PropTypes.InferProps<{
68
- position: PropTypes.Requireable<string>;
69
- type: PropTypes.Requireable<string>;
70
- faIcon: PropTypes.Requireable<PropTypes.InferProps<{
71
- name: PropTypes.Validator<string>;
72
- color: PropTypes.Requireable<string>;
73
- backgroundColor: PropTypes.Requireable<string>;
74
- size: PropTypes.Requireable<number>;
75
- customStyle: PropTypes.Requireable<{
76
- [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
77
- }>;
78
- }>>;
79
- }>>;
80
- onClick: PropTypes.Requireable<(...args: any[]) => any>;
81
- link: PropTypes.Requireable<PropTypes.InferProps<{
82
- href: PropTypes.Requireable<string>;
83
- download: PropTypes.Requireable<boolean>;
84
- target: PropTypes.Requireable<string>;
85
- }>>;
86
- hoverBackgroundColor: PropTypes.Requireable<string>;
87
- hoverColor: PropTypes.Requireable<string>;
88
- disabled: PropTypes.Requireable<boolean>;
89
- className: PropTypes.Requireable<string>;
90
- customStyle: PropTypes.Requireable<{
91
- [x: string]: NonNullable<string | number | null | undefined> | null | undefined;
92
- }>;
93
- useTitle: PropTypes.Requireable<boolean>;
94
- customLabelClassName: PropTypes.Requireable<string>;
95
- }> | null | undefined)[]>;
96
36
  };
97
- export default headerWithActionsPropTypes;
37
+ export default HeaderWithActionsPropTypes;
98
38
  declare type TagProps = {
99
39
  label: 'Published' | 'Ongoing changes' | 'Draft' | 'Archived';
100
40
  type: 'success' | 'progress' | 'warning';
@@ -105,18 +45,35 @@ declare type SaveStatusProps = {
105
45
  label?: 'Unsaved changes' | 'Saved';
106
46
  };
107
47
  declare type CloseButtonProps = {
108
- size: 'default' | 'small' | 'responsive';
109
- icon: string;
110
- 'data-name': string;
111
48
  'aria-label': string;
112
49
  onClick: () => void;
113
50
  };
51
+ export declare type ButtonMenuProps = {
52
+ dataName: string;
53
+ label: string;
54
+ iconName: string;
55
+ iconColor: string;
56
+ onClick: () => void;
57
+ };
58
+ declare type BulletPointMenuButtonProps = {
59
+ buttons: ButtonMenuProps[];
60
+ buttonAriaLabel?: string;
61
+ disabled: boolean;
62
+ };
63
+ export declare type ButtonActionProps = {
64
+ type: 'primary' | 'secondary';
65
+ label: string;
66
+ onClick: () => void;
67
+ disabled?: boolean;
68
+ iconName?: string;
69
+ iconColor?: string;
70
+ };
114
71
  export declare type HeaderWithActionsProps = {
115
72
  closeButton: CloseButtonProps;
116
73
  title: string;
117
74
  tag: TagProps;
118
75
  saveStatus: SaveStatusProps;
119
- actionButtons: ButtonLinkProps[];
76
+ actionButtons: ButtonActionProps[];
120
77
  bulletPointMenuButton?: BulletPointMenuButtonProps;
121
78
  };
122
79
  export declare type HeaderWithActionsPropsFixture = {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/organism/header-with-actions/types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAuC,EACrC,0BAA0B,EAC3B,MAAM,+CAA+C,CAAC;AACvD,OAA4B,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC;AASlF,QAAA,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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 @@
1
1
  import PropTypes from 'prop-types';
2
- import bulletPointMenuButtonPropTypes from '../../molecule/bullet-point-menu-button/types';
3
- import ButtonLinkPropTypes from '../../atom/button-link/types';
4
- const closeButtonPropTypes = {
5
- size: PropTypes.oneOf(['default', 'small', 'responsive']).isRequired,
6
- icon: PropTypes.string.isRequired,
7
- 'data-name': PropTypes.string.isRequired,
8
- 'aria-label': PropTypes.string.isRequired,
2
+ const ButtonMenuPropTypes = {
3
+ dataName: PropTypes.string,
4
+ label: PropTypes.string.isRequired,
5
+ iconName: PropTypes.string.isRequired,
6
+ iconColor: PropTypes.string.isRequired,
9
7
  onClick: PropTypes.func.isRequired
10
8
  };
11
- const headerWithActionsPropTypes = {
12
- closeButton: PropTypes.shape(closeButtonPropTypes),
9
+ const ButtonActionPropTypes = {
10
+ type: PropTypes.oneOf(['primary', 'secondary']).isRequired,
11
+ label: PropTypes.string.isRequired,
12
+ onClick: PropTypes.func.isRequired,
13
+ disabled: PropTypes.bool,
14
+ iconName: PropTypes.string,
15
+ iconColor: PropTypes.string
16
+ };
17
+ const HeaderWithActionsPropTypes = {
18
+ closeButton: PropTypes.shape({
19
+ 'aria-label': PropTypes.string,
20
+ onClick: PropTypes.func.isRequired
21
+ }),
13
22
  title: PropTypes.string.isRequired,
14
23
  tag: PropTypes.shape({
15
24
  label: PropTypes.oneOf(['Published', 'Ongoing changes', 'Draft', 'Archived']).isRequired,
@@ -20,8 +29,12 @@ const headerWithActionsPropTypes = {
20
29
  display: PropTypes.bool.isRequired,
21
30
  label: PropTypes.oneOf(['Unsaved changes', 'Saved'])
22
31
  }).isRequired,
23
- bulletPointMenuButton: PropTypes.shape(bulletPointMenuButtonPropTypes),
24
- actionButtons: PropTypes.arrayOf(PropTypes.shape(ButtonLinkPropTypes)).isRequired
32
+ actionButtons: PropTypes.arrayOf(PropTypes.shape(ButtonActionPropTypes)).isRequired,
33
+ bulletPointMenuButton: PropTypes.shape({
34
+ buttons: PropTypes.arrayOf(PropTypes.shape(ButtonMenuPropTypes)).isRequired,
35
+ buttonAriaLabel: PropTypes.string,
36
+ disabled: PropTypes.bool.isRequired
37
+ })
25
38
  };
26
- export default headerWithActionsPropTypes;
39
+ export default HeaderWithActionsPropTypes;
27
40
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":["PropTypes","bulletPointMenuButtonPropTypes","ButtonLinkPropTypes","closeButtonPropTypes","size","oneOf","isRequired","icon","string","onClick","func","headerWithActionsPropTypes","closeButton","shape","title","tag","label","type","saveStatus","display","bool","bulletPointMenuButton","actionButtons","arrayOf"],"sources":["../../../src/organism/header-with-actions/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\nimport bulletPointMenuButtonPropTypes, {\n BulletPointMenuButtonProps\n} from '../../molecule/bullet-point-menu-button/types';\nimport ButtonLinkPropTypes, {ButtonLinkProps} from '../../atom/button-link/types';\n\nconst closeButtonPropTypes = {\n size: PropTypes.oneOf(['default', 'small', 'responsive']).isRequired,\n icon: PropTypes.string.isRequired,\n 'data-name': PropTypes.string.isRequired,\n 'aria-label': PropTypes.string.isRequired,\n onClick: PropTypes.func.isRequired\n};\nconst headerWithActionsPropTypes = {\n closeButton: PropTypes.shape(closeButtonPropTypes),\n title: PropTypes.string.isRequired,\n tag: PropTypes.shape({\n label: PropTypes.oneOf(['Published', 'Ongoing changes', 'Draft', 'Archived']).isRequired,\n type: PropTypes.oneOf(['success', 'progress', 'warning']).isRequired,\n size: PropTypes.string.isRequired\n }).isRequired,\n saveStatus: PropTypes.shape({\n display: PropTypes.bool.isRequired,\n label: PropTypes.oneOf(['Unsaved changes', 'Saved'])\n }).isRequired,\n bulletPointMenuButton: PropTypes.shape(bulletPointMenuButtonPropTypes),\n actionButtons: PropTypes.arrayOf(PropTypes.shape(ButtonLinkPropTypes)).isRequired\n};\n\nexport default headerWithActionsPropTypes;\n\ntype TagProps = {\n label: 'Published' | 'Ongoing changes' | 'Draft' | 'Archived';\n type: 'success' | 'progress' | 'warning';\n size: string;\n};\n\ntype SaveStatusProps = {\n display: boolean;\n label?: 'Unsaved changes' | 'Saved';\n};\n\ntype CloseButtonProps = {\n size: 'default' | 'small' | 'responsive';\n icon: string;\n 'data-name': string;\n 'aria-label': string;\n onClick: () => void;\n};\n\nexport type HeaderWithActionsProps = {\n closeButton: CloseButtonProps;\n title: string;\n tag: TagProps;\n saveStatus: SaveStatusProps;\n actionButtons: ButtonLinkProps[];\n bulletPointMenuButton?: BulletPointMenuButtonProps;\n};\n\nexport type HeaderWithActionsPropsFixture = {props: HeaderWithActionsProps};\n"],"mappings":"AAAA,OAAOA,SAAS,MAAM,YAAY;AAClC,OAAOC,8BAA8B,MAE9B,+CAA+C;AACtD,OAAOC,mBAAmB,MAAyB,8BAA8B;AAEjF,MAAMC,oBAAoB,GAAG;EAC3BC,IAAI,EAAEJ,SAAS,CAACK,KAAK,CAAC,CAAC,SAAS,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC,CAACC,UAAU;EACpEC,IAAI,EAAEP,SAAS,CAACQ,MAAM,CAACF,UAAU;EACjC,WAAW,EAAEN,SAAS,CAACQ,MAAM,CAACF,UAAU;EACxC,YAAY,EAAEN,SAAS,CAACQ,MAAM,CAACF,UAAU;EACzCG,OAAO,EAAET,SAAS,CAACU,IAAI,CAACJ;AAC1B,CAAC;AACD,MAAMK,0BAA0B,GAAG;EACjCC,WAAW,EAAEZ,SAAS,CAACa,KAAK,CAACV,oBAAoB,CAAC;EAClDW,KAAK,EAAEd,SAAS,CAACQ,MAAM,CAACF,UAAU;EAClCS,GAAG,EAAEf,SAAS,CAACa,KAAK,CAAC;IACnBG,KAAK,EAAEhB,SAAS,CAACK,KAAK,CAAC,CAAC,WAAW,EAAE,iBAAiB,EAAE,OAAO,EAAE,UAAU,CAAC,CAAC,CAACC,UAAU;IACxFW,IAAI,EAAEjB,SAAS,CAACK,KAAK,CAAC,CAAC,SAAS,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC,CAACC,UAAU;IACpEF,IAAI,EAAEJ,SAAS,CAACQ,MAAM,CAACF;EACzB,CAAC,CAAC,CAACA,UAAU;EACbY,UAAU,EAAElB,SAAS,CAACa,KAAK,CAAC;IAC1BM,OAAO,EAAEnB,SAAS,CAACoB,IAAI,CAACd,UAAU;IAClCU,KAAK,EAAEhB,SAAS,CAACK,KAAK,CAAC,CAAC,iBAAiB,EAAE,OAAO,CAAC;EACrD,CAAC,CAAC,CAACC,UAAU;EACbe,qBAAqB,EAAErB,SAAS,CAACa,KAAK,CAACZ,8BAA8B,CAAC;EACtEqB,aAAa,EAAEtB,SAAS,CAACuB,OAAO,CAACvB,SAAS,CAACa,KAAK,CAACX,mBAAmB,CAAC,CAAC,CAACI;AACzE,CAAC;AAED,eAAeK,0BAA0B","ignoreList":[]}
1
+ {"version":3,"file":"types.js","names":["PropTypes","ButtonMenuPropTypes","dataName","string","label","isRequired","iconName","iconColor","onClick","func","ButtonActionPropTypes","type","oneOf","disabled","bool","HeaderWithActionsPropTypes","closeButton","shape","title","tag","size","saveStatus","display","actionButtons","arrayOf","bulletPointMenuButton","buttons","buttonAriaLabel"],"sources":["../../../src/organism/header-with-actions/types.ts"],"sourcesContent":["import PropTypes from 'prop-types';\n\nconst ButtonMenuPropTypes = {\n dataName: PropTypes.string,\n label: PropTypes.string.isRequired,\n iconName: PropTypes.string.isRequired,\n iconColor: PropTypes.string.isRequired,\n onClick: PropTypes.func.isRequired\n};\n\nconst ButtonActionPropTypes = {\n type: PropTypes.oneOf(['primary', 'secondary']).isRequired,\n label: PropTypes.string.isRequired,\n onClick: PropTypes.func.isRequired,\n disabled: PropTypes.bool,\n iconName: PropTypes.string,\n iconColor: PropTypes.string\n};\n\nconst HeaderWithActionsPropTypes = {\n closeButton: PropTypes.shape({\n 'aria-label': PropTypes.string,\n onClick: PropTypes.func.isRequired\n }),\n title: PropTypes.string.isRequired,\n tag: PropTypes.shape({\n label: PropTypes.oneOf(['Published', 'Ongoing changes', 'Draft', 'Archived']).isRequired,\n type: PropTypes.oneOf(['success', 'progress', 'warning']).isRequired,\n size: PropTypes.string.isRequired\n }).isRequired,\n saveStatus: PropTypes.shape({\n display: PropTypes.bool.isRequired,\n label: PropTypes.oneOf(['Unsaved changes', 'Saved'])\n }).isRequired,\n actionButtons: PropTypes.arrayOf(PropTypes.shape(ButtonActionPropTypes)).isRequired,\n bulletPointMenuButton: PropTypes.shape({\n buttons: PropTypes.arrayOf(PropTypes.shape(ButtonMenuPropTypes)).isRequired,\n buttonAriaLabel: PropTypes.string,\n disabled: PropTypes.bool.isRequired\n })\n};\n\nexport default HeaderWithActionsPropTypes;\n\ntype TagProps = {\n label: 'Published' | 'Ongoing changes' | 'Draft' | 'Archived';\n type: 'success' | 'progress' | 'warning';\n size: string;\n};\n\ntype SaveStatusProps = {\n display: boolean;\n label?: 'Unsaved changes' | 'Saved';\n};\n\ntype CloseButtonProps = {\n 'aria-label': string;\n onClick: () => void;\n};\n\nexport type ButtonMenuProps = {\n dataName: string;\n label: string;\n iconName: string;\n iconColor: string;\n onClick: () => void;\n};\n\ntype BulletPointMenuButtonProps = {\n buttons: ButtonMenuProps[];\n buttonAriaLabel?: string;\n disabled: boolean;\n};\n\nexport type ButtonActionProps = {\n type: 'primary' | 'secondary';\n label: string;\n onClick: () => void;\n disabled?: boolean;\n iconName?: string;\n iconColor?: string;\n};\n\nexport type HeaderWithActionsProps = {\n closeButton: CloseButtonProps;\n title: string;\n tag: TagProps;\n saveStatus: SaveStatusProps;\n actionButtons: ButtonActionProps[];\n bulletPointMenuButton?: BulletPointMenuButtonProps;\n};\n\nexport type HeaderWithActionsPropsFixture = {props: HeaderWithActionsProps};\n"],"mappings":"AAAA,OAAOA,SAAS,MAAM,YAAY;AAElC,MAAMC,mBAAmB,GAAG;EAC1BC,QAAQ,EAAEF,SAAS,CAACG,MAAM;EAC1BC,KAAK,EAAEJ,SAAS,CAACG,MAAM,CAACE,UAAU;EAClCC,QAAQ,EAAEN,SAAS,CAACG,MAAM,CAACE,UAAU;EACrCE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U;EACbkB,aAAa,EAAEvB,SAAS,CAACwB,OAAO,CAACxB,SAAS,CAACiB,KAAK,CAACP,qBAAqB,CAAC,CAAC,CAACL,UAAU;EACnFoB,qBAAqB,EAAEzB,SAAS,CAACiB,KAAK,CAAC;IACrCS,OAAO,EAAE1B,SAAS,CAACwB,OAAO,CAACxB,SAAS,CAACiB,KAAK,CAAChB,mBAAmB,CAAC,CAAC,CAACI,UAAU;IAC3EsB,eAAe,EAAE3B,SAAS,CAACG,MAAM;IACjCU,QAAQ,EAAEb,SAAS,CAACc,IAAI,CAACT;EAC3B,CAAC;AACH,CAAC;AAED,eAAeU,0BAA0B","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/skill-edition/index.tsx"],"names":[],"mappings":";AAOA,OAAkB,EAEhB,qBAAqB,EAMtB,MAAM,SAAS,CAAC;AA4YjB,QAAA,MAAM,YAAY;YAAW,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUjD,CAAC;AAIF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/skill-edition/index.tsx"],"names":[],"mappings":";AAOA,OAAkB,EAEhB,qBAAqB,EAMtB,MAAM,SAAS,CAAC;AA2YjB,QAAA,MAAM,YAAY;YAAW,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUjD,CAAC;AAIF,eAAe,YAAY,CAAC"}
@@ -74,7 +74,6 @@ const SkillInformations = skillInformations => {
74
74
  onClick: iconEditor.buttonLink.onClick,
75
75
  customStyle: {
76
76
  borderRadius: '12px',
77
- padding: '0 8px 0 16px',
78
77
  fontWeight: '500'
79
78
  }
80
79
  } : undefined,