@onewelcome/react-lib-components 6.4.2 → 6.4.4

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.
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});var e=require("./useAddNewBtn.module.cjs.js");var t=require("react");function n(e){return e&&typeof e==="object"&&"default"in e?e:{default:e}}var a=n(t);const d=({addNew:n,filter:d})=>{var o;const r=t.useRef(null);const s=(o=n===null||n===void 0?void 0:n.label)!==null&&o!==void 0?o:"Create new";const l=()=>n&&a["default"].createElement("button",{"data-testid":"select-action-button",className:e["default"]["action-button"],onClick:()=>n.onAddNew(d),ref:r,...n.btnProps},!d&&s,d&&a["default"].createElement("span",{style:{fontWeight:"700"}},`"${d}"`),d&&` (${s.toLowerCase()})`);const u=n?e["default"]["has-sibling"]:"";return{addNewBtnOptionsContainerClassName:u,renderAddNew:l,addBtnRef:r}};exports.useAddNewBtn=d;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});var e=require("./useAddNewBtn.module.cjs.js");var t=require("react");function n(e){return e&&typeof e==="object"&&"default"in e?e:{default:e}}var a=n(t);const o=({addNew:n,filter:o})=>{var d;const r=t.useRef(null);const s=(d=n===null||n===void 0?void 0:n.label)!==null&&d!==void 0?d:"Create new";const l=()=>n&&a["default"].createElement("button",{"data-testid":"select-action-button",className:e["default"]["action-button"],onClick:()=>n.onAddNew(o),ref:r,type:"button",...n.btnProps},!o&&s,o&&a["default"].createElement("span",{style:{fontWeight:"700"}},`"${o}"`),o&&` (${s.toLowerCase()})`);const u=n?e["default"]["has-sibling"]:"";return{addNewBtnOptionsContainerClassName:u,renderAddNew:l,addBtnRef:r}};exports.useAddNewBtn=o;
2
2
  //# sourceMappingURL=useAddNewBtn.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useAddNewBtn.cjs.js","sources":["../../../../../../src/components/Form/Select/useAddNewBtn.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport classes from \"./useAddNewBtn.module.scss\";\n\nimport React, { useRef } from \"react\";\nimport { AddNewProps } from \"./Select.interfaces\";\n\ninterface Props {\n addNew?: AddNewProps;\n filter: string;\n}\n\nexport const useAddNewBtn = ({ addNew, filter }: Props) => {\n const addBtnRef = useRef<HTMLButtonElement>(null);\n\n const addNewLabel = addNew?.label ?? \"Create new\";\n\n const renderAddNew = () =>\n addNew && (\n <button\n data-testid={\"select-action-button\"}\n className={classes[\"action-button\"]}\n onClick={() => addNew.onAddNew(filter)}\n ref={addBtnRef}\n {...addNew.btnProps}\n >\n {!filter && addNewLabel}\n {filter && <span style={{ fontWeight: \"700\" }}>{`\"${filter}\"`}</span>}\n {filter && ` (${addNewLabel.toLowerCase()})`}\n </button>\n );\n\n const addNewBtnOptionsContainerClassName = addNew ? classes[\"has-sibling\"] : \"\";\n\n return {\n addNewBtnOptionsContainerClassName,\n renderAddNew,\n addBtnRef\n };\n};\n"],"names":["useAddNewBtn","addNew","filter","addBtnRef","useRef","addNewLabel","_a","label","renderAddNew","React","createElement","className","classes","onClick","onAddNew","ref","btnProps","style","fontWeight","toLowerCase","addNewBtnOptionsContainerClassName"],"mappings":"+NA0Ba,MAAAA,EAAe,EAAGC,SAAQC,mBACrC,MAAMC,EAAYC,SAA0B,MAE5C,MAAMC,GAAcC,EAAAL,IAAA,MAAAA,SAAA,OAAA,EAAAA,EAAQM,SAAS,MAAAD,SAAA,EAAAA,EAAA,aAErC,MAAME,EAAe,IACnBP,GACEQ,aACeC,cAAA,SAAA,CAAA,cAAA,uBACbC,UAAWC,EAAO,WAAC,iBACnBC,QAAS,IAAMZ,EAAOa,SAASZ,GAC/Ba,IAAKZ,KACDF,EAAOe,WAETd,GAAUG,EACXH,GAAUO,EAAAA,WAAAC,cAAA,OAAA,CAAMO,MAAO,CAAEC,WAAY,QAAU,IAAIhB,MACnDA,GAAU,KAAKG,EAAYc,kBAIlC,MAAMC,EAAqCnB,EAASW,EAAO,WAAC,eAAiB,GAE7E,MAAO,CACLQ,qCACAZ,eACAL,YACD"}
