@operato/utils 7.0.0-rc.8 β†’ 7.0.0

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.
@@ -0,0 +1,52 @@
1
+ import { i18next } from '@operato/i18n'
2
+
3
+ export const globalTypes = {
4
+ locale: {
5
+ name: 'Locale',
6
+ description: 'Internationalization locale',
7
+ toolbar: {
8
+ icon: 'globe',
9
+ items: [
10
+ { value: 'en', right: 'πŸ‡ΊπŸ‡Έ', title: 'English' },
11
+ { value: 'ko', right: 'πŸ‡°πŸ‡·', title: 'ν•œκ΅­μ–΄' },
12
+ { value: 'zh', right: 'πŸ‡¨πŸ‡³', title: 'δΈ­ζ–‡' },
13
+ { value: 'ja', right: 'πŸ‡―πŸ‡΅', title: 'ζ—₯本θͺž' },
14
+ { value: 'ms', right: 'πŸ‡²πŸ‡Ύ', title: 'Bahasa Melayu' }
15
+ ],
16
+ showName: true
17
+ }
18
+ },
19
+ theme: {
20
+ name: 'Theme',
21
+ description: 'Global theme for components',
22
+ toolbar: {
23
+ icon: 'paintbrush',
24
+ items: [
25
+ { value: 'light', title: 'Light' },
26
+ { value: 'dark', title: 'Dark' }
27
+ ],
28
+ showName: true
29
+ }
30
+ }
31
+ }
32
+
33
+ export const decorators = [
34
+ (Story, context) => {
35
+ const { locale, theme } = context.globals
36
+
37
+ if (locale) {
38
+ i18next.changeLanguage(locale)
39
+ }
40
+
41
+ // Set the theme class for the document
42
+ if (theme === 'dark') {
43
+ document.documentElement.classList.add('dark')
44
+ document.documentElement.classList.remove('light')
45
+ } else {
46
+ document.documentElement.classList.add('light')
47
+ document.documentElement.classList.remove('dark')
48
+ }
49
+
50
+ return Story()
51
+ }
52
+ ]
package/CHANGELOG.md CHANGED
@@ -3,6 +3,23 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [7.0.0](https://github.com/hatiolab/operato/compare/v7.0.0-rc.13...v7.0.0) (2024-06-30)
7
+
8
+ **Note:** Version bump only for package @operato/utils
9
+
10
+
11
+
12
+
13
+
14
+ ## [7.0.0-rc.13](https://github.com/hatiolab/operato/compare/v7.0.0-rc.12...v7.0.0-rc.13) (2024-06-30)
15
+
16
+
17
+ ### :bug: Bug Fix
18
+
19
+ * storybook preview.js ([8215c06](https://github.com/hatiolab/operato/commit/8215c06a293ecaa2df2f0b314ee5b9ff252a1434))
20
+
21
+
22
+
6
23
  ## [7.0.0-rc.8](https://github.com/hatiolab/operato/compare/v7.0.0-rc.7...v7.0.0-rc.8) (2024-06-28)
7
24
 
8
25
  **Note:** Version bump only for package @operato/utils
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@operato/utils",
3
3
  "description": "Webcomponent utils following open-wc recommendations",
4
4
  "author": "heartyoh",
5
- "version": "7.0.0-rc.8",
5
+ "version": "7.0.0",
6
6
  "main": "dist/src/index.js",
7
7
  "module": "dist/src/index.js",
8
8
  "exports": {
@@ -119,5 +119,5 @@
119
119
  "dependencies": {
120
120
  "lodash-es": "^4.17.21"
121
121
  },
122
- "gitHead": "96f980e10bdad5b1e1d4e8e8be557e9f650b95ce"
122
+ "gitHead": "b1bdd00f672eb45ffc409ed971ac60007eda4090"
123
123
  }