design-react-kit 5.0.5-rc6 → 5.2.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 (42) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/Alert/Alert.cjs +1 -1
  3. package/dist/Alert/Alert.cjs.map +1 -1
  4. package/dist/Alert/Alert.js +7 -8
  5. package/dist/Alert/Alert.js.map +1 -1
  6. package/dist/Input/Input.cjs +1 -1
  7. package/dist/Input/Input.cjs.map +1 -1
  8. package/dist/Input/Input.js +13 -9
  9. package/dist/Input/Input.js.map +1 -1
  10. package/dist/Input/InputContainer.cjs +1 -1
  11. package/dist/Input/InputContainer.cjs.map +1 -1
  12. package/dist/Input/InputContainer.js +11 -1
  13. package/dist/Input/InputContainer.js.map +1 -1
  14. package/dist/Input/TextArea.cjs +1 -1
  15. package/dist/Input/TextArea.cjs.map +1 -1
  16. package/dist/List/List.cjs +2 -0
  17. package/dist/List/List.cjs.map +1 -0
  18. package/dist/List/List.js +13 -0
  19. package/dist/List/List.js.map +1 -0
  20. package/dist/List/ListItem.cjs +2 -0
  21. package/dist/List/ListItem.cjs.map +1 -0
  22. package/dist/List/ListItem.js +24 -0
  23. package/dist/List/ListItem.js.map +1 -0
  24. package/dist/Rating/Rating.cjs +1 -1
  25. package/dist/Rating/Rating.cjs.map +1 -1
  26. package/dist/index.cjs +1 -1
  27. package/dist/index.cjs.map +1 -1
  28. package/dist/index.js +3 -1
  29. package/dist/index.js.map +1 -1
  30. package/dist/types/Alert/Alert.d.ts +9 -3
  31. package/dist/types/Input/Input.d.ts +10 -2
  32. package/dist/types/Input/InputContainer.d.ts +8 -0
  33. package/dist/types/List/List.d.ts +16 -0
  34. package/dist/types/List/ListItem.d.ts +27 -0
  35. package/dist/types/index.d.ts +6 -2
  36. package/package.json +3 -14
  37. package/src/Alert/Alert.tsx +18 -14
  38. package/src/Input/Input.tsx +30 -14
  39. package/src/Input/InputContainer.tsx +33 -0
  40. package/src/List/List.tsx +40 -0
  41. package/src/List/ListItem.tsx +86 -0
  42. package/src/index.ts +6 -2