1
+ {"version":3,"file":"useAddNewBtn.cjs.js","sources":["../../../../../../src/components/Form/Select/useAddNewBtn.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport classes from \"./useAddNewBtn.module.scss\";\n\nimport React, { useRef } from \"react\";\nimport { AddNewProps } from \"./Select.interfaces\";\n\ninterface Props {\n addNew?: AddNewProps;\n filter: string;\n}\n\nexport const useAddNewBtn = ({ addNew, filter }: Props) => {\n const addBtnRef = useRef<HTMLButtonElement>(null);\n\n const addNewLabel = addNew?.label ?? \"Create new\";\n\n const renderAddNew = () =>\n addNew && (\n <button\n data-testid={\"select-action-button\"}\n className={classes[\"action-button\"]}\n onClick={() => addNew.onAddNew(filter)}\n ref={addBtnRef}\n type=\"button\"\n {...addNew.btnProps}\n >\n {!filter && addNewLabel}\n {filter && <span style={{ fontWeight: \"700\" }}>{`\"${filter}\"`}</span>}\n {filter && ` (${addNewLabel.toLowerCase()})`}\n </button>\n );\n\n const addNewBtnOptionsContainerClassName = addNew ? classes[\"has-sibling\"] : \"\";\n\n return {\n addNewBtnOptionsContainerClassName,\n renderAddNew,\n addBtnRef\n };\n};\n"],"names":["useAddNewBtn","addNew","filter","addBtnRef","useRef","addNewLabel","_a","label","renderAddNew","React","createElement","className","classes","onClick","onAddNew","ref","type","btnProps","style","fontWeight","toLowerCase","addNewBtnOptionsContainerClassName"],"mappings":"+NA0Ba,MAAAA,EAAe,EAAGC,SAAQC,mBACrC,MAAMC,EAAYC,SAA0B,MAE5C,MAAMC,GAAcC,EAAAL,IAAA,MAAAA,SAAA,OAAA,EAAAA,EAAQM,SAAS,MAAAD,SAAA,EAAAA,EAAA,aAErC,MAAME,EAAe,IACnBP,GACEQ,EAAAA,WAAAC,cAAA,SAAA,CAAA,cACe,uBACbC,UAAWC,EAAO,WAAC,iBACnBC,QAAS,IAAMZ,EAAOa,SAASZ,GAC/Ba,IAAKZ,EACLa,KAAK,YACDf,EAAOgB,WAETf,GAAUG,EACXH,GAAUO,EAAAA,WAAAC,cAAA,OAAA,CAAMQ,MAAO,CAAEC,WAAY,QAAU,IAAIjB,MACnDA,GAAU,KAAKG,EAAYe,kBAIlC,MAAMC,EAAqCpB,EAASW,EAAO,WAAC,eAAiB,GAE7E,MAAO,CACLS,qCACAb,eACAL,YACD"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});var e=require("../../../../lib/style-inject.js");var i='/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.BaseModalContent-module_content__EBc1p{color:var(--color-blue-grey500);flex:1;font-size:.875rem;line-height:1.25rem;outline:none;overflow-y:auto;padding:1.25rem 1.5rem 0}\n/*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4gKiAgICBTZWUgdGhlIExpY2Vuc2UgZm9yIHRoZSBzcGVjaWZpYyBsYW5ndWFnZSBnb3Zlcm5pbmcgcGVybWlzc2lvbnMgYW5kXG4gKiAgICBsaW1pdGF0aW9ucyB1bmRlciB0aGUgTGljZW5zZS5cbiAqL1xuLmNvbnRlbnQge1xuICBwYWRkaW5nOiAxLjI1cmVtIDEuNXJlbSAwO1xuICBvdmVyZmxvdy15OiBhdXRvO1xuICBmbGV4OiAxO1xuICBvdXRsaW5lOiBub25lO1xuICBjb2xvcjogdmFyKC0tY29sb3ItYmx1ZS1ncmV5NTAwKTtcbiAgZm9udC1zaXplOiAwLjg3NXJlbTtcbiAgbGluZS1oZWlnaHQ6IDEuMjVyZW07XG59Il19 */';var n={content:"BaseModalContent-module_content__EBc1p"};e["default"](i);exports["default"]=n;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});var e=require("../../../../lib/style-inject.js");var I='/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.BaseModalContent-module_content__EBc1p{flex:1;font-size:.875rem;line-height:1.25rem;outline:none;overflow-y:auto;padding:1.25rem 1.5rem 0}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkJhc2VNb2RhbENvbnRlbnQubW9kdWxlLnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7O0VBY0UsQ0FDRix3Q0FHRSxNQUFPLENBRVAsaUJBQW1CLENBQ25CLG1CQUFvQixDQUZwQixZQUFhLENBRmIsZ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mU7XG4gIGZvbnQtc2l6ZTogMC44NzVyZW07XG4gIGxpbmUtaGVpZ2h0OiAxLjI1cmVtO1xufSJdfQ== */';var l={content:"BaseModalContent-module_content__EBc1p"};e["default"](I);exports["default"]=l;
2
2
  //# sourceMappingURL=BaseModalContent.module.cjs.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});var e=require("react");var t=require("../Icon/Icon.cjs.js");var r=require("../src/readyclasses.module.cjs.js");var a=require("./RemoveButton.module.cjs.js");function o(e){return e&&typeof e==="object"&&"default"in e?e:{default:e}}var s=o(e);const l=({removeLabel:e="Remove",label:o,onRemove:l,...c},n)=>{var u;return l&&s["default"].createElement("button",{...c,ref:n,className:`${a["default"]["remove"]} ${(u=c.className)!==null&&u!==void 0?u:""}`,title:"",onClick:l},s["default"].createElement(t.Icon,{icon:t.Icons.Times,className:a["default"]["icon"]}),s["default"].createElement("span",{className:r["default"]["sr-only"]},e,o?" "+o:""))};const c=e.forwardRef(l);exports.RemoveButton=c;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});var e=require("react");var t=require("../Icon/Icon.cjs.js");var r=require("../src/readyclasses.module.cjs.js");var a=require("./RemoveButton.module.cjs.js");function o(e){return e&&typeof e==="object"&&"default"in e?e:{default:e}}var s=o(e);const l=({removeLabel:e="Remove",label:o,onRemove:l,...c},n)=>{var u;return l&&s["default"].createElement("button",{title:"",type:"button",...c,ref:n,className:`${a["default"]["remove"]} ${(u=c.className)!==null&&u!==void 0?u:""}`,onClick:l},s["default"].createElement(t.Icon,{icon:t.Icons.Times,className:a["default"]["icon"]}),s["default"].createElement("span",{className:r["default"]["sr-only"]},e,o?" "+o:""))};const c=e.forwardRef(l);exports.RemoveButton=c;
