@symbo.ls/atoms 2.11.385 → 2.11.394
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 +51 -44
- 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,43 +141,47 @@ 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) && ({
|
|
178
|
+
flexWrap: ({ props, deps }) => !deps.isUndefined(props.flexWrap) && ({
|
|
173
179
|
display: 'flex',
|
|
174
180
|
flexFlow: (props.flexFlow || 'row').split(' ')[0] + ' ' + props.flexWrap
|
|
175
181
|
}),
|
|
176
|
-
flexFlow: ({ props }) => {
|
|
182
|
+
flexFlow: ({ props, deps }) => {
|
|
177
183
|
const { flexFlow, reverse } = props
|
|
178
|
-
if (!isString(flexFlow)) return
|
|
184
|
+
if (!deps.isString(flexFlow)) return
|
|
179
185
|
let [direction, wrap] = (flexFlow || 'row').split(' ')
|
|
180
186
|
if (flexFlow.startsWith('x') || flexFlow === 'row') direction = 'row'
|
|
181
187
|
if (flexFlow.startsWith('y') || flexFlow === 'column') direction = 'column'
|
|
@@ -184,8 +190,8 @@ export const Block = {
|
|
|
184
190
|
flexFlow: (direction || '') + (!direction.includes('-reverse') && reverse ? '-reverse' : '') + ' ' + (wrap || '')
|
|
185
191
|
}
|
|
186
192
|
},
|
|
187
|
-
flexAlign: ({ props }) => {
|
|
188
|
-
if (!isString(props.flexAlign)) return
|
|
193
|
+
flexAlign: ({ props, deps }) => {
|
|
194
|
+
if (!deps.isString(props.flexAlign)) return
|
|
189
195
|
const [alignItems, justifyContent] = props.flexAlign.split(' ')
|
|
190
196
|
return {
|
|
191
197
|
display: 'flex',
|
|
@@ -194,21 +200,21 @@ export const Block = {
|
|
|
194
200
|
}
|
|
195
201
|
},
|
|
196
202
|
|
|
197
|
-
gridColumn: ({ props }) => !isUndefined(props.gridColumn) && ({
|
|
203
|
+
gridColumn: ({ props, deps }) => !deps.isUndefined(props.gridColumn) && ({
|
|
198
204
|
gridColumn: props.gridColumn
|
|
199
205
|
}),
|
|
200
|
-
gridColumnStart: ({ props }) => !isUndefined(props.gridColumnStart) && ({
|
|
206
|
+
gridColumnStart: ({ props, deps }) => !deps.isUndefined(props.gridColumnStart) && ({
|
|
201
207
|
gridColumnStart: props.gridColumnStart
|
|
202
208
|
}),
|
|
203
|
-
gridRow: ({ props }) => !isUndefined(props.gridRow) && ({
|
|
209
|
+
gridRow: ({ props, deps }) => !deps.isUndefined(props.gridRow) && ({
|
|
204
210
|
gridRow: props.gridRow
|
|
205
211
|
}),
|
|
206
|
-
gridRowStart: ({ props }) => !isUndefined(props.gridRowStart) && ({
|
|
212
|
+
gridRowStart: ({ props, deps }) => !deps.isUndefined(props.gridRowStart) && ({
|
|
207
213
|
gridRowStart: props.gridRowStart
|
|
208
214
|
}),
|
|
209
215
|
|
|
210
216
|
size: ({ props, deps }) => {
|
|
211
|
-
if (!isString(props.heightRange)) return
|
|
217
|
+
if (!deps.isString(props.heightRange)) return
|
|
212
218
|
const [minHeight, maxHeight] = props.heightRange.split(' ')
|
|
213
219
|
return {
|
|
214
220
|
...deps.transformSizeRatio('minHeight', minHeight),
|
|
@@ -216,29 +222,29 @@ export const Block = {
|
|
|
216
222
|
}
|
|
217
223
|
},
|
|
218
224
|
|
|
219
|
-
resize: ({ props }) => !isUndefined(props.resize) && ({
|
|
225
|
+
resize: ({ props, deps }) => !deps.isUndefined(props.resize) && ({
|
|
220
226
|
resize: props.resize
|
|
221
227
|
}),
|
|
222
228
|
|
|
223
|
-
verticalAlign: ({ props }) => !isUndefined(props.verticalAlign) && ({ verticalAlign: props.verticalAlign }),
|
|
229
|
+
verticalAlign: ({ props, deps }) => !deps.isUndefined(props.verticalAlign) && ({ verticalAlign: props.verticalAlign }),
|
|
224
230
|
|
|
225
|
-
columns: ({ props }) => !isUndefined(props.columns) && ({
|
|
231
|
+
columns: ({ props, deps }) => !deps.isUndefined(props.columns) && ({
|
|
226
232
|
columns: props.columns
|
|
227
233
|
}),
|
|
228
|
-
columnRule: ({ props }) => !isUndefined(props.columnRule) && ({
|
|
234
|
+
columnRule: ({ props, deps }) => !deps.isUndefined(props.columnRule) && ({
|
|
229
235
|
columnRule: props.columnRule
|
|
230
236
|
}),
|
|
231
|
-
columnWidth: ({ props }) => !isUndefined(props.columnWidth) && ({
|
|
237
|
+
columnWidth: ({ props, deps }) => !deps.isUndefined(props.columnWidth) && ({
|
|
232
238
|
columnWidth: props.columnWidth
|
|
233
239
|
}),
|
|
234
240
|
columnGap: ({ props, deps }) => deps.transformSizeRatio('columnGap', props),
|
|
235
|
-
columnSpan: ({ props }) => !isUndefined(props.columnSpan) && ({
|
|
241
|
+
columnSpan: ({ props, deps }) => !deps.isUndefined(props.columnSpan) && ({
|
|
236
242
|
columnSpan: props.columnSpan
|
|
237
243
|
}),
|
|
238
|
-
columnFill: ({ props }) => !isUndefined(props.columnFill) && ({
|
|
244
|
+
columnFill: ({ props, deps }) => !deps.isUndefined(props.columnFill) && ({
|
|
239
245
|
columnFill: props.columnFill
|
|
240
246
|
}),
|
|
241
|
-
columnCount: ({ props }) => !isUndefined(props.columnCount) && ({
|
|
247
|
+
columnCount: ({ props, deps }) => !deps.isUndefined(props.columnCount) && ({
|
|
242
248
|
columnCount: props.columnCount
|
|
243
249
|
})
|
|
244
250
|
}
|
|
@@ -251,9 +257,10 @@ export const Hr = {
|
|
|
251
257
|
export const Br = { tag: 'br' }
|
|
252
258
|
export const Div = { tag: 'div' }
|
|
253
259
|
export const Span = { tag: 'span' }
|
|
260
|
+
export const Li = { tag: 'li' }
|
|
254
261
|
export const Ul = {
|
|
255
262
|
tag: 'ul',
|
|
256
|
-
childExtend: {
|
|
263
|
+
childExtend: { extend: 'Li' }
|
|
257
264
|
}
|
|
258
265
|
// export const Article = { tag: 'article' }
|
|
259
266
|
|
|
@@ -264,7 +271,7 @@ export const Gutter = {
|
|
|
264
271
|
},
|
|
265
272
|
class: {
|
|
266
273
|
size: ({ props, deps }) => {
|
|
267
|
-
if (!isString(props.size)) return
|
|
274
|
+
if (!deps.isString(props.size)) return
|
|
268
275
|
const [height, width] = props.size.split(' ')
|
|
269
276
|
return {
|
|
270
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.394",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"gitHead": "
|
|
6
|
+
"gitHead": "96fc31e44dd43084955c647e91b5d0e70d56aee8",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@domql/state": "latest",
|
|
9
9
|
"@domql/utils": "latest",
|