@spark-web/row 1.1.4 → 1.2.0
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/CHANGELOG.md +235 -0
- package/README.md +1 -6
- package/dist/declarations/src/alignment.d.ts +10 -10
- package/dist/declarations/src/index.d.ts +2 -2
- package/dist/declarations/src/{Row.d.ts → row.d.ts} +3 -3
- package/dist/spark-web-row.cjs.dev.js +12 -14
- package/dist/spark-web-row.cjs.prod.js +12 -14
- package/dist/spark-web-row.esm.js +12 -14
- package/package.json +17 -10
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
# @spark-web/row
|
|
2
|
+
|
|
3
|
+
## 1.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#382](https://github.com/brighte-labs/spark-web/pull/382)
|
|
8
|
+
[`955bf5d`](https://github.com/brighte-labs/spark-web/commit/955bf5d7698bfdf45e7f317aa3e726c81d3444c0)
|
|
9
|
+
Thanks [@dilipt-brighte](https://github.com/dilipt-brighte)! - Updates React
|
|
10
|
+
version to latest (18.2.0)
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
[[`955bf5d`](https://github.com/brighte-labs/spark-web/commit/955bf5d7698bfdf45e7f317aa3e726c81d3444c0)]:
|
|
16
|
+
- @spark-web/box@1.2.0
|
|
17
|
+
- @spark-web/divider@1.1.0
|
|
18
|
+
- @spark-web/theme@3.2.0
|
|
19
|
+
- @spark-web/utils@1.3.0
|
|
20
|
+
|
|
21
|
+
## 1.1.5
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- [#218](https://github.com/brighte-labs/spark-web/pull/218)
|
|
26
|
+
[`6fc8d1b`](https://github.com/brighte-labs/spark-web/commit/6fc8d1bc37e25d0cd622bc37f68a1d92eb5961b5)
|
|
27
|
+
Thanks [@nderkim](https://github.com/nderkim)! - Rename files to kebab case
|
|
28
|
+
|
|
29
|
+
- [#222](https://github.com/brighte-labs/spark-web/pull/222)
|
|
30
|
+
[`7f93c45`](https://github.com/brighte-labs/spark-web/commit/7f93c45bbae8c765e10df9d0dd7615473797749b)
|
|
31
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Update
|
|
32
|
+
dependencies
|
|
33
|
+
|
|
34
|
+
- [#242](https://github.com/brighte-labs/spark-web/pull/242)
|
|
35
|
+
[`6df05f7`](https://github.com/brighte-labs/spark-web/commit/6df05f764e4181c140d6547d6b897d0210468f6a)
|
|
36
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - - Add homepage
|
|
37
|
+
and repository keys to package.json
|
|
38
|
+
- Add CHANGELOG and README to files key in package.json
|
|
39
|
+
- Updated dependencies
|
|
40
|
+
[[`adc5e9e`](https://github.com/brighte-labs/spark-web/commit/adc5e9e6c99acd117f3261edcefdb5573132441b),
|
|
41
|
+
[`de99b9c`](https://github.com/brighte-labs/spark-web/commit/de99b9c7f72373bd1902cf67f5cfec9a1e1db01c),
|
|
42
|
+
[`6fc8d1b`](https://github.com/brighte-labs/spark-web/commit/6fc8d1bc37e25d0cd622bc37f68a1d92eb5961b5),
|
|
43
|
+
[`7f93c45`](https://github.com/brighte-labs/spark-web/commit/7f93c45bbae8c765e10df9d0dd7615473797749b),
|
|
44
|
+
[`62f7de8`](https://github.com/brighte-labs/spark-web/commit/62f7de8a2e1df5ae088c093d3acdaa868d3f61fe),
|
|
45
|
+
[`6df05f7`](https://github.com/brighte-labs/spark-web/commit/6df05f764e4181c140d6547d6b897d0210468f6a)]:
|
|
46
|
+
- @spark-web/box@1.1.0
|
|
47
|
+
- @spark-web/divider@1.0.10
|
|
48
|
+
- @spark-web/theme@3.1.0
|
|
49
|
+
- @spark-web/utils@1.2.3
|
|
50
|
+
|
|
51
|
+
## 1.1.4
|
|
52
|
+
|
|
53
|
+
### Patch Changes
|
|
54
|
+
|
|
55
|
+
- [#208](https://github.com/brighte-labs/spark-web/pull/208)
|
|
56
|
+
[`1ea26ef`](https://github.com/brighte-labs/spark-web/commit/1ea26ef04a3b45875ed0dd2326eeab1fbe1e4bc5)
|
|
57
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Lower required
|
|
58
|
+
node version
|
|
59
|
+
|
|
60
|
+
- Updated dependencies
|
|
61
|
+
[[`1ea26ef`](https://github.com/brighte-labs/spark-web/commit/1ea26ef04a3b45875ed0dd2326eeab1fbe1e4bc5)]:
|
|
62
|
+
- @spark-web/box@1.0.9
|
|
63
|
+
- @spark-web/divider@1.0.9
|
|
64
|
+
- @spark-web/theme@3.0.6
|
|
65
|
+
- @spark-web/utils@1.2.2
|
|
66
|
+
|
|
67
|
+
## 1.1.3
|
|
68
|
+
|
|
69
|
+
### Patch Changes
|
|
70
|
+
|
|
71
|
+
- [#197](https://github.com/brighte-labs/spark-web/pull/197)
|
|
72
|
+
[`94016d8`](https://github.com/brighte-labs/spark-web/commit/94016d84e26bbe55833bbcbab847a2cce6041538)
|
|
73
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Update packages
|
|
74
|
+
|
|
75
|
+
- Updated dependencies
|
|
76
|
+
[[`94016d8`](https://github.com/brighte-labs/spark-web/commit/94016d84e26bbe55833bbcbab847a2cce6041538)]:
|
|
77
|
+
- @spark-web/box@1.0.8
|
|
78
|
+
- @spark-web/divider@1.0.8
|
|
79
|
+
- @spark-web/theme@3.0.5
|
|
80
|
+
- @spark-web/utils@1.2.1
|
|
81
|
+
|
|
82
|
+
## 1.1.2
|
|
83
|
+
|
|
84
|
+
### Patch Changes
|
|
85
|
+
|
|
86
|
+
- [#173](https://github.com/brighte-labs/spark-web/pull/173)
|
|
87
|
+
[`90b7e9c`](https://github.com/brighte-labs/spark-web/commit/90b7e9cf4eb7e864d765c74b22c3dedf3d262e25)
|
|
88
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Update babel
|
|
89
|
+
dependency
|
|
90
|
+
|
|
91
|
+
- Updated dependencies
|
|
92
|
+
[[`90b7e9c`](https://github.com/brighte-labs/spark-web/commit/90b7e9cf4eb7e864d765c74b22c3dedf3d262e25),
|
|
93
|
+
[`c3867af`](https://github.com/brighte-labs/spark-web/commit/c3867af7b77dfae3580ab63a5d5c9e8452f2da62)]:
|
|
94
|
+
- @spark-web/box@1.0.7
|
|
95
|
+
- @spark-web/divider@1.0.7
|
|
96
|
+
- @spark-web/theme@3.0.3
|
|
97
|
+
- @spark-web/utils@1.2.0
|
|
98
|
+
|
|
99
|
+
## 1.1.1
|
|
100
|
+
|
|
101
|
+
### Patch Changes
|
|
102
|
+
|
|
103
|
+
- [#167](https://github.com/brighte-labs/spark-web/pull/167)
|
|
104
|
+
[`4f79350`](https://github.com/brighte-labs/spark-web/commit/4f793508fdb43ddd452f0d59a3126101f9fa5459)
|
|
105
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Update Babel
|
|
106
|
+
|
|
107
|
+
- Updated dependencies
|
|
108
|
+
[[`4f79350`](https://github.com/brighte-labs/spark-web/commit/4f793508fdb43ddd452f0d59a3126101f9fa5459),
|
|
109
|
+
[`60f7281`](https://github.com/brighte-labs/spark-web/commit/60f7281c4a194d934a2ce561cad47e737b0fb48e)]:
|
|
110
|
+
- @spark-web/box@1.0.6
|
|
111
|
+
- @spark-web/divider@1.0.6
|
|
112
|
+
- @spark-web/theme@3.0.2
|
|
113
|
+
- @spark-web/utils@1.1.5
|
|
114
|
+
|
|
115
|
+
## 1.1.0
|
|
116
|
+
|
|
117
|
+
### Minor Changes
|
|
118
|
+
|
|
119
|
+
- [#146](https://github.com/brighte-labs/spark-web/pull/146)
|
|
120
|
+
[`4e2dc42`](https://github.com/brighte-labs/spark-web/commit/4e2dc429711b2d0d9e180716dcee6a124608f694)
|
|
121
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Add className and
|
|
122
|
+
style back to layout primitives
|
|
123
|
+
|
|
124
|
+
### Patch Changes
|
|
125
|
+
|
|
126
|
+
- [#145](https://github.com/brighte-labs/spark-web/pull/145)
|
|
127
|
+
[`87a7824`](https://github.com/brighte-labs/spark-web/commit/87a782476b456508987450b55c51628047b80250)
|
|
128
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Update props that
|
|
129
|
+
Row receives
|
|
130
|
+
|
|
131
|
+
## 1.0.5
|
|
132
|
+
|
|
133
|
+
### Patch Changes
|
|
134
|
+
|
|
135
|
+
- [#113](https://github.com/brighte-labs/spark-web/pull/113)
|
|
136
|
+
[`156236d`](https://github.com/brighte-labs/spark-web/commit/156236d2474aee66a0b8e2030635f9c08a5b78ba)
|
|
137
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Update
|
|
138
|
+
dependencies
|
|
139
|
+
|
|
140
|
+
- Updated dependencies
|
|
141
|
+
[[`156236d`](https://github.com/brighte-labs/spark-web/commit/156236d2474aee66a0b8e2030635f9c08a5b78ba)]:
|
|
142
|
+
- @spark-web/box@1.0.5
|
|
143
|
+
- @spark-web/divider@1.0.5
|
|
144
|
+
- @spark-web/theme@3.0.1
|
|
145
|
+
- @spark-web/utils@1.1.3
|
|
146
|
+
|
|
147
|
+
## 1.0.4
|
|
148
|
+
|
|
149
|
+
### Patch Changes
|
|
150
|
+
|
|
151
|
+
- [#87](https://github.com/brighte-labs/spark-web/pull/87)
|
|
152
|
+
[`5744b68`](https://github.com/brighte-labs/spark-web/commit/5744b6820f626b93a14e11e1fbd96bcbe1b12b27)
|
|
153
|
+
Thanks [@ChristopherMitchell242](https://github.com/ChristopherMitchell242)! -
|
|
154
|
+
Data attribute added to component props to allow consumers to attach
|
|
155
|
+
customattributes to components
|
|
156
|
+
|
|
157
|
+
* [#52](https://github.com/brighte-labs/spark-web/pull/52)
|
|
158
|
+
[`82ab744`](https://github.com/brighte-labs/spark-web/commit/82ab744f198466810f3386bc459b8ab4d57c820e)
|
|
159
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Add files array
|
|
160
|
+
to package.json files
|
|
161
|
+
|
|
162
|
+
* Updated dependencies
|
|
163
|
+
[[`182a53a`](https://github.com/brighte-labs/spark-web/commit/182a53a484892df48754e89dd714459a7f69fcff),
|
|
164
|
+
[`82ab744`](https://github.com/brighte-labs/spark-web/commit/82ab744f198466810f3386bc459b8ab4d57c820e),
|
|
165
|
+
[`df618d9`](https://github.com/brighte-labs/spark-web/commit/df618d92d534e06f06ecedc95ea6bdd51cdc906b)]:
|
|
166
|
+
- @spark-web/theme@3.0.0
|
|
167
|
+
- @spark-web/box@1.0.4
|
|
168
|
+
- @spark-web/divider@1.0.4
|
|
169
|
+
- @spark-web/utils@1.1.2
|
|
170
|
+
|
|
171
|
+
## 1.0.3
|
|
172
|
+
|
|
173
|
+
### Patch Changes
|
|
174
|
+
|
|
175
|
+
- [#42](https://github.com/brighte-labs/spark-web/pull/42)
|
|
176
|
+
[`435779a`](https://github.com/brighte-labs/spark-web/commit/435779aa42bd635bbf43e1fd41724c666402caa2)
|
|
177
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Prevent multiple
|
|
178
|
+
versions of React
|
|
179
|
+
|
|
180
|
+
- Updated dependencies
|
|
181
|
+
[[`435779a`](https://github.com/brighte-labs/spark-web/commit/435779aa42bd635bbf43e1fd41724c666402caa2)]:
|
|
182
|
+
- @spark-web/box@1.0.3
|
|
183
|
+
- @spark-web/divider@1.0.3
|
|
184
|
+
- @spark-web/theme@2.0.2
|
|
185
|
+
- @spark-web/utils@1.1.1
|
|
186
|
+
|
|
187
|
+
## 1.0.2
|
|
188
|
+
|
|
189
|
+
### Patch Changes
|
|
190
|
+
|
|
191
|
+
- [#40](https://github.com/brighte-labs/spark-web/pull/40)
|
|
192
|
+
[`062c8ab`](https://github.com/brighte-labs/spark-web/commit/062c8ab8c7b4120f8d14c269b5f7801288c678ca)
|
|
193
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Add
|
|
194
|
+
@babel/transform-runtime
|
|
195
|
+
|
|
196
|
+
- Updated dependencies
|
|
197
|
+
[[`062c8ab`](https://github.com/brighte-labs/spark-web/commit/062c8ab8c7b4120f8d14c269b5f7801288c678ca)]:
|
|
198
|
+
- @spark-web/box@1.0.2
|
|
199
|
+
- @spark-web/divider@1.0.2
|
|
200
|
+
- @spark-web/theme@2.0.1
|
|
201
|
+
- @spark-web/utils@1.0.2
|
|
202
|
+
|
|
203
|
+
## 1.0.1
|
|
204
|
+
|
|
205
|
+
### Patch Changes
|
|
206
|
+
|
|
207
|
+
- [#36](https://github.com/brighte-labs/spark-web/pull/36)
|
|
208
|
+
[`8546f8f`](https://github.com/brighte-labs/spark-web/commit/8546f8f05daaa79ea3ff954c6c4928a7a2d0622d)
|
|
209
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Update Babel
|
|
210
|
+
config
|
|
211
|
+
|
|
212
|
+
- Updated dependencies
|
|
213
|
+
[[`aebff30`](https://github.com/brighte-labs/spark-web/commit/aebff30c86cb0a9db22b545c46159ce0d1c14afb),
|
|
214
|
+
[`8546f8f`](https://github.com/brighte-labs/spark-web/commit/8546f8f05daaa79ea3ff954c6c4928a7a2d0622d)]:
|
|
215
|
+
- @spark-web/theme@2.0.0
|
|
216
|
+
- @spark-web/box@1.0.1
|
|
217
|
+
- @spark-web/divider@1.0.1
|
|
218
|
+
- @spark-web/utils@1.0.1
|
|
219
|
+
|
|
220
|
+
## 1.0.0
|
|
221
|
+
|
|
222
|
+
### Major Changes
|
|
223
|
+
|
|
224
|
+
- [#27](https://github.com/brighte-labs/spark-web/pull/27)
|
|
225
|
+
[`4c8e398`](https://github.com/brighte-labs/spark-web/commit/4c8e3988f8a59d3dab60a6b67b1128b6ff2a5f2c)
|
|
226
|
+
Thanks [@JedWatson](https://github.com/JedWatson)! - Initial Version
|
|
227
|
+
|
|
228
|
+
### Patch Changes
|
|
229
|
+
|
|
230
|
+
- Updated dependencies
|
|
231
|
+
[[`4c8e398`](https://github.com/brighte-labs/spark-web/commit/4c8e3988f8a59d3dab60a6b67b1128b6ff2a5f2c)]:
|
|
232
|
+
- @spark-web/box@1.0.0
|
|
233
|
+
- @spark-web/divider@1.0.0
|
|
234
|
+
- @spark-web/theme@1.0.0
|
|
235
|
+
- @spark-web/utils@1.0.0
|
package/README.md
CHANGED
|
@@ -113,12 +113,7 @@ element in the Row.
|
|
|
113
113
|
|
|
114
114
|
## Props
|
|
115
115
|
|
|
116
|
-
|
|
117
|
-
| --------- | -------------------------------------- | --------- | ----------------------------------------------------- |
|
|
118
|
-
| align? | [ResponsiveProp\<Align>][align] | 'left' | Horizontally align items within the container. |
|
|
119
|
-
| alignY? | [ResponsiveProp\<AlignY>][align-y] | 'stretch' | Vertically align items within the container. |
|
|
120
|
-
| dividers? | boolean | | Sets whether to place a divider between each element. |
|
|
121
|
-
| data? | [DataAttributeMap][data-attribute-map] | | Sets data attributes on the component. |
|
|
116
|
+
<PropsTable displayName="Row" />
|
|
122
117
|
|
|
123
118
|
`Row` props also include [`Box`](/package/box) props and are not listed here
|
|
124
119
|
(excludes `display`, `alignItems`, `flexDirection`, `justifyContent` and
|
|
@@ -11,16 +11,16 @@ declare const alignYLookup: {
|
|
|
11
11
|
};
|
|
12
12
|
export declare type Align = keyof typeof alignLookup;
|
|
13
13
|
export declare type AlignY = keyof typeof alignYLookup;
|
|
14
|
-
export declare const alignToJustifyContent: (prop?: import("@spark-web/theme").ResponsiveProp<"left" | "right" | "center"> | undefined) => "
|
|
15
|
-
mobile: "
|
|
16
|
-
tablet: "
|
|
17
|
-
desktop: "
|
|
18
|
-
wide: "
|
|
14
|
+
export declare const alignToJustifyContent: (prop?: import("@spark-web/theme").ResponsiveProp<"left" | "right" | "center"> | undefined) => "center" | "start" | "end" | {
|
|
15
|
+
mobile: "center" | "start" | "end" | undefined;
|
|
16
|
+
tablet: "center" | "start" | "end" | undefined;
|
|
17
|
+
desktop: "center" | "start" | "end" | undefined;
|
|
18
|
+
wide: "center" | "start" | "end" | undefined;
|
|
19
19
|
} | undefined;
|
|
20
|
-
export declare const alignYToAlignItems: (prop?: import("@spark-web/theme").ResponsiveProp<"bottom" | "top" | "center" | "stretch"> | undefined) => "
|
|
21
|
-
mobile: "
|
|
22
|
-
tablet: "
|
|
23
|
-
desktop: "
|
|
24
|
-
wide: "
|
|
20
|
+
export declare const alignYToAlignItems: (prop?: import("@spark-web/theme").ResponsiveProp<"bottom" | "top" | "center" | "stretch"> | undefined) => "center" | "stretch" | "start" | "end" | {
|
|
21
|
+
mobile: "center" | "stretch" | "start" | "end" | undefined;
|
|
22
|
+
tablet: "center" | "stretch" | "start" | "end" | undefined;
|
|
23
|
+
desktop: "center" | "stretch" | "start" | "end" | undefined;
|
|
24
|
+
wide: "center" | "stretch" | "start" | "end" | undefined;
|
|
25
25
|
} | undefined;
|
|
26
26
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Row } from './
|
|
2
|
-
export type { RowProps } from './
|
|
1
|
+
export { Row } from './row';
|
|
2
|
+
export type { RowProps } from './row';
|
|
@@ -9,20 +9,20 @@ export declare type RowProps = {
|
|
|
9
9
|
align?: ResponsiveProp<Align>;
|
|
10
10
|
/** Vertically align items within the container. */
|
|
11
11
|
alignY?: ResponsiveProp<AlignY>;
|
|
12
|
-
/**
|
|
12
|
+
/** Sets data attributes for the element. */
|
|
13
13
|
data?: DataAttributeMap;
|
|
14
14
|
/** Place a divider between each element. */
|
|
15
15
|
dividers?: boolean;
|
|
16
16
|
} & ValidBoxProps;
|
|
17
17
|
export declare const Row: <Comp extends import("react").ElementType<any> = "div">(props: {
|
|
18
18
|
as?: Comp | undefined;
|
|
19
|
-
ref?: import("react").Ref<Comp extends "symbol" | "svg" | "animate" | "animateMotion" | "animateTransform" | "circle" | "
|
|
19
|
+
ref?: import("react").Ref<Comp extends "symbol" | "clipPath" | "filter" | "mask" | "marker" | "svg" | "animate" | "animateMotion" | "animateTransform" | "circle" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "metadata" | "mpath" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "stop" | "switch" | "text" | "textPath" | "tspan" | "use" | "view" | keyof HTMLElementTagNameMap | "set" ? (HTMLElementTagNameMap & Pick<SVGElementTagNameMap, "symbol" | "clipPath" | "filter" | "mask" | "marker" | "svg" | "animate" | "animateMotion" | "animateTransform" | "circle" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "metadata" | "mpath" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "stop" | "switch" | "text" | "textPath" | "tspan" | "use" | "view" | "set">)[Comp] : Comp extends new (...args: any) => any ? InstanceType<Comp> : undefined> | undefined;
|
|
20
20
|
} & Omit<import("react").PropsWithoutRef<import("react").ComponentProps<Comp>>, "as"> & {
|
|
21
21
|
/** Horizontally align items within the container. */
|
|
22
22
|
align?: ResponsiveProp<"left" | "right" | "center"> | undefined;
|
|
23
23
|
/** Vertically align items within the container. */
|
|
24
24
|
alignY?: ResponsiveProp<"bottom" | "top" | "center" | "stretch"> | undefined;
|
|
25
|
-
/**
|
|
25
|
+
/** Sets data attributes for the element. */
|
|
26
26
|
data?: DataAttributeMap | undefined;
|
|
27
27
|
/** Place a divider between each element. */
|
|
28
28
|
dividers?: boolean | undefined;
|
|
@@ -28,35 +28,33 @@ var alignYToAlignItems = theme.createResponsiveMapFn(alignYLookup);
|
|
|
28
28
|
var _excluded = ["align", "alignY", "children", "data", "dividers"];
|
|
29
29
|
var Row = ts.forwardRefWithAs(function (_ref, forwardedRef) {
|
|
30
30
|
var _ref$align = _ref.align,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
31
|
+
align = _ref$align === void 0 ? 'left' : _ref$align,
|
|
32
|
+
_ref$alignY = _ref.alignY,
|
|
33
|
+
alignY = _ref$alignY === void 0 ? 'stretch' : _ref$alignY,
|
|
34
|
+
children = _ref.children,
|
|
35
|
+
data = _ref.data,
|
|
36
|
+
dividers = _ref.dividers,
|
|
37
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
39
38
|
var justifyContent = alignToJustifyContent(align);
|
|
40
39
|
var alignItems = alignYToAlignItems(alignY);
|
|
41
|
-
|
|
42
40
|
var rootProps = _objectSpread(_objectSpread({}, rest), {}, {
|
|
43
41
|
ref: forwardedRef,
|
|
44
42
|
display: 'flex',
|
|
45
43
|
alignItems: alignItems,
|
|
46
44
|
justifyContent: justifyContent
|
|
47
|
-
});
|
|
48
|
-
|
|
45
|
+
});
|
|
49
46
|
|
|
47
|
+
// bail early w/o dividers to avoid unnecessary map
|
|
50
48
|
if (!dividers) {
|
|
51
49
|
return /*#__PURE__*/jsxRuntime.jsx(box.Box, _objectSpread(_objectSpread({
|
|
52
50
|
data: data
|
|
53
51
|
}, rootProps), {}, {
|
|
54
52
|
children: children
|
|
55
53
|
}));
|
|
56
|
-
}
|
|
57
|
-
// remove falsy values before mapping, keeps the index in sync
|
|
58
|
-
|
|
54
|
+
}
|
|
59
55
|
|
|
56
|
+
// map over children to insert dividers
|
|
57
|
+
// remove falsy values before mapping, keeps the index in sync
|
|
60
58
|
var childArray = react.Children.toArray(children);
|
|
61
59
|
return /*#__PURE__*/jsxRuntime.jsx(box.Box, _objectSpread(_objectSpread({
|
|
62
60
|
data: data
|
|
@@ -28,35 +28,33 @@ var alignYToAlignItems = theme.createResponsiveMapFn(alignYLookup);
|
|
|
28
28
|
var _excluded = ["align", "alignY", "children", "data", "dividers"];
|
|
29
29
|
var Row = ts.forwardRefWithAs(function (_ref, forwardedRef) {
|
|
30
30
|
var _ref$align = _ref.align,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
31
|
+
align = _ref$align === void 0 ? 'left' : _ref$align,
|
|
32
|
+
_ref$alignY = _ref.alignY,
|
|
33
|
+
alignY = _ref$alignY === void 0 ? 'stretch' : _ref$alignY,
|
|
34
|
+
children = _ref.children,
|
|
35
|
+
data = _ref.data,
|
|
36
|
+
dividers = _ref.dividers,
|
|
37
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
39
38
|
var justifyContent = alignToJustifyContent(align);
|
|
40
39
|
var alignItems = alignYToAlignItems(alignY);
|
|
41
|
-
|
|
42
40
|
var rootProps = _objectSpread(_objectSpread({}, rest), {}, {
|
|
43
41
|
ref: forwardedRef,
|
|
44
42
|
display: 'flex',
|
|
45
43
|
alignItems: alignItems,
|
|
46
44
|
justifyContent: justifyContent
|
|
47
|
-
});
|
|
48
|
-
|
|
45
|
+
});
|
|
49
46
|
|
|
47
|
+
// bail early w/o dividers to avoid unnecessary map
|
|
50
48
|
if (!dividers) {
|
|
51
49
|
return /*#__PURE__*/jsxRuntime.jsx(box.Box, _objectSpread(_objectSpread({
|
|
52
50
|
data: data
|
|
53
51
|
}, rootProps), {}, {
|
|
54
52
|
children: children
|
|
55
53
|
}));
|
|
56
|
-
}
|
|
57
|
-
// remove falsy values before mapping, keeps the index in sync
|
|
58
|
-
|
|
54
|
+
}
|
|
59
55
|
|
|
56
|
+
// map over children to insert dividers
|
|
57
|
+
// remove falsy values before mapping, keeps the index in sync
|
|
60
58
|
var childArray = react.Children.toArray(children);
|
|
61
59
|
return /*#__PURE__*/jsxRuntime.jsx(box.Box, _objectSpread(_objectSpread({
|
|
62
60
|
data: data
|
|
@@ -24,35 +24,33 @@ var alignYToAlignItems = createResponsiveMapFn(alignYLookup);
|
|
|
24
24
|
var _excluded = ["align", "alignY", "children", "data", "dividers"];
|
|
25
25
|
var Row = forwardRefWithAs(function (_ref, forwardedRef) {
|
|
26
26
|
var _ref$align = _ref.align,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
27
|
+
align = _ref$align === void 0 ? 'left' : _ref$align,
|
|
28
|
+
_ref$alignY = _ref.alignY,
|
|
29
|
+
alignY = _ref$alignY === void 0 ? 'stretch' : _ref$alignY,
|
|
30
|
+
children = _ref.children,
|
|
31
|
+
data = _ref.data,
|
|
32
|
+
dividers = _ref.dividers,
|
|
33
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
35
34
|
var justifyContent = alignToJustifyContent(align);
|
|
36
35
|
var alignItems = alignYToAlignItems(alignY);
|
|
37
|
-
|
|
38
36
|
var rootProps = _objectSpread(_objectSpread({}, rest), {}, {
|
|
39
37
|
ref: forwardedRef,
|
|
40
38
|
display: 'flex',
|
|
41
39
|
alignItems: alignItems,
|
|
42
40
|
justifyContent: justifyContent
|
|
43
|
-
});
|
|
44
|
-
|
|
41
|
+
});
|
|
45
42
|
|
|
43
|
+
// bail early w/o dividers to avoid unnecessary map
|
|
46
44
|
if (!dividers) {
|
|
47
45
|
return /*#__PURE__*/jsx(Box, _objectSpread(_objectSpread({
|
|
48
46
|
data: data
|
|
49
47
|
}, rootProps), {}, {
|
|
50
48
|
children: children
|
|
51
49
|
}));
|
|
52
|
-
}
|
|
53
|
-
// remove falsy values before mapping, keeps the index in sync
|
|
54
|
-
|
|
50
|
+
}
|
|
55
51
|
|
|
52
|
+
// map over children to insert dividers
|
|
53
|
+
// remove falsy values before mapping, keeps the index in sync
|
|
56
54
|
var childArray = Children.toArray(children);
|
|
57
55
|
return /*#__PURE__*/jsx(Box, _objectSpread(_objectSpread({
|
|
58
56
|
data: data
|
package/package.json
CHANGED
|
@@ -1,23 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spark-web/row",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"
|
|
3
|
+
"version": "1.2.0",
|
|
4
|
+
"homepage": "https://github.com/brighte-labs/spark-web#readme",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/brighte-labs/spark-web.git",
|
|
8
|
+
"directory": "packages/row"
|
|
9
|
+
},
|
|
5
10
|
"main": "dist/spark-web-row.cjs.js",
|
|
6
11
|
"module": "dist/spark-web-row.esm.js",
|
|
7
12
|
"files": [
|
|
8
|
-
"
|
|
13
|
+
"CHANGELOG.md",
|
|
14
|
+
"dist",
|
|
15
|
+
"README.md"
|
|
9
16
|
],
|
|
10
17
|
"dependencies": {
|
|
11
|
-
"@babel/runtime": "^7.
|
|
18
|
+
"@babel/runtime": "^7.19.0",
|
|
12
19
|
"@emotion/css": "^11.9.0",
|
|
13
|
-
"@spark-web/box": "^1.0
|
|
14
|
-
"@spark-web/divider": "^1.0
|
|
15
|
-
"@spark-web/theme": "^3.0
|
|
16
|
-
"@spark-web/utils": "^1.
|
|
20
|
+
"@spark-web/box": "^1.2.0",
|
|
21
|
+
"@spark-web/divider": "^1.1.0",
|
|
22
|
+
"@spark-web/theme": "^3.2.0",
|
|
23
|
+
"@spark-web/utils": "^1.3.0"
|
|
17
24
|
},
|
|
18
25
|
"devDependencies": {
|
|
19
|
-
"@types/react": "^
|
|
20
|
-
"react": "^
|
|
26
|
+
"@types/react": "^18.2.0",
|
|
27
|
+
"react": "^18.2.0"
|
|
21
28
|
},
|
|
22
29
|
"peerDependencies": {
|
|
23
30
|
"react": ">=17.0.2"
|