2
2
  //# sourceMappingURL=RemoveButton.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RemoveButton.cjs.js","sources":["../../../../../src/components/Tag/RemoveButton.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { ForwardRefRenderFunction, HTMLAttributes, forwardRef } from \"react\";\nimport { Icon, Icons } from \"../Icon/Icon\";\n\nimport readyclasses from \"../../readyclasses.module.scss\";\nimport classes from \"./RemoveButton.module.scss\";\n\nexport interface Props extends HTMLAttributes<HTMLButtonElement> {\n removeLabel?: string;\n label?: string;\n onRemove?: (e: React.MouseEvent<HTMLButtonElement>) => void;\n}\n\nconst RemoveButtonComponent: ForwardRefRenderFunction<HTMLButtonElement, Props> = (\n { removeLabel = \"Remove\", label, onRemove, ...rest }: Props,\n ref\n) => {\n return (\n onRemove && (\n <button\n {...rest}\n ref={ref}\n className={`${classes[\"remove\"]} ${rest.className ?? \"\"}`}\n title=\"\"\n onClick={onRemove}\n >\n <Icon icon={Icons.Times} className={classes[\"icon\"]} />\n <span className={readyclasses[\"sr-only\"]}>\n {removeLabel}\n {label ? \" \" + label : \"\"}\n </span>\n </button>\n )\n );\n};\n\nexport const RemoveButton = forwardRef(RemoveButtonComponent);\n"],"names":["RemoveButtonComponent","removeLabel","label","onRemove","rest","ref","React","className","classes","_a","title","onClick","createElement","Icon","icon","Icons","Times","readyclasses","RemoveButton","forwardRef"],"mappings":"uTA4BA,MAAMA,EAA4E,EAC9EC,cAAc,SAAUC,QAAOC,cAAaC,GAC9CC,WAEA,OACEF,GACEG,wCACMF,EACJC,IAAKA,EACLE,UAAW,GAAGC,EAAO,WAAC,cAAaC,EAAAL,EAAKG,aAAa,MAAAE,SAAA,EAAAA,EAAA,KACrDC,MAAM,GACNC,QAASR,GAETG,EAAAA,WAAAM,cAACC,OAAI,CAACC,KAAMC,EAAAA,MAAMC,MAAOT,UAAWC,EAAAA,WAAQ,UAC5CF,EAAA,WAAAM,cAAA,OAAA,CAAML,UAAWU,EAAAA,WAAa,YAC3BhB,EACAC,EAAQ,IAAMA,EAAQ,IAI7B,QAGSgB,EAAeC,EAAUA,WAACnB"}
1
+ {"version":3,"file":"RemoveButton.cjs.js","sources":["../../../../../src/components/Tag/RemoveButton.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { ForwardRefRenderFunction, HTMLAttributes, forwardRef } from \"react\";\nimport { Icon, Icons } from \"../Icon/Icon\";\n\nimport readyclasses from \"../../readyclasses.module.scss\";\nimport classes from \"./RemoveButton.module.scss\";\n\nexport interface Props extends HTMLAttributes<HTMLButtonElement> {\n removeLabel?: string;\n label?: string;\n onRemove?: (e: React.MouseEvent<HTMLButtonElement>) => void;\n}\n\nconst RemoveButtonComponent: ForwardRefRenderFunction<HTMLButtonElement, Props> = (\n { removeLabel = \"Remove\", label, onRemove, ...rest }: Props,\n ref\n) => {\n return (\n onRemove && (\n <button\n title=\"\"\n type=\"button\"\n {...rest}\n ref={ref}\n className={`${classes[\"remove\"]} ${rest.className ?? \"\"}`}\n onClick={onRemove}\n >\n <Icon icon={Icons.Times} className={classes[\"icon\"]} />\n <span className={readyclasses[\"sr-only\"]}>\n {removeLabel}\n {label ? \" \" + label : \"\"}\n </span>\n </button>\n )\n );\n};\n\nexport const RemoveButton = forwardRef(RemoveButtonComponent);\n"],"names":["RemoveButtonComponent","removeLabel","label","onRemove","rest","ref","React","createElement","title","type","className","classes","_a","onClick","Icon","icon","Icons","Times","readyclasses","RemoveButton","forwardRef"],"mappings":"uTA4BA,MAAMA,EAA4E,EAC9EC,cAAc,SAAUC,QAAOC,cAAaC,GAC9CC,WAEA,OACEF,GACEG,EAAA,WAAAC,cAAA,SAAA,CACEC,MAAM,GACNC,KAAK,YACDL,EACJC,IAAKA,EACLK,UAAW,GAAGC,EAAO,WAAC,cAAaC,EAAAR,EAAKM,aAAa,MAAAE,SAAA,EAAAA,EAAA,KACrDC,QAASV,GAETG,EAAAA,WAAAC,cAACO,OAAI,CAACC,KAAMC,EAAAA,MAAMC,MAAOP,UAAWC,EAAAA,WAAQ,UAC5CL,EAAA,WAAAC,cAAA,OAAA,CAAMG,UAAWQ,EAAAA,WAAa,YAC3BjB,EACAC,EAAQ,IAAMA,EAAQ,IAI7B,QAGSiB,EAAeC,EAAUA,WAACpB"}
@@ -1,4 +1,4 @@
1
- import React, { ComponentPropsWithRef, ReactElement, Ref } from "react";
1
+ import { ComponentPropsWithRef, ReactElement, Ref } from "react";
2
2
  import { Props as ButtonProps } from "../Button/Button";
3
3
  import { HeaderCell, OnSortFunction, Sort } from "./datagrid.interfaces";
4
4
  import { Props as PaginationProps } from "../Pagination/Pagination";
@@ -29,5 +29,5 @@ export interface Props<T> extends Omit<ComponentPropsWithRef<"div">, "children">
29
29
  spacing?: Spacing;
