mediacube-ui-v2 0.0.98 → 0.0.100

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.
Files changed (49) hide show
  1. package/README.md +37 -47
  2. package/README.template.md +37 -47
  3. package/dist/assets/iconsSprite.svg +1 -1
  4. package/dist/assets/tokens/colors.scss +11 -0
  5. package/dist/mediacube-ui-v2.js +11568 -11237
  6. package/dist/mediacube-ui-v2.umd.cjs +4 -4
  7. package/dist/style.css +1 -1
  8. package/dist/types/assets/tokens/json/colors.json.d.ts +10 -0
  9. package/dist/types/components/elements/McAvatar/McAvatar.vue.d.ts +3 -3
  10. package/dist/types/components/elements/McBadge/McBadge.vue.d.ts +2 -5
  11. package/dist/types/components/elements/McButton/McButton.vue.d.ts +5 -8
  12. package/dist/types/components/elements/McChip/McChip.vue.d.ts +2 -8
  13. package/dist/types/components/elements/McDraggable/McDraggable.vue.d.ts +2 -5
  14. package/dist/types/components/elements/McFieldRadio/McFieldRadio.vue.d.ts +4 -7
  15. package/dist/types/components/elements/McFieldRange/McFieldRange.vue.d.ts +2 -5
  16. package/dist/types/components/elements/McFieldSelect/McFieldSelect.vue.d.ts +8 -8
  17. package/dist/types/components/elements/McFieldText/McFieldText.vue.d.ts +12 -3
  18. package/dist/types/components/elements/McFieldToggle/McFieldToggle.vue.d.ts +3 -6
  19. package/dist/types/components/elements/McNotification/McNotification.vue.d.ts +2 -5
  20. package/dist/types/components/elements/McProgress/McProgress.vue.d.ts +0 -6
  21. package/dist/types/components/elements/McSeparator/McSeparator.vue.d.ts +2 -5
  22. package/dist/types/components/elements/McSlideUpDown/McSlideUpDown.vue.d.ts +1 -1
  23. package/dist/types/components/elements/McSvgIcon/McSvgIcon.vue.d.ts +17 -19
  24. package/dist/types/components/elements/McTitle/McTitle.vue.d.ts +4 -7
  25. package/dist/types/components/elements/McTooltip/McTooltip.vue.d.ts +4 -10
  26. package/dist/types/components/patterns/McFilter/McFilter.vue.d.ts +3 -3
  27. package/dist/types/components/patterns/McFilter/McFilterChip/McFilterChip.vue.d.ts +1 -1
  28. package/dist/types/components/patterns/McFilter/McFilterTags/McFilterTags.vue.d.ts +1 -1
  29. package/dist/types/components/patterns/McOverlay/McOverlay.vue.d.ts +0 -3
  30. package/dist/types/components/patterns/McSideBar/McSideBarButton/McSideBarButton.vue.d.ts +1 -1
  31. package/dist/types/components/patterns/McTab/McTab.vue.d.ts +9 -12
  32. package/dist/types/components/patterns/McTabs/McTabs.vue.d.ts +5 -11
  33. package/dist/types/components/templates/McDrawer/McDrawer.vue.d.ts +3 -3
  34. package/dist/types/components/templates/McDrawer/McDrawerContainer.vue.d.ts +1 -1
  35. package/dist/types/components/templates/McModal/McModal.vue.d.ts +3 -3
  36. package/dist/types/components/templates/McModal/McModalContainer.vue.d.ts +1 -1
  37. package/dist/types/components/templates/McToast/McToast.vue.d.ts +2 -5
  38. package/dist/types/composables/index.d.ts +1 -0
  39. package/dist/types/composables/useHelper.d.ts +10 -0
  40. package/dist/types/composables/useTheme.d.ts +142 -0
  41. package/dist/types/enums/Themes.d.ts +4 -0
  42. package/dist/types/enums/index.d.ts +1 -0
  43. package/dist/types/index.d.ts +2 -1
  44. package/dist/types/types/IDSOptions.d.ts +5 -0
  45. package/dist/types/types/index.d.ts +1 -0
  46. package/dist/types/types/styles/ColorTheme.d.ts +147 -0
  47. package/dist/types/types/styles/Colors.d.ts +10 -0
  48. package/dist/types/utils/index.d.ts +3 -1
  49. package/package.json +2 -1
package/README.md CHANGED
@@ -13,27 +13,51 @@ npm install mediacube-ui-v2
13
13
 
