@atlaskit/ds-explorations 0.1.4 → 0.1.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 +11 -0
- package/dist/cjs/components/box.partial.js +7 -1
- package/dist/cjs/components/inline.partial.js +42 -17
- package/dist/cjs/components/interaction-surface.partial.js +3 -2
- package/dist/cjs/components/stack.partial.js +44 -17
- package/dist/cjs/components/text.partial.js +2 -0
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/box.partial.js +6 -0
- package/dist/es2019/components/inline.partial.js +37 -16
- package/dist/es2019/components/interaction-surface.partial.js +3 -2
- package/dist/es2019/components/stack.partial.js +37 -16
- package/dist/es2019/components/text.partial.js +2 -0
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/box.partial.js +7 -1
- package/dist/esm/components/inline.partial.js +42 -16
- package/dist/esm/components/interaction-surface.partial.js +3 -2
- package/dist/esm/components/stack.partial.js +42 -16
- package/dist/esm/components/text.partial.js +2 -0
- package/dist/esm/version.json +1 -1
- package/dist/types/components/box.partial.d.ts +11 -3
- package/dist/types/components/inline.partial.d.ts +14 -2
- package/dist/types/components/interaction-surface.partial.d.ts +4 -3
- package/dist/types/components/stack.partial.d.ts +15 -4
- package/dist/types/components/types.d.ts +1 -0
- package/dist/types-ts4.0/components/box.partial.d.ts +11 -3
- package/dist/types-ts4.0/components/inline.partial.d.ts +14 -2
- package/dist/types-ts4.0/components/interaction-surface.partial.d.ts +4 -3
- package/dist/types-ts4.0/components/stack.partial.d.ts +15 -4
- package/dist/types-ts4.0/components/types.d.ts +1 -0
- package/examples/03-stack.tsx +43 -30
- package/examples/04-inline.tsx +43 -30
- package/examples/06-section-message.tsx +1 -1
- package/examples/99-interactions.tsx +33 -26
- package/package.json +1 -1
- package/report.api.md +57 -10
- package/scripts/spacing-codegen-template.tsx +6 -0
- package/src/components/__tests__/unit/box.test.tsx +10 -2
- package/src/components/__tests__/unit/inline.test.tsx +7 -7
- package/src/components/__tests__/unit/interaction-suface.test.tsx +13 -7
- package/src/components/__tests__/unit/stack.test.tsx +5 -5
- package/src/components/__tests__/visual-regression/__image_snapshots__/inline-snapshot-test-tsx-inline-alignment-example-should-match-snapshot-1-snap.png +2 -2
- package/src/components/__tests__/visual-regression/__image_snapshots__/stack-snapshot-test-tsx-stack-alignment-example-should-match-snapshot-1-snap.png +2 -2
- package/src/components/box.partial.tsx +13 -9
- package/src/components/inline.partial.tsx +46 -19
- package/src/components/interaction-surface.partial.tsx +4 -3
- package/src/components/stack.partial.tsx +46 -20
- package/src/components/text.partial.tsx +2 -0
- package/src/components/types.tsx +2 -0
- package/tmp/api-report-tmp.d.ts +450 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @atlaskit/ds-explorations
|
|
2
2
|
|
|
3
|
+
## 0.1.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`7014fd08976`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7014fd08976) - [ux] Inline gap prop now internally sets column-gap; Stack gap prop now internally sets row-gap
|
|
8
|
+
- [`ba660f4f76f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ba660f4f76f) - Add `start` and `end` values to Stack and Inline flex properties.
|
|
9
|
+
- [`3ee63238f49`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3ee63238f49) - Update internals of Box, Text, Inline and Stack to handle `children` more accurately.
|
|
10
|
+
Also update scope of `use-primitives` to suggest Box and Text more selectively.
|
|
11
|
+
- [`9dec0fe6946`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9dec0fe6946) - Add overflow prop to Box.
|
|
12
|
+
- [`7a9e73ec430`](https://bitbucket.org/atlassian/atlassian-frontend/commits/7a9e73ec430) - [ux] Internal changes to how styles are represented in SectionMessage. Some minor visual changes to the color and spacing of SectionMessage. No changes to the SectionMessage API.
|
|
13
|
+
|
|
3
14
|
## 0.1.4
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
|
@@ -23,7 +23,7 @@ var _constants = require("../constants");
|
|
|
23
23
|
|
|
24
24
|
var _surfaceProvider = require("./surface-provider");
|
|
25
25
|
|
|
26
|
-
var _excluded = ["children", "as", "className", "display", "flexDirection", "alignItems", "justifyContent", "backgroundColor", "borderColor", "borderStyle", "borderWidth", "borderRadius", "padding", "paddingBlock", "paddingInline", "position", "height", "width", "UNSAFE_style", "testId"];
|
|
26
|
+
var _excluded = ["children", "as", "className", "display", "flexDirection", "alignItems", "justifyContent", "backgroundColor", "borderColor", "borderStyle", "borderWidth", "borderRadius", "padding", "paddingBlock", "paddingInline", "position", "height", "overflow", "width", "UNSAFE_style", "testId"];
|
|
27
27
|
|
|
28
28
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
29
29
|
|
|
@@ -58,6 +58,7 @@ var Box = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
58
58
|
_ref$position = _ref.position,
|
|
59
59
|
position = _ref$position === void 0 ? 'relative' : _ref$position,
|
|
60
60
|
height = _ref.height,
|
|
61
|
+
overflow = _ref.overflow,
|
|
61
62
|
width = _ref.width,
|
|
62
63
|
UNSAFE_style = _ref.UNSAFE_style,
|
|
63
64
|
testId = _ref.testId,
|
|
@@ -186,6 +187,11 @@ var baseStyles = (0, _react2.css)({
|
|
|
186
187
|
appearance: 'none',
|
|
187
188
|
border: 'none'
|
|
188
189
|
});
|
|
190
|
+
var overflowMap = {
|
|
191
|
+
auto: (0, _react2.css)({
|
|
192
|
+
overflow: 'auto'
|
|
193
|
+
})
|
|
194
|
+
};
|
|
189
195
|
var positionMap = {
|
|
190
196
|
absolute: (0, _react2.css)({
|
|
191
197
|
position: 'absolute'
|
|
@@ -7,6 +7,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
|
|
10
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
+
|
|
10
12
|
var _react = require("react");
|
|
11
13
|
|
|
12
14
|
var _react2 = require("@emotion/react");
|
|
@@ -15,7 +17,10 @@ var _constants = require("../constants");
|
|
|
15
17
|
|
|
16
18
|
var _text = _interopRequireDefault(require("./text.partial"));
|
|
17
19
|
|
|
18
|
-
|
|
20
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
21
|
+
|
|
22
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
23
|
+
|
|
19
24
|
var flexAlignItemsMap = {
|
|
20
25
|
center: (0, _react2.css)({
|
|
21
26
|
alignItems: 'center'
|
|
@@ -28,6 +33,12 @@ var flexAlignItemsMap = {
|
|
|
28
33
|
}),
|
|
29
34
|
flexEnd: (0, _react2.css)({
|
|
30
35
|
alignItems: 'flex-end'
|
|
36
|
+
}),
|
|
37
|
+
start: (0, _react2.css)({
|
|
38
|
+
alignItems: 'start'
|
|
39
|
+
}),
|
|
40
|
+
end: (0, _react2.css)({
|
|
41
|
+
alignItems: 'end'
|
|
31
42
|
})
|
|
32
43
|
};
|
|
33
44
|
var flexJustifyContentMap = {
|
|
@@ -39,6 +50,17 @@ var flexJustifyContentMap = {
|
|
|
39
50
|
}),
|
|
40
51
|
flexEnd: (0, _react2.css)({
|
|
41
52
|
justifyContent: 'flex-end'
|
|
53
|
+
}),
|
|
54
|
+
start: (0, _react2.css)({
|
|
55
|
+
justifyContent: 'start'
|
|
56
|
+
}),
|
|
57
|
+
end: (0, _react2.css)({
|
|
58
|
+
justifyContent: 'end'
|
|
59
|
+
})
|
|
60
|
+
};
|
|
61
|
+
var flexWrapMap = {
|
|
62
|
+
wrap: (0, _react2.css)({
|
|
63
|
+
flexWrap: 'wrap'
|
|
42
64
|
})
|
|
43
65
|
};
|
|
44
66
|
var baseStyles = (0, _react2.css)({
|
|
@@ -58,12 +80,15 @@ var Inline = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
58
80
|
var gap = _ref.gap,
|
|
59
81
|
alignItems = _ref.alignItems,
|
|
60
82
|
justifyContent = _ref.justifyContent,
|
|
83
|
+
flexWrap = _ref.flexWrap,
|
|
61
84
|
divider = _ref.divider,
|
|
85
|
+
UNSAFE_style = _ref.UNSAFE_style,
|
|
62
86
|
children = _ref.children,
|
|
63
87
|
testId = _ref.testId;
|
|
64
88
|
var dividerComponent = typeof divider === 'string' ? (0, _react2.jsx)(_text.default, null, divider) : divider;
|
|
65
89
|
return (0, _react2.jsx)("div", {
|
|
66
|
-
|
|
90
|
+
style: _objectSpread({}, UNSAFE_style),
|
|
91
|
+
css: [baseStyles, gap && columnGapMap[gap], alignItems && flexAlignItemsMap[alignItems], justifyContent && flexJustifyContentMap[justifyContent], flexWrap && flexWrapMap[flexWrap]],
|
|
67
92
|
"data-testid": testId,
|
|
68
93
|
ref: ref
|
|
69
94
|
}, _react.Children.map(children, function (child, index) {
|
|
@@ -74,49 +99,49 @@ Inline.displayName = 'Inline';
|
|
|
74
99
|
var _default = Inline;
|
|
75
100
|
/**
|
|
76
101
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
77
|
-
* @codegen <<SignedSource::
|
|
102
|
+
* @codegen <<SignedSource::7a985afa5e15ffd4f6f9c0db0e99ceb6>>
|
|
78
103
|
* @codegenId spacing
|
|
79
104
|
* @codegenCommand yarn codegen-styles
|
|
80
|
-
* @codegenParams ["
|
|
105
|
+
* @codegenParams ["columnGap"]
|
|
81
106
|
*/
|
|
82
107
|
|
|
83
108
|
exports.default = _default;
|
|
84
|
-
var
|
|
109
|
+
var columnGapMap = {
|
|
85
110
|
'sp-0': (0, _react2.css)({
|
|
86
|
-
|
|
111
|
+
columnGap: _constants.SPACING_SCALE['sp-0']
|
|
87
112
|
}),
|
|
88
113
|
'sp-25': (0, _react2.css)({
|
|
89
|
-
|
|
114
|
+
columnGap: _constants.SPACING_SCALE['sp-25']
|
|
90
115
|
}),
|
|
91
116
|
'sp-50': (0, _react2.css)({
|
|
92
|
-
|
|
117
|
+
columnGap: _constants.SPACING_SCALE['sp-50']
|
|
93
118
|
}),
|
|
94
119
|
'sp-75': (0, _react2.css)({
|
|
95
|
-
|
|
120
|
+
columnGap: _constants.SPACING_SCALE['sp-75']
|
|
96
121
|
}),
|
|
97
122
|
'sp-100': (0, _react2.css)({
|
|
98
|
-
|
|
123
|
+
columnGap: _constants.SPACING_SCALE['sp-100']
|
|
99
124
|
}),
|
|
100
125
|
'sp-150': (0, _react2.css)({
|
|
101
|
-
|
|
126
|
+
columnGap: _constants.SPACING_SCALE['sp-150']
|
|
102
127
|
}),
|
|
103
128
|
'sp-200': (0, _react2.css)({
|
|
104
|
-
|
|
129
|
+
columnGap: _constants.SPACING_SCALE['sp-200']
|
|
105
130
|
}),
|
|
106
131
|
'sp-300': (0, _react2.css)({
|
|
107
|
-
|
|
132
|
+
columnGap: _constants.SPACING_SCALE['sp-300']
|
|
108
133
|
}),
|
|
109
134
|
'sp-400': (0, _react2.css)({
|
|
110
|
-
|
|
135
|
+
columnGap: _constants.SPACING_SCALE['sp-400']
|
|
111
136
|
}),
|
|
112
137
|
'sp-500': (0, _react2.css)({
|
|
113
|
-
|
|
138
|
+
columnGap: _constants.SPACING_SCALE['sp-500']
|
|
114
139
|
}),
|
|
115
140
|
'sp-600': (0, _react2.css)({
|
|
116
|
-
|
|
141
|
+
columnGap: _constants.SPACING_SCALE['sp-600']
|
|
117
142
|
}),
|
|
118
143
|
'sp-800': (0, _react2.css)({
|
|
119
|
-
|
|
144
|
+
columnGap: _constants.SPACING_SCALE['sp-800']
|
|
120
145
|
})
|
|
121
146
|
};
|
|
122
147
|
/**
|
|
@@ -30,8 +30,9 @@ var baseStyles = (0, _react2.css)({
|
|
|
30
30
|
* ```js
|
|
31
31
|
* // a minimal icon button
|
|
32
32
|
* <Box as="button">
|
|
33
|
-
* <InteractionSurface
|
|
34
|
-
*
|
|
33
|
+
* <InteractionSurface>
|
|
34
|
+
* <WarningIcon label="icon button" />
|
|
35
|
+
* </InteractionSurface>
|
|
35
36
|
* </Box>
|
|
36
37
|
* ```
|
|
37
38
|
*/
|
|
@@ -1,17 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
8
|
exports.default = void 0;
|
|
7
9
|
|
|
10
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
+
|
|
8
12
|
var _react = require("react");
|
|
9
13
|
|
|
10
14
|
var _react2 = require("@emotion/react");
|
|
11
15
|
|
|
12
16
|
var _constants = require("../constants");
|
|
13
17
|
|
|
14
|
-
|
|
18
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
19
|
+
|
|
20
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
21
|
+
|
|
15
22
|
var flexAlignItemsMap = {
|
|
16
23
|
center: (0, _react2.css)({
|
|
17
24
|
alignItems: 'center'
|
|
@@ -24,6 +31,12 @@ var flexAlignItemsMap = {
|
|
|
24
31
|
}),
|
|
25
32
|
flexEnd: (0, _react2.css)({
|
|
26
33
|
alignItems: 'flex-end'
|
|
34
|
+
}),
|
|
35
|
+
start: (0, _react2.css)({
|
|
36
|
+
alignItems: 'start'
|
|
37
|
+
}),
|
|
38
|
+
end: (0, _react2.css)({
|
|
39
|
+
alignItems: 'end'
|
|
27
40
|
})
|
|
28
41
|
};
|
|
29
42
|
var flexJustifyContentMap = {
|
|
@@ -35,6 +48,17 @@ var flexJustifyContentMap = {
|
|
|
35
48
|
}),
|
|
36
49
|
flexEnd: (0, _react2.css)({
|
|
37
50
|
justifyContent: 'flex-end'
|
|
51
|
+
}),
|
|
52
|
+
start: (0, _react2.css)({
|
|
53
|
+
justifyContent: 'start'
|
|
54
|
+
}),
|
|
55
|
+
end: (0, _react2.css)({
|
|
56
|
+
justifyContent: 'end'
|
|
57
|
+
})
|
|
58
|
+
};
|
|
59
|
+
var flexWrapMap = {
|
|
60
|
+
wrap: (0, _react2.css)({
|
|
61
|
+
flexWrap: 'wrap'
|
|
38
62
|
})
|
|
39
63
|
};
|
|
40
64
|
var baseStyles = (0, _react2.css)({
|
|
@@ -54,10 +78,13 @@ var Stack = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
54
78
|
var gap = _ref.gap,
|
|
55
79
|
alignItems = _ref.alignItems,
|
|
56
80
|
justifyContent = _ref.justifyContent,
|
|
81
|
+
flexWrap = _ref.flexWrap,
|
|
57
82
|
children = _ref.children,
|
|
83
|
+
UNSAFE_style = _ref.UNSAFE_style,
|
|
58
84
|
testId = _ref.testId;
|
|
59
85
|
return (0, _react2.jsx)("div", {
|
|
60
|
-
|
|
86
|
+
style: _objectSpread({}, UNSAFE_style),
|
|
87
|
+
css: [baseStyles, gap && rowGapMap[gap], alignItems && flexAlignItemsMap[alignItems], justifyContent && flexJustifyContentMap[justifyContent], flexWrap && flexWrapMap[flexWrap]],
|
|
61
88
|
"data-testid": testId,
|
|
62
89
|
ref: ref
|
|
63
90
|
}, children);
|
|
@@ -66,49 +93,49 @@ Stack.displayName = 'Stack';
|
|
|
66
93
|
var _default = Stack;
|
|
67
94
|
/**
|
|
68
95
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
69
|
-
* @codegen <<SignedSource::
|
|
96
|
+
* @codegen <<SignedSource::13c9344cdb18845e176c0ca78b2972d3>>
|
|
70
97
|
* @codegenId spacing
|
|
71
98
|
* @codegenCommand yarn codegen-styles
|
|
72
|
-
* @codegenParams ["
|
|
99
|
+
* @codegenParams ["rowGap"]
|
|
73
100
|
*/
|
|
74
101
|
|
|
75
102
|
exports.default = _default;
|
|
76
|
-
var
|
|
103
|
+
var rowGapMap = {
|
|
77
104
|
'sp-0': (0, _react2.css)({
|
|
78
|
-
|
|
105
|
+
rowGap: _constants.SPACING_SCALE['sp-0']
|
|
79
106
|
}),
|
|
80
107
|
'sp-25': (0, _react2.css)({
|
|
81
|
-
|
|
108
|
+
rowGap: _constants.SPACING_SCALE['sp-25']
|
|
82
109
|
}),
|
|
83
110
|
'sp-50': (0, _react2.css)({
|
|
84
|
-
|
|
111
|
+
rowGap: _constants.SPACING_SCALE['sp-50']
|
|
85
112
|
}),
|
|
86
113
|
'sp-75': (0, _react2.css)({
|
|
87
|
-
|
|
114
|
+
rowGap: _constants.SPACING_SCALE['sp-75']
|
|
88
115
|
}),
|
|
89
116
|
'sp-100': (0, _react2.css)({
|
|
90
|
-
|
|
117
|
+
rowGap: _constants.SPACING_SCALE['sp-100']
|
|
91
118
|
}),
|
|
92
119
|
'sp-150': (0, _react2.css)({
|
|
93
|
-
|
|
120
|
+
rowGap: _constants.SPACING_SCALE['sp-150']
|
|
94
121
|
}),
|
|
95
122
|
'sp-200': (0, _react2.css)({
|
|
96
|
-
|
|
123
|
+
rowGap: _constants.SPACING_SCALE['sp-200']
|
|
97
124
|
}),
|
|
98
125
|
'sp-300': (0, _react2.css)({
|
|
99
|
-
|
|
126
|
+
rowGap: _constants.SPACING_SCALE['sp-300']
|
|
100
127
|
}),
|
|
101
128
|
'sp-400': (0, _react2.css)({
|
|
102
|
-
|
|
129
|
+
rowGap: _constants.SPACING_SCALE['sp-400']
|
|
103
130
|
}),
|
|
104
131
|
'sp-500': (0, _react2.css)({
|
|
105
|
-
|
|
132
|
+
rowGap: _constants.SPACING_SCALE['sp-500']
|
|
106
133
|
}),
|
|
107
134
|
'sp-600': (0, _react2.css)({
|
|
108
|
-
|
|
135
|
+
rowGap: _constants.SPACING_SCALE['sp-600']
|
|
109
136
|
}),
|
|
110
137
|
'sp-800': (0, _react2.css)({
|
|
111
|
-
|
|
138
|
+
rowGap: _constants.SPACING_SCALE['sp-800']
|
|
112
139
|
})
|
|
113
140
|
};
|
|
114
141
|
/**
|
package/dist/cjs/version.json
CHANGED
|
@@ -32,6 +32,7 @@ const Box = /*#__PURE__*/forwardRef(({
|
|
|
32
32
|
paddingInline,
|
|
33
33
|
position = 'relative',
|
|
34
34
|
height,
|
|
35
|
+
overflow,
|
|
35
36
|
width,
|
|
36
37
|
UNSAFE_style,
|
|
37
38
|
testId,
|
|
@@ -154,6 +155,11 @@ const baseStyles = css({
|
|
|
154
155
|
appearance: 'none',
|
|
155
156
|
border: 'none'
|
|
156
157
|
});
|
|
158
|
+
const overflowMap = {
|
|
159
|
+
auto: css({
|
|
160
|
+
overflow: 'auto'
|
|
161
|
+
})
|
|
162
|
+
};
|
|
157
163
|
const positionMap = {
|
|
158
164
|
absolute: css({
|
|
159
165
|
position: 'absolute'
|
|
@@ -15,6 +15,12 @@ const flexAlignItemsMap = {
|
|
|
15
15
|
}),
|
|
16
16
|
flexEnd: css({
|
|
17
17
|
alignItems: 'flex-end'
|
|
18
|
+
}),
|
|
19
|
+
start: css({
|
|
20
|
+
alignItems: 'start'
|
|
21
|
+
}),
|
|
22
|
+
end: css({
|
|
23
|
+
alignItems: 'end'
|
|
18
24
|
})
|
|
19
25
|
};
|
|
20
26
|
const flexJustifyContentMap = {
|
|
@@ -26,6 +32,17 @@ const flexJustifyContentMap = {
|
|
|
26
32
|
}),
|
|
27
33
|
flexEnd: css({
|
|
28
34
|
justifyContent: 'flex-end'
|
|
35
|
+
}),
|
|
36
|
+
start: css({
|
|
37
|
+
justifyContent: 'start'
|
|
38
|
+
}),
|
|
39
|
+
end: css({
|
|
40
|
+
justifyContent: 'end'
|
|
41
|
+
})
|
|
42
|
+
};
|
|
43
|
+
const flexWrapMap = {
|
|
44
|
+
wrap: css({
|
|
45
|
+
flexWrap: 'wrap'
|
|
29
46
|
})
|
|
30
47
|
};
|
|
31
48
|
const baseStyles = css({
|
|
@@ -45,13 +62,17 @@ const Inline = /*#__PURE__*/forwardRef(({
|
|
|
45
62
|
gap,
|
|
46
63
|
alignItems,
|
|
47
64
|
justifyContent,
|
|
65
|
+
flexWrap,
|
|
48
66
|
divider,
|
|
67
|
+
UNSAFE_style,
|
|
49
68
|
children,
|
|
50
69
|
testId
|
|
51
70
|
}, ref) => {
|
|
52
71
|
const dividerComponent = typeof divider === 'string' ? jsx(Text, null, divider) : divider;
|
|
53
72
|
return jsx("div", {
|
|
54
|
-
|
|
73
|
+
style: { ...UNSAFE_style
|
|
74
|
+
},
|
|
75
|
+
css: [baseStyles, gap && columnGapMap[gap], alignItems && flexAlignItemsMap[alignItems], justifyContent && flexJustifyContentMap[justifyContent], flexWrap && flexWrapMap[flexWrap]],
|
|
55
76
|
"data-testid": testId,
|
|
56
77
|
ref: ref
|
|
57
78
|
}, Children.map(children, (child, index) => {
|
|
@@ -62,48 +83,48 @@ Inline.displayName = 'Inline';
|
|
|
62
83
|
export default Inline;
|
|
63
84
|
/**
|
|
64
85
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
65
|
-
* @codegen <<SignedSource::
|
|
86
|
+
* @codegen <<SignedSource::7a985afa5e15ffd4f6f9c0db0e99ceb6>>
|
|
66
87
|
* @codegenId spacing
|
|
67
88
|
* @codegenCommand yarn codegen-styles
|
|
68
|
-
* @codegenParams ["
|
|
89
|
+
* @codegenParams ["columnGap"]
|
|
69
90
|
*/
|
|
70
91
|
|
|
71
|
-
const
|
|
92
|
+
const columnGapMap = {
|
|
72
93
|
'sp-0': css({
|
|
73
|
-
|
|
94
|
+
columnGap: SPACING_SCALE['sp-0']
|
|
74
95
|
}),
|
|
75
96
|
'sp-25': css({
|
|
76
|
-
|
|
97
|
+
columnGap: SPACING_SCALE['sp-25']
|
|
77
98
|
}),
|
|
78
99
|
'sp-50': css({
|
|
79
|
-
|
|
100
|
+
columnGap: SPACING_SCALE['sp-50']
|
|
80
101
|
}),
|
|
81
102
|
'sp-75': css({
|
|
82
|
-
|
|
103
|
+
columnGap: SPACING_SCALE['sp-75']
|
|
83
104
|
}),
|
|
84
105
|
'sp-100': css({
|
|
85
|
-
|
|
106
|
+
columnGap: SPACING_SCALE['sp-100']
|
|
86
107
|
}),
|
|
87
108
|
'sp-150': css({
|
|
88
|
-
|
|
109
|
+
columnGap: SPACING_SCALE['sp-150']
|
|
89
110
|
}),
|
|
90
111
|
'sp-200': css({
|
|
91
|
-
|
|
112
|
+
columnGap: SPACING_SCALE['sp-200']
|
|
92
113
|
}),
|
|
93
114
|
'sp-300': css({
|
|
94
|
-
|
|
115
|
+
columnGap: SPACING_SCALE['sp-300']
|
|
95
116
|
}),
|
|
96
117
|
'sp-400': css({
|
|
97
|
-
|
|
118
|
+
columnGap: SPACING_SCALE['sp-400']
|
|
98
119
|
}),
|
|
99
120
|
'sp-500': css({
|
|
100
|
-
|
|
121
|
+
columnGap: SPACING_SCALE['sp-500']
|
|
101
122
|
}),
|
|
102
123
|
'sp-600': css({
|
|
103
|
-
|
|
124
|
+
columnGap: SPACING_SCALE['sp-600']
|
|
104
125
|
}),
|
|
105
126
|
'sp-800': css({
|
|
106
|
-
|
|
127
|
+
columnGap: SPACING_SCALE['sp-800']
|
|
107
128
|
})
|
|
108
129
|
};
|
|
109
130
|
/**
|
|
@@ -20,8 +20,9 @@ const baseStyles = css({
|
|
|
20
20
|
* ```js
|
|
21
21
|
* // a minimal icon button
|
|
22
22
|
* <Box as="button">
|
|
23
|
-
* <InteractionSurface
|
|
24
|
-
*
|
|
23
|
+
* <InteractionSurface>
|
|
24
|
+
* <WarningIcon label="icon button" />
|
|
25
|
+
* </InteractionSurface>
|
|
25
26
|
* </Box>
|
|
26
27
|
* ```
|
|
27
28
|
*/
|
|
@@ -14,6 +14,12 @@ const flexAlignItemsMap = {
|
|
|
14
14
|
}),
|
|
15
15
|
flexEnd: css({
|
|
16
16
|
alignItems: 'flex-end'
|
|
17
|
+
}),
|
|
18
|
+
start: css({
|
|
19
|
+
alignItems: 'start'
|
|
20
|
+
}),
|
|
21
|
+
end: css({
|
|
22
|
+
alignItems: 'end'
|
|
17
23
|
})
|
|
18
24
|
};
|
|
19
25
|
const flexJustifyContentMap = {
|
|
@@ -25,6 +31,17 @@ const flexJustifyContentMap = {
|
|
|
25
31
|
}),
|
|
26
32
|
flexEnd: css({
|
|
27
33
|
justifyContent: 'flex-end'
|
|
34
|
+
}),
|
|
35
|
+
start: css({
|
|
36
|
+
justifyContent: 'start'
|
|
37
|
+
}),
|
|
38
|
+
end: css({
|
|
39
|
+
justifyContent: 'end'
|
|
40
|
+
})
|
|
41
|
+
};
|
|
42
|
+
const flexWrapMap = {
|
|
43
|
+
wrap: css({
|
|
44
|
+
flexWrap: 'wrap'
|
|
28
45
|
})
|
|
29
46
|
};
|
|
30
47
|
const baseStyles = css({
|
|
@@ -44,11 +61,15 @@ const Stack = /*#__PURE__*/forwardRef(({
|
|
|
44
61
|
gap,
|
|
45
62
|
alignItems,
|
|
46
63
|
justifyContent,
|
|
64
|
+
flexWrap,
|
|
47
65
|
children,
|
|
66
|
+
UNSAFE_style,
|
|
48
67
|
testId
|
|
49
68
|
}, ref) => {
|
|
50
69
|
return jsx("div", {
|
|
51
|
-
|
|
70
|
+
style: { ...UNSAFE_style
|
|
71
|
+
},
|
|
72
|
+
css: [baseStyles, gap && rowGapMap[gap], alignItems && flexAlignItemsMap[alignItems], justifyContent && flexJustifyContentMap[justifyContent], flexWrap && flexWrapMap[flexWrap]],
|
|
52
73
|
"data-testid": testId,
|
|
53
74
|
ref: ref
|
|
54
75
|
}, children);
|
|
@@ -57,48 +78,48 @@ Stack.displayName = 'Stack';
|
|
|
57
78
|
export default Stack;
|
|
58
79
|
/**
|
|
59
80
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
60
|
-
* @codegen <<SignedSource::
|
|
81
|
+
* @codegen <<SignedSource::13c9344cdb18845e176c0ca78b2972d3>>
|
|
61
82
|
* @codegenId spacing
|
|
62
83
|
* @codegenCommand yarn codegen-styles
|
|
63
|
-
* @codegenParams ["
|
|
84
|
+
* @codegenParams ["rowGap"]
|
|
64
85
|
*/
|
|
65
86
|
|
|
66
|
-
const
|
|
87
|
+
const rowGapMap = {
|
|
67
88
|
'sp-0': css({
|
|
68
|
-
|
|
89
|
+
rowGap: SPACING_SCALE['sp-0']
|
|
69
90
|
}),
|
|
70
91
|
'sp-25': css({
|
|
71
|
-
|
|
92
|
+
rowGap: SPACING_SCALE['sp-25']
|
|
72
93
|
}),
|
|
73
94
|
'sp-50': css({
|
|
74
|
-
|
|
95
|
+
rowGap: SPACING_SCALE['sp-50']
|
|
75
96
|
}),
|
|
76
97
|
'sp-75': css({
|
|
77
|
-
|
|
98
|
+
rowGap: SPACING_SCALE['sp-75']
|
|
78
99
|
}),
|
|
79
100
|
'sp-100': css({
|
|
80
|
-
|
|
101
|
+
rowGap: SPACING_SCALE['sp-100']
|
|
81
102
|
}),
|
|
82
103
|
'sp-150': css({
|
|
83
|
-
|
|
104
|
+
rowGap: SPACING_SCALE['sp-150']
|
|
84
105
|
}),
|
|
85
106
|
'sp-200': css({
|
|
86
|
-
|
|
107
|
+
rowGap: SPACING_SCALE['sp-200']
|
|
87
108
|
}),
|
|
88
109
|
'sp-300': css({
|
|
89
|
-
|
|
110
|
+
rowGap: SPACING_SCALE['sp-300']
|
|
90
111
|
}),
|
|
91
112
|
'sp-400': css({
|
|
92
|
-
|
|
113
|
+
rowGap: SPACING_SCALE['sp-400']
|
|
93
114
|
}),
|
|
94
115
|
'sp-500': css({
|
|
95
|
-
|
|
116
|
+
rowGap: SPACING_SCALE['sp-500']
|
|
96
117
|
}),
|
|
97
118
|
'sp-600': css({
|
|
98
|
-
|
|
119
|
+
rowGap: SPACING_SCALE['sp-600']
|
|
99
120
|
}),
|
|
100
121
|
'sp-800': css({
|
|
101
|
-
|
|
122
|
+
rowGap: SPACING_SCALE['sp-800']
|
|
102
123
|
})
|
|
103
124
|
};
|
|
104
125
|
/**
|
package/dist/es2019/version.json
CHANGED
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
5
|
-
var _excluded = ["children", "as", "className", "display", "flexDirection", "alignItems", "justifyContent", "backgroundColor", "borderColor", "borderStyle", "borderWidth", "borderRadius", "padding", "paddingBlock", "paddingInline", "position", "height", "width", "UNSAFE_style", "testId"];
|
|
5
|
+
var _excluded = ["children", "as", "className", "display", "flexDirection", "alignItems", "justifyContent", "backgroundColor", "borderColor", "borderStyle", "borderWidth", "borderRadius", "padding", "paddingBlock", "paddingInline", "position", "height", "overflow", "width", "UNSAFE_style", "testId"];
|
|
6
6
|
|
|
7
7
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
8
8
|
|
|
@@ -43,6 +43,7 @@ var Box = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
43
43
|
_ref$position = _ref.position,
|
|
44
44
|
position = _ref$position === void 0 ? 'relative' : _ref$position,
|
|
45
45
|
height = _ref.height,
|
|
46
|
+
overflow = _ref.overflow,
|
|
46
47
|
width = _ref.width,
|
|
47
48
|
UNSAFE_style = _ref.UNSAFE_style,
|
|
48
49
|
testId = _ref.testId,
|
|
@@ -170,6 +171,11 @@ var baseStyles = css({
|
|
|
170
171
|
appearance: 'none',
|
|
171
172
|
border: 'none'
|
|
172
173
|
});
|
|
174
|
+
var overflowMap = {
|
|
175
|
+
auto: css({
|
|
176
|
+
overflow: 'auto'
|
|
177
|
+
})
|
|
178
|
+
};
|
|
173
179
|
var positionMap = {
|
|
174
180
|
absolute: css({
|
|
175
181
|
position: 'absolute'
|