@spark-web/columns 2.0.4 → 2.0.5
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 +211 -0
- package/README.md +1 -8
- package/dist/declarations/src/{Columns.d.ts → columns.d.ts} +0 -0
- package/dist/declarations/src/index.d.ts +2 -2
- package/dist/spark-web-columns.cjs.dev.js +10 -13
- package/dist/spark-web-columns.cjs.prod.js +10 -13
- package/dist/spark-web-columns.esm.js +10 -13
- package/package.json +14 -7
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
# @spark-web/columns
|
|
2
|
+
|
|
3
|
+
## 2.0.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#246](https://github.com/brighte-labs/spark-web/pull/246)
|
|
8
|
+
[`de99b9c`](https://github.com/brighte-labs/spark-web/commit/de99b9c7f72373bd1902cf67f5cfec9a1e1db01c)
|
|
9
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Remove
|
|
10
|
+
destructuring from theme object
|
|
11
|
+
|
|
12
|
+
- [#218](https://github.com/brighte-labs/spark-web/pull/218)
|
|
13
|
+
[`6fc8d1b`](https://github.com/brighte-labs/spark-web/commit/6fc8d1bc37e25d0cd622bc37f68a1d92eb5961b5)
|
|
14
|
+
Thanks [@nderkim](https://github.com/nderkim)! - Rename files to kebab case
|
|
15
|
+
|
|
16
|
+
- [#222](https://github.com/brighte-labs/spark-web/pull/222)
|
|
17
|
+
[`7f93c45`](https://github.com/brighte-labs/spark-web/commit/7f93c45bbae8c765e10df9d0dd7615473797749b)
|
|
18
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Update
|
|
19
|
+
dependencies
|
|
20
|
+
|
|
21
|
+
- [#242](https://github.com/brighte-labs/spark-web/pull/242)
|
|
22
|
+
[`6df05f7`](https://github.com/brighte-labs/spark-web/commit/6df05f764e4181c140d6547d6b897d0210468f6a)
|
|
23
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - - Add homepage
|
|
24
|
+
and repository keys to package.json
|
|
25
|
+
- Add CHANGELOG and README to files key in package.json
|
|
26
|
+
- Updated dependencies
|
|
27
|
+
[[`adc5e9e`](https://github.com/brighte-labs/spark-web/commit/adc5e9e6c99acd117f3261edcefdb5573132441b),
|
|
28
|
+
[`de99b9c`](https://github.com/brighte-labs/spark-web/commit/de99b9c7f72373bd1902cf67f5cfec9a1e1db01c),
|
|
29
|
+
[`6fc8d1b`](https://github.com/brighte-labs/spark-web/commit/6fc8d1bc37e25d0cd622bc37f68a1d92eb5961b5),
|
|
30
|
+
[`7f93c45`](https://github.com/brighte-labs/spark-web/commit/7f93c45bbae8c765e10df9d0dd7615473797749b),
|
|
31
|
+
[`62f7de8`](https://github.com/brighte-labs/spark-web/commit/62f7de8a2e1df5ae088c093d3acdaa868d3f61fe),
|
|
32
|
+
[`6df05f7`](https://github.com/brighte-labs/spark-web/commit/6df05f764e4181c140d6547d6b897d0210468f6a)]:
|
|
33
|
+
- @spark-web/box@1.1.0
|
|
34
|
+
- @spark-web/theme@3.1.0
|
|
35
|
+
- @spark-web/utils@1.2.3
|
|
36
|
+
|
|
37
|
+
## 2.0.4
|
|
38
|
+
|
|
39
|
+
### Patch Changes
|
|
40
|
+
|
|
41
|
+
- [#208](https://github.com/brighte-labs/spark-web/pull/208)
|
|
42
|
+
[`1ea26ef`](https://github.com/brighte-labs/spark-web/commit/1ea26ef04a3b45875ed0dd2326eeab1fbe1e4bc5)
|
|
43
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Lower required
|
|
44
|
+
node version
|
|
45
|
+
|
|
46
|
+
- Updated dependencies
|
|
47
|
+
[[`1ea26ef`](https://github.com/brighte-labs/spark-web/commit/1ea26ef04a3b45875ed0dd2326eeab1fbe1e4bc5)]:
|
|
48
|
+
- @spark-web/box@1.0.9
|
|
49
|
+
- @spark-web/theme@3.0.6
|
|
50
|
+
- @spark-web/utils@1.2.2
|
|
51
|
+
|
|
52
|
+
## 2.0.3
|
|
53
|
+
|
|
54
|
+
### Patch Changes
|
|
55
|
+
|
|
56
|
+
- [#197](https://github.com/brighte-labs/spark-web/pull/197)
|
|
57
|
+
[`94016d8`](https://github.com/brighte-labs/spark-web/commit/94016d84e26bbe55833bbcbab847a2cce6041538)
|
|
58
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Update packages
|
|
59
|
+
|
|
60
|
+
- Updated dependencies
|
|
61
|
+
[[`94016d8`](https://github.com/brighte-labs/spark-web/commit/94016d84e26bbe55833bbcbab847a2cce6041538)]:
|
|
62
|
+
- @spark-web/box@1.0.8
|
|
63
|
+
- @spark-web/theme@3.0.5
|
|
64
|
+
- @spark-web/utils@1.2.1
|
|
65
|
+
|
|
66
|
+
## 2.0.2
|
|
67
|
+
|
|
68
|
+
### Patch Changes
|
|
69
|
+
|
|
70
|
+
- [#173](https://github.com/brighte-labs/spark-web/pull/173)
|
|
71
|
+
[`90b7e9c`](https://github.com/brighte-labs/spark-web/commit/90b7e9cf4eb7e864d765c74b22c3dedf3d262e25)
|
|
72
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Update babel
|
|
73
|
+
dependency
|
|
74
|
+
|
|
75
|
+
- Updated dependencies
|
|
76
|
+
[[`90b7e9c`](https://github.com/brighte-labs/spark-web/commit/90b7e9cf4eb7e864d765c74b22c3dedf3d262e25),
|
|
77
|
+
[`c3867af`](https://github.com/brighte-labs/spark-web/commit/c3867af7b77dfae3580ab63a5d5c9e8452f2da62)]:
|
|
78
|
+
- @spark-web/box@1.0.7
|
|
79
|
+
- @spark-web/theme@3.0.3
|
|
80
|
+
- @spark-web/utils@1.2.0
|
|
81
|
+
|
|
82
|
+
## 2.0.1
|
|
83
|
+
|
|
84
|
+
### Patch Changes
|
|
85
|
+
|
|
86
|
+
- [#167](https://github.com/brighte-labs/spark-web/pull/167)
|
|
87
|
+
[`4f79350`](https://github.com/brighte-labs/spark-web/commit/4f793508fdb43ddd452f0d59a3126101f9fa5459)
|
|
88
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Update Babel
|
|
89
|
+
|
|
90
|
+
- Updated dependencies
|
|
91
|
+
[[`4f79350`](https://github.com/brighte-labs/spark-web/commit/4f793508fdb43ddd452f0d59a3126101f9fa5459),
|
|
92
|
+
[`60f7281`](https://github.com/brighte-labs/spark-web/commit/60f7281c4a194d934a2ce561cad47e737b0fb48e)]:
|
|
93
|
+
- @spark-web/box@1.0.6
|
|
94
|
+
- @spark-web/theme@3.0.2
|
|
95
|
+
- @spark-web/utils@1.1.5
|
|
96
|
+
|
|
97
|
+
## 2.0.0
|
|
98
|
+
|
|
99
|
+
### Major Changes
|
|
100
|
+
|
|
101
|
+
- [#99](https://github.com/brighte-labs/spark-web/pull/99)
|
|
102
|
+
[`3db131b`](https://github.com/brighte-labs/spark-web/commit/3db131bfadbc4149d05b7c74be1a3e68cdd5b18f)
|
|
103
|
+
Thanks [@oscargws](https://github.com/oscargws)! - Removed props spreading
|
|
104
|
+
from multiple packages
|
|
105
|
+
|
|
106
|
+
### Minor Changes
|
|
107
|
+
|
|
108
|
+
- [#146](https://github.com/brighte-labs/spark-web/pull/146)
|
|
109
|
+
[`4e2dc42`](https://github.com/brighte-labs/spark-web/commit/4e2dc429711b2d0d9e180716dcee6a124608f694)
|
|
110
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Add className and
|
|
111
|
+
style back to layout primitives
|
|
112
|
+
|
|
113
|
+
## 1.0.5
|
|
114
|
+
|
|
115
|
+
### Patch Changes
|
|
116
|
+
|
|
117
|
+
- [#113](https://github.com/brighte-labs/spark-web/pull/113)
|
|
118
|
+
[`156236d`](https://github.com/brighte-labs/spark-web/commit/156236d2474aee66a0b8e2030635f9c08a5b78ba)
|
|
119
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Update
|
|
120
|
+
dependencies
|
|
121
|
+
|
|
122
|
+
- Updated dependencies
|
|
123
|
+
[[`156236d`](https://github.com/brighte-labs/spark-web/commit/156236d2474aee66a0b8e2030635f9c08a5b78ba)]:
|
|
124
|
+
- @spark-web/box@1.0.5
|
|
125
|
+
- @spark-web/theme@3.0.1
|
|
126
|
+
- @spark-web/utils@1.1.3
|
|
127
|
+
|
|
128
|
+
## 1.0.4
|
|
129
|
+
|
|
130
|
+
### Patch Changes
|
|
131
|
+
|
|
132
|
+
- [#83](https://github.com/brighte-labs/spark-web/pull/83)
|
|
133
|
+
[`1ef4f82`](https://github.com/brighte-labs/spark-web/commit/1ef4f82df999c487b79cd216c17ca5735e444fc5)
|
|
134
|
+
Thanks [@ChristopherMitchell242](https://github.com/ChristopherMitchell242)! -
|
|
135
|
+
Data attribute added to component props to allow consumers to attach custom
|
|
136
|
+
attributes to components
|
|
137
|
+
|
|
138
|
+
* [#52](https://github.com/brighte-labs/spark-web/pull/52)
|
|
139
|
+
[`82ab744`](https://github.com/brighte-labs/spark-web/commit/82ab744f198466810f3386bc459b8ab4d57c820e)
|
|
140
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Add files array
|
|
141
|
+
to package.json files
|
|
142
|
+
|
|
143
|
+
* Updated dependencies
|
|
144
|
+
[[`182a53a`](https://github.com/brighte-labs/spark-web/commit/182a53a484892df48754e89dd714459a7f69fcff),
|
|
145
|
+
[`82ab744`](https://github.com/brighte-labs/spark-web/commit/82ab744f198466810f3386bc459b8ab4d57c820e),
|
|
146
|
+
[`df618d9`](https://github.com/brighte-labs/spark-web/commit/df618d92d534e06f06ecedc95ea6bdd51cdc906b)]:
|
|
147
|
+
- @spark-web/theme@3.0.0
|
|
148
|
+
- @spark-web/box@1.0.4
|
|
149
|
+
- @spark-web/utils@1.1.2
|
|
150
|
+
|
|
151
|
+
## 1.0.3
|
|
152
|
+
|
|
153
|
+
### Patch Changes
|
|
154
|
+
|
|
155
|
+
- [#42](https://github.com/brighte-labs/spark-web/pull/42)
|
|
156
|
+
[`435779a`](https://github.com/brighte-labs/spark-web/commit/435779aa42bd635bbf43e1fd41724c666402caa2)
|
|
157
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Prevent multiple
|
|
158
|
+
versions of React
|
|
159
|
+
|
|
160
|
+
- Updated dependencies
|
|
161
|
+
[[`435779a`](https://github.com/brighte-labs/spark-web/commit/435779aa42bd635bbf43e1fd41724c666402caa2)]:
|
|
162
|
+
- @spark-web/box@1.0.3
|
|
163
|
+
- @spark-web/theme@2.0.2
|
|
164
|
+
- @spark-web/utils@1.1.1
|
|
165
|
+
|
|
166
|
+
## 1.0.2
|
|
167
|
+
|
|
168
|
+
### Patch Changes
|
|
169
|
+
|
|
170
|
+
- [#40](https://github.com/brighte-labs/spark-web/pull/40)
|
|
171
|
+
[`062c8ab`](https://github.com/brighte-labs/spark-web/commit/062c8ab8c7b4120f8d14c269b5f7801288c678ca)
|
|
172
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Add
|
|
173
|
+
@babel/transform-runtime
|
|
174
|
+
|
|
175
|
+
- Updated dependencies
|
|
176
|
+
[[`062c8ab`](https://github.com/brighte-labs/spark-web/commit/062c8ab8c7b4120f8d14c269b5f7801288c678ca)]:
|
|
177
|
+
- @spark-web/box@1.0.2
|
|
178
|
+
- @spark-web/theme@2.0.1
|
|
179
|
+
- @spark-web/utils@1.0.2
|
|
180
|
+
|
|
181
|
+
## 1.0.1
|
|
182
|
+
|
|
183
|
+
### Patch Changes
|
|
184
|
+
|
|
185
|
+
- [#36](https://github.com/brighte-labs/spark-web/pull/36)
|
|
186
|
+
[`8546f8f`](https://github.com/brighte-labs/spark-web/commit/8546f8f05daaa79ea3ff954c6c4928a7a2d0622d)
|
|
187
|
+
Thanks [@lukebennett88](https://github.com/lukebennett88)! - Update Babel
|
|
188
|
+
config
|
|
189
|
+
|
|
190
|
+
- Updated dependencies
|
|
191
|
+
[[`aebff30`](https://github.com/brighte-labs/spark-web/commit/aebff30c86cb0a9db22b545c46159ce0d1c14afb),
|
|
192
|
+
[`8546f8f`](https://github.com/brighte-labs/spark-web/commit/8546f8f05daaa79ea3ff954c6c4928a7a2d0622d)]:
|
|
193
|
+
- @spark-web/theme@2.0.0
|
|
194
|
+
- @spark-web/box@1.0.1
|
|
195
|
+
- @spark-web/utils@1.0.1
|
|
196
|
+
|
|
197
|
+
## 1.0.0
|
|
198
|
+
|
|
199
|
+
### Major Changes
|
|
200
|
+
|
|
201
|
+
- [#27](https://github.com/brighte-labs/spark-web/pull/27)
|
|
202
|
+
[`4c8e398`](https://github.com/brighte-labs/spark-web/commit/4c8e3988f8a59d3dab60a6b67b1128b6ff2a5f2c)
|
|
203
|
+
Thanks [@JedWatson](https://github.com/JedWatson)! - Initial Version
|
|
204
|
+
|
|
205
|
+
### Patch Changes
|
|
206
|
+
|
|
207
|
+
- Updated dependencies
|
|
208
|
+
[[`4c8e398`](https://github.com/brighte-labs/spark-web/commit/4c8e3988f8a59d3dab60a6b67b1128b6ff2a5f2c)]:
|
|
209
|
+
- @spark-web/box@1.0.0
|
|
210
|
+
- @spark-web/theme@1.0.0
|
|
211
|
+
- @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`,
|
|
File without changes
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Columns } from './
|
|
2
|
-
export type { ColumnsProps } from './
|
|
1
|
+
export { Columns } from './columns';
|
|
2
|
+
export type { ColumnsProps } from './columns';
|
|
@@ -30,32 +30,29 @@ var Columns = ts.forwardRefWithAs(function (_ref, forwardedRef) {
|
|
|
30
30
|
template = _ref.template,
|
|
31
31
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
32
32
|
|
|
33
|
-
var
|
|
34
|
-
spacing = _useTheme.spacing,
|
|
35
|
-
utils = _useTheme.utils;
|
|
36
|
-
|
|
33
|
+
var theme$1 = theme.useTheme();
|
|
37
34
|
var alignItems = alignYToAlignItems(alignY);
|
|
38
35
|
var count = react.Children.count(props.children);
|
|
39
36
|
var gridTemplateColumns = template ? template.map(function (c) {
|
|
40
37
|
return "".concat(c, "fr");
|
|
41
38
|
}).join(' ') : "repeat(".concat(count, ", 1fr)");
|
|
42
39
|
|
|
43
|
-
var
|
|
40
|
+
var _theme$utils$responsi = theme$1.utils.responsiveRange({
|
|
44
41
|
below: collapseBelow
|
|
45
42
|
}),
|
|
46
|
-
|
|
47
|
-
collapseOnMobile =
|
|
48
|
-
collapseOnTablet =
|
|
49
|
-
collapseOnDesktop =
|
|
50
|
-
collapseOnWide =
|
|
43
|
+
_theme$utils$responsi2 = _slicedToArray(_theme$utils$responsi, 4),
|
|
44
|
+
collapseOnMobile = _theme$utils$responsi2[0],
|
|
45
|
+
collapseOnTablet = _theme$utils$responsi2[1],
|
|
46
|
+
collapseOnDesktop = _theme$utils$responsi2[2],
|
|
47
|
+
collapseOnWide = _theme$utils$responsi2[3];
|
|
51
48
|
|
|
52
49
|
return /*#__PURE__*/jsxRuntime.jsx(box.Box, _objectSpread({
|
|
53
50
|
ref: forwardedRef,
|
|
54
|
-
className: css.css(utils.resolveResponsiveProps({
|
|
51
|
+
className: css.css(theme$1.utils.resolveResponsiveProps({
|
|
55
52
|
alignItems: alignItems,
|
|
56
53
|
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,
|
|
54
|
+
gap: theme$1.utils.mapResponsiveScale(gap, theme$1.spacing),
|
|
55
|
+
gridTemplateColumns: collapseBelow ? theme$1.utils.optimizeResponsiveArray([collapseOnMobile ? null : gridTemplateColumns, collapseOnTablet ? null : gridTemplateColumns, collapseOnDesktop ? null : gridTemplateColumns, collapseOnWide ? null : gridTemplateColumns]) : gridTemplateColumns,
|
|
59
56
|
// fix flex overflow bug that prevents text truncation
|
|
60
57
|
'> *': {
|
|
61
58
|
minWidth: 0
|
|
@@ -30,32 +30,29 @@ var Columns = ts.forwardRefWithAs(function (_ref, forwardedRef) {
|
|
|
30
30
|
template = _ref.template,
|
|
31
31
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
32
32
|
|
|
33
|
-
var
|
|
34
|
-
spacing = _useTheme.spacing,
|
|
35
|
-
utils = _useTheme.utils;
|
|
36
|
-
|
|
33
|
+
var theme$1 = theme.useTheme();
|
|
37
34
|
var alignItems = alignYToAlignItems(alignY);
|
|
38
35
|
var count = react.Children.count(props.children);
|
|
39
36
|
var gridTemplateColumns = template ? template.map(function (c) {
|
|
40
37
|
return "".concat(c, "fr");
|
|
41
38
|
}).join(' ') : "repeat(".concat(count, ", 1fr)");
|
|
42
39
|
|
|
43
|
-
var
|
|
40
|
+
var _theme$utils$responsi = theme$1.utils.responsiveRange({
|
|
44
41
|
below: collapseBelow
|
|
45
42
|
}),
|
|
46
|
-
|
|
47
|
-
collapseOnMobile =
|
|
48
|
-
collapseOnTablet =
|
|
49
|
-
collapseOnDesktop =
|
|
50
|
-
collapseOnWide =
|
|
43
|
+
_theme$utils$responsi2 = _slicedToArray(_theme$utils$responsi, 4),
|
|
44
|
+
collapseOnMobile = _theme$utils$responsi2[0],
|
|
45
|
+
collapseOnTablet = _theme$utils$responsi2[1],
|
|
46
|
+
collapseOnDesktop = _theme$utils$responsi2[2],
|
|
47
|
+
collapseOnWide = _theme$utils$responsi2[3];
|
|
51
48
|
|
|
52
49
|
return /*#__PURE__*/jsxRuntime.jsx(box.Box, _objectSpread({
|
|
53
50
|
ref: forwardedRef,
|
|
54
|
-
className: css.css(utils.resolveResponsiveProps({
|
|
51
|
+
className: css.css(theme$1.utils.resolveResponsiveProps({
|
|
55
52
|
alignItems: alignItems,
|
|
56
53
|
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,
|
|
54
|
+
gap: theme$1.utils.mapResponsiveScale(gap, theme$1.spacing),
|
|
55
|
+
gridTemplateColumns: collapseBelow ? theme$1.utils.optimizeResponsiveArray([collapseOnMobile ? null : gridTemplateColumns, collapseOnTablet ? null : gridTemplateColumns, collapseOnDesktop ? null : gridTemplateColumns, collapseOnWide ? null : gridTemplateColumns]) : gridTemplateColumns,
|
|
59
56
|
// fix flex overflow bug that prevents text truncation
|
|
60
57
|
'> *': {
|
|
61
58
|
minWidth: 0
|
|
@@ -26,32 +26,29 @@ var Columns = forwardRefWithAs(function (_ref, forwardedRef) {
|
|
|
26
26
|
template = _ref.template,
|
|
27
27
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
28
28
|
|
|
29
|
-
var
|
|
30
|
-
spacing = _useTheme.spacing,
|
|
31
|
-
utils = _useTheme.utils;
|
|
32
|
-
|
|
29
|
+
var theme = useTheme();
|
|
33
30
|
var alignItems = alignYToAlignItems(alignY);
|
|
34
31
|
var count = Children.count(props.children);
|
|
35
32
|
var gridTemplateColumns = template ? template.map(function (c) {
|
|
36
33
|
return "".concat(c, "fr");
|
|
37
34
|
}).join(' ') : "repeat(".concat(count, ", 1fr)");
|
|
38
35
|
|
|
39
|
-
var
|
|
36
|
+
var _theme$utils$responsi = theme.utils.responsiveRange({
|
|
40
37
|
below: collapseBelow
|
|
41
38
|
}),
|
|
42
|
-
|
|
43
|
-
collapseOnMobile =
|
|
44
|
-
collapseOnTablet =
|
|
45
|
-
collapseOnDesktop =
|
|
46
|
-
collapseOnWide =
|
|
39
|
+
_theme$utils$responsi2 = _slicedToArray(_theme$utils$responsi, 4),
|
|
40
|
+
collapseOnMobile = _theme$utils$responsi2[0],
|
|
41
|
+
collapseOnTablet = _theme$utils$responsi2[1],
|
|
42
|
+
collapseOnDesktop = _theme$utils$responsi2[2],
|
|
43
|
+
collapseOnWide = _theme$utils$responsi2[3];
|
|
47
44
|
|
|
48
45
|
return /*#__PURE__*/jsx(Box, _objectSpread({
|
|
49
46
|
ref: forwardedRef,
|
|
50
|
-
className: css(utils.resolveResponsiveProps({
|
|
47
|
+
className: css(theme.utils.resolveResponsiveProps({
|
|
51
48
|
alignItems: alignItems,
|
|
52
49
|
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,
|
|
50
|
+
gap: theme.utils.mapResponsiveScale(gap, theme.spacing),
|
|
51
|
+
gridTemplateColumns: collapseBelow ? theme.utils.optimizeResponsiveArray([collapseOnMobile ? null : gridTemplateColumns, collapseOnTablet ? null : gridTemplateColumns, collapseOnDesktop ? null : gridTemplateColumns, collapseOnWide ? null : gridTemplateColumns]) : gridTemplateColumns,
|
|
55
52
|
// fix flex overflow bug that prevents text truncation
|
|
56
53
|
'> *': {
|
|
57
54
|
minWidth: 0
|
package/package.json
CHANGED
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spark-web/columns",
|
|
3
|
-
"version": "2.0.
|
|
4
|
-
"
|
|
3
|
+
"version": "2.0.5",
|
|
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.2.
|
|
20
|
+
"@spark-web/box": "^1.1.0",
|
|
21
|
+
"@spark-web/theme": "^3.1.0",
|
|
22
|
+
"@spark-web/utils": "^1.2.3"
|
|
16
23
|
},
|
|
17
24
|
"devDependencies": {
|
|
18
25
|
"@types/react": "^17.0.12",
|