14
14
  # Usage #
15
15
  ### Nuxt@3.X
16
- ```js
16
+ ```ts
17
17
  //Nuxt plugin
18
18
  import { defineNuxtPlugin } from '#app';
19
19
  import MediacubeUi from 'mediacube-ui-v2'
20
- import 'mediacube-ui-v2/style'
20
+
21
+ //import { IToast } from 'mediacube-ui-v2/types/IToast'
22
+ //import { Themes } from 'mediacube-ui-v2/enums'
23
+ //import { ColorThemes } from 'mediacube-ui-v2/types'
21
24
 
22
25
  export default defineNuxtPlugin( (nuxtApp) => {
23
26
  nuxtApp.vueApp.use(MediacubeUi, {
24
27
  drawerComponents: {},
25
- modalComponents: {}
28
+ modalComponents: {},
29
+ toasts?: Partial<IToast>
30
+ defaultAvatar?: string | null,
31
+ router?: null | Router,
32
+ colors?: Record<string, string>,
33
+ themes?: ColorThemes,
34
+ theme?: Themes,
26
35
  })
27
36
  })
37
+
38
+ // nuxt.config.ts
39
+ css: ['mediacube-ui-v2/style', 'mediacube-ui-v2/font']
40
+
28
41
  ```
29
42
  ### Vue@3.X
30
- ```js
43
+ ```ts
31
44
  import MediacubeUi from 'mediacube-ui-v2'
32
45
  import 'mediacube-ui-v2/style'
46
+ import 'mediacube-ui-v2/font'
47
+
48
+ //import { IToast } from 'mediacube-ui-v2/types/IToast'
49
+ //import { Themes } from 'mediacube-ui-v2/enums'
50
+ //import { ColorThemes } from 'mediacube-ui-v2/types'
33
51
 
34
52
  app.use(MediacubeUi, {
35
53
  drawerComponents: {},
36
- modalComponents: {}
54
+ modalComponents: {},
55
+ toasts?: Partial<IToast>
56
+ defaultAvatar?: string | null,
57
+ router?: null | Router,
58
+ colors?: Record<string, string>,
59
+ themes?: ColorThemes,
60
+ theme?: Themes,
37
61
  })
38
62
  ```
39
63
 