30
30
  }
31
31
  export declare const DataGrid: <T extends {}>(p: Props<T> & {
32
- ref?: React.Ref<HTMLDivElement> | undefined;
32
+ ref?: Ref<HTMLDivElement>;
33
33
  }) => ReactElement;
@@ -13,5 +13,5 @@ export interface Props<T> extends Omit<ComponentPropsWithRef<"tbody">, "children
13
13
  spacing?: React.CSSProperties;
14
14
  }
15
15
  export declare const DataGridBody: <T extends {}>(p: Props<T> & {
16
- ref?: React.Ref<HTMLTableSectionElement> | undefined;
16
+ ref?: Ref<HTMLTableSectionElement>;
17
17
  }) => ReactElement;
@@ -5,6 +5,6 @@ interface Arguments {
5
5
  export declare const useRepeater: <T>({ componentToRepeat }: Arguments) => {
6
6
  repeatedComponents: JSX.Element[];
7
7
  repeat: () => void;
8
- remove: (componentToRemove: React.ReactElement<T, string | React.JSXElementConstructor<any>>) => void;
8
+ remove: (componentToRemove: React.ReactElement<T>) => void;
9
9
  };
10
10
  export {};
@@ -1,2 +1,2 @@
1
- import e from"./useAddNewBtn.module.esm.js";import t,{useRef as n}from"react";const o=({addNew:o,filter:a})=>{var s;const d=n(null);const r=(s=o===null||o===void 0?void 0:o.label)!==null&&s!==void 0?s:"Create new";const l=()=>o&&t.createElement("button",{"data-testid":"select-action-button",className:e["action-button"],onClick:()=>o.onAddNew(a),ref:d,...o.btnProps},!a&&r,a&&t.createElement("span",{style:{fontWeight:"700"}},`"${a}"`),a&&` (${r.toLowerCase()})`);const i=o?e["has-sibling"]:"";return{addNewBtnOptionsContainerClassName:i,renderAddNew:l,addBtnRef:d}};export{o as useAddNewBtn};
1
+ import t from"./useAddNewBtn.module.esm.js";import e,{useRef as n}from"react";const o=({addNew:o,filter:a})=>{var s;const d=n(null);const r=(s=o===null||o===void 0?void 0:o.label)!==null&&s!==void 0?s:"Create new";const l=()=>o&&e.createElement("button",{"data-testid":"select-action-button",className:t["action-button"],onClick:()=>o.onAddNew(a),ref:d,type:"button",...o.btnProps},!a&&r,a&&e.createElement("span",{style:{fontWeight:"700"}},`"${a}"`),a&&` (${r.toLowerCase()})`);const i=o?t["has-sibling"]:"";return{addNewBtnOptionsContainerClassName:i,renderAddNew:l,addBtnRef:d}};export{o as useAddNewBtn};
2
2
  //# sourceMappingURL=useAddNewBtn.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useAddNewBtn.esm.js","sources":["../../../../../../src/components/Form/Select/useAddNewBtn.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport classes from \"./useAddNewBtn.module.scss\";\n\nimport React, { useRef } from \"react\";\nimport { AddNewProps } from \"./Select.interfaces\";\n\ninterface Props {\n addNew?: AddNewProps;\n filter: string;\n}\n\nexport const useAddNewBtn = ({ addNew, filter }: Props) => {\n const addBtnRef = useRef<HTMLButtonElement>(null);\n\n const addNewLabel = addNew?.label ?? \"Create new\";\n\n const renderAddNew = () =>\n addNew && (\n <button\n data-testid={\"select-action-button\"}\n className={classes[\"action-button\"]}\n onClick={() => addNew.onAddNew(filter)}\n ref={addBtnRef}\n {...addNew.btnProps}\n >\n {!filter && addNewLabel}\n {filter && <span style={{ fontWeight: \"700\" }}>{`\"${filter}\"`}</span>}\n {filter && ` (${addNewLabel.toLowerCase()})`}\n </button>\n );\n\n const addNewBtnOptionsContainerClassName = addNew ? classes[\"has-sibling\"] : \"\";\n\n return {\n addNewBtnOptionsContainerClassName,\n renderAddNew,\n addBtnRef\n };\n};\n"],"names":["useAddNewBtn","addNew","filter","addBtnRef","useRef","addNewLabel","_a","label","renderAddNew","React","createElement","className","classes","onClick","onAddNew","ref","btnProps","style","fontWeight","toLowerCase","addNewBtnOptionsContainerClassName"],"mappings":"8EA0Ba,MAAAA,EAAe,EAAGC,SAAQC,mBACrC,MAAMC,EAAYC,EAA0B,MAE5C,MAAMC,GAAcC,EAAAL,IAAA,MAAAA,SAAA,OAAA,EAAAA,EAAQM,SAAS,MAAAD,SAAA,EAAAA,EAAA,aAErC,MAAME,EAAe,IACnBP,GACEQ,EACeC,cAAA,SAAA,CAAA,cAAA,uBACbC,UAAWC,EAAQ,iBACnBC,QAAS,IAAMZ,EAAOa,SAASZ,GAC/Ba,IAAKZ,KACDF,EAAOe,WAETd,GAAUG,EACXH,GAAUO,EAAAC,cAAA,OAAA,CAAMO,MAAO,CAAEC,WAAY,QAAU,IAAIhB,MACnDA,GAAU,KAAKG,EAAYc,kBAIlC,MAAMC,EAAqCnB,EAASW,EAAQ,eAAiB,GAE7E,MAAO,CACLQ,qCACAZ,eACAL,YACD"}
1
+ {"version":3,"file":"useAddNewBtn.esm.js","sources":["../../../../../../src/components/Form/Select/useAddNewBtn.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport classes from \"./useAddNewBtn.module.scss\";\n\nimport React, { useRef } from \"react\";\nimport { AddNewProps } from \"./Select.interfaces\";\n\ninterface Props {\n addNew?: AddNewProps;\n filter: string;\n}\n\nexport const useAddNewBtn = ({ addNew, filter }: Props) => {\n const addBtnRef = useRef<HTMLButtonElement>(null);\n\n const addNewLabel = addNew?.label ?? \"Create new\";\n\n const renderAddNew = () =>\n addNew && (\n <button\n data-testid={\"select-action-button\"}\n className={classes[\"action-button\"]}\n onClick={() => addNew.onAddNew(filter)}\n ref={addBtnRef}\n type=\"button\"\n {...addNew.btnProps}\n >\n {!filter && addNewLabel}\n {filter && <span style={{ fontWeight: \"700\" }}>{`\"${filter}\"`}</span>}\n {filter && ` (${addNewLabel.toLowerCase()})`}\n </button>\n );\n\n const addNewBtnOptionsContainerClassName = addNew ? classes[\"has-sibling\"] : \"\";\n\n return {\n addNewBtnOptionsContainerClassName,\n renderAddNew,\n addBtnRef\n };\n};\n"],"names":["useAddNewBtn","addNew","filter","addBtnRef","useRef","addNewLabel","_a","label","renderAddNew","React","createElement","className","classes","onClick","onAddNew","ref","type","btnProps","style","fontWeight","toLowerCase","addNewBtnOptionsContainerClassName"],"mappings":"8EA0Ba,MAAAA,EAAe,EAAGC,SAAQC,mBACrC,MAAMC,EAAYC,EAA0B,MAE5C,MAAMC,GAAcC,EAAAL,IAAA,MAAAA,SAAA,OAAA,EAAAA,EAAQM,SAAS,MAAAD,SAAA,EAAAA,EAAA,aAErC,MAAME,EAAe,IACnBP,GACEQ,EAAAC,cAAA,SAAA,CAAA,cACe,uBACbC,UAAWC,EAAQ,iBACnBC,QAAS,IAAMZ,EAAOa,SAASZ,GAC/Ba,IAAKZ,EACLa,KAAK,YACDf,EAAOgB,WAETf,GAAUG,EACXH,GAAUO,EAAAC,cAAA,OAAA,CAAMQ,MAAO,CAAEC,WAAY,QAAU,IAAIjB,MACnDA,GAAU,KAAKG,EAAYe,kBAIlC,MAAMC,EAAqCpB,EAASW,EAAQ,eAAiB,GAE7E,MAAO,CACLS,qCACAb,eACAL,YACD"}
@@ -1,2 +1,2 @@
1
- import e from "../../../../lib/style-inject.js";var i='/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.BaseModalContent-module_content__EBc1p{color:var(--color-blue-grey500);flex:1;font-size:.875rem;line-height:1.25rem;outline:none;overflow-y:auto;padding:1.25rem 1.5rem 0}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkJhc2VNb2RhbENvbnRlbnQubW9kdWxlLnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7O0VBY0U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mNvbnRlbnQge1xuICBwYWRkaW5nOiAxLjI1cmVtIDEuNXJlbSAwO1xuICBvdmVyZmxvdy15OiBhdXRvO1xuICBmbGV4OiAxO1xuICBvdXRsaW5lOiBub25lO1xuICBjb2xvcjogdmFyKC0tY29sb3ItYmx1ZS1ncmV5NTAwKTtcbiAgZm9udC1zaXplOiAwLjg3NXJlbTtcbiAgbGluZS1oZWlnaHQ6IDEuMjVyZW07XG59Il19 */';var n={content:"BaseModalContent-module_content__EBc1p"};e(i);export{n as default};
1
+ import e from "../../../../lib/style-inject.js";var I='/*!\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.BaseModalContent-module_content__EBc1p{flex:1;font-size:.875rem;line-height:1.25rem;outline:none;overflow-y:auto;padding:1.25rem 1.5rem 0}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkJhc2VNb2RhbENvbnRlbnQubW9kdWxlLnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7O0VBY0UsQ0FDRix3Q0FHRSxNQUFPLENBRVAsaUJBQW1CLENBQ25CLG1CQUFvQixDQUZwQixZQUFhLENBRmIsZUFBZ0IsQ0FEaEIsd0JBTUYiLCJmaWxlIjoiQmFzZU1vZGFsQ29udGVudC5tb2R1bGUuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIi8qIVxuICogQ29weXJpZ2h0IDIwMjIgT25lV2VsY29tZSBCLlYuXG4gKlxuICogICAgTGljZW5zZWQgdW5kZXIgdGhlIEFwYWNoZSBMaWNlbnNlLCBWZXJzaW9uIDIuMCAodGhlIFwiTGljZW5zZVwiKTtcbiAqICAgIHlvdSBtYXkgbm90IHVzZSB0aGlzIGZpbGUgZXhjZXB0IGluIGNvbXBsaWFuY2Ugd2l0aCB0aGUgTGljZW5zZS5cbiAqICAgIFlvdSBtYXkgb2J0YWluIGEgY29weSBvZiB0aGUgTGljZW5zZSBhdFxuICpcbiAqICAgICAgICBodHRwOi8vd3d3LmFwYWNoZS5vcmcvbGljZW5zZXMvTElDRU5TRS0yLjBcbiAqXG4gKiAgICBVbmxlc3MgcmVxdWlyZWQgYnkgYXBwbGljYWJsZSBsYXcgb3IgYWdyZWVkIHRvIGluIHdyaXRpbmcsIHNvZnR3YXJlXG4gKiAgICBkaXN0cmlidXRlZCB1bmRlciB0aGUgTGljZW5zZSBpcyBkaXN0cmlidXRlZCBvbiBhbiBcIkFTIElTXCIgQkFTSVMsXG4gKiAgICBXSVRIT1VUIFdBUlJBTlRJRVMgT1IgQ09ORElUSU9OUyBPRiBBTlkgS0lORCwgZWl0aGVyIGV4cHJlc3Mgb3IgaW1wbGllZC5cbiAqICAgIFNlZSB0aGUgTGljZW5zZSBmb3IgdGhlIHNwZWNpZmljIGxhbmd1YWdlIGdvdmVybmluZyBwZXJtaXNzaW9ucyBhbmRcbiAqICAgIGxpbWl0YXRpb25zIHVuZGVyIHRoZSBMaWNlbnNlLlxuICovXG4uY29udGVudCB7XG4gIHBhZGRpbmc6IDEuMjVyZW0gMS41cmVtIDA7XG4gIG92ZXJmbG93LXk6IGF1dG87XG4gIGZsZXg6IDE7XG4gIG91dGxpbmU6IG5vbmU7XG4gIGZvbnQtc2l6ZTogMC44NzVyZW07XG4gIGxpbmUtaGVpZ2h0OiAxLjI1cmVtO1xufSJdfQ== */';var i={content:"BaseModalContent-module_content__EBc1p"};e(I);export{i as default};
2
2
  //# sourceMappingURL=BaseModalContent.module.esm.js.map
@@ -1,2 +1,2 @@
1
- import e,{forwardRef as o}from"react";import{Icon as m,Icons as s}from"../Icon/Icon.esm.js";import r from"../src/readyclasses.module.esm.js";import t from"./RemoveButton.module.esm.js";const a=({removeLabel:o="Remove",label:a,onRemove:l,...c},n)=>{var i;return l&&e.createElement("button",{...c,ref:n,className:`${t["remove"]} ${(i=c.className)!==null&&i!==void 0?i:""}`,title:"",onClick:l},e.createElement(m,{icon:s.Times,className:t["icon"]}),e.createElement("span",{className:r["sr-only"]},o,a?" "+a:""))};const l=o(a);export{l as RemoveButton};
1
+ import e,{forwardRef as o}from"react";import{Icon as m,Icons as t}from"../Icon/Icon.esm.js";import s from"../src/readyclasses.module.esm.js";import r from"./RemoveButton.module.esm.js";const a=({removeLabel:o="Remove",label:a,onRemove:l,...n},c)=>{var i;return l&&e.createElement("button",{title:"",type:"button",...n,ref:c,className:`${r["remove"]} ${(i=n.className)!==null&&i!==void 0?i:""}`,onClick:l},e.createElement(m,{icon:t.Times,className:r["icon"]}),e.createElement("span",{className:s["sr-only"]},o,a?" "+a:""))};const l=o(a);export{l as RemoveButton};
2
2
  //# sourceMappingURL=RemoveButton.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RemoveButton.esm.js","sources":["../../../../../src/components/Tag/RemoveButton.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { ForwardRefRenderFunction, HTMLAttributes, forwardRef } from \"react\";\nimport { Icon, Icons } from \"../Icon/Icon\";\n\nimport readyclasses from \"../../readyclasses.module.scss\";\nimport classes from \"./RemoveButton.module.scss\";\n\nexport interface Props extends HTMLAttributes<HTMLButtonElement> {\n removeLabel?: string;\n label?: string;\n onRemove?: (e: React.MouseEvent<HTMLButtonElement>) => void;\n}\n\nconst RemoveButtonComponent: ForwardRefRenderFunction<HTMLButtonElement, Props> = (\n { removeLabel = \"Remove\", label, onRemove, ...rest }: Props,\n ref\n) => {\n return (\n onRemove && (\n <button\n {...rest}\n ref={ref}\n className={`${classes[\"remove\"]} ${rest.className ?? \"\"}`}\n title=\"\"\n onClick={onRemove}\n >\n <Icon icon={Icons.Times} className={classes[\"icon\"]} />\n <span className={readyclasses[\"sr-only\"]}>\n {removeLabel}\n {label ? \" \" + label : \"\"}\n </span>\n </button>\n )\n );\n};\n\nexport const RemoveButton = forwardRef(RemoveButtonComponent);\n"],"names":["RemoveButtonComponent","removeLabel","label","onRemove","rest","ref","React","className","classes","_a","title","onClick","createElement","Icon","icon","Icons","Times","readyclasses","RemoveButton","forwardRef"],"mappings":"yLA4BA,MAAMA,EAA4E,EAC9EC,cAAc,SAAUC,QAAOC,cAAaC,GAC9CC,WAEA,OACEF,GACEG,6BACMF,EACJC,IAAKA,EACLE,UAAW,GAAGC,EAAQ,cAAaC,EAAAL,EAAKG,aAAa,MAAAE,SAAA,EAAAA,EAAA,KACrDC,MAAM,GACNC,QAASR,GAETG,EAAAM,cAACC,EAAI,CAACC,KAAMC,EAAMC,MAAOT,UAAWC,EAAQ,UAC5CF,EAAAM,cAAA,OAAA,CAAML,UAAWU,EAAa,YAC3BhB,EACAC,EAAQ,IAAMA,EAAQ,IAI7B,QAGSgB,EAAeC,EAAWnB"}
1
+ {"version":3,"file":"RemoveButton.esm.js","sources":["../../../../../src/components/Tag/RemoveButton.tsx"],"sourcesContent":["/*\n * Copyright 2022 OneWelcome B.V.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { ForwardRefRenderFunction, HTMLAttributes, forwardRef } from \"react\";\nimport { Icon, Icons } from \"../Icon/Icon\";\n\nimport readyclasses from \"../../readyclasses.module.scss\";\nimport classes from \"./RemoveButton.module.scss\";\n\nexport interface Props extends HTMLAttributes<HTMLButtonElement> {\n removeLabel?: string;\n label?: string;\n onRemove?: (e: React.MouseEvent<HTMLButtonElement>) => void;\n}\n\nconst RemoveButtonComponent: ForwardRefRenderFunction<HTMLButtonElement, Props> = (\n { removeLabel = \"Remove\", label, onRemove, ...rest }: Props,\n ref\n) => {\n return (\n onRemove && (\n <button\n title=\"\"\n type=\"button\"\n {...rest}\n ref={ref}\n className={`${classes[\"remove\"]} ${rest.className ?? \"\"}`}\n onClick={onRemove}\n >\n <Icon icon={Icons.Times} className={classes[\"icon\"]} />\n <span className={readyclasses[\"sr-only\"]}>\n {removeLabel}\n {label ? \" \" + label : \"\"}\n </span>\n </button>\n )\n );\n};\n\nexport const RemoveButton = forwardRef(RemoveButtonComponent);\n"],"names":["RemoveButtonComponent","removeLabel","label","onRemove","rest","ref","React","createElement","title","type","className","classes","_a","onClick","Icon","icon","Icons","Times","readyclasses","RemoveButton","forwardRef"],"mappings":"yLA4BA,MAAMA,EAA4E,EAC9EC,cAAc,SAAUC,QAAOC,cAAaC,GAC9CC,WAEA,OACEF,GACEG,EAAAC,cAAA,SAAA,CACEC,MAAM,GACNC,KAAK,YACDL,EACJC,IAAKA,EACLK,UAAW,GAAGC,EAAQ,cAAaC,EAAAR,EAAKM,aAAa,MAAAE,SAAA,EAAAA,EAAA,KACrDC,QAASV,GAETG,EAAAC,cAACO,EAAI,CAACC,KAAMC,EAAMC,MAAOP,UAAWC,EAAQ,UAC5CL,EAAAC,cAAA,OAAA,CAAMG,UAAWQ,EAAa,YAC3BjB,EACAC,EAAQ,IAAMA,EAAQ,IAI7B,QAGSiB,EAAeC,EAAWpB"}
@@ -1,4 +1,4 @@
1
- import React, { ComponentPropsWithRef, ReactElement, Ref } from "react";
1
+ import { ComponentPropsWithRef, ReactElement, Ref } from "react";
2
2
  import { Props as ButtonProps } from "../Button/Button";
3
3
  import { HeaderCell, OnSortFunction, Sort } from "./datagrid.interfaces";
4
4
  import { Props as PaginationProps } from "../Pagination/Pagination";
@@ -29,5 +29,5 @@ export interface Props<T> extends Omit<ComponentPropsWithRef<"div">, "children">
29
29
  spacing?: Spacing;
30
30
  }
