@arch-cadre/ui 0.0.20 → 0.0.22

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.
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.LanguageSwitcher = LanguageSwitcher;
8
8
  var _intl = require("@arch-cadre/intl");
9
- var _client = require("@arch-cadre/intl/client");
10
9
  var _lucideReact = require("lucide-react");
11
10
  var _navigation = require("next/navigation");
12
11
  var React = _interopRequireWildcard(require("react"));
@@ -15,11 +14,11 @@ var _dropdownMenu = require("./dropdown-menu.cjs");
15
14
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
16
15
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
17
16
  function LanguageSwitcher() {
18
- const locale = (0, _client.useLocale)();
17
+ const locale = (0, _intl.useLocale)();
19
18
  const router = (0, _navigation.useRouter)();
20
19
  const {
21
20
  t
22
- } = (0, _client.useTranslation)();
21
+ } = (0, _intl.useTranslation)();
23
22
  const handleLanguageChange = newLocale => {
24
23
  document.cookie = `NEXT_LOCALE=${newLocale}; path=/; max-age=31536000; SameSite=Lax`;
25
24
  router.refresh();
@@ -1,6 +1,5 @@
1
1
  "use client";
2
- import { LOCALES } from "@arch-cadre/intl";
3
- import { useLocale, useTranslation } from "@arch-cadre/intl/client";
2
+ import { LOCALES, useLocale, useTranslation } from "@arch-cadre/intl";
4
3
  import { Languages } from "lucide-react";
5
4
  import { useRouter } from "next/navigation";
6
5
  import * as React from "react";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arch-cadre/ui",
3
- "version": "0.0.20",
3
+ "version": "0.0.22",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./package.json": "./package.json",
@@ -52,8 +52,8 @@
52
52
  "dev": "unbuild --stub"
53
53
  },
54
54
  "dependencies": {
55
- "@arch-cadre/core": "^0.0.20",
56
- "@arch-cadre/intl": "^0.0.20",
55
+ "@arch-cadre/core": "^0.0.22",
56
+ "@arch-cadre/intl": "^0.0.22",
57
57
  "@hookform/resolvers": "^5.2.2",
58
58
  "@iconify-json/solar": "^1.2.2",
59
59
  "@iconify/react": "^6.0.0",
@@ -1,7 +1,6 @@
1
1
  "use client";
2
2
 
3
- import { LOCALES } from "@arch-cadre/intl";
4
- import { useLocale, useTranslation } from "@arch-cadre/intl/client";
3
+ import { LOCALES, useLocale, useTranslation } from "@arch-cadre/intl";
5
4
  import { Languages } from "lucide-react";
6
5
  import { useRouter } from "next/navigation";
7
6
  import * as React from "react";