@@ -41,54 +65,20 @@ app.use(MediacubeUi, {
41
65
 
42
66
  TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking.
43
67
 
44
- **CSS example:**
45
-
46
- ```css
47
- /**
48
- * @tokens Colors
49
- * @presenter Color
50
- */
51
-
52
- :root {
53
- --n0: #fff; /* Token Description */
54
- --n100: #fbfbfb;
55
- --n200: #edeeef;
56
- --n300: #e4e5e7;
57
- --primary: var(--n300);
58
- }
59
-
60
- /**
61
- * @tokens Border Radius
62
- * @presenter BorderRadius
63
- */
64
-
65
- :root {
66
- --border-radius-m: 4px;
67
- --border-radius-l: 8px;
68
- }
69
- ```
70
68
 
71
69
  **SCSS example:**
72
70
 
73
71
  ```scss
74
72
  /**
75
- * @tokens Colors
76
- * @presenter Color
77
- */
78
-
79
- $n0: #fff; /* Token Description */
80
- $n100: #fbfbfb;
81
- $n200: #edeeef;
82
- $n300: #e4e5e7;
83
- $primary: $n300;
84
-
85
- /**
86
- * @tokens Border Radius
87
- * @presenter BorderRadius
73
+ * @tokens
74
+ * @presenter
88
75
  */
89
76
 
90
- $border-radius-m: 4px;
91
- $border-radius-l: 8px;
77
+ $color-purple: #8756FF;
78
+ $font-weight-medium: 500;
79
+ $media-desktop: "(hover: hover) and (pointer: fine)";
80
+ $media-mobile: "(hover: none) and (pointer: coarse)";
81
+ //and much more...
92
82
  ```
93
83
 
94
84
  **SVG example:**
@@ -181,7 +171,7 @@ The following style files are available:
181
171
 
182
172
  ## Storybook interface support
183
173
 
184
- ![info image storybook interface](/dist/npm_preview.jpg)
174
+ ![info image storybook interface](./dist/npm_preview.jpg)
185
175
 
186
176
  [//]: # (## Available Types)
187
177
  [//]: # (&mdash;)
@@ -13,27 +13,51 @@ npm install mediacube-ui-v2
13
13
 
14
14
  # Usage #
15
15
  ### Nuxt@3.X
16
- ```js
16
+ ```ts
17
17
  //Nuxt plugin
18
18
  import { defineNuxtPlugin } from '#app';
19
19
  import MediacubeUi from 'mediacube-ui-v2'
20
- import 'mediacube-ui-v2/style'
20
+
21
+ //import { IToast } from 'mediacube-ui-v2/types/IToast'
22
+ //import { Themes } from 'mediacube-ui-v2/enums'
23
+ //import { ColorThemes } from 'mediacube-ui-v2/types'
21
24
 
22
25
  export default defineNuxtPlugin( (nuxtApp) => {
23
26
  nuxtApp.vueApp.use(MediacubeUi, {
24
27
  drawerComponents: {},
25
- modalComponents: {}
28
+ modalComponents: {},
29
+ toasts?: Partial<IToast>
30
+ defaultAvatar?: string | null,
31
+ router?: null | Router,
32
+ colors?: Record<string, string>,
33
+ themes?: ColorThemes,
34
+ theme?: Themes,
26
35
  })
27
36
  })
37
+
38
+ // nuxt.config.ts
39
+ css: ['mediacube-ui-v2/style', 'mediacube-ui-v2/font']
40
+
28
41
  ```
29
42
  ### Vue@3.X
30
- ```js
43
+ ```ts
31
44
  import MediacubeUi from 'mediacube-ui-v2'
32
45
  import 'mediacube-ui-v2/style'
46
+ import 'mediacube-ui-v2/font'
47
+
48
+ //import { IToast } from 'mediacube-ui-v2/types/IToast'
49
+ //import { Themes } from 'mediacube-ui-v2/enums'
50
+ //import { ColorThemes } from 'mediacube-ui-v2/types'
33
51
 
34
52
  app.use(MediacubeUi, {
35
53
  drawerComponents: {},
36
- modalComponents: {}
54
+ modalComponents: {},
55
+ toasts?: Partial<IToast>
56
+ defaultAvatar?: string | null,
57
+ router?: null | Router,
58
+ colors?: Record<string, string>,
59
+ themes?: ColorThemes,
60
+ theme?: Themes,
37
61
  })
38
62
  ```
39
63
 
@@ -41,54 +65,20 @@ app.use(MediacubeUi, {
41
65
 
42
66
  TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking.
43
67
 
44
- **CSS example:**
45
-
46
- ```css
47
- /**
48
- * @tokens Colors
49
- * @presenter Color
50
- */
51
-
52
- :root {
53
- --n0: #fff; /* Token Description */
54
- --n100: #fbfbfb;
55
- --n200: #edeeef;
56
- --n300: #e4e5e7;
57
- --primary: var(--n300);
58
- }
59
-
60
- /**
61
- * @tokens Border Radius
62
- * @presenter BorderRadius
63
- */
64
-
65
- :root {
66
- --border-radius-m: 4px;
67
- --border-radius-l: 8px;
68
- }
69
- ```
70
68
 
71
69
  **SCSS example:**
72
70
 
73
71
  ```scss
74
72
  /**
75
- * @tokens Colors
76
- * @presenter Color
77
- */
78
-
79
- $n0: #fff; /* Token Description */
80
- $n100: #fbfbfb;
81
- $n200: #edeeef;
82
- $n300: #e4e5e7;
83
- $primary: $n300;
84
-
85
- /**
86
- * @tokens Border Radius
87
- * @presenter BorderRadius
73
+ * @tokens
74
+ * @presenter
88
75
  */
89
76
 
90
- $border-radius-m: 4px;
91
- $border-radius-l: 8px;
77
+ $color-purple: #8756FF;
78
+ $font-weight-medium: 500;
79
+ $media-desktop: "(hover: hover) and (pointer: fine)";
80
+ $media-mobile: "(hover: none) and (pointer: coarse)";
81
+ //and much more...
92
82
  ```
93
83
 
94
84
  **SVG example:**
@@ -181,7 +171,7 @@ The following style files are available:
181
171
 
182
172
  ## Storybook interface support
183
173
 
184
- ![info image storybook interface](/dist/npm_preview.jpg)
174
+ ![info image storybook interface](./dist/npm_preview.jpg)
185
175
 
186
176
  [//]: # (## Available Types)
187
177
  [//]: # ({{types}})