@atlaskit/ds-explorations 2.2.14 → 2.3.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 +15 -0
- package/dist/cjs/components/text.partial.js +8 -5
- package/dist/cjs/index.js +0 -21
- package/dist/es2019/components/text.partial.js +8 -5
- package/dist/es2019/index.js +0 -3
- package/dist/esm/components/text.partial.js +8 -5
- package/dist/esm/index.js +0 -3
- package/dist/types/components/surface-provider.d.ts +2 -2
- package/dist/types/components/text.partial.d.ts +4 -3
- package/dist/types/index.d.ts +0 -6
- package/dist/types-ts4.5/components/surface-provider.d.ts +2 -2
- package/dist/types-ts4.5/components/text.partial.d.ts +4 -3
- package/dist/types-ts4.5/index.d.ts +0 -6
- package/docs/01-basic.tsx +3 -2
- package/examples/02-text-advanced.tsx +11 -20
- package/examples/02-text.tsx +15 -10
- package/examples/05-badge.tsx +9 -5
- package/examples/06-section-message.tsx +2 -4
- package/examples/07-comment.tsx +1 -3
- package/examples/08-lozenge.tsx +8 -4
- package/examples/99-interactions.tsx +49 -33
- package/package.json +4 -6
- package/report.api.md +0 -465
- package/scripts/codegen-styles.tsx +16 -89
- package/src/components/__tests__/unit/interaction-suface.test.tsx +2 -2
- package/src/components/surface-provider.tsx +1 -1
- package/src/components/text.partial.tsx +14 -8
- package/src/index.tsx +0 -6
- package/tmp/api-report-tmp.d.ts +0 -451
- package/tsconfig.app.json +3 -0
- package/tsconfig.dev.json +0 -6
- package/box/package.json +0 -15
- package/dist/cjs/components/box.partial.js +0 -622
- package/dist/cjs/components/inline.partial.js +0 -183
- package/dist/cjs/components/stack.partial.js +0 -149
- package/dist/es2019/components/box.partial.js +0 -614
- package/dist/es2019/components/inline.partial.js +0 -177
- package/dist/es2019/components/stack.partial.js +0 -144
- package/dist/esm/components/box.partial.js +0 -617
- package/dist/esm/components/inline.partial.js +0 -177
- package/dist/esm/components/stack.partial.js +0 -143
- package/dist/types/components/box.partial.d.ts +0 -357
- package/dist/types/components/inline.partial.d.ts +0 -108
- package/dist/types/components/stack.partial.d.ts +0 -92
- package/dist/types-ts4.5/components/box.partial.d.ts +0 -357
- package/dist/types-ts4.5/components/inline.partial.d.ts +0 -108
- package/dist/types-ts4.5/components/stack.partial.d.ts +0 -92
- package/examples/00-basic.tsx +0 -22
- package/examples/01-box.tsx +0 -171
- package/examples/03-stack.tsx +0 -99
- package/examples/04-inline.tsx +0 -99
- package/inline/package.json +0 -15
- package/src/components/__tests__/unit/box.test.tsx +0 -55
- package/src/components/__tests__/unit/inline.test.tsx +0 -43
- package/src/components/__tests__/unit/stack.test.tsx +0 -31
- package/src/components/__tests__/visual-regression/__image_snapshots__/inline-snapshot-test-tsx-inline-alignment-example-should-match-snapshot-1-snap.png +0 -3
- package/src/components/__tests__/visual-regression/__image_snapshots__/inline-snapshot-test-tsx-inline-spacing-example-should-match-snapshot-1-snap.png +0 -3
- package/src/components/__tests__/visual-regression/__image_snapshots__/stack-snapshot-test-tsx-stack-alignment-example-should-match-snapshot-1-snap.png +0 -3
- package/src/components/__tests__/visual-regression/__image_snapshots__/stack-snapshot-test-tsx-stack-spacing-example-should-match-snapshot-1-snap.png +0 -3
- package/src/components/__tests__/visual-regression/inline-snapshot-test.tsx +0 -28
- package/src/components/__tests__/visual-regression/stack-snapshot-test.tsx +0 -28
- package/src/components/__tests__/vr-tests/__snapshots__/box--default.png +0 -0
- package/src/components/__tests__/vr-tests/box-snapshot-test.vr.tsx +0 -6
- package/src/components/box.partial.tsx +0 -706
- package/src/components/inline.partial.tsx +0 -218
- package/src/components/stack.partial.tsx +0 -174
- package/stack/package.json +0 -15
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var _react2 = require("@emotion/react");
|
|
9
|
-
/** @jsx jsx */
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* @private
|
|
13
|
-
* @deprecated DSP-8009: This type is scheduled for deletion.
|
|
14
|
-
* Please use `Inline` from `@atlaskit/primitives` instead.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
var flexAlignItemsMap = {
|
|
18
|
-
center: (0, _react2.css)({
|
|
19
|
-
alignItems: 'center'
|
|
20
|
-
}),
|
|
21
|
-
baseline: (0, _react2.css)({
|
|
22
|
-
alignItems: 'baseline'
|
|
23
|
-
}),
|
|
24
|
-
flexStart: (0, _react2.css)({
|
|
25
|
-
alignItems: 'flex-start'
|
|
26
|
-
}),
|
|
27
|
-
flexEnd: (0, _react2.css)({
|
|
28
|
-
alignItems: 'flex-end'
|
|
29
|
-
}),
|
|
30
|
-
start: (0, _react2.css)({
|
|
31
|
-
alignItems: 'start'
|
|
32
|
-
}),
|
|
33
|
-
end: (0, _react2.css)({
|
|
34
|
-
alignItems: 'end'
|
|
35
|
-
})
|
|
36
|
-
};
|
|
37
|
-
var flexJustifyContentMap = {
|
|
38
|
-
center: (0, _react2.css)({
|
|
39
|
-
justifyContent: 'center'
|
|
40
|
-
}),
|
|
41
|
-
flexStart: (0, _react2.css)({
|
|
42
|
-
justifyContent: 'flex-start'
|
|
43
|
-
}),
|
|
44
|
-
'space-between': (0, _react2.css)({
|
|
45
|
-
justifyContent: 'space-between'
|
|
46
|
-
}),
|
|
47
|
-
flexEnd: (0, _react2.css)({
|
|
48
|
-
justifyContent: 'flex-end'
|
|
49
|
-
}),
|
|
50
|
-
start: (0, _react2.css)({
|
|
51
|
-
justifyContent: 'start'
|
|
52
|
-
}),
|
|
53
|
-
end: (0, _react2.css)({
|
|
54
|
-
justifyContent: 'end'
|
|
55
|
-
}),
|
|
56
|
-
spaceBetween: (0, _react2.css)({
|
|
57
|
-
justifyContent: 'space-between'
|
|
58
|
-
})
|
|
59
|
-
};
|
|
60
|
-
var flexWrapMap = {
|
|
61
|
-
wrap: (0, _react2.css)({
|
|
62
|
-
flexWrap: 'wrap'
|
|
63
|
-
})
|
|
64
|
-
};
|
|
65
|
-
var baseStyles = (0, _react2.css)({
|
|
66
|
-
display: 'flex',
|
|
67
|
-
boxSizing: 'border-box',
|
|
68
|
-
flexDirection: 'row'
|
|
69
|
-
});
|
|
70
|
-
var dividerStyles = (0, _react2.css)({
|
|
71
|
-
margin: "0 ".concat("var(--ds-space-negative-025, -2px)"),
|
|
72
|
-
color: "var(--ds-text-subtle, #42526E)",
|
|
73
|
-
pointerEvents: 'none',
|
|
74
|
-
userSelect: 'none'
|
|
75
|
-
});
|
|
76
|
-
var Divider = function Divider(_ref) {
|
|
77
|
-
var children = _ref.children;
|
|
78
|
-
return (0, _react2.jsx)("span", {
|
|
79
|
-
css: dividerStyles
|
|
80
|
-
}, children);
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* __Inline__
|
|
85
|
-
*
|
|
86
|
-
* Inline is a primitive component based on flexbox that manages the horizontal layout of direct children.
|
|
87
|
-
* Renders a `div` by default.
|
|
88
|
-
*
|
|
89
|
-
* @private
|
|
90
|
-
* @deprecated DSP-8009: This primitive is scheduled for deletion.
|
|
91
|
-
* Please use `Inline` from `@atlaskit/primitives` instead.
|
|
92
|
-
*
|
|
93
|
-
* @example
|
|
94
|
-
* ```tsx
|
|
95
|
-
* const App = () => (
|
|
96
|
-
* <Inline gap="space.100">
|
|
97
|
-
* <Button />
|
|
98
|
-
* <Button />
|
|
99
|
-
* </Inline>
|
|
100
|
-
* )
|
|
101
|
-
* ```
|
|
102
|
-
*/
|
|
103
|
-
var Inline = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
|
|
104
|
-
var gap = _ref2.gap,
|
|
105
|
-
alignItems = _ref2.alignItems,
|
|
106
|
-
justifyContent = _ref2.justifyContent,
|
|
107
|
-
flexWrap = _ref2.flexWrap,
|
|
108
|
-
divider = _ref2.divider,
|
|
109
|
-
UNSAFE_style = _ref2.UNSAFE_style,
|
|
110
|
-
rawChildren = _ref2.children,
|
|
111
|
-
testId = _ref2.testId;
|
|
112
|
-
var dividerComponent = typeof divider === 'string' ? (0, _react2.jsx)(Divider, null, divider) : divider;
|
|
113
|
-
var children = divider ? _react.Children.toArray(rawChildren).filter(Boolean).map(function (child, index) {
|
|
114
|
-
return (0, _react2.jsx)(_react.Fragment, {
|
|
115
|
-
key: index
|
|
116
|
-
}, divider && index > 0 ? dividerComponent : null, child);
|
|
117
|
-
}) : rawChildren;
|
|
118
|
-
return (0, _react2.jsx)("div", {
|
|
119
|
-
style: UNSAFE_style,
|
|
120
|
-
css: [baseStyles, gap && columnGapMap[gap], alignItems && flexAlignItemsMap[alignItems], justifyContent && flexJustifyContentMap[justifyContent], flexWrap && flexWrapMap[flexWrap]],
|
|
121
|
-
"data-testid": testId,
|
|
122
|
-
ref: ref
|
|
123
|
-
}, children);
|
|
124
|
-
}));
|
|
125
|
-
Inline.displayName = 'Inline';
|
|
126
|
-
var _default = Inline;
|
|
127
|
-
/**
|
|
128
|
-
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
129
|
-
* @codegen <<SignedSource::63747c8b92ba373ad2259fa1fff3f434>>
|
|
130
|
-
* @codegenId spacing
|
|
131
|
-
* @codegenCommand yarn codegen-styles
|
|
132
|
-
* @codegenParams ["columnGap"]
|
|
133
|
-
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-spacing.tsx <<SignedSource::298080e8024fb3eb37589721413e0156>>
|
|
134
|
-
*/
|
|
135
|
-
exports.default = _default;
|
|
136
|
-
var columnGapMap = {
|
|
137
|
-
'space.0': (0, _react2.css)({
|
|
138
|
-
columnGap: "var(--ds-space-0, 0px)"
|
|
139
|
-
}),
|
|
140
|
-
'space.025': (0, _react2.css)({
|
|
141
|
-
columnGap: "var(--ds-space-025, 2px)"
|
|
142
|
-
}),
|
|
143
|
-
'space.050': (0, _react2.css)({
|
|
144
|
-
columnGap: "var(--ds-space-050, 4px)"
|
|
145
|
-
}),
|
|
146
|
-
'space.075': (0, _react2.css)({
|
|
147
|
-
columnGap: "var(--ds-space-075, 6px)"
|
|
148
|
-
}),
|
|
149
|
-
'space.100': (0, _react2.css)({
|
|
150
|
-
columnGap: "var(--ds-space-100, 8px)"
|
|
151
|
-
}),
|
|
152
|
-
'space.1000': (0, _react2.css)({
|
|
153
|
-
columnGap: "var(--ds-space-1000, 80px)"
|
|
154
|
-
}),
|
|
155
|
-
'space.150': (0, _react2.css)({
|
|
156
|
-
columnGap: "var(--ds-space-150, 12px)"
|
|
157
|
-
}),
|
|
158
|
-
'space.200': (0, _react2.css)({
|
|
159
|
-
columnGap: "var(--ds-space-200, 16px)"
|
|
160
|
-
}),
|
|
161
|
-
'space.250': (0, _react2.css)({
|
|
162
|
-
columnGap: "var(--ds-space-250, 20px)"
|
|
163
|
-
}),
|
|
164
|
-
'space.300': (0, _react2.css)({
|
|
165
|
-
columnGap: "var(--ds-space-300, 24px)"
|
|
166
|
-
}),
|
|
167
|
-
'space.400': (0, _react2.css)({
|
|
168
|
-
columnGap: "var(--ds-space-400, 32px)"
|
|
169
|
-
}),
|
|
170
|
-
'space.500': (0, _react2.css)({
|
|
171
|
-
columnGap: "var(--ds-space-500, 40px)"
|
|
172
|
-
}),
|
|
173
|
-
'space.600': (0, _react2.css)({
|
|
174
|
-
columnGap: "var(--ds-space-600, 48px)"
|
|
175
|
-
}),
|
|
176
|
-
'space.800': (0, _react2.css)({
|
|
177
|
-
columnGap: "var(--ds-space-800, 64px)"
|
|
178
|
-
})
|
|
179
|
-
};
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
* @codegenEnd
|
|
183
|
-
*/
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var _react2 = require("@emotion/react");
|
|
9
|
-
/** @jsx jsx */
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* @private
|
|
13
|
-
* @deprecated DSP-8009: This type is scheduled for deletion.
|
|
14
|
-
* Please use `Stack` from `@atlaskit/primitives` instead.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
var flexAlignItemsMap = {
|
|
18
|
-
center: (0, _react2.css)({
|
|
19
|
-
alignItems: 'center'
|
|
20
|
-
}),
|
|
21
|
-
baseline: (0, _react2.css)({
|
|
22
|
-
alignItems: 'baseline'
|
|
23
|
-
}),
|
|
24
|
-
flexStart: (0, _react2.css)({
|
|
25
|
-
alignItems: 'flex-start'
|
|
26
|
-
}),
|
|
27
|
-
flexEnd: (0, _react2.css)({
|
|
28
|
-
alignItems: 'flex-end'
|
|
29
|
-
}),
|
|
30
|
-
start: (0, _react2.css)({
|
|
31
|
-
alignItems: 'start'
|
|
32
|
-
}),
|
|
33
|
-
end: (0, _react2.css)({
|
|
34
|
-
alignItems: 'end'
|
|
35
|
-
})
|
|
36
|
-
};
|
|
37
|
-
var flexJustifyContentMap = {
|
|
38
|
-
center: (0, _react2.css)({
|
|
39
|
-
justifyContent: 'center'
|
|
40
|
-
}),
|
|
41
|
-
flexStart: (0, _react2.css)({
|
|
42
|
-
justifyContent: 'flex-start'
|
|
43
|
-
}),
|
|
44
|
-
flexEnd: (0, _react2.css)({
|
|
45
|
-
justifyContent: 'flex-end'
|
|
46
|
-
}),
|
|
47
|
-
start: (0, _react2.css)({
|
|
48
|
-
justifyContent: 'start'
|
|
49
|
-
}),
|
|
50
|
-
end: (0, _react2.css)({
|
|
51
|
-
justifyContent: 'end'
|
|
52
|
-
})
|
|
53
|
-
};
|
|
54
|
-
var flexWrapMap = {
|
|
55
|
-
wrap: (0, _react2.css)({
|
|
56
|
-
flexWrap: 'wrap'
|
|
57
|
-
})
|
|
58
|
-
};
|
|
59
|
-
var baseStyles = (0, _react2.css)({
|
|
60
|
-
display: 'flex',
|
|
61
|
-
boxSizing: 'border-box',
|
|
62
|
-
flexDirection: 'column'
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* __Stack__
|
|
67
|
-
*
|
|
68
|
-
* Stack is a primitive component based on flexbox that manages the vertical layout of direct children.
|
|
69
|
-
* Renders a `div` by default.
|
|
70
|
-
*
|
|
71
|
-
* @private
|
|
72
|
-
* @deprecated DSP-8009: This primitive is scheduled for deletion.
|
|
73
|
-
* Please use `Stack` from `@atlaskit/primitives` instead.
|
|
74
|
-
*
|
|
75
|
-
*/
|
|
76
|
-
var Stack = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
77
|
-
var gap = _ref.gap,
|
|
78
|
-
alignItems = _ref.alignItems,
|
|
79
|
-
justifyContent = _ref.justifyContent,
|
|
80
|
-
flexWrap = _ref.flexWrap,
|
|
81
|
-
children = _ref.children,
|
|
82
|
-
UNSAFE_style = _ref.UNSAFE_style,
|
|
83
|
-
testId = _ref.testId;
|
|
84
|
-
return (0, _react2.jsx)("div", {
|
|
85
|
-
style: UNSAFE_style,
|
|
86
|
-
css: [baseStyles, gap && rowGapMap[gap], alignItems && flexAlignItemsMap[alignItems], justifyContent && flexJustifyContentMap[justifyContent], flexWrap && flexWrapMap[flexWrap]],
|
|
87
|
-
"data-testid": testId,
|
|
88
|
-
ref: ref
|
|
89
|
-
}, children);
|
|
90
|
-
}));
|
|
91
|
-
Stack.displayName = 'Stack';
|
|
92
|
-
var _default = Stack;
|
|
93
|
-
/**
|
|
94
|
-
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
95
|
-
* @codegen <<SignedSource::02ffa7c4ee52871441d288f44a054685>>
|
|
96
|
-
* @codegenId spacing
|
|
97
|
-
* @codegenCommand yarn codegen-styles
|
|
98
|
-
* @codegenParams ["rowGap"]
|
|
99
|
-
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-spacing.tsx <<SignedSource::298080e8024fb3eb37589721413e0156>>
|
|
100
|
-
*/
|
|
101
|
-
exports.default = _default;
|
|
102
|
-
var rowGapMap = {
|
|
103
|
-
'space.0': (0, _react2.css)({
|
|
104
|
-
rowGap: "var(--ds-space-0, 0px)"
|
|
105
|
-
}),
|
|
106
|
-
'space.025': (0, _react2.css)({
|
|
107
|
-
rowGap: "var(--ds-space-025, 2px)"
|
|
108
|
-
}),
|
|
109
|
-
'space.050': (0, _react2.css)({
|
|
110
|
-
rowGap: "var(--ds-space-050, 4px)"
|
|
111
|
-
}),
|
|
112
|
-
'space.075': (0, _react2.css)({
|
|
113
|
-
rowGap: "var(--ds-space-075, 6px)"
|
|
114
|
-
}),
|
|
115
|
-
'space.100': (0, _react2.css)({
|
|
116
|
-
rowGap: "var(--ds-space-100, 8px)"
|
|
117
|
-
}),
|
|
118
|
-
'space.1000': (0, _react2.css)({
|
|
119
|
-
rowGap: "var(--ds-space-1000, 80px)"
|
|
120
|
-
}),
|
|
121
|
-
'space.150': (0, _react2.css)({
|
|
122
|
-
rowGap: "var(--ds-space-150, 12px)"
|
|
123
|
-
}),
|
|
124
|
-
'space.200': (0, _react2.css)({
|
|
125
|
-
rowGap: "var(--ds-space-200, 16px)"
|
|
126
|
-
}),
|
|
127
|
-
'space.250': (0, _react2.css)({
|
|
128
|
-
rowGap: "var(--ds-space-250, 20px)"
|
|
129
|
-
}),
|
|
130
|
-
'space.300': (0, _react2.css)({
|
|
131
|
-
rowGap: "var(--ds-space-300, 24px)"
|
|
132
|
-
}),
|
|
133
|
-
'space.400': (0, _react2.css)({
|
|
134
|
-
rowGap: "var(--ds-space-400, 32px)"
|
|
135
|
-
}),
|
|
136
|
-
'space.500': (0, _react2.css)({
|
|
137
|
-
rowGap: "var(--ds-space-500, 40px)"
|
|
138
|
-
}),
|
|
139
|
-
'space.600': (0, _react2.css)({
|
|
140
|
-
rowGap: "var(--ds-space-600, 48px)"
|
|
141
|
-
}),
|
|
142
|
-
'space.800': (0, _react2.css)({
|
|
143
|
-
rowGap: "var(--ds-space-800, 64px)"
|
|
144
|
-
})
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* @codegenEnd
|
|
149
|
-
*/
|