@symbo.ls/atoms 2.11.380 → 2.11.389
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/Block.js +61 -47
- package/Iframe.js +3 -0
- package/Svg.js +2 -0
- package/package.json +2 -2
package/Block.js
CHANGED
|
@@ -16,19 +16,21 @@ export const Block = {
|
|
|
16
16
|
getSpacingByKey,
|
|
17
17
|
transfromGap,
|
|
18
18
|
transformSizeRatio,
|
|
19
|
-
transformSize
|
|
19
|
+
transformSize,
|
|
20
|
+
isUndefined,
|
|
21
|
+
isString
|
|
20
22
|
},
|
|
21
23
|
|
|
22
24
|
class: {
|
|
23
|
-
boxSizing: ({ props }) => !isUndefined(props.boxSizing)
|
|
25
|
+
boxSizing: ({ props, deps }) => !deps.isUndefined(props.boxSizing)
|
|
24
26
|
? ({ boxSizing: props.boxSizing })
|
|
25
27
|
: { boxSizing: 'border-box' },
|
|
26
28
|
|
|
27
|
-
display: ({ props }) => !isUndefined(props.display) && ({
|
|
29
|
+
display: ({ props, deps }) => !deps.isUndefined(props.display) && ({
|
|
28
30
|
display: props.display
|
|
29
31
|
}),
|
|
30
32
|
|
|
31
|
-
hide: ({ props }) => props.hide && ({
|
|
33
|
+
hide: ({ props, deps }) => props.hide && ({
|
|
32
34
|
display: 'none !important'
|
|
33
35
|
}),
|
|
34
36
|
|
|
@@ -36,7 +38,7 @@ export const Block = {
|
|
|
36
38
|
height: ({ props, deps }) => deps.transformSizeRatio('height', props),
|
|
37
39
|
|
|
38
40
|
boxSize: ({ props, deps }) => {
|
|
39
|
-
if (!isString(props.boxSize)) return
|
|
41
|
+
if (!deps.isString(props.boxSize)) return
|
|
40
42
|
const [height, width] = props.boxSize.split(' ')
|
|
41
43
|
return {
|
|
42
44
|
...deps.transformSize('height', height),
|
|
@@ -47,7 +49,7 @@ export const Block = {
|
|
|
47
49
|
minWidth: ({ props, deps }) => deps.transformSizeRatio('minWidth', props),
|
|
48
50
|
maxWidth: ({ props, deps }) => deps.transformSizeRatio('maxWidth', props),
|
|
49
51
|
widthRange: ({ props, deps }) => {
|
|
50
|
-
if (!isString(props.widthRange)) return
|
|
52
|
+
if (!deps.isString(props.widthRange)) return
|
|
51
53
|
const [minWidth, maxWidth] = props.widthRange.split(' ')
|
|
52
54
|
return {
|
|
53
55
|
...deps.transformSize('minWidth', minWidth),
|
|
@@ -58,7 +60,7 @@ export const Block = {
|
|
|
58
60
|
minHeight: ({ props, deps }) => deps.transformSizeRatio('minHeight', props),
|
|
59
61
|
maxHeight: ({ props, deps }) => deps.transformSizeRatio('maxHeight', props),
|
|
60
62
|
heightRange: ({ props, deps }) => {
|
|
61
|
-
if (!isString(props.heightRange)) return
|
|
63
|
+
if (!deps.isString(props.heightRange)) return
|
|
62
64
|
const [minHeight, maxHeight] = props.heightRange.split(' ')
|
|
63
65
|
return {
|
|
64
66
|
...deps.transformSize('minHeight', minHeight),
|
|
@@ -67,7 +69,7 @@ export const Block = {
|
|
|
67
69
|
},
|
|
68
70
|
|
|
69
71
|
minSize: ({ props, deps }) => {
|
|
70
|
-
if (!isString(props.minSize)) return
|
|
72
|
+
if (!deps.isString(props.minSize)) return
|
|
71
73
|
const [minHeight, minWidth] = props.minSize.split(' ')
|
|
72
74
|
return {
|
|
73
75
|
...deps.transformSize('minHeight', minHeight),
|
|
@@ -76,7 +78,7 @@ export const Block = {
|
|
|
76
78
|
},
|
|
77
79
|
|
|
78
80
|
maxSize: ({ props, deps }) => {
|
|
79
|
-
if (!isString(props.maxSize)) return
|
|
81
|
+
if (!deps.isString(props.maxSize)) return
|
|
80
82
|
const [maxHeight, maxWidth] = props.maxSize.split(' ')
|
|
81
83
|
return {
|
|
82
84
|
...deps.transformSize('maxHeight', maxHeight),
|
|
@@ -84,11 +86,11 @@ export const Block = {
|
|
|
84
86
|
}
|
|
85
87
|
},
|
|
86
88
|
|
|
87
|
-
direction: ({ props }) => !isUndefined(props.direction) && ({
|
|
89
|
+
direction: ({ props, deps }) => !deps.isUndefined(props.direction) && ({
|
|
88
90
|
direction: props.direction
|
|
89
91
|
}),
|
|
90
92
|
|
|
91
|
-
aspectRatio: ({ props }) => !isUndefined(props.aspectRatio) && ({
|
|
93
|
+
aspectRatio: ({ props, deps }) => !deps.isUndefined(props.aspectRatio) && ({
|
|
92
94
|
aspectRatio: props.aspectRatio
|
|
93
95
|
}),
|
|
94
96
|
|
|
@@ -97,7 +99,7 @@ export const Block = {
|
|
|
97
99
|
padding: ({ props, deps }) => deps.transformSizeRatio('padding', props),
|
|
98
100
|
scrollPadding: ({ props, deps }) => deps.transformSizeRatio('scrollPadding', props),
|
|
99
101
|
paddingInline: ({ props, deps }) => {
|
|
100
|
-
if (!isString(props.paddingInline)) return
|
|
102
|
+
if (!deps.isString(props.paddingInline)) return
|
|
101
103
|
const [paddingInlineStart, paddingInlineEnd] = props.paddingInline.split(' ')
|
|
102
104
|
return {
|
|
103
105
|
...deps.transformSize('paddingInlineStart', paddingInlineStart),
|
|
@@ -105,7 +107,7 @@ export const Block = {
|
|
|
105
107
|
}
|
|
106
108
|
},
|
|
107
109
|
paddingBlock: ({ props, deps }) => {
|
|
108
|
-
if (!isString(props.paddingBlock)) return
|
|
110
|
+
if (!deps.isString(props.paddingBlock)) return
|
|
109
111
|
const [paddingBlockStart, paddingBlockEnd] = props.paddingBlock.split(' ')
|
|
110
112
|
return {
|
|
111
113
|
...deps.transformSize('paddingBlockStart', paddingBlockStart),
|
|
@@ -119,7 +121,7 @@ export const Block = {
|
|
|
119
121
|
|
|
120
122
|
margin: ({ props, deps }) => deps.transformSizeRatio('margin', props),
|
|
121
123
|
marginInline: ({ props, deps }) => {
|
|
122
|
-
if (!isString(props.marginInline)) return
|
|
124
|
+
if (!deps.isString(props.marginInline)) return
|
|
123
125
|
const [marginInlineStart, marginInlineEnd] = props.marginInline.split(' ')
|
|
124
126
|
return {
|
|
125
127
|
...deps.transformSize('marginInlineStart', marginInlineStart),
|
|
@@ -127,7 +129,7 @@ export const Block = {
|
|
|
127
129
|
}
|
|
128
130
|
},
|
|
129
131
|
marginBlock: ({ props, deps }) => {
|
|
130
|
-
if (!isString(props.marginBlock)) return
|
|
132
|
+
if (!deps.isString(props.marginBlock)) return
|
|
131
133
|
const [marginBlockStart, marginBlockEnd] = props.marginBlock.split(' ')
|
|
132
134
|
return {
|
|
133
135
|
...deps.transformSize('marginBlockStart', marginBlockStart),
|
|
@@ -139,46 +141,57 @@ export const Block = {
|
|
|
139
141
|
marginBlockStart: ({ props, deps }) => deps.transformSizeRatio('marginBlockStart', props),
|
|
140
142
|
marginBlockEnd: ({ props, deps }) => deps.transformSizeRatio('marginBlockEnd', props),
|
|
141
143
|
|
|
142
|
-
gap: ({ props }) => !isUndefined(props.gap) && ({
|
|
144
|
+
gap: ({ props, deps }) => !deps.isUndefined(props.gap) && ({
|
|
143
145
|
gap: transfromGap(props.gap)
|
|
144
146
|
}),
|
|
145
147
|
gridArea: ({ props, deps }) => props.gridArea && ({ gridArea: props.gridArea }),
|
|
146
148
|
|
|
147
|
-
|
|
149
|
+
float: ({ props, deps }) => !deps.isUndefined(props.float) && ({
|
|
150
|
+
float: props.float
|
|
151
|
+
}),
|
|
152
|
+
|
|
153
|
+
flex: ({ props, deps }) => props.flex && ({
|
|
148
154
|
flex: props.flex
|
|
149
155
|
}),
|
|
150
|
-
flexDirection: ({ props }) => !isUndefined(props.flexDirection) && ({
|
|
156
|
+
flexDirection: ({ props, deps }) => !deps.isUndefined(props.flexDirection) && ({
|
|
151
157
|
flexDirection: props.flexDirection
|
|
152
158
|
}),
|
|
153
|
-
alignItems: ({ props }) => !isUndefined(props.alignItems) && ({
|
|
159
|
+
alignItems: ({ props, deps }) => !deps.isUndefined(props.alignItems) && ({
|
|
154
160
|
alignItems: props.alignItems
|
|
155
161
|
}),
|
|
156
|
-
alignContent: ({ props }) => !isUndefined(props.alignContent) && ({
|
|
162
|
+
alignContent: ({ props, deps }) => !deps.isUndefined(props.alignContent) && ({
|
|
157
163
|
alignContent: props.alignContent
|
|
158
164
|
}),
|
|
159
|
-
justifyContent: ({ props }) => !isUndefined(props.justifyContent) && ({
|
|
165
|
+
justifyContent: ({ props, deps }) => !deps.isUndefined(props.justifyContent) && ({
|
|
160
166
|
justifyContent: props.justifyContent
|
|
161
167
|
}),
|
|
162
|
-
justifyItems: ({ props }) => !isUndefined(props.justifyItems) && ({
|
|
168
|
+
justifyItems: ({ props, deps }) => !deps.isUndefined(props.justifyItems) && ({
|
|
163
169
|
justifyItems: props.justifyItems
|
|
164
170
|
}),
|
|
165
|
-
alignSelf: ({ props }) => !isUndefined(props.alignSelf) && ({
|
|
171
|
+
alignSelf: ({ props, deps }) => !deps.isUndefined(props.alignSelf) && ({
|
|
166
172
|
alignSelf: props.alignSelf
|
|
167
173
|
}),
|
|
168
|
-
order: ({ props }) => !isUndefined(props.order) && ({
|
|
174
|
+
order: ({ props, deps }) => !deps.isUndefined(props.order) && ({
|
|
169
175
|
order: props.order
|
|
170
176
|
}),
|
|
171
177
|
|
|
172
|
-
flexWrap: ({ props }) => !isUndefined(props.flexWrap) && ({
|
|
173
|
-
display: 'flex',
|
|
174
|
-
flexFlow: props.flexWrap
|
|
175
|
-
}),
|
|
176
|
-
flexFlow: ({ props }) => !isUndefined(props.flexFlow) && ({
|
|
178
|
+
flexWrap: ({ props, deps }) => !deps.isUndefined(props.flexWrap) && ({
|
|
177
179
|
display: 'flex',
|
|
178
|
-
flexFlow: props.flexFlow
|
|
180
|
+
flexFlow: (props.flexFlow || 'row').split(' ')[0] + ' ' + props.flexWrap
|
|
179
181
|
}),
|
|
180
|
-
|
|
181
|
-
|
|
182
|
+
flexFlow: ({ props, deps }) => {
|
|
183
|
+
const { flexFlow, reverse } = props
|
|
184
|
+
if (!deps.isString(flexFlow)) return
|
|
185
|
+
let [direction, wrap] = (flexFlow || 'row').split(' ')
|
|
186
|
+
if (flexFlow.startsWith('x') || flexFlow === 'row') direction = 'row'
|
|
187
|
+
if (flexFlow.startsWith('y') || flexFlow === 'column') direction = 'column'
|
|
188
|
+
return {
|
|
189
|
+
display: 'flex',
|
|
190
|
+
flexFlow: (direction || '') + (!direction.includes('-reverse') && reverse ? '-reverse' : '') + ' ' + (wrap || '')
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
flexAlign: ({ props, deps }) => {
|
|
194
|
+
if (!deps.isString(props.flexAlign)) return
|
|
182
195
|
const [alignItems, justifyContent] = props.flexAlign.split(' ')
|
|
183
196
|
return {
|
|
184
197
|
display: 'flex',
|
|
@@ -187,21 +200,21 @@ export const Block = {
|
|
|
187
200
|
}
|
|
188
201
|
},
|
|
189
202
|
|
|
190
|
-
gridColumn: ({ props }) => !isUndefined(props.gridColumn) && ({
|
|
203
|
+
gridColumn: ({ props, deps }) => !deps.isUndefined(props.gridColumn) && ({
|
|
191
204
|
gridColumn: props.gridColumn
|
|
192
205
|
}),
|
|
193
|
-
gridColumnStart: ({ props }) => !isUndefined(props.gridColumnStart) && ({
|
|
206
|
+
gridColumnStart: ({ props, deps }) => !deps.isUndefined(props.gridColumnStart) && ({
|
|
194
207
|
gridColumnStart: props.gridColumnStart
|
|
195
208
|
}),
|
|
196
|
-
gridRow: ({ props }) => !isUndefined(props.gridRow) && ({
|
|
209
|
+
gridRow: ({ props, deps }) => !deps.isUndefined(props.gridRow) && ({
|
|
197
210
|
gridRow: props.gridRow
|
|
198
211
|
}),
|
|
199
|
-
gridRowStart: ({ props }) => !isUndefined(props.gridRowStart) && ({
|
|
212
|
+
gridRowStart: ({ props, deps }) => !deps.isUndefined(props.gridRowStart) && ({
|
|
200
213
|
gridRowStart: props.gridRowStart
|
|
201
214
|
}),
|
|
202
215
|
|
|
203
216
|
size: ({ props, deps }) => {
|
|
204
|
-
if (!isString(props.heightRange)) return
|
|
217
|
+
if (!deps.isString(props.heightRange)) return
|
|
205
218
|
const [minHeight, maxHeight] = props.heightRange.split(' ')
|
|
206
219
|
return {
|
|
207
220
|
...deps.transformSizeRatio('minHeight', minHeight),
|
|
@@ -209,29 +222,29 @@ export const Block = {
|
|
|
209
222
|
}
|
|
210
223
|
},
|
|
211
224
|
|
|
212
|
-
resize: ({ props }) => !isUndefined(props.resize) && ({
|
|
225
|
+
resize: ({ props, deps }) => !deps.isUndefined(props.resize) && ({
|
|
213
226
|
resize: props.resize
|
|
214
227
|
}),
|
|
215
228
|
|
|
216
|
-
verticalAlign: ({ props }) => !isUndefined(props.verticalAlign) && ({ verticalAlign: props.verticalAlign }),
|
|
229
|
+
verticalAlign: ({ props, deps }) => !deps.isUndefined(props.verticalAlign) && ({ verticalAlign: props.verticalAlign }),
|
|
217
230
|
|
|
218
|
-
columns: ({ props }) => !isUndefined(props.columns) && ({
|
|
231
|
+
columns: ({ props, deps }) => !deps.isUndefined(props.columns) && ({
|
|
219
232
|
columns: props.columns
|
|
220
233
|
}),
|
|
221
|
-
columnRule: ({ props }) => !isUndefined(props.columnRule) && ({
|
|
234
|
+
columnRule: ({ props, deps }) => !deps.isUndefined(props.columnRule) && ({
|
|
222
235
|
columnRule: props.columnRule
|
|
223
236
|
}),
|
|
224
|
-
columnWidth: ({ props }) => !isUndefined(props.columnWidth) && ({
|
|
237
|
+
columnWidth: ({ props, deps }) => !deps.isUndefined(props.columnWidth) && ({
|
|
225
238
|
columnWidth: props.columnWidth
|
|
226
239
|
}),
|
|
227
240
|
columnGap: ({ props, deps }) => deps.transformSizeRatio('columnGap', props),
|
|
228
|
-
columnSpan: ({ props }) => !isUndefined(props.columnSpan) && ({
|
|
241
|
+
columnSpan: ({ props, deps }) => !deps.isUndefined(props.columnSpan) && ({
|
|
229
242
|
columnSpan: props.columnSpan
|
|
230
243
|
}),
|
|
231
|
-
columnFill: ({ props }) => !isUndefined(props.columnFill) && ({
|
|
244
|
+
columnFill: ({ props, deps }) => !deps.isUndefined(props.columnFill) && ({
|
|
232
245
|
columnFill: props.columnFill
|
|
233
246
|
}),
|
|
234
|
-
columnCount: ({ props }) => !isUndefined(props.columnCount) && ({
|
|
247
|
+
columnCount: ({ props, deps }) => !deps.isUndefined(props.columnCount) && ({
|
|
235
248
|
columnCount: props.columnCount
|
|
236
249
|
})
|
|
237
250
|
}
|
|
@@ -244,9 +257,10 @@ export const Hr = {
|
|
|
244
257
|
export const Br = { tag: 'br' }
|
|
245
258
|
export const Div = { tag: 'div' }
|
|
246
259
|
export const Span = { tag: 'span' }
|
|
260
|
+
export const Li = { tag: 'li' }
|
|
247
261
|
export const Ul = {
|
|
248
262
|
tag: 'ul',
|
|
249
|
-
childExtend: {
|
|
263
|
+
childExtend: { extend: 'Li' }
|
|
250
264
|
}
|
|
251
265
|
// export const Article = { tag: 'article' }
|
|
252
266
|
|
|
@@ -257,7 +271,7 @@ export const Gutter = {
|
|
|
257
271
|
},
|
|
258
272
|
class: {
|
|
259
273
|
size: ({ props, deps }) => {
|
|
260
|
-
if (!isString(props.size)) return
|
|
274
|
+
if (!deps.isString(props.size)) return
|
|
261
275
|
const [height, width] = props.size.split(' ')
|
|
262
276
|
return {
|
|
263
277
|
...deps.getSpacingByKey('height', height),
|
package/Iframe.js
CHANGED
|
@@ -9,6 +9,9 @@ export const Iframe = {
|
|
|
9
9
|
},
|
|
10
10
|
attr: {
|
|
11
11
|
src: ({ props }) => props.src,
|
|
12
|
+
srcdoc: ({ props }) => props.srcdoc,
|
|
13
|
+
sandbox: ({ props }) => props.sandbox,
|
|
14
|
+
seamless: ({ props }) => props.seamless,
|
|
12
15
|
loading: ({ props }) => props.loading,
|
|
13
16
|
allowfullscreen: ({ props }) => props.allowfullscreen,
|
|
14
17
|
frameborder: ({ props }) => props.frameborder,
|
package/Svg.js
CHANGED
|
@@ -11,6 +11,8 @@ export const Svg = {
|
|
|
11
11
|
'xmlns:xlink': 'http://www.w3.org/1999/xlink'
|
|
12
12
|
},
|
|
13
13
|
html: ({ key, props, context, ...el }) => {
|
|
14
|
+
if (props.semantic_symbols) return
|
|
15
|
+
|
|
14
16
|
const { designSystem, utils } = context
|
|
15
17
|
const SVG = designSystem && designSystem.SVG
|
|
16
18
|
const useSvgSprite = props.spriteId || (context.designSystem && context.designSystem.useSvgSprite)
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbo.ls/atoms",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.389",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"gitHead": "
|
|
6
|
+
"gitHead": "e260280a4a50ca08fd7df53104a884086dc3da88",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@domql/state": "latest",
|
|
9
9
|
"@domql/utils": "latest",
|