31
31
  export declare const DataGrid: <T extends {}>(p: Props<T> & {
32
- ref?: React.Ref<HTMLDivElement> | undefined;
32
+ ref?: Ref<HTMLDivElement>;
33
33
  }) => ReactElement;
@@ -13,5 +13,5 @@ export interface Props<T> extends Omit<ComponentPropsWithRef<"tbody">, "children
13
13
  spacing?: React.CSSProperties;
14
14
  }
15
15
  export declare const DataGridBody: <T extends {}>(p: Props<T> & {
16
- ref?: React.Ref<HTMLTableSectionElement> | undefined;
16
+ ref?: Ref<HTMLTableSectionElement>;
17
17
  }) => ReactElement;
@@ -5,6 +5,6 @@ interface Arguments {
5
5
  export declare const useRepeater: <T>({ componentToRepeat }: Arguments) => {
6
6
  repeatedComponents: JSX.Element[];
7
7
  repeat: () => void;
8
- remove: (componentToRemove: React.ReactElement<T, string | React.JSXElementConstructor<any>>) => void;
8
+ remove: (componentToRemove: React.ReactElement<T>) => void;
9
9
  };
10
10
  export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "homepage": "http://onewelcome.github.io/react-lib-components",
3
3
  "name": "@onewelcome/react-lib-components",
4
- "version": "6.4.2",
4
+ "version": "6.4.4",
5
5
  "license": "Apache-2.0",
6
6
  "author": "OneWelcome B.V.",
7
7
  "main": "dist/cjs/src/index.cjs.js",
@@ -52,55 +52,55 @@
52
52
  "node": ">=16"
53
53
  },
