@atlaskit/ds-explorations 0.0.3 → 0.1.2
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 +32 -0
- package/dist/cjs/components/box.partial.js +355 -185
- package/dist/cjs/components/inline.partial.js +124 -0
- package/dist/cjs/components/interaction-surface.partial.js +253 -0
- package/dist/cjs/components/stack.partial.js +116 -0
- package/dist/cjs/components/surface-provider.js +31 -0
- package/dist/cjs/components/text.partial.js +152 -49
- package/dist/cjs/components/types.js +5 -0
- package/dist/cjs/constants.js +3 -0
- package/dist/cjs/index.js +50 -3
- package/dist/cjs/internal/color-map.js +42 -0
- package/dist/cjs/internal/role-to-element.js +36 -0
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/box.partial.js +259 -113
- package/dist/es2019/components/inline.partial.js +111 -0
- package/dist/es2019/components/interaction-surface.partial.js +243 -0
- package/dist/es2019/components/stack.partial.js +106 -0
- package/dist/es2019/components/surface-provider.js +20 -0
- package/dist/es2019/components/text.partial.js +122 -35
- package/dist/es2019/components/types.js +1 -0
- package/dist/es2019/constants.js +3 -0
- package/dist/es2019/index.js +6 -1
- package/dist/es2019/internal/color-map.js +34 -0
- package/dist/es2019/internal/role-to-element.js +28 -0
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/box.partial.js +274 -109
- package/dist/esm/components/inline.partial.js +110 -0
- package/dist/esm/components/interaction-surface.partial.js +242 -0
- package/dist/esm/components/stack.partial.js +105 -0
- package/dist/esm/components/surface-provider.js +20 -0
- package/dist/esm/components/text.partial.js +132 -34
- package/dist/esm/components/types.js +1 -0
- package/dist/esm/constants.js +3 -0
- package/dist/esm/index.js +6 -1
- package/dist/esm/internal/color-map.js +34 -0
- package/dist/esm/internal/role-to-element.js +28 -0
- package/dist/esm/version.json +1 -1
- package/dist/types/components/box.partial.d.ts +157 -76
- package/dist/types/components/inline.partial.d.ts +52 -0
- package/dist/types/components/interaction-surface.partial.d.ts +45 -0
- package/dist/types/components/stack.partial.d.ts +47 -0
- package/dist/types/components/surface-provider.d.ts +15 -0
- package/dist/types/components/text.partial.d.ts +100 -28
- package/dist/types/components/types.d.ts +13 -0
- package/dist/types/constants.d.ts +3 -0
- package/dist/types/index.d.ts +8 -2
- package/dist/types/internal/color-map.d.ts +34 -0
- package/dist/types/internal/role-to-element.d.ts +32 -0
- package/examples/00-basic.tsx +18 -1
- package/examples/01-box.tsx +126 -2
- package/examples/02-text.tsx +76 -2
- package/examples/03-stack.tsx +125 -0
- package/examples/04-inline.tsx +134 -0
- package/examples/{03-badge.tsx → 05-badge.tsx} +4 -4
- package/examples/{04-section-message.tsx → 06-section-message.tsx} +6 -6
- package/examples/{05-comment.tsx → 07-comment.tsx} +11 -9
- package/examples/08-lozenge.tsx +29 -0
- package/examples/99-interactions.tsx +175 -0
- package/package.json +8 -5
- package/report.api.md +457 -4
- package/scripts/__tests__/__snapshots__/codegen.test.tsx.snap +244 -50
- package/scripts/__tests__/codegen.test.tsx +5 -0
- package/scripts/codegen-styles.tsx +46 -10
- package/scripts/color-codegen-template.tsx +34 -12
- package/scripts/color-map-template.tsx +52 -0
- package/scripts/interaction-codegen.tsx +109 -0
- package/scripts/spacing-codegen-template.tsx +9 -1
- package/scripts/utils.tsx +5 -1
- package/src/components/__tests__/unit/box.test.tsx +50 -0
- package/src/components/__tests__/unit/inline.test.tsx +43 -0
- package/src/components/__tests__/unit/interaction-suface.test.tsx +70 -0
- package/src/components/__tests__/unit/stack.test.tsx +31 -0
- package/src/components/__tests__/unit/text.test.tsx +33 -0
- package/src/components/__tests__/visual-regression/__image_snapshots__/box-snapshot-test-tsx-box-basic-example-should-match-production-example-1-snap.png +3 -0
- package/src/components/__tests__/visual-regression/__image_snapshots__/box-snapshot-test-tsx-box-example-with-alignment-should-match-snapshot-1-snap.png +3 -0
- package/src/components/__tests__/visual-regression/__image_snapshots__/box-snapshot-test-tsx-box-example-with-background-and-padding-block-should-match-snapshot-1-snap.png +3 -0
- package/src/components/__tests__/visual-regression/__image_snapshots__/box-snapshot-test-tsx-box-example-with-background-and-padding-inline-should-match-snapshot-1-snap.png +3 -0
- package/src/components/__tests__/visual-regression/__image_snapshots__/box-snapshot-test-tsx-box-example-with-background-and-padding-should-match-snapshot-1-snap.png +3 -0
- package/src/components/__tests__/visual-regression/__image_snapshots__/box-snapshot-test-tsx-box-example-with-background-color-should-match-snapshot-1-snap.png +3 -0
- package/src/components/__tests__/visual-regression/__image_snapshots__/box-snapshot-test-tsx-box-example-with-border-color-should-match-snapshot-1-snap.png +3 -0
- package/src/components/__tests__/visual-regression/__image_snapshots__/box-snapshot-test-tsx-box-example-with-border-should-match-snapshot-1-snap.png +3 -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/__image_snapshots__/text-snapshot-test-tsx-text-example-with-font-sizes-should-match-snapshot-1-snap.png +3 -0
- package/src/components/__tests__/visual-regression/__image_snapshots__/text-snapshot-test-tsx-text-example-with-font-weights-should-match-snapshot-1-snap.png +3 -0
- package/src/components/__tests__/visual-regression/__image_snapshots__/text-snapshot-test-tsx-text-example-with-line-heights-should-match-snapshot-1-snap.png +3 -0
- package/src/components/__tests__/visual-regression/__image_snapshots__/text-snapshot-test-tsx-text-example-with-testing-should-match-snapshot-1-snap.png +3 -0
- package/src/components/__tests__/visual-regression/box-snapshot-test.tsx +33 -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__/visual-regression/text-snapshot-test.tsx +31 -0
- package/src/components/box.partial.tsx +305 -127
- package/src/components/inline.partial.tsx +120 -0
- package/src/components/interaction-surface.partial.tsx +237 -0
- package/src/components/stack.partial.tsx +104 -0
- package/src/components/surface-provider.tsx +25 -0
- package/src/components/text.partial.tsx +149 -38
- package/src/components/types.tsx +15 -0
- package/src/constants.tsx +3 -0
- package/src/index.tsx +8 -1
- package/src/internal/color-map.tsx +34 -0
- package/src/internal/role-to-element.tsx +34 -0
- package/dist/cjs/components/inline.js +0 -45
- package/dist/cjs/components/stack.js +0 -33
- package/dist/es2019/components/inline.js +0 -31
- package/dist/es2019/components/stack.js +0 -22
- package/dist/esm/components/inline.js +0 -30
- package/dist/esm/components/stack.js +0 -21
- package/dist/types/components/inline.d.ts +0 -19
- package/dist/types/components/stack.d.ts +0 -16
- package/src/components/inline.tsx +0 -49
- package/src/components/stack.tsx +0 -30
|
@@ -1,64 +1,167 @@
|
|
|
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
|
|
|
8
|
-
var
|
|
10
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
+
|
|
12
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
13
|
+
|
|
14
|
+
var _react = require("@emotion/react");
|
|
15
|
+
|
|
16
|
+
var _tinyInvariant = _interopRequireDefault(require("tiny-invariant"));
|
|
17
|
+
|
|
18
|
+
var _colorMap = require("../internal/color-map");
|
|
9
19
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
var
|
|
20
|
+
var _surfaceProvider = require("./surface-provider");
|
|
21
|
+
|
|
22
|
+
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; }
|
|
23
|
+
|
|
24
|
+
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; }
|
|
25
|
+
|
|
26
|
+
var asAllowlist = ['span', 'div', 'p'];
|
|
15
27
|
var fontFamily = "-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif";
|
|
16
28
|
var fontSizeMap = {
|
|
17
|
-
|
|
18
|
-
fontSize:
|
|
29
|
+
'11px': (0, _react.css)({
|
|
30
|
+
fontSize: '11px'
|
|
19
31
|
}),
|
|
20
|
-
|
|
21
|
-
fontSize:
|
|
32
|
+
'12px': (0, _react.css)({
|
|
33
|
+
fontSize: '12px'
|
|
22
34
|
}),
|
|
23
|
-
|
|
24
|
-
fontSize:
|
|
35
|
+
'14px': (0, _react.css)({
|
|
36
|
+
fontSize: '14px'
|
|
25
37
|
})
|
|
26
38
|
};
|
|
39
|
+
// NOTE: can't use numbers as keys or Constellation won't build. Weird one.
|
|
27
40
|
var fontWeightMap = {
|
|
28
|
-
400: (0,
|
|
41
|
+
'400': (0, _react.css)({
|
|
29
42
|
fontWeight: 400
|
|
30
43
|
}),
|
|
31
|
-
500: (0,
|
|
44
|
+
'500': (0, _react.css)({
|
|
32
45
|
fontWeight: 500
|
|
46
|
+
}),
|
|
47
|
+
'700': (0, _react.css)({
|
|
48
|
+
fontWeight: 700
|
|
49
|
+
})
|
|
50
|
+
};
|
|
51
|
+
var lineHeightMap = {
|
|
52
|
+
'12px': (0, _react.css)({
|
|
53
|
+
lineHeight: '12px'
|
|
54
|
+
}),
|
|
55
|
+
'16px': (0, _react.css)({
|
|
56
|
+
lineHeight: '16px'
|
|
57
|
+
}),
|
|
58
|
+
'20px': (0, _react.css)({
|
|
59
|
+
lineHeight: '20px'
|
|
60
|
+
}),
|
|
61
|
+
'24px': (0, _react.css)({
|
|
62
|
+
lineHeight: '24px'
|
|
63
|
+
}),
|
|
64
|
+
'28px': (0, _react.css)({
|
|
65
|
+
lineHeight: '28px'
|
|
66
|
+
}),
|
|
67
|
+
'32px': (0, _react.css)({
|
|
68
|
+
lineHeight: '32px'
|
|
69
|
+
}),
|
|
70
|
+
'40px': (0, _react.css)({
|
|
71
|
+
lineHeight: '40px'
|
|
33
72
|
})
|
|
34
73
|
};
|
|
35
|
-
var
|
|
74
|
+
var textAlignMap = {
|
|
75
|
+
center: (0, _react.css)({
|
|
76
|
+
textAlign: 'center'
|
|
77
|
+
}),
|
|
78
|
+
end: (0, _react.css)({
|
|
79
|
+
textAlign: 'end'
|
|
80
|
+
}),
|
|
81
|
+
start: (0, _react.css)({
|
|
82
|
+
textAlign: 'start'
|
|
83
|
+
})
|
|
84
|
+
};
|
|
85
|
+
var textTransformMap = {
|
|
86
|
+
none: (0, _react.css)({
|
|
87
|
+
textTransform: 'none'
|
|
88
|
+
}),
|
|
89
|
+
lowercase: (0, _react.css)({
|
|
90
|
+
textTransform: 'lowercase'
|
|
91
|
+
}),
|
|
92
|
+
uppercase: (0, _react.css)({
|
|
93
|
+
textTransform: 'uppercase'
|
|
94
|
+
})
|
|
95
|
+
};
|
|
96
|
+
var verticalAlignMap = {
|
|
97
|
+
top: (0, _react.css)({
|
|
98
|
+
verticalAlign: 'top'
|
|
99
|
+
}),
|
|
100
|
+
middle: (0, _react.css)({
|
|
101
|
+
verticalAlign: 'middle'
|
|
102
|
+
}),
|
|
103
|
+
bottom: (0, _react.css)({
|
|
104
|
+
verticalAlign: 'bottom'
|
|
105
|
+
})
|
|
106
|
+
};
|
|
107
|
+
var baseStyles = (0, _react.css)({
|
|
108
|
+
boxSizing: 'border-box',
|
|
36
109
|
fontFamily: fontFamily
|
|
37
110
|
});
|
|
111
|
+
var truncateStyles = (0, _react.css)({
|
|
112
|
+
overflow: 'hidden',
|
|
113
|
+
textOverflow: 'ellipsis',
|
|
114
|
+
whiteSpace: 'nowrap'
|
|
115
|
+
});
|
|
38
116
|
/**
|
|
39
117
|
* __Text__
|
|
40
118
|
*
|
|
41
|
-
*
|
|
119
|
+
* Text is a primitive component that has the Atlassian Design System's design guidelines baked in.
|
|
120
|
+
* This includes considerations for text attributes such as color, font size, font weight, and line height.
|
|
121
|
+
* It renders a `span` by default.
|
|
42
122
|
*
|
|
43
123
|
* @internal
|
|
44
124
|
*/
|
|
45
125
|
|
|
46
|
-
function Text(_ref) {
|
|
126
|
+
var Text = function Text(_ref) {
|
|
127
|
+
var _colorMap$surface;
|
|
128
|
+
|
|
47
129
|
var _ref$as = _ref.as,
|
|
48
130
|
Component = _ref$as === void 0 ? 'span' : _ref$as,
|
|
49
131
|
children = _ref.children,
|
|
50
|
-
|
|
132
|
+
colorTuple = _ref.color,
|
|
51
133
|
fontSize = _ref.fontSize,
|
|
52
|
-
fontWeight = _ref.fontWeight
|
|
53
|
-
|
|
54
|
-
|
|
134
|
+
fontWeight = _ref.fontWeight,
|
|
135
|
+
lineHeight = _ref.lineHeight,
|
|
136
|
+
_ref$shouldTruncate = _ref.shouldTruncate,
|
|
137
|
+
shouldTruncate = _ref$shouldTruncate === void 0 ? false : _ref$shouldTruncate,
|
|
138
|
+
textAlign = _ref.textAlign,
|
|
139
|
+
textTransform = _ref.textTransform,
|
|
140
|
+
verticalAlign = _ref.verticalAlign,
|
|
141
|
+
testId = _ref.testId,
|
|
142
|
+
UNSAFE_style = _ref.UNSAFE_style;
|
|
143
|
+
var surface = (0, _surfaceProvider.useSurface)(); // @ts-ignore
|
|
144
|
+
|
|
145
|
+
var _ref2 = colorTuple || [],
|
|
146
|
+
_ref3 = (0, _slicedToArray2.default)(_ref2, 2),
|
|
147
|
+
_ref3$ = _ref3[0],
|
|
148
|
+
color = _ref3$ === void 0 ? (_colorMap$surface = _colorMap.colorMap[surface]) !== null && _colorMap$surface !== void 0 ? _colorMap$surface : 'color.text' : _ref3$,
|
|
149
|
+
fallback = _ref3[1];
|
|
150
|
+
|
|
151
|
+
(0, _tinyInvariant.default)(asAllowlist.includes(Component), "@atlaskit/ds-explorations: Text received an invalid \"as\" value of \"".concat(Component, "\""));
|
|
152
|
+
return (0, _react.jsx)(Component, {
|
|
153
|
+
style: _objectSpread(_objectSpread({}, UNSAFE_style), fallback && {
|
|
154
|
+
'--ds-co-fb': fallback
|
|
155
|
+
}),
|
|
156
|
+
css: [baseStyles, color && textColorMap[color], fontSize && fontSizeMap[fontSize], fontWeight && fontWeightMap[fontWeight], lineHeight && lineHeightMap[lineHeight], shouldTruncate && truncateStyles, textAlign && textAlignMap[textAlign], textTransform && textTransformMap[textTransform], verticalAlign && verticalAlignMap[verticalAlign]],
|
|
157
|
+
"data-testid": testId
|
|
55
158
|
}, children);
|
|
56
|
-
}
|
|
159
|
+
};
|
|
57
160
|
|
|
58
161
|
var _default = Text;
|
|
59
162
|
/**
|
|
60
163
|
* THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
61
|
-
* @codegen <<SignedSource::
|
|
164
|
+
* @codegen <<SignedSource::140ffff6e1310c1c37e2067e2c232b92>>
|
|
62
165
|
* @codegenId colors
|
|
63
166
|
* @codegenCommand yarn codegen-styles
|
|
64
167
|
* @codegenParams ["text"]
|
|
@@ -66,44 +169,44 @@ var _default = Text;
|
|
|
66
169
|
|
|
67
170
|
exports.default = _default;
|
|
68
171
|
var textColorMap = {
|
|
69
|
-
|
|
70
|
-
color: "var(--ds-text,
|
|
172
|
+
'color.text': (0, _react.css)({
|
|
173
|
+
color: "var(--ds-text, var(--ds-co-fb))"
|
|
71
174
|
}),
|
|
72
|
-
subtle: (0,
|
|
73
|
-
color: "var(--ds-text-subtle,
|
|
175
|
+
subtle: (0, _react.css)({
|
|
176
|
+
color: "var(--ds-text-subtle, var(--ds-co-fb))"
|
|
74
177
|
}),
|
|
75
|
-
subtlest: (0,
|
|
76
|
-
color: "var(--ds-text-subtlest,
|
|
178
|
+
subtlest: (0, _react.css)({
|
|
179
|
+
color: "var(--ds-text-subtlest, var(--ds-co-fb))"
|
|
77
180
|
}),
|
|
78
|
-
disabled: (0,
|
|
79
|
-
color: "var(--ds-text-disabled,
|
|
181
|
+
disabled: (0, _react.css)({
|
|
182
|
+
color: "var(--ds-text-disabled, var(--ds-co-fb))"
|
|
80
183
|
}),
|
|
81
|
-
inverse: (0,
|
|
82
|
-
color: "var(--ds-text-inverse,
|
|
184
|
+
inverse: (0, _react.css)({
|
|
185
|
+
color: "var(--ds-text-inverse, var(--ds-co-fb))"
|
|
83
186
|
}),
|
|
84
|
-
brand: (0,
|
|
85
|
-
color: "var(--ds-text-brand,
|
|
187
|
+
brand: (0, _react.css)({
|
|
188
|
+
color: "var(--ds-text-brand, var(--ds-co-fb))"
|
|
86
189
|
}),
|
|
87
|
-
selected: (0,
|
|
88
|
-
color: "var(--ds-text-selected,
|
|
190
|
+
selected: (0, _react.css)({
|
|
191
|
+
color: "var(--ds-text-selected, var(--ds-co-fb))"
|
|
89
192
|
}),
|
|
90
|
-
danger: (0,
|
|
91
|
-
color: "var(--ds-text-danger,
|
|
193
|
+
danger: (0, _react.css)({
|
|
194
|
+
color: "var(--ds-text-danger, var(--ds-co-fb))"
|
|
92
195
|
}),
|
|
93
|
-
warning: (0,
|
|
94
|
-
color: "var(--ds-text-warning,
|
|
196
|
+
warning: (0, _react.css)({
|
|
197
|
+
color: "var(--ds-text-warning, var(--ds-co-fb))"
|
|
95
198
|
}),
|
|
96
|
-
'warning.inverse': (0,
|
|
97
|
-
color: "var(--ds-text-warning-inverse,
|
|
199
|
+
'warning.inverse': (0, _react.css)({
|
|
200
|
+
color: "var(--ds-text-warning-inverse, var(--ds-co-fb))"
|
|
98
201
|
}),
|
|
99
|
-
success: (0,
|
|
100
|
-
color: "var(--ds-text-success,
|
|
202
|
+
success: (0, _react.css)({
|
|
203
|
+
color: "var(--ds-text-success, var(--ds-co-fb))"
|
|
101
204
|
}),
|
|
102
|
-
discovery: (0,
|
|
103
|
-
color: "var(--ds-text-discovery,
|
|
205
|
+
discovery: (0, _react.css)({
|
|
206
|
+
color: "var(--ds-text-discovery, var(--ds-co-fb))"
|
|
104
207
|
}),
|
|
105
|
-
information: (0,
|
|
106
|
-
color: "var(--ds-text-information,
|
|
208
|
+
information: (0, _react.css)({
|
|
209
|
+
color: "var(--ds-text-information, var(--ds-co-fb))"
|
|
107
210
|
})
|
|
108
211
|
};
|
|
109
212
|
/**
|
package/dist/cjs/constants.js
CHANGED
|
@@ -5,13 +5,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.SPACING_SCALE = void 0;
|
|
7
7
|
var SPACING_SCALE = {
|
|
8
|
+
'sp-0': 0,
|
|
8
9
|
'sp-25': 2,
|
|
9
10
|
'sp-50': 4,
|
|
10
11
|
'sp-75': 6,
|
|
11
12
|
'sp-100': 8,
|
|
13
|
+
'sp-150': 12,
|
|
12
14
|
'sp-200': 16,
|
|
13
15
|
'sp-300': 24,
|
|
14
16
|
'sp-400': 32,
|
|
17
|
+
'sp-500': 40,
|
|
15
18
|
'sp-600': 48,
|
|
16
19
|
'sp-800': 64
|
|
17
20
|
};
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,8 +1,55 @@
|
|
|
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
|
-
exports
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
Object.defineProperty(exports, "UNSAFE_Box", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function get() {
|
|
11
|
+
return _box.default;
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
Object.defineProperty(exports, "UNSAFE_Inline", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function get() {
|
|
17
|
+
return _inline.default;
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports, "UNSAFE_InteractionSurface", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function get() {
|
|
23
|
+
return _interactionSurface.default;
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
Object.defineProperty(exports, "UNSAFE_SPACING_SCALE", {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
get: function get() {
|
|
29
|
+
return _constants.SPACING_SCALE;
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(exports, "UNSAFE_Stack", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function get() {
|
|
35
|
+
return _stack.default;
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
Object.defineProperty(exports, "UNSAFE_Text", {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
get: function get() {
|
|
41
|
+
return _text.default;
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
var _box = _interopRequireDefault(require("./components/box.partial"));
|
|
46
|
+
|
|
47
|
+
var _text = _interopRequireDefault(require("./components/text.partial"));
|
|
48
|
+
|
|
49
|
+
var _inline = _interopRequireDefault(require("./components/inline.partial"));
|
|
50
|
+
|
|
51
|
+
var _stack = _interopRequireDefault(require("./components/stack.partial"));
|
|
52
|
+
|
|
53
|
+
var _interactionSurface = _interopRequireDefault(require("./components/interaction-surface.partial"));
|
|
54
|
+
|
|
55
|
+
var _constants = require("./constants");
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.colorMap = void 0;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
|
|
10
|
+
*
|
|
11
|
+
* Some artifact
|
|
12
|
+
*
|
|
13
|
+
* @codegen <<SignedSource::8f568e4f0837f7af4a10429e060ad059>>
|
|
14
|
+
* @codegenCommand yarn codegen-styles
|
|
15
|
+
*/
|
|
16
|
+
var colorMap = {
|
|
17
|
+
'neutral.bold': 'inverse',
|
|
18
|
+
'neutral.bold.hovered': 'inverse',
|
|
19
|
+
'neutral.bold.pressed': 'inverse',
|
|
20
|
+
'brand.bold': 'inverse',
|
|
21
|
+
'brand.bold.hovered': 'inverse',
|
|
22
|
+
'brand.bold.pressed': 'inverse',
|
|
23
|
+
'selected.bold': 'inverse',
|
|
24
|
+
'selected.bold.hovered': 'inverse',
|
|
25
|
+
'selected.bold.pressed': 'inverse',
|
|
26
|
+
'danger.bold': 'inverse',
|
|
27
|
+
'danger.bold.hovered': 'inverse',
|
|
28
|
+
'danger.bold.pressed': 'inverse',
|
|
29
|
+
'warning.bold': 'warning.inverse',
|
|
30
|
+
'warning.bold.hovered': 'warning.inverse',
|
|
31
|
+
'warning.bold.pressed': 'warning.inverse',
|
|
32
|
+
'success.bold': 'inverse',
|
|
33
|
+
'success.bold.hovered': 'inverse',
|
|
34
|
+
'success.bold.pressed': 'inverse',
|
|
35
|
+
'discovery.bold': 'inverse',
|
|
36
|
+
'discovery.bold.hovered': 'inverse',
|
|
37
|
+
'discovery.bold.pressed': 'inverse',
|
|
38
|
+
'information.bold': 'inverse',
|
|
39
|
+
'information.bold.hovered': 'inverse',
|
|
40
|
+
'information.bold.pressed': 'inverse'
|
|
41
|
+
};
|
|
42
|
+
exports.colorMap = colorMap;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Adapted straight from react-mui, with a small change.
|
|
10
|
+
* @see https://www.unpkg.com/browse/react-gui@0.2.1/src/modules/getAccessibilityElementWithSideEffect.js
|
|
11
|
+
*/
|
|
12
|
+
var roleToElementType = {
|
|
13
|
+
article: 'article',
|
|
14
|
+
banner: 'header',
|
|
15
|
+
blockquote: 'blockquote',
|
|
16
|
+
button: 'button',
|
|
17
|
+
code: 'code',
|
|
18
|
+
complementary: 'aside',
|
|
19
|
+
contentinfo: 'footer',
|
|
20
|
+
deletion: 'del',
|
|
21
|
+
emphasis: 'em',
|
|
22
|
+
figure: 'figure',
|
|
23
|
+
insertion: 'ins',
|
|
24
|
+
form: 'form',
|
|
25
|
+
link: 'a',
|
|
26
|
+
list: 'ul',
|
|
27
|
+
listitem: 'li',
|
|
28
|
+
main: 'main',
|
|
29
|
+
navigation: 'nav',
|
|
30
|
+
region: 'section',
|
|
31
|
+
strong: 'strong',
|
|
32
|
+
presentation: 'div',
|
|
33
|
+
group: 'fieldset'
|
|
34
|
+
};
|
|
35
|
+
var _default = roleToElementType;
|
|
36
|
+
exports.default = _default;
|
package/dist/cjs/version.json
CHANGED