@westpac/ui 0.42.0 → 0.42.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @westpac/ui
2
2
 
3
+ ## 0.42.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 1020b3a: When Alert are put in Form and click on close button, It triggers onsubmit action due default type of button is submit for most of the browsers
8
+
3
9
  ## 0.42.0
4
10
 
5
11
  ### Minor Changes
@@ -82,6 +82,7 @@ export function Alert({ look ='info' , mode ='box' , heading , headingTag: Headi
82
82
  }, !!heading && React.createElement(HeadingTag, {
83
83
  className: styles.heading()
84
84
  }, heading), children), dismissible && mode !== 'text' && React.createElement("button", {
85
+ type: "button",
85
86
  className: styles.close(),
86
87
  onClick: handleClose,
87
88
  "aria-label": "Close alert"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@westpac/ui",
3
- "version": "0.42.0",
3
+ "version": "0.42.1",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "type": "module",
@@ -257,7 +257,7 @@
257
257
  "typescript": "^5.5.4",
258
258
  "vite": "^5.2.12",
259
259
  "vitest": "^0.30.1",
260
- "@westpac/eslint-config": "~0.4.0",
260
+ "@westpac/eslint-config": "~0.5.0",
261
261
  "@westpac/test-config": "~0.0.0",
262
262
  "@westpac/ts-config": "~0.0.0"
263
263
  },
@@ -69,7 +69,7 @@ export function Alert({
69
69
  {children}
70
70
  </div>
71
71
  {dismissible && mode !== 'text' && (
72
- <button className={styles.close()} onClick={handleClose} aria-label="Close alert">
72
+ <button type="button" className={styles.close()} onClick={handleClose} aria-label="Close alert">
73
73
  <CloseIcon size="small" />
74
74
  </button>
75
75
  )}