54
54
  "devDependencies": {
55
- "@babel/core": "^7.24.0",
56
- "@babel/preset-env": "^7.24.0",
57
- "@babel/preset-react": "^7.23.3",
58
- "@babel/preset-typescript": "^7.23.3",
55
+ "@babel/core": "^7.24.3",
56
+ "@babel/preset-env": "^7.24.3",
57
+ "@babel/preset-react": "^7.24.1",
58
+ "@babel/preset-typescript": "^7.24.1",
59
59
  "@mdx-js/react": "^3.0.1",
60
60
  "@onewelcome/eslint-config-shared-codestyle": "^9.1.0",
61
61
  "@onewelcome/storybook-addon-basestyling": "^1.0.2",
62
62
  "@rollup/plugin-commonjs": "^25.0.7",
63
63
  "@rollup/plugin-node-resolve": "^15.2.3",
64
64
  "@rollup/plugin-typescript": "^11.1.6",
65
- "@storybook/addon-a11y": "^7.6.14",
66
- "@storybook/addon-actions": "^7.6.14",
67
- "@storybook/addon-docs": "^7.6.14",
68
- "@storybook/addon-essentials": "^7.6.14",
69
- "@storybook/addon-interactions": "^7.6.14",
70
- "@storybook/addon-links": "^7.6.14",
71
- "@storybook/blocks": "^7.6.14",
72
- "@storybook/components": "^7.6.14",
65
+ "@storybook/addon-a11y": "^7.6.17",
66
+ "@storybook/addon-actions": "^7.6.17",
67
+ "@storybook/addon-docs": "^7.6.17",
68
+ "@storybook/addon-essentials": "^7.6.17",
69
+ "@storybook/addon-interactions": "^7.6.17",
70
+ "@storybook/addon-links": "^7.6.17",
71
+ "@storybook/blocks": "^7.6.17",
72
+ "@storybook/components": "^7.6.17",
73
73
  "@storybook/jest": "^0.2.3",
74
- "@storybook/manager-api": "^7.6.14",
75
- "@storybook/react": "^7.6.14",
76
- "@storybook/react-webpack5": "^7.6.14",
74
+ "@storybook/manager-api": "^7.6.17",
75
+ "@storybook/react": "^7.6.17",
76
+ "@storybook/react-webpack5": "^7.6.17",
77
77
  "@storybook/testing-library": "^0.2.2",
78
- "@storybook/theming": "^7.6.14",
78
+ "@storybook/theming": "^7.6.17",
79
79
  "@testing-library/dom": "^9.3.4",
80
80
  "@testing-library/jest-dom": "^6.4.2",
81
- "@testing-library/react": "^14.2.1",
81
+ "@testing-library/react": "^14.2.2",
82
82
  "@testing-library/user-event": "^14.5.2",
83
83
  "@types/jest": "^29.5.12",
84
- "@types/mdx": "^2.0.11",
85
- "@types/react": "^18.2.65",
86
- "@types/react-dom": "^18.2.21",
84
+ "@types/mdx": "^2.0.12",
85
+ "@types/react": "^18.2.72",
86
+ "@types/react-dom": "^18.2.22",
87
87
  "@types/react-router": "^5.1.20",
88
88
  "@types/react-router-dom": "^5.3.3",
89
89
  "@typescript-eslint/eslint-plugin": "^6.21.0",
90
90
  "@typescript-eslint/parser": "^6.21.0",
91
91
  "babel-loader": "^9.1.3",
92
- "chromatic": "^10.9.3",
92
+ "chromatic": "^10.9.6",
93
93
  "css-loader": "^6.10.0",
94
94
  "eslint": "^8.57.0",
95
95
  "eslint-config-prettier": "^9.1.0",
96
96
  "eslint-plugin-cypress": "^2.15.1",
97
- "eslint-plugin-export-scope": "^2.0.5",
97
+ "eslint-plugin-export-scope": "^2.3.0",
98
98
  "eslint-plugin-jest": "^27.9.0",
99
- "eslint-plugin-license-header": "^0.6.0",
99
+ "eslint-plugin-license-header": "^0.6.1",
100
100
  "eslint-plugin-prettier": "^5.1.3",
101
- "eslint-plugin-react": "^7.34.0",
101
+ "eslint-plugin-react": "^7.34.1",
102
102
  "eslint-plugin-react-hooks": "^4.6.0",
103
- "eslint-plugin-storybook": "^0.6.15",
103
+ "eslint-plugin-storybook": "^0.8.0",
104
104
  "husky": "^9.0.11",
105
105
  "identity-obj-proxy": "^3.0.0",
106
106
  "jest": "^29.7.0",
@@ -110,7 +110,7 @@
110
110
  "lint-staged": "^15.2.2",
111
111
  "mini-css-extract-plugin": "^2.8.1",
112
112
  "npm-run-all": "^4.1.5",
113
- "postcss": "^8.4.35",
113
+ "postcss": "^8.4.38",
114
114
  "postcss-modules": "^6.0.0",
115
115
  "postcss-url": "^10.1.3",
116
116
  "prettier": "^3.2.5",
@@ -122,14 +122,14 @@
122
122
  "rollup": "^2.79.1",
123
123
  "rollup-plugin-postcss": "^4.0.2",
124
124
  "rollup-plugin-terser": "^7.0.2",
125
- "sass": "^1.71.1",
125
+ "sass": "^1.72.0",
126
126
  "sass-loader": "^14.1.1",
127
- "size-limit": "^11.0.3",
128
- "storybook": "^7.6.14",
127
+ "size-limit": "^11.1.2",
128
+ "storybook": "^7.6.17",
129
129
  "storybook-addon-pseudo-states": "^2.2.1",
130
130
  "style-loader": "^3.3.4",
131
131
  "ts-jest": "^29.1.2",
132
132
  "tslib": "^2.6.2",
133
- "typescript": "^5.3.3"
133
+ "typescript": "^5.4.3"
134
134
  }
135
135
  }
@@ -36,6 +36,7 @@ export const useAddNewBtn = ({ addNew, filter }: Props) => {
36
36
  className={classes["action-button"]}
37
37
  onClick={() => addNew.onAddNew(filter)}
38
38
  ref={addBtnRef}
39
+ type="button"
39
40
  {...addNew.btnProps}
40
41
  >
41
42
  {!filter && addNewLabel}
@@ -19,7 +19,6 @@
19
19
  overflow-y: auto;
20
20
  flex: 1;
21
21
  outline: none;
22
- color: var(--color-blue-grey500);
23
22
  font-size: 0.875rem;
24
23
  line-height: 1.25rem;
25
24
  }
@@ -33,10 +33,11 @@ const RemoveButtonComponent: ForwardRefRenderFunction<HTMLButtonElement, Props>
33
33
  return (
34
34
  onRemove && (
35
35
  <button
36
+ title=""
37
+ type="button"
36
38
  {...rest}
37
39
  ref={ref}
38
40
  className={`${classes["remove"]} ${rest.className ?? ""}`}
39
- title=""
40
41
  onClick={onRemove}
41
42
  >
42
43
  <Icon icon={Icons.Times} className={classes["icon"]} />