@zendeskgarden/react-grid 8.49.0 → 8.49.3
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/dist/index.cjs.js +48 -48
- package/dist/index.esm.js +42 -42
- package/dist/typings/elements/Col.d.ts +2 -78
- package/dist/typings/elements/Grid.d.ts +2 -10
- package/dist/typings/elements/Row.d.ts +2 -49
- package/dist/typings/index.d.ts +2 -5
- package/dist/typings/styled/StyledCol.d.ts +7 -35
- package/dist/typings/styled/StyledGrid.d.ts +3 -4
- package/dist/typings/styled/StyledRow.d.ts +6 -22
- package/dist/typings/types/index.d.ts +154 -0
- package/dist/typings/utils/useGridContext.d.ts +3 -3
- package/package.json +3 -3
- package/dist/typings/utils/types.d.ts +0 -22
package/dist/index.cjs.js
CHANGED
|
@@ -75,13 +75,13 @@ function _objectWithoutProperties(source, excluded) {
|
|
|
75
75
|
return target;
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
var
|
|
79
|
-
var
|
|
80
|
-
var
|
|
81
|
-
var
|
|
82
|
-
var
|
|
83
|
-
var
|
|
84
|
-
var
|
|
78
|
+
var ALIGN_ITEMS = ['start', 'end', 'center', 'baseline', 'stretch'];
|
|
79
|
+
var ALIGN_SELF = ['auto'].concat(ALIGN_ITEMS);
|
|
80
|
+
var DIRECTION = ['row', 'row-reverse', 'column', 'column-reverse'];
|
|
81
|
+
var JUSTIFY_CONTENT = ['start', 'end', 'center', 'between', 'around'];
|
|
82
|
+
var TEXT_ALIGN = ['start', 'end', 'center', 'justify'];
|
|
83
|
+
var SPACE = [false, 'xxs', 'xs', 'sm', 'md', 'lg', 'xl', 'xxl'];
|
|
84
|
+
var WRAP = ['nowrap', 'wrap', 'wrap-reverse'];
|
|
85
85
|
|
|
86
86
|
var COMPONENT_ID$2 = 'grid.col';
|
|
87
87
|
var colorStyles$2 = function colorStyles(props) {
|
|
@@ -135,7 +135,7 @@ var sizeStyles$2 = function sizeStyles(props) {
|
|
|
135
135
|
};
|
|
136
136
|
var StyledCol = styled__default["default"].div.attrs({
|
|
137
137
|
'data-garden-id': COMPONENT_ID$2,
|
|
138
|
-
'data-garden-version': '8.49.
|
|
138
|
+
'data-garden-version': '8.49.3'
|
|
139
139
|
}).withConfig({
|
|
140
140
|
displayName: "StyledCol",
|
|
141
141
|
componentId: "sc-inuw62-0"
|
|
@@ -175,7 +175,7 @@ var sizeStyles$1 = function sizeStyles(props) {
|
|
|
175
175
|
};
|
|
176
176
|
var StyledGrid = styled__default["default"].div.attrs({
|
|
177
177
|
'data-garden-id': COMPONENT_ID$1,
|
|
178
|
-
'data-garden-version': '8.49.
|
|
178
|
+
'data-garden-version': '8.49.3'
|
|
179
179
|
}).withConfig({
|
|
180
180
|
displayName: "StyledGrid",
|
|
181
181
|
componentId: "sc-oxgg5i-0"
|
|
@@ -225,7 +225,7 @@ var sizeStyles = function sizeStyles(props) {
|
|
|
225
225
|
};
|
|
226
226
|
var StyledRow = styled__default["default"].div.attrs({
|
|
227
227
|
'data-garden-id': COMPONENT_ID,
|
|
228
|
-
'data-garden-version': '8.49.
|
|
228
|
+
'data-garden-version': '8.49.3'
|
|
229
229
|
}).withConfig({
|
|
230
230
|
displayName: "StyledRow",
|
|
231
231
|
componentId: "sc-xjsdg1-0"
|
|
@@ -284,18 +284,18 @@ Col.propTypes = {
|
|
|
284
284
|
md: PropTypes__default["default"].oneOfType([PropTypes__default["default"].number, PropTypes__default["default"].string, PropTypes__default["default"].bool]),
|
|
285
285
|
lg: PropTypes__default["default"].oneOfType([PropTypes__default["default"].number, PropTypes__default["default"].string, PropTypes__default["default"].bool]),
|
|
286
286
|
xl: PropTypes__default["default"].oneOfType([PropTypes__default["default"].number, PropTypes__default["default"].string, PropTypes__default["default"].bool]),
|
|
287
|
-
alignSelf: PropTypes__default["default"].oneOf(
|
|
288
|
-
alignSelfXs: PropTypes__default["default"].oneOf(
|
|
289
|
-
alignSelfSm: PropTypes__default["default"].oneOf(
|
|
290
|
-
alignSelfMd: PropTypes__default["default"].oneOf(
|
|
291
|
-
alignSelfLg: PropTypes__default["default"].oneOf(
|
|
292
|
-
alignSelfXl: PropTypes__default["default"].oneOf(
|
|
293
|
-
textAlign: PropTypes__default["default"].oneOf(
|
|
294
|
-
textAlignXs: PropTypes__default["default"].oneOf(
|
|
295
|
-
textAlignSm: PropTypes__default["default"].oneOf(
|
|
296
|
-
textAlignMd: PropTypes__default["default"].oneOf(
|
|
297
|
-
textAlignLg: PropTypes__default["default"].oneOf(
|
|
298
|
-
textAlignXl: PropTypes__default["default"].oneOf(
|
|
287
|
+
alignSelf: PropTypes__default["default"].oneOf(ALIGN_SELF),
|
|
288
|
+
alignSelfXs: PropTypes__default["default"].oneOf(ALIGN_SELF),
|
|
289
|
+
alignSelfSm: PropTypes__default["default"].oneOf(ALIGN_SELF),
|
|
290
|
+
alignSelfMd: PropTypes__default["default"].oneOf(ALIGN_SELF),
|
|
291
|
+
alignSelfLg: PropTypes__default["default"].oneOf(ALIGN_SELF),
|
|
292
|
+
alignSelfXl: PropTypes__default["default"].oneOf(ALIGN_SELF),
|
|
293
|
+
textAlign: PropTypes__default["default"].oneOf(TEXT_ALIGN),
|
|
294
|
+
textAlignXs: PropTypes__default["default"].oneOf(TEXT_ALIGN),
|
|
295
|
+
textAlignSm: PropTypes__default["default"].oneOf(TEXT_ALIGN),
|
|
296
|
+
textAlignMd: PropTypes__default["default"].oneOf(TEXT_ALIGN),
|
|
297
|
+
textAlignLg: PropTypes__default["default"].oneOf(TEXT_ALIGN),
|
|
298
|
+
textAlignXl: PropTypes__default["default"].oneOf(TEXT_ALIGN),
|
|
299
299
|
offset: PropTypes__default["default"].oneOfType([PropTypes__default["default"].number, PropTypes__default["default"].string]),
|
|
300
300
|
offsetXs: PropTypes__default["default"].oneOfType([PropTypes__default["default"].number, PropTypes__default["default"].string]),
|
|
301
301
|
offsetSm: PropTypes__default["default"].oneOfType([PropTypes__default["default"].number, PropTypes__default["default"].string]),
|
|
@@ -332,7 +332,7 @@ var Grid = React__default["default"].forwardRef(function (_ref, ref) {
|
|
|
332
332
|
Grid.displayName = 'Grid';
|
|
333
333
|
Grid.propTypes = {
|
|
334
334
|
columns: PropTypes__default["default"].oneOfType([PropTypes__default["default"].number, PropTypes__default["default"].string]),
|
|
335
|
-
gutters: PropTypes__default["default"].oneOf(
|
|
335
|
+
gutters: PropTypes__default["default"].oneOf(SPACE),
|
|
336
336
|
debug: PropTypes__default["default"].bool
|
|
337
337
|
};
|
|
338
338
|
Grid.defaultProps = {
|
|
@@ -356,33 +356,33 @@ var Row = React__default["default"].forwardRef(function (_ref, ref) {
|
|
|
356
356
|
});
|
|
357
357
|
Row.displayName = 'Row';
|
|
358
358
|
Row.propTypes = {
|
|
359
|
-
alignItems: PropTypes__default["default"].oneOf(
|
|
360
|
-
alignItemsXs: PropTypes__default["default"].oneOf(
|
|
361
|
-
alignItemsSm: PropTypes__default["default"].oneOf(
|
|
362
|
-
alignItemsMd: PropTypes__default["default"].oneOf(
|
|
363
|
-
alignItemsLg: PropTypes__default["default"].oneOf(
|
|
364
|
-
alignItemsXl: PropTypes__default["default"].oneOf(
|
|
365
|
-
justifyContent: PropTypes__default["default"].oneOf(
|
|
366
|
-
justifyContentXs: PropTypes__default["default"].oneOf(
|
|
367
|
-
justifyContentSm: PropTypes__default["default"].oneOf(
|
|
368
|
-
justifyContentMd: PropTypes__default["default"].oneOf(
|
|
369
|
-
justifyContentLg: PropTypes__default["default"].oneOf(
|
|
370
|
-
justifyContentXl: PropTypes__default["default"].oneOf(
|
|
371
|
-
wrap: PropTypes__default["default"].oneOf(
|
|
372
|
-
wrapXs: PropTypes__default["default"].oneOf(
|
|
373
|
-
wrapSm: PropTypes__default["default"].oneOf(
|
|
374
|
-
wrapMd: PropTypes__default["default"].oneOf(
|
|
375
|
-
wrapLg: PropTypes__default["default"].oneOf(
|
|
376
|
-
wrapXl: PropTypes__default["default"].oneOf(
|
|
359
|
+
alignItems: PropTypes__default["default"].oneOf(ALIGN_ITEMS),
|
|
360
|
+
alignItemsXs: PropTypes__default["default"].oneOf(ALIGN_ITEMS),
|
|
361
|
+
alignItemsSm: PropTypes__default["default"].oneOf(ALIGN_ITEMS),
|
|
362
|
+
alignItemsMd: PropTypes__default["default"].oneOf(ALIGN_ITEMS),
|
|
363
|
+
alignItemsLg: PropTypes__default["default"].oneOf(ALIGN_ITEMS),
|
|
364
|
+
alignItemsXl: PropTypes__default["default"].oneOf(ALIGN_ITEMS),
|
|
365
|
+
justifyContent: PropTypes__default["default"].oneOf(JUSTIFY_CONTENT),
|
|
366
|
+
justifyContentXs: PropTypes__default["default"].oneOf(JUSTIFY_CONTENT),
|
|
367
|
+
justifyContentSm: PropTypes__default["default"].oneOf(JUSTIFY_CONTENT),
|
|
368
|
+
justifyContentMd: PropTypes__default["default"].oneOf(JUSTIFY_CONTENT),
|
|
369
|
+
justifyContentLg: PropTypes__default["default"].oneOf(JUSTIFY_CONTENT),
|
|
370
|
+
justifyContentXl: PropTypes__default["default"].oneOf(JUSTIFY_CONTENT),
|
|
371
|
+
wrap: PropTypes__default["default"].oneOf(WRAP),
|
|
372
|
+
wrapXs: PropTypes__default["default"].oneOf(WRAP),
|
|
373
|
+
wrapSm: PropTypes__default["default"].oneOf(WRAP),
|
|
374
|
+
wrapMd: PropTypes__default["default"].oneOf(WRAP),
|
|
375
|
+
wrapLg: PropTypes__default["default"].oneOf(WRAP),
|
|
376
|
+
wrapXl: PropTypes__default["default"].oneOf(WRAP)
|
|
377
377
|
};
|
|
378
378
|
|
|
379
|
-
exports.ARRAY_ALIGN_ITEMS =
|
|
380
|
-
exports.ARRAY_ALIGN_SELF =
|
|
381
|
-
exports.ARRAY_DIRECTION =
|
|
382
|
-
exports.ARRAY_JUSTIFY_CONTENT =
|
|
383
|
-
exports.ARRAY_SPACE =
|
|
384
|
-
exports.ARRAY_TEXT_ALIGN =
|
|
385
|
-
exports.ARRAY_WRAP =
|
|
379
|
+
exports.ARRAY_ALIGN_ITEMS = ALIGN_ITEMS;
|
|
380
|
+
exports.ARRAY_ALIGN_SELF = ALIGN_SELF;
|
|
381
|
+
exports.ARRAY_DIRECTION = DIRECTION;
|
|
382
|
+
exports.ARRAY_JUSTIFY_CONTENT = JUSTIFY_CONTENT;
|
|
383
|
+
exports.ARRAY_SPACE = SPACE;
|
|
384
|
+
exports.ARRAY_TEXT_ALIGN = TEXT_ALIGN;
|
|
385
|
+
exports.ARRAY_WRAP = WRAP;
|
|
386
386
|
exports.Col = Col;
|
|
387
387
|
exports.Grid = Grid;
|
|
388
388
|
exports.Row = Row;
|
package/dist/index.esm.js
CHANGED
|
@@ -65,13 +65,13 @@ function _objectWithoutProperties(source, excluded) {
|
|
|
65
65
|
return target;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
var
|
|
69
|
-
var
|
|
70
|
-
var
|
|
71
|
-
var
|
|
72
|
-
var
|
|
73
|
-
var
|
|
74
|
-
var
|
|
68
|
+
var ALIGN_ITEMS = ['start', 'end', 'center', 'baseline', 'stretch'];
|
|
69
|
+
var ALIGN_SELF = ['auto'].concat(ALIGN_ITEMS);
|
|
70
|
+
var DIRECTION = ['row', 'row-reverse', 'column', 'column-reverse'];
|
|
71
|
+
var JUSTIFY_CONTENT = ['start', 'end', 'center', 'between', 'around'];
|
|
72
|
+
var TEXT_ALIGN = ['start', 'end', 'center', 'justify'];
|
|
73
|
+
var SPACE = [false, 'xxs', 'xs', 'sm', 'md', 'lg', 'xl', 'xxl'];
|
|
74
|
+
var WRAP = ['nowrap', 'wrap', 'wrap-reverse'];
|
|
75
75
|
|
|
76
76
|
var COMPONENT_ID$2 = 'grid.col';
|
|
77
77
|
var colorStyles$2 = function colorStyles(props) {
|
|
@@ -125,7 +125,7 @@ var sizeStyles$2 = function sizeStyles(props) {
|
|
|
125
125
|
};
|
|
126
126
|
var StyledCol = styled.div.attrs({
|
|
127
127
|
'data-garden-id': COMPONENT_ID$2,
|
|
128
|
-
'data-garden-version': '8.49.
|
|
128
|
+
'data-garden-version': '8.49.3'
|
|
129
129
|
}).withConfig({
|
|
130
130
|
displayName: "StyledCol",
|
|
131
131
|
componentId: "sc-inuw62-0"
|
|
@@ -165,7 +165,7 @@ var sizeStyles$1 = function sizeStyles(props) {
|
|
|
165
165
|
};
|
|
166
166
|
var StyledGrid = styled.div.attrs({
|
|
167
167
|
'data-garden-id': COMPONENT_ID$1,
|
|
168
|
-
'data-garden-version': '8.49.
|
|
168
|
+
'data-garden-version': '8.49.3'
|
|
169
169
|
}).withConfig({
|
|
170
170
|
displayName: "StyledGrid",
|
|
171
171
|
componentId: "sc-oxgg5i-0"
|
|
@@ -215,7 +215,7 @@ var sizeStyles = function sizeStyles(props) {
|
|
|
215
215
|
};
|
|
216
216
|
var StyledRow = styled.div.attrs({
|
|
217
217
|
'data-garden-id': COMPONENT_ID,
|
|
218
|
-
'data-garden-version': '8.49.
|
|
218
|
+
'data-garden-version': '8.49.3'
|
|
219
219
|
}).withConfig({
|
|
220
220
|
displayName: "StyledRow",
|
|
221
221
|
componentId: "sc-xjsdg1-0"
|
|
@@ -274,18 +274,18 @@ Col.propTypes = {
|
|
|
274
274
|
md: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.bool]),
|
|
275
275
|
lg: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.bool]),
|
|
276
276
|
xl: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.bool]),
|
|
277
|
-
alignSelf: PropTypes.oneOf(
|
|
278
|
-
alignSelfXs: PropTypes.oneOf(
|
|
279
|
-
alignSelfSm: PropTypes.oneOf(
|
|
280
|
-
alignSelfMd: PropTypes.oneOf(
|
|
281
|
-
alignSelfLg: PropTypes.oneOf(
|
|
282
|
-
alignSelfXl: PropTypes.oneOf(
|
|
283
|
-
textAlign: PropTypes.oneOf(
|
|
284
|
-
textAlignXs: PropTypes.oneOf(
|
|
285
|
-
textAlignSm: PropTypes.oneOf(
|
|
286
|
-
textAlignMd: PropTypes.oneOf(
|
|
287
|
-
textAlignLg: PropTypes.oneOf(
|
|
288
|
-
textAlignXl: PropTypes.oneOf(
|
|
277
|
+
alignSelf: PropTypes.oneOf(ALIGN_SELF),
|
|
278
|
+
alignSelfXs: PropTypes.oneOf(ALIGN_SELF),
|
|
279
|
+
alignSelfSm: PropTypes.oneOf(ALIGN_SELF),
|
|
280
|
+
alignSelfMd: PropTypes.oneOf(ALIGN_SELF),
|
|
281
|
+
alignSelfLg: PropTypes.oneOf(ALIGN_SELF),
|
|
282
|
+
alignSelfXl: PropTypes.oneOf(ALIGN_SELF),
|
|
283
|
+
textAlign: PropTypes.oneOf(TEXT_ALIGN),
|
|
284
|
+
textAlignXs: PropTypes.oneOf(TEXT_ALIGN),
|
|
285
|
+
textAlignSm: PropTypes.oneOf(TEXT_ALIGN),
|
|
286
|
+
textAlignMd: PropTypes.oneOf(TEXT_ALIGN),
|
|
287
|
+
textAlignLg: PropTypes.oneOf(TEXT_ALIGN),
|
|
288
|
+
textAlignXl: PropTypes.oneOf(TEXT_ALIGN),
|
|
289
289
|
offset: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
290
290
|
offsetXs: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
291
291
|
offsetSm: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
@@ -322,7 +322,7 @@ var Grid = React.forwardRef(function (_ref, ref) {
|
|
|
322
322
|
Grid.displayName = 'Grid';
|
|
323
323
|
Grid.propTypes = {
|
|
324
324
|
columns: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
325
|
-
gutters: PropTypes.oneOf(
|
|
325
|
+
gutters: PropTypes.oneOf(SPACE),
|
|
326
326
|
debug: PropTypes.bool
|
|
327
327
|
};
|
|
328
328
|
Grid.defaultProps = {
|
|
@@ -346,24 +346,24 @@ var Row = React.forwardRef(function (_ref, ref) {
|
|
|
346
346
|
});
|
|
347
347
|
Row.displayName = 'Row';
|
|
348
348
|
Row.propTypes = {
|
|
349
|
-
alignItems: PropTypes.oneOf(
|
|
350
|
-
alignItemsXs: PropTypes.oneOf(
|
|
351
|
-
alignItemsSm: PropTypes.oneOf(
|
|
352
|
-
alignItemsMd: PropTypes.oneOf(
|
|
353
|
-
alignItemsLg: PropTypes.oneOf(
|
|
354
|
-
alignItemsXl: PropTypes.oneOf(
|
|
355
|
-
justifyContent: PropTypes.oneOf(
|
|
356
|
-
justifyContentXs: PropTypes.oneOf(
|
|
357
|
-
justifyContentSm: PropTypes.oneOf(
|
|
358
|
-
justifyContentMd: PropTypes.oneOf(
|
|
359
|
-
justifyContentLg: PropTypes.oneOf(
|
|
360
|
-
justifyContentXl: PropTypes.oneOf(
|
|
361
|
-
wrap: PropTypes.oneOf(
|
|
362
|
-
wrapXs: PropTypes.oneOf(
|
|
363
|
-
wrapSm: PropTypes.oneOf(
|
|
364
|
-
wrapMd: PropTypes.oneOf(
|
|
365
|
-
wrapLg: PropTypes.oneOf(
|
|
366
|
-
wrapXl: PropTypes.oneOf(
|
|
349
|
+
alignItems: PropTypes.oneOf(ALIGN_ITEMS),
|
|
350
|
+
alignItemsXs: PropTypes.oneOf(ALIGN_ITEMS),
|
|
351
|
+
alignItemsSm: PropTypes.oneOf(ALIGN_ITEMS),
|
|
352
|
+
alignItemsMd: PropTypes.oneOf(ALIGN_ITEMS),
|
|
353
|
+
alignItemsLg: PropTypes.oneOf(ALIGN_ITEMS),
|
|
354
|
+
alignItemsXl: PropTypes.oneOf(ALIGN_ITEMS),
|
|
355
|
+
justifyContent: PropTypes.oneOf(JUSTIFY_CONTENT),
|
|
356
|
+
justifyContentXs: PropTypes.oneOf(JUSTIFY_CONTENT),
|
|
357
|
+
justifyContentSm: PropTypes.oneOf(JUSTIFY_CONTENT),
|
|
358
|
+
justifyContentMd: PropTypes.oneOf(JUSTIFY_CONTENT),
|
|
359
|
+
justifyContentLg: PropTypes.oneOf(JUSTIFY_CONTENT),
|
|
360
|
+
justifyContentXl: PropTypes.oneOf(JUSTIFY_CONTENT),
|
|
361
|
+
wrap: PropTypes.oneOf(WRAP),
|
|
362
|
+
wrapXs: PropTypes.oneOf(WRAP),
|
|
363
|
+
wrapSm: PropTypes.oneOf(WRAP),
|
|
364
|
+
wrapMd: PropTypes.oneOf(WRAP),
|
|
365
|
+
wrapLg: PropTypes.oneOf(WRAP),
|
|
366
|
+
wrapXl: PropTypes.oneOf(WRAP)
|
|
367
367
|
};
|
|
368
368
|
|
|
369
|
-
export { ARRAY_ALIGN_ITEMS, ARRAY_ALIGN_SELF, ARRAY_DIRECTION, ARRAY_JUSTIFY_CONTENT, ARRAY_SPACE, ARRAY_TEXT_ALIGN, ARRAY_WRAP, Col, Grid, Row };
|
|
369
|
+
export { ALIGN_ITEMS as ARRAY_ALIGN_ITEMS, ALIGN_SELF as ARRAY_ALIGN_SELF, DIRECTION as ARRAY_DIRECTION, JUSTIFY_CONTENT as ARRAY_JUSTIFY_CONTENT, SPACE as ARRAY_SPACE, TEXT_ALIGN as ARRAY_TEXT_ALIGN, WRAP as ARRAY_WRAP, Col, Grid, Row };
|
|
@@ -4,84 +4,8 @@
|
|
|
4
4
|
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
|
-
import React
|
|
8
|
-
import {
|
|
9
|
-
export interface IColProps extends HTMLAttributes<HTMLDivElement> {
|
|
10
|
-
/** Sets the total number of grid `columns` that the column spans on all screen sizes */
|
|
11
|
-
size?: GRID_NUMBER;
|
|
12
|
-
/** Defines the column size on extra-small screens.
|
|
13
|
-
* See [breakpoints](/components/theme-object#default_theme).
|
|
14
|
-
*/
|
|
15
|
-
xs?: BREAKPOINT;
|
|
16
|
-
/** Defines the column size on small screens*/
|
|
17
|
-
sm?: BREAKPOINT;
|
|
18
|
-
/** Defines the column size on medium screens */
|
|
19
|
-
md?: BREAKPOINT;
|
|
20
|
-
/** Defines the column size on large screens */
|
|
21
|
-
lg?: BREAKPOINT;
|
|
22
|
-
/** Defines the column size on extra-large screens */
|
|
23
|
-
xl?: BREAKPOINT;
|
|
24
|
-
/**
|
|
25
|
-
* Applies the `align-self` flex item property, overriding `Row alignItems`
|
|
26
|
-
* vertical alignment on all screen sizes
|
|
27
|
-
*/
|
|
28
|
-
alignSelf?: ALIGN_SELF;
|
|
29
|
-
/** Applies the `align-self` flex item property to the column on extra-small screens */
|
|
30
|
-
alignSelfXs?: ALIGN_SELF;
|
|
31
|
-
/** Applies the `align-self` flex item property to the column on small screens */
|
|
32
|
-
alignSelfSm?: ALIGN_SELF;
|
|
33
|
-
/** Applies the `align-self` flex item property to the column on medium screens */
|
|
34
|
-
alignSelfMd?: ALIGN_SELF;
|
|
35
|
-
/** Applies the `align-self` flex item property to the column on large screens */
|
|
36
|
-
alignSelfLg?: ALIGN_SELF;
|
|
37
|
-
/** Applies the `align-self` flex item property to the column on extra-large screens */
|
|
38
|
-
alignSelfXl?: ALIGN_SELF;
|
|
39
|
-
/**
|
|
40
|
-
* Applies the RTL-aware `text-align` property to the column on all screen sizes
|
|
41
|
-
*/
|
|
42
|
-
textAlign?: TEXT_ALIGN;
|
|
43
|
-
/** Applies the `text-align` property to the column on extra-small screens */
|
|
44
|
-
textAlignXs?: TEXT_ALIGN;
|
|
45
|
-
/** Applies the `text-align` property to the column on small screens */
|
|
46
|
-
textAlignSm?: TEXT_ALIGN;
|
|
47
|
-
/** Applies the `text-align` property to the column on medium screens */
|
|
48
|
-
textAlignMd?: TEXT_ALIGN;
|
|
49
|
-
/** Applies the `text-align` property to the column on large screens */
|
|
50
|
-
textAlignLg?: TEXT_ALIGN;
|
|
51
|
-
/** Applies the `text-align` property to the column on extra-large screens */
|
|
52
|
-
textAlignXl?: TEXT_ALIGN;
|
|
53
|
-
/**
|
|
54
|
-
* Offsets the column relative to the total number of `columns` in the
|
|
55
|
-
* grid on all screen sizes
|
|
56
|
-
*/
|
|
57
|
-
offset?: GRID_NUMBER;
|
|
58
|
-
/** Applies offset to the column on extra-small screens */
|
|
59
|
-
offsetXs?: GRID_NUMBER;
|
|
60
|
-
/** Applies offset to the column on small screens */
|
|
61
|
-
offsetSm?: GRID_NUMBER;
|
|
62
|
-
/** Applies offset to the column on medium screens */
|
|
63
|
-
offsetMd?: GRID_NUMBER;
|
|
64
|
-
/** Applies offset to the column on large screens */
|
|
65
|
-
offsetLg?: GRID_NUMBER;
|
|
66
|
-
/** Applies offset to the column on extra-large screens */
|
|
67
|
-
offsetXl?: GRID_NUMBER;
|
|
68
|
-
/**
|
|
69
|
-
* Applies the `order` flex item property to the column on all screen sizes. Note that
|
|
70
|
-
* order modification can introduce accessibility problems by
|
|
71
|
-
* confusing tab ordering. Rely on semantic DOM ordering whenever possible.
|
|
72
|
-
*/
|
|
73
|
-
order?: GRID_NUMBER;
|
|
74
|
-
/** Sets the `order` flex item property of the column on extra-small screens */
|
|
75
|
-
orderXs?: GRID_NUMBER;
|
|
76
|
-
/** Sets the `order` flex item property of the column on small screens */
|
|
77
|
-
orderSm?: GRID_NUMBER;
|
|
78
|
-
/** Sets the `order` flex item property of the column on medium screens */
|
|
79
|
-
orderMd?: GRID_NUMBER;
|
|
80
|
-
/** Sets the `order` flex item property of the column on large screens */
|
|
81
|
-
orderLg?: GRID_NUMBER;
|
|
82
|
-
/** Sets the `order` flex item property of the column on extra-large screens */
|
|
83
|
-
orderXl?: GRID_NUMBER;
|
|
84
|
-
}
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { IColProps } from '../types';
|
|
85
9
|
/**
|
|
86
10
|
* @extends HTMLAttributes<HTMLDivElement>
|
|
87
11
|
*/
|
|
@@ -4,16 +4,8 @@
|
|
|
4
4
|
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
|
-
import React
|
|
8
|
-
import {
|
|
9
|
-
export interface IGridProps extends HTMLAttributes<HTMLDivElement> {
|
|
10
|
-
/** Defines the number of individual columns that the grid contains */
|
|
11
|
-
columns?: GRID_NUMBER;
|
|
12
|
-
/** Specifies the grid column gutter width. The value `false` collapses the gutters */
|
|
13
|
-
gutters?: SPACE;
|
|
14
|
-
/** Highlights the columns for layout debugging */
|
|
15
|
-
debug?: boolean;
|
|
16
|
-
}
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { IGridProps } from '../types';
|
|
17
9
|
/**
|
|
18
10
|
* @extends HTMLAttributes<HTMLDivElement>
|
|
19
11
|
*/
|
|
@@ -4,55 +4,8 @@
|
|
|
4
4
|
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
|
-
import React
|
|
8
|
-
import {
|
|
9
|
-
export interface IRowProps extends HTMLAttributes<HTMLDivElement> {
|
|
10
|
-
/**
|
|
11
|
-
* Applies the `align-items` flex container property to the row.
|
|
12
|
-
* This affects vertical `Col` alignment on all screen sizes.
|
|
13
|
-
*/
|
|
14
|
-
alignItems?: ALIGN_ITEMS;
|
|
15
|
-
/** Applies the `align-items` flex container property to the row on extra-small screens */
|
|
16
|
-
alignItemsXs?: ALIGN_ITEMS;
|
|
17
|
-
/** Applies the `align-items` flex container property to the row on small screens */
|
|
18
|
-
alignItemsSm?: ALIGN_ITEMS;
|
|
19
|
-
/** Applies the `align-items` flex container property to the row on medium screens */
|
|
20
|
-
alignItemsMd?: ALIGN_ITEMS;
|
|
21
|
-
/** Applies the `align-items` flex container property to the row on large screens */
|
|
22
|
-
alignItemsLg?: ALIGN_ITEMS;
|
|
23
|
-
/** Applies the `align-items` flex container property to the row on extra-large screens */
|
|
24
|
-
alignItemsXl?: ALIGN_ITEMS;
|
|
25
|
-
/**
|
|
26
|
-
* Applies the `justify-content` flex container property to the row.
|
|
27
|
-
* This affects horizontal `Col` alignment on all screen sizes.
|
|
28
|
-
*/
|
|
29
|
-
justifyContent?: JUSTIFY_CONTENT;
|
|
30
|
-
/** Applies the `justify-content` flex container property to the row on extra-small screens */
|
|
31
|
-
justifyContentXs?: JUSTIFY_CONTENT;
|
|
32
|
-
/** Applies the `justify-content` flex container property to the row on small screens */
|
|
33
|
-
justifyContentSm?: JUSTIFY_CONTENT;
|
|
34
|
-
/** Applies the `justify-content` flex container property to the row on medium screens */
|
|
35
|
-
justifyContentMd?: JUSTIFY_CONTENT;
|
|
36
|
-
/** Applies the `justify-content` flex container property to the row on large screens */
|
|
37
|
-
justifyContentLg?: JUSTIFY_CONTENT;
|
|
38
|
-
/** Applies the `justify-content` flex container property to the row on extra-large screens */
|
|
39
|
-
justifyContentXl?: JUSTIFY_CONTENT;
|
|
40
|
-
/**
|
|
41
|
-
* Applies the `flex-wrap` container property to the row. This affects `Col` wrapping on
|
|
42
|
-
* all screen sizes.
|
|
43
|
-
*/
|
|
44
|
-
wrap?: WRAP;
|
|
45
|
-
/** Applies the `flex-wrap` container property to the row on extra-small screens */
|
|
46
|
-
wrapXs?: WRAP;
|
|
47
|
-
/** Applies the `flex-wrap` container property to the row on small screens */
|
|
48
|
-
wrapSm?: WRAP;
|
|
49
|
-
/** Applies the `flex-wrap` container property to the row on medium screens */
|
|
50
|
-
wrapMd?: WRAP;
|
|
51
|
-
/** Applies the `flex-wrap` container property to the row on large screens */
|
|
52
|
-
wrapLg?: WRAP;
|
|
53
|
-
/** Applies the `flex-wrap` container property to the row on extra-large screens */
|
|
54
|
-
wrapXl?: WRAP;
|
|
55
|
-
}
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { IRowProps } from '../types';
|
|
56
9
|
/**
|
|
57
10
|
* @extends HTMLAttributes<HTMLDivElement>
|
|
58
11
|
*/
|
package/dist/typings/index.d.ts
CHANGED
|
@@ -7,8 +7,5 @@
|
|
|
7
7
|
export { Col } from './elements/Col';
|
|
8
8
|
export { Grid } from './elements/Grid';
|
|
9
9
|
export { Row } from './elements/Row';
|
|
10
|
-
export
|
|
11
|
-
export type { IGridProps } from './
|
|
12
|
-
export type { IRowProps } from './elements/Row';
|
|
13
|
-
export { ARRAY_ALIGN_ITEMS, ARRAY_ALIGN_SELF, ARRAY_DIRECTION, ARRAY_JUSTIFY_CONTENT, ARRAY_TEXT_ALIGN, ARRAY_SPACE, ARRAY_WRAP } from './utils/types';
|
|
14
|
-
export type { ALIGN_ITEMS, ALIGN_SELF, DIRECTION, JUSTIFY_CONTENT, TEXT_ALIGN, GRID_NUMBER, BREAKPOINT, SPACE, WRAP } from './utils/types';
|
|
10
|
+
export { ALIGN_ITEMS as ARRAY_ALIGN_ITEMS, ALIGN_SELF as ARRAY_ALIGN_SELF, DIRECTION as ARRAY_DIRECTION, JUSTIFY_CONTENT as ARRAY_JUSTIFY_CONTENT, TEXT_ALIGN as ARRAY_TEXT_ALIGN, SPACE as ARRAY_SPACE, WRAP as ARRAY_WRAP } from './types';
|
|
11
|
+
export type { IColProps, IGridProps, IRowProps, AlignItems as ALIGN_ITEMS, AlignSelf as ALIGN_SELF, Direction as DIRECTION, JustifyContent as JUSTIFY_CONTENT, TextAlign as TEXT_ALIGN, GridNumber as GRID_NUMBER, Breakpoint as BREAKPOINT, Space as SPACE, Wrap as WRAP } from './types';
|
|
@@ -5,40 +5,12 @@
|
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
7
|
import { ThemeProps, DefaultTheme } from 'styled-components';
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
columns?:
|
|
11
|
-
gutters?:
|
|
12
|
-
sizeAll?:
|
|
13
|
-
|
|
14
|
-
sm?: BREAKPOINT;
|
|
15
|
-
md?: BREAKPOINT;
|
|
16
|
-
lg?: BREAKPOINT;
|
|
17
|
-
xl?: BREAKPOINT;
|
|
18
|
-
alignSelf?: ALIGN_SELF;
|
|
19
|
-
alignSelfXs?: ALIGN_SELF;
|
|
20
|
-
alignSelfSm?: ALIGN_SELF;
|
|
21
|
-
alignSelfMd?: ALIGN_SELF;
|
|
22
|
-
alignSelfLg?: ALIGN_SELF;
|
|
23
|
-
alignSelfXl?: ALIGN_SELF;
|
|
24
|
-
textAlign?: TEXT_ALIGN;
|
|
25
|
-
textAlignXs?: TEXT_ALIGN;
|
|
26
|
-
textAlignSm?: TEXT_ALIGN;
|
|
27
|
-
textAlignMd?: TEXT_ALIGN;
|
|
28
|
-
textAlignLg?: TEXT_ALIGN;
|
|
29
|
-
textAlignXl?: TEXT_ALIGN;
|
|
30
|
-
offset?: GRID_NUMBER;
|
|
31
|
-
offsetXs?: GRID_NUMBER;
|
|
32
|
-
offsetSm?: GRID_NUMBER;
|
|
33
|
-
offsetMd?: GRID_NUMBER;
|
|
34
|
-
offsetLg?: GRID_NUMBER;
|
|
35
|
-
offsetXl?: GRID_NUMBER;
|
|
36
|
-
order?: GRID_NUMBER;
|
|
37
|
-
orderXs?: GRID_NUMBER;
|
|
38
|
-
orderSm?: GRID_NUMBER;
|
|
39
|
-
orderMd?: GRID_NUMBER;
|
|
40
|
-
orderLg?: GRID_NUMBER;
|
|
41
|
-
orderXl?: GRID_NUMBER;
|
|
42
|
-
debug?: boolean;
|
|
8
|
+
import { IColProps, IGridProps } from '../types';
|
|
9
|
+
interface IStyledColProps extends Omit<IColProps, 'size'>, ThemeProps<DefaultTheme> {
|
|
10
|
+
columns?: IGridProps['columns'];
|
|
11
|
+
gutters?: IGridProps['gutters'];
|
|
12
|
+
sizeAll?: IColProps['size'];
|
|
13
|
+
debug?: IGridProps['debug'];
|
|
43
14
|
}
|
|
44
15
|
export declare const StyledCol: import("styled-components").StyledComponent<"div", DefaultTheme, IStyledColProps, never>;
|
|
16
|
+
export {};
|
|
@@ -5,9 +5,8 @@
|
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
7
|
import { ThemeProps, DefaultTheme } from 'styled-components';
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
gutters?: SPACE;
|
|
11
|
-
debug?: boolean;
|
|
8
|
+
import { IGridProps } from '../types';
|
|
9
|
+
interface IStyledGridProps extends Omit<IGridProps, 'columns'>, ThemeProps<DefaultTheme> {
|
|
12
10
|
}
|
|
13
11
|
export declare const StyledGrid: import("styled-components").StyledComponent<"div", DefaultTheme, IStyledGridProps, never>;
|
|
12
|
+
export {};
|
|
@@ -5,27 +5,11 @@
|
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
7
|
import { ThemeProps, DefaultTheme } from 'styled-components';
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
gutters?:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
alignItemsSm?: ALIGN_ITEMS;
|
|
14
|
-
alignItemsMd?: ALIGN_ITEMS;
|
|
15
|
-
alignItemsLg?: ALIGN_ITEMS;
|
|
16
|
-
alignItemsXl?: ALIGN_ITEMS;
|
|
17
|
-
justifyContent?: JUSTIFY_CONTENT;
|
|
18
|
-
justifyContentXs?: JUSTIFY_CONTENT;
|
|
19
|
-
justifyContentSm?: JUSTIFY_CONTENT;
|
|
20
|
-
justifyContentMd?: JUSTIFY_CONTENT;
|
|
21
|
-
justifyContentLg?: JUSTIFY_CONTENT;
|
|
22
|
-
justifyContentXl?: JUSTIFY_CONTENT;
|
|
23
|
-
wrapAll?: WRAP;
|
|
24
|
-
wrapXs?: WRAP;
|
|
25
|
-
wrapSm?: WRAP;
|
|
26
|
-
wrapMd?: WRAP;
|
|
27
|
-
wrapLg?: WRAP;
|
|
28
|
-
wrapXl?: WRAP;
|
|
29
|
-
debug?: boolean;
|
|
8
|
+
import { IGridProps, IRowProps } from '../types';
|
|
9
|
+
interface IStyledRowProps extends Omit<IRowProps, 'wrap'>, ThemeProps<DefaultTheme> {
|
|
10
|
+
gutters?: IGridProps['gutters'];
|
|
11
|
+
wrapAll?: IRowProps['wrap'];
|
|
12
|
+
debug?: IGridProps['debug'];
|
|
30
13
|
}
|
|
31
14
|
export declare const StyledRow: import("styled-components").StyledComponent<"div", DefaultTheme, IStyledRowProps, never>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Zendesk, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
+
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
+
*/
|
|
7
|
+
import { HTMLAttributes } from 'react';
|
|
8
|
+
export declare const ALIGN_ITEMS: readonly ["start", "end", "center", "baseline", "stretch"];
|
|
9
|
+
export declare const ALIGN_SELF: readonly ["auto", "start", "end", "center", "baseline", "stretch"];
|
|
10
|
+
export declare const DIRECTION: readonly ["row", "row-reverse", "column", "column-reverse"];
|
|
11
|
+
export declare const JUSTIFY_CONTENT: readonly ["start", "end", "center", "between", "around"];
|
|
12
|
+
export declare const TEXT_ALIGN: readonly ["start", "end", "center", "justify"];
|
|
13
|
+
export declare const SPACE: readonly [false, "xxs", "xs", "sm", "md", "lg", "xl", "xxl"];
|
|
14
|
+
export declare const WRAP: readonly ["nowrap", "wrap", "wrap-reverse"];
|
|
15
|
+
export declare type AlignItems = typeof ALIGN_ITEMS[number];
|
|
16
|
+
export declare type AlignSelf = typeof ALIGN_SELF[number];
|
|
17
|
+
export declare type Direction = typeof DIRECTION[number];
|
|
18
|
+
export declare type JustifyContent = typeof JUSTIFY_CONTENT[number];
|
|
19
|
+
export declare type TextAlign = typeof TEXT_ALIGN[number];
|
|
20
|
+
export declare type GridNumber = number | string;
|
|
21
|
+
export declare type Breakpoint = number | string | boolean;
|
|
22
|
+
export declare type Space = typeof SPACE[number];
|
|
23
|
+
export declare type Wrap = 'nowrap' | 'wrap' | 'wrap-reverse';
|
|
24
|
+
export interface IColProps extends HTMLAttributes<HTMLDivElement> {
|
|
25
|
+
/** Sets the total number of grid `columns` that the column spans on all screen sizes */
|
|
26
|
+
size?: number | string;
|
|
27
|
+
/** Defines the column size on extra-small screens.
|
|
28
|
+
* See [breakpoints](/components/theme-object#default_theme).
|
|
29
|
+
*/
|
|
30
|
+
xs?: number | string | boolean;
|
|
31
|
+
/** Defines the column size on small screens*/
|
|
32
|
+
sm?: number | string | boolean;
|
|
33
|
+
/** Defines the column size on medium screens */
|
|
34
|
+
md?: number | string | boolean;
|
|
35
|
+
/** Defines the column size on large screens */
|
|
36
|
+
lg?: number | string | boolean;
|
|
37
|
+
/** Defines the column size on extra-large screens */
|
|
38
|
+
xl?: number | string | boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Applies the `align-self` flex item property, overriding `Row alignItems`
|
|
41
|
+
* vertical alignment on all screen sizes
|
|
42
|
+
*/
|
|
43
|
+
alignSelf?: AlignSelf;
|
|
44
|
+
/** Applies the `align-self` flex item property to the column on extra-small screens */
|
|
45
|
+
alignSelfXs?: AlignSelf;
|
|
46
|
+
/** Applies the `align-self` flex item property to the column on small screens */
|
|
47
|
+
alignSelfSm?: AlignSelf;
|
|
48
|
+
/** Applies the `align-self` flex item property to the column on medium screens */
|
|
49
|
+
alignSelfMd?: AlignSelf;
|
|
50
|
+
/** Applies the `align-self` flex item property to the column on large screens */
|
|
51
|
+
alignSelfLg?: AlignSelf;
|
|
52
|
+
/** Applies the `align-self` flex item property to the column on extra-large screens */
|
|
53
|
+
alignSelfXl?: AlignSelf;
|
|
54
|
+
/**
|
|
55
|
+
* Applies the RTL-aware `text-align` property to the column on all screen sizes
|
|
56
|
+
*/
|
|
57
|
+
textAlign?: TextAlign;
|
|
58
|
+
/** Applies the `text-align` property to the column on extra-small screens */
|
|
59
|
+
textAlignXs?: TextAlign;
|
|
60
|
+
/** Applies the `text-align` property to the column on small screens */
|
|
61
|
+
textAlignSm?: TextAlign;
|
|
62
|
+
/** Applies the `text-align` property to the column on medium screens */
|
|
63
|
+
textAlignMd?: TextAlign;
|
|
64
|
+
/** Applies the `text-align` property to the column on large screens */
|
|
65
|
+
textAlignLg?: TextAlign;
|
|
66
|
+
/** Applies the `text-align` property to the column on extra-large screens */
|
|
67
|
+
textAlignXl?: TextAlign;
|
|
68
|
+
/**
|
|
69
|
+
* Offsets the column relative to the total number of `columns` in the
|
|
70
|
+
* grid on all screen sizes
|
|
71
|
+
*/
|
|
72
|
+
offset?: number | string;
|
|
73
|
+
/** Applies offset to the column on extra-small screens */
|
|
74
|
+
offsetXs?: number | string;
|
|
75
|
+
/** Applies offset to the column on small screens */
|
|
76
|
+
offsetSm?: number | string;
|
|
77
|
+
/** Applies offset to the column on medium screens */
|
|
78
|
+
offsetMd?: number | string;
|
|
79
|
+
/** Applies offset to the column on large screens */
|
|
80
|
+
offsetLg?: number | string;
|
|
81
|
+
/** Applies offset to the column on extra-large screens */
|
|
82
|
+
offsetXl?: number | string;
|
|
83
|
+
/**
|
|
84
|
+
* Applies the `order` flex item property to the column on all screen sizes. Note that
|
|
85
|
+
* order modification can introduce accessibility problems by
|
|
86
|
+
* confusing tab ordering. Rely on semantic DOM ordering whenever possible.
|
|
87
|
+
*/
|
|
88
|
+
order?: number | string;
|
|
89
|
+
/** Sets the `order` flex item property of the column on extra-small screens */
|
|
90
|
+
orderXs?: number | string;
|
|
91
|
+
/** Sets the `order` flex item property of the column on small screens */
|
|
92
|
+
orderSm?: number | string;
|
|
93
|
+
/** Sets the `order` flex item property of the column on medium screens */
|
|
94
|
+
orderMd?: number | string;
|
|
95
|
+
/** Sets the `order` flex item property of the column on large screens */
|
|
96
|
+
orderLg?: number | string;
|
|
97
|
+
/** Sets the `order` flex item property of the column on extra-large screens */
|
|
98
|
+
orderXl?: number | string;
|
|
99
|
+
}
|
|
100
|
+
export interface IGridProps extends HTMLAttributes<HTMLDivElement> {
|
|
101
|
+
/** Defines the number of individual columns that the grid contains */
|
|
102
|
+
columns?: number | string;
|
|
103
|
+
/** Specifies the grid column gutter width. The value `false` collapses the gutters */
|
|
104
|
+
gutters?: Space;
|
|
105
|
+
/** Highlights the columns for layout debugging */
|
|
106
|
+
debug?: boolean;
|
|
107
|
+
}
|
|
108
|
+
export interface IRowProps extends HTMLAttributes<HTMLDivElement> {
|
|
109
|
+
/**
|
|
110
|
+
* Applies the `align-items` flex container property to the row.
|
|
111
|
+
* This affects vertical `Col` alignment on all screen sizes.
|
|
112
|
+
*/
|
|
113
|
+
alignItems?: AlignItems;
|
|
114
|
+
/** Applies the `align-items` flex container property to the row on extra-small screens */
|
|
115
|
+
alignItemsXs?: AlignItems;
|
|
116
|
+
/** Applies the `align-items` flex container property to the row on small screens */
|
|
117
|
+
alignItemsSm?: AlignItems;
|
|
118
|
+
/** Applies the `align-items` flex container property to the row on medium screens */
|
|
119
|
+
alignItemsMd?: AlignItems;
|
|
120
|
+
/** Applies the `align-items` flex container property to the row on large screens */
|
|
121
|
+
alignItemsLg?: AlignItems;
|
|
122
|
+
/** Applies the `align-items` flex container property to the row on extra-large screens */
|
|
123
|
+
alignItemsXl?: AlignItems;
|
|
124
|
+
/**
|
|
125
|
+
* Applies the `justify-content` flex container property to the row.
|
|
126
|
+
* This affects horizontal `Col` alignment on all screen sizes.
|
|
127
|
+
*/
|
|
128
|
+
justifyContent?: JustifyContent;
|
|
129
|
+
/** Applies the `justify-content` flex container property to the row on extra-small screens */
|
|
130
|
+
justifyContentXs?: JustifyContent;
|
|
131
|
+
/** Applies the `justify-content` flex container property to the row on small screens */
|
|
132
|
+
justifyContentSm?: JustifyContent;
|
|
133
|
+
/** Applies the `justify-content` flex container property to the row on medium screens */
|
|
134
|
+
justifyContentMd?: JustifyContent;
|
|
135
|
+
/** Applies the `justify-content` flex container property to the row on large screens */
|
|
136
|
+
justifyContentLg?: JustifyContent;
|
|
137
|
+
/** Applies the `justify-content` flex container property to the row on extra-large screens */
|
|
138
|
+
justifyContentXl?: JustifyContent;
|
|
139
|
+
/**
|
|
140
|
+
* Applies the `flex-wrap` container property to the row. This affects `Col` wrapping on
|
|
141
|
+
* all screen sizes.
|
|
142
|
+
*/
|
|
143
|
+
wrap?: Wrap;
|
|
144
|
+
/** Applies the `flex-wrap` container property to the row on extra-small screens */
|
|
145
|
+
wrapXs?: Wrap;
|
|
146
|
+
/** Applies the `flex-wrap` container property to the row on small screens */
|
|
147
|
+
wrapSm?: Wrap;
|
|
148
|
+
/** Applies the `flex-wrap` container property to the row on medium screens */
|
|
149
|
+
wrapMd?: Wrap;
|
|
150
|
+
/** Applies the `flex-wrap` container property to the row on large screens */
|
|
151
|
+
wrapLg?: Wrap;
|
|
152
|
+
/** Applies the `flex-wrap` container property to the row on extra-large screens */
|
|
153
|
+
wrapXl?: Wrap;
|
|
154
|
+
}
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
7
|
/// <reference types="react" />
|
|
8
|
-
import {
|
|
8
|
+
import { GridNumber, Space } from '../types';
|
|
9
9
|
interface IGridContext {
|
|
10
|
-
columns?:
|
|
11
|
-
gutters?:
|
|
10
|
+
columns?: GridNumber;
|
|
11
|
+
gutters?: Space;
|
|
12
12
|
debug?: boolean;
|
|
13
13
|
}
|
|
14
14
|
export declare const GridContext: import("react").Context<IGridContext>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zendeskgarden/react-grid",
|
|
3
|
-
"version": "8.49.
|
|
3
|
+
"version": "8.49.3",
|
|
4
4
|
"description": "Components relating to layout grids in the Garden Design System",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Zendesk Garden <garden@zendesk.com>",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"styled-components": "^4.2.0 || ^5.0.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@zendeskgarden/react-theming": "^8.49.
|
|
34
|
+
"@zendeskgarden/react-theming": "^8.49.3"
|
|
35
35
|
},
|
|
36
36
|
"keywords": [
|
|
37
37
|
"components",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"access": "public"
|
|
44
44
|
},
|
|
45
45
|
"zendeskgarden:src": "src/index.ts",
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "983322364971c051ca6ce478770edfc3310e4c4b"
|
|
47
47
|
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright Zendesk, Inc.
|
|
3
|
-
*
|
|
4
|
-
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
|
-
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
|
-
*/
|
|
7
|
-
export declare type ALIGN_ITEMS = 'start' | 'end' | 'center' | 'baseline' | 'stretch';
|
|
8
|
-
export declare const ARRAY_ALIGN_ITEMS: ALIGN_ITEMS[];
|
|
9
|
-
export declare type ALIGN_SELF = 'auto' | ALIGN_ITEMS;
|
|
10
|
-
export declare const ARRAY_ALIGN_SELF: ALIGN_SELF[];
|
|
11
|
-
export declare type DIRECTION = 'row' | 'row-reverse' | 'column' | 'column-reverse';
|
|
12
|
-
export declare const ARRAY_DIRECTION: DIRECTION[];
|
|
13
|
-
export declare type JUSTIFY_CONTENT = 'start' | 'end' | 'center' | 'between' | 'around';
|
|
14
|
-
export declare const ARRAY_JUSTIFY_CONTENT: JUSTIFY_CONTENT[];
|
|
15
|
-
export declare type TEXT_ALIGN = 'start' | 'end' | 'center' | 'justify';
|
|
16
|
-
export declare const ARRAY_TEXT_ALIGN: TEXT_ALIGN[];
|
|
17
|
-
export declare type GRID_NUMBER = number | string;
|
|
18
|
-
export declare type BREAKPOINT = GRID_NUMBER | boolean;
|
|
19
|
-
export declare type SPACE = false | 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
20
|
-
export declare const ARRAY_SPACE: SPACE[];
|
|
21
|
-
export declare type WRAP = 'nowrap' | 'wrap' | 'wrap-reverse';
|
|
22
|
-
export declare const ARRAY_WRAP: WRAP[];
|