@logora/debate 0.3.3 → 0.3.5

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,33 +1,33 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import O from "classnames";
2
+ import b from "classnames";
3
3
  import "react";
4
- import b from "react-oauth-popup";
4
+ import p from "react-oauth-popup";
5
5
  import { useLocation as x } from "react-router-dom";
6
- import p from "./OAuth2Button.module.scss.js";
7
- const j = ({
8
- provider: c,
9
- authDialogUrl: d,
10
- clientId: m,
11
- redirectUri: h,
6
+ import c from "./OAuth2Button.module.scss.js";
7
+ const U = p?.default ?? p, A = ({
8
+ provider: d,
9
+ authDialogUrl: m,
10
+ clientId: h,
11
+ redirectUri: u,
12
12
  scope: f,
13
- responseType: r,
14
- accessType: o = "",
15
- forceAuth: u = !1,
16
- onCode: l,
13
+ responseType: o,
14
+ accessType: r = "",
15
+ forceAuth: l = !1,
16
+ onCode: P,
17
17
  onClose: t,
18
18
  popup: w = !0,
19
19
  children: n,
20
- className: P,
20
+ className: _,
21
21
  state: s = ""
22
22
  }) => {
23
23
  x();
24
- const C = (a, U) => {
25
- l(a, c);
26
- }, _ = () => {
24
+ const C = (a, g) => {
25
+ P(a, d);
26
+ }, O = () => {
27
27
  t && t();
28
28
  }, i = () => {
29
- const a = new URL(d);
30
- return a.searchParams.append("client_id", m), a.searchParams.append("redirect_uri", h), a.searchParams.append("scope", f), u && a.searchParams.append("force_authentication", "1"), r && a.searchParams.append("response_type", r), o && a.searchParams.append("access_type", o), typeof window < "u" && a.searchParams.append(
29
+ const a = new URL(m);
30
+ return a.searchParams.append("client_id", h), a.searchParams.append("redirect_uri", u), a.searchParams.append("scope", f), l && a.searchParams.append("force_authentication", "1"), o && a.searchParams.append("response_type", o), r && a.searchParams.append("access_type", r), typeof window < "u" && a.searchParams.append(
31
31
  "state",
32
32
  s ? window.btoa(s) : window.btoa(window.location.href)
33
33
  ), a.href;
@@ -36,19 +36,19 @@ const j = ({
36
36
  "div",
37
37
  {
38
38
  "data-testid": "container",
39
- className: O(p.oauthButtonContainer, P),
39
+ className: b(c.oauthButtonContainer, _),
40
40
  children: w ? /* @__PURE__ */ e(
41
- b,
41
+ U,
42
42
  {
43
43
  url: i(),
44
44
  onCode: C,
45
- onClose: _,
46
- children: /* @__PURE__ */ e("div", { className: p.oauthPopupContainer, children: n })
45
+ onClose: O,
46
+ children: /* @__PURE__ */ e("div", { className: c.oauthPopupContainer, children: n })
47
47
  }
48
48
  ) : /* @__PURE__ */ e("a", { href: i(), children: n })
49
49
  }
50
50
  );
51
51
  };
52
52
  export {
53
- j as OAuth2Button
53
+ A as OAuth2Button
54
54
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logora/debate",
3
- "version": "0.3.3",
3
+ "version": "0.3.5",
4
4
  "type": "module",
5
5
  "license": "AGPL-3.0",
6
6
  "description": "Design system of @Logora made with React",
@@ -76,7 +76,7 @@
76
76
  "webfontloader": "^1.6.28"
77
77
  },
78
78
  "devDependencies": {
79
- "@biomejs/biome": "^1.9.4",
79
+ "@biomejs/biome": "^2.4.11",
80
80
  "@faker-js/faker": "^10.4.0",
81
81
  "@storybook/addon-a11y": "^10.3.5",
82
82
  "@storybook/addon-docs": "^10.3.5",
@@ -87,13 +87,13 @@
87
87
  "@testing-library/react": "^16.3.2",
88
88
  "@testing-library/user-event": "^14.5.2",
89
89
  "@vitejs/plugin-react": "^4.7.0",
90
- "@vitest/coverage-v8": "^4.1.3",
90
+ "@vitest/coverage-v8": "^4.1.4",
91
91
  "jsdom": "^29.0.2",
92
92
  "sass": "^1.85.0",
93
93
  "storybook": "^10.3.5",
94
94
  "vite": "^7.3.2",
95
95
  "vite-plugin-lib-inject-css": "^2.2.2",
96
- "vitest": "^4.1.3"
96
+ "vitest": "^4.1.4"
97
97
  },
98
98
  "peerDependencies": {
99
99
  "react": "^17.0.0 || ^18.0.0",