@meduza/ui-kit-2 0.1.31 → 0.1.33

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.
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.1.31",
2
+ "version": "0.1.33",
3
3
  "license": "MIT",
4
4
  "description": "UIKit for Meduza",
5
5
  "repository": "https://github.com/meduza-corp/ui-kit-2.git",
@@ -233,10 +233,10 @@
233
233
  }
234
234
  }
235
235
 
236
- .card.mobileFullwidth .object,
237
- .slide.mobileFullwidth .object,
238
- .card .figure,
239
- .slide .figure {
236
+ .isInCard.mobileFullwidth .object,
237
+ .isInSlide.mobileFullwidth .object,
238
+ .isInCard .figure,
239
+ .isInSlide .figure {
240
240
  margin-right: -11px;
241
241
  margin-left: -11px;
242
242
 
@@ -246,8 +246,8 @@
246
246
  }
247
247
  }
248
248
 
249
- .card:not(.cc):last-child,
250
- .slide:not(.cc):last-child {
249
+ .isInCard:not(.cc):last-child,
250
+ .isInSlide:not(.cc):last-child {
251
251
  overflow: hidden;
252
252
 
253
253
  margin-bottom: -16px;
@@ -127,14 +127,15 @@ export const EmbedBlock: React.FC<EmbedBlockProps> = ({
127
127
  // чтобы не применились лишние модификаторы
128
128
  // TODO: в w6 модификаторы должны передаваться явно
129
129
 
130
- if (styleContext) {
131
- const filteredContext = Object.keys(styleContext)
130
+ if (styleContext && Array.isArray(styleContext)) {
131
+ const filteredContext = styleContext
132
132
  .filter((key) => key.startsWith('isIn') && styles[key])
133
133
  .reduce((acc, key) => {
134
- acc.push([styles[key], true])
134
+ acc.push(key)
135
135
 
136
136
  return acc
137
137
  }, [])
138
+
138
139
  classNames = makeStyleContext(classNames, filteredContext, styles)
139
140
  }
140
141
 
@@ -45,7 +45,7 @@ export const GroupedBlock: React.FC<GroupedBlockProps> = ({
45
45
  >
46
46
  <EmbedBlockContainer
47
47
  block={item}
48
- styleContext="isInGroupedBlock"
48
+ styleContext={['isInGroupedBlock']}
49
49
  />
50
50
  </div>
51
51
  )
@@ -72,7 +72,7 @@ export const MetaContainer: React.FC<MetaContainerProps> = ({
72
72
  )
73
73
  }
74
74
  case 'datetime': {
75
- const format = (toCamel(component.format) ||
75
+ const format = ((component.format && toCamel(component.format)) ||
76
76
  'date') as TimestampProps['type']
77
77
 
78
78
  return (