package/CHANGELOG.md CHANGED
@@ -1,3 +1,34 @@
1
+ # [5.2.0](https://github.com/italia/design-react-kit/compare/v5.1.0...v5.2.0) (2024-08-05)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * thumbnav is a navigation component ([501417e](https://github.com/italia/design-react-kit/commit/501417eda9006de9ea1931d7809aed33125fd90f))
7
+
8
+
9
+ ### Features
10
+
11
+ * add list component ([e4c9e14](https://github.com/italia/design-react-kit/commit/e4c9e14f6295343bce7262665fa54ba4085cad30))
12
+
13
+
14
+
15
+ # [5.1.0](https://github.com/italia/design-react-kit/compare/v5.0.4...v5.1.0) (2024-07-02)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * alert default props ([39821d9](https://github.com/italia/design-react-kit/commit/39821d93a4b68bf0edd60953e940ebed2c1d5775))
21
+ * dimmer ios bug ([315760a](https://github.com/italia/design-react-kit/commit/315760a217541f9a5b73dc9ea92b8c559f4be362))
22
+
23
+
24
+ ### Features
25
+
26
+ * add icon and button to input ([7ad4ca9](https://github.com/italia/design-react-kit/commit/7ad4ca948ee52f35835b6efc19fc424976cd818c))
27
+ * **deps:** update to react 18 ([ac0b4d5](https://github.com/italia/design-react-kit/commit/ac0b4d597442e6045d771be55a1437131b90b305))
28
+ * new dropdown based on reactstrap ([3e4eda6](https://github.com/italia/design-react-kit/commit/3e4eda671f89436587fc315ade8dff0deb2919f2))
29
+
30
+
31
+
1
32
  ## [5.0.4](https://github.com/italia/design-react-kit/compare/v5.0.3...v5.0.4) (2024-05-02)
2
33
 
3
34
 
@@ -1,2 +1,2 @@
1
- "use strict";var p=Object.create;var o=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var m=Object.getPrototypeOf,f=Object.prototype.hasOwnProperty;var g=(e,t)=>{for(var r in t)o(e,r,{get:t[r],enumerable:!0})},a=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of c(t))!f.call(e,s)&&s!==r&&o(e,s,{get:()=>t[s],enumerable:!(n=u(t,s))||n.enumerable});return e};var M=(e,t,r)=>(r=e!=null?p(m(e)):{},a(t||!e||!e.__esModule?o(r,"default",{value:e,enumerable:!0}):r,e)),A=e=>a(o({},"__esModule",{value:!0}),e);var H={};g(H,{Alert:()=>d});module.exports=A(H);var l=M(require("react"),1),i=require("reactstrap"),E={color:"success",isOpen:!0,fade:!0},d=({testId:e,...t})=>l.default.createElement(i.Alert,{"data-testid":e,...t});d.defaultProps=E;0&&(module.exports={Alert});
1
+ "use strict";var p=Object.create;var n=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var m=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty;var g=(e,r)=>{for(var t in r)n(e,t,{get:r[t],enumerable:!0})},a=(e,r,t,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of c(r))!u.call(e,s)&&s!==t&&n(e,s,{get:()=>r[s],enumerable:!(o=d(r,s))||o.enumerable});return e};var M=(e,r,t)=>(t=e!=null?p(m(e)):{},a(r||!e||!e.__esModule?n(t,"default",{value:e,enumerable:!0}):t,e)),f=e=>a(n({},"__esModule",{value:!0}),e);var b={};g(b,{Alert:()=>A});module.exports=f(b);var l=M(require("react"),1),i=require("reactstrap"),A=({color:e="success",isOpen:r=!0,fade:t=!0,testId:o,...s})=>l.default.createElement(i.Alert,{"data-testid":o,...{color:e,isOpen:r,fade:t},...s});0&&(module.exports={Alert});
2
2
  //# sourceMappingURL=Alert.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Alert/Alert.tsx"],"sourcesContent":["import React, { FC, HTMLAttributes, MouseEventHandler, ElementType, Ref } from 'react';\nimport { Alert as InnerAlert, FadeProps } from 'reactstrap';\nimport { CSSModule } from 'reactstrap/types/lib/utils';\n\n// Copy over from reactstrap and add new ones\nexport interface AlertProps extends HTMLAttributes<HTMLElement> {\n closeClassName?: string;\n closeAriaLabel?: string;\n /** Oggetto contenente la nuova mappatura per le classi CSS. */\n cssModule?: CSSModule;\n /** Le varianti di colore definite in Bootstrap Italia */\n color?: 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | string;\n /** Quando abilitato mostra un'animazione di entrata ed uscita del componente Alert. Valore di default: true. */\n fade?: boolean;\n /** Utilizzarlo in caso di utilizzo di componenti personalizzati */\n tag?: ElementType;\n transition?: FadeProps;\n /** Da utilizzare per impostare un riferimento all'elemento DOM */\n innerRef?: Ref<HTMLElement>;\n isOpen?: boolean;\n toggle?: MouseEventHandler<any>;\n testId?: string;\n}\n\nconst defaultProps = {\n color: 'success',\n isOpen: true,\n fade: true\n};\n\nexport const Alert: FC<AlertProps> = ({ testId, ...props }) => {\n return <InnerAlert data-testid={testId} {...props} />;\n};\n\nAlert.defaultProps = defaultProps;\n"],"mappings":"0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,WAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAA+E,sBAC/EC,EAA+C,sBAuBzCC,EAAe,CACnB,MAAO,UACP,OAAQ,GACR,KAAM,EACR,EAEaJ,EAAwB,CAAC,CAAE,OAAAK,EAAQ,GAAGC,CAAM,IAChD,EAAAC,QAAA,cAAC,EAAAC,MAAA,CAAW,cAAaH,EAAS,GAAGC,EAAO,EAGrDN,EAAM,aAAeI","names":["Alert_exports","__export","Alert","__toCommonJS","import_react","import_reactstrap","defaultProps","testId","props","React","InnerAlert"]}
1
+ {"version":3,"sources":["../../src/Alert/Alert.tsx"],"sourcesContent":["import React, { ElementType, FC, HTMLAttributes, MouseEventHandler, Ref } from 'react';\nimport { FadeProps, Alert as InnerAlert } from 'reactstrap';\nimport { CSSModule } from 'reactstrap/types/lib/utils';\n\n// Copy over from reactstrap and add new ones\nexport interface AlertProps extends HTMLAttributes<HTMLElement> {\n closeClassName?: string;\n closeAriaLabel?: string;\n /** Oggetto contenente la nuova mappatura per le classi CSS. */\n cssModule?: CSSModule;\n /** Le varianti di colore definite in Bootstrap Italia\n * @default primary\n */\n color?: 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | string;\n /** Quando abilitato mostra un'animazione di entrata ed uscita del componente Alert.\n * @default true */\n fade?: boolean;\n /** Utilizzarlo in caso di utilizzo di componenti personalizzati */\n tag?: ElementType;\n transition?: FadeProps;\n /** Da utilizzare per impostare un riferimento all'elemento DOM */\n innerRef?: Ref<HTMLElement>;\n /** Quando abilitato mostra l'alert\n * @default true\n */\n isOpen?: boolean;\n toggle?: MouseEventHandler<any>;\n testId?: string;\n}\n\n\nexport const Alert: FC<AlertProps> = ({ color = 'success', isOpen = true, fade = true, testId, ...props }) => {\n const baseProps = {\n color,\n isOpen,\n fade\n };\n return <InnerAlert data-testid={testId} {...baseProps} {...props} />;\n};"],"mappings":"0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,WAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAA+E,sBAC/EC,EAA+C,sBA8BlCH,EAAwB,CAAC,CAAE,MAAAI,EAAQ,UAAW,OAAAC,EAAS,GAAM,KAAAC,EAAO,GAAM,OAAAC,EAAQ,GAAGC,CAAM,IAM/F,EAAAC,QAAA,cAAC,EAAAC,MAAA,CAAW,cAAaH,EAAS,GALvB,CAChB,MAAAH,EACA,OAAAC,EACA,KAAAC,CACF,EACwD,GAAGE,EAAO","names":["Alert_exports","__export","Alert","__toCommonJS","import_react","import_reactstrap","color","isOpen","fade","testId","props","React","InnerAlert"]}
@@ -1,12 +1,11 @@
1
1
  import React from 'react';
2
2
  import { Alert as InnerAlert } from 'reactstrap';
3
- const defaultProps = {
4
- color: 'success',
5
- isOpen: true,
6
- fade: true
3
+ export const Alert = ({ color = 'success', isOpen = true, fade = true, testId, ...props }) => {
4
+ const baseProps = {
5
+ color,
6
+ isOpen,
7
+ fade
8
+ };
9
+ return React.createElement(InnerAlert, { "data-testid": testId, ...baseProps, ...props });
7
10
  };
8
- export const Alert = ({ testId, ...props }) => {
9
- return React.createElement(InnerAlert, { "data-testid": testId, ...props });
10
- };
11
- Alert.defaultProps = defaultProps;
12
11
  //# sourceMappingURL=Alert.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Alert.js","sourceRoot":"","sources":["../../src/Alert/Alert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkE,MAAM,OAAO,CAAC;AACvF,OAAO,EAAE,KAAK,IAAI,UAAU,EAAa,MAAM,YAAY,CAAC;AAuB5D,MAAM,YAAY,GAAG;IACnB,KAAK,EAAE,SAAS;IAChB,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,IAAI;CACX,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAmB,CAAC,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IAC5D,OAAO,oBAAC,UAAU,mBAAc,MAAM,KAAM,KAAK,GAAI,CAAC;AACxD,CAAC,CAAC;AAEF,KAAK,CAAC,YAAY,GAAG,YAAY,CAAC"}
1
+ {"version":3,"file":"Alert.js","sourceRoot":"","sources":["../../src/Alert/Alert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkE,MAAM,OAAO,CAAC;AACvF,OAAO,EAAa,KAAK,IAAI,UAAU,EAAE,MAAM,YAAY,CAAC;AA8B5D,MAAM,CAAC,MAAM,KAAK,GAAmB,CAAC,EAAE,KAAK,GAAG,SAAS,EAAE,MAAM,GAAG,IAAI,EAAE,IAAI,GAAG,IAAI,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IAC3G,MAAM,SAAS,GAAG;QAChB,KAAK;QACL,MAAM;QACN,IAAI;KACL,CAAC;IACF,OAAO,oBAAC,UAAU,mBAAc,MAAM,KAAM,SAAS,KAAM,KAAK,GAAI,CAAC;AACvE,CAAC,CAAC"}