@spark-web/columns 2.0.4 → 2.1.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 +228 -0
- package/README.md +1 -8
- package/dist/declarations/src/alignment.d.ts +5 -5
- package/dist/declarations/src/{Columns.d.ts → columns.d.ts} +1 -1
- package/dist/declarations/src/index.d.ts +2 -2
- package/dist/spark-web-columns.cjs.dev.js +18 -24
- package/dist/spark-web-columns.cjs.prod.js +18 -24
- package/dist/spark-web-columns.esm.js +18 -24
- package/package.json +16 -9
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
# @spark-web/columns
|
|
2
|
+
|
|
3
|
+
## 2.1.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/theme@3.2.0
|
|
18
|
+
- @spark-web/utils@1.3.0
|
|
19
|
+
|
|
20
|
+
## 2.0.5
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- [#246](https://github.com/brighte-labs/spark-web/pull/246)
|
|
25
|
+
[`de99b9c`](https://github.com/brighte-labs/spark-web/commit/de99b9c7f72373bd1902cf67f5cfec9a1e1db01c)
|
|
26
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Remove
|
|
27
|
+
destructuring from theme object
|
|
28
|
+
|
|
29
|
+
- [#218](https://github.com/brighte-labs/spark-web/pull/218)
|
|
30
|
+
[`6fc8d1b`](https://github.com/brighte-labs/spark-web/commit/6fc8d1bc37e25d0cd622bc37f68a1d92eb5961b5)
|
|
31
|
+
Thanks [@nderkim](https://github.com/nderkim)! - Rename files to kebab case
|
|
32
|
+
|
|
33
|
+
- [#222](https://github.com/brighte-labs/spark-web/pull/222)
|
|
34
|
+
[`7f93c45`](https://github.com/brighte-labs/spark-web/commit/7f93c45bbae8c765e10df9d0dd7615473797749b)
|
|
35
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Update
|
|
36
|
+
dependencies
|
|
37
|
+
|
|
38
|
+
- [#242](https://github.com/brighte-labs/spark-web/pull/242)
|
|
39
|
+
[`6df05f7`](https://github.com/brighte-labs/spark-web/commit/6df05f764e4181c140d6547d6b897d0210468f6a)
|
|
40
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - - Add homepage
|
|
41
|
+
and repository keys to package.json
|
|
42
|
+
- Add CHANGELOG and README to files key in package.json
|
|
43
|
+
- Updated dependencies
|
|
44
|
+
[[`adc5e9e`](https://github.com/brighte-labs/spark-web/commit/adc5e9e6c99acd117f3261edcefdb5573132441b),
|
|
45
|
+
[`de99b9c`](https://github.com/brighte-labs/spark-web/commit/de99b9c7f72373bd1902cf67f5cfec9a1e1db01c),
|
|
46
|
+
[`6fc8d1b`](https://github.com/brighte-labs/spark-web/commit/6fc8d1bc37e25d0cd622bc37f68a1d92eb5961b5),
|
|
47
|
+
[`7f93c45`](https://github.com/brighte-labs/spark-web/commit/7f93c45bbae8c765e10df9d0dd7615473797749b),
|
|
48
|
+
[`62f7de8`](https://github.com/brighte-labs/spark-web/commit/62f7de8a2e1df5ae088c093d3acdaa868d3f61fe),
|
|
49
|
+
[`6df05f7`](https://github.com/brighte-labs/spark-web/commit/6df05f764e4181c140d6547d6b897d0210468f6a)]:
|
|
50
|
+
- @spark-web/box@1.1.0
|
|
51
|
+
- @spark-web/theme@3.1.0
|
|
52
|
+
- @spark-web/utils@1.2.3
|
|
53
|
+
|
|
54
|
+
## 2.0.4
|
|
55
|
+
|
|
56
|
+
### Patch Changes
|
|
57
|
+
|
|
58
|
+
- [#208](https://github.com/brighte-labs/spark-web/pull/208)
|
|
59
|
+
[`1ea26ef`](https://github.com/brighte-labs/spark-web/commit/1ea26ef04a3b45875ed0dd2326eeab1fbe1e4bc5)
|
|
60
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Lower required
|
|
61
|
+
node version
|
|
62
|
+
|
|
63
|
+
- Updated dependencies
|
|
64
|
+
[[`1ea26ef`](https://github.com/brighte-labs/spark-web/commit/1ea26ef04a3b45875ed0dd2326eeab1fbe1e4bc5)]:
|
|
65
|
+
- @spark-web/box@1.0.9
|
|
66
|
+
- @spark-web/theme@3.0.6
|
|
67
|
+
- @spark-web/utils@1.2.2
|
|
68
|
+
|
|
69
|
+
## 2.0.3
|
|
70
|
+
|
|
71
|
+
### Patch Changes
|
|
72
|
+
|
|
73
|
+
- [#197](https://github.com/brighte-labs/spark-web/pull/197)
|
|
74
|
+
[`94016d8`](https://github.com/brighte-labs/spark-web/commit/94016d84e26bbe55833bbcbab847a2cce6041538)
|
|
75
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Update packages
|
|
76
|
+
|
|
77
|
+
- Updated dependencies
|
|
78
|
+
[[`94016d8`](https://github.com/brighte-labs/spark-web/commit/94016d84e26bbe55833bbcbab847a2cce6041538)]:
|
|
79
|
+
- @spark-web/box@1.0.8
|
|
80
|
+
- @spark-web/theme@3.0.5
|
|
81
|
+
- @spark-web/utils@1.2.1
|
|
82
|
+
|
|
83
|
+
## 2.0.2
|
|
84
|
+
|
|
85
|
+
### Patch Changes
|
|
86
|
+
|
|
87
|
+
- [#173](https://github.com/brighte-labs/spark-web/pull/173)
|
|
88
|
+
[`90b7e9c`](https://github.com/brighte-labs/spark-web/commit/90b7e9cf4eb7e864d765c74b22c3dedf3d262e25)
|
|
89
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Update babel
|
|
90
|
+
dependency
|
|
91
|
+
|
|
92
|
+
- Updated dependencies
|
|
93
|
+
[[`90b7e9c`](https://github.com/brighte-labs/spark-web/commit/90b7e9cf4eb7e864d765c74b22c3dedf3d262e25),
|
|
94
|
+
[`c3867af`](https://github.com/brighte-labs/spark-web/commit/c3867af7b77dfae3580ab63a5d5c9e8452f2da62)]:
|
|
95
|
+
- @spark-web/box@1.0.7
|
|
96
|
+
- @spark-web/theme@3.0.3
|
|
97
|
+
- @spark-web/utils@1.2.0
|
|
98
|
+
|
|
99
|
+
## 2.0.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/theme@3.0.2
|
|
112
|
+
- @spark-web/utils@1.1.5
|
|
113
|
+
|
|
114
|
+
## 2.0.0
|
|
115
|
+
|
|
116
|
+
### Major Changes
|
|
117
|
+
|
|
118
|
+
- [#99](https://github.com/brighte-labs/spark-web/pull/99)
|
|
119
|
+
[`3db131b`](https://github.com/brighte-labs/spark-web/commit/3db131bfadbc4149d05b7c74be1a3e68cdd5b18f)
|
|
120
|
+
Thanks [@oscargws](https://github.com/oscargws)! - Removed props spreading
|
|
121
|
+
from multiple packages
|
|
122
|
+
|
|
123
|
+
### Minor Changes
|
|
124
|
+
|
|
125
|
+
- [#146](https://github.com/brighte-labs/spark-web/pull/146)
|
|
126
|
+
[`4e2dc42`](https://github.com/brighte-labs/spark-web/commit/4e2dc429711b2d0d9e180716dcee6a124608f694)
|
|
127
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Add className and
|
|
128
|
+
style back to layout primitives
|
|
129
|
+
|
|
130
|
+
## 1.0.5
|
|
131
|
+
|
|
132
|
+
### Patch Changes
|
|
133
|
+
|
|
134
|
+
- [#113](https://github.com/brighte-labs/spark-web/pull/113)
|
|
135
|
+
[`156236d`](https://github.com/brighte-labs/spark-web/commit/156236d2474aee66a0b8e2030635f9c08a5b78ba)
|
|
136
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Update
|
|
137
|
+
dependencies
|
|
138
|
+
|
|
139
|
+
- Updated dependencies
|
|
140
|
+
[[`156236d`](https://github.com/brighte-labs/spark-web/commit/156236d2474aee66a0b8e2030635f9c08a5b78ba)]:
|
|
141
|
+
- @spark-web/box@1.0.5
|
|
142
|
+
- @spark-web/theme@3.0.1
|
|
143
|
+
- @spark-web/utils@1.1.3
|
|
144
|
+
|
|
145
|
+
## 1.0.4
|
|
146
|
+
|
|
147
|
+
### Patch Changes
|
|
148
|
+
|
|
149
|
+
- [#83](https://github.com/brighte-labs/spark-web/pull/83)
|
|
150
|
+
[`1ef4f82`](https://github.com/brighte-labs/spark-web/commit/1ef4f82df999c487b79cd216c17ca5735e444fc5)
|
|
151
|
+
Thanks [@ChristopherMitchell242](https://github.com/ChristopherMitchell242)! -
|
|
152
|
+
Data attribute added to component props to allow consumers to attach custom
|
|
153
|
+
attributes to components
|
|
154
|
+
|
|
155
|
+
* [#52](https://github.com/brighte-labs/spark-web/pull/52)
|
|
156
|
+
[`82ab744`](https://github.com/brighte-labs/spark-web/commit/82ab744f198466810f3386bc459b8ab4d57c820e)
|
|
157
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Add files array
|
|
158
|
+
to package.json files
|
|
159
|
+
|
|
160
|
+
* Updated dependencies
|
|
161
|
+
[[`182a53a`](https://github.com/brighte-labs/spark-web/commit/182a53a484892df48754e89dd714459a7f69fcff),
|
|
162
|
+
[`82ab744`](https://github.com/brighte-labs/spark-web/commit/82ab744f198466810f3386bc459b8ab4d57c820e),
|
|
163
|
+
[`df618d9`](https://github.com/brighte-labs/spark-web/commit/df618d92d534e06f06ecedc95ea6bdd51cdc906b)]:
|
|
164
|
+
- @spark-web/theme@3.0.0
|
|
165
|
+
- @spark-web/box@1.0.4
|
|
166
|
+
- @spark-web/utils@1.1.2
|
|
167
|
+
|
|
168
|
+
## 1.0.3
|
|
169
|
+
|
|
170
|
+
### Patch Changes
|
|
171
|
+
|
|
172
|
+
- [#42](https://github.com/brighte-labs/spark-web/pull/42)
|
|
173
|
+
[`435779a`](https://github.com/brighte-labs/spark-web/commit/435779aa42bd635bbf43e1fd41724c666402caa2)
|
|
174
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Prevent multiple
|
|
175
|
+
versions of React
|
|
176
|
+
|
|
177
|
+
- Updated dependencies
|
|
178
|
+
[[`435779a`](https://github.com/brighte-labs/spark-web/commit/435779aa42bd635bbf43e1fd41724c666402caa2)]:
|
|
179
|
+
- @spark-web/box@1.0.3
|
|
180
|
+
- @spark-web/theme@2.0.2
|
|
181
|
+
- @spark-web/utils@1.1.1
|
|
182
|
+
|
|
183
|
+
## 1.0.2
|
|
184
|
+
|
|
185
|
+
### Patch Changes
|
|
186
|
+
|
|
187
|
+
- [#40](https://github.com/brighte-labs/spark-web/pull/40)
|
|
188
|
+
[`062c8ab`](https://github.com/brighte-labs/spark-web/commit/062c8ab8c7b4120f8d14c269b5f7801288c678ca)
|
|
189
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Add
|
|
190
|
+
@babel/transform-runtime
|
|
191
|
+
|
|
192
|
+
- Updated dependencies
|
|
193
|
+
[[`062c8ab`](https://github.com/brighte-labs/spark-web/commit/062c8ab8c7b4120f8d14c269b5f7801288c678ca)]:
|
|
194
|
+
- @spark-web/box@1.0.2
|
|
195
|
+
- @spark-web/theme@2.0.1
|
|
196
|
+
- @spark-web/utils@1.0.2
|
|
197
|
+
|
|
198
|
+
## 1.0.1
|
|
199
|
+
|
|
200
|
+
### Patch Changes
|
|
201
|
+
|
|
202
|
+
- [#36](https://github.com/brighte-labs/spark-web/pull/36)
|
|
203
|
+
[`8546f8f`](https://github.com/brighte-labs/spark-web/commit/8546f8f05daaa79ea3ff954c6c4928a7a2d0622d)
|
|
204
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Update Babel
|
|
205
|
+
config
|
|
206
|
+
|
|
207
|
+
- Updated dependencies
|
|
208
|
+
[[`aebff30`](https://github.com/brighte-labs/spark-web/commit/aebff30c86cb0a9db22b545c46159ce0d1c14afb),
|
|
209
|
+
[`8546f8f`](https://github.com/brighte-labs/spark-web/commit/8546f8f05daaa79ea3ff954c6c4928a7a2d0622d)]:
|
|
210
|
+
- @spark-web/theme@2.0.0
|
|
211
|
+
- @spark-web/box@1.0.1
|
|
212
|
+
- @spark-web/utils@1.0.1
|
|
213
|
+
|
|
214
|
+
## 1.0.0
|
|
215
|
+
|
|
216
|
+
### Major Changes
|
|
217
|
+
|
|
218
|
+
- [#27](https://github.com/brighte-labs/spark-web/pull/27)
|
|
219
|
+
[`4c8e398`](https://github.com/brighte-labs/spark-web/commit/4c8e3988f8a59d3dab60a6b67b1128b6ff2a5f2c)
|
|
220
|
+
Thanks [@JedWatson](https://github.com/JedWatson)! - Initial Version
|
|
221
|
+
|
|
222
|
+
### Patch Changes
|
|
223
|
+
|
|
224
|
+
- Updated dependencies
|
|
225
|
+
[[`4c8e398`](https://github.com/brighte-labs/spark-web/commit/4c8e3988f8a59d3dab60a6b67b1128b6ff2a5f2c)]:
|
|
226
|
+
- @spark-web/box@1.0.0
|
|
227
|
+
- @spark-web/theme@1.0.0
|
|
228
|
+
- @spark-web/utils@1.0.0
|
package/README.md
CHANGED
|
@@ -95,14 +95,7 @@ relative width of each column.
|
|
|
95
95
|
|
|
96
96
|
## Props
|
|
97
97
|
|
|
98
|
-
|
|
99
|
-
| -------------- | ------------------------------------------------------- | ------- | -------------------------------------------------------------------------------------- |
|
|
100
|
-
| alignY? | [ResponsiveProp][responsive-prop]\<AlignY> | | Vertically align items within the container. |
|
|
101
|
-
| children | React.ReactNode | | Children elements to be rendered within the column component representing each column. |
|
|
102
|
-
| collapseBelow? | [ResponsiveRangeProps][responsive-range-props]['below'] | | At which breakpoint, if amy, should the columns collapse. |
|
|
103
|
-
| gap? | [Gap][gap] | | The size of the gap between each column. |
|
|
104
|
-
| template? | number[] | | Define the relative width of each column. By default each column is the same width. |
|
|
105
|
-
| data? | [DataAttributeMap][data-attribute-map] | | Sets data attributes on the component. |
|
|
98
|
+
<PropsTable displayName="Columns" />
|
|
106
99
|
|
|
107
100
|
[`Box`](/package/box) props are also included as `Column` props and are not
|
|
108
101
|
listed here (excluding `display`, `alignItems`, `gap`, `flexDirection`,
|
|
@@ -5,10 +5,10 @@ declare const alignYLookup: {
|
|
|
5
5
|
readonly stretch: "stretch";
|
|
6
6
|
};
|
|
7
7
|
export declare type AlignY = keyof typeof alignYLookup;
|
|
8
|
-
export declare const alignYToAlignItems: (prop?: import("@spark-web/theme").ResponsiveProp<"bottom" | "top" | "center" | "stretch"> | undefined) => "
|
|
9
|
-
mobile: "
|
|
10
|
-
tablet: "
|
|
11
|
-
desktop: "
|
|
12
|
-
wide: "
|
|
8
|
+
export declare const alignYToAlignItems: (prop?: import("@spark-web/theme").ResponsiveProp<"bottom" | "top" | "center" | "stretch"> | undefined) => "center" | "stretch" | "start" | "end" | {
|
|
9
|
+
mobile: "center" | "stretch" | "start" | "end" | undefined;
|
|
10
|
+
tablet: "center" | "stretch" | "start" | "end" | undefined;
|
|
11
|
+
desktop: "center" | "stretch" | "start" | "end" | undefined;
|
|
12
|
+
wide: "center" | "stretch" | "start" | "end" | undefined;
|
|
13
13
|
} | undefined;
|
|
14
14
|
export {};
|
|
@@ -21,7 +21,7 @@ export declare type ColumnsProps = {
|
|
|
21
21
|
} & ValidBoxProps;
|
|
22
22
|
export declare const Columns: <Comp extends import("react").ElementType<any> = "div">(props: {
|
|
23
23
|
as?: Comp | undefined;
|
|
24
|
-
ref?: import("react").Ref<Comp extends "symbol" | "svg" | "animate" | "animateMotion" | "animateTransform" | "circle" | "
|
|
24
|
+
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;
|
|
25
25
|
} & Omit<import("react").PropsWithoutRef<import("react").ComponentProps<Comp>>, "as"> & {
|
|
26
26
|
/** Vertically align items within the container. */
|
|
27
27
|
alignY?: ResponsiveProp<"bottom" | "top" | "center" | "stretch"> | undefined;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Columns } from './
|
|
2
|
-
export type { ColumnsProps } from './
|
|
1
|
+
export { Columns } from './columns';
|
|
2
|
+
export type { ColumnsProps } from './columns';
|
|
@@ -23,39 +23,33 @@ var alignYToAlignItems = theme.createResponsiveMapFn(alignYLookup);
|
|
|
23
23
|
var _excluded = ["alignY", "collapseBelow", "data", "gap", "template"];
|
|
24
24
|
var Columns = ts.forwardRefWithAs(function (_ref, forwardedRef) {
|
|
25
25
|
var _ref$alignY = _ref.alignY,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
var _useTheme = theme.useTheme(),
|
|
34
|
-
spacing = _useTheme.spacing,
|
|
35
|
-
utils = _useTheme.utils;
|
|
36
|
-
|
|
26
|
+
alignY = _ref$alignY === void 0 ? 'top' : _ref$alignY,
|
|
27
|
+
collapseBelow = _ref.collapseBelow,
|
|
28
|
+
data = _ref.data,
|
|
29
|
+
gap = _ref.gap,
|
|
30
|
+
template = _ref.template,
|
|
31
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
32
|
+
var theme$1 = theme.useTheme();
|
|
37
33
|
var alignItems = alignYToAlignItems(alignY);
|
|
38
34
|
var count = react.Children.count(props.children);
|
|
39
35
|
var gridTemplateColumns = template ? template.map(function (c) {
|
|
40
36
|
return "".concat(c, "fr");
|
|
41
37
|
}).join(' ') : "repeat(".concat(count, ", 1fr)");
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
collapseOnWide = _utils$responsiveRang2[3];
|
|
51
|
-
|
|
38
|
+
var _theme$utils$responsi = theme$1.utils.responsiveRange({
|
|
39
|
+
below: collapseBelow
|
|
40
|
+
}),
|
|
41
|
+
_theme$utils$responsi2 = _slicedToArray(_theme$utils$responsi, 4),
|
|
42
|
+
collapseOnMobile = _theme$utils$responsi2[0],
|
|
43
|
+
collapseOnTablet = _theme$utils$responsi2[1],
|
|
44
|
+
collapseOnDesktop = _theme$utils$responsi2[2],
|
|
45
|
+
collapseOnWide = _theme$utils$responsi2[3];
|
|
52
46
|
return /*#__PURE__*/jsxRuntime.jsx(box.Box, _objectSpread({
|
|
53
47
|
ref: forwardedRef,
|
|
54
|
-
className: css.css(utils.resolveResponsiveProps({
|
|
48
|
+
className: css.css(theme$1.utils.resolveResponsiveProps({
|
|
55
49
|
alignItems: alignItems,
|
|
56
50
|
display: 'grid',
|
|
57
|
-
gap: utils.mapResponsiveScale(gap, spacing),
|
|
58
|
-
gridTemplateColumns: collapseBelow ? utils.optimizeResponsiveArray([collapseOnMobile ? null : gridTemplateColumns, collapseOnTablet ? null : gridTemplateColumns, collapseOnDesktop ? null : gridTemplateColumns, collapseOnWide ? null : gridTemplateColumns]) : gridTemplateColumns,
|
|
51
|
+
gap: theme$1.utils.mapResponsiveScale(gap, theme$1.spacing),
|
|
52
|
+
gridTemplateColumns: collapseBelow ? theme$1.utils.optimizeResponsiveArray([collapseOnMobile ? null : gridTemplateColumns, collapseOnTablet ? null : gridTemplateColumns, collapseOnDesktop ? null : gridTemplateColumns, collapseOnWide ? null : gridTemplateColumns]) : gridTemplateColumns,
|
|
59
53
|
// fix flex overflow bug that prevents text truncation
|
|
60
54
|
'> *': {
|
|
61
55
|
minWidth: 0
|
|
@@ -23,39 +23,33 @@ var alignYToAlignItems = theme.createResponsiveMapFn(alignYLookup);
|
|
|
23
23
|
var _excluded = ["alignY", "collapseBelow", "data", "gap", "template"];
|
|
24
24
|
var Columns = ts.forwardRefWithAs(function (_ref, forwardedRef) {
|
|
25
25
|
var _ref$alignY = _ref.alignY,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
var _useTheme = theme.useTheme(),
|
|
34
|
-
spacing = _useTheme.spacing,
|
|
35
|
-
utils = _useTheme.utils;
|
|
36
|
-
|
|
26
|
+
alignY = _ref$alignY === void 0 ? 'top' : _ref$alignY,
|
|
27
|
+
collapseBelow = _ref.collapseBelow,
|
|
28
|
+
data = _ref.data,
|
|
29
|
+
gap = _ref.gap,
|
|
30
|
+
template = _ref.template,
|
|
31
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
32
|
+
var theme$1 = theme.useTheme();
|
|
37
33
|
var alignItems = alignYToAlignItems(alignY);
|
|
38
34
|
var count = react.Children.count(props.children);
|
|
39
35
|
var gridTemplateColumns = template ? template.map(function (c) {
|
|
40
36
|
return "".concat(c, "fr");
|
|
41
37
|
}).join(' ') : "repeat(".concat(count, ", 1fr)");
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
collapseOnWide = _utils$responsiveRang2[3];
|
|
51
|
-
|
|
38
|
+
var _theme$utils$responsi = theme$1.utils.responsiveRange({
|
|
39
|
+
below: collapseBelow
|
|
40
|
+
}),
|
|
41
|
+
_theme$utils$responsi2 = _slicedToArray(_theme$utils$responsi, 4),
|
|
42
|
+
collapseOnMobile = _theme$utils$responsi2[0],
|
|
43
|
+
collapseOnTablet = _theme$utils$responsi2[1],
|
|
44
|
+
collapseOnDesktop = _theme$utils$responsi2[2],
|
|
45
|
+
collapseOnWide = _theme$utils$responsi2[3];
|
|
52
46
|
return /*#__PURE__*/jsxRuntime.jsx(box.Box, _objectSpread({
|
|
53
47
|
ref: forwardedRef,
|
|
54
|
-
className: css.css(utils.resolveResponsiveProps({
|
|
48
|
+
className: css.css(theme$1.utils.resolveResponsiveProps({
|
|
55
49
|
alignItems: alignItems,
|
|
56
50
|
display: 'grid',
|
|
57
|
-
gap: utils.mapResponsiveScale(gap, spacing),
|
|
58
|
-
gridTemplateColumns: collapseBelow ? utils.optimizeResponsiveArray([collapseOnMobile ? null : gridTemplateColumns, collapseOnTablet ? null : gridTemplateColumns, collapseOnDesktop ? null : gridTemplateColumns, collapseOnWide ? null : gridTemplateColumns]) : gridTemplateColumns,
|
|
51
|
+
gap: theme$1.utils.mapResponsiveScale(gap, theme$1.spacing),
|
|
52
|
+
gridTemplateColumns: collapseBelow ? theme$1.utils.optimizeResponsiveArray([collapseOnMobile ? null : gridTemplateColumns, collapseOnTablet ? null : gridTemplateColumns, collapseOnDesktop ? null : gridTemplateColumns, collapseOnWide ? null : gridTemplateColumns]) : gridTemplateColumns,
|
|
59
53
|
// fix flex overflow bug that prevents text truncation
|
|
60
54
|
'> *': {
|
|
61
55
|
minWidth: 0
|
|
@@ -19,39 +19,33 @@ var alignYToAlignItems = createResponsiveMapFn(alignYLookup);
|
|
|
19
19
|
var _excluded = ["alignY", "collapseBelow", "data", "gap", "template"];
|
|
20
20
|
var Columns = forwardRefWithAs(function (_ref, forwardedRef) {
|
|
21
21
|
var _ref$alignY = _ref.alignY,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
var _useTheme = useTheme(),
|
|
30
|
-
spacing = _useTheme.spacing,
|
|
31
|
-
utils = _useTheme.utils;
|
|
32
|
-
|
|
22
|
+
alignY = _ref$alignY === void 0 ? 'top' : _ref$alignY,
|
|
23
|
+
collapseBelow = _ref.collapseBelow,
|
|
24
|
+
data = _ref.data,
|
|
25
|
+
gap = _ref.gap,
|
|
26
|
+
template = _ref.template,
|
|
27
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
28
|
+
var theme = useTheme();
|
|
33
29
|
var alignItems = alignYToAlignItems(alignY);
|
|
34
30
|
var count = Children.count(props.children);
|
|
35
31
|
var gridTemplateColumns = template ? template.map(function (c) {
|
|
36
32
|
return "".concat(c, "fr");
|
|
37
33
|
}).join(' ') : "repeat(".concat(count, ", 1fr)");
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
collapseOnWide = _utils$responsiveRang2[3];
|
|
47
|
-
|
|
34
|
+
var _theme$utils$responsi = theme.utils.responsiveRange({
|
|
35
|
+
below: collapseBelow
|
|
36
|
+
}),
|
|
37
|
+
_theme$utils$responsi2 = _slicedToArray(_theme$utils$responsi, 4),
|
|
38
|
+
collapseOnMobile = _theme$utils$responsi2[0],
|
|
39
|
+
collapseOnTablet = _theme$utils$responsi2[1],
|
|
40
|
+
collapseOnDesktop = _theme$utils$responsi2[2],
|
|
41
|
+
collapseOnWide = _theme$utils$responsi2[3];
|
|
48
42
|
return /*#__PURE__*/jsx(Box, _objectSpread({
|
|
49
43
|
ref: forwardedRef,
|
|
50
|
-
className: css(utils.resolveResponsiveProps({
|
|
44
|
+
className: css(theme.utils.resolveResponsiveProps({
|
|
51
45
|
alignItems: alignItems,
|
|
52
46
|
display: 'grid',
|
|
53
|
-
gap: utils.mapResponsiveScale(gap, spacing),
|
|
54
|
-
gridTemplateColumns: collapseBelow ? utils.optimizeResponsiveArray([collapseOnMobile ? null : gridTemplateColumns, collapseOnTablet ? null : gridTemplateColumns, collapseOnDesktop ? null : gridTemplateColumns, collapseOnWide ? null : gridTemplateColumns]) : gridTemplateColumns,
|
|
47
|
+
gap: theme.utils.mapResponsiveScale(gap, theme.spacing),
|
|
48
|
+
gridTemplateColumns: collapseBelow ? theme.utils.optimizeResponsiveArray([collapseOnMobile ? null : gridTemplateColumns, collapseOnTablet ? null : gridTemplateColumns, collapseOnDesktop ? null : gridTemplateColumns, collapseOnWide ? null : gridTemplateColumns]) : gridTemplateColumns,
|
|
55
49
|
// fix flex overflow bug that prevents text truncation
|
|
56
50
|
'> *': {
|
|
57
51
|
minWidth: 0
|
package/package.json
CHANGED
|
@@ -1,22 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spark-web/columns",
|
|
3
|
-
"version": "2.0
|
|
4
|
-
"
|
|
3
|
+
"version": "2.1.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/columns"
|
|
9
|
+
},
|
|
5
10
|
"main": "dist/spark-web-columns.cjs.js",
|
|
6
11
|
"module": "dist/spark-web-columns.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/theme": "^3.0
|
|
15
|
-
"@spark-web/utils": "^1.
|
|
20
|
+
"@spark-web/box": "^1.2.0",
|
|
21
|
+
"@spark-web/theme": "^3.2.0",
|
|
22
|
+
"@spark-web/utils": "^1.3.0"
|
|
16
23
|
},
|
|
17
24
|
"devDependencies": {
|
|
18
|
-
"@types/react": "^
|
|
19
|
-
"react": "^
|
|
25
|
+
"@types/react": "^18.2.0",
|
|
26
|
+
"react": "^18.2.0"
|
|
20
27
|
},
|
|
21
28
|
"peerDependencies": {
|
|
22
29
|
"react": ">=17.0.2"
|