@atlaskit/ds-explorations 2.3.1 → 2.4.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 +70 -58
- package/box/package.json +15 -0
- package/dist/cjs/components/box.partial.js +620 -0
- package/dist/cjs/components/inline.partial.js +182 -0
- package/dist/cjs/components/interaction-surface.partial.js +1 -2
- package/dist/cjs/components/stack.partial.js +148 -0
- package/dist/cjs/components/surface-provider.js +2 -4
- package/dist/cjs/components/text.partial.js +5 -6
- package/dist/cjs/constants.js +2 -3
- package/dist/cjs/index.js +21 -0
- package/dist/cjs/internal/color-map.js +2 -3
- package/dist/cjs/internal/role-to-element.js +1 -2
- package/dist/cjs/internal/spacing-scale.js +1 -2
- package/dist/es2019/components/box.partial.js +614 -0
- package/dist/es2019/components/inline.partial.js +177 -0
- package/dist/es2019/components/stack.partial.js +144 -0
- package/dist/es2019/components/text.partial.js +4 -4
- package/dist/es2019/index.js +3 -0
- package/dist/esm/components/box.partial.js +617 -0
- package/dist/esm/components/inline.partial.js +177 -0
- package/dist/esm/components/stack.partial.js +143 -0
- package/dist/esm/components/text.partial.js +4 -4
- package/dist/esm/index.js +3 -0
- package/dist/types/components/box.partial.d.ts +357 -0
- package/dist/types/components/inline.partial.d.ts +108 -0
- package/dist/types/components/stack.partial.d.ts +92 -0
- package/dist/types/components/surface-provider.d.ts +2 -2
- package/dist/types/components/text.partial.d.ts +2 -2
- package/dist/types/index.d.ts +6 -0
- package/dist/types-ts4.5/components/box.partial.d.ts +357 -0
- package/dist/types-ts4.5/components/inline.partial.d.ts +108 -0
- package/dist/types-ts4.5/components/stack.partial.d.ts +92 -0
- package/dist/types-ts4.5/components/surface-provider.d.ts +2 -2
- package/dist/types-ts4.5/components/text.partial.d.ts +2 -2
- package/dist/types-ts4.5/index.d.ts +6 -0
- package/examples/00-basic.tsx +22 -0
- package/examples/01-box.tsx +171 -0
- package/examples/02-text-advanced.tsx +20 -11
- package/examples/02-text.tsx +10 -15
- package/examples/03-stack.tsx +99 -0
- package/examples/04-inline.tsx +99 -0
- package/examples/05-badge.tsx +5 -9
- package/examples/06-section-message.tsx +4 -2
- package/examples/07-comment.tsx +3 -1
- package/examples/08-lozenge.tsx +4 -8
- package/examples/99-interactions.tsx +33 -49
- package/inline/package.json +15 -0
- package/package.json +6 -4
- package/report.api.md +465 -0
- package/scripts/codegen-styles.tsx +89 -16
- package/src/components/__tests__/unit/box.test.tsx +55 -0
- package/src/components/__tests__/unit/inline.test.tsx +43 -0
- package/src/components/__tests__/unit/interaction-suface.test.tsx +2 -2
- package/src/components/__tests__/unit/stack.test.tsx +31 -0
- package/src/components/__tests__/visual-regression/__image_snapshots__/inline-snapshot-test-tsx-inline-alignment-example-should-match-snapshot-1-snap.png +3 -0
- package/src/components/__tests__/visual-regression/__image_snapshots__/inline-snapshot-test-tsx-inline-spacing-example-should-match-snapshot-1-snap.png +3 -0
- package/src/components/__tests__/visual-regression/__image_snapshots__/stack-snapshot-test-tsx-stack-alignment-example-should-match-snapshot-1-snap.png +3 -0
- package/src/components/__tests__/visual-regression/__image_snapshots__/stack-snapshot-test-tsx-stack-spacing-example-should-match-snapshot-1-snap.png +3 -0
- package/src/components/__tests__/visual-regression/inline-snapshot-test.tsx +28 -0
- package/src/components/__tests__/visual-regression/stack-snapshot-test.tsx +28 -0
- package/src/components/__tests__/vr-tests/__snapshots__/box--default.png +0 -0
- package/src/components/__tests__/vr-tests/box-snapshot-test.vr.tsx +6 -0
- package/src/components/box.partial.tsx +706 -0
- package/src/components/inline.partial.tsx +218 -0
- package/src/components/stack.partial.tsx +174 -0
- package/src/components/surface-provider.tsx +1 -1
- package/src/components/text.partial.tsx +4 -4
- package/src/index.tsx +6 -0
- package/stack/package.json +15 -0
- package/tmp/api-report-tmp.d.ts +451 -0
- package/tsconfig.app.json +0 -3
- package/tsconfig.dev.json +6 -0
|
@@ -0,0 +1,182 @@
|
|
|
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 = exports.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
|
+
var columnGapMap = {
|
|
136
|
+
'space.0': (0, _react2.css)({
|
|
137
|
+
columnGap: "var(--ds-space-0, 0px)"
|
|
138
|
+
}),
|
|
139
|
+
'space.025': (0, _react2.css)({
|
|
140
|
+
columnGap: "var(--ds-space-025, 2px)"
|
|
141
|
+
}),
|
|
142
|
+
'space.050': (0, _react2.css)({
|
|
143
|
+
columnGap: "var(--ds-space-050, 4px)"
|
|
144
|
+
}),
|
|
145
|
+
'space.075': (0, _react2.css)({
|
|
146
|
+
columnGap: "var(--ds-space-075, 6px)"
|
|
147
|
+
}),
|
|
148
|
+
'space.100': (0, _react2.css)({
|
|
149
|
+
columnGap: "var(--ds-space-100, 8px)"
|
|
150
|
+
}),
|
|
151
|
+
'space.1000': (0, _react2.css)({
|
|
152
|
+
columnGap: "var(--ds-space-1000, 80px)"
|
|
153
|
+
}),
|
|
154
|
+
'space.150': (0, _react2.css)({
|
|
155
|
+
columnGap: "var(--ds-space-150, 12px)"
|
|
156
|
+
}),
|
|
157
|
+
'space.200': (0, _react2.css)({
|
|
158
|
+
columnGap: "var(--ds-space-200, 16px)"
|
|
159
|
+
}),
|
|
160
|
+
'space.250': (0, _react2.css)({
|
|
161
|
+
columnGap: "var(--ds-space-250, 20px)"
|
|
162
|
+
}),
|
|
163
|
+
'space.300': (0, _react2.css)({
|
|
164
|
+
columnGap: "var(--ds-space-300, 24px)"
|
|
165
|
+
}),
|
|
166
|
+
'space.400': (0, _react2.css)({
|
|
167
|
+
columnGap: "var(--ds-space-400, 32px)"
|
|
168
|
+
}),
|
|
169
|
+
'space.500': (0, _react2.css)({
|
|
170
|
+
columnGap: "var(--ds-space-500, 40px)"
|
|
171
|
+
}),
|
|
172
|
+
'space.600': (0, _react2.css)({
|
|
173
|
+
columnGap: "var(--ds-space-600, 48px)"
|
|
174
|
+
}),
|
|
175
|
+
'space.800': (0, _react2.css)({
|
|
176
|
+
columnGap: "var(--ds-space-800, 64px)"
|
|
177
|
+
})
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* @codegenEnd
|
|
182
|
+
*/
|
|
@@ -50,7 +50,7 @@ var InteractionSurface = function InteractionSurface(_ref) {
|
|
|
50
50
|
css: [baseStyles, surface && backgroundHoverColorMap[surface], surface && backgroundActiveColorMap[surface]]
|
|
51
51
|
}), children);
|
|
52
52
|
};
|
|
53
|
-
var _default = InteractionSurface;
|
|
53
|
+
var _default = exports.default = InteractionSurface;
|
|
54
54
|
/**
|
|
55
55
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
56
56
|
* @codegen <<SignedSource::b4ea5e1af482e869a4e0a65e8080cfbf>>
|
|
@@ -59,7 +59,6 @@ var _default = InteractionSurface;
|
|
|
59
59
|
* @codegenParams ["background"]
|
|
60
60
|
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::f6a616f7ea03ec40c148fc83050d073b>>
|
|
61
61
|
*/
|
|
62
|
-
exports.default = _default;
|
|
63
62
|
var backgroundActiveColorMap = {
|
|
64
63
|
'accent.lime.subtlest': (0, _react2.css)({
|
|
65
64
|
':active': {
|
|
@@ -0,0 +1,148 @@
|
|
|
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 = exports.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
|
+
var rowGapMap = {
|
|
102
|
+
'space.0': (0, _react2.css)({
|
|
103
|
+
rowGap: "var(--ds-space-0, 0px)"
|
|
104
|
+
}),
|
|
105
|
+
'space.025': (0, _react2.css)({
|
|
106
|
+
rowGap: "var(--ds-space-025, 2px)"
|
|
107
|
+
}),
|
|
108
|
+
'space.050': (0, _react2.css)({
|
|
109
|
+
rowGap: "var(--ds-space-050, 4px)"
|
|
110
|
+
}),
|
|
111
|
+
'space.075': (0, _react2.css)({
|
|
112
|
+
rowGap: "var(--ds-space-075, 6px)"
|
|
113
|
+
}),
|
|
114
|
+
'space.100': (0, _react2.css)({
|
|
115
|
+
rowGap: "var(--ds-space-100, 8px)"
|
|
116
|
+
}),
|
|
117
|
+
'space.1000': (0, _react2.css)({
|
|
118
|
+
rowGap: "var(--ds-space-1000, 80px)"
|
|
119
|
+
}),
|
|
120
|
+
'space.150': (0, _react2.css)({
|
|
121
|
+
rowGap: "var(--ds-space-150, 12px)"
|
|
122
|
+
}),
|
|
123
|
+
'space.200': (0, _react2.css)({
|
|
124
|
+
rowGap: "var(--ds-space-200, 16px)"
|
|
125
|
+
}),
|
|
126
|
+
'space.250': (0, _react2.css)({
|
|
127
|
+
rowGap: "var(--ds-space-250, 20px)"
|
|
128
|
+
}),
|
|
129
|
+
'space.300': (0, _react2.css)({
|
|
130
|
+
rowGap: "var(--ds-space-300, 24px)"
|
|
131
|
+
}),
|
|
132
|
+
'space.400': (0, _react2.css)({
|
|
133
|
+
rowGap: "var(--ds-space-400, 32px)"
|
|
134
|
+
}),
|
|
135
|
+
'space.500': (0, _react2.css)({
|
|
136
|
+
rowGap: "var(--ds-space-500, 40px)"
|
|
137
|
+
}),
|
|
138
|
+
'space.600': (0, _react2.css)({
|
|
139
|
+
rowGap: "var(--ds-space-600, 48px)"
|
|
140
|
+
}),
|
|
141
|
+
'space.800': (0, _react2.css)({
|
|
142
|
+
rowGap: "var(--ds-space-800, 64px)"
|
|
143
|
+
})
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* @codegenEnd
|
|
148
|
+
*/
|
|
@@ -10,7 +10,7 @@ var _react = require("react");
|
|
|
10
10
|
*
|
|
11
11
|
* A surface context provides context information on the current background (if set).
|
|
12
12
|
*/
|
|
13
|
-
var SurfaceContext = /*#__PURE__*/(0, _react.createContext)('elevation.surface');
|
|
13
|
+
var SurfaceContext = exports.SurfaceContext = /*#__PURE__*/(0, _react.createContext)('elevation.surface');
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* __useSurface__
|
|
@@ -19,9 +19,7 @@ var SurfaceContext = /*#__PURE__*/(0, _react.createContext)('elevation.surface')
|
|
|
19
19
|
*
|
|
20
20
|
* @see SurfaceContext
|
|
21
21
|
*/
|
|
22
|
-
exports.
|
|
23
|
-
var useSurface = function useSurface() {
|
|
22
|
+
var useSurface = exports.useSurface = function useSurface() {
|
|
24
23
|
return (0, _react.useContext)(SurfaceContext);
|
|
25
24
|
};
|
|
26
|
-
exports.useSurface = useSurface;
|
|
27
25
|
SurfaceContext.displayName = 'SurfaceProvider';
|
|
@@ -132,16 +132,15 @@ var Text = function Text(_ref) {
|
|
|
132
132
|
value: true
|
|
133
133
|
}, component);
|
|
134
134
|
};
|
|
135
|
-
var _default = Text;
|
|
135
|
+
var _default = exports.default = Text;
|
|
136
136
|
/**
|
|
137
137
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
138
|
-
* @codegen <<SignedSource::
|
|
138
|
+
* @codegen <<SignedSource::14dcf59f69533f453ffa8a5c5d165d19>>
|
|
139
139
|
* @codegenId typography
|
|
140
140
|
* @codegenCommand yarn codegen-styles
|
|
141
141
|
* @codegenParams ["fontSize", "fontWeight", "fontFamily", "lineHeight"]
|
|
142
|
-
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-typography.tsx <<SignedSource::
|
|
142
|
+
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-typography.tsx <<SignedSource::b01e60e475c0cb12960865631f2b4e2c>>
|
|
143
143
|
*/
|
|
144
|
-
exports.default = _default;
|
|
145
144
|
var fontSizeMap = {
|
|
146
145
|
'size.050': (0, _react2.css)({
|
|
147
146
|
fontSize: "var(--ds-font-size-050, 11px)"
|
|
@@ -184,7 +183,7 @@ var fontWeightMap = {
|
|
|
184
183
|
};
|
|
185
184
|
var fontFamilyMap = {
|
|
186
185
|
body: (0, _react2.css)({
|
|
187
|
-
fontFamily: "var(--ds-font-family-body, ui-sans-serif, \"Segoe UI\", system-ui,
|
|
186
|
+
fontFamily: "var(--ds-font-family-body, ui-sans-serif, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
|
|
188
187
|
}),
|
|
189
188
|
brand: (0, _react2.css)({
|
|
190
189
|
fontFamily: "var(--ds-font-family-brand, Charlie Sans)"
|
|
@@ -193,7 +192,7 @@ var fontFamilyMap = {
|
|
|
193
192
|
fontFamily: "var(--ds-font-family-code, ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)"
|
|
194
193
|
}),
|
|
195
194
|
heading: (0, _react2.css)({
|
|
196
|
-
fontFamily: "var(--ds-font-family-heading, ui-sans-serif, \"Segoe UI\", system-ui,
|
|
195
|
+
fontFamily: "var(--ds-font-family-heading, ui-sans-serif, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
|
|
197
196
|
}),
|
|
198
197
|
monospace: (0, _react2.css)({
|
|
199
198
|
fontFamily: "var(--ds-font-family-monospace, ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)"
|
package/dist/cjs/constants.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.LAYERS = void 0;
|
|
7
|
-
var LAYERS = {
|
|
7
|
+
var LAYERS = exports.LAYERS = {
|
|
8
8
|
card: 100,
|
|
9
9
|
navigation: 200,
|
|
10
10
|
dialog: 300,
|
|
@@ -14,5 +14,4 @@ var LAYERS = {
|
|
|
14
14
|
flag: 600,
|
|
15
15
|
spotlight: 700,
|
|
16
16
|
tooltip: 800
|
|
17
|
-
};
|
|
18
|
-
exports.LAYERS = LAYERS;
|
|
17
|
+
};
|
package/dist/cjs/index.js
CHANGED
|
@@ -4,17 +4,38 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
+
Object.defineProperty(exports, "UNSAFE_Box", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function get() {
|
|
10
|
+
return _box.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(exports, "UNSAFE_Inline", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function get() {
|
|
16
|
+
return _inline.default;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
7
19
|
Object.defineProperty(exports, "UNSAFE_InteractionSurface", {
|
|
8
20
|
enumerable: true,
|
|
9
21
|
get: function get() {
|
|
10
22
|
return _interactionSurface.default;
|
|
11
23
|
}
|
|
12
24
|
});
|
|
25
|
+
Object.defineProperty(exports, "UNSAFE_Stack", {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function get() {
|
|
28
|
+
return _stack.default;
|
|
29
|
+
}
|
|
30
|
+
});
|
|
13
31
|
Object.defineProperty(exports, "UNSAFE_Text", {
|
|
14
32
|
enumerable: true,
|
|
15
33
|
get: function get() {
|
|
16
34
|
return _text.default;
|
|
17
35
|
}
|
|
18
36
|
});
|
|
37
|
+
var _box = _interopRequireDefault(require("./components/box.partial"));
|
|
19
38
|
var _text = _interopRequireDefault(require("./components/text.partial"));
|
|
39
|
+
var _inline = _interopRequireDefault(require("./components/inline.partial"));
|
|
40
|
+
var _stack = _interopRequireDefault(require("./components/stack.partial"));
|
|
20
41
|
var _interactionSurface = _interopRequireDefault(require("./components/interaction-surface.partial"));
|
|
@@ -13,7 +13,7 @@ exports.default = void 0;
|
|
|
13
13
|
* @codegenCommand yarn codegen-styles
|
|
14
14
|
* @codegenDependency ../../../tokens/src/artifacts/tokens-raw/atlassian-light.tsx <<SignedSource::f6a616f7ea03ec40c148fc83050d073b>>
|
|
15
15
|
*/
|
|
16
|
-
var _default = {
|
|
16
|
+
var _default = exports.default = {
|
|
17
17
|
'neutral.bold': 'inverse',
|
|
18
18
|
'neutral.bold.hovered': 'inverse',
|
|
19
19
|
'neutral.bold.pressed': 'inverse',
|
|
@@ -41,5 +41,4 @@ var _default = {
|
|
|
41
41
|
'information.bold': 'inverse',
|
|
42
42
|
'information.bold.hovered': 'inverse',
|
|
43
43
|
'information.bold.pressed': 'inverse'
|
|
44
|
-
};
|
|
45
|
-
exports.default = _default;
|
|
44
|
+
};
|
|
@@ -12,5 +12,4 @@ exports.spacingScale = void 0;
|
|
|
12
12
|
* @codegen <<SignedSource::885d6c601dfa9fccaf33a7bd461ef59d>>
|
|
13
13
|
* @codegenCommand yarn codegen-styles
|
|
14
14
|
*/
|
|
15
|
-
var spacingScale = ['space.0', 'space.025', 'space.050', 'space.075', 'space.100', 'space.150', 'space.200', 'space.250', 'space.300', 'space.400', 'space.500', 'space.600', 'space.800', 'space.1000'];
|
|
16
|
-
exports.spacingScale = spacingScale;
|
|
15
|
+
var spacingScale = exports.spacingScale = ['space.0', 'space.025', 'space.050', 'space.075', 'space.100', 'space.150', 'space.200', 'space.250', 'space.300', 'space.400', 'space.500', 'space.600', 'space.800', 'space.1000'];
|