design-react-kit 5.9.0 → 5.9.2

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/package.json CHANGED
@@ -25,7 +25,7 @@
25
25
  "bugs": {
26
26
  "url": "https://github.com/italia/design-react-kit/issues"
27
27
  },
28
- "version": "5.9.0",
28
+ "version": "5.9.2",
29
29
  "license": "BSD-3",
30
30
  "type": "module",
31
31
  "module": "./dist/index.js",
@@ -105,7 +105,7 @@
105
105
  "@types/react-dom": "^18.2.24",
106
106
  "@types/react-transition-group": "^4.4.10",
107
107
  "@types/uuid": "^10.0.0",
108
- "bootstrap-italia": "^2.16.1",
108
+ "bootstrap-italia": "^2.17.0",
109
109
  "browserslist-config-design-italia": "^1.0.0",
110
110
  "eslint": "^9.10.0",
111
111
  "eslint-plugin-mdx": "^3.1.5",
@@ -308,6 +308,7 @@ export const Input = ({
308
308
  className={classNames({
309
309
  'input-group': true,
310
310
  'input-number': true,
311
+ 'is-invalid': valid == false,
311
312
  disabled: rest.disabled,
312
313
  'input-number-adaptive': type === 'adaptive'
313
314
  })}
@@ -327,10 +328,10 @@ export const Input = ({
327
328
  ref={inputRef}
328
329
  />
329
330
  <span className='input-group-text align-buttons flex-column'>
330
- <button className='input-number-add' onClick={() => clickIncrDecr(1)}>
331
+ <button type='button' className='input-number-add' onClick={() => clickIncrDecr(1)}>
331
332
  <span className='visually-hidden'>{incrementLabel || ''}</span>
332
333
  </button>
333
- <button className='input-number-sub' onClick={() => clickIncrDecr(-1)}>
334
+ <button type='button' className='input-number-sub' onClick={() => clickIncrDecr(-1)}>
334
335
  <span className='visually-hidden'>{decrementLabel || ''}</span>
335
336
  </button>
336
337
  </span>
@@ -1,5 +1,6 @@
1
1
  import React, { FC, HTMLAttributes, ElementType } from 'react';
2
2
  import classNames from 'classnames';
3
+ import { PagerItem } from '..';
3
4
 
4
5
  export interface PagerProps extends HTMLAttributes<HTMLElement> {
5
6
  /** Etichetta di descrizione del contenuto del componente Pager */
@@ -35,9 +36,9 @@ export const Pager: FC<PagerProps> = ({
35
36
  const { ariaLabel, label } = total || {};
36
37
  const totalAriaLabel = ariaLabel ? <span className='visually-hidden'>{ariaLabel}</span> : null;
37
38
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
38
- const listChildren = React.Children.toArray(children).filter((child: any) => child.type.name === 'PaginationItem');
39
+ const listChildren = React.Children.toArray(children).filter((child: any) => child.type === PagerItem);
39
40
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
40
- const extraChildren = React.Children.toArray(children).filter((child: any)=> child.type.name !== 'PaginationItem');
41
+ const extraChildren = React.Children.toArray(children).filter((child: any)=> child.type !== PagerItem);
41
42
 
42
43
  // listChildren?.forEach(child => {
43
44
  // console.log(child)