mediacube-ui-v2 0.0.44 → 0.0.45

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 (65) hide show
  1. package/README.md +4 -0
  2. package/README.template.md +4 -0
  3. package/dist/assets/fonts/inter/Inter-Bold.woff +0 -0
  4. package/dist/assets/fonts/inter/Inter-Bold.woff2 +0 -0
  5. package/dist/assets/fonts/inter/Inter-Italic.woff +0 -0
  6. package/dist/assets/fonts/inter/Inter-Italic.woff2 +0 -0
  7. package/dist/assets/fonts/inter/Inter-Medium.woff +0 -0
  8. package/dist/assets/fonts/inter/Inter-Medium.woff2 +0 -0
  9. package/dist/assets/fonts/inter/Inter-Regular.woff +0 -0
  10. package/dist/assets/fonts/inter/Inter-Regular.woff2 +0 -0
  11. package/dist/assets/fonts/inter/Inter-SemiBold.woff +0 -0
  12. package/dist/assets/fonts/inter/Inter-SemiBold.woff2 +0 -0
  13. package/dist/assets/fonts/inter/inter.css +44 -0
  14. package/dist/assets/styles/functions.scss +187 -0
  15. package/dist/assets/styles/main.scss +5 -0
  16. package/dist/assets/styles/mixins.scss +664 -0
  17. package/dist/assets/styles/spacing.scss +33 -0
  18. package/dist/assets/styles/table.scss +12 -0
  19. package/dist/assets/styles/toast.scss +62 -0
  20. package/dist/assets/styles/tooltip.scss +123 -0
  21. package/dist/assets/tokens/animations.scss +57 -0
  22. package/dist/assets/tokens/border-radius.scss +23 -0
  23. package/dist/assets/tokens/box-shadows.scss +22 -0
  24. package/dist/assets/tokens/colors.scss +81 -0
  25. package/dist/assets/tokens/durations.scss +13 -0
  26. package/dist/assets/tokens/easings.scss +6 -0
  27. package/dist/assets/tokens/font-families.scss +8 -0
  28. package/dist/assets/tokens/font-sizes.scss +23 -0
  29. package/dist/assets/tokens/font-weights.scss +16 -0
  30. package/dist/assets/tokens/gradients.scss +18 -0
  31. package/dist/assets/tokens/json/animations.json +6 -0
  32. package/dist/assets/tokens/json/border-radius.json +24 -0
  33. package/dist/assets/tokens/json/box-shadows.json +24 -0
  34. package/dist/assets/tokens/json/colors.json +71 -0
  35. package/dist/assets/tokens/json/durations.json +10 -0
  36. package/dist/assets/tokens/json/easings.json +3 -0
  37. package/dist/assets/tokens/json/font-families.json +4 -0
  38. package/dist/assets/tokens/json/font-sizes.json +18 -0
  39. package/dist/assets/tokens/json/font-weights.json +12 -0
  40. package/dist/assets/tokens/json/gradients.json +13 -0
  41. package/dist/assets/tokens/json/index.d.ts +19 -0
  42. package/dist/assets/tokens/json/index.d.ts.map +1 -0
  43. package/dist/assets/tokens/json/index.js +18 -0
  44. package/dist/assets/tokens/json/index.ts +37 -0
  45. package/dist/assets/tokens/json/letter-spacings.json +4 -0
  46. package/dist/assets/tokens/json/line-heights.json +18 -0
  47. package/dist/assets/tokens/json/media-queries.json +26 -0
  48. package/dist/assets/tokens/json/opacities.json +5 -0
  49. package/dist/assets/tokens/json/sizes.json +42 -0
  50. package/dist/assets/tokens/json/spacings.json +34 -0
  51. package/dist/assets/tokens/json/z-indexes.json +12 -0
  52. package/dist/assets/tokens/letter-spacings.scss +6 -0
  53. package/dist/assets/tokens/line-heights.scss +22 -0
  54. package/dist/assets/tokens/media-queries.scss +32 -0
  55. package/dist/assets/tokens/opacities.scss +8 -0
  56. package/dist/assets/tokens/sizes.scss +47 -0
  57. package/dist/assets/tokens/spacings.scss +38 -0
  58. package/dist/assets/tokens/z-indexes.scss +14 -0
  59. package/dist/assets/variables.scss +18 -0
  60. package/dist/mediacube-ui-v2.js +1 -1
  61. package/dist/mediacube-ui-v2.umd.cjs +1 -1
  62. package/dist/npm_preview.jpg +0 -0
  63. package/dist/style.css +1 -1
  64. package/dist/types/main.d.ts +1 -0
  65. package/package.json +1 -1
package/README.md CHANGED
@@ -132,6 +132,10 @@ TypeScript cannot handle type information for `.vue` imports by default, so we r
132
132
  - Spacing
