@rikstv/shared-components 3.0.32 → 3.0.33

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,12 @@
1
1
  # 📖 Changelog
2
2
 
3
+ ## 3.0.33
4
+
5
+ - Fixes for `<PasswordTextField>` se below
6
+ - Sets button type for show/hide button to avoid submiting by default behavior when
7
+ inside a form
8
+ - Sets box-sizing to content-box explicitly
9
+
3
10
  ## 3.0.32
4
11
 
5
12
  - Add `<PasswordTextField>` component with show/hide password button
@@ -1,13 +1,14 @@
1
1
  import { j as t } from "../accordion/Accordion-CrPiD_81.mjs";
2
2
  import { forwardRef as d, useState as a } from "react";
3
3
  import { T as i } from "./TextField-CYQX31YV.mjs";
4
- const l = d(({ ...e }, o) => {
4
+ const n = d(({ ...o }, e) => {
5
5
  const [s, r] = a(!1);
6
- return /* @__PURE__ */ t.jsxs("div", { style: { position: "relative" }, children: [
7
- /* @__PURE__ */ t.jsx(i, { type: s ? "text" : "password", ref: o, ...e }),
6
+ return /* @__PURE__ */ t.jsxs("div", { style: { position: "relative", boxSizing: "content-box" }, children: [
7
+ /* @__PURE__ */ t.jsx(i, { type: s ? "text" : "password", ref: e, ...o }),
8
8
  /* @__PURE__ */ t.jsx(
9
9
  "button",
10
10
  {
11
+ type: "button",
11
12
  onClick: () => r(!s),
12
13
  className: `rds-password-textfield-button ${s ? "rds-password-textfield-button--hide" : "rds-password-textfield-button--show"}`,
13
14
  children: /* @__PURE__ */ t.jsx("span", { className: "sr-only", children: s ? "Skjul passord" : "Vis passord" })
@@ -15,7 +16,7 @@ const l = d(({ ...e }, o) => {
15
16
  )
16
17
  ] });
17
18
  });
18
- l.displayName = "PasswordTextField";
19
+ n.displayName = "PasswordTextField";
19
20
  export {
20
- l as P
21
+ n as P
21
22
  };
@@ -22,7 +22,7 @@ import { C as Pe } from "./components/checkbox/Checkbox-D6f5jfzl.mjs";
22
22
  import { R as Se } from "./components/toggle/RadioToggle-BICr1hFE.mjs";
23
23
  import { F as Ce } from "./components/toggle/FieldSet-Bq2lhIzg.mjs";
24
24
  import { T as Fe } from "./components/textfield/TextField-CYQX31YV.mjs";
25
- import { P as De } from "./components/textfield/PasswordTextField-DVbx8cyw.mjs";
25
+ import { P as De } from "./components/textfield/PasswordTextField-DMpf4jzX.mjs";
26
26
  import { B as ke, d as Ve, D as Ne, a as $e, b as Qe, c as We, H as _e, L as qe, M as Ue, S as je, e as ze, f as Je, g as Ke, T as Xe } from "./components/typography/Typography-C79Sp-ja.mjs";
27
27
  import { L as Ze } from "./components/list/List-CpfjceLN.mjs";
28
28
  import { C as rr } from "./components/list/CheckmarkListItem-Dew6gW7B.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rikstv/shared-components",
3
- "version": "3.0.32",
3
+ "version": "3.0.33",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },