@globalbrain/sefirot 4.14.0 → 4.14.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.
@@ -30,9 +30,7 @@ export function provideLang(lang: Lang) {
30
30
  }
31
31
 
32
32
  export function useLang(): Lang {
33
- // Doing `||` check here because for some reason it doesn't return
34
- // the default value in tests but becomes `undefined`.
35
- return inject(SefirotLangKey, 'en') || 'en'
33
+ return inject(SefirotLangKey, 'en')
36
34
  }
37
35
 
38
36
  export function useBrowserLang(): Lang {
@@ -1,6 +1,6 @@
1
1
  import { type ValidationRuleWithParams } from '@vuelidate/core'
2
2
  import { type MessageProps as VMessageProps, helpers } from '@vuelidate/validators'
3
- import { type Lang, useLang } from '../composables/Lang'
3
+ import { type Lang } from '../composables/Lang'
4
4
  import { _required } from './validators'
5
5
 
6
6
  export interface RuleOptions {
@@ -18,7 +18,9 @@ export interface MessageProps extends VMessageProps {
18
18
  export function createRule(
19
19
  options: RuleOptions
20
20
  ): ValidationRuleWithParams {
21
- const lang = useLang()
21
+ const lang = typeof document !== 'undefined'
22
+ ? (document.documentElement.lang === 'ja' ? 'ja' : 'en')
23
+ : 'en'
22
24
 
23
25
  const params = options.params ?? {}
24
26
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@globalbrain/sefirot",
3
3
  "type": "module",
4
- "version": "4.14.0",
4
+ "version": "4.14.1",
5
5
  "packageManager": "pnpm@9.15.4",
6
6
  "description": "Vue Components for Global Brain Design System.",
7
7
  "author": "Kia Ishii <ka.ishii@globalbrains.com>",