133
133
  - Svg
134
134
 
135
+ ## Storybook interface support
136
+
137
+ ![info image storybook interface](/npm_preview.jpg)
138
+
135
139
  [//]: # (## Available Types)
136
140
  [//]: # (—)
137
141
  [//]: # ()
@@ -132,6 +132,10 @@ TypeScript cannot handle type information for `.vue` imports by default, so we r
132
132
  - Spacing
133
133
  - Svg
134
134
 
135
+ ## Storybook interface support
136
+
137
+ ![info image storybook interface](/npm_preview.jpg)
138
+
135
139
  [//]: # (## Available Types)
136
140
  [//]: # ({{types}})
137
141
  [//]: # ()
@@ -0,0 +1,44 @@
1
+ @font-face {
2
+ font-family: 'Inter';
3
+ font-style: normal;
4
+ font-weight: 400;
5
+ font-display: swap;
6
+ src: url("./Inter-Regular.woff2?v=3.19") format("woff2"),
7
+ url("./Inter-Regular.woff?v=3.19") format("woff");
8
+ }
9
+
10
+ @font-face {
11
+ font-family: 'Inter';
12
+ font-style: italic;
13
+ font-weight: 400;
14
+ font-display: swap;
15
+ src: url("./Inter-Italic.woff2?v=3.19") format("woff2"),
16
+ url("./Inter-Italic.woff?v=3.19") format("woff");
17
+ }
18
+
19
+ @font-face {
20
+ font-family: 'Inter';
21
+ font-style: normal;
22
+ font-weight: 500;
23
+ font-display: swap;
24
+ src: url("./Inter-Medium.woff2?v=3.19") format("woff2"),
25
+ url("./Inter-Medium.woff?v=3.19") format("woff");
26
+ }
27
+
28
+ @font-face {
29
+ font-family: 'Inter';
30
+ font-style: normal;
31
+ font-weight: 600;
32
+ font-display: swap;
33
+ src: url("./Inter-SemiBold.woff2?v=3.19") format("woff2"),
34
+ url("./Inter-SemiBold.woff?v=3.19") format("woff");
35
+ }
36
+
37
+ @font-face {
38
+ font-family: 'Inter';
39
+ font-style: normal;
40
+ font-weight: 700;
41
+ font-display: swap;
42
+ src: url("./Inter-Bold.woff2?v=3.19") format("woff2"),
43
+ url("./Inter-Bold.woff?v=3.19") format("woff");
44
+ }
@@ -0,0 +1,187 @@
1
+ /* GLOBAL FUNCTIONS
2
+ --------------------------------------------- */
3
+
4
+ // Create a tint
5
+ //
6
+ // @param {Color} $color to tint
7
+ // @param {Number} $percentage of `$color` in returned color
8
+ // @return {Color}
9
+ @function tint($color, $percentage) {
10
+ @return mix(white, $color, $percentage);
11
+ }
12
+
13
+ // Create a shade
14
+ //
15
+ // @param {Color} $color to shade
16
+ // @param {Number} $percentage of `$color` in returned color
17
+ // @return {Color}
18
+ @function shade($color, $percentage) {
19
+ @return mix(black, $color, $percentage);
20
+ }
21
+
22
+ // Calculate color difference
23
+ // See https://www.w3.org/TR/AERT/#color-contrast for algorithm
24
+ //
25
+ // @param {Color} $color of foreground
26
+ // @param {Color} $color of background
27
+ // @return {Boolean}
28
+ @function color-difference($foreground, $background) {
29
+ $r: (max(red($foreground), red($background))) - (min(red($foreground), red($background)));
30
+ $g: (max(green($foreground), green($background))) - (min(green($foreground), green($background)));
31
+ $b: (max(blue($foreground), blue($background))) - (min(blue($foreground), blue($background)));
32
+ $sum-rgb: $r + $g + $b;
33
+
34
+ @if $sum-rgb < 350 {
35
+ @return "false";
36
+ } @else {
37
+ @return "true";
38
+ }
39
+ }
40
+
41
+ // Set text color based on contrast
42
+ //
43
+ // @param {Color} $color to set
44
+ // @param {Color} $background color to test
45
+ // @param {Color} $fallback color to set in case contrast check fails
46
+ @function set-text-color($color, $background, $fallback: null) {
47
+ @if $fallback == null {
48
+ $fallback: #000;
49
+ }
50
+ @if (color-difference($color, $background) == "false") {
51
+ @return $fallback;
52
+ } @else {
53
+ @return $color;
54
+ }
55
+ }
56
+
57
+ /// Darkens the foreground color by the background color. This is the same as the
58
+ /// “multiply” filter in graphics apps.
59
+ ///
60
+ /// @param {Color} $foreground - The color to darken.
61
+ /// @param {Color} $background - The background to base darkening on.
62
+ /// @return {Color} The modified color.
63
+ @function color-multiply($foreground, $background: null) {
64
+ @if $background == null {
65
+ $background: #ffffff;
66
+ }
67
+
68
+ @return calc(#{$foreground} * #{$background} / 255);
69
+ }
70
+
71
+ /// Returns the value in rem for a given pixel value.
72
+ /// @param {Number} $value - The pixel value to be converted.
73
+ /// @return {Number} The converted value in rem.
74
+ @function rem($value) {
75
+ $unit: unit($value);
76
+
77
+ @if $unit == "rem" {
78
+ @return $value;
79
+ } @else if $unit == "px" {
80
+ @return calc((#{$value} / #{$font-size-300}) * 1rem);
81
+ } @else if $unit == "em" {
82
+ @return calc((#{$unit} / (1em)) * 1rem);
83
+ } @else {
84
+ @error "Value must be in px, em, or rem.";
85
+ }
86
+ }
87
+
88
+ /// Returns the value in pixels for a given rem value.
89
+ /// @param {Number} $value - The rem value to be converted.
90
+ /// @return {Number} The converted value in pixels.
91
+ @function px($value) {
92
+ $unit: unit($value);
93
+
94
+ @if $unit == "px" {
95
+ @return $value;
96
+ } @else if $unit == "em" {
97
+ @return calc((#{$value} / (1em)) * #{$font-size-300});
98
+ } @else if $unit == "rem" {
99
+ @return calc((#{$value} / (1rem)) * #{$font-size-300});
100
+ } @else {
101
+ @error "Value must be in rem, em, or px.";
102
+ }
103
+ }
104
+
105
+ /// Returns the list of available names in a given map.
106
+ /// @param {Map} $map - The map of data to list the names from.
107
+ /// @param {Number} $map - The level of depth to get names from.
108
+ /// @return {String} The list of names in the map.
109
+ @function available-names($map, $level: 1) {
110
+ @if type-of($map) != "map" {
111
+ @return null;
112
+ }
113
+
114
+ $output: "";
115
+ $newline: "\A ";
116
+
117
+ @if $level == 1 {
118
+ @each $key, $value in $map {
119
+ $output: $output + "#{$newline}- #{$key} #{available-names($value, $level + 1)}";
120
+ }
121
+ } @else {
122
+ $output: "(";
123
+ $i: 1;
124
+
125
+ @each $key, $value in $map {
126
+ $sep: if($i < length($map), ", ", "");
127
+ $output: $output + "#{$key}#{$sep}#{available-names($value, $level + 1)}";
128
+ $i: $i + 1;
129
+ }
130
+
131
+ $output: $output + ")";
132
+ }
133
+
134
+ @return $output;
135
+ }
136
+
137
+ /**
138
+ * Преобразование пикселей в em на основе переменной с базовым размером шрифта
139
+ * (указывается в px) проекта.
140
+ * @param {number} $px Число без единиц измерения, кол-во пикселей
141
+ * @param {string} $font-size Число пикселей, размер конт. шрифта на проекте
142
+ * @return {string} Результат преобразования $px в em на основе $font-size
143
+ */
144
+
145
+ @function px-to-em($px, $font-size) {
146
+ @return calc(((#{$px} * 100 / calc(#{$font-size} / (1px))) / 100) * 1em);
147
+ }
148
+
149
+ /**
150
+ * Преобразование пикселей в множитель
151
+ * @param {number} $line-height Число без единиц измерения, высота строки
152
+ * @param {number} $font-size Число без единиц измерения, размер шрифта
153
+ * @return {number} Результат преобразования $line-height в множитель на основе $font-size
154
+ */
155
+ @function line-height($line-height, $font-size) {
156
+ @return calc(round(calc((#{$line-height} / #{$font-size}) * 100)) / 100);
157
+ }
158
+
159
+ @function sum($numbers...) {
160
+ $sum: 0;
161
+ @each $number in $numbers {
162
+ $sum: $sum + $number;
163
+ }
164
+
165
+ @return $sum;
166
+ }
167
+
168
+ @function diff($from, $numbers...) {
169
+ @each $number in $numbers {
170
+ $from: $from - $number;
171
+ }
172
+
173
+ @return $from;
174
+ }
175
+
176
+ @function multiplication($from, $numbers...) {
177
+ @each $number in $numbers {
178
+ $from: $from * $number;
179
+ }
180
+
181
+ @return $from;
182
+ }
183
+
184
+ @function swapSign($number) {
185
+
186
+ @return -$number;
187
+ }
@@ -0,0 +1,5 @@
1
+ @use 'functions.scss' as *;
2
+ @use 'mixins.scss' as *;
3
+ @use 'tooltip.scss' as *;
4
+ @use 'table.scss' as *;
5
+ @use 'toast